Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 1 — a matching is maximum iff no alternating chain connects two neutral points

Proved
BergeMatching.Core.theorem_1

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

augmenting-pathgraph-theorymatchingp2o-batch-pfp1bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let G=(X,U)G = (X, U)G=(X,U) be a finite simple graph and V⊆UV \subseteq UV⊆U a matching. Call the edges of VVV strong and the other edges weak; a vertex met by no strong edge is neutral, and an alternating chain is a walk that does not use the same edge twice and in which, of any two consecutive edges, one is strong and the other weak. Then

V is a maximum matching  ⟺  no alternating chain connects a neutral point a to a neutral point a′≠a.V \text{ is a maximum matching} \iff \text{no alternating chain connects a neutral point } a \text{ to a neutral point } a' \neq a .V is a maximum matching⟺no alternating chain connects a neutral point a to a neutral point a′=a.

Here "maximum" means that no matching of GGG has more edges than VVV.

This is Berge's characterization of maximum matchings by augmenting chains. It turns the global optimality of a matching into a local, checkable condition, and it is the basis of the augmenting-path algorithms for maximum matching in general graphs, notably Edmonds' blossom algorithm.

Formalization Note The graph is a finite Mathlib SimpleGraph, the matching is a subgraph with IsMatching, and its size is the number of its edges. Alternating chains are trails (no repeated edge; vertices may repeat), and alternation is required of consecutive edges only. The endpoints are required to be distinct, as in the paper's proof ("a neutral point a′a'a′ different from aaa"); otherwise the one-vertex chain at any neutral point would count. No connectedness or nonemptiness hypothesis is assumed.

Preamble
import Mathlib
import Definitions.Def_BergeMatching_Core_AlternatingChain
Formal statement
namespace BergeMatching.Core

/-- Berge (1957), p. 843, Theorem 1: a matching is maximum if and only if there does not exist
an alternating chain connecting a neutral point to another neutral point. -/
theorem theorem_1 {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (M : G.Subgraph) (hM : M.IsMatching) :
    IsMaximumMatching M ↔
      ¬ ∃ (a a' : V) (p : G.Walk a a'),
          a ≠ a' ∧ IsNeutral M a ∧ IsNeutral M a' ∧ IsAlternatingChain M p := by sorry

end BergeMatching.Core
Source
Berge, Two theorems in graph theory, Proc. Natl. Acad. Sci. USA 43 (1957), p. 843, Theorem 1
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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