The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Algebra.BigOperators.Finsupp.Basic

129 declarations and 2 deprecated aliases. Mathlib docs · Source

Big operators for finsupps

This file contains theorems relevant to big operators in finitely supported functions.

Declarations about Finsupp.sum and Finsupp.prod

In most of this section, the domain β is assumed to be an AddMonoid.

theorem AddMonoidHom.mk.congr_simp E1 #

∀ {M : Type u_10} {N : Type u_11} [inst : AddZero M] [inst_1 : AddZero N] (toZeroHom toZeroHom_1 : ZeroHom M N)
  (e_toZeroHom : toZeroHom = toZeroHom_1)
  (map_add' : ∀ (x y : M), toZeroHom.toFun (x + y) = toZeroHom.toFun x + toZeroHom.toFun y),
  { toZeroHom := toZeroHom, map_add' := map_add' } = { toZeroHom := toZeroHom_1, map_add' := ⋯ }

def Finsupp.prod E1 #

{α : Type u_1} → {M : Type u_8} → {N : Type u_10} → [inst : Zero M] → [CommMonoid N] → (α →₀ M) → (α → M → N) → N

prod f g is the product of g a (f a) over the support of f.

def Finsupp.sum E3 #

{α : Type u_1} → {M : Type u_8} → {N : Type u_10} → [inst : Zero M] → [AddCommMonoid N] → (α →₀ M) → (α → M → N) → N

sum f g is the sum of g a (f a) over the support of f.

theorem Finsupp.sum_fun_zero E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (f : α →₀ M),
  (f.sum fun x x_1 ↦ 0) = 0

theorem Finsupp.prod_fun_one E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] (f : α →₀ M),
  (f.prod fun x x_1 ↦ 1) = 1

theorem Finsupp.prod_of_support_subset E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] (f : α →₀ M) {s : Finset α},
  f.support ⊆ s → ∀ (g : α → M → N), (∀ i ∈ s, g i 0 = 1) → f.prod g = ∏ x ∈ s, g x (f x)

theorem Finsupp.sum_of_support_subset E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (f : α →₀ M) {s : Finset α},
  f.support ⊆ s → ∀ (g : α → M → N), (∀ i ∈ s, g i 0 = 0) → f.sum g = ∑ x ∈ s, g x (f x)

theorem Finsupp.sum_fintype E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] [inst_2 : Fintype α]
  (f : α →₀ M) (g : α → M → N), (∀ (i : α), g i 0 = 0) → f.sum g = ∑ i, g i (f i)

theorem Finsupp.prod_fintype E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] [inst_2 : Fintype α]
  (f : α →₀ M) (g : α → M → N), (∀ (i : α), g i 0 = 1) → f.prod g = ∏ i, g i (f i)

theorem Finsupp.sum_single_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {a : α} {b : M}
  {h : α → M → N}, h a 0 = 0 → (fun₀ | a => b).sum h = h a b

theorem Finsupp.prod_single_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {a : α} {b : M} {h : α → M → N},
  h a 0 = 1 → (fun₀ | a => b).prod h = h a b

theorem Finsupp.prod_mapRange_index E1 #

∀ {α : Type u_1} {M : Type u_8} {M' : Type u_9} {N : Type u_10} [inst : Zero M] [inst_1 : Zero M']
  [inst_2 : CommMonoid N] {f : M → M'} {hf : f 0 = 0} {g : α →₀ M} {h : α → M' → N},
  (∀ (a : α), h a 0 = 1) → (Finsupp.mapRange f hf g).prod h = g.prod fun a b ↦ h a (f b)

theorem Finsupp.sum_mapRange_index E1 #

∀ {α : Type u_1} {M : Type u_8} {M' : Type u_9} {N : Type u_10} [inst : Zero M] [inst_1 : Zero M']
  [inst_2 : AddCommMonoid N] {f : M → M'} {hf : f 0 = 0} {g : α →₀ M} {h : α → M' → N},
  (∀ (a : α), h a 0 = 0) → (Finsupp.mapRange f hf g).sum h = g.sum fun a b ↦ h a (f b)

theorem Finsupp.sum_onFinset E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (s : Finset α) (f : α → M)
  (hf : ∀ (a : α), f a ≠ 0 → a ∈ s) (g : α → M → N),
  (∀ i ∈ s, g i 0 = 0) → (Finsupp.onFinset s f hf).sum g = ∑ a ∈ s, g a (f a)

theorem Finsupp.prod_onFinset E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] (s : Finset α) (f : α → M)
  (hf : ∀ (a : α), f a ≠ 0 → a ∈ s) (g : α → M → N),
  (∀ i ∈ s, g i 0 = 1) → (Finsupp.onFinset s f hf).prod g = ∏ a ∈ s, g a (f a)

theorem Finsupp.sum_zero_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {h : α → M → N},
  Finsupp.sum 0 h = 0

theorem Finsupp.prod_zero_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {h : α → M → N},
  Finsupp.prod 0 h = 1

theorem Finsupp.sum_comm E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {M' : Type u_9} {N : Type u_10} [inst : Zero M] [inst_1 : Zero M']
  [inst_2 : AddCommMonoid N] (f : α →₀ M) (g : β →₀ M') (h : α → M → β → M' → N),
  (f.sum fun x v ↦ g.sum fun x' v' ↦ h x v x' v') = g.sum fun x' v' ↦ f.sum fun x v ↦ h x v x' v'

