Module docstring
{"# Finsupp.sum and Finsupp.prod over Fin
This file contains theorems relevant to big operators in finitely supported functions over Fin.
"}
{"# Finsupp.sum and Finsupp.prod over Fin
This file contains theorems relevant to big operators in finitely supported functions over Fin.
"}
Finsupp.sum_cons
theorem
[AddCommMonoid M] (n : ℕ) (σ : Fin n →₀ M) (i : M) : (sum (cons i σ) fun _ e ↦ e) = i + sum σ (fun _ e ↦ e)
lemma sum_cons [AddCommMonoid M] (n : ℕ) (σ : FinFin n →₀ M) (i : M) :
(sum (cons i σ) fun _ e ↦ e) = i + sum σ (fun _ e ↦ e) := by
rw [sum_fintype _ _ (fun _ => rfl), sum_fintype _ _ (fun _ => rfl)]
exact Fin.sum_cons i σ
Finsupp.sum_cons'
theorem
[Zero M] [AddCommMonoid N] (n : ℕ) (σ : Fin n →₀ M) (i : M) (f : Fin (n + 1) → M → N) (h : ∀ x, f x 0 = 0) :
(sum (Finsupp.cons i σ) f) = f 0 i + sum σ (Fin.tail f)
lemma sum_cons' [Zero M] [AddCommMonoid N] (n : ℕ) (σ : FinFin n →₀ M) (i : M)
(f : Fin (n+1) → M → N) (h : ∀ x, f x 0 = 0) :
(sum (Finsupp.cons i σ) f) = f 0 i + sum σ (Fin.tail f) := by
rw [sum_fintype _ _ (fun _ => by apply h), sum_fintype _ _ (fun _ => by apply h)]
simp_rw [Fin.sum_univ_succ, cons_zero, cons_succ]
congr