Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Optimal Decomposition Theorem — a Steiner tree splits at a node ppp into Steiner trees for {p,q}\{p,q\}{p,q}, {p}∪D\{p\} \cup D{p}∪D, {p}∪(Y−D−{q})\{p\} \cup (Y - D - \{q\}){p}∪(Y−D−{q})

Proved
DreyfusWagner.Steiner.optimal_decomposition

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

dynamic-programminggraph-theoryp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1steiner-tree

Let G=(N,A)G = (N, A)G=(N,A) be a finite connected undirected graph whose arcs have positive lengths. Let Y⊆NY \subseteq NY⊆N contain at least three nodes, let SSS be a Steiner tree connecting YYY, and let q∈Yq \in Yq∈Y. Then there exist a node p∈Np \in Np∈N and a set D⊆YD \subseteq YD⊆Y such that

  1. DDD is a nonempty proper subset of Y−{q}Y - \{q\}Y−{q};
  2. S=S1∪S2∪S3S = S_1 \cup S_2 \cup S_3S=S1​∪S2​∪S3​ with S1,S2,S3S_1, S_2, S_3S1​,S2​,S3​ pairwise disjoint;
  3. S1S_1S1​ is a Steiner path connecting {p,q}\{p, q\}{p,q}, S2S_2S2​ is a Steiner path connecting {p}∪D\{p\} \cup D{p}∪D, and S3S_3S3​ is a Steiner path connecting {p}∪(Y−D−{q})\{p\} \cup (Y - D - \{q\}){p}∪(Y−D−{q}).

The node ppp need not belong to YYY, may equal qqq (then S1=∅S_1 = \emptysetS1​=∅), and S3S_3S3​ may be empty. In particular

∣S∣=D(p,q)+St⁡({p}∪D)+St⁡({p}∪(Y−D−{q})).|S| = D(p, q) + \operatorname{St}(\{p\} \cup D) + \operatorname{St}(\{p\} \cup (Y - D - \{q\})).∣S∣=D(p,q)+St({p}∪D)+St({p}∪(Y−D−{q})).

This is the structural fact behind the Dreyfus–Wagner dynamic program: an optimal tree for YYY is assembled from a shortest path and two optimal trees for strictly smaller terminal sets meeting at a junction node.

Formalization Note "SSS consists of 3 disjoint subsets" is stated as S=S1∪S2∪S3S = S_1 \cup S_2 \cup S_3S=S1​∪S2​∪S3​ with the three sets pairwise disjoint; no SiS_iSi​ is required to be nonempty and ppp is not required to lie outside YYY, as in the paper's Figures 5 and 6. The hypothesis ∥Y∥≥3\|Y\| \ge 3∥Y∥≥3 is the paper's own (Appendix A, p. 205).

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

/-- Dreyfus–Wagner 1971, Appendix A, Optimal Decomposition Theorem, p. 206 (also §1, p. 197). -/
theorem optimal_decomposition {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (ℓ : Sym2 V → ℝ)
    (hpos : ∀ e ∈ G.edgeSet, 0 < ℓ e) (hconn : G.Connected)
    (Y : Finset V) (S : Finset (Sym2 V)) (hS : IsSteinerTree G ℓ Y S)
    (q : V) (hq : q ∈ Y) (hY : 3 ≤ Y.card) :
    ∃ (p : V) (D : Finset V) (S₁ S₂ S₃ : Finset (Sym2 V)),
      D ⊆ Y.erase q ∧ D ≠ Y.erase q ∧ D.Nonempty ∧
      S = S₁ ∪ S₂ ∪ S₃ ∧ Disjoint S₁ S₂ ∧ Disjoint S₁ S₃ ∧ Disjoint S₂ S₃ ∧
      IsSteinerTree G ℓ {p, q} S₁ ∧
      IsSteinerTree G ℓ (insert p D) S₂ ∧
      IsSteinerTree G ℓ (insert p (Y.erase q \ D)) S₃ := by sorry

end DreyfusWagner.Steiner
Source
Dreyfus, Wagner, The Steiner Problem in Graphs, Networks 1 (1971), p. 206, Appendix A, Optimal Decomposition Theorem (also stated in §1, p. 197)
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 with ℓ(e)>0\ell(e) > 0ℓ(e)>0 for every e∈Ae \in Ae∈A. Let YYY be a finite node set with ∣Y∣≥3|Y| \ge 3∣Y∣≥3 and SSS a Steiner tree for YYY. That is, S⊆AS \subseteq AS⊆A, SSS joins every two nodes of YYY using its own arcs, and SSS has minimum total length among all such subsets of AAA. Let q∈Yq \in Yq∈Y. The statement asserts that there exist:

  • a node ppp;
  • a node set DDD with
∅≠D⊊Y∖{q};\emptyset \neq D \subsetneq Y \setminus \{q\};∅=D⊊Y∖{q};
  • arc sets S1,S2,S3S_1, S_2, S_3S1​,S2​,S3​ that are pairwise disjoint, with S=S1∪S2∪S3S = S_1 \cup S_2 \cup S_3S=S1​∪S2​∪S3​, such that
    • S1S_1S1​ is a Steiner tree for {p,q}\{p, q\}{p,q};
    • S2S_2S2​ is a Steiner tree for {p}∪D\{p\} \cup D{p}∪D;
    • S3S_3S3​ is a Steiner tree for {p}∪((Y∖{q})∖D)\{p\} \cup \big((Y \setminus \{q\}) \setminus D\big){p}∪((Y∖{q})∖D).

All three Steiner trees are taken in the same (G,ℓ)(G,\ell)(G,ℓ). Nothing constrains ppp: it may equal qqq, lie in DDD or its complement, or be any other node. None of S1,S2,S3S_1, S_2, S_3S1​,S2​,S3​ is required to be nonempty.

Degenerate cases. The conditions on DDD force both DDD and (Y∖{q})∖D(Y \setminus \{q\}) \setminus D(Y∖{q})∖D to be nonempty. This is possible because ∣Y∖{q}∣≥2|Y \setminus \{q\}| \ge 2∣Y∖{q}∣≥2. If p=qp = qp=q, then S1S_1S1​, being a Steiner tree for the singleton {q}\{q\}{q} under positive lengths, must be ∅\emptyset∅.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me