Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

3.7 (Berge), p. 453 — M is not maximum iff (G, M) contains an alternating path joining two exposed vertices

Proved
PathsTreesFlowers.Duality.berge_3_7

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

augmenting-pathbergematchingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let MMM be a matching in a finite graph GGG. Then MMM is not of maximum cardinality if and only if there is an alternating path in (G,M)(G, M)(G,M) with at least one edge whose two end-points are both exposed for MMM:

M not maximum  ⟺  ∃ v0e0v1⋯em−1vm alternating, m≥1, v0,vm exposed.M \text{ not maximum} \iff \exists\, v_0 e_0 v_1 \cdots e_{m-1} v_m \text{ alternating},\ m \ge 1,\ v_0, v_m \text{ exposed}.M not maximum⟺∃v0​e0​v1​⋯em−1​vm​ alternating, m≥1, v0​,vm​ exposed.

Such a path is augmenting (3.6): exchanging its edges in and out of MMM yields a matching larger by one. This is Berge's characterization of maximum matchings, the basis of every augmenting-path algorithm.

Formalization Note "An alternating path joining two exposed vertices" requires at least one edge (two distinct end-points). A one-vertex path joins its vertex to itself (3.3), and an exposed vertex alone would make the statement false.

Preamble
import Mathlib
import Definitions.Def_EdmondsMatching65_Polyhedron_Graph
import Definitions.Def_PathsTreesFlowers_Duality_Basic
Formal statement
namespace PathsTreesFlowers.Duality

theorem berge_3_7 {V E : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
    (G : EdmondsMatching65.Polyhedron.Graph V E)
    (M : Finset E) (hM : EdmondsMatching65.Polyhedron.IsMatching G M) :
    ¬ IsMaxMatching G M ↔
      ∃ (vs : List V) (es : List E), IsAlternatingPath G M vs es ∧ es ≠ [] ∧
        (∀ a ∈ vs.head?, IsExposed G M a) ∧ (∀ b ∈ vs.getLast?, IsExposed G M b) := by sorry

end PathsTreesFlowers.Duality
Source
Edmonds, Paths, trees, and flowers, Canad. J. Math. 17 (1965), p. 453, 3.7 (Berge, 1)
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