theorem Finsupp.prod_comm E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {M' : Type u_9} {N : Type u_10} [inst : Zero M] [inst_1 : Zero M']
  [inst_2 : CommMonoid N] (f : α →₀ M) (g : β →₀ M') (h : α → M → β → M' → N),
  (f.prod fun x v ↦ g.prod fun x' v' ↦ h x v x' v') = g.prod fun x' v' ↦ f.prod fun x v ↦ h x v x' v'

theorem Finsupp.sum_finsetSum_comm E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {s : Finset β}
  (f : α →₀ M) (h : α → M → β → N), (f.sum fun a m ↦ ∑ b ∈ s, h a m b) = ∑ b ∈ s, f.sum fun a m ↦ h a m b

theorem Finsupp.prod_finsetProd_comm E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {s : Finset β}
  (f : α →₀ M) (h : α → M → β → N), (f.prod fun a m ↦ ∏ b ∈ s, h a m b) = ∏ b ∈ s, f.prod fun a m ↦ h a m b

theorem Finsupp.sum_ite_eq E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] [inst_2 : DecidableEq α]
  (f : α →₀ M) (a : α) (b : α → M → N),
  (f.sum fun x v ↦ if a = x then b x v else 0) = if a ∈ f.support then b a (f a) else 0

theorem Finsupp.prod_ite_eq E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] [inst_2 : DecidableEq α]
  (f : α →₀ M) (a : α) (b : α → M → N),
  (f.prod fun x v ↦ if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1

theorem Finsupp.sum_ite_self_eq E0 #

∀ {α : Type u_1} [inst : DecidableEq α] {N : Type u_16} [inst_1 : AddCommMonoid N] (f : α →₀ N) (a : α),
  (f.sum fun x v ↦ if a = x then v else 0) = f a

theorem Finsupp.if_mem_support E0 #

∀ {α : Type u_1} [inst : DecidableEq α] {N : Type u_16} [inst_1 : Zero N] (f : α →₀ N) (a : α),
  (if a ∈ f.support then f a else 0) = f a

The left-hand side of sum_ite_self_eq simplifies; this is the variant that is useful for simp.

theorem Finsupp.prod_ite_eq' E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] [inst_2 : DecidableEq α]
  (f : α →₀ M) (a : α) (b : α → M → N),
  (f.prod fun x v ↦ if x = a then b x v else 1) = if a ∈ f.support then b a (f a) else 1

A restatement of prod_ite_eq with the equality test reversed.

theorem Finsupp.sum_ite_eq' E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] [inst_2 : DecidableEq α]
  (f : α →₀ M) (a : α) (b : α → M → N),
  (f.sum fun x v ↦ if x = a then b x v else 0) = if a ∈ f.support then b a (f a) else 0

A restatement of sum_ite_eq with the equality test reversed.

theorem Finsupp.sum_ite_self_eq' E1 #

∀ {α : Type u_1} [inst : DecidableEq α] {N : Type u_16} [inst_1 : AddCommMonoid N] (f : α →₀ N) (a : α),
  (f.sum fun x v ↦ if x = a then v else 0) = f a

A restatement of sum_ite_self_eq with the equality test reversed.

theorem Finsupp.sum_nsmul E0 #

∀ {α : Type u_1} {N : Type u_10} [inst : AddCommMonoid N] [inst_1 : Fintype α] (f : α →₀ ℕ) (g : α → N),
  (f.sum fun a b ↦ b • g a) = ∑ a, f a • g a

theorem Finsupp.prod_pow E0 #

∀ {α : Type u_1} {N : Type u_10} [inst : CommMonoid N] [inst_1 : Fintype α] (f : α →₀ ℕ) (g : α → N),
  (f.prod fun a b ↦ g a ^ b) = ∏ a, g a ^ f a

theorem Finsupp.sum_zsmul E0 #

∀ {α : Type u_1} {N : Type u_16} [inst : SubtractionCommMonoid N] [inst_1 : Fintype α] (f : α →₀ ℤ) (g : α → N),
  (f.sum fun a b ↦ b • g a) = ∑ a, f a • g a

theorem Finsupp.prod_zpow E0 #

∀ {α : Type u_1} {N : Type u_16} [inst : DivisionCommMonoid N] [inst_1 : Fintype α] (f : α →₀ ℤ) (g : α → N),
  (f.prod fun a b ↦ g a ^ b) = ∏ a, g a ^ f a

theorem Finsupp.onFinset_prod E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {s : Finset α} {f : α → M}
  {g : α → M → N} (hf : ∀ (a : α), f a ≠ 0 → a ∈ s),
  (∀ (a : α), g a 0 = 1) → (Finsupp.onFinset s f hf).prod g = ∏ a ∈ s, g a (f a)

If g maps a second argument of 0 to 1, then multiplying it over the result of onFinset is the same as multiplying it over the original Finset.

theorem Finsupp.onFinset_sum E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {s : Finset α} {f : α → M}
  {g : α → M → N} (hf : ∀ (a : α), f a ≠ 0 → a ∈ s),
  (∀ (a : α), g a 0 = 0) → (Finsupp.onFinset s f hf).sum g = ∑ a ∈ s, g a (f a)

If g maps a second argument of 0 to 0, summing it over the result of onFinset is the same as summing it over the original Finset.

theorem Finsupp.mul_prod_erase E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] (f : α →₀ M) (y : α)
  (g : α → M → N), y ∈ f.support → g y (f y) * (Finsupp.erase y f).prod g = f.prod g

