maximum_matching_unmatched_independent
The vertices left uncovered by a maximum matching inside a vertex set form an independent set.
Statement
theorem maximum_matching_unmatched_independent {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (S : Finset V) (M : G.Subgraph) (hM : M.IsMatching) (hMS : M.verts ⊆ (S : Set V)) (hmax : ∀ N : G.Subgraph, N.IsMatching → N.verts ⊆ (S : Set V) → N.edgeSet.ncard ≤ M.edgeSet.ncard) : ∀ u ∈ S, u ∉ M.verts → ∀ v ∈ S, v ∉ M.verts → ¬ G.Adj u v
- Source
- Balanced-cut matching symmetry for OP-1957; https://arxiv.org/abs/2611.22690.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- indexed_disjoint_cross_edges_form_matchingInjectively indexed edges with disjoint endpoint ranges form a matching of the expected size.
- extendible_graph_matchable_deletion_inherits_extendibilityIf a graph is (r+j)-extendible and a 2j-vertex set U induces a perfect matching, then its induced complement is r-extendible, provided the…
- Used by 4
- maximum_matching_uncovered_incidence_independence_boundFor a maximum matching with t uncovered vertices, a global independent-set bound k bounds the number of edges from uncovered vertices to…
- extendible_equal_cut_maximum_matching_deficiency_at_most_oneUnder the displayed extendibility, minimum degree, independence and equal-half matching assumptions, a maximum internal matching has at…
- op1957_min_degree_forces_matchingA finite graph on at least 2k vertices with minimum degree at least k has a matching of k edges.
- maximum_matching_size_from_independenceA maximum matching inside S covers enough vertices that |S| is at most twice its edge count plus the independence bound.
The proof, explained
The proof proceeds by contradiction. If two vertices $u, v \in S$ not covered by $M$ were adjacent, the edge $\{u, v\}$ would form a 1-edge matching disjoint from $M$. Adding this edge to $M$ yields a matching with vertices in $S$ and strictly more edges than $M$, contradicting the maximality of $M$.
Assume for contradiction that there are two adjacent vertices in $S$ left unmatched by $M$.
We introduce two vertices $u, v \in S$ not covered by $M$ (hypotheses `huM` and `hvM`), and assume for contradiction that they are connected by an edge in $G$ (`huv`).
set_option maxHeartbeats 4000000 in classical intro u hu huM v hv hvM huv
The edge $\{u, v\}$ forms a 1-edge matching $E$ with vertex set $\{u, v\}$.
We define functions $f, g : \mathrm{Fin}\ 1 \to V$ sending the unique index to $u$ and $v$ respectively. Since $\mathrm{Fin}\ 1$ has only one element, both maps are injective by `Subsingleton.elim`. Since $u$ and $v$ are adjacent, they are distinct by `G.ne_of_adj`. Applying `indexed_disjoint_cross_edges_form_matching` with $r = 1$ gives a matching $E$ with 1 edge whose vertices are $\{u, v\}$.
uses
Subsingleton.elim,G.ne_of_adj,indexed_disjoint_cross_edges_form_matchinglet f : Fin 1 → V := fun _ => u let g : Fin 1 → V := fun _ => v have hf : Function.Injective f := by intro a b h; exact Subsingleton.elim a b have hg : Function.Injective g := by intro a b h; exact Subsingleton.elim a b have hfg : ∀ a b, f a ≠ g b := by intro a b; exact G.ne_of_adj huv obtain ⟨E,hE,hEcard,hEverts⟩ := indexed_disjoint_cross_edges_form_matching G 1 f g hf hg hfg (by intro a; exact huv)
The vertex sets of $M$ and $E$ are disjoint.
By `Set.disjoint_left.mpr`, it suffices to show no vertex in $M$ belongs to $E$. The vertices of $E$ are $\{u, v\}$, but neither $u$ nor $v$ belongs to $M$ by hypothesis, yielding a contradiction in either case.
uses
Set.disjoint_left.mprhave hdis : Disjoint M.verts E.verts := by apply Set.disjoint_left.mpr intro x hxM hxE rw [hEverts] at hxE rcases hxE with ⟨i,hi⟩ | ⟨i,hi⟩ · exact huM (by simpa [f,hi] using hxM) · exact hvM (by simpa [g,hi] using hxM)
The union $M \sqcup E$ is a matching with $|M| + 1$ edges.
Since $M$ and $E$ are both matchings and have disjoint vertex sets, `extendible_graph_matchable_deletion_inherits_extendibility_sup_ncard` proves that their union $M \sqcup E$ is also a matching with edge count $|M| + |E| = |M| + 1$.
uses
extendible_graph_matchable_deletion_inherits_extendibility_sup_ncardhave hsup := extendible_graph_matchable_deletion_inherits_extendibility_sup_ncard M E hM hE hdisThe vertices of $M \sqcup E$ are contained in $S$.
Every vertex of $M \sqcup E$ is either in $M$ or in $E$. Vertices of $M$ are in $S$ by assumption `hMS`, and the vertices of $E$ are $u$ and $v$, which both belong to $S$.
have hsub : (M ⊔ E).verts ⊆ (S : Set V) := by intro x hx change x ∈ M.verts ∪ E.verts at hx rcases hx with hxM | hxE · exact hMS hxM · rw [hEverts] at hxE rcases hxE with ⟨i,hi⟩ | ⟨i,hi⟩ · simpa [f,hi] using hu · simpa [g,hi] using hv
A contradiction arises from the maximality of $M$. automation
Applying the maximality hypothesis `hmax` to $M \sqcup E$ gives $|M \sqcup E| \le |M|$. Substituting the cardinalities gives $|M| + 1 \le |M|$, which `omega` refutes by integer arithmetic.
have hbound := hmax (M ⊔ E) hsup.1 hsub rw [hsup.2,hEcard] at hbound omega
Subsingleton.elim- Two elements of a subsingleton type (such as `Fin 1`) are always equal.
G.ne_of_adj- Adjacent vertices in a simple graph are not equal.
indexed_disjoint_cross_edges_form_matching- A family of edges indexed by an injection from `Fin r` with disjoint endpoints forms a matching with $r$ edges whose vertex set is the union of the endpoints.
Set.disjoint_left.mpr- Two sets are disjoint if no element of the first set is in the second set.
extendible_graph_matchable_deletion_inherits_extendibility_sup_ncard- The union of two vertex-disjoint matchings is a matching, and its edge count is the sum of the two edge counts.
- The construction of the single-edge matching $E$ relies on a general lemma `indexed_disjoint_cross_edges_form_matching` for families of edges indexed by `Fin r`. Specializing this to $r = 1$ requires auxiliary injectivity and disjointness proofs on the single-element domain `Fin 1`, which have no counterpart in an informal paper proof.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem maximum_matching_unmatched_independent {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (S : Finset V) (M : G.Subgraph) (hM : M.IsMatching) (hMS : M.verts ⊆ (S : Set V)) (hmax : ∀ N : G.Subgraph, N.IsMatching → N.verts ⊆ (S : Set V) → N.edgeSet.ncard ≤ M.edgeSet.ncard) : ∀ u ∈ S, u ∉ M.verts → ∀ v ∈ S, v ∉ M.verts → ¬ G.Adj u v := by set_option maxHeartbeats 4000000 in classical intro u hu huM v hv hvM huv let f : Fin 1 → V := fun _ => u let g : Fin 1 → V := fun _ => v have hf : Function.Injective f := by intro a b h; exact Subsingleton.elim a b have hg : Function.Injective g := by intro a b h; exact Subsingleton.elim a b have hfg : ∀ a b, f a ≠ g b := by intro a b; exact G.ne_of_adj huv obtain ⟨E,hE,hEcard,hEverts⟩ := indexed_disjoint_cross_edges_form_matching G 1 f g hf hg hfg (by intro a; exact huv) have hdis : Disjoint M.verts E.verts := by apply Set.disjoint_left.mpr intro x hxM hxE rw [hEverts] at hxE rcases hxE with ⟨i,hi⟩ | ⟨i,hi⟩ · exact huM (by simpa [f,hi] using hxM) · exact hvM (by simpa [g,hi] using hxM) have hsup := extendible_graph_matchable_deletion_inherits_extendibility_sup_ncard M E hM hE hdis have hsub : (M ⊔ E).verts ⊆ (S : Set V) := by intro x hx change x ∈ M.verts ∪ E.verts at hx rcases hx with hxM | hxE · exact hMS hxM · rw [hEverts] at hxE rcases hxE with ⟨i,hi⟩ | ⟨i,hi⟩ · simpa [f,hi] using hu · simpa [g,hi] using hv have hbound := hmax (M ⊔ E) hsup.1 hsub rw [hsup.2,hEcard] at hbound omega