Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Paths, separators and linkages for Menger's theorem

Definition
Menger_Linkage

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

connectivitygraph-theorymenger

Let GGG be a graph and S,A,BS, A, BS,A,B finite sets of vertices. An AAA–BBB path inside SSS is a nonempty list of distinct vertices of SSS, consecutive entries adjacent in GGG, whose first vertex is in AAA and whose last vertex is in BBB (a single vertex of A∩BA\cap BA∩B is allowed). A set XXX of vertices is an AAA–BBB separator inside SSS if every AAA–BBB path inside SSS contains a vertex of XXX. A linkage of size kkk is a family of kkk pairwise vertex-disjoint AAA–BBB paths inside SSS. These notions are the data of the set form of Menger's theorem: the maximum size of a linkage equals the minimum size of a separator.

Definition code
import Mathlib

namespace Menger

variable {V : Type*}

/-- A path of `G` inside the vertex set `S`, listed from a vertex of `A` to a vertex of `B`: a
nonempty duplicate-free list of vertices of `S`, consecutive entries adjacent, whose first entry
lies in `A` and whose last entry lies in `B`. -/
def IsABPath (G : SimpleGraph V) (S A B : Finset V) (p : List V) : Prop :=
  p ≠ [] ∧ p.Nodup ∧ List.IsChain G.Adj p ∧ (∀ v ∈ p, v ∈ S) ∧
    (∃ a, p.head? = some a ∧ a ∈ A) ∧ (∃ b, p.getLast? = some b ∧ b ∈ B)

/-- `X` is an `A`–`B` separator inside `S`: it meets every `A`–`B` path of `G` inside `S`. -/
def IsABSep (G : SimpleGraph V) (S A B X : Finset V) : Prop :=
  ∀ p, IsABPath G S A B p → ∃ x ∈ X, x ∈ p

/-- There are `k` pairwise vertex-disjoint `A`–`B` paths of `G` inside `S`. -/
def HasLinkage (G : SimpleGraph V) (S A B : Finset V) (k : ℕ) : Prop :=
  ∃ L : List (List V), L.length = k ∧ (∀ p ∈ L, IsABPath G S A B p) ∧
    L.Pairwise (fun p q => ∀ v ∈ p, v ∉ q)

end Menger
Source
R. Diestel, Graph Theory, 5th ed., Section 3.3, Theorem 3.3.1 (Menger 1927) and the definitions preceding it.
Human review
  • Endorsed by Shuze Chen · Nov 11, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 11, 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