Taking a product over f : α →₀ M is the same as multiplying the value on a single element y ∈ f.support by the product over erase y f.

theorem Finsupp.add_sum_erase E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (f : α →₀ M) (y : α)
  (g : α → M → N), y ∈ f.support → g y (f y) + (Finsupp.erase y f).sum g = f.sum g

Taking a sum over f : α →₀ M is the same as adding the value on a single element y ∈ f.support to the sum over erase y f.

theorem Finsupp.mul_prod_erase' E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] (f : α →₀ M) (y : α)
  (g : α → M → N), (∀ (i : α), g i 0 = 1) → g y (f y) * (Finsupp.erase y f).prod g = f.prod g

Generalization of Finsupp.mul_prod_erase: if g maps a second argument of 0 to 1, then its product over f : α →₀ M is the same as multiplying the value on any element y : α by the product over erase y f.

theorem Finsupp.add_sum_erase' E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (f : α →₀ M) (y : α)
  (g : α → M → N), (∀ (i : α), g i 0 = 0) → g y (f y) + (Finsupp.erase y f).sum g = f.sum g

Generalization of Finsupp.add_sum_erase: if g maps a second argument of 0 to 0, then its sum over f : α →₀ M is the same as adding the value on any element y : α to the sum over erase y f.

theorem AddSubmonoidClass.finsuppSum_mem E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {S : Type u_16}
  [inst_2 : SetLike S N] [AddSubmonoidClass S N] (s : S) (f : α →₀ M) (g : α → M → N),
  (∀ (c : α), f c ≠ 0 → g c (f c) ∈ s) → f.sum g ∈ s

theorem SubmonoidClass.finsuppProd_mem E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {S : Type u_16}
  [inst_2 : SetLike S N] [SubmonoidClass S N] (s : S) (f : α →₀ M) (g : α → M → N),
  (∀ (c : α), f c ≠ 0 → g c (f c) ∈ s) → f.prod g ∈ s

theorem Finsupp.prod_congr E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {f : α →₀ M}
  {g1 g2 : α → M → N}, (∀ x ∈ f.support, g1 x (f x) = g2 x (f x)) → f.prod g1 = f.prod g2

theorem Finsupp.sum_congr E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M}
  {g1 g2 : α → M → N}, (∀ x ∈ f.support, g1 x (f x) = g2 x (f x)) → f.sum g1 = f.sum g2

theorem Finsupp.prod_congr_of_eq_on_union E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] [inst_2 : DecidableEq α]
  {f1 f2 : α →₀ M} {g1 g2 : α → M → N},
  (∀ 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 finsupps agree if the functions agree and are well-behaved within the shared support.

theorem Finsupp.sum_congr_of_eq_on_union E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] [inst_2 : DecidableEq α]
  {f1 f2 : α →₀ M} {g1 g2 : α → M → N},
  (∀ 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 finsupps agree if the functions agree and are well-behaved within the shared support.

theorem Finsupp.prod_eq_single E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {f : α →₀ M} (a : α)
  {g : α → M → N}, (∀ (b : α), f b ≠ 0 → b ≠ a → g b (f b) = 1) → (f a = 0 → g a 0 = 1) → f.prod g = g a (f a)

theorem Finsupp.sum_eq_single E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M} (a : α)
  {g : α → M → N}, (∀ (b : α), f b ≠ 0 → b ≠ a → g b (f b) = 0) → (f a = 0 → g a 0 = 0) → f.sum g = g a (f a)

theorem Finsupp.prod_unique E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] [inst_2 : Unique α] {f : α →₀ M}
  {g : α → M → N}, (f default = 0 → g default 0 = 1) → f.prod g = g default (f default)

theorem Finsupp.sum_unique E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] [inst_2 : Unique α]
  {f : α →₀ M} {g : α → M → N}, (f default = 0 → g default 0 = 0) → f.sum g = g default (f default)

theorem Finsupp.prod_eq_zero_iff E0 #

∀ {α : Type u_1} {ι : Type u_2} {β : Type u_7} [inst : Zero α] [inst_1 : CommMonoidWithZero β] [Nontrivial β]
  [NoZeroDivisors β] {f : ι →₀ α} {g : ι → α → β}, f.prod g = 0 ↔ ∃ i ∈ f.support, g i (f i) = 0

theorem Finsupp.prod_ne_zero_iff E0 #

∀ {α : Type u_1} {ι : Type u_2} {β : Type u_7} [inst : Zero α] [inst_1 : CommMonoidWithZero β] [Nontrivial β]
  [NoZeroDivisors β] {f : ι →₀ α} {g : ι → α → β}, f.prod g ≠ 0 ↔ ∀ i ∈ f.support, g i (f i) ≠ 0

theorem map_finsuppProd E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} {P : Type u_11} [inst : Zero M] [inst_1 : CommMonoid N]
  [inst_2 : CommMonoid P] {H : Type u_16} [inst_3 : FunLike H N P] [MonoidHomClass H N P] (h : H) (f : α →₀ M)
  (g : α → M → N), h (f.prod g) = f.prod fun a b ↦ h (g a b)

