Finitely supported functions on exactly one point #
This file contains definitions and basic results on defining/updating/removing Finsupps
using one point of the domain.
Main declarations #
Finsupp.single: TheFinsuppwhich is nonzero in exactly one point.Finsupp.update: Changes one value of aFinsupp.Finsupp.erase: Replaces one value of aFinsuppby0.
Implementation notes #
This file is a noncomputable theory and uses classical logic throughout.
Finsupp.single a b is injective in b. For the statement that it is injective in a, see
Finsupp.single_left_injective
Finsupp.single a b is injective in a. For the statement that it is injective in b, see
Finsupp.single_injective
Replace the value of a α →₀ M at a given point a : α by a given value b : M.
If b = 0, this amounts to removing a from the Finsupp.support.
Otherwise, if a was not in the Finsupp.support, it is added to it.
This is the finitely-supported version of Function.update.
Equations
- f.update a b = { support := if b = 0 then f.support.erase a else insert a f.support, toFun := Function.update (⇑f) a b, mem_support_toFun := ⋯ }
Instances For
erase a f is the finitely supported function equal to f except at a where it is equal to 0.
If a is not in the support of f then erase a f = f.
Equations
- Finsupp.erase a f = { support := f.support.erase a, toFun := fun (a' : α) => if a' = a then 0 else f a', mem_support_toFun := ⋯ }
Instances For
Declarations about mapRange #
Declarations about embDomain #
Declarations about zipWith #
Additive monoid structure on α →₀ M #
Finsupp.single as an AddMonoidHom.
See Finsupp.lsingle in LinearAlgebra/Finsupp for the stronger version as a linear map.
Equations
- Finsupp.singleAddHom a = { toFun := Finsupp.single a, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Finsupp.erase as an AddMonoidHom.
Equations
- Finsupp.eraseAddHom a = { toFun := Finsupp.erase a, map_zero' := ⋯, map_add' := ⋯ }
Instances For
A finitely supported function can be built by adding up single a b for increasing a.
The theorem induction_on_max₂ swaps the argument order in the sum.
A finitely supported function can be built by adding up single a b for decreasing a.
The theorem induction_on_min₂ swaps the argument order in the sum.
A finitely supported function can be built by adding up single a b for increasing a.
The theorem induction_on_max swaps the argument order in the sum.
A finitely supported function can be built by adding up single a b for decreasing a.
The theorem induction_on_min swaps the argument order in the sum.