Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 5: TnT_nTn​ has length 2(n−1)2(n-1)2(n−1) and OPTIMAL =n= n=n on the circle

Proved
TSPHeuristics.KOpt.theorem_5_proof_circle_lengths

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

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

Let n≥6n\ge 6n≥6. On the circle graph (Nn,dn)(N_n,d_n)(Nn​,dn​) the final subtour TnT_nTn​ of the proof of Theorem 5 has two edges of length one and n−2n-2n−2 edges of length two, and the optimal tour visits the nodes in numerical order:

ℓ(Tn)=2(n−1),OPTIMAL=n.\ell(T_n)=2(n-1),\qquad \mathrm{OPTIMAL}=n.ℓ(Tn​)=2(n−1),OPTIMAL=n.

Dividing the two gives the ratio 2(1−1/n)2(1-1/n)2(1−1/n) of Theorem 5, (4.14).

Formalization Note TnT_nTn​ is the list circleSubtour n n (0-based nodes). OPTIMAL is the true minimum over all tours (Finset.inf'), so the second equality asserts both that the numerical-order tour has length nnn and that no tour is shorter.

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

theorem theorem_5_proof_circle_lengths (n : ℕ) (hn : 6 ≤ n) :
    TSPHeuristics.Shared.cycleLength (cycDist n) (circleSubtour n n) = 2 * ((n : ℝ) - 1) ∧
      TSPHeuristics.Shared.optimal (cycDist n) = n := 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. 576, proof of Theorem 5, last paragraph ('We note finally that the approximation T_n has two edges of length one …')
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}: dn(i,j)=0d_n(i,j) = 0dn​(i,j)=0 if i=ji = ji=j, and min⁡(∣i−j∣,n−∣i−j∣)\min(|i-j|, n-|i-j|)min(∣i−j∣,n−∣i−j∣) otherwise.
  • C=TnC = T_nC=Tn​ is the full list: 000, then the odd nodes in increasing order, then the nonzero even nodes in decreasing order. For example, (0,1,3,5,7,6,4,2)(0,1,3,5,7,6,4,2)(0,1,3,5,7,6,4,2) when n=8n = 8n=8.

Claim. Both of the following hold:

cycleLengthdn(C)=2(n−1)andoptimal(dn)=n.\mathrm{cycleLength}_{d_n}(C) = 2(n-1) \qquad\text{and}\qquad \mathrm{optimal}(d_n) = n.cycleLengthdn​​(C)=2(n−1)andoptimal(dn​)=n.

cycleLength\mathrm{cycleLength}cycleLength and optimal\mathrm{optimal}optimal come from a shared module whose code is not included here. Their exact meaning cannot be read off this code. For example, the code does not show whether optimal\mathrm{optimal}optimal is a minimum over all tours, or what it returns in degenerate situations.

Degenerate cases. Small nnn is excluded by n≥6n \ge 6n≥6. The claim is an exact equality of real numbers.

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