theorem map_finsuppSum E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} {P : Type u_11} [inst : Zero M] [inst_1 : AddCommMonoid N]
  [inst_2 : AddCommMonoid P] {H : Type u_16} [inst_3 : FunLike H N P] [AddMonoidHomClass H N P] (h : H) (f : α →₀ M)
  (g : α → M → N), h (f.sum g) = f.sum fun a b ↦ h (g a b)

theorem MonoidHom.coe_finsuppProd E0 #

∀ {α : Type u_1} {β : Type u_7} {N : Type u_10} {P : Type u_11} [inst : Zero β] [inst_1 : MulOneClass N]
  [inst_2 : CommMonoid P] (f : α →₀ β) (g : α → β → N →* P), ⇑(f.prod g) = f.prod fun i fi ↦ ⇑(g i fi)

theorem AddMonoidHom.coe_finsuppSum E0 #

∀ {α : Type u_1} {β : Type u_7} {N : Type u_10} {P : Type u_11} [inst : Zero β] [inst_1 : AddZeroClass N]
  [inst_2 : AddCommMonoid P] (f : α →₀ β) (g : α → β → N →+ P), ⇑(f.sum g) = f.sum fun i fi ↦ ⇑(g i fi)

theorem AddMonoidHom.finsuppSum_apply E0 #

∀ {α : Type u_1} {β : Type u_7} {N : Type u_10} {P : Type u_11} [inst : Zero β] [inst_1 : AddZeroClass N]
  [inst_2 : AddCommMonoid P] (f : α →₀ β) (g : α → β → N →+ P) (x : N), (f.sum g) x = f.sum fun i fi ↦ (g i fi) x

theorem MonoidHom.finsuppProd_apply E0 #

∀ {α : Type u_1} {β : Type u_7} {N : Type u_10} {P : Type u_11} [inst : Zero β] [inst_1 : MulOneClass N]
  [inst_2 : CommMonoid P] (f : α →₀ β) (g : α → β → N →* P) (x : N), (f.prod g) x = f.prod fun i fi ↦ (g i fi) x

theorem Finsupp.single_multiset_sum E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] (s : Multiset M) (a : α),
  (fun₀ | a => s.sum) = (Multiset.map (Finsupp.single a) s).sum

theorem Finsupp.single_finsetSum E1 #

∀ {α : Type u_1} {ι : Type u_2} {M : Type u_8} [inst : AddCommMonoid M] (s : Finset ι) (f : ι → M) (a : α),
  (fun₀ | a => ∑ b ∈ s, f b) = ∑ b ∈ s, fun₀ | a => f b

theorem Finsupp.single_sum E1 #

∀ {α : Type u_1} {ι : Type u_2} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (s : ι →₀ M)
  (f : ι → M → N) (a : α), (fun₀ | a => s.sum f) = s.sum fun d c ↦ fun₀ | a => f d c

theorem Finsupp.sum_neg_index E1 #

∀ {α : Type u_1} {M : Type u_8} {G : Type u_12} [inst : SubtractionMonoid G] [inst_1 : AddCommMonoid M] {g : α →₀ G}
  {h : α → G → M}, (∀ (a : α), h a 0 = 0) → (-g).sum h = g.sum fun a b ↦ h a (-b)

theorem Finsupp.prod_neg_index E1 #

∀ {α : Type u_1} {M : Type u_8} {G : Type u_12} [inst : SubtractionMonoid G] [inst_1 : CommMonoid M] {g : α →₀ G}
  {h : α → G → M}, (∀ (a : α), h a 0 = 1) → (-g).prod h = g.prod fun a b ↦ h a (-b)

theorem Finsupp.finsetSum_apply E0 #

∀ {α : Type u_1} {ι : Type u_2} {N : Type u_10} [inst : AddCommMonoid N] (S : Finset ι) (f : ι → α →₀ N) (a : α),
  (∑ i ∈ S, f i) a = ∑ i ∈ S, (f i) a

theorem Finsupp.sum_apply E0 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M}
  {g : α → M → β →₀ N} {a₂ : β}, (f.sum g) a₂ = f.sum fun a₁ b ↦ (g a₁ b) a₂

theorem Finsupp.coe_finsetSum E0 #

∀ {α : Type u_1} {ι : Type u_2} {N : Type u_10} [inst : AddCommMonoid N] (S : Finset ι) (f : ι → α →₀ N),
  ⇑(∑ i ∈ S, f i) = ∑ i ∈ S, ⇑(f i)

theorem Finsupp.coe_sum E0 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] (f : α →₀ M)
  (g : α → M → β →₀ N), ⇑(f.sum g) = f.sum fun a₁ b ↦ ⇑(g a₁ b)

theorem Finsupp.support_sum E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : DecidableEq β] [inst_1 : Zero M]
  [inst_2 : AddCommMonoid N] {f : α →₀ M} {g : α → M → β →₀ N},
  (f.sum g).support ⊆ f.support.biUnion fun a ↦ (g a (f a)).support

theorem Finsupp.support_finsetSum E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} [inst : DecidableEq β] [inst_1 : AddCommMonoid M] {s : Finset α}
  {f : α → β →₀ M}, (s.sum f).support ⊆ s.biUnion fun x ↦ (f x).support

theorem Finsupp.sum_eq_one_iff E0 #

