Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Gˉi\bar G_iGˉi​ is a traveling salesman graph

Proved
TSPHeuristics.NNLower.gbar_isTSPDist

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

p2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1shortest-pathtraveling-salesman

For every i≥1i\ge1i≥1, let Gˉi\bar G_iGˉi​ be the complete graph on the 2i+1−12^{i+1}-12i+1−1 nodes of GiG_iGi​ in which d(a,b)d(a,b)d(a,b) is the length of a minimal path from aaa to bbb in GiG_iGi​. Then ddd is a traveling salesman distance: for all nodes a,b,ca,b,ca,b,c,

d(a,b)=d(b,a),d(a,b)≥0,d(a,c)≤d(a,b)+d(b,c),d(a,a)=0.d(a,b)=d(b,a),\qquad d(a,b)\ge0,\qquad d(a,c)\le d(a,b)+d(b,c),\qquad d(a,a)=0.d(a,b)=d(b,a),d(a,b)≥0,d(a,c)≤d(a,b)+d(b,c),d(a,a)=0.

This is what makes Gˉi\bar G_iGˉi​ an admissible instance for Theorem 2.

Formalization Note The last property is the normalization field of IsTSPDist, not in the paper.

Preamble
import Mathlib
import Definitions.Def_TSPHeuristics_NNLower_TSPModel
import Definitions.Def_TSPHeuristics_NNLower_LowerBoundFamily
Formal statement
namespace TSPHeuristics.NNLower

/-- p. 568: for every `i ≥ 1`, the shortest-path distance of `G_i` makes `Ḡ_i` a traveling
salesman graph (symmetric, nonnegative, zero on the diagonal, triangle inequality). -/
theorem gbar_isTSPDist (i : ℕ) (hi : 1 ≤ i) : IsTSPDist (gbar i) := by sorry

end TSPHeuristics.NNLower
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. 568 ("Therefore, the distances in Ḡ_i satisfy the triangle inequality.")
Read-back

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

Setting.

  • ni=2i+1−1n_i = 2^{i+1} - 1ni​=2i+1−1 is the number of nodes.
  • GiG_iGi​ is a specific list of weighted undirected edges on nodes 0,…,ni−10,\dots,n_i-10,…,ni​−1, built recursively.
  • Gˉi(a,b)=spGi(a,b)\bar G_i(a,b) = \mathrm{sp}_{G_i}(a,b)Gˉi​(a,b)=spGi​​(a,b) for nodes a,b<nia,b < n_ia,b<ni​. Here sp\mathrm{sp}sp is the infimum of total weights of walks from aaa to bbb in GiG_iGi​, with edges usable in either direction. It is set to 000 if no walk exists or the costs are unbounded below.

Claim. For every natural number i≥1i \ge 1i≥1, Gˉi\bar G_iGˉi​ satisfies all four TSP-distance conditions on the nodes {0,…,ni−1}\{0,\dots,n_i-1\}{0,…,ni​−1}:

  • Symmetry: Gˉi(a,b)=Gˉi(b,a)\bar G_i(a,b) = \bar G_i(b,a)Gˉi​(a,b)=Gˉi​(b,a).
  • Nonnegativity: Gˉi(a,b)≥0\bar G_i(a,b) \ge 0Gˉi​(a,b)≥0.
  • Triangle inequality: Gˉi(a,c)≤Gˉi(a,b)+Gˉi(b,c)\bar G_i(a,c) \le \bar G_i(a,b) + \bar G_i(b,c)Gˉi​(a,c)≤Gˉi​(a,b)+Gˉi​(b,c).
  • Zero diagonal: Gˉi(a,a)=0\bar G_i(a,a) = 0Gˉi​(a,a)=0.

Degenerate cases. The case i=0i = 0i=0 is excluded, so nothing is claimed about the one-node, self-loop-only G0G_0G0​. The claim does not state that GiG_iGi​ is connected. However, if two nodes had no walk between them, their distance would be the default value 000, and the triangle inequality asserted here constrains such values too.

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