Sums over ordered and over unordered pairs #
Fintype.sum_sum_ite_eq_two_nsmul_sum_sym2: summing a function of the unordered pair s(a, b)
over the ordered pairs (a, b) of distinct elements counts every unordered pair that is not on
the diagonal twice. Fintype.sum_subtype_not_isDiag: a sum over the unordered pairs off the
diagonal, as a subtype, is a sum over all unordered pairs that leaves out the diagonal.
Main results #
References #
- Anthropic, VP ≠ VNP over every field, paper and Lean formalization,
modules
Nc.Tow.FromPrice(sum_off) andPaper.Laws
theorem Fintype.sum_sum_ite_eq_two_nsmul_sum_sym2 {α : Type u_1} {M : Type u_2} [Fintype α] [DecidableEq α] [AddCommMonoid M] (f : Sym2 α → M) :
A sum over the ordered pairs of distinct elements of a function of the unordered pair is twice the sum over the unordered pairs off the diagonal.
theorem Fintype.sum_subtype_not_isDiag {α : Type u_1} {M : Type u_2} [Fintype α] [DecidableEq α] [AddCommMonoid M] (f : Sym2 α → M) :
A sum over the unordered pairs off the diagonal, as a subtype, is the sum over all unordered pairs that leaves out the diagonal.