∀ {α : Type u_1} (d : α →₀ ℕ), (d.sum fun x n ↦ n) = 1 ↔ ∃ a, d = fun₀ | a => 1

theorem Finsupp.prod_mul E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {f : α →₀ M}
  {h₁ h₂ : α → M → N}, (f.prod fun a b ↦ h₁ a b * h₂ a b) = f.prod h₁ * f.prod h₂

theorem Finsupp.sum_add E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M}
  {h₁ h₂ : α → M → N}, (f.sum fun a b ↦ h₁ a b + h₂ a b) = f.sum h₁ + f.sum h₂

theorem Finsupp.prod_inv E0 #

∀ {α : Type u_1} {M : Type u_8} {G : Type u_12} [inst : Zero M] [inst_1 : CommGroup G] {f : α →₀ M} {h : α → M → G},
  (f.prod fun a b ↦ (h a b)⁻¹) = (f.prod h)⁻¹

theorem Finsupp.sum_neg E0 #

∀ {α : Type u_1} {M : Type u_8} {G : Type u_12} [inst : Zero M] [inst_1 : AddCommGroup G] {f : α →₀ M} {h : α → M → G},
  (f.sum fun a b ↦ -h a b) = -f.sum h

theorem Finsupp.sum_sub E0 #

∀ {α : Type u_1} {M : Type u_8} {G : Type u_12} [inst : Zero M] [inst_1 : SubtractionCommMonoid G] {f : α →₀ M}
  {h₁ h₂ : α → M → G}, (f.sum fun a b ↦ h₁ a b - h₂ a b) = f.sum h₁ - f.sum h₂

theorem Finsupp.prod_add_index E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : DecidableEq α] [inst_1 : AddZeroClass M] [inst_2 : CommMonoid N]
  {f g : α →₀ M} {h : α → M → N},
  (∀ a ∈ f.support ∪ g.support, h a 0 = 1) →
    (∀ a ∈ f.support ∪ g.support, ∀ (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂) → (f + g).prod h = f.prod h * g.prod h

Taking the product under h is an additive-to-multiplicative homomorphism of finsupps, if h is an additive-to-multiplicative homomorphism on the support. This is a more general version of Finsupp.prod_add_index'; the latter has simpler hypotheses.

theorem Finsupp.sum_add_index E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : DecidableEq α] [inst_1 : AddZeroClass M]
  [inst_2 : AddCommMonoid N] {f g : α →₀ M} {h : α → M → N},
  (∀ a ∈ f.support ∪ g.support, h a 0 = 0) →
    (∀ a ∈ f.support ∪ g.support, ∀ (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂) → (f + g).sum h = f.sum h + g.sum h

Taking the product under h is an additive homomorphism of finsupps, if h is an additive homomorphism on the support. This is a more general version of Finsupp.sum_add_index'; the latter has simpler hypotheses.

theorem Finsupp.prod_add_index' E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : CommMonoid N] {f g : α →₀ M}
  {h : α → M → N},
  (∀ (a : α), h a 0 = 1) →
    (∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂) → (f + g).prod h = f.prod h * g.prod h

Taking the product under h is an additive-to-multiplicative homomorphism of finsupps, if h is an additive-to-multiplicative homomorphism. This is a more specialized version of Finsupp.prod_add_index with simpler hypotheses.

theorem Finsupp.sum_add_index' E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] {f g : α →₀ M}
  {h : α → M → N},
  (∀ (a : α), h a 0 = 0) → (∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂) → (f + g).sum h = f.sum h + g.sum h

Taking the sum under h is an additive homomorphism of finsupps,if h is an additive homomorphism. This is a more specific version of Finsupp.sum_add_index with simpler hypotheses.

theorem Finsupp.sum_hom_add_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] {f g : α →₀ M}
  (h : α → M →+ N), ((f + g).sum fun x ↦ ⇑(h x)) = (f.sum fun x ↦ ⇑(h x)) + g.sum fun x ↦ ⇑(h x)

theorem Finsupp.prod_hom_add_index E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : CommMonoid N] {f g : α →₀ M}
  (h : α → Multiplicative M →* N),
  ((f + g).prod fun a b ↦ (h a) (Multiplicative.ofAdd b)) =
    (f.prod fun a b ↦ (h a) (Multiplicative.ofAdd b)) * g.prod fun a b ↦ (h a) (Multiplicative.ofAdd b)

def Finsupp.liftAddHom E3 #

{α : Type u_1} →
  {M : Type u_8} →
    {N : Type u_10} → [inst : AddZeroClass M] → [inst_1 : AddCommMonoid N] → (α → M →+ N) ≃+ ((α →₀ M) →+ N)

The canonical isomorphism between families of additive monoid homomorphisms α → (M →+ N) and monoid homomorphisms (α →₀ M) →+ N.

theorem Finsupp.liftAddHom_apply E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] (F : α → M →+ N)
  (f : α →₀ M), (Finsupp.liftAddHom F) f = f.sum fun x ↦ ⇑(F x)

theorem Finsupp.liftAddHom_symm_apply E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] (F : (α →₀ M) →+ N)
  (x : α), Finsupp.liftAddHom.symm F x = F.comp (Finsupp.singleAddHom x)

theorem Finsupp.liftAddHom_symm_apply_apply E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] (F : (α →₀ M) →+ N)
  (x : α) (y : M), (Finsupp.liftAddHom.symm F x) y = F fun₀ | x => y

