Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6.2 (a)–(c), p. 464 — O(G) is exactly the set of vertices exposed by some maximum matching; I(G) are its neighbours; G* shrinks the components of O(G)⁺

Proved
PathsTreesFlowers.Invariance.theorem_6_2

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

gallai-edmondsmatchingmaximum-matchingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1structure-theorem

Let GGG be a finite graph and MMM any maximum matching of GGG. Let G∗=G/PG^* = G/\mathcal PG∗=G/P and the planted trees J1,…,JnJ_1, \dots, J_nJ1​,…,Jn​ be obtained from (G,M)(G, M)(G,M) by construction 6.0, and let O(G)O(G)O(G) (the non-pseudo outer vertices of the JiJ_iJi​ together with the vertices of the pseudovertex complete expansions) and I(G)I(G)I(G) (the inner vertices of the JiJ_iJi​) be as defined there. Then:

  1. (a) the outer vertices O(G)O(G)O(G) are precisely the vertices of GGG left exposed by some maximum matching of GGG:
v∈O(G)  ⟺  ∃M′ maximum matching of G with v exposed for M′;v \in O(G) \iff \exists M' \text{ maximum matching of } G \text{ with } v \text{ exposed for } M';v∈O(G)⟺∃M′ maximum matching of G with v exposed for M′;
  1. (b) the inner vertices I(G)I(G)I(G) are precisely the vertices of GGG not in O(G)O(G)O(G) but joined to vertices in O(G)O(G)O(G);
  2. (c) G∗G^*G∗ is obtained from GGG by shrinking the connected components of O(G)+O(G)^+O(G)+, the subgraph of GGG consisting of the vertices O(G)O(G)O(G) and all edges of GGG joining them: two vertices u,vu, vu,v lie in the same part of P\mathcal PP if and only if u=vu = vu=v or u,vu, vu,v lie in the same connected component of O(G)+O(G)^+O(G)+.

Thus O(G)O(G)O(G), I(G)I(G)I(G) and G∗G^*G∗ depend only on GGG, not on the maximum matching or on the order in which the trees were grown. This is the first appearance of what is now called the Gallai–Edmonds structure theorem: the vertices that some maximum matching misses, their neighbours, and the remaining vertices form a canonical decomposition of every graph.

Formalization Note The output of construction 6.0 is the structure Config60, which records every invariant of the construction (maximum MMM; parts of P\mathcal PP are blossom sets for MMM; disjoint planted trees for M/PM/\mathcal PM/P; density; JiJ_iJi​ Hungarian in G∗−J1−⋯−Ji−1G^* - J_1 - \dots - J_{i-1}G∗−J1​−⋯−Ji−1​; pseudovertices outer). The theorem is stated for every such configuration; that one exists for every maximum matching is the separate item exists_config_6_0.

Preamble
import Mathlib
import Definitions.Def_EdmondsMatching65_Polyhedron_Graph
import Definitions.Def_PathsTreesFlowers_Invariance_Basic
import Definitions.Def_PathsTreesFlowers_Invariance_Shrink
import Definitions.Def_PathsTreesFlowers_Invariance_Config
Formal statement
namespace PathsTreesFlowers.Invariance

/-- Theorem 6.2, p. 464. For `(G, M)` with `M` any maximum matching, let `G*` and `{Jᵢ}` be
obtained from `(G, M)` by 6.0 (the data `C`). (a) The outer vertices `O(G)` are precisely the
vertices of `G` left exposed by some maximum matching of `G`. (b) The inner vertices `I(G)` are
precisely the vertices not in `O(G)` but joined to vertices in `O(G)`. (c) `G*` is obtained from
`G` by shrinking the connected components of `O(G)⁺`. -/
theorem theorem_6_2 {V E : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
    (G : EdmondsMatching65.Polyhedron.Graph V E)
    (M : Finset E) (C : Config60 G M) :
    (∀ v : V, v ∈ outerSet C ↔ ∃ M' : Finset E, PathsTreesFlowers.Duality.IsMaxMatching G M' ∧ PathsTreesFlowers.Duality.IsExposed G M' v) ∧
    (∀ v : V, v ∈ innerSet C ↔
      v ∉ outerSet C ∧ ∃ u ∈ outerSet C, ∃ e : E, G.ends e = s(u, v)) ∧
    (∀ u v : V, C.P.part u = C.P.part v ↔
      (u = v ∨ (u ∈ outerSet C ∧ v ∈ outerSet C ∧
        Relation.ReflTransGen
          (fun x y => x ∈ outerSet C ∧ y ∈ outerSet C ∧ ∃ e : E, G.ends e = s(x, y)) u v))) := by sorry

end PathsTreesFlowers.Invariance
Source
Edmonds, Paths, trees, and flowers, Canad. J. Math. 17 (1965), p. 464, 6.2 (a), (b), (c)
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