AFTD Auto-Formalizing Theoretical Domains

sum_comp_neg

theoremverified

For v : Fin m → ℤ with m > 0, the sum of v(-j) over j equals the sum of v.

Statement

theorem sum_comp_neg {m : ℕ} [NeZero m] (v : Fin m → ℤ) : ∑ j, v (-j) = ∑ j, v j
Source
helper for arXiv:2610.27175 Theorem 5
Verified
22 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1
  • bordered_goethals_seidel_cross_blockIf the first columns a, b, c, d (m > 0) sum to 2, 0, 0, 0, then K Lᵀ + T Mᵀ = 0, where K is the 4 × 4 corner, L the 4m × 4 left border of…

The proof, explained

The identity follows by reindexing the sum using the negation permutation on Fin m. Since negation is an involution and hence a bijection, summing v(-j) over all j is equivalent to summing v(j) over all j.

  1. The sum of v(-j) over Fin m equals the sum of v(j) over Fin m.

    Negation is a bijection (permutation) on Fin m, so reindexing the sum via the equivalence j ↦ -j leaves the value of the sum unchanged by Fintype.sum_equiv.

    line 2

    uses Fintype.sum_equiv, Equiv.neg

      Fintype.sum_equiv (Equiv.neg _) _ _ (fun _ => rfl)
Fintype.sum_equiv
Reindexing a sum over a finite type by an equivalence (bijection) does not change the sum, provided the terms match under the equivalence.
Equiv.neg
The negation map on a type with an involutive negation is a permutation (an equivalence of the type with itself).

Written by a model (gemini-3.8-flash) from the Lean source alone (no goal states were available). Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem sum_comp_neg {m : ℕ} [NeZero m] (v : Fin m → ℤ) : ∑ j, v (-j) = ∑ j, v j :=  Fintype.sum_equiv (Equiv.neg _) _ _ (fun _ => rfl)
See it in the graphDiscuss this resultChallenge it