theorem Finsupp.liftAddHom_singleAddHom E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M],
  Finsupp.liftAddHom Finsupp.singleAddHom = AddMonoidHom.id (α →₀ M)

theorem Finsupp.sum_finsetSum E1 #

∀ {α : Type u_1} {ι : Type u_2} {A : Type u_4} {B : Type u_5} [inst : AddCommMonoid A] [inst_1 : AddCommMonoid B]
  (f : ι → α →₀ A) (s : Finset ι) (g : α → A → B),
  (∀ (a : α), g a 0 = 0) →
    (∀ (a : α) (m₁ m₂ : A), g a (m₁ + m₂) = g a m₁ + g a m₂) → (∑ i ∈ s, f i).sum g = ∑ i ∈ s, (f i).sum g

theorem Finsupp.sum_single E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] (f : α →₀ M), f.sum Finsupp.single = f

theorem Finsupp.univ_sum_single E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : Fintype α] [inst_1 : AddCommMonoid M] (f : α →₀ M), (∑ a, fun₀ | a => f a) = f

The Finsupp version of Finset.univ_sum_single

theorem Finsupp.univ_sum_single_apply E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] [inst_1 : Fintype α] (i : α) (m : M),
  ∑ j, (fun₀ | i => m) j = m

theorem Finsupp.univ_sum_single_apply' E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] [inst_1 : Fintype α] (i : α) (m : M),
  ∑ j, (fun₀ | j => m) i = m

theorem Finsupp.sum_single_add_single E1 #

∀ {ι : Type u_2} {A : Type u_4} {B : Type u_5} [inst : AddCommMonoid A] [inst_1 : AddCommMonoid B] (f₁ f₂ : ι)
  (g₁ g₂ : A) (F : ι → A → B),
  f₁ ≠ f₂ → (∀ (f : ι), F f 0 = 0) → ((fun₀ | f₁ => g₁) + fun₀ | f₂ => g₂).sum F = F f₁ g₁ + F f₂ g₂

theorem Finsupp.equivFunOnFinite_symm_eq_sum E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : Fintype α] [inst_1 : AddCommMonoid M] (f : α → M),
  Finsupp.equivFunOnFinite.symm f = ∑ a, fun₀ | a => f a

theorem Finsupp.coe_univ_sum_single E0 #

∀ {α : Type u_1} {M : Type u_8} [inst : Fintype α] [inst_1 : AddCommMonoid M] (f : α → M), ⇑(∑ a, fun₀ | a => f a) = f

theorem Finsupp.equivFunOnFinite_symm_sum E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : Fintype α] [inst_1 : AddCommMonoid M] (f : α → M),
  ((Finsupp.equivFunOnFinite.symm f).sum fun x n ↦ n) = ∑ a, f a

theorem Finsupp.liftAddHom_apply_single E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] (f : α → M →+ N)
  (a : α) (b : M), ((Finsupp.liftAddHom f) fun₀ | a => b) = (f a) b

theorem Finsupp.liftAddHom_comp_single E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N] (f : α → M →+ N)
  (a : α), (Finsupp.liftAddHom f).comp (Finsupp.singleAddHom a) = f a

theorem Finsupp.comp_liftAddHom E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} {P : Type u_11} [inst : AddZeroClass M] [inst_1 : AddCommMonoid N]
  [inst_2 : AddCommMonoid P] (g : N →+ P) (f : α → M →+ N),
  g.comp (Finsupp.liftAddHom f) = Finsupp.liftAddHom fun a ↦ g.comp (f a)

theorem Finsupp.sum_sub_index E1 #

∀ {α : Type u_1} {γ : Type u_3} {β : Type u_7} [inst : AddGroup β] [inst_1 : AddCommGroup γ] {f g : α →₀ β}
  {h : α → β → γ}, (∀ (a : α) (b₁ b₂ : β), h a (b₁ - b₂) = h a b₁ - h a b₂) → (f - g).sum h = f.sum h - g.sum h

theorem Finsupp.prod_embDomain E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {v : α →₀ M}
  {f : α ↪ β} {g : β → M → N}, (Finsupp.embDomain f v).prod g = v.prod fun a b ↦ g (f a) b

theorem Finsupp.sum_embDomain E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {v : α →₀ M}
  {f : α ↪ β} {g : β → M → N}, (Finsupp.embDomain f v).sum g = v.sum fun a b ↦ g (f a) b

theorem Finsupp.sum_finsetSum_index E1 #

∀ {α : Type u_1} {ι : Type u_2} {M : Type u_8} {N : Type u_10} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid N]
  {s : Finset ι} {g : ι → α →₀ M} {h : α → M → N},
  (∀ (a : α), h a 0 = 0) →
    (∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂) → ∑ i ∈ s, (g i).sum h = (∑ i ∈ s, g i).sum h

theorem Finsupp.prod_finsetSum_index E1 #

∀ {α : Type u_1} {ι : Type u_2} {M : Type u_8} {N : Type u_10} [inst : AddCommMonoid M] [inst_1 : CommMonoid N]
  {s : Finset ι} {g : ι → α →₀ M} {h : α → M → N},
  (∀ (a : α), h a 0 = 1) →
    (∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂) → ∏ i ∈ s, (g i).prod h = (∑ i ∈ s, g i).prod h

