Documentation

CslibFrontier.Foundations.Algebra.BigOperators.Sym

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 #

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 : α, ∑ b : α, if a = b then 0 else f s(a, b)) = 2 • ∑ q : Sym2 α, if q.IsDiag then 0 else f q

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) :
∑ e : { q : Sym2 α // ¬q.IsDiag }, f ↑e = ∑ q : Sym2 α, if q.IsDiag then 0 else f q

A sum over the unordered pairs off the diagonal, as a subtype, is the sum over all unordered pairs that leaves out the diagonal.