Lemma 1 — Σ l_p ≤ ½(⌈lg n⌉ + 1)·OPTIMAL
ProvedTSPHeuristics.Insertion.lemma_1_sum_le_half_clog_add_one_mul_optimalLet be a traveling salesman graph with nodes, and assign to each node a real number such that
- for all distinct nodes and , and
- for all nodes .
Then
where is the logarithm to base 2 and the least integer .
This lemma is the common engine of the paper's two logarithmic upper bounds: Theorem 1 (nearest neighbor) and Theorem 3 (every insertion method).
Formalization Note Nodes are Fin n (0-based). A traveling salesman graph is IsTSPDist d: symmetric, nonnegative, triangle inequality, plus the normalization , which is not in the paper and does not affect any length, since a loop never enters a tour, subtour or insertion cost. is Nat.clog 2 n (so it is at ). The page states condition 1 "for all nodes and "; with and that would force every and the lemma could no longer be applied in the proofs of Theorems 1 and 3. The proof uses condition 1 only on edges of a tour, whose endpoints are distinct, so it is stated for distinct nodes. No sign condition on is imposed, as on the page.
import Mathlib import Definitions.Def_TSPHeuristics_Shared_TSPModel import Definitions.Def_TSPHeuristics_Insertion_InsertionMethod
namespace TSPHeuristics.Insertion
/-- Lemma 1, p. 565: if `d(p, q) ≥ min(l_p, l_q)` for all distinct nodes `p, q` and
`l_p ≤ OPTIMAL / 2` for all nodes `p`, then `Σ_p l_p ≤ ½(⌈lg n⌉ + 1) OPTIMAL`.
Condition a) is required for distinct nodes only (the page says "for all nodes p and q"; with
`p = q` it would force `l_p ≤ 0`, and the proof applies it only to edges of a tour). -/
theorem lemma_1_sum_le_half_clog_add_one_mul_optimal {n : ℕ} (hn : 1 ≤ n)
(d : Fin n → Fin n → ℝ) (hd : TSPHeuristics.Shared.IsTSPDist d) (l : Fin n → ℝ)
(ha : ∀ p q, p ≠ q → min (l p) (l q) ≤ d p q)
(hb : ∀ p, l p ≤ TSPHeuristics.Shared.optimal d / 2) :
∑ p, l p ≤ (1 / 2) * ((Nat.clog 2 n : ℝ) + 1) * TSPHeuristics.Shared.optimal d := by sorry
end TSPHeuristics.Insertion
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a natural number, with nodes . Let be a real-valued function on pairs of nodes satisfying the imported predicate , whose definition is not shown. Write for the imported quantity , also not shown. Let be any real numbers with no sign condition, satisfying:
- (a) distinct nodes: for all distinct nodes ;
- (b) upper bound: for every node .
No ordering of is assumed. The theorem asserts
Here means the least natural number with , so it is for , for , and for .
Degenerate case:
- : condition (a) is vacuous. The conclusion reads , which is exactly hypothesis (b).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.