Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6 — a tour kkk-optimal for all k≤n/4k\le n/4k≤n/4 with LOCALOPT/OPTIMAL =2(1−1/n)= 2(1-1/n)=2(1−1/n)

Proved
TSPHeuristics.KOpt.theorem_6_k_optimal_ratio_two_mul_one_sub_inv

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

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

For each n≥8n\ge 8n≥8 there is a traveling salesman graph on nnn nodes with OPTIMAL>0\mathrm{OPTIMAL}>0OPTIMAL>0 having a tour that is kkk-optimal for every k≤n/4k\le n/4k≤n/4 and whose length LOCALOPT satisfies

LOCALOPTOPTIMAL=2(1−1n).(7.1)\frac{\mathrm{LOCALOPT}}{\mathrm{OPTIMAL}}=2\left(1-\frac1n\right).\qquad(7.1)OPTIMALLOCALOPT​=2(1−n1​).(7.1)

Local optimality under kkk-changes with kkk up to a quarter of the number of cities therefore does not guarantee a ratio better than 2(1−1/n)2(1-1/n)2(1−1/n).

Formalization Note The ratio is multiplied out: tourLength d τ = 2 * (1 - 1/n) * optimal d. 0 < optimal d is the paper's standing assumption (1.1) (p. 564), which excludes the identically zero distance that would make the statement trivial. k≤n/4k\le n/4k≤n/4 is written 4k≤n4k\le n4k≤n for natural kkk; one tour serves every such kkk, as printed. The bound n≥8n\ge 8n≥8 is the printed one.

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

theorem theorem_6_k_optimal_ratio_two_mul_one_sub_inv (n : ℕ) (hn : 8 ≤ n) :
    ∃ d : Fin n → Fin n → ℝ, TSPHeuristics.Shared.IsTSPDist d ∧ 0 < TSPHeuristics.Shared.optimal d ∧
      ∃ τ : Equiv.Perm (Fin n), (∀ k : ℕ, 4 * k ≤ n → IsKOptimalTour d k τ) ∧
        TSPHeuristics.Shared.tourLength d τ = 2 * (1 - 1 / (n : ℝ)) * TSPHeuristics.Shared.optimal d := 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. 579, Theorem 6, (7.1); proof pp. 579–581
Read-back

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

Hypothesis. n≥8n \ge 8n≥8.

Claim. There exist a real-valued function ddd on ordered pairs of nodes in {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1} and a permutation τ\tauτ such that:

  1. IsTSPDist(d)\mathrm{IsTSPDist}(d)IsTSPDist(d) holds;
  2. 0<optimal(d)0 < \mathrm{optimal}(d)0<optimal(d);
  3. for every natural number kkk with 4k≤n4k \le n4k≤n, τ\tauτ is kkk-optimal for ddd; that is, for every permutation σ\sigmaσ,
∣E(τ)∖E(σ)∣=k ⟹ tourLengthd(τ)≤tourLengthd(σ),\bigl|E(\tau)\setminus E(\sigma)\bigr| = k \ \Longrightarrow\ \mathrm{tourLength}_d(\tau) \le \mathrm{tourLength}_d(\sigma),​E(τ)∖E(σ)​=k ⟹ tourLengthd​(τ)≤tourLengthd​(σ),

where E(⋅)E(\cdot)E(⋅) is the set of unordered pairs {π(i),π(i+1 mod n)}\{\pi(i), \pi(i+1 \bmod n)\}{π(i),π(i+1modn)}; 4. the tour length satisfies

tourLengthd(τ)=2(1−1n) optimal(d).\mathrm{tourLength}_d(\tau) = 2\Bigl(1-\frac{1}{n}\Bigr)\,\mathrm{optimal}(d).tourLengthd​(τ)=2(1−n1​)optimal(d).

Undisplayed definitions. ddd is only asserted to exist; it is not specified. IsTSPDist\mathrm{IsTSPDist}IsTSPDist, optimal\mathrm{optimal}optimal and tourLength\mathrm{tourLength}tourLength come from a shared module whose code is not included here. Their content cannot be stated from this code.

Degenerate cases.

  • n≥8n \ge 8n≥8 excludes small nnn, so 1/n1/n1/n is an ordinary reciprocal.
  • k=0k = 0k=0 is among the required values, as are all values up to ⌊n/4⌋\lfloor n/4 \rfloor⌊n/4⌋.
  • The ratio is an exact equality, not an inequality.
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).

  • Endorsed by Community (Bot) · Oct 30, 2026

    Confirmed by the moderator at approval.

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