theorem Finsupp.prod_sum_index E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} {P : Type u_11} [inst : Zero M]
  [inst_1 : AddCommMonoid N] [inst_2 : CommMonoid P] {f : α →₀ M} {g : α → M → β →₀ N} {h : β → N → P},
  (∀ (a : β), h a 0 = 1) →
    (∀ (a : β) (b₁ b₂ : N), h a (b₁ + b₂) = h a b₁ * h a b₂) → (f.sum g).prod h = f.prod fun a b ↦ (g a b).prod h

theorem Finsupp.sum_sum_index E1 #

∀ {α : Type u_1} {β : Type u_7} {M : Type u_8} {N : Type u_10} {P : Type u_11} [inst : Zero M]
  [inst_1 : AddCommMonoid N] [inst_2 : AddCommMonoid P] {f : α →₀ M} {g : α → M → β →₀ N} {h : β → N → P},
  (∀ (a : β), h a 0 = 0) →
    (∀ (a : β) (b₁ b₂ : N), h a (b₁ + b₂) = h a b₁ + h a b₂) → (f.sum g).sum h = f.sum fun a b ↦ (g a b).sum h

theorem Finsupp.multiset_sum_sum_index E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid N]
  (f : Multiset (α →₀ M)) (h : α → M → N),
  (∀ (a : α), h a 0 = 0) →
    (∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂) → f.sum.sum h = (Multiset.map (fun g ↦ g.sum h) f).sum

theorem Finsupp.support_sum_eq_biUnion E1 #

∀ {α : Type u_16} {ι : Type u_17} {M : Type u_18} [inst : DecidableEq α] [inst_1 : AddCommMonoid M] {g : ι → α →₀ M}
  (s : Finset ι),
  (∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support) →
    (∑ i ∈ s, g i).support = s.biUnion fun i ↦ (g i).support

theorem Finsupp.multiset_map_sum E1 #

∀ {α : Type u_1} {γ : Type u_3} {β : Type u_7} {M : Type u_8} [inst : Zero M] {f : α →₀ M} {m : β → γ}
  {h : α → M → Multiset β}, Multiset.map m (f.sum h) = f.sum fun a b ↦ Multiset.map m (h a b)

theorem Finsupp.multiset_sum_sum E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M}
  {h : α → M → Multiset N}, (f.sum h).sum = f.sum fun a b ↦ (h a b).sum

theorem Finsupp.prod_add_index_of_disjoint E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] {f1 f2 : α →₀ M},
  Disjoint f1.support f2.support →
    ∀ {β : Type u_16} [inst_1 : CommMonoid β] (g : α → M → β), (f1 + f2).prod g = f1.prod g * f2.prod g

For disjoint f1 and f2, and function g, the product of the products of g over f1 and f2 equals the product of g over f1 + f2

theorem Finsupp.sum_add_index_of_disjoint E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] {f1 f2 : α →₀ M},
  Disjoint f1.support f2.support →
    ∀ {β : Type u_16} [inst_1 : AddCommMonoid β] (g : α → M → β), (f1 + f2).sum g = f1.sum g + f2.sum g

For disjoint f1 and f2, and function g, the sum of the sums of g over f1 and f2 equals the sum of g over f1 + f2

theorem Finsupp.prod_dvd_prod_of_subset_of_dvd E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {f1 f2 : α →₀ M}
  {g1 g2 : α → M → N}, f1.support ⊆ f2.support → (∀ a ∈ f1.support, g1 a (f1 a) ∣ g2 a (f2 a)) → f1.prod g1 ∣ f2.prod g2

theorem Finsupp.indicator_eq_sum_attach_single E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] {s : Finset α} (f : (a : α) → a ∈ s → M),
  Finsupp.indicator s f = ∑ x ∈ s.attach, fun₀ | ↑x => f ↑x ⋯

theorem Finsupp.indicator_eq_sum_single E1 #

∀ {α : Type u_1} {M : Type u_8} [inst : AddCommMonoid M] (s : Finset α) (f : α → M),
  (Finsupp.indicator s fun x x_1 ↦ f x) = ∑ x ∈ s, fun₀ | x => f x

theorem Finsupp.sum_indicator_index_eq_sum_attach E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {s : Finset α}
  (f : (a : α) → a ∈ s → M) {h : α → M → N},
  (∀ a ∈ s, h a 0 = 0) → (Finsupp.indicator s f).sum h = ∑ x ∈ s.attach, h (↑x) (f ↑x ⋯)

theorem Finsupp.prod_indicator_index_eq_prod_attach E0 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {s : Finset α}
  (f : (a : α) → a ∈ s → M) {h : α → M → N},
  (∀ a ∈ s, h a 0 = 1) → (Finsupp.indicator s f).prod h = ∏ x ∈ s.attach, h (↑x) (f ↑x ⋯)

theorem Finsupp.sum_indicator_index E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {s : Finset α} (f : α → M)
  {h : α → M → N}, (∀ a ∈ s, h a 0 = 0) → (Finsupp.indicator s fun x x_1 ↦ f x).sum h = ∑ x ∈ s, h x (f x)

theorem Finsupp.prod_indicator_index E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {s : Finset α} (f : α → M)
  {h : α → M → N}, (∀ a ∈ s, h a 0 = 1) → (Finsupp.indicator s fun x x_1 ↦ f x).prod h = ∏ x ∈ s, h x (f x)

