Miscellaneous definitions, lemmas, and constructions using finsupp #
Main declarations #
Finsupp.graph: the finset of input and output pairs with non-zero outputs.Finsupp.mapRange.equiv:Finsupp.mapRangeas an equiv.Finsupp.mapDomain: maps the domain of aFinsuppby a function and by summing.Finsupp.comapDomain: postcomposition of aFinsuppwith a function injective on the preimage of its support.Finsupp.some: restrict a finitely supported function onOption αto a finitely supported function onα.Finsupp.filter:filter p fis the finitely supported function that isf aifp ais true and 0 otherwise.Finsupp.frange: the image of a finitely supported function on its support.Finsupp.subtype_domain: the restriction of a finitely supported functionfto a subtype.
Implementation notes #
This file is a noncomputable theory and uses classical logic throughout.
TODO #
-
This file is currently ~1600 lines long and is quite a miscellany of definitions and lemmas, so it should be divided into smaller pieces.
-
Expand the list of definitions and important lemmas to the module docstring.
Declarations about mapRange #
Composition with a fixed zero-preserving homomorphism is itself a zero-preserving homomorphism on functions.
Equations
- Finsupp.mapRange.zeroHom f = { toFun := Finsupp.mapRange ⇑f (_ : f 0 = 0), map_zero' := (_ : Finsupp.mapRange ⇑f (_ : f 0 = 0) 0 = 0) }
Instances For
Composition with a fixed additive homomorphism is itself an additive homomorphism on functions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finsupp.mapRange.AddMonoidHom as an equiv.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Declarations about equivCongrLeft #
Given f : α ≃ β, we can map l : α →₀ M to equivMapDomain f l : β →₀ M (computably)
by mapping the support forwards and the function backwards.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given f : α ≃ β, the finitely supported function spaces are also in bijection:
(α →₀ M) ≃ (β →₀ M).
This is the finitely-supported version of Equiv.piCongrLeft.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given f : α → β and v : α →₀ M, mapDomain f v : β →₀ M
is the finitely supported function whose value at a : β is the sum
of v x over all x such that f x = a.
Equations
- Finsupp.mapDomain f v = Finsupp.sum v fun (a : α) => Finsupp.single (f a)
Instances For
Finsupp.mapDomain is an AddMonoidHom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A version of sum_mapDomain_index that takes a bundled AddMonoidHom,
rather than separate linearity hypotheses.
When f is an embedding we have an embedding (α →₀ ℕ) ↪ (β →₀ ℕ) given by mapDomain.
Equations
- Finsupp.mapDomainEmbedding f = { toFun := Finsupp.mapDomain ⇑f, inj' := (_ : Function.Injective (Finsupp.mapDomain ⇑f)) }
Instances For
When g preserves addition, mapRange and mapDomain commute.
Declarations about comapDomain #
Given f : α → β, l : β →₀ M and a proof hf that f is injective on
the preimage of l.support, comapDomain f l hf is the finitely supported function
from α to M given by composing l with f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A version of Finsupp.comapDomain_add that's easier to use.
Finsupp.comapDomain is an AddMonoidHom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restrict a finitely supported function on Option α to a finitely supported function on α.
Equations
- Finsupp.some f = Finsupp.comapDomain some f (_ : ∀ x ∈ some ⁻¹' ↑f.support, ∀ a ∈ some ⁻¹' ↑f.support, some x = some a → x = a)
Instances For
Declarations about Finsupp.filter #
Finsupp.filter p f is the finitely supported function that is f a if p a is true and 0
otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
frange f is the image of f on the support of f.
Equations
- Finsupp.frange f = Finset.image (⇑f) f.support
Instances For
Declarations about Finsupp.subtypeDomain #
subtypeDomain p f is the restriction of the finitely supported function f to subtype p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
subtypeDomain but as an AddMonoidHom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finsupp.filter as an AddMonoidHom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a finitely supported function f from a product type α × β to γ,
curry f is the "curried" finitely supported function from α to the type of
finitely supported functions from β to γ.
Equations
- Finsupp.curry f = Finsupp.sum f fun (p : α × β) (c : M) => Finsupp.single p.1 (Finsupp.single p.2 c)
Instances For
Given a finitely supported function f from α to the type of
finitely supported functions from β to M,
uncurry f is the "uncurried" finitely supported function from α × β to M.
Equations
- Finsupp.uncurry f = Finsupp.sum f fun (a : α) (g : β →₀ M) => Finsupp.sum g fun (b : β) (c : M) => Finsupp.single (a, b) c
Instances For
finsuppProdEquiv defines the Equiv between ((α × β) →₀ M) and (α →₀ (β →₀ M)) given by
currying and uncurrying.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence between (α ⊕ β) →₀ γ and (α →₀ γ) × (β →₀ γ).
This is the Finsupp version of Equiv.sum_arrow_equiv_prod_arrow.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The additive equivalence between (α ⊕ β) →₀ M and (α →₀ M) × (β →₀ M).
This is the Finsupp version of Equiv.sum_arrow_equiv_prod_arrow.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Declarations about scalar multiplication #
Scalar multiplication acting on the domain.
This is not an instance as it would conflict with the action on the range.
See the instance_diamonds test for examples of such conflicts.
Equations
- Finsupp.comapSMul = { smul := fun (g : G) => Finsupp.mapDomain fun (x : α) => g • x }
Instances For
Finsupp.comapSMul is multiplicative
Equations
Instances For
Finsupp.comapSMul is distributive
Equations
Instances For
When G is a group, Finsupp.comapSMul acts by precomposition with the action of g⁻¹.
Equations
- Finsupp.smulZeroClass = SMulZeroClass.mk (_ : ∀ (a : R), a • 0 = 0)
Throughout this section, some Monoid and Semiring arguments are specified with {} instead of
[]. See note [implicit instance arguments].
Equations
- (_ : FaithfulSMul R (α →₀ M)) = (_ : FaithfulSMul R (α →₀ M))
Equations
- Finsupp.instSMulWithZero = SMulWithZero.mk (_ : ∀ (f : α →₀ M), 0 • f = 0)
Equations
- Finsupp.distribSMul α M = DistribSMul.mk (_ : ∀ (x : R) (x_1 x_2 : α →₀ M), x • (x_1 + x_2) = x • x_1 + x • x_2)
Equations
- Finsupp.distribMulAction α M = let src := Finsupp.distribSMul α M; DistribMulAction.mk (_ : ∀ (a : R), a • 0 = 0) (_ : ∀ (a : R) (x y : α →₀ M), a • (x + y) = a • x + a • y)
Equations
- (_ : IsScalarTower R S (α →₀ M)) = (_ : IsScalarTower R S (α →₀ M))
Equations
- (_ : SMulCommClass R S (α →₀ M)) = (_ : SMulCommClass R S (α →₀ M))
Equations
- (_ : IsCentralScalar R (α →₀ M)) = (_ : IsCentralScalar R (α →₀ M))
A version of Finsupp.comapDomain_smul that's easier to use.
A version of Finsupp.sum_smul_index' for bundled additive maps.
Equations
- (_ : NoZeroSMulDivisors R (ι →₀ M)) = (_ : NoZeroSMulDivisors R (ι →₀ M))
Finsupp.single as a DistribMulActionHom.
See also Finsupp.lsingle for the version as a linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
See note [partially-applied ext lemmas].
The Finsupp version of Pi.unique.
Equations
- Finsupp.uniqueOfRight = Function.Injective.unique (_ : Function.Injective fun (f : α →₀ R) => ⇑f)
The Finsupp version of Pi.uniqueOfIsEmpty.
Equations
- Finsupp.uniqueOfLeft = Function.Injective.unique (_ : Function.Injective fun (f : α →₀ R) => ⇑f)
Combine finitely supported functions over {a // P a} and {a // ¬P a}, by case-splitting on
P a.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extend the domain of a Finsupp by using 0 where P x does not hold.
Equations
Instances For
Given an AddCommMonoid M and s : Set α, restrictSupportEquiv s M is the Equiv
between the subtype of finitely supported functions with support contained in s and
the type of finitely supported functions from s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given AddCommMonoid M and e : α ≃ β, domCongr e is the corresponding Equiv between
α →₀ M and β →₀ M.
This is Finsupp.equivCongrLeft as an AddEquiv.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Declarations about sigma types #
Given l, a finitely supported function from the sigma type Σ (i : ι), αs i to M and
an index element i : ι, split l i is the ith component of l,
a finitely supported function from as i to M.
This is the Finsupp version of Sigma.curry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given l, a finitely supported function from the sigma type Σ (i : ι), αs i to β,
split_support l is the finset of indices in ι that appear in the support of l.
Equations
- Finsupp.splitSupport l = Finset.image Sigma.fst l.support
Instances For
Given l, a finitely supported function from the sigma type Σ i, αs i to β and
an ι-indexed family g of functions from (αs i →₀ β) to γ, split_comp defines a
finitely supported function from the index type ι to γ given by composing g i with
split l i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
On a Fintype η, Finsupp.split is an equivalence between (Σ (j : η), ιs j) →₀ α
and Π j, (ιs j →₀ α).
This is the Finsupp version of Equiv.Pi_curry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
On a Fintype η, Finsupp.split is an additive equivalence between
(Σ (j : η), ιs j) →₀ α and Π j, (ιs j →₀ α).
This is the AddEquiv version of Finsupp.sigmaFinsuppEquivPiFinsupp.
Equations
- One or more equations did not get rendered due to their size.