Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (2.1) — OPTIMAL ≥ 2 Σ_{i=k+1}^{min(2k,n)} l_i

Proved
TSPHeuristics.Insertion.optimal_ge_two_mul_sum_tail

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

heuristicsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1traveling-salesman

Let (N,d)(N,d)(N,d) be a traveling salesman graph whose nodes are numbered 1,…,n1,\dots,n1,…,n, and let l1≥l2≥⋯≥lnl_1\ge l_2\ge\dots\ge l_nl1​≥l2​≥⋯≥ln​ be real numbers such that d(p,q)≥min⁡(lp,lq)d(p,q)\ge\min(l_p,l_q)d(p,q)≥min(lp​,lq​) for all distinct nodes p,qp,qp,q (condition a) of Lemma 1). Then for every kkk with 1≤k≤n1\le k\le n1≤k≤n,

OPTIMAL ≥ 2∑i=k+1min⁡(2k,n)li.\mathrm{OPTIMAL}\ \ge\ 2\sum_{i=k+1}^{\min(2k,n)} l_i .OPTIMAL ≥ 2i=k+1∑min(2k,n)​li​.

This is the key inequality in the proof of Lemma 1; summing it over k=1,2,4,…k=1,2,4,\dotsk=1,2,4,… yields the logarithmic bound.

Formalization Note Nodes are Fin n (0-based). A traveling salesman graph is IsTSPDist d: symmetric, nonnegative, triangle inequality, plus the normalization d(i,i)=0d(i,i)=0d(i,i)=0, which is not in the paper and does not affect any length, since a loop never enters a tour, subtour or insertion cost. Nodes are numbered 0,…,n−10,\dots,n-10,…,n−1 in Lean, so the paper's range k+1,…,min⁡(2k,n)k+1,\dots,\min(2k,n)k+1,…,min(2k,n) becomes k,…,min⁡(2k,n)−1k,\dots,\min(2k,n)-1k,…,min(2k,n)−1; the ordering li≥ljl_i\ge l_jli​≥lj​ for i≤ji\le ji≤j (the proof's without-loss-of-generality numbering) is the hypothesis that lll is antitone. Condition a) is assumed for distinct nodes only (see Lemma 1).

Preamble
import Mathlib
import Definitions.Def_TSPHeuristics_Shared_TSPModel
import Definitions.Def_TSPHeuristics_Insertion_InsertionMethod
Formal statement
namespace TSPHeuristics.Insertion

/-- (2.1), p. 565: if the numbers `l` are non-increasing in the node label (the WLOG ordering
of the proof of Lemma 1) and satisfy condition a) of Lemma 1, then for every `1 ≤ k ≤ n`,
`OPTIMAL ≥ 2 Σ_{i=k+1}^{min(2k,n)} l_i`. Nodes are 0-based, so the paper's indices
`k+1, …, min(2k, n)` are `k, …, min(2k, n) - 1` here. -/
theorem optimal_ge_two_mul_sum_tail {n : ℕ} (d : Fin n → Fin n → ℝ) (hd : TSPHeuristics.Shared.IsTSPDist d)
    (l : Fin n → ℝ) (hl : Antitone l)
    (ha : ∀ p q, p ≠ q → min (l p) (l q) ≤ d p q) :
    ∀ k : ℕ, 1 ≤ k → k ≤ n →
      2 * ∑ i ∈ Finset.univ.filter (fun i : Fin n => k ≤ i.val ∧ i.val < min (2 * k) n), l i
        ≤ TSPHeuristics.Shared.optimal d := by sorry

end TSPHeuristics.Insertion
Source
Rosenkrantz, Stearns, Lewis, An Analysis of Several Heuristics for the Traveling Salesman Problem, SIAM J. Comput. 6(3), 1977, https://doi.org/10.1137/0206041, p. 565, proof of Lemma 1, eq. (2.1)
Read-back

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

Let nnn be any natural number, with nodes {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}. Let ddd be a real-valued function on pairs of nodes satisfying the imported predicate IsTSPDist(d)\mathrm{IsTSPDist}(d)IsTSPDist(d), whose definition is not shown. Let OPTd\mathrm{OPT}_dOPTd​ denote the imported quantity optimal(d)\mathrm{optimal}(d)optimal(d), also not shown. Let l:{0,…,n−1}→Rl:\{0,\dots,n-1\}\to\mathbb Rl:{0,…,n−1}→R be any real numbers such that:

  • lll is non-increasing in the node label: i≤ji\le ji≤j implies li≥ljl_i\ge l_jli​≥lj​;
  • distinct nodes: for all distinct nodes p≠qp\ne qp=q, min⁡(lp,lq)≤d(p,q)\min(l_p,l_q)\le d(p,q)min(lp​,lq​)≤d(p,q).

No sign condition and no upper bound is placed on lll. The theorem asserts that for every natural number kkk with 1≤k≤n1\le k\le n1≤k≤n,

2∑i nodek≤i<min⁡(2k,n)li  ≤  OPTd.2\sum_{\substack{i\text{ node}\\ k\le i<\min(2k,\,n)}} l_i\;\le\;\mathrm{OPT}_d .2i nodek≤i<min(2k,n)​∑​li​≤OPTd​.

Degenerate cases:

  • n=0n=0n=0: no kkk satisfies 1≤k≤01\le k\le 01≤k≤0, so the statement is vacuous.
  • k=nk=nk=n: the index range n≤i<nn\le i<nn≤i<n is empty. The claim becomes 0≤OPTd0\le\mathrm{OPT}_d0≤OPTd​, so the theorem asserts OPTd≥0\mathrm{OPT}_d\ge 0OPTd​≥0 whenever n≥1n\ge1n≥1 and the hypotheses hold. (Some lll always satisfies them, for example any constant lll that is very negative.)
  • n=1n=1n=1: the distinct-node condition is vacuous, and only k=1k=1k=1 applies, which is the empty-sum case.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

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