Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 6 — every tour on the circle is odd or even

Proved
TSPHeuristics.KOpt.theorem_6_proof_tour_odd_or_even

by mikedeng1 · Sep 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

k-optp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1traveling-salesmanworst-case-example

Let n≥3n\ge 3n≥3. Call a tour TTT of the circle graph (Nn,dn)(N_n,d_n)(Nn​,dn​) even if COUNT(e,T)\mathrm{COUNT}(e,T)COUNT(e,T) is even for every unit edge e∈Ene\in E_ne∈En​, and odd if it is odd for every e∈Ene\in E_ne∈En​. Then every tour is either even or odd.

The reason is (7.5): at each node aaa the two unit edges (a,a+1)(a,a+1)(a,a+1) and (a,a−1)(a,a-1)(a,a−1) have counts summing to twice the number of visits of α(T)\alpha(T)α(T) to aaa, and EnE_nEn​ is connected.

The dichotomy is the key step of Theorem 6: a tour shorter than TnT_nTn​ must switch the parity of every unit edge.

Formalization Note Nodes are 0-based and unit edge eee joins eee and e+1 mod ne+1 \bmod ne+1modn. COUNT uses the canonical arc of UnitEdgeCount. The hypothesis n≥3n\ge 3n≥3 keeps EnE_nEn​ a cycle of nnn distinct edges.

Preamble
import Mathlib
import Definitions.Def_TSPHeuristics_KOpt_UnitEdgeCount
Formal statement
namespace TSPHeuristics.KOpt

theorem theorem_6_proof_tour_odd_or_even (n : ℕ) (hn : 3 ≤ n) (τ : Equiv.Perm (Fin n)) :
    (∀ e : Fin n, Even (unitCount τ e)) ∨ (∀ e : Fin n, Odd (unitCount τ e)) := by sorry

end TSPHeuristics.KOpt
Source
Rosenkrantz, Stearns, Lewis, An Analysis of Several Heuristics for the Traveling Salesman Problem, SIAM J. Comput. 6(3), 1977, p. 580, proof of Theorem 6, definition of odd and even tours and (7.5)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Hypothesis. n≥3n \ge 3n≥3.

Claim. For every permutation τ\tauτ of {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, one of the following holds:

  • every unit edge eee has COUNT(e,τ)\mathrm{COUNT}(e,\tau)COUNT(e,τ) even, or
  • every unit edge eee has COUNT(e,τ)\mathrm{COUNT}(e,\tau)COUNT(e,τ) odd.

Objects. COUNT(e,τ)\mathrm{COUNT}(e,\tau)COUNT(e,τ) is the number of steps kkk for which unit edge eee (joining eee and e+1 mod ne+1 \bmod ne+1modn) lies on the arc assigned to the step τ(k)→τ(k+1 mod n)\tau(k) \to \tau(k+1 \bmod n)τ(k)→τ(k+1modn). With aaa the smaller and bbb the larger endpoint:

  • if 2(b−a)≤n2(b-a) \le n2(b−a)≤n, the arc covers the edges a≤e<ba \le e < ba≤e<b;
  • otherwise it covers the edges e<ae < ae<a or e≥be \ge be≥b.

Degenerate cases. n≤2n \le 2n≤2 is excluded by the hypothesis. Zero counts as even.

Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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