The areas / V03. Sets, finite structures and big operators
Mathlib.Data.DFinsupp.BigOperators
82 declarations. 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.
Product and sum lemmas for bundled morphisms.
In this section, we provide analogues of AddMonoidHom.map_sum, AddMonoidHom.coe_finsetSum,
and AddMonoidHom.finsetSum_apply for DFinsupp.sum and DFinsupp.sumAddHom instead of
Finset.sum.
We provide these for AddMonoidHom, MonoidHom, RingHom, AddEquiv, and MulEquiv.
Lemmas for LinearMap and LinearEquiv are in another file.
The above lemmas, repeated for DFinsupp.sumAddHom.
theorem DFinsupp.sum.congr_simp E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} {inst : DecidableEq ι} [inst_1 : DecidableEq ι]
[inst_2 : (i : ι) → Zero (β i)] {inst_3 : (i : ι) → (x : β i) → Decidable (x ≠ 0)}
[inst_4 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_5 : AddCommMonoid γ] (f f_1 : Π₀ (i : ι), β i),
f = f_1 → ∀ (g g_1 : (i : ι) → β i → γ), g = g_1 → f.sum g = f_1.sum g_1
theorem DFinsupp.prod.congr_simp E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} {inst : DecidableEq ι} [inst_1 : DecidableEq ι]
[inst_2 : (i : ι) → Zero (β i)] {inst_3 : (i : ι) → (x : β i) → Decidable (x ≠ 0)}
[inst_4 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_5 : CommMonoid γ] (f f_1 : Π₀ (i : ι), β i),
f = f_1 → ∀ (g g_1 : (i : ι) → β i → γ), g = g_1 → f.prod g = f_1.prod g_1
theorem Trunc.lift.congr_simp E1 #
∀ {α : Sort u_1} {β : Sort u_2} (f f_1 : α → β) (e_f : f = f_1) (c : ∀ (a b : α), f a = f b) (a a_1 : Trunc α),
a = a_1 → Trunc.lift f c a = Trunc.lift f_1 ⋯ a_1
def DFinsupp.evalAddMonoidHom E1 #
{ι : Type u} → {β : ι → Type v} → [inst : (i : ι) → AddZeroClass (β i)] → (i : ι) → (Π₀ (i : ι), β i) →+ β i
Evaluation at a point is an AddMonoidHom. This is the finitely-supported version of
Pi.evalAddMonoidHom.
theorem DFinsupp.coe_finsetSum E0 #
∀ {ι : Type u} {β : ι → Type v} {α : Type u_1} [inst : (i : ι) → AddCommMonoid (β i)] (s : Finset α)
(g : α → Π₀ (i : ι), β i), ⇑(∑ a ∈ s, g a) = ∑ a ∈ s, ⇑(g a)
theorem DFinsupp.finsetSum_apply E0 #
∀ {ι : Type u} {β : ι → Type v} {α : Type u_1} [inst : (i : ι) → AddCommMonoid (β i)] (s : Finset α)
(g : α → Π₀ (i : ι), β i) (i : ι), (∑ a ∈ s, g a) i = ∑ a ∈ s, (g a) i
def DFinsupp.prod E1 #
{ι : Type u} →
{γ : Type w} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → Zero (β i)] →
[(i : ι) → (x : β i) → Decidable (x ≠ 0)] → [CommMonoid γ] → (Π₀ (i : ι), β i) → ((i : ι) → β i → γ) → γ
DFinsupp.prod f g is the product of g i (f i) over the support of f.
def DFinsupp.sum E1 #
{ι : Type u} →
{γ : Type w} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → Zero (β i)] →
[(i : ι) → (x : β i) → Decidable (x ≠ 0)] → [AddCommMonoid γ] → (Π₀ (i : ι), β i) → ((i : ι) → β i → γ) → γ
sum f g is the sum of g i (f i) over the support of f.
theorem DFinsupp.prod_of_support_subset E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f : Π₀ (i : ι), β i}
{g : (i : ι) → β i → γ} {s : Finset ι}, f.support ⊆ s → (∀ i ∈ s, g i 0 = 1) → f.prod g = ∏ i ∈ s, g i (f i)
theorem DFinsupp.sum_of_support_subset E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f : Π₀ (i : ι), β i}
{g : (i : ι) → β i → γ} {s : Finset ι}, f.support ⊆ s → (∀ i ∈ s, g i 0 = 0) → f.sum g = ∑ i ∈ s, g i (f i)
theorem DFinsupp.prod_congr_of_eq_on_union E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f1 f2 : Π₀ (i : ι), β i}
{g1 g2 : (i : ι) → β i → γ},
(∀ x ∈ f1.support ∪ f2.support, g1 x (f1 x) = g2 x (f2 x)) →
(∀ x ∈ f1.support ∪ f2.support, g1 x 0 = 1) → (∀ x ∈ f1.support ∪ f2.support, g2 x 0 = 1) → f1.prod g1 = f2.prod g2
The product over two dfinsupps agree if the functions agree and are well-behaved within the shared support.
theorem DFinsupp.sum_congr_of_eq_on_union E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f1 f2 : Π₀ (i : ι), β i}
{g1 g2 : (i : ι) → β i → γ},
(∀ x ∈ f1.support ∪ f2.support, g1 x (f1 x) = g2 x (f2 x)) →
(∀ x ∈ f1.support ∪ f2.support, g1 x 0 = 0) → (∀ x ∈ f1.support ∪ f2.support, g2 x 0 = 0) → f1.sum g1 = f2.sum g2
The sum over two dfinsupps agree if the functions agree and are well-behaved within the shared support.
theorem map_dfinsuppSum E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} {H : Type u_3}
[inst_1 : (i : ι) → Zero (β i)] [inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid R]
[inst_4 : AddCommMonoid S] [inst_5 : FunLike H R S] [AddMonoidHomClass H R S] (h : H) (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i → R), h (f.sum g) = f.sum fun a b ↦ h (g a b)
theorem map_dfinsuppProd E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} {H : Type u_3}
[inst_1 : (i : ι) → Zero (β i)] [inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid R]
[inst_4 : CommMonoid S] [inst_5 : FunLike H R S] [MonoidHomClass H R S] (h : H) (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i → R), h (f.prod g) = f.prod fun a b ↦ h (g a b)
theorem DFinsupp.sum_mapRange_index E1 #
∀ {ι : Type u} {γ : Type w} [inst : DecidableEq ι] {β₁ : ι → Type v₁} {β₂ : ι → Type v₂}
[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)] [inst_5 : AddCommMonoid γ] {f : (i : ι) → β₁ i → β₂ i}
{hf : ∀ (i : ι), f i 0 = 0} {g : Π₀ (i : ι), β₁ i} {h : (i : ι) → β₂ i → γ},
(∀ (i : ι), h i 0 = 0) → (DFinsupp.mapRange f hf g).sum h = g.sum fun i b ↦ h i (f i b)
theorem DFinsupp.prod_mapRange_index E1 #
∀ {ι : Type u} {γ : Type w} [inst : DecidableEq ι] {β₁ : ι → Type v₁} {β₂ : ι → Type v₂}
[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)] [inst_5 : CommMonoid γ] {f : (i : ι) → β₁ i → β₂ i}
{hf : ∀ (i : ι), f i 0 = 0} {g : Π₀ (i : ι), β₁ i} {h : (i : ι) → β₂ i → γ},
(∀ (i : ι), h i 0 = 1) → (DFinsupp.mapRange f hf g).prod h = g.prod fun i b ↦ h i (f i b)
theorem DFinsupp.sum_zero_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {h : (i : ι) → β i → γ},
DFinsupp.sum 0 h = 0
theorem DFinsupp.prod_zero_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {h : (i : ι) → β i → γ},
DFinsupp.prod 0 h = 1
theorem DFinsupp.prod_single_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {i : ι} {b : β i} {h : (i : ι) → β i → γ},
h i 0 = 1 → (fun₀ | i => b).prod h = h i b
theorem DFinsupp.sum_single_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {i : ι} {b : β i}
{h : (i : ι) → β i → γ}, h i 0 = 0 → (fun₀ | i => b).sum h = h i b
theorem DFinsupp.prod_neg_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {g : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (∀ (i : ι), h i 0 = 1) → (-g).prod h = g.prod fun i b ↦ h i (-b)
theorem DFinsupp.sum_neg_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {g : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (∀ (i : ι), h i 0 = 0) → (-g).sum h = g.sum fun i b ↦ h i (-b)
theorem DFinsupp.sum_comm E1 #
∀ {γ : Type w} {ι₁ : Type u_3} {ι₂ : Type u_4} {β₁ : ι₁ → Type u_1} {β₂ : ι₂ → Type u_2} [inst : DecidableEq ι₁]
[inst_1 : DecidableEq ι₂] [inst_2 : (i : ι₁) → Zero (β₁ i)] [inst_3 : (i : ι₂) → Zero (β₂ i)]
[inst_4 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)] [inst_5 : (i : ι₂) → (x : β₂ i) → Decidable (x ≠ 0)]
[inst_6 : AddCommMonoid γ] (f₁ : Π₀ (i : ι₁), β₁ i) (f₂ : Π₀ (i : ι₂), β₂ i)
(h : (i : ι₁) → β₁ i → (i : ι₂) → β₂ i → γ),
(f₁.sum fun i₁ x₁ ↦ f₂.sum fun i₂ x₂ ↦ h i₁ x₁ i₂ x₂) = f₂.sum fun i₂ x₂ ↦ f₁.sum fun i₁ x₁ ↦ h i₁ x₁ i₂ x₂
theorem DFinsupp.prod_comm E1 #
∀ {γ : Type w} {ι₁ : Type u_3} {ι₂ : Type u_4} {β₁ : ι₁ → Type u_1} {β₂ : ι₂ → Type u_2} [inst : DecidableEq ι₁]
[inst_1 : DecidableEq ι₂] [inst_2 : (i : ι₁) → Zero (β₁ i)] [inst_3 : (i : ι₂) → Zero (β₂ i)]
[inst_4 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)] [inst_5 : (i : ι₂) → (x : β₂ i) → Decidable (x ≠ 0)]
[inst_6 : CommMonoid γ] (f₁ : Π₀ (i : ι₁), β₁ i) (f₂ : Π₀ (i : ι₂), β₂ i) (h : (i : ι₁) → β₁ i → (i : ι₂) → β₂ i → γ),
(f₁.prod fun i₁ x₁ ↦ f₂.prod fun i₂ x₂ ↦ h i₁ x₁ i₂ x₂) = f₂.prod fun i₂ x₂ ↦ f₁.prod fun i₁ x₁ ↦ h i₁ x₁ i₂ x₂
theorem DFinsupp.sum_apply E0 #
∀ {ι : Type u_1} {β : ι → Type v} {ι₁ : Type u₁} [inst : DecidableEq ι₁] {β₁ : ι₁ → Type v₁}
[inst_1 : (i₁ : ι₁) → Zero (β₁ i₁)] [inst_2 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_3 : (i : ι) → AddCommMonoid (β i)] {f : Π₀ (i₁ : ι₁), β₁ i₁} {g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i} {i₂ : ι},
(f.sum g) i₂ = f.sum fun i₁ b ↦ (g i₁ b) i₂
theorem DFinsupp.support_sum E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {ι₁ : Type u₁} [inst_1 : DecidableEq ι₁] {β₁ : ι₁ → Type v₁}
[inst_2 : (i₁ : ι₁) → Zero (β₁ i₁)] [inst_3 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_4 : (i : ι) → AddCommMonoid (β i)] [inst_5 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i₁ : ι₁), β₁ i₁}
{g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i}, (f.sum g).support ⊆ f.support.biUnion fun i ↦ (g i (f i)).support
theorem DFinsupp.sum_zero E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f : Π₀ (i : ι), β i},
(f.sum fun x x_1 ↦ 0) = 0
theorem DFinsupp.prod_one E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f : Π₀ (i : ι), β i},
(f.prod fun x x_1 ↦ 1) = 1
theorem DFinsupp.prod_mul E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f : Π₀ (i : ι), β i}
{h₁ h₂ : (i : ι) → β i → γ}, (f.prod fun i b ↦ h₁ i b * h₂ i b) = f.prod h₁ * f.prod h₂
theorem DFinsupp.sum_add E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f : Π₀ (i : ι), β i}
{h₁ h₂ : (i : ι) → β i → γ}, (f.sum fun i b ↦ h₁ i b + h₂ i b) = f.sum h₁ + f.sum h₂
theorem DFinsupp.sum_neg E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : SubtractionCommMonoid γ] {f : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (f.sum fun i b ↦ -h i b) = -f.sum h
theorem DFinsupp.prod_inv E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : DivisionCommMonoid γ] {f : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (f.prod fun i b ↦ (h i b)⁻¹) = (f.prod h)⁻¹
theorem DFinsupp.prod_eq_one E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (∀ (i : ι), h i (f i) = 1) → f.prod h = 1
theorem DFinsupp.sum_eq_zero E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ}, (∀ (i : ι), h i (f i) = 0) → f.sum h = 0
theorem DFinsupp.smul_sum E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] {α : Type u_1} [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] [inst_4 : DistribSMul α γ]
{f : Π₀ (i : ι), β i} {h : (i : ι) → β i → γ} {c : α}, c • f.sum h = f.sum fun a b ↦ c • h a b
theorem DFinsupp.prod_add_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {f g : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 1) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂) → (f + g).prod h = f.prod h * g.prod h
theorem DFinsupp.sum_add_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {f g : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 0) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ + h i b₂) → (f + g).sum h = f.sum h + g.sum h
theorem DFinsupp.sum_eq_sum_fintype E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : Fintype ι] [inst_2 : (i : ι) → Zero (β i)]
[inst_3 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_4 : AddCommMonoid γ] (v : Π₀ (i : ι), β i)
{f : (i : ι) → β i → γ}, (∀ (i : ι), f i 0 = 0) → v.sum f = ∑ i, f i (DFinsupp.equivFunOnFintype v i)
theorem DFinsupp.prod_eq_prod_fintype E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : Fintype ι] [inst_2 : (i : ι) → Zero (β i)]
[inst_3 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_4 : CommMonoid γ] (v : Π₀ (i : ι), β i)
{f : (i : ι) → β i → γ}, (∀ (i : ι), f i 0 = 1) → v.prod f = ∏ i, f i (DFinsupp.equivFunOnFintype v i)
theorem DFinsupp.prod_eq_zero_iff E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : CommMonoidWithZero γ] [Nontrivial γ] [NoZeroDivisors γ] [inst_5 : (i : ι) → DecidableEq (β i)]
{f : Π₀ (i : ι), β i} {g : (i : ι) → β i → γ}, f.prod g = 0 ↔ ∃ i ∈ f.support, g i (f i) = 0
theorem DFinsupp.prod_ne_zero_iff E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : CommMonoidWithZero γ] [Nontrivial γ] [NoZeroDivisors γ] [inst_5 : (i : ι) → DecidableEq (β i)]
{f : Π₀ (i : ι), β i} {g : (i : ι) → β i → γ}, f.prod g ≠ 0 ↔ ∀ i ∈ f.support, g i (f i) ≠ 0
def DFinsupp.sumZeroHom E1 #
{ι : Type u} →
{γ : Type w} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → Zero (β i)] →
[inst_1 : AddCommMonoid γ] → ((i : ι) → ZeroHom (β i) γ) → ZeroHom (Π₀ (i : ι), β i) γ
When summing over an ZeroHom, the decidability assumption is not needed, and the result is
also an ZeroHom.
theorem DFinsupp.sumZeroHom_single E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : AddCommMonoid γ] (φ : (i : ι) → ZeroHom (β i) γ) (i : ι) (x : β i),
((DFinsupp.sumZeroHom φ) fun₀ | i => x) = (φ i) x
theorem DFinsupp.sumZeroHom_piSingle E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : AddCommMonoid γ] (i : ι) (φ : ZeroHom (β i) γ),
DFinsupp.sumZeroHom (Pi.single i φ) = φ.comp { toFun := fun x ↦ x i, map_zero' := ⋯ }
theorem DFinsupp.sumZeroHom_apply E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] (φ : (i : ι) → ZeroHom (β i) γ)
(f : Π₀ (i : ι), β i), (DFinsupp.sumZeroHom φ) f = f.sum fun x ↦ ⇑(φ x)
While we didn't need decidable instances to define it, we do to reduce it to a sum
def DFinsupp.sumAddHom E1 #
{ι : Type u} →
{γ : Type w} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → AddZeroClass (β i)] →
[inst_1 : AddCommMonoid γ] → ((i : ι) → β i →+ γ) → (Π₀ (i : ι), β i) →+ γ
When summing over an AddMonoidHom, the decidability assumption is not needed, and the result is
also an AddMonoidHom.
theorem DFinsupp.sumAddHom_toZeroHom E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (φ : (i : ι) → β i →+ γ), ↑(DFinsupp.sumAddHom φ) = DFinsupp.sumZeroHom fun i ↦ ↑(φ i)
theorem DFinsupp.sumAddHom_single E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (φ : (i : ι) → β i →+ γ) (i : ι) (x : β i),
((DFinsupp.sumAddHom φ) fun₀ | i => x) = (φ i) x
theorem DFinsupp.sumAddHom_piSingle E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (i : ι) (φ : β i →+ γ),
DFinsupp.sumAddHom (Pi.single i φ) = φ.comp (DFinsupp.evalAddMonoidHom i)
theorem DFinsupp.sumAddHom_comp_single E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (f : (i : ι) → β i →+ γ) (i : ι),
(DFinsupp.sumAddHom f).comp (DFinsupp.singleAddHom β i) = f i
theorem DFinsupp.sumAddHom_apply E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] (φ : (i : ι) → β i →+ γ)
(f : Π₀ (i : ι), β i), (DFinsupp.sumAddHom φ) f = f.sum fun x ↦ ⇑(φ x)
While we didn't need decidable instances to define it, we do to reduce it to a sum
theorem DFinsupp.sumAddHom_comm E1 #
∀ {ι₁ : Type u_4} {ι₂ : Type u_5} {β₁ : ι₁ → Type u_1} {β₂ : ι₂ → Type u_2} {γ : Type u_3} [inst : DecidableEq ι₁]
[inst_1 : DecidableEq ι₂] [inst_2 : (i : ι₁) → AddZeroClass (β₁ i)] [inst_3 : (i : ι₂) → AddZeroClass (β₂ i)]
[inst_4 : AddCommMonoid γ] (f₁ : Π₀ (i : ι₁), β₁ i) (f₂ : Π₀ (i : ι₂), β₂ i)
(h : (i : ι₁) → (j : ι₂) → β₁ i →+ β₂ j →+ γ),
(DFinsupp.sumAddHom fun i₂ ↦ (DFinsupp.sumAddHom fun i₁ ↦ h i₁ i₂) f₁) f₂ =
(DFinsupp.sumAddHom fun i₁ ↦ (DFinsupp.sumAddHom fun i₂ ↦ (h i₁ i₂).flip) f₂) f₁
def DFinsupp.liftAddHom E1 #
{ι : Type u} →
{γ : Type w} →
{β : ι → Type v} →
[DecidableEq ι] →
[inst : (i : ι) → AddZeroClass (β i)] →
[inst_1 : AddCommMonoid γ] → ((i : ι) → β i →+ γ) ≃+ ((Π₀ (i : ι), β i) →+ γ)
The DFinsupp version of Finsupp.liftAddHom
theorem DFinsupp.liftAddHom_apply E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (φ : (i : ι) → β i →+ γ), DFinsupp.liftAddHom φ = DFinsupp.sumAddHom φ
theorem DFinsupp.liftAddHom_symm_apply E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (F : (Π₀ (i : ι), β i) →+ γ) (i : ι),
DFinsupp.liftAddHom.symm F i = F.comp (DFinsupp.singleAddHom β i)
theorem DFinsupp.liftAddHom_singleAddHom E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)],
DFinsupp.liftAddHom (DFinsupp.singleAddHom β) = AddMonoidHom.id (Π₀ (i : ι), β i)
The DFinsupp version of Finsupp.liftAddHom_singleAddHom
theorem DFinsupp.liftAddHom_apply_single E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (f : (i : ι) → β i →+ γ) (i : ι) (x : β i),
((DFinsupp.liftAddHom f) fun₀ | i => x) = (f i) x
The DFinsupp version of Finsupp.liftAddHom_apply_single
theorem DFinsupp.liftAddHom_comp_single E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (f : (i : ι) → β i →+ γ) (i : ι),
(DFinsupp.liftAddHom f).comp (DFinsupp.singleAddHom β i) = f i
The DFinsupp version of Finsupp.liftAddHom_comp_single
theorem DFinsupp.comp_liftAddHom E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] {δ : Type u_1}
[inst_1 : (i : ι) → AddZeroClass (β i)] [inst_2 : AddCommMonoid γ] [inst_3 : AddCommMonoid δ] (g : γ →+ δ)
(f : (i : ι) → β i →+ γ), g.comp (DFinsupp.liftAddHom f) = DFinsupp.liftAddHom fun a ↦ g.comp (f a)
The DFinsupp version of Finsupp.comp_liftAddHom
theorem DFinsupp.sumAddHom_zero E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ], (DFinsupp.sumAddHom fun i ↦ 0) = 0
theorem DFinsupp.sumAddHom_add E0 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddZeroClass (β i)]
[inst_2 : AddCommMonoid γ] (g h : (i : ι) → β i →+ γ),
(DFinsupp.sumAddHom fun i ↦ g i + h i) = DFinsupp.sumAddHom g + DFinsupp.sumAddHom h
theorem DFinsupp.sumAddHom_singleAddHom E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)],
DFinsupp.sumAddHom (DFinsupp.singleAddHom β) = AddMonoidHom.id (Π₀ (i : ι), β i)
theorem DFinsupp.comp_sumAddHom E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] {δ : Type u_1}
[inst_1 : (i : ι) → AddZeroClass (β i)] [inst_2 : AddCommMonoid γ] [inst_3 : AddCommMonoid δ] (g : γ →+ δ)
(f : (i : ι) → β i →+ γ), g.comp (DFinsupp.sumAddHom f) = DFinsupp.sumAddHom fun a ↦ g.comp (f a)
theorem DFinsupp.sum_sub_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddGroup (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommGroup γ] {f g : Π₀ (i : ι), β i}
{h : (i : ι) → β i → γ},
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ - b₂) = h i b₁ - h i b₂) → (f - g).sum h = f.sum h - g.sum h
theorem DFinsupp.prod_finsetSum_index E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {γ : Type w} {α : Type x}
[inst_1 : (i : ι) → AddCommMonoid (β i)] [inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ]
{s : Finset α} {g : α → Π₀ (i : ι), β i} {h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 1) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂) → ∏ i ∈ s, (g i).prod h = (∑ i ∈ s, g i).prod h
theorem DFinsupp.sum_finsetSum_index E1 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {γ : Type w} {α : Type x}
[inst_1 : (i : ι) → AddCommMonoid (β i)] [inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ]
{s : Finset α} {g : α → Π₀ (i : ι), β i} {h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 0) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ + h i b₂) → ∑ i ∈ s, (g i).sum h = (∑ i ∈ s, g i).sum h
theorem DFinsupp.sum_sum_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] {ι₁ : Type u₁} [inst_1 : DecidableEq ι₁]
{β₁ : ι₁ → Type v₁} [inst_2 : (i₁ : ι₁) → Zero (β₁ i₁)] [inst_3 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_4 : (i : ι) → AddCommMonoid (β i)] [inst_5 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_6 : AddCommMonoid γ]
{f : Π₀ (i₁ : ι₁), β₁ i₁} {g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i} {h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 0) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ + h i b₂) → (f.sum g).sum h = f.sum fun i b ↦ (g i b).sum h
theorem DFinsupp.prod_sum_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] {ι₁ : Type u₁} [inst_1 : DecidableEq ι₁]
{β₁ : ι₁ → Type v₁} [inst_2 : (i₁ : ι₁) → Zero (β₁ i₁)] [inst_3 : (i : ι₁) → (x : β₁ i) → Decidable (x ≠ 0)]
[inst_4 : (i : ι) → AddCommMonoid (β i)] [inst_5 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_6 : CommMonoid γ]
{f : Π₀ (i₁ : ι₁), β₁ i₁} {g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i} {h : (i : ι) → β i → γ},
(∀ (i : ι), h i 0 = 1) →
(∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂) → (f.sum g).prod h = f.prod fun i b ↦ (g i b).prod h
theorem DFinsupp.sum_single E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → AddCommMonoid (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] {f : Π₀ (i : ι), β i}, f.sum DFinsupp.single = f
theorem DFinsupp.sum_subtypeDomain_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddCommMonoid γ] {v : Π₀ (i : ι), β i} {p : ι → Prop}
[inst_4 : DecidablePred p] {h : (i : ι) → β i → γ},
(∀ x ∈ v.support, p x) → ((DFinsupp.subtypeDomain p v).sum fun i b ↦ h (↑i) b) = v.sum h
theorem DFinsupp.prod_subtypeDomain_index E1 #
∀ {ι : Type u} {γ : Type w} {β : ι → Type v} [inst : DecidableEq ι] [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : CommMonoid γ] {v : Π₀ (i : ι), β i} {p : ι → Prop}
[inst_4 : DecidablePred p] {h : (i : ι) → β i → γ},
(∀ x ∈ v.support, p x) → ((DFinsupp.subtypeDomain p v).prod fun i b ↦ h (↑i) b) = v.prod h
theorem DFinsupp.subtypeDomain_sum E1 #
∀ {γ : Type w} {ι : Type u_1} {β : ι → Type v} [inst : (i : ι) → AddCommMonoid (β i)] {s : Finset γ}
{h : γ → Π₀ (i : ι), β i} {p : ι → Prop} [inst_1 : DecidablePred p],
DFinsupp.subtypeDomain p (∑ c ∈ s, h c) = ∑ c ∈ s, DFinsupp.subtypeDomain p (h c)
theorem DFinsupp.subtypeDomain_finsupp_sum E1 #
∀ {γ : Type w} {ι : Type u_1} {β : ι → Type v} {δ : γ → Type x} [inst : DecidableEq γ] [inst_1 : (c : γ) → Zero (δ c)]
[inst_2 : (c : γ) → (x : δ c) → Decidable (x ≠ 0)] [inst_3 : (i : ι) → AddCommMonoid (β i)] {p : ι → Prop}
[inst_4 : DecidablePred p] {s : Π₀ (c : γ), δ c} {h : (c : γ) → δ c → Π₀ (i : ι), β i},
DFinsupp.subtypeDomain p (s.sum h) = s.sum fun c d ↦ DFinsupp.subtypeDomain p (h c d)
theorem MonoidHom.coe_dfinsuppProd E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : MulOneClass R] [inst_4 : CommMonoid S]
(f : Π₀ (i : ι), β i) (g : (i : ι) → β i → R →* S), ⇑(f.prod g) = f.prod fun a b ↦ ⇑(g a b)
theorem AddMonoidHom.coe_dfinsuppSum E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddZeroClass R] [inst_4 : AddCommMonoid S]
(f : Π₀ (i : ι), β i) (g : (i : ι) → β i → R →+ S), ⇑(f.sum g) = f.sum fun a b ↦ ⇑(g a b)
theorem AddMonoidHom.dfinsuppSum_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : AddZeroClass R] [inst_4 : AddCommMonoid S]
(f : Π₀ (i : ι), β i) (g : (i : ι) → β i → R →+ S) (r : R), (f.sum g) r = f.sum fun a b ↦ (g a b) r
theorem MonoidHom.dfinsuppProd_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : (i : ι) → Zero (β i)]
[inst_2 : (i : ι) → (x : β i) → Decidable (x ≠ 0)] [inst_3 : MulOneClass R] [inst_4 : CommMonoid S]
(f : Π₀ (i : ι), β i) (g : (i : ι) → β i → R →* S) (r : R), (f.prod g) r = f.prod fun a b ↦ (g a b) r
theorem AddMonoidHom.map_dfinsuppSumAddHom E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : AddCommMonoid R]
[inst_2 : AddCommMonoid S] [inst_3 : (i : ι) → AddZeroClass (β i)] (h : R →+ S) (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i →+ R), h ((DFinsupp.sumAddHom g) f) = (DFinsupp.sumAddHom fun i ↦ h.comp (g i)) f
theorem AddMonoidHom.dfinsuppSumAddHom_apply E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : AddZeroClass R]
[inst_2 : AddCommMonoid S] [inst_3 : (i : ι) → AddZeroClass (β i)] (f : Π₀ (i : ι), β i) (g : (i : ι) → β i →+ R →+ S)
(r : R), ((DFinsupp.sumAddHom g) f) r = (DFinsupp.sumAddHom fun i ↦ (AddMonoidHom.eval r).comp (g i)) f
theorem AddMonoidHom.coe_dfinsuppSumAddHom E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : AddZeroClass R]
[inst_2 : AddCommMonoid S] [inst_3 : (i : ι) → AddZeroClass (β i)] (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i →+ R →+ S),
⇑((DFinsupp.sumAddHom g) f) = (DFinsupp.sumAddHom fun i ↦ (AddMonoidHom.coeFn R S).comp (g i)) f
theorem RingHom.map_dfinsuppSumAddHom E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : NonAssocSemiring R]
[inst_2 : NonAssocSemiring S] [inst_3 : (i : ι) → AddZeroClass (β i)] (h : R →+* S) (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i →+ R), h ((DFinsupp.sumAddHom g) f) = (DFinsupp.sumAddHom fun i ↦ h.toAddMonoidHom.comp (g i)) f
theorem AddEquiv.map_dfinsuppSumAddHom E0 #
∀ {ι : Type u} {β : ι → Type v} [inst : DecidableEq ι] {R : Type u_1} {S : Type u_2} [inst_1 : AddCommMonoid R]
[inst_2 : AddCommMonoid S] [inst_3 : (i : ι) → AddZeroClass (β i)] (h : R ≃+ S) (f : Π₀ (i : ι), β i)
(g : (i : ι) → β i →+ R), h ((DFinsupp.sumAddHom g) f) = (DFinsupp.sumAddHom fun i ↦ h.toAddMonoidHom.comp (g i)) f