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.
Equations
Instances For
Declarations about mapRange #
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
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
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
Instances For
Finsupp.mapDomain is an AddMonoidHom.
Equations
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
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
Instances For
Declarations about Finsupp.subtypeDomain #
subtypeDomain p f is the restriction of the finitely supported function f to subtype p.
Equations
Instances For
subtypeDomain but as an AddMonoidHom.
Equations
Instances For
Finsupp.filter as an AddMonoidHom.
Equations
Instances For
Alias of Finsupp.curryEquiv.
The equivalence between α × β →₀ M and α →₀ β →₀ M given by currying/uncurrying.
Equations
Instances For
The additive monoid isomorphism between α × β →₀ M and α →₀ β →₀ M given by
currying/uncurrying.
Equations
Instances For
Finsupp.sumElim f g maps inl x to f x and inr y to g y.
Equations
Instances For
The Finsupp version of Pi.unique.
Equations
The Finsupp version of Pi.uniqueOfIsEmpty.
Equations
Extend the domain of a Finsupp by using 0 where P x does not hold.
Equations
Instances For
Alias of Finsupp.extendDomain_apply.
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
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
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
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
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.