Theorem 3 — every insertion method gives INSERT ≤ (⌈lg n⌉ + 1)·OPTIMAL
ProvedTSPHeuristics.Insertion.insert_le_clog_add_one_mul_optimalLet be a traveling salesman graph with nodes (symmetric, nonnegative distances satisfying the triangle inequality). Let be the subtours of any insertion method: is a single node , and each is obtained from by inserting some node at a position that minimizes the increase in length. Let INSERT be the length of the final tour and OPTIMAL the length of a shortest tour. Then
The bound holds regardless of how the nodes are selected and how ties between insertion positions are broken. It places every insertion heuristic (nearest, cheapest, farthest, random, arbitrary insertion) within a logarithmic factor of optimal.
Formalization Note Subtours are lists of nodes; the closed length of a list is . The paper's 1-based subtour index is kept: , and is the final tour. Every choice of the inserted nodes and every minimizing insertion position is allowed. is assumed as a normalization (not in the paper; it never enters a length). The paper's ratio is stated multiplied out, so the case OPTIMAL (which the paper excludes by (1.1)) needs no separate hypothesis. is Nat.clog 2 n.
import Mathlib import Definitions.Def_TSPHeuristics_Shared_TSPModel import Definitions.Def_TSPHeuristics_Insertion_InsertionMethod
namespace TSPHeuristics.Insertion
/-- Theorem 3, (3.6), p. 571: for a traveling salesman graph with `n` nodes, every tour
produced by an insertion method (any choice of the inserted nodes, any minimizing insertion
position) has length `INSERT ≤ (⌈lg n⌉ + 1) · OPTIMAL`. -/
theorem insert_le_clog_add_one_mul_optimal {n : ℕ} (hn : 1 ≤ n) (d : Fin n → Fin n → ℝ)
(hd : TSPHeuristics.Shared.IsTSPDist d) (T : ℕ → List (Fin n)) (a : ℕ → Fin n) (hrun : IsInsertionRun d T a) :
TSPHeuristics.Shared.cycleLength d (T n) ≤ ((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
Here is a natural number with , and the nodes are (written below). The statement fixes these data:
- , a real-valued function on ordered pairs of nodes. Nothing here requires it to be symmetric, nonnegative, zero on the diagonal or to satisfy the triangle inequality. Any such conditions come only from hypothesis (H1).
- , a sequence of finite lists of nodes, indexed by all natural numbers . A list may repeat nodes or be empty.
- , a sequence of nodes, also indexed by all natural numbers.
It assumes two hypotheses:
- (H1) satisfies the predicate
IsTSPDistfrom the imported bundleTSPHeuristics.Shared. - (H2) The triple satisfies the predicate
IsInsertionRunfrom the imported bundleTSPHeuristics.Insertion.
The code of these two predicates, and of the functions cycleLength and optimal below, is not part of the text given to this read-back. So their meaning cannot be unfolded here. Everything the statement says about "distance", "insertion run", "cycle length" and "optimal" is exactly whatever those definitions say, and nothing more.
The conclusion is an inequality about the list at index exactly (the number of nodes). Let be the real number returned by cycleLength for the matrix and a list , and let be the real number returned by optimal for . The statement asserts:
Here is the integer Nat.clog 2 n: the least natural number with , converted to a real number. The claim holds for every , and that satisfy (H1) and (H2). No other hypothesis is imposed:
- It says nothing about the lists for , except through (H2).
- It says nothing about the node sequence , except through (H2).
- It does not itself say that visits each node exactly once. Whether that holds depends entirely on (H2).
The inequality is non-strict ().
Degenerate cases.
- : excluded by the hypothesis .
- : , so the factor is and the claim is .
- : the factor is .
- Powers of two: for the factor is . For strictly between and it is also , because the logarithm is rounded up.
- Sign of : if can be negative or zero, the claim bounds by a nonpositive number. Whether that can happen depends on the unseen definitions of
IsTSPDistandoptimal. - Default values: if
optimalis defined as an infimum or minimum that can hit a default value (for example an infimum over an empty or unbounded-below set, which gives for real numbers), the right-hand side is that default times the factor. The same applies tocycleLengthon short or empty lists; for instance, a one-node or empty list may get length by convention. - Unsatisfiable hypotheses: if (H1) or (H2) cannot be satisfied for some , the statement is vacuously true for that . Whether that happens cannot be determined from the code shown here.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.
Confirmed by the moderator at approval.