Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4.20 — ∑j=1g−1(g−j)1{j−k odd}=14(g(g−1)+g(−1)k)\sum_{j=1}^{g-1}(g-j)\mathbb 1\{j-k\text{ odd}\}=\frac14(g(g-1)+g(-1)^k)∑j=1g−1​(g−j)1{j−k odd}=41​(g(g−1)+g(−1)k)

Proved
TSPSDPGap.lemma_4_20

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

integrality-gapp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1semidefinite-programmingtraveling-salesman

Let ggg be even. For every integer kkk,

∑j=1g−1(g−j) 1{j−k odd}=14(g(g−1)+g(−1)k).\sum_{j=1}^{g-1}(g-j)\,\mathbb 1\{j-k\ \text{odd}\}=\frac14\Bigl(g(g-1)+g(-1)^k\Bigr).j=1∑g−1​(g−j)1{j−k odd}=41​(g(g−1)+g(−1)k).

It evaluates the bound of Lemma 4.19 summed against the weights g−jg-jg−j in Proposition 4.14.

Differences from the source:

  • generalization: k ∈ {1, …, n − 1} (the lemma's use in Proposition 4.14) → every integer k; reason: the printed lemma states no range for k; specializes to the paper's use
Preamble
import Mathlib
Formal statement
namespace TSPSDPGap

/-- **Lemma 4.20: a weighted parity count.**
Gutekunst & Williamson, *SDP Relaxations of the TSP and Their Integrality Gaps*,
arXiv:1907.09054v1, Lemma 4.20, p.24:
"For g even, Σ_{j=1}^{g−1} (g − j)𝟙{j−k odd} = ¼(g(g − 1) + g(−1)^k)."

**Formalization Note.** For every even natural `g` and every integer `k`; `Σ_{j=1}^{g−1}` is the
sum over `Finset.Ico 1 g`, arithmetic in `ℝ`, `(−1)^k` an integer power. -/
theorem lemma_4_20 (g : ℕ) (hg : Even g) (k : ℤ) :
    ∑ j ∈ Finset.Ico 1 g, ((g : ℝ) - j) * (if Odd ((j : ℤ) - k) then (1 : ℝ) else 0) =
      ((g : ℝ) * ((g : ℝ) - 1) + (g : ℝ) * (-1 : ℝ) ^ k) / 4 := by sorry

end TSPSDPGap
Source
Gutekunst & Williamson, SDP Relaxations of the TSP and Their Integrality Gaps, arXiv:1907.09054v1, Lemma 4.20, p.24
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me