theorem Finsupp.prod_mul_eq_prod_mul_of_exists E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : CommMonoid N] {f : α →₀ M} {g : α → M → N}
  {n₁ n₂ : N}, ∀ a ∈ f.support, g a (f a) * n₁ = g a (f a) * n₂ → f.prod g * n₁ = f.prod g * n₂

theorem Finsupp.sum_add_eq_sum_add_of_exists E1 #

∀ {α : Type u_1} {M : Type u_8} {N : Type u_10} [inst : Zero M] [inst_1 : AddCommMonoid N] {f : α →₀ M} {g : α → M → N}
  {n₁ n₂ : N}, ∀ a ∈ f.support, g a (f a) + n₁ = g a (f a) + n₂ → f.sum g + n₁ = f.sum g + n₂

theorem Finset.sum_apply' E1 #

∀ {α : Type u_1} {ι : Type u_2} {A : Type u_4} [inst : AddCommMonoid A] {s : Finset α} {f : α → ι →₀ A} (i : ι),
  (∑ k ∈ s, f k) i = ∑ k ∈ s, (f k) i

theorem Finsupp.sum_apply' E1 #

∀ {ι : Type u_2} {γ : Type u_3} {A : Type u_4} {B : Type u_5} [inst : AddCommMonoid A] [inst_1 : AddCommMonoid B]
  (g : ι →₀ A) (k : ι → A → γ → B) (x : γ), g.sum k x = g.sum fun i b ↦ k i b x

theorem Finsupp.sum_apply'' E1 #

∀ {ι : Type u_2} {γ : Type u_3} {B : Type u_5} [inst : AddCommMonoid B] {A : Type u_16} {F : Type u_17}
  [inst_1 : AddZeroClass A] [inst_2 : AddCommMonoid F] [inst_3 : FunLike F γ B] (g : ι →₀ A) (k : ι → A → F) (x : γ),
  0 x = 0 → (∀ (f g : F), (f + g) x = f x + g x) → (g.sum k) x = g.sum fun i a ↦ (k i a) x

Version of Finsupp.sum_apply' that applies in large generality to linear combinations of functions in any FunLike type on which addition is defined pointwise.

At the time of writing Mathlib does not have a typeclass to express the condition that addition on a FunLike type is pointwise; hence this is asserted via explicit hypotheses.

theorem Finsupp.sum_mul E1 #

∀ {α : Type u_1} {M : Type u_8} {S : Type u_15} [inst : Zero M] [inst_1 : NonUnitalNonAssocSemiring S] (b : S)
  (s : α →₀ M) {f : α → M → S}, s.sum f * b = s.sum fun a c ↦ f a c * b

theorem Finsupp.mul_sum E1 #

∀ {α : Type u_1} {M : Type u_8} {S : Type u_15} [inst : Zero M] [inst_1 : NonUnitalNonAssocSemiring S] (b : S)
  (s : α →₀ M) {f : α → M → S}, b * s.sum f = s.sum fun a c ↦ b * f a c

theorem Multiset.card_finsuppSum E0 #

∀ {α : Type u_1} {ι : Type u_2} {M : Type u_8} [inst : Zero M] (f : ι →₀ M) (g : ι → M → Multiset α),
  (f.sum g).card = f.sum fun i m ↦ (g i m).card

theorem Nat.prod_pow_pos_of_zero_notMem_support E1 #

∀ {f : ℕ →₀ ℕ}, 0 ∉ f.support → 0 < f.prod fun x1 x2 ↦ x1 ^ x2

If 0 : ℕ is not in the support of f : ℕ →₀ ℕ then 0 < ∏ x ∈ f.support, x ^ (f x).

theorem MulOpposite.op_finsuppSum E1 #

∀ {ι : Type u_16} {M : Type u_17} {N : Type u_18} [inst : AddCommMonoid M] [inst_1 : Zero N] (f : ι →₀ N)
  (g : ι → N → M), MulOpposite.op (f.sum g) = f.sum fun i n ↦ MulOpposite.op (g i n)

theorem MulOpposite.unop_finsuppSum E1 #

∀ {ι : Type u_16} {M : Type u_17} {N : Type u_18} [inst : AddCommMonoid M] [inst_1 : Zero N] (f : ι →₀ N)
  (g : ι → N → Mᵐᵒᵖ), MulOpposite.unop (f.sum g) = f.sum fun i n ↦ MulOpposite.unop (g i n)

theorem AddOpposite.op_finsuppProd E0 #

∀ {ι : Type u_16} {M : Type u_17} {N : Type u_18} [inst : CommMonoid M] [inst_1 : Zero N] (f : ι →₀ N) (g : ι → N → M),
  AddOpposite.op (f.prod g) = f.prod fun i n ↦ AddOpposite.op (g i n)

theorem AddOpposite.unop_finsuppProd E0 #

∀ {ι : Type u_16} {M : Type u_17} {N : Type u_18} [inst : CommMonoid M] [inst_1 : Zero N] (f : ι →₀ N)
  (g : ι → N → Mᵐᵒᵖ), AddOpposite.unop (f.prod g) = f.prod fun i n ↦ AddOpposite.unop (g i n)

Deprecated aliases

NameNew nameSince
Finsupp.prod_attach_indexFinset.prod_attach_index2026-11-10
Finsupp.sum_attach_indexFinset.sum_attach_index2026-11-10