§2, pp. 199–200 — the recurrence
ProvedDreyfusWagner.Steiner.steinerLength_recurrenceLet be a finite connected undirected graph whose arcs have positive lengths, let be the shortest-path length from to , and let be the Steiner length of a node set . Let have at least two nodes and let be any node. For put
the best way of joining the two parts of a splitting of into nonempty disjoint sets , at the node . Then
This is the dynamic-programming recurrence of Dreyfus and Wagner: the Steiner length for a terminal set of size is obtained from shortest-path lengths and Steiner lengths of terminal sets of size at most . The node may belong to .
import Mathlib import Definitions.Def_DreyfusWagner_Steiner_SteinerProblem
namespace DreyfusWagner.Steiner
/-- Dreyfus–Wagner 1971, §2, pp. 199–200: for a set `D` of at least two nodes and any node `m`,
the Steiner length of `{m} ∪ D` is `min_k (d_mk + S_k(D))`, where
`S_k(D)` is the minimum, over all splittings of `D` into two nonempty disjoint parts `E` and
`F = D − E`, of the Steiner lengths of `{k} ∪ E` and `{k} ∪ F` added together. -/
theorem steinerLength_recurrence {V : Type*} [Fintype V] [DecidableEq V]
(G : SimpleGraph V) [DecidableRel G.Adj] (ℓ : Sym2 V → ℝ)
(hpos : ∀ e ∈ G.edgeSet, 0 < ℓ e) (hconn : G.Connected)
(D : Finset V) (hD : 2 ≤ D.card) (m : V) :
steinerLength G ℓ (insert m D) =
Finset.univ.inf fun k => pathDist G ℓ m k +
(D.powerset.filter fun E => E.Nonempty ∧ E ≠ D).inf fun E =>
steinerLength G ℓ (insert k E) + steinerLength G ℓ (insert k (D \ E)) := by sorry
end DreyfusWagner.Steiner
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a finite node type with decidable equality, a connected simple graph on with edge set , and a length function with for every . Here is the minimum total length over arc sets that join every two nodes of using only arcs of . is the minimum total length of a path in from to that repeats no node. The statement says that for every node set with and every node (which may or may not belong to ):
The inner minimum ranges over all nonempty proper subsets of , so each unordered split appears twice, once as and once as . The outer minimum ranges over all nodes of , including and the nodes of .
Degenerate cases. Because , the inner index set is nonempty. Because is connected, all quantities involved are finite. The case is included, and there the left side is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.