Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 6 — TnT_nTn​ is the shortest even tour, so any tour improving on TnT_nTn​ is odd

Proved
TSPHeuristics.KOpt.theorem_6_proof_shortest_even_tour

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≥6n\ge 6n≥6 and consider the circle graph (Nn,dn)(N_n,d_n)(Nn​,dn​) and the subtour TnT_nTn​ of the proof of Theorem 5. Then

  1. for every tour TTT, at most one unit edge e∈Ene\in E_ne∈En​ has COUNT(e,T)=0\mathrm{COUNT}(e,T)=0COUNT(e,T)=0;
  2. every even tour TTT is at least as long as TnT_nTn​: ℓ(Tn)≤L(T)\ell(T_n)\le L(T)ℓ(Tn​)≤L(T);
  3. every tour TTT with L(T)<ℓ(Tn)L(T)<\ell(T_n)L(T)<ℓ(Tn​) is odd.

Item 2 is "TnT_nTn​ is the shortest even tour" (TnT_nTn​ has one unit edge of count 000 and all others of count 222, (7.2)–(7.3)); item 3 is its consequence together with the odd/even dichotomy.

Formalization Note TnT_nTn​ is the list circleSubtour n n; tours are permutations. COUNT uses the canonical arc of UnitEdgeCount. The counts (7.2)–(7.3) of TnT_nTn​ itself are not stated; item 2 states the length comparison they are used for.

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

theorem theorem_6_proof_shortest_even_tour (n : ℕ) (hn : 6 ≤ n) :
    (∀ (τ : Equiv.Perm (Fin n)) (e e' : Fin n),
        unitCount τ e = 0 → unitCount τ e' = 0 → e = e') ∧
      (∀ τ : Equiv.Perm (Fin n), (∀ e : Fin n, Even (unitCount τ e)) →
        TSPHeuristics.Shared.cycleLength (cycDist n) (circleSubtour n n) ≤ TSPHeuristics.Shared.tourLength (cycDist n) τ) ∧
      (∀ τ : Equiv.Perm (Fin n),
        TSPHeuristics.Shared.tourLength (cycDist n) τ < TSPHeuristics.Shared.cycleLength (cycDist n) (circleSubtour n n) →
          ∀ 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, paragraph 'For any tour T, there can be only one edge e in E_n such that COUNT(e, T) = 0 …'
Read-back

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

Hypothesis. n≥6n \ge 6n≥6.

Objects.

  • dnd_ndn​ is the circular distance on {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}.
  • C=TnC = T_nC=Tn​ is the list 000, then the odd nodes increasing, then the nonzero even nodes decreasing.
  • COUNT(e,τ)\mathrm{COUNT}(e,\tau)COUNT(e,τ) is the unit-edge count defined through the canonical arcs. With endpoints a<ba < ba<b, the arc covers a≤e<ba \le e < ba≤e<b if 2(b−a)≤n2(b-a) \le n2(b−a)≤n, and e<ae < ae<a or e≥be \ge be≥b otherwise.
  • cycleLength\mathrm{cycleLength}cycleLength and tourLength\mathrm{tourLength}tourLength come from a shared module whose code is not included here.

Claim. All three of the following hold:

  1. For every permutation τ\tauτ, at most one unit edge has COUNT(e,τ)=0\mathrm{COUNT}(e,\tau) = 0COUNT(e,τ)=0.
  2. For every permutation τ\tauτ with every count even:
cycleLengthdn(C)≤tourLengthdn(τ).\mathrm{cycleLength}_{d_n}(C) \le \mathrm{tourLength}_{d_n}(\tau).cycleLengthdn​​(C)≤tourLengthdn​​(τ).
  1. For every permutation τ\tauτ with tourLengthdn(τ)<cycleLengthdn(C)\mathrm{tourLength}_{d_n}(\tau) < \mathrm{cycleLength}_{d_n}(C)tourLengthdn​​(τ)<cycleLengthdn​​(C), every count COUNT(e,τ)\mathrm{COUNT}(e,\tau)COUNT(e,τ) is odd.

Degenerate cases.

  • Small nnn is excluded by n≥6n \ge 6n≥6.
  • Part 1 does not claim that any zero count exists; it only rules out two.
  • Part 2 uses the non-strict ≤\le≤, and part 3 uses the strict <<<.
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