extendible_matchable_two_k_vertices_complement_matchable
In a finite k-extendible graph, the complement of any matchable set of exactly 2k vertices is matchable.
Statement
theorem extendible_matchable_two_k_vertices_complement_matchable {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (k : ℕ) (hG : is_k_extendable G k) (S : Set V) (hsize : S.ncard = 2 * k) (hS : ∃ M : (G.induce S).Subgraph, M.IsPerfectMatching) : ∃ P : (G.induce Sᶜ).Subgraph, P.IsPerfectMatching
- Source
- Matching-restriction ingredient for OP-1957 connected triple-twin cut.
- Verified
- 20 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- is_k_extendableFor a finite vertex type V (with [Fintype V]), a simple graph G : SimpleGraph V and k : ℕ, is_k_extendable G k is the Prop that is the…
- Used by 35
- op1957_exceptional_pool_example_not_extendibleThe exceptional 44-vertex graph is not 11-extendible.
- 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…
- no_two_crossing_matching_independence_incidence_boundIf distinct vertices of U cannot cross to adjacent vertices of R, |U|=2r, |R|=2k, a (k−r)-matching inside R and α≤k imply e(U,R)≤2rk+2r.
- extendible_independent_common_nonneighbor_deficit_le_zeroUnder the stated high-degree extendibility and independence assumptions, a nonempty independent U and a disjoint anticomplete W satisfy…
- near_perfect_matching_independent_anticomplete_countIf a matching misses at most two vertices of R, an independent subset U and a disjoint anticomplete subset W obey 2|U|+|W|≤|R|+2.
- induced_odd_components_le_unmatched_matching_verticesEach odd component of an induced graph contains a vertex missed by any matching contained in that induced graph.
- indexed_disjoint_cross_edges_form_matchingInjectively indexed edges with disjoint endpoint ranges form a matching of the expected size.
- 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…
- extendible_high_degree_balanced_cut_odd_bound_no_separatorIn the displayed high-degree extendible graph with independence bound k, every balanced half has at most two odd components, with no…
- extendible_balanced_cut_odd_bound_of_even_cross_matchingThe opposite side has at most r odd components if the specified crossing matching meets every odd component in an even number of vertices.
- op1957_min_degree_forces_matchingA finite graph on at least 2k vertices with minimum degree at least k has a matching of k edges.
- induced_matching_liftsA matching of an induced graph lifts to an ambient matching supported in the inducing set with the same size.
- matching_vertices_card_at_most_twice_edgesThe vertices of a matching with k edges fit in a set of at most 2k vertices.
- op1957_barrier_count_example_not_extendibleThe explicit 44-vertex barrier count example is not 11-extendible.
- extendible_independent_anticomplete_matching_obstruction_generalIn a finite k-extendible graph, an independent set U and a disjoint anticomplete set W with 2|U|+|W| greater than the unmatched vertex…
- op1957_hidden_barrier_not_extendibleThe 40-vertex hidden-barrier graph is not 10-extendible.
- extendible_balanced_cut_odd_bound_of_parity_cross_matchingFor the stated order-4k extendible graph and balanced-side matching with deficiency r, the opposite side has at most r+1 odd components…
- balanced_cut_extend_internal_matchingThe separator cross-matching extends a balanced-side matching of k−r edges to a k-matching, leaving exactly r vertices on that side…
- extendible_k7_balanced_cut_odd_component_boundIn the stated 28-vertex, 7-extendible, high-degree setting with the separator and independence assumptions, any balanced cut has at most…
- extendible_balanced_cut_exposed_barrier_odd_boundIf every vertex of an opposite-side set X can be matched to distinct vertices left uncovered by a balanced-side (k−r)-matching, then the…
- balanced_cut_near_perfect_of_incidence_boundsUnder the displayed incidence bounds, minimum degree and unmatched independence cardinality, a balanced-side matching has at least k−1…
- op1957_extendible_independence_of_complement_matchingA 4k-vertex k-extendible graph has independence number at most k if the complement of every k+1-vertex set contains a k-matching.
- 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.
- op1957_empty_pool_control_delete_0_16_not_extendibleDeleting edge {0,16} from the displayed 28-vertex control with parameter 5 yields a graph that is not 7-extendible.
- 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…
- high_min_degree_matching_extends_to_sizeA matching with at most k edges extends to size k in a sufficiently large graph of minimum degree at least 2k.
- force_one_cross_edge_extend_perfectIn the displayed extendible graph, a crossing edge from an uncovered vertex to the opposite side can be forced into a perfect matching…
- finite_subset_has_maximum_matchingEvery vertex subset of a finite graph contains a maximum matching.
- perfect_matching_internal_edge_cardFor a perfect matching and a specified matching-partner map, twice the number of internal edges is the number of vertices whose partners…
- op1957_empty_pool_c_control_not_extendibleThe explicit control with z=17 is not 7-extendible.
- boundary_five_seven_example_edge_essentialIn the explicitly defined 28-vertex four-block graph, the edge from 0 to 14 is present and the graph obtained by deleting it is not…
- op1957_half_pool_example_not_extendibleThe explicit 52-vertex half-pool example is not 13-extendible.
- extendible_balanced_cut_maximum_matching_sizes_equalFor a k-extendible graph of order 4k, maximum matchings on the two halves of a balanced cut have equal sizes if their sizes sum to at…
- k_extendable_essential_edge_has_forced_matching_residualAn essential edge of a k-extendible graph is forced in a perfect-matching residual on n−2k vertices.
- extendible_independent_common_nonneighbor_deficit_le_oneUnder the stated high-degree extendibility and independence assumptions, a nonempty independent U and a disjoint anticomplete W satisfy…
The proof, explained
To show that the complement Sᶜ of a matchable 2k-vertex set S is matchable in a k-extendable graph G, we take a perfect matching on the induced subgraph G[S], which has size k by an auxiliary lemma relating the vertex and edge counts of any matching. By k-extendability, this matching extends to a perfect matching Q of the entire graph G. Because Q already covers S using only edges within S, Q cannot match any vertex of Sᶜ to a vertex of S; therefore, Q restricts to a perfect matching on the induced subgraph G[Sᶜ].
For any edge e in a matching M, exactly two vertices of M are mapped to e by toEdge, namely the two endpoints of e.
Representing an edge e in M as an unordered pair s(a, b) of adjacent vertices, the fiber of the matching map toEdge over e consists precisely of the two endpoints a and b. Since G is a simple graph, adjacent vertices are distinct (a ≠ b), so the fiber has cardinality 2.
uses
Sym2.ind,Subtype.ext,Fintype.card_congr,Equiv.setCongr,Set.toFinset_cardclassical have key : ∀ e : M.edgeSet, Fintype.card {v : M.verts // h.toEdge v = e} = 2 := by rintro ⟨x, hx⟩ revert hx induction x using Sym2.ind with | _ a b => intro hx have hab : M.Adj a b := SimpleGraph.Subgraph.mem_edgeSet.mp hx have h1 : (⟨s(a, b), hx⟩ : M.edgeSet) = ⟨s(a, b), SimpleGraph.Subgraph.mem_edgeSet.mpr hab⟩ := Subtype.ext rfl have hEq : h.toEdge ⁻¹' {⟨s(a, b), hx⟩} = {⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} := by rw [h1] exact h.toEdge_preimage_singleton hab have hset2 : {v : M.verts | h.toEdge v = (⟨s(a, b), hx⟩ : M.edgeSet)} = ({⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} : Set M.verts) := by ext v have hmem := Set.ext_iff.mp hEq v simpa only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_ofPred_eq, Set.mem_insert_iff] using hmem calc Fintype.card {v : M.verts // h.toEdge v = (⟨s(a, b), hx⟩ : M.edgeSet)} = Fintype.card ↥({⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} : Set M.verts) := Fintype.card_congr (Equiv.setCongr hset2) _ = 2 := by rw [← Set.toFinset_card] have hne : (⟨a, hab.fst_mem⟩ : M.verts) ≠ ⟨b, hab.snd_mem⟩ := by simp [G.ne_of_adj (M.adj_sub hab)] simp [hne]
The finite type cardinality of M.verts is twice the finite type cardinality of M.edgeSet.
Decomposing the vertex type M.verts into the disjoint union of fibers over M.edgeSet via Equiv.sigmaFiberEquiv, the total number of vertices is the sum of the fiber cardinalities. Since each of the |M.edgeSet| fibers has size 2, the sum evaluates to 2 * |M.edgeSet|.
uses
Fintype.card_sigma,Equiv.sigmaFiberEquiv,Nat.mul_commhave hsum : Fintype.card M.verts = ∑ e : M.edgeSet, Fintype.card {v : M.verts // h.toEdge v = e} := by rw [← Fintype.card_sigma] exact Fintype.card_congr (Equiv.sigmaFiberEquiv h.toEdge).symm have h1 : Fintype.card M.verts = 2 * Fintype.card M.edgeSet := by rw [hsum] simp [key, Nat.mul_comm]
For any matching M in a finite graph, 2 * |M.edgeSet| = |M.verts| in terms of set cardinalities (ncard).
Because the vertex and edge sets are finite, their set cardinalities (ncard) coincide with their Fintype cardinalities via Set.ncard_eq_toFinset_card and Set.toFinite_toFinset. Substituting these into the relation from the previous step yields 2 * M.edgeSet.ncard = M.verts.ncard.
uses
Set.ncard_eq_toFinset_card,Set.toFinite_toFinset,Set.toFinset_cardhave hv : M.verts.ncard = Fintype.card M.verts := by rw [Set.ncard_eq_toFinset_card M.verts, Set.toFinite_toFinset] exact Set.toFinset_card M.verts have he : M.edgeSet.ncard = Fintype.card M.edgeSet := by rw [Set.ncard_eq_toFinset_card M.edgeSet, Set.toFinite_toFinset] exact Set.toFinset_card M.edgeSet rw [hv, he, h1]
We obtain a perfect matching on the induced subgraph G[S], and push it forward via the inclusion map into G to obtain a matching M on G whose vertex set is S.
From the hypothesis hS, let P be a perfect matching on the induced subgraph G[S]. Pushing P forward along the canonical inclusion f : G[S] →g G yields a subgraph M = P.map f of G. Since f is injective, M is a matching in G. Furthermore, because P spans G[S], the vertex set of M is precisely S.
uses
Subtype.val_injective,SimpleGraph.Subgraph.map_vertsclassical obtain ⟨P, hP⟩ := hS let f : (G.induce S) →g G := { toFun := Subtype.val, map_rel' := by intro a b h; simpa using h } let M : G.Subgraph := P.map f have hf : Function.Injective f := fun a b h => Subtype.val_injective h have hMmatch : M.IsMatching := hP.1.map f hf have hMverts : M.verts = S := by rw [SimpleGraph.Subgraph.map_verts] ext v constructor · rintro ⟨x, -, rfl⟩; exact x.property · intro hv; exact ⟨⟨v, hv⟩, hP.2 ⟨v, hv⟩, rfl⟩
The matching M has exactly k edges. automation
Applying the helper lemma in1076_matching_twice_card to M gives 2 * |M.edgeSet| = |M.verts|. Substituting M.verts = S and |S| = 2k gives 2 * |M.edgeSet| = 2k, from which linear arithmetic closes the goal |M.edgeSet| = k.
uses
in1076_matching_twice_cardhave hMcard : M.edgeSet.ncard = k := by have h := in1076_matching_twice_card hMmatch rw [hMverts, hsize] at h omega
The matching M extends to a perfect matching Q on G, and any vertex in Sᶜ is matched by Q to another vertex in Sᶜ.
Because G is k-extendable and M is a matching of size k, M extends to a perfect matching Q of G. If some vertex a ∈ Sᶜ were matched by Q to a vertex b ∈ S, then since M spans S, b would already be matched in M to some vertex c ∈ S. Since M ≤ Q and Q is a matching, the incident edge to b in Q is unique, forcing c = a. But this contradicts c ∈ S and a ∈ Sᶜ. Thus, every neighbor of a in Q also belongs to Sᶜ.
obtain ⟨Q, hQ, hle⟩ := hG.2.2 M hMmatch hMcard have hmate {a b : V} (ha : a ∈ Sᶜ) (hab : Q.Adj a b) : b ∈ Sᶜ := by intro hb obtain ⟨c, hbc, -⟩ := hMmatch (v := b) (by rw [hMverts]; exact hb) have hQbc : Q.Adj b c := hle.2 hbc have hca : c = a := (hQ.1 (hQ.2 b)).unique hQbc hab.symm have hcS : c ∈ S := hMverts ▸ M.edge_vert hbc.symm exact ha (hca ▸ hcS)
The pullback subgraph R of Q along the inclusion of G[Sᶜ] into G is a perfect matching of G[Sᶜ].
We define R to be the pullback of Q under the inclusion g : G[Sᶜ] →g G. Since Q is a perfect matching of G and Q-edges incident to Sᶜ have both endpoints in Sᶜ, each vertex of G[Sᶜ] has a unique incident edge in R. Moreover, R spans G[Sᶜ] because Q spans G. Therefore, R is a perfect matching on G[Sᶜ].
uses
Subtype.extlet g : (G.induce Sᶜ) →g G := { toFun := Subtype.val, map_rel' := by intro a b h; simpa using h } let R : (G.induce Sᶜ).Subgraph := Q.comap g refine ⟨R, ?_⟩ constructor · intro a ha obtain ⟨b, hab, huniq⟩ := hQ.1 (hQ.2 a.val) let b' : {v : V // v ∈ Sᶜ} := ⟨b, hmate a.property hab⟩ refine ⟨b', ?_, ?_⟩ · exact ⟨Q.adj_sub hab, hab⟩ · intro c hc apply Subtype.ext exact huniq c.val hc.2 · intro a exact hQ.2 a.val
Sym2.ind- An induction principle for unordered pairs: any property that holds for all pairs s(x, y) holds for every element of Sym2.
Subtype.ext- Two elements of a subtype are equal if their underlying values are equal.
Fintype.card_congr- Equivalent types have the same finite cardinality.
Equiv.setCongr- Equal sets have canonically equivalent subtype types.
Set.toFinset_card- The cardinality of a set converted to a finset equals the finite type cardinality of the set as a subtype.
Fintype.card_sigma- The cardinality of a sigma type (disjoint union) is the sum of the cardinalities of the individual fibers.
Equiv.sigmaFiberEquiv- A domain type is canonically equivalent to the sigma type of its fibers over all elements of the codomain.
Nat.mul_comm- Multiplication of natural numbers is commutative.
Set.ncard_eq_toFinset_card- The set cardinality (ncard) of a finite set equals the cardinality of its finset representation.
Set.toFinite_toFinset- Connects the canonical finiteness proof of a set with a Fintype instance to its finset conversion.
Subtype.val_injective- The subtype embedding from a subtype to the ambient type is injective.
SimpleGraph.Subgraph.map_verts- The vertex set of the image subgraph under a graph homomorphism is the image of the original vertex set.
in1076_matching_twice_card- For any matching M in a subgraph of a finite graph, twice the number of edges of M equals the number of vertices of M.
- The source file begins with an auxiliary lemma, in1076_matching_twice_card, proving that any matching in a finite graph satisfies 2 * |M.edgeSet| = |M.verts|, which is then used to show that the induced matching on S has exactly k edges.
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.
lemma in1076_matching_twice_card {V : Type*} [Fintype V] {G : SimpleGraph V} {M : G.Subgraph} (h : M.IsMatching) : 2 * M.edgeSet.ncard = M.verts.ncard := by classical have key : ∀ e : M.edgeSet, Fintype.card {v : M.verts // h.toEdge v = e} = 2 := by rintro ⟨x, hx⟩ revert hx induction x using Sym2.ind with | _ a b => intro hx have hab : M.Adj a b := SimpleGraph.Subgraph.mem_edgeSet.mp hx have h1 : (⟨s(a, b), hx⟩ : M.edgeSet) = ⟨s(a, b), SimpleGraph.Subgraph.mem_edgeSet.mpr hab⟩ := Subtype.ext rfl have hEq : h.toEdge ⁻¹' {⟨s(a, b), hx⟩} = {⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} := by rw [h1] exact h.toEdge_preimage_singleton hab have hset2 : {v : M.verts | h.toEdge v = (⟨s(a, b), hx⟩ : M.edgeSet)} = ({⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} : Set M.verts) := by ext v have hmem := Set.ext_iff.mp hEq v simpa only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_ofPred_eq, Set.mem_insert_iff] using hmem calc Fintype.card {v : M.verts // h.toEdge v = (⟨s(a, b), hx⟩ : M.edgeSet)} = Fintype.card ↥({⟨a, hab.fst_mem⟩, ⟨b, hab.snd_mem⟩} : Set M.verts) := Fintype.card_congr (Equiv.setCongr hset2) _ = 2 := by rw [← Set.toFinset_card] have hne : (⟨a, hab.fst_mem⟩ : M.verts) ≠ ⟨b, hab.snd_mem⟩ := by simp [G.ne_of_adj (M.adj_sub hab)] simp [hne] have hsum : Fintype.card M.verts = ∑ e : M.edgeSet, Fintype.card {v : M.verts // h.toEdge v = e} := by rw [← Fintype.card_sigma] exact Fintype.card_congr (Equiv.sigmaFiberEquiv h.toEdge).symm have h1 : Fintype.card M.verts = 2 * Fintype.card M.edgeSet := by rw [hsum] simp [key, Nat.mul_comm] have hv : M.verts.ncard = Fintype.card M.verts := by rw [Set.ncard_eq_toFinset_card M.verts, Set.toFinite_toFinset] exact Set.toFinset_card M.verts have he : M.edgeSet.ncard = Fintype.card M.edgeSet := by rw [Set.ncard_eq_toFinset_card M.edgeSet, Set.toFinite_toFinset] exact Set.toFinset_card M.edgeSet rw [hv, he, h1]theorem extendible_matchable_two_k_vertices_complement_matchable {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (k : ℕ) (hG : is_k_extendable G k) (S : Set V) (hsize : S.ncard = 2 * k) (hS : ∃ M : (G.induce S).Subgraph, M.IsPerfectMatching) : ∃ P : (G.induce Sᶜ).Subgraph, P.IsPerfectMatching := by classical obtain ⟨P, hP⟩ := hS let f : (G.induce S) →g G := { toFun := Subtype.val, map_rel' := by intro a b h; simpa using h } let M : G.Subgraph := P.map f have hf : Function.Injective f := fun a b h => Subtype.val_injective h have hMmatch : M.IsMatching := hP.1.map f hf have hMverts : M.verts = S := by rw [SimpleGraph.Subgraph.map_verts] ext v constructor · rintro ⟨x, -, rfl⟩; exact x.property · intro hv; exact ⟨⟨v, hv⟩, hP.2 ⟨v, hv⟩, rfl⟩ have hMcard : M.edgeSet.ncard = k := by have h := in1076_matching_twice_card hMmatch rw [hMverts, hsize] at h omega obtain ⟨Q, hQ, hle⟩ := hG.2.2 M hMmatch hMcard have hmate {a b : V} (ha : a ∈ Sᶜ) (hab : Q.Adj a b) : b ∈ Sᶜ := by intro hb obtain ⟨c, hbc, -⟩ := hMmatch (v := b) (by rw [hMverts]; exact hb) have hQbc : Q.Adj b c := hle.2 hbc have hca : c = a := (hQ.1 (hQ.2 b)).unique hQbc hab.symm have hcS : c ∈ S := hMverts ▸ M.edge_vert hbc.symm exact ha (hca ▸ hcS) let g : (G.induce Sᶜ) →g G := { toFun := Subtype.val, map_rel' := by intro a b h; simpa using h } let R : (G.induce Sᶜ).Subgraph := Q.comap g refine ⟨R, ?_⟩ constructor · intro a ha obtain ⟨b, hab, huniq⟩ := hQ.1 (hQ.2 a.val) let b' : {v : V // v ∈ Sᶜ} := ⟨b, hmate a.property hab⟩ refine ⟨b', ?_, ?_⟩ · exact ⟨Q.adj_sub hab, hab⟩ · intro c hc apply Subtype.ext exact huniq c.val hc.2 · intro a exact hQ.2 a.val