Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix A, p. 205 — the Steiner path connecting two nodes is the shortest path

Proved
DreyfusWagner.Steiner.steinerLength_pair_eq_pathDist

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

graph-theoryp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1shortest-pathsteiner-tree

Let G=(N,A)G = (N, A)G=(N,A) be a finite connected undirected graph whose arcs have positive lengths, and let i,j∈Ni, j \in Ni,j∈N. Then the Steiner length of the two-node set {i,j}\{i, j\}{i,j} equals the shortest-path length between them:

St⁡({i,j})=D(i,j).\operatorname{St}(\{i, j\}) = D(i, j).St({i,j})=D(i,j).

For i=ji = ji=j both sides are 000.

This is the base case of the Dreyfus–Wagner recursion: line (3) of Algorithm A initialises the table on singletons {t}\{t\}{t} with the shortest-path lengths D(t,J)D(t, J)D(t,J), which are the Steiner lengths of the pairs {t,J}\{t, J\}{t,J}.

Preamble
import Mathlib
import Definitions.Def_DreyfusWagner_Steiner_SteinerProblem
Formal statement
namespace DreyfusWagner.Steiner

/-- Dreyfus–Wagner 1971, Appendix A, p. 205: the Steiner path connecting two nodes is the
shortest path between them, so its length is `D(i,j)`. -/
theorem steinerLength_pair_eq_pathDist {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (ℓ : Sym2 V → ℝ)
    (hpos : ∀ e ∈ G.edgeSet, 0 < ℓ e) (hconn : G.Connected) (i j : V) :
    steinerLength G ℓ {i, j} = pathDist G ℓ i j := by sorry

end DreyfusWagner.Steiner
Source
Dreyfus, Wagner, The Steiner Problem in Graphs, Networks 1 (1971), p. 205, Appendix A, second paragraph (last two sentences before 'First we insert some definitions')
Read-back

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

Let VVV be a finite node type with decidable equality, GGG a connected simple graph on VVV with edge set AAA, and ℓ\ellℓ a length function on unordered pairs with ℓ(e)>0\ell(e) > 0ℓ(e)>0 for every e∈Ae \in Ae∈A. The statement says that for all nodes i,ji, ji,j:

StG,ℓ({i,j})=DG,ℓ(i,j).\mathrm{St}_{G,\ell}(\{i,j\}) = D_{G,\ell}(i,j).StG,ℓ​({i,j})=DG,ℓ​(i,j).

Both sides lie in R∪{∞}\mathbb{R} \cup \{\infty\}R∪{∞}.

  • The left side is the minimum of ∑e∈Sℓ(e)\sum_{e \in S} \ell(e)∑e∈S​ℓ(e) over all S⊆AS \subseteq AS⊆A in which iii and jjj are joined using only arcs of SSS.
  • The right side is the minimum of the total length ∑ℓ\sum \ell∑ℓ over the arcs of paths in GGG from iii to jjj that repeat no node.

Degenerate cases. When i=ji = ji=j, the set is {i}\{i\}{i}. The left side is then the minimum over all S⊆AS \subseteq AS⊆A, which is 000 (attained by ∅\emptyset∅, since lengths are positive). The right side is the length of the trivial path, also 000. Connectedness of GGG makes both sides finite for every pair.

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