Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2.4(b) — at any instant of FOREST, a u–v path in E*_j gives u–v paths in every E*_i with i < j

Proved
NagamochiIbaraki.NodeConn.lemma_2_4_b

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

graph-algorithmsgraph-connectivityp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1spanning-forest

Let G=(V,E)G = (V, E)G=(V,E) be a graph with ∣V∣≥2|V| \ge 2∣V∣≥2 and no self-loop, and consider any run of Procedure FOREST on GGG. Fix a time instant and let E1∗,E2∗,…E^*_1, E^*_2, \dotsE1∗​,E2∗​,… be the classes at that instant. For indices 1≤i<j≤∣E∣1 \le i < j \le |E|1≤i<j≤∣E∣ and nodes u,vu, vu,v:

u and v are connected by a path in Ej∗ ⟹ u and v are connected by a path in Ei∗.u \text{ and } v \text{ are connected by a path in } E^*_j \ \Longrightarrow\ u \text{ and } v \text{ are connected by a path in } E^*_i .u and v are connected by a path in Ej∗​ ⟹ u and v are connected by a path in Ei∗​.

Connectivity is thus monotone across the classes: a later forest never joins two nodes that an earlier forest leaves apart. The proof of Lemma 3.2 uses it to produce the paths PtP_tPt​, Pt′P'_tPt′​ to which Lemma 3.1 is applied.

Formalization Note "Connected by a path in Ej∗E^*_jEj∗​" is reachability in the spanning subgraph (V,Ej∗)(V, E^*_j)(V,Ej∗​); a path exists exactly when a walk does.

Preamble
import Mathlib
import Definitions.Def_NagamochiIbaraki_NodeConn_Multigraph
import Definitions.Def_NagamochiIbaraki_NodeConn_Forest
Formal statement
namespace NagamochiIbaraki.NodeConn

theorem lemma_2_4_b
    {V E : Type*} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
    (hV : 2 ≤ Fintype.card V)
    (ends : E → Sym2 V) (hloop : ∀ e, ¬ (ends e).IsDiag)
    (σ : ℕ → State V E) (K : ℕ) (hrun : IsRun ends σ K) :
    ∀ k, k ≤ K → ∀ (i j : ℕ) (u v : V), 1 ≤ i → i < j → j ≤ Fintype.card E →
      (edgeGraph ends (cls (σ k) j)).Reachable u v →
        (edgeGraph ends (cls (σ k) i)).Reachable u v := by sorry

end NagamochiIbaraki.NodeConn
Source
Nagamochi, Ibaraki, A Linear-Time Algorithm for Finding a Sparse k-Connected Spanning Subgraph of a k-Connected Graph, Algorithmica 7 (1992), p. 588, Lemma 2.4(b)
Read-back

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

The setting and hypotheses are:

  • finite types VVV (nodes) and EEE (edges), both with decidable equality, where ∣V∣≥2|V| \ge 2∣V∣≥2;
  • an endpoint map ∂:E→Sym2(V)\partial : E \to \mathrm{Sym}^2(V)∂:E→Sym2(V) with no loops;
  • parallel edges are allowed;
  • a sequence of states σ0,σ1,…\sigma_0, \sigma_1, \dotsσ0​,σ1​,… that is a run of length KKK. A run starts from the initial state and each σk+1\sigma_{k+1}σk+1​ follows from σk\sigma_kσk​ by a select, scan or finish step, for every k<Kk < Kk<K.

The steps.

  • Select. With no current node, choose an unscanned node of maximum label among the unscanned nodes as current, and append it to the order list.

  • Scan. With current node xxx and an edge eee of index 000 with ∂e={x,y}\partial e = \{x, y\}∂e={x,y}:

    • set idx(e):=r(y)+1\mathrm{idx}(e) := r(y) + 1idx(e):=r(y)+1;
    • raise r(x)r(x)r(x) by one if r(x)=r(y)r(x) = r(y)r(x)=r(y);
    • raise r(y)r(y)r(y) by one.

    All three updates use the old values of rrr.

  • Finish. Once every edge incident to the current node has nonzero index, mark it scanned and clear the current node.

Notation. For a state sss:

  • Ej(s)={e:idxs(e)=j}E_j(s) = \{e : \mathrm{idx}_s(e) = j\}Ej​(s)={e:idxs​(e)=j};
  • G[F]G[F]G[F] is the simple graph on all of VVV in which u∼vu \sim vu∼v iff u≠vu \ne vu=v and some e∈Fe \in Fe∈F has ∂e={u,v}\partial e = \{u, v\}∂e={u,v}.

Claim. For every time k≤Kk \le Kk≤K, all integers i,ji, ji,j with 1≤i<j≤∣E∣1 \le i < j \le |E|1≤i<j≤∣E∣, and all nodes u,vu, vu,v:

u and v are connected by a walk in G[Ej(σk)]  ⟹  u and v are connected by a walk in G[Ei(σk)].u \text{ and } v \text{ are connected by a walk in } G[E_j(\sigma_k)] \;\Longrightarrow\; u \text{ and } v \text{ are connected by a walk in } G[E_i(\sigma_k)].u and v are connected by a walk in G[Ej​(σk​)]⟹u and v are connected by a walk in G[Ei​(σk​)].

Degenerate cases.

  • u=vu = vu=v. Both sides hold trivially, since every node reaches itself.
  • ∣E∣≤1|E| \le 1∣E∣≤1. No pair 1≤i<j≤∣E∣1 \le i < j \le |E|1≤i<j≤∣E∣ exists, so the claim is vacuous.
  • K=0K = 0K=0. Every class of positive index is empty, so the hypothesis holds only for u=vu = vu=v.
  • Not covered. The claim says nothing about index 000 or about times after KKK.
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