The areas / V03. Sets, finite structures and big operators
Mathlib.Data.DFinsupp.Defs
215 declarations and 2 deprecated aliases. Mathlib docs · Source
Dependent functions with finite support
For a non-dependent version see Mathlib/Data/Finsupp/Defs.lean.
Notation
This file introduces the notation Π₀ a, β a as notation for DFinsupp β, mirroring the α →₀ β
notation used for Finsupp. This works for nested binders too, with Π₀ a b, γ a b as notation
for DFinsupp (fun a ↦ DFinsupp (γ a)).
Implementation notes
The support is internally represented (in the primed DFinsupp.support') as a Multiset that
represents a superset of the true support of the function, quotiented by the always-true relation so
that this does not impact equality. This approach has computational benefits over storing a
Finset; it allows us to add together two finitely-supported functions without
having to evaluate the resulting function to recompute its support (which would require
decidability of b = 0 for b : β i).
The true support of the function can still be recovered with DFinsupp.support; but these
decidability obligations are now postponed to when the support is actually needed. As a consequence,
there are two ways to sum a DFinsupp: with DFinsupp.sum which works over an arbitrary function
but requires recomputation of the support and therefore a Decidable argument; and with
DFinsupp.sumAddHom which requires an additive morphism, using its properties to show that
summing over a superset of the support is sufficient.
Finsupp takes an altogether different approach here; it uses Classical.Decidable and declares
the Add instance as noncomputable. This design difference is independent of the fact that
DFinsupp is dependently-typed and Finsupp is not; in future, we may want to align these two
definitions, or introduce two more definitions for the other combinations of decisions.
Bundled versions of DFinsupp.mapRange
The names should match the equivalent bundled Finsupp.mapRange definitions.
theorem Zero.toOfNat0.hcongr_2 E1 #
∀ (α α' : Type u_1), α = α' → ∀ (inst : Zero α) (inst' : Zero α'), inst ≍ inst' → Zero.toOfNat0 ≍ Zero.toOfNat0
theorem DFinsupp.filter.congr_simp E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (p p_1 : ι → Prop),
p = p_1 →
∀ {inst_1 : DecidablePred p} [inst_2 : DecidablePred p_1] (x x_1 : Π₀ (i : ι), β i),
x = x_1 → DFinsupp.filter p x = DFinsupp.filter p_1 x_1
theorem DFinsupp.mk'.inj E1 #
∀ {ι : Type u} {β : ι → Type v} {inst : (i : ι) → Zero (β i)} {toFun : (i : ι) → β i}
{support' : Trunc { s // ∀ (i : ι), i ∈ s ∨ toFun i = 0 }} {toFun_1 : (i : ι) → β i}
{support'_1 : Trunc { s // ∀ (i : ι), i ∈ s ∨ toFun_1 i = 0 }},
{ toFun := toFun, support' := support' } = { toFun := toFun_1, support' := support'_1 } →
toFun = toFun_1 ∧ support' ≍ support'_1
theorem DFinsupp.mk'.injEq E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (toFun : (i : ι) → β i)
(support' : Trunc { s // ∀ (i : ι), i ∈ s ∨ toFun i = 0 }) (toFun_1 : (i : ι) → β i)
(support'_1 : Trunc { s // ∀ (i : ι), i ∈ s ∨ toFun_1 i = 0 }),
({ toFun := toFun, support' := support' } = { toFun := toFun_1, support' := support'_1 }) =
(toFun = toFun_1 ∧ support' ≍ support'_1)
def DFinsupp.ctorIdx E1 #
{ι : Type u} → {β : ι → Type v} → {inst : (i : ι) → Zero (β i)} → DFinsupp β → ℕ
theorem DFinsupp.mapRange.congr_simp E1 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β₁ i)] [inst_1 : (i : ι) → Zero (β₂ i)]
(f f_1 : (i : ι) → β₁ i → β₂ i) (e_f : f = f_1) (hf : ∀ (i : ι), f i 0 = 0) (x x_1 : Π₀ (i : ι), β₁ i),
x = x_1 → DFinsupp.mapRange f hf x = DFinsupp.mapRange f_1 ⋯ x_1
theorem OfNat.ofNat.hcongr_3 E1 #
∀ (α α' : Type u),
α = α' →
∀ (x x' : ℕ), x = x' → ∀ (self : OfNat α x) (self' : OfNat α' x'), self ≍ self' → OfNat.ofNat x ≍ OfNat.ofNat x'
theorem DFinsupp.comapDomain'.congr_simp E1 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : κ → ι) {h' h'_1 : ι → κ}
(e_h' : h' = h'_1) (hh' : Function.LeftInverse h' h) (f f_1 : Π₀ (i : ι), β i),
f = f_1 → DFinsupp.comapDomain' h hh' f = DFinsupp.comapDomain' h ⋯ f_1
theorem DFinsupp.support.congr_simp E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
{inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)} [inst_3 : (i : ι) → (x : β i) → Decidable (x ≠ 0)]
(f f_1 : Π₀ (i : ι), β i), f = f_1 → f.support = f_1.support
theorem DFinsupp.zipWith.congr_simp E1 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β i)]
[inst_1 : (i : ι) → Zero (β₁ i)] [inst_2 : (i : ι) → Zero (β₂ i)] (f f_1 : (i : ι) → β₁ i → β₂ i → β i)
(e_f : f = f_1) (hf : ∀ (i : ι), f i 0 0 = 0) (x x_1 : Π₀ (i : ι), β₁ i),
x = x_1 → ∀ (y y_1 : Π₀ (i : ι), β₂ i), y = y_1 → DFinsupp.zipWith f hf x y = DFinsupp.zipWith f_1 ⋯ x_1 y_1
structure DFinsupp E3 #
{ι : Type u} → (β : ι → Type v) → [(i : ι) → Zero (β i)] → Type (max u v)
A dependent function Π i, β i with finite support, with notation Π₀ i, β i.
Note that DFinsupp.support is the preferred API for accessing the support of the function,
DFinsupp.support' is an implementation detail that aids computability; see the implementation
notes in this file for more information.
ctor DFinsupp.mk' E0 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → (toFun : (i : ι) → β i) → Trunc { s // ∀ (i : ι), i ∈ s ∨ toFun i = 0 } → DFinsupp β
abbrev DFinsupp.toFun E1 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → DFinsupp β → (i : ι) → β i
The underlying function of a dependent function with finite support (aka DFinsupp).
abbrev DFinsupp.support' E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → (self : DFinsupp β) → Trunc { s // ∀ (i : ι), i ∈ s ∨ self.toFun i = 0 }
The support of a dependent function with finite support (aka DFinsupp).
def «termΠ₀_,_» E1 #
Lean.ParserDescr
Π₀ i, β i denotes the type of dependent functions with finite support DFinsupp β.
instance DFinsupp.instDFunLike E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → DFunLike (Π₀ (i : ι), β i) ι β
theorem DFinsupp.toFun_eq_coe E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (f : Π₀ (i : ι), β i), f.toFun = ⇑f
theorem DFinsupp.ext E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {f g : Π₀ (i : ι), β i}, (∀ (i : ι), f i = g i) → f = g
theorem DFinsupp.ext_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {f g : Π₀ (i : ι), β i}, f = g ↔ ∀ (i : ι), f i = g i
theorem DFinsupp.ne_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {f g : Π₀ (i : ι), β i}, f ≠ g ↔ ∃ i, f i ≠ g i
instance DFinsupp.instZero E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → Zero (Π₀ (i : ι), β i)
instance DFinsupp.instInhabited E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → Inhabited (Π₀ (i : ι), β i)
theorem DFinsupp.coe_mk' E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (f : (i : ι) → β i)
(s : Trunc { s // ∀ (i : ι), i ∈ s ∨ f i = 0 }), ⇑{ toFun := f, support' := s } = f
theorem DFinsupp.coe_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)], ⇑0 = 0
theorem DFinsupp.zero_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (i : ι), 0 i = 0
def DFinsupp.mapRange E1 #
{ι : Type u} →
{β₁ : ι → Type v₁} →
{β₂ : ι → Type v₂} →
[inst : (i : ι) → Zero (β₁ i)] →
[inst_1 : (i : ι) → Zero (β₂ i)] →
(f : (i : ι) → β₁ i → β₂ i) → (∀ (i : ι), f i 0 = 0) → (Π₀ (i : ι), β₁ i) → Π₀ (i : ι), β₂ i
The composition of f : β₁ → β₂ and g : Π₀ i, β₁ i is
mapRange f hf g : Π₀ i, β₂ i, well defined when f 0 = 0.
This preserves the structure on f, and exists in various bundled forms for when f is itself
bundled:
DFinsupp.mapRange.addMonoidHomDFinsupp.mapRange.addEquivdfinsupp.mapRange.linearMapdfinsupp.mapRange.linearEquiv
theorem DFinsupp.mapRange_apply E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β₁ i)] [inst_1 : (i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i) (hf : ∀ (i : ι), f i 0 = 0) (g : Π₀ (i : ι), β₁ i) (i : ι),
(DFinsupp.mapRange f hf g) i = f i (g i)
theorem DFinsupp.mapRange_id E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} [inst : (i : ι) → Zero (β₁ i)] (h : optParam (∀ (i : ι), id 0 = 0) ⋯)
(g : Π₀ (i : ι), β₁ i), DFinsupp.mapRange (fun i ↦ id) h g = g
theorem DFinsupp.mapRange_comp E1 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β i)]
[inst_1 : (i : ι) → Zero (β₁ i)] [inst_2 : (i : ι) → Zero (β₂ i)] (f : (i : ι) → β₁ i → β₂ i)
(f₂ : (i : ι) → β i → β₁ i) (hf : ∀ (i : ι), f i 0 = 0) (hf₂ : ∀ (i : ι), f₂ i 0 = 0)
(h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0) (g : Π₀ (i : ι), β i),
DFinsupp.mapRange (fun i ↦ f i ∘ f₂ i) h g = DFinsupp.mapRange f hf (DFinsupp.mapRange f₂ hf₂ g)
theorem DFinsupp.mapRange_zero E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β₁ i)] [inst_1 : (i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i) (hf : ∀ (i : ι), f i 0 = 0), DFinsupp.mapRange f hf 0 = 0
def DFinsupp.zipWith E1 #
{ι : Type u} →
{β : ι → Type v} →
{β₁ : ι → Type v₁} →
{β₂ : ι → Type v₂} →
[inst : (i : ι) → Zero (β i)] →
[inst_1 : (i : ι) → Zero (β₁ i)] →
[inst_2 : (i : ι) → Zero (β₂ i)] →
(f : (i : ι) → β₁ i → β₂ i → β i) →
(∀ (i : ι), f i 0 0 = 0) → (Π₀ (i : ι), β₁ i) → (Π₀ (i : ι), β₂ i) → Π₀ (i : ι), β i
Let f i be a binary operation β₁ i → β₂ i → β i such that f i 0 0 = 0.
Then zipWith f hf is a binary operation Π₀ i, β₁ i → Π₀ i, β₂ i → Π₀ i, β i.
theorem DFinsupp.zipWith_apply E0 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β i)]
[inst_1 : (i : ι) → Zero (β₁ i)] [inst_2 : (i : ι) → Zero (β₂ i)] (f : (i : ι) → β₁ i → β₂ i → β i)
(hf : ∀ (i : ι), f i 0 0 = 0) (g₁ : Π₀ (i : ι), β₁ i) (g₂ : Π₀ (i : ι), β₂ i) (i : ι),
(DFinsupp.zipWith f hf g₁ g₂) i = f i (g₁ i) (g₂ i)
def DFinsupp.piecewise E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] →
(Π₀ (i : ι), β i) → (Π₀ (i : ι), β i) → (s : Set ι) → [(i : ι) → Decidable (i ∈ s)] → Π₀ (i : ι), β i
x.piecewise y s is the finitely supported function equal to x on the set s,
and to y on its complement.
theorem DFinsupp.piecewise_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (x y : Π₀ (i : ι), β i) (s : Set ι)
[inst_1 : (i : ι) → Decidable (i ∈ s)] (i : ι), (x.piecewise y s) i = if i ∈ s then x i else y i
theorem DFinsupp.coe_piecewise E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (x y : Π₀ (i : ι), β i) (s : Set ι)
[inst_1 : (i : ι) → Decidable (i ∈ s)], ⇑(x.piecewise y s) = s.piecewise ⇑x ⇑y
instance DFinsupp.instAdd E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddZeroClass (β i)] → Add (Π₀ (i : ι), β i)
theorem DFinsupp.add_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] (g₁ g₂ : Π₀ (i : ι), β i) (i : ι),
(g₁ + g₂) i = g₁ i + g₂ i
theorem DFinsupp.coe_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] (g₁ g₂ : Π₀ (i : ι), β i), ⇑(g₁ + g₂) = ⇑g₁ + ⇑g₂
instance DFinsupp.addZeroClass E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddZeroClass (β i)] → AddZeroClass (Π₀ (i : ι), β i)
instance DFinsupp.instIsLeftCancelAdd E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] [∀ (i : ι), IsLeftCancelAdd (β i)],
IsLeftCancelAdd (Π₀ (i : ι), β i)
instance DFinsupp.instIsRightCancelAdd E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] [∀ (i : ι), IsRightCancelAdd (β i)],
IsRightCancelAdd (Π₀ (i : ι), β i)
instance DFinsupp.instIsCancelAdd E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] [∀ (i : ι), IsCancelAdd (β i)],
IsCancelAdd (Π₀ (i : ι), β i)
instance DFinsupp.hasNatScalar E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddMonoid (β i)] → SMul ℕ (Π₀ (i : ι), β i)
Note the general SMul instance doesn't apply as ℕ is not distributive
unless β i's addition is commutative.
theorem DFinsupp.nsmul_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddMonoid (β i)] (b : ℕ) (v : Π₀ (i : ι), β i) (i : ι),
(b • v) i = b • v i
theorem DFinsupp.coe_nsmul E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddMonoid (β i)] (b : ℕ) (v : Π₀ (i : ι), β i), ⇑(b • v) = b • ⇑v
instance DFinsupp.instAddMonoid E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddMonoid (β i)] → AddMonoid (Π₀ (i : ι), β i)
def DFinsupp.coeFnAddMonoidHom E1 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddZeroClass (β i)] → (Π₀ (i : ι), β i) →+ (i : ι) → β i
Coercion from a DFinsupp to a pi type is an AddMonoidHom.
theorem DFinsupp.coeFnAddMonoidHom_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] (v : Π₀ (i : ι), β i),
DFinsupp.coeFnAddMonoidHom v = ⇑v
instance DFinsupp.addCommMonoid E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddCommMonoid (β i)] → AddCommMonoid (Π₀ (i : ι), β i)
instance DFinsupp.instNeg E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddGroup (β i)] → Neg (Π₀ (i : ι), β i)
theorem DFinsupp.neg_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (g : Π₀ (i : ι), β i) (i : ι), (-g) i = -g i
theorem DFinsupp.coe_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (g : Π₀ (i : ι), β i), ⇑(-g) = -⇑g
instance DFinsupp.instSub E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddGroup (β i)] → Sub (Π₀ (i : ι), β i)
theorem DFinsupp.sub_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (g₁ g₂ : Π₀ (i : ι), β i) (i : ι),
(g₁ - g₂) i = g₁ i - g₂ i
theorem DFinsupp.coe_sub E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (g₁ g₂ : Π₀ (i : ι), β i), ⇑(g₁ - g₂) = ⇑g₁ - ⇑g₂
instance DFinsupp.hasIntScalar E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddGroup (β i)] → SMul ℤ (Π₀ (i : ι), β i)
Note the general SMul instance doesn't apply as ℤ is not distributive
unless β i's addition is commutative.
theorem DFinsupp.zsmul_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (b : ℤ) (v : Π₀ (i : ι), β i) (i : ι),
(b • v) i = b • v i
theorem DFinsupp.coe_zsmul E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (b : ℤ) (v : Π₀ (i : ι), β i), ⇑(b • v) = b • ⇑v
instance DFinsupp.instAddGroup E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddGroup (β i)] → AddGroup (Π₀ (i : ι), β i)
instance DFinsupp.addCommGroup E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddCommGroup (β i)] → AddCommGroup (Π₀ (i : ι), β i)
def DFinsupp.filter E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → (p : ι → Prop) → [DecidablePred p] → (Π₀ (i : ι), β i) → Π₀ (i : ι), β i
Filter p f is the function which is f i if p i is true and 0 otherwise.
theorem DFinsupp.filter_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (p : ι → Prop) [inst_1 : DecidablePred p] (i : ι)
(f : Π₀ (i : ι), β i), (DFinsupp.filter p f) i = if p i then f i else 0
theorem DFinsupp.filter_apply_pos E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {p : ι → Prop} [inst_1 : DecidablePred p]
(f : Π₀ (i : ι), β i) {i : ι}, p i → (DFinsupp.filter p f) i = f i
theorem DFinsupp.filter_apply_neg E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {p : ι → Prop} [inst_1 : DecidablePred p]
(f : Π₀ (i : ι), β i) {i : ι}, ¬p i → (DFinsupp.filter p f) i = 0
theorem DFinsupp.filter_add_filter_not E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] (f : Π₀ (i : ι), β i) (p : ι → Prop)
[inst_1 : DecidablePred p], DFinsupp.filter p f + DFinsupp.filter (fun i ↦ ¬p i) f = f
theorem DFinsupp.filter_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (p : ι → Prop) [inst_1 : DecidablePred p],
DFinsupp.filter p 0 = 0
theorem DFinsupp.filter_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] (p : ι → Prop) [inst_1 : DecidablePred p]
(f g : Π₀ (i : ι), β i), DFinsupp.filter p (f + g) = DFinsupp.filter p f + DFinsupp.filter p g
def DFinsupp.filterAddMonoidHom E1 #
{ι : Type u} →
(β : ι → Type v) →
[inst : (i : ι) → AddZeroClass (β i)] → (p : ι → Prop) → [DecidablePred p] → (Π₀ (i : ι), β i) →+ Π₀ (i : ι), β i
DFinsupp.filter as an AddMonoidHom.
theorem DFinsupp.filterAddMonoidHom_apply E0 #
∀ {ι : Type u} (β : ι → Type v) [inst : (i : ι) → AddZeroClass (β i)] (p : ι → Prop) [inst_1 : DecidablePred p]
(x : Π₀ (i : ι), β i), (DFinsupp.filterAddMonoidHom β p) x = DFinsupp.filter p x
theorem DFinsupp.filter_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (p : ι → Prop) [inst_1 : DecidablePred p]
(f : Π₀ (i : ι), β i), DFinsupp.filter p (-f) = -DFinsupp.filter p f
theorem DFinsupp.filter_sub E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] (p : ι → Prop) [inst_1 : DecidablePred p]
(f g : Π₀ (i : ι), β i), DFinsupp.filter p (f - g) = DFinsupp.filter p f - DFinsupp.filter p g
def DFinsupp.subtypeDomain E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → (p : ι → Prop) → [DecidablePred p] → (Π₀ (i : ι), β i) → Π₀ (i : Subtype p), β ↑i
subtypeDomain p f is the restriction of the finitely supported function
f to the subtype p.
theorem DFinsupp.subtypeDomain_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {p : ι → Prop} [inst_1 : DecidablePred p],
DFinsupp.subtypeDomain p 0 = 0
theorem DFinsupp.subtypeDomain_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] {p : ι → Prop} [inst_1 : DecidablePred p] {i : Subtype p}
{v : Π₀ (i : ι), β i}, (DFinsupp.subtypeDomain p v) i = v ↑i
theorem DFinsupp.subtypeDomain_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddZeroClass (β i)] {p : ι → Prop} [inst_1 : DecidablePred p]
(v v' : Π₀ (i : ι), β i), DFinsupp.subtypeDomain p (v + v') = DFinsupp.subtypeDomain p v + DFinsupp.subtypeDomain p v'
def DFinsupp.subtypeDomainAddMonoidHom E1 #
{ι : Type u} →
(β : ι → Type v) →
[inst : (i : ι) → AddZeroClass (β i)] →
(p : ι → Prop) → [DecidablePred p] → (Π₀ (i : ι), β i) →+ Π₀ (i : Subtype p), β ↑i
subtypeDomain but as an AddMonoidHom.
theorem DFinsupp.subtypeDomainAddMonoidHom_apply E0 #
∀ {ι : Type u} (β : ι → Type v) [inst : (i : ι) → AddZeroClass (β i)] (p : ι → Prop) [inst_1 : DecidablePred p]
(x : Π₀ (i : ι), β i), (DFinsupp.subtypeDomainAddMonoidHom β p) x = DFinsupp.subtypeDomain p x
theorem DFinsupp.subtypeDomain_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] {p : ι → Prop} [inst_1 : DecidablePred p]
{v : Π₀ (i : ι), β i}, DFinsupp.subtypeDomain p (-v) = -DFinsupp.subtypeDomain p v
theorem DFinsupp.subtypeDomain_sub E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → AddGroup (β i)] {p : ι → Prop} [inst_1 : DecidablePred p]
{v v' : Π₀ (i : ι), β i}, DFinsupp.subtypeDomain p (v - v') = DFinsupp.subtypeDomain p v - DFinsupp.subtypeDomain p v'
theorem DFinsupp.finite_support E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] (f : Π₀ (i : ι), β i), {i | f i ≠ 0}.Finite
def DFinsupp.mk E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → [DecidableEq ι] → (s : Finset ι) → ((i : ↑↑s) → β ↑i) → Π₀ (i : ι), β i
Create an element of Π₀ i, β i from a finset s and a function x
defined on this Finset.
theorem DFinsupp.mk_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {s : Finset ι}
{x : (i : ↑↑s) → β ↑i} {i : ι}, (DFinsupp.mk s x) i = if H : i ∈ s then x ⟨i, H⟩ else 0
theorem DFinsupp.mk_of_mem E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {s : Finset ι}
{x : (i : ↑↑s) → β ↑i} {i : ι} (hi : i ∈ s), (DFinsupp.mk s x) i = x ⟨i, hi⟩
theorem DFinsupp.mk_of_notMem E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {s : Finset ι}
{x : (i : ↑↑s) → β ↑i} {i : ι}, i ∉ s → (DFinsupp.mk s x) i = 0
theorem DFinsupp.mk_injective E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (s : Finset ι),
Function.Injective (DFinsupp.mk s)
instance DFinsupp.unique E0 #
{ι : Type u} →
{β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → [∀ (i : ι), Subsingleton (β i)] → Unique (Π₀ (i : ι), β i)
instance DFinsupp.uniqueOfIsEmpty E0 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → [IsEmpty ι] → Unique (Π₀ (i : ι), β i)
def DFinsupp.equivFunOnFintype E1 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → [Fintype ι] → (Π₀ (i : ι), β i) ≃ ((i : ι) → β i)
Given Fintype ι, equivFunOnFintype is the Equiv between Π₀ i, β i and Π i, β i.
(All dependent functions on a finite type are finitely supported.)
theorem DFinsupp.equivFunOnFintype_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : Fintype ι] (a : Π₀ (i : ι), β i) (a_1 : ι),
DFinsupp.equivFunOnFintype a a_1 = a a_1
theorem DFinsupp.equivFunOnFintype_symm_coe E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : Fintype ι] (f : Π₀ (i : ι), β i),
DFinsupp.equivFunOnFintype.symm ⇑f = f
def DFinsupp.single E1 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → [DecidableEq ι] → (i : ι) → β i → Π₀ (i : ι), β i
The function single i b : Π₀ i, β i sends i to b
and all other points to 0.
theorem DFinsupp.single_eq_pi_single E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι} {b : β i},
(⇑fun₀ | i => b) = Pi.single i b
theorem DFinsupp.single_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i i' : ι} {b : β i},
(fun₀ | i => b) i' = if h : i = i' then Eq.recOn h b else 0
theorem DFinsupp.single_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (i : ι), (fun₀ | i => 0) = 0
theorem DFinsupp.single_eq_same E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι} {b : β i},
(fun₀ | i => b) i = b
theorem DFinsupp.single_eq_of_ne E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i i' : ι} {b : β i},
i' ≠ i → (fun₀ | i => b) i' = 0
theorem DFinsupp.single_injective E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι},
Function.Injective (DFinsupp.single i)
theorem DFinsupp.single_eq_single_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (i j : ι) (xi : β i) (xj : β j),
((fun₀ | i => xi) = fun₀ | j => xj) ↔ i = j ∧ xi ≍ xj ∨ xi = 0 ∧ xj = 0
Like Finsupp.single_eq_single_iff, but with a HEq due to dependent types
theorem DFinsupp.single_left_injective E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {b : (i : ι) → β i},
(∀ (i : ι), b i ≠ 0) → Function.Injective fun i ↦ fun₀ | i => b i
DFinsupp.single a b is injective in a. For the statement that it is injective in b, see
DFinsupp.single_injective
theorem DFinsupp.single_eq_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι} {xi : β i},
(fun₀ | i => xi) = 0 ↔ xi = 0
theorem DFinsupp.single_ne_zero E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι} {xi : β i},
(fun₀ | i => xi) ≠ 0 ↔ xi ≠ 0
theorem DFinsupp.filter_single E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (p : ι → Prop)
[inst_2 : DecidablePred p] (i : ι) (x : β i), (DFinsupp.filter p fun₀ | i => x) = if p i then fun₀ | i => x else 0
theorem DFinsupp.filter_single_pos E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {p : ι → Prop}
[inst_2 : DecidablePred p] (i : ι) (x : β i), p i → (DFinsupp.filter p fun₀ | i => x) = fun₀ | i => x
theorem DFinsupp.filter_single_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {p : ι → Prop}
[inst_2 : DecidablePred p] (i : ι) (x : β i), ¬p i → (DFinsupp.filter p fun₀ | i => x) = 0
theorem DFinsupp.single_eq_of_sigma_eq E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i j : ι} {xi : β i} {xj : β j},
⟨i, xi⟩ = ⟨j, xj⟩ → (fun₀ | i => xi) = fun₀ | j => xj
Equality of sigma types is sufficient (but not necessary) to show equality of DFinsupps.
theorem DFinsupp.equivFunOnFintype_single E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] (i : ι)
(m : β i), (DFinsupp.equivFunOnFintype fun₀ | i => m) = Pi.single i m
theorem DFinsupp.equivFunOnFintype_symm_single E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] [inst_2 : Fintype ι] (i : ι)
(m : β i), DFinsupp.equivFunOnFintype.symm (Pi.single i m) = fun₀ | i => m
theorem DFinsupp.filter_eq E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
DFinsupp.filter (fun x ↦ i = x) f = fun₀ | i => f i
theorem DFinsupp.filter_eq' E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
DFinsupp.filter (fun x ↦ x = i) f = fun₀ | i => f i
theorem DFinsupp.zipWith_single_single E0 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β i)]
[inst_1 : DecidableEq ι] [inst_2 : (i : ι) → Zero (β₁ i)] [inst_3 : (i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i → β i) (hf : ∀ (i : ι), f i 0 0 = 0) {i : ι} (b₁ : β₁ i) (b₂ : β₂ i),
(DFinsupp.zipWith f hf (fun₀ | i => b₁) fun₀ | i => b₂) = fun₀ | i => f i b₁ b₂
def DFinsupp.erase E1 #
{ι : Type u} →
{β : ι → Type v} → [inst : (i : ι) → Zero (β i)] → [DecidableEq ι] → ι → (Π₀ (i : ι), β i) → Π₀ (i : ι), β i
Redefine f i to be 0.
theorem DFinsupp.erase_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i j : ι} {f : Π₀ (i : ι), β i},
(DFinsupp.erase i f) j = if j = i then 0 else f j
theorem DFinsupp.erase_same E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i : ι} {f : Π₀ (i : ι), β i},
(DFinsupp.erase i f) i = 0
theorem DFinsupp.erase_ne E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i i' : ι} {f : Π₀ (i : ι), β i},
i' ≠ i → (DFinsupp.erase i f) i' = f i'
theorem DFinsupp.piecewise_single_erase E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (x : Π₀ (i : ι), β i) (i : ι),
(fun₀ | i => x i).piecewise (DFinsupp.erase i x) {i} = x
theorem DFinsupp.erase_eq_sub_single E1 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type u_1} [inst_1 : (i : ι) → AddGroup (β i)] (f : Π₀ (i : ι), β i)
(i : ι), DFinsupp.erase i f = f - fun₀ | i => f i
theorem DFinsupp.erase_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (i : ι), DFinsupp.erase i 0 = 0
theorem DFinsupp.filter_ne_eq_erase E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
DFinsupp.filter (fun x ↦ x ≠ i) f = DFinsupp.erase i f
theorem DFinsupp.filter_ne_eq_erase' E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
DFinsupp.filter (fun x ↦ i ≠ x) f = DFinsupp.erase i f
theorem DFinsupp.erase_single E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (j i : ι) (x : β i),
(DFinsupp.erase j fun₀ | i => x) = if i = j then 0 else fun₀ | i => x
theorem DFinsupp.erase_single_same E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (i : ι) (x : β i),
(DFinsupp.erase i fun₀ | i => x) = 0
theorem DFinsupp.erase_single_ne E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] {i j : ι} (x : β i),
i ≠ j → (DFinsupp.erase j fun₀ | i => x) = fun₀ | i => x
def DFinsupp.update E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] → [DecidableEq ι] → (Π₀ (i : ι), β i) → (i : ι) → β i → Π₀ (i : ι), β i
Replace the value of a Π₀ i, β i at a given point i : ι by a given value b : β i.
If b = 0, this amounts to removing i from the support.
Otherwise, i is added to it.
This is the (dependent) finitely-supported version of Function.update.
theorem DFinsupp.coe_update E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι)
(b : β i), ⇑(f.update i b) = Function.update (⇑f) i b
theorem DFinsupp.update_self E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
f.update i (f i) = f
theorem DFinsupp.update_eq_erase E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : (i : ι) → Zero (β i)] [inst_1 : DecidableEq ι] (f : Π₀ (i : ι), β i) (i : ι),
f.update i 0 = DFinsupp.erase i f
theorem DFinsupp.update_eq_single_add_erase E1 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type u_1} [inst_1 : (i : ι) → AddZeroClass (β i)] (f : Π₀ (i : ι), β i)
(i : ι) (b : β i), f.update i b = (fun₀ | i => b) + DFinsupp.erase i f
theorem DFinsupp.update_eq_erase_add_single E1 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type u_1} [inst_1 : (i : ι) → AddZeroClass (β i)] (f : Π₀ (i : ι), β i)
(i : ι) (b : β i), f.update i b = DFinsupp.erase i f + fun₀ | i => b
theorem DFinsupp.update_eq_sub_add_single E1 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type u_1} [inst_1 : (i : ι) → AddGroup (β i)] (f : Π₀ (i : ι), β i)
(i : ι) (b : β i), f.update i b = (f - fun₀ | i => f i) + fun₀ | i => b
theorem DFinsupp.single_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι) (b₁ b₂ : β i),
(fun₀ | i => b₁ + b₂) = (fun₀ | i => b₁) + fun₀ | i => b₂
theorem DFinsupp.erase_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι)
(f₁ f₂ : Π₀ (i : ι), β i), DFinsupp.erase i (f₁ + f₂) = DFinsupp.erase i f₁ + DFinsupp.erase i f₂
def DFinsupp.singleAddHom E1 #
{ι : Type u} →
(β : ι → Type v) → [DecidableEq ι] → [inst : (i : ι) → AddZeroClass (β i)] → (i : ι) → β i →+ Π₀ (i : ι), β i
DFinsupp.single as an AddMonoidHom.
theorem DFinsupp.singleAddHom_apply E0 #
∀ {ι : Type u} (β : ι → Type v) [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι) (b : β i),
(DFinsupp.singleAddHom β i) b = fun₀ | i => b
def DFinsupp.eraseAddHom E1 #
{ι : Type u} →
(β : ι → Type v) → [DecidableEq ι] → [inst : (i : ι) → AddZeroClass (β i)] → ι → (Π₀ (i : ι), β i) →+ Π₀ (i : ι), β i
DFinsupp.erase as an AddMonoidHom.
theorem DFinsupp.eraseAddHom_apply E0 #
∀ {ι : Type u} (β : ι → Type v) [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι)
(x : Π₀ (i : ι), β i), (DFinsupp.eraseAddHom β i) x = DFinsupp.erase i x
theorem DFinsupp.single_neg E0 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type v} [inst_1 : (i : ι) → AddGroup (β i)] (i : ι) (x : β i),
(fun₀ | i => -x) = -fun₀ | i => x
theorem DFinsupp.single_sub E0 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type v} [inst_1 : (i : ι) → AddGroup (β i)] (i : ι) (x y : β i),
(fun₀ | i => x - y) = (fun₀ | i => x) - fun₀ | i => y
theorem DFinsupp.erase_neg E0 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type v} [inst_1 : (i : ι) → AddGroup (β i)] (i : ι)
(f : Π₀ (i : ι), β i), DFinsupp.erase i (-f) = -DFinsupp.erase i f
theorem DFinsupp.erase_sub E0 #
∀ {ι : Type u} [inst : DecidableEq ι] {β : ι → Type v} [inst_1 : (i : ι) → AddGroup (β i)] (i : ι)
(f g : Π₀ (i : ι), β i), DFinsupp.erase i (f - g) = DFinsupp.erase i f - DFinsupp.erase i g
theorem DFinsupp.single_add_erase E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι)
(f : Π₀ (i : ι), β i), (fun₀ | i => f i) + DFinsupp.erase i f = f
theorem DFinsupp.erase_add_single E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] (i : ι)
(f : Π₀ (i : ι), β i), (DFinsupp.erase i f + fun₀ | i => f i) = f
theorem DFinsupp.induction E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
{p : (Π₀ (i : ι), β i) → Prop} (f : Π₀ (i : ι), β i),
p 0 → (∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → p f → p ((fun₀ | i => b) + f)) → p f
theorem DFinsupp.induction₂ E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
{p : (Π₀ (i : ι), β i) → Prop} (f : Π₀ (i : ι), β i),
p 0 → (∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → p f → p (f + fun₀ | i => b)) → p f
theorem DFinsupp.mk_add E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)] {s : Finset ι}
{x y : (i : ↑↑s) → β ↑i}, DFinsupp.mk s (x + y) = DFinsupp.mk s x + DFinsupp.mk s y
theorem DFinsupp.mk_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)] {s : Finset ι},
DFinsupp.mk s 0 = 0
theorem DFinsupp.mk_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)] {s : Finset ι}
{x : (i : ↑↑s) → β ↑i}, DFinsupp.mk s (-x) = -DFinsupp.mk s x
theorem DFinsupp.mk_sub E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)] {s : Finset ι}
{x y : (i : ↑↑s) → β ↑i}, DFinsupp.mk s (x - y) = DFinsupp.mk s x - DFinsupp.mk s y
def DFinsupp.mkAddGroupHom E1 #
{ι : Type u} →
{β : ι → Type v} →
[DecidableEq ι] → [inst : (i : ι) → AddGroup (β i)] → (s : Finset ι) → ((i : ↑↑s) → β ↑i) →+ Π₀ (i : ι), β i
If s is a subset of ι then mk_addGroupHom s is the canonical additive
group homomorphism from $\prod_{i\in s}\beta_i$ to $\prod_{\mathtt{i : \iota}}\beta_i$.
def DFinsupp.support E1 #
{ι : Type u} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → Zero (β i)] → [(i : ι) → (x : β i) → Decidable (x ≠ 0)] → (Π₀ (i : ι), β i) → Finset ι
Set {i | f x ≠ 0} as a Finset.
theorem DFinsupp.support_mk_subset E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {s : Finset ι} {x : (i : ↑↑s) → β ↑i},
(DFinsupp.mk s x).support ⊆ s
theorem DFinsupp.support_mk'_subset E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : (i : ι) → β i} {s : Multiset ι}
{h : ∀ (i : ι), i ∈ s ∨ f i = 0}, { toFun := f, support' := Trunc.mk ⟨s, h⟩ }.support ⊆ s.toFinset
theorem DFinsupp.mem_support_toFun E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (f : Π₀ (i : ι), β i) (i : ι), i ∈ f.support ↔ f i ≠ 0
def DFinsupp.subtypeSupportEqEquiv E1 #
{ι : Type u} →
{β : ι → Type v} →
[inst : DecidableEq ι] →
[inst_1 : (i : ι) → Zero (β i)] →
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] →
(s : Finset ι) → { f // f.support = s } ≃ ((i : ↥s) → { x // x ≠ 0 })
Equivalence between dependent functions with finite support s : Finset ι and functions
∀ i, {x : β i // x ≠ 0}.
theorem DFinsupp.subtypeSupportEqEquiv_apply_coe E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (s : Finset ι) (x : { f // f.support = s }) (i : ↥s),
↑((DFinsupp.subtypeSupportEqEquiv s) x i) = ↑x ↑i
theorem DFinsupp.subtypeSupportEqEquiv_symm_apply_coe E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (s : Finset ι) (f : (i : ↥s) → { x // x ≠ 0 }),
↑((DFinsupp.subtypeSupportEqEquiv s).symm f) = DFinsupp.mk s fun i ↦ ↑(f i)
def DFinsupp.sigmaFinsetFunEquiv E1 #
{ι : Type u} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → Zero (β i)] →
[(i : ι) → (x : β i) → Decidable (x ≠ 0)] → (Π₀ (i : ι), β i) ≃ (s : Finset ι) × ((i : ↥s) → { x // x ≠ 0 })
Equivalence between all dependent finitely supported functions f : Π₀ i, β i and type
of pairs ⟨s : Finset ι, f : ∀ i : s, {x : β i // x ≠ 0}⟩.
theorem DFinsupp.sigmaFinsetFunEquiv_apply_fst E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (a : Π₀ (i : ι), β i),
(DFinsupp.sigmaFinsetFunEquiv a).fst = a.support
theorem DFinsupp.sigmaFinsetFunEquiv_apply_snd_coe E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (a : Π₀ (i : ι), β i)
(i : ↥((Equiv.sigmaFiberEquiv DFinsupp.support).symm a).fst), ↑((DFinsupp.sigmaFinsetFunEquiv a).snd i) = a ↑i
theorem DFinsupp.support_zero E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)], DFinsupp.support 0 = ∅
theorem DFinsupp.mem_support_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i : ι), β i} {i : ι}, i ∈ f.support ↔ f i ≠ 0
theorem DFinsupp.notMem_support_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i : ι), β i} {i : ι}, i ∉ f.support ↔ f i = 0
theorem DFinsupp.support_eq_empty E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i : ι), β i}, f.support = ∅ ↔ f = 0
instance DFinsupp.decidableZero E0 #
{ι : Type u} →
{β : ι → Type v} →
[inst : (i : ι) → Zero (β i)] →
[(i : ι) → (x : β i) → Decidable (x = 0)] → (f : Π₀ (i : ι), β i) → Decidable (f = 0)
theorem DFinsupp.support_subset_iff E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {s : Set ι} {f : Π₀ (i : ι), β i},
↑f.support ⊆ s ↔ ∀ i ∉ s, f i = 0
theorem DFinsupp.support_single E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {i : ι} {b : β i}, b ≠ 0 → (fun₀ | i => b).support = {i}
theorem DFinsupp.support_single_subset E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {i : ι} {b : β i}, (fun₀ | i => b).support ⊆ {i}
theorem DFinsupp.mapRange_def E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β₁ i)]
[inst_2 : (i : ι) → Zero (β₂ i)] [inst_3 : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)] {f : (i : ι) → β₁ i → β₂ i}
{hf : ∀ (i : ι), f i 0 = 0} {g : Π₀ (i : ι), β₁ i},
DFinsupp.mapRange f hf g = DFinsupp.mk g.support fun i ↦ f (↑i) (g ↑i)
theorem DFinsupp.mapRange_single E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β₁ i)]
[inst_2 : (i : ι) → Zero (β₂ i)] {f : (i : ι) → β₁ i → β₂ i} {hf : ∀ (i : ι), f i 0 = 0} {i : ι} {b : β₁ i},
(DFinsupp.mapRange f hf fun₀ | i => b) = fun₀ | i => f i b
theorem DFinsupp.mapRange_injective E1 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β₁ i)] [inst_1 : (i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i) (hf : ∀ (i : ι), f i 0 = 0),
Function.Injective (DFinsupp.mapRange f hf) ↔ ∀ (i : ι), Function.Injective (f i)
theorem DFinsupp.mapRange_surjective E1 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → Zero (β₁ i)] [inst_1 : (i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i) (hf : ∀ (i : ι), f i 0 = 0),
Function.Surjective (DFinsupp.mapRange f hf) ↔ ∀ (i : ι), Function.Surjective (f i)
theorem DFinsupp.support_mapRange E1 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β₁ i)]
[inst_2 : (i : ι) → Zero (β₂ i)] [inst_3 : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_4 : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)] {f : (i : ι) → β₁ i → β₂ i} {hf : ∀ (i : ι), f i 0 = 0}
{g : Π₀ (i : ι), β₁ i}, (DFinsupp.mapRange f hf g).support ⊆ g.support
theorem DFinsupp.zipWith_def E0 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [dec : DecidableEq ι]
[inst : (i : ι) → Zero (β i)] [inst_1 : (i : ι) → Zero (β₁ i)] [inst_2 : (i : ι) → Zero (β₂ i)]
[inst_3 : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)] [inst_4 : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)]
{f : (i : ι) → β₁ i → β₂ i → β i} {hf : ∀ (i : ι), f i 0 0 = 0} {g₁ : Π₀ (i : ι), β₁ i} {g₂ : Π₀ (i : ι), β₂ i},
DFinsupp.zipWith f hf g₁ g₂ = DFinsupp.mk (g₁.support ∪ g₂.support) fun i ↦ f (↑i) (g₁ ↑i) (g₂ ↑i)
theorem DFinsupp.support_zipWith E1 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : DecidableEq ι]
[inst_1 : (i : ι) → Zero (β i)] [inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : (i : ι) → Zero (β₁ i)]
[inst_4 : (i : ι) → Zero (β₂ i)] [inst_5 : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_6 : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)] {f : (i : ι) → β₁ i → β₂ i → β i} {hf : ∀ (i : ι), f i 0 0 = 0}
{g₁ : Π₀ (i : ι), β₁ i} {g₂ : Π₀ (i : ι), β₂ i}, (DFinsupp.zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support
theorem DFinsupp.erase_def E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (i : ι) (f : Π₀ (i : ι), β i),
DFinsupp.erase i f = DFinsupp.mk (f.support.erase i) fun j ↦ f ↑j
theorem DFinsupp.support_erase E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (i : ι) (f : Π₀ (i : ι), β i),
(DFinsupp.erase i f).support = f.support.erase i
theorem DFinsupp.support_update_ne_zero E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (f : Π₀ (i : ι), β i) (i : ι) {b : β i},
b ≠ 0 → (f.update i b).support = insert i f.support
theorem DFinsupp.support_update E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] (f : Π₀ (i : ι), β i) (i : ι) (b : β i)
[inst_3 : Decidable (b = 0)],
(f.update i b).support = if b = 0 then (DFinsupp.erase i f).support else insert i f.support
theorem DFinsupp.filter_def E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {p : ι → Prop} [inst_3 : DecidablePred p] (f : Π₀ (i : ι), β i),
DFinsupp.filter p f = DFinsupp.mk (Finset.filter p f.support) fun i ↦ f ↑i
theorem DFinsupp.support_filter E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {p : ι → Prop} [inst_3 : DecidablePred p] (f : Π₀ (i : ι), β i),
(DFinsupp.filter p f).support = {x ∈ f.support | p x}
theorem DFinsupp.subtypeDomain_def E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {p : ι → Prop} [inst_3 : DecidablePred p] (f : Π₀ (i : ι), β i),
DFinsupp.subtypeDomain p f = DFinsupp.mk (Finset.subtype p f.support) fun i ↦ f ↑↑i
theorem DFinsupp.support_subtypeDomain E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {p : ι → Prop} [inst_3 : DecidablePred p] {f : Π₀ (i : ι), β i},
(DFinsupp.subtypeDomain p f).support = Finset.subtype p f.support
theorem DFinsupp.support_add E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {g₁ g₂ : Π₀ (i : ι), β i},
(g₁ + g₂).support ⊆ g₁.support ∪ g₂.support
theorem DFinsupp.support_neg E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i : ι), β i}, (-f).support = f.support
instance DFinsupp.instDecidableEq E0 #
{ι : Type u} →
{β : ι → Type v} →
[DecidableEq ι] → [inst : (i : ι) → Zero (β i)] → [(i : ι) → DecidableEq (β i)] → DecidableEq (Π₀ (i : ι), β i)
def DFinsupp.comapDomain E1 #
{ι : Type u} →
{β : ι → Type v} →
{κ : Type u_1} →
[inst : (i : ι) → Zero (β i)] → (h : κ → ι) → Function.Injective h → (Π₀ (i : ι), β i) → Π₀ (k : κ), β (h k)
Reindexing (and possibly removing) terms of a dfinsupp.
theorem DFinsupp.comapDomain_apply E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : κ → ι) (hh : Function.Injective h)
(f : Π₀ (i : ι), β i) (k : κ), (DFinsupp.comapDomain h hh f) k = f (h k)
theorem DFinsupp.comapDomain_zero E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : κ → ι) (hh : Function.Injective h),
DFinsupp.comapDomain h hh 0 = 0
theorem DFinsupp.comapDomain_add E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → AddZeroClass (β i)] (h : κ → ι)
(hh : Function.Injective h) (f g : Π₀ (i : ι), β i),
DFinsupp.comapDomain h hh (f + g) = DFinsupp.comapDomain h hh f + DFinsupp.comapDomain h hh g
theorem DFinsupp.comapDomain_single E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : DecidableEq ι] [inst_1 : DecidableEq κ]
[inst_2 : (i : ι) → Zero (β i)] (h : κ → ι) (hh : Function.Injective h) (k : κ) (x : β (h k)),
(DFinsupp.comapDomain h hh fun₀ | h k => x) = fun₀ | k => x
def DFinsupp.comapDomain' E1 #
{ι : Type u} →
{β : ι → Type v} →
{κ : Type u_1} →
[inst : (i : ι) → Zero (β i)] →
(h : κ → ι) → {h' : ι → κ} → Function.LeftInverse h' h → (Π₀ (i : ι), β i) → Π₀ (k : κ), β (h k)
A computable version of comapDomain when an explicit left inverse is provided.
theorem DFinsupp.comapDomain'_apply E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : κ → ι) {h' : ι → κ}
(hh' : Function.LeftInverse h' h) (f : Π₀ (i : ι), β i) (k : κ), (DFinsupp.comapDomain' h hh' f) k = f (h k)
theorem DFinsupp.comapDomain'_zero E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : κ → ι) {h' : ι → κ}
(hh' : Function.LeftInverse h' h), DFinsupp.comapDomain' h hh' 0 = 0
theorem DFinsupp.comapDomain'_add E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → AddZeroClass (β i)] (h : κ → ι) {h' : ι → κ}
(hh' : Function.LeftInverse h' h) (f g : Π₀ (i : ι), β i),
DFinsupp.comapDomain' h hh' (f + g) = DFinsupp.comapDomain' h hh' f + DFinsupp.comapDomain' h hh' g
theorem DFinsupp.comapDomain'_single E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : DecidableEq ι] [inst_1 : DecidableEq κ]
[inst_2 : (i : ι) → Zero (β i)] (h : κ → ι) {h' : ι → κ} (hh' : Function.LeftInverse h' h) (k : κ) (x : β (h k)),
(DFinsupp.comapDomain' h hh' fun₀ | h k => x) = fun₀ | k => x
def DFinsupp.equivCongrLeft E1 #
{ι : Type u} →
{β : ι → Type v} →
{κ : Type u_1} → [inst : (i : ι) → Zero (β i)] → (h : ι ≃ κ) → (Π₀ (i : ι), β i) ≃ Π₀ (k : κ), β (h.symm k)
Reindexing terms of a dfinsupp.
This is the dfinsupp version of Equiv.piCongrLeft'.
theorem DFinsupp.equivCongrLeft_apply E0 #
∀ {ι : Type u} {β : ι → Type v} {κ : Type u_1} [inst : (i : ι) → Zero (β i)] (h : ι ≃ κ) (f : Π₀ (i : ι), β i),
(DFinsupp.equivCongrLeft h) f = DFinsupp.comapDomain' ⇑h.symm ⋯ f
def DFinsupp.extendWith E1 #
{ι : Type u} →
{α : Option ι → Type v} →
[inst : (i : Option ι) → Zero (α i)] → α none → (Π₀ (i : ι), α (some i)) → Π₀ (i : Option ι), α i
Adds a term to a dfinsupp, making a dfinsupp indexed by an Option.
This is the dfinsupp version of Option.rec.
theorem DFinsupp.extendWith_none E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : (i : Option ι) → Zero (α i)] (f : Π₀ (i : ι), α (some i)) (a : α none),
(DFinsupp.extendWith a f) none = a
theorem DFinsupp.extendWith_some E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : (i : Option ι) → Zero (α i)] (f : Π₀ (i : ι), α (some i)) (a : α none)
(i : ι), (DFinsupp.extendWith a f) (some i) = f i
theorem DFinsupp.extendWith_single_zero E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : Option ι) → Zero (α i)] (i : ι)
(x : α (some i)), (DFinsupp.extendWith 0 fun₀ | i => x) = fun₀ | some i => x
theorem DFinsupp.extendWith_zero E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : Option ι) → Zero (α i)] (x : α none),
DFinsupp.extendWith x 0 = fun₀ | none => x
def DFinsupp.equivProdDFinsupp E1 #
{ι : Type u} →
{α : Option ι → Type v} →
[inst : (i : Option ι) → Zero (α i)] → (Π₀ (i : Option ι), α i) ≃ α none × Π₀ (i : ι), α (some i)
Bijection obtained by separating the term of index none of a dfinsupp over Option ι.
This is the dfinsupp version of Equiv.piOptionEquivProd.
theorem DFinsupp.equivProdDFinsupp_apply E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : (i : Option ι) → Zero (α i)] (f : Π₀ (i : Option ι), α i),
DFinsupp.equivProdDFinsupp f = (f none, DFinsupp.comapDomain some ⋯ f)
theorem DFinsupp.equivProdDFinsupp_symm_apply E0 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : (i : Option ι) → Zero (α i)] (f : α none × Π₀ (i : ι), α (some i)),
DFinsupp.equivProdDFinsupp.symm f = DFinsupp.extendWith f.1 f.2
theorem DFinsupp.equivProdDFinsupp_add E1 #
∀ {ι : Type u} {α : Option ι → Type v} [inst : (i : Option ι) → AddZeroClass (α i)] (f g : Π₀ (i : Option ι), α i),
DFinsupp.equivProdDFinsupp (f + g) = DFinsupp.equivProdDFinsupp f + DFinsupp.equivProdDFinsupp g
theorem DFinsupp.mapRange_add E1 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β₁ i)]
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] (f : (i : ι) → β₁ i → β₂ i) (hf : ∀ (i : ι), f i 0 = 0),
(∀ (i : ι) (x y : β₁ i), f i (x + y) = f i x + f i y) →
∀ (g₁ g₂ : Π₀ (i : ι), β₁ i),
DFinsupp.mapRange f hf (g₁ + g₂) = DFinsupp.mapRange f hf g₁ + DFinsupp.mapRange f hf g₂
def DFinsupp.mapRange.addMonoidHom E1 #
{ι : Type u} →
{β₁ : ι → Type v₁} →
{β₂ : ι → Type v₂} →
[inst : (i : ι) → AddZeroClass (β₁ i)] →
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] → ((i : ι) → β₁ i →+ β₂ i) → (Π₀ (i : ι), β₁ i) →+ Π₀ (i : ι), β₂ i
DFinsupp.mapRange as an AddMonoidHom.
theorem DFinsupp.mapRange.addMonoidHom_apply E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β₁ i)]
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] (f : (i : ι) → β₁ i →+ β₂ i) (x : Π₀ (i : ι), β₁ i),
(DFinsupp.mapRange.addMonoidHom f) x = DFinsupp.mapRange (fun i x ↦ (f i) x) ⋯ x
theorem DFinsupp.mapRange.addMonoidHom_id E0 #
∀ {ι : Type u} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β₂ i)],
(DFinsupp.mapRange.addMonoidHom fun i ↦ AddMonoidHom.id (β₂ i)) = AddMonoidHom.id (Π₀ (i : ι), β₂ i)
theorem DFinsupp.mapRange.addMonoidHom_comp E1 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β i)]
[inst_1 : (i : ι) → AddZeroClass (β₁ i)] [inst_2 : (i : ι) → AddZeroClass (β₂ i)] (f : (i : ι) → β₁ i →+ β₂ i)
(f₂ : (i : ι) → β i →+ β₁ i),
(DFinsupp.mapRange.addMonoidHom fun i ↦ (f i).comp (f₂ i)) =
(DFinsupp.mapRange.addMonoidHom f).comp (DFinsupp.mapRange.addMonoidHom f₂)
def DFinsupp.mapRange.addEquiv E1 #
{ι : Type u} →
{β₁ : ι → Type v₁} →
{β₂ : ι → Type v₂} →
[inst : (i : ι) → AddZeroClass (β₁ i)] →
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] → ((i : ι) → β₁ i ≃+ β₂ i) → (Π₀ (i : ι), β₁ i) ≃+ Π₀ (i : ι), β₂ i
DFinsupp.mapRange.addMonoidHom as an AddEquiv.
theorem DFinsupp.mapRange.addEquiv_apply E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β₁ i)]
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] (e : (i : ι) → β₁ i ≃+ β₂ i) (x : Π₀ (i : ι), β₁ i),
(DFinsupp.mapRange.addEquiv e) x = DFinsupp.mapRange (fun i x ↦ (e i) x) ⋯ x
theorem DFinsupp.mapRange.addEquiv_refl E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} [inst : (i : ι) → AddZeroClass (β₁ i)],
(DFinsupp.mapRange.addEquiv fun i ↦ AddEquiv.refl (β₁ i)) = AddEquiv.refl (Π₀ (i : ι), β₁ i)
theorem DFinsupp.mapRange.addEquiv_trans E1 #
∀ {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β i)]
[inst_1 : (i : ι) → AddZeroClass (β₁ i)] [inst_2 : (i : ι) → AddZeroClass (β₂ i)] (f : (i : ι) → β i ≃+ β₁ i)
(f₂ : (i : ι) → β₁ i ≃+ β₂ i),
(DFinsupp.mapRange.addEquiv fun i ↦ (f i).trans (f₂ i)) =
(DFinsupp.mapRange.addEquiv f).trans (DFinsupp.mapRange.addEquiv f₂)
theorem DFinsupp.mapRange.addEquiv_symm E0 #
∀ {ι : Type u} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [inst : (i : ι) → AddZeroClass (β₁ i)]
[inst_1 : (i : ι) → AddZeroClass (β₂ i)] (e : (i : ι) → β₁ i ≃+ β₂ i),
(DFinsupp.mapRange.addEquiv e).symm = DFinsupp.mapRange.addEquiv fun i ↦ (e i).symm
Deprecated aliases
| Name | New name | Since |
|---|---|---|
DFinsupp.filter_pos_add_filter_neg | DFinsupp.filter_add_filter_not | 2026-05-04 |
DFinsupp.support_single_ne_zero | DFinsupp.support_single | 2026-05-05 |