Finite functions #
Given types α and β, and assuming that β has a Zero element,
a FinFun α β is a function from α to β where only a finite number of elements
in α are mapped to non-zero elements.
A FinFun is a function fn with a finite support.
This is similar to Finsupp in Mathlib, but definitions are computable.
Equations
- Cslib.FinFun.«term_→₀_» = Lean.ParserDescr.trailingNode `Cslib.FinFun.«term_→₀_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →₀ ") (Lean.ParserDescr.cat `term 25))
Instances For
Constructs a FinFun by restricting a function to a given support, filtering out all elements
not mapped to 0 in the support.
Equations
Instances For
Constructs a FinFun by restricting a function to a given support, filtering out all elements
not mapped to 0 in the support.
Equations
- Cslib.FinFun.«term_↾₀_» = Lean.ParserDescr.trailingNode `Cslib.FinFun.«term_↾₀_» 1022 25 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "↾₀") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Cslib.FinFun.instFunLike = { coe := fun (f : Cslib.FinFun α β) => f.fn, coe_injective' := ⋯ }
Restricting a function twice to the same support is idempotent.
Restricting a FinFun to its own support is the identity.
Restricting a function twice to two supports is equal to restricting to their intersection.
Restricting a function is commutative.