Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2 — every connected graph has a spanning tree

Proved
NashWilliams61.TreePacking.lemma_2

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-theorymultigraphp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1spanning-tree

Let GGG be a finite multigraph without loops and (W,F)(W, F)(W,F) a subgraph of GGG (every edge of FFF has both ends in WWW) that is connected: WWW is non-empty and any two vertices of WWW are joined by a path of FFF-edges. Then there is T⊆FT \subseteq FT⊆F such that (W,T)(W, T)(W,T) is a tree, i.e. TTT is a spanning tree of (W,F)(W, F)(W,F).

Together with Lemma 1 this gives the proof of necessity of Theorem 1.

Formalization Note "Connected" is spelled out as non-empty plus pairwise reachability by FFF-edges; the conclusion is the multigraph spanning-tree notion of the definition file.

Preamble
import Mathlib
import Definitions.Def_NagamochiIbaraki_EdgeConn_Multigraph
import Definitions.Def_NashWilliams61_TreePacking_Graphs
open NagamochiIbaraki.EdgeConn
Formal statement
namespace NashWilliams61.TreePacking

/-- **Lemma 2** (Nash-Williams 1961, p. 445). Every connected graph has a spanning tree: if
`(W, F)` is a subgraph (every edge of `F` has both ends in `W`) with `W` non-empty and
every two vertices of `W` joined by a path of `F`-edges, then some `T ⊆ F` is a spanning
tree of `(W, F)`. -/
theorem lemma_2 {V E : Type} [DecidableEq V] [DecidableEq E] (ends : E → Sym2 V)
    (hloop : ∀ e, ¬ (ends e).IsDiag) (W : Finset V) (F : Finset E)
    (hF : ∀ e ∈ F, ∀ v ∈ ends e, v ∈ W) (hW : W.Nonempty)
    (hconn : ∀ u ∈ W, ∀ v ∈ W, (edgeGraph ends F).Reachable u v) :
    ∃ T : Finset E, IsSpanningTreeOn ends W F T := by sorry

end NashWilliams61.TreePacking
Source
Nash-Williams, Edge-disjoint spanning trees of finite graphs, J. London Math. Soc. 36 (1961), p. 445, Lemma 2
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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