Triangular rearrangement of a double sum
ProvedFinset.sum_filter_le_add_sum_filter_le_swapalgebrafinset
Let be a linearly ordered type and an additive commutative monoid. Let be a finite set of indices and a kernel vanishing on the diagonal, for all . Write for the closed lower slice. Then\n\n
\n\nThe left side adds the lower-triangular sum and its transpose; they overlap exactly on the diagonal where the kernel vanishes, recovering the full double sum. This is the Finset analogue of triangular rearrangements used in polygon area estimates.\n\nFormalization Note Lean states the slices with Finset.filter; no integrability or finiteness beyond Finset is needed.
Preamble
import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.BigOperators.Group.Finset.Sigma open Finset
Formal statement
namespace Finset
variable {ι M : Type*} [LinearOrder ι] [AddCommMonoid M]
theorem sum_filter_le_add_sum_filter_le_swap (s : Finset ι) (f : ι → ι → M) (hdiag : ∀ x, f x x = 0) : ((∑ t ∈ s, ∑ u ∈ s.filter (fun u ↦ u ≤ t), f u t) + ∑ t ∈ s, ∑ u ∈ s.filter (fun u ↦ u ≤ t), f t u) = ∑ x ∈ s, ∑ y ∈ s, f x y := by sorry
end FinsetSource