Lemma 2 — inserting k costs at most twice its distance to any node of the subtour
ProvedTSPHeuristics.NearCheap.lemma_2_cost_le_two_mul_distLet be a traveling salesman graph, a subtour (a nonempty list of distinct nodes), a node not in , and a node in . Then
Here is the increase in length when is inserted into at a cheapest position. The lemma is the basic consequence of the triangle inequality on which every bound for insertion methods rests.
Formalization Note The distance satisfies in addition to the paper's axioms (a normalization, see the definition Model).
import Mathlib import Definitions.Def_TSPHeuristics_Shared_Insertion
namespace TSPHeuristics.NearCheap
theorem lemma_2_cost_le_two_mul_dist {n : ℕ} (d : Fin n → Fin n → ℝ) (hd : TSPHeuristics.Shared.IsTSPDist d)
(T : List (Fin n)) (hT : T.Nodup) (hTne : T ≠ []) (k j : Fin n) (hk : k ∉ T) (hj : j ∈ T) :
TSPHeuristics.Shared.insCost d T k ≤ 2 * d k j := by sorry
end TSPHeuristics.NearCheap
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting.
- is a natural number and is the node set.
- is a real-valued function, written .
- is a finite list of nodes.
- and are nodes.
Hypotheses.
- satisfies a predicate
IsTSPDist. It is defined in an imported file whose content is not shown here, so this read-back cannot say which conditions it imposes. - The entries of are pairwise distinct.
- is nonempty.
- does not appear in .
- appears in .
Conclusion. Write for the imported, unshown quantity insCost. The claim is
The inequality is non-strict. The distance is , with first, and not . The bound must hold for every in , not just one.
Degenerate cases. Hypotheses 3 and 5 force . Hypothesis 4 forces some node to lie outside , so . If has exactly one element, then and the claim is . What that cost is for a one-element list depends on the unshown definition of insCost. If IsTSPDist cannot be satisfied for some , the statement is vacuous for that ; that cannot be checked from this code.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.