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.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 #
- Expand the list of definitions and important lemmas to the module docstring.
The graph of a finitely supported function over its support, i.e. the finset of input and output pairs with non-zero outputs.
Instances For
Declarations about mapRange #
Finsupp.mapRange as an equiv.
Equations
- Finsupp.mapRange.equiv f hf hf' = { toFun := Finsupp.mapRange (⇑f) hf, invFun := Finsupp.mapRange (⇑f.symm) hf', left_inv := ⋯, right_inv := ⋯ }
Instances For
Composition with a fixed zero-preserving homomorphism is itself a zero-preserving homomorphism on functions.
Equations
- Finsupp.mapRange.zeroHom f = { toFun := Finsupp.mapRange ⇑f ⋯, map_zero' := ⋯ }
Instances For
Composition with a fixed additive homomorphism is itself an additive homomorphism on functions.
Equations
- Finsupp.mapRange.addMonoidHom f = { toFun := Finsupp.mapRange ⇑f ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Finsupp.mapRange.AddMonoidHom as an equiv.
Equations
- Finsupp.mapRange.addEquiv f = { toFun := Finsupp.mapRange ⇑f ⋯, invFun := Finsupp.mapRange ⇑f.symm ⋯, left_inv := ⋯, right_inv := ⋯, map_add' := ⋯ }
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
- Finsupp.equivMapDomain f l = { support := Finset.map f.toEmbedding l.support, toFun := fun (a : β) => l (f.symm a), mem_support_toFun := ⋯ }
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
- Finsupp.equivCongrLeft f = { toFun := Finsupp.equivMapDomain f, invFun := Finsupp.equivMapDomain f.symm, left_inv := ⋯, right_inv := ⋯ }
Instances For
Alias of Nat.cast_finsuppProd.
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 = v.sum fun (a : α) => Finsupp.single (f a)
Instances For
Finsupp.mapDomain is an AddMonoidHom.
Equations
- Finsupp.mapDomain.addMonoidHom f = { toFun := Finsupp.mapDomain f, map_zero' := ⋯, map_add' := ⋯ }
Instances For
A version of sum_mapDomain_index that takes a bundled AddMonoidHom,
rather than separate linearity hypotheses.
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
Instances For
A version of Finsupp.comapDomain_add that's easier to use.
Finsupp.comapDomain is an AddMonoidHom.
Equations
- Finsupp.comapDomain.addMonoidHom hf = { toFun := fun (x : β →₀ M) => Finsupp.comapDomain f x ⋯, map_zero' := ⋯, map_add' := ⋯ }
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
- Finsupp.filter p f = { support := Finset.filter p f.support, toFun := fun (a : α) => if p a then f a else 0, mem_support_toFun := ⋯ }
Instances For
Alias of Finsupp.zero_notMem_frange.
Declarations about Finsupp.subtypeDomain #
subtypeDomain p f is the restriction of the finitely supported function f to subtype p.
Equations
- Finsupp.subtypeDomain p f = { support := Finset.subtype p f.support, toFun := ⇑f ∘ Subtype.val, mem_support_toFun := ⋯ }
Instances For
subtypeDomain but as an AddMonoidHom.
Equations
- Finsupp.subtypeDomainAddMonoidHom = { toFun := Finsupp.subtypeDomain p, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Finsupp.filter as an AddMonoidHom.
Equations
- Finsupp.filterAddHom p = { toFun := Finsupp.filter p, map_zero' := ⋯, map_add' := ⋯ }
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
- f.uncurry = { support := f.support.disjiUnion (fun (a : α) => Finset.map (Function.Embedding.sectR a β) (f a).support) ⋯, toFun := fun (x : α × β) => (f x.1) x.2, mem_support_toFun := ⋯ }
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
- One or more equations did not get rendered due to their size.
Instances For
finsuppProdEquiv defines the Equiv between ((α × β) →₀ M) and (α →₀ (β →₀ M)) given by
currying and uncurrying.
Equations
- Finsupp.finsuppProdEquiv = { toFun := Finsupp.curry, invFun := Finsupp.uncurry, left_inv := ⋯, right_inv := ⋯ }
Instances For
Finsupp.sumElim f g maps inl x to f x and inr y to g y.
Equations
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
- Finsupp.sumFinsuppAddEquivProdFinsupp = { toEquiv := Finsupp.sumFinsuppEquivProdFinsupp, map_add' := ⋯ }
Instances For
The Finsupp version of Pi.unique.
Equations
The Finsupp version of Pi.uniqueOfIsEmpty.
Equations
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
- f.extendDomain = f.piecewise 0
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
- Finsupp.domCongr e = { toFun := Finsupp.equivMapDomain e, invFun := Finsupp.equivMapDomain e.symm, left_inv := ⋯, right_inv := ⋯, map_add' := ⋯ }
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
- l.split i = Finsupp.comapDomain (Sigma.mk i) l ⋯
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
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
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
- Finsupp.sigmaFinsuppAddEquivPiFinsupp = { toEquiv := Finsupp.sigmaFinsuppEquivPiFinsupp, map_add' := ⋯ }