AFTD Auto-Formalizing Theoretical Domains

op1957_extendible_independence_of_complement_matching

theoremverified

A 4k-vertex k-extendible graph has independence number at most k if the complement of every k+1-vertex set contains a k-matching.

Statement

theorem op1957_extendible_independence_of_complement_matching
    (k : ℕ) (G : SimpleGraph (Fin (4*k)))
    (hext : is_k_extendable G k)
    (hmatcher : ∀ I : Finset (Fin (4*k)), I.card=k+1 →
      ∃ M : (G.induce {v | v ∉ I}).Subgraph, M.IsMatching ∧ M.edgeSet.ncard=k)
    (U : Finset (Fin (4*k)))
    (hind : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ¬ G.Adj u v) : U.card ≤ k
Source
OP-1957 independence-number reduction
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
Used by 3

The proof, explained

The theorem is proved by contradiction: assuming an independent set U has size greater than k, we select a subset I ⊆ U of size k + 1. By assumption, the complement of I contains a k-matching N covering 2k vertices, so the residual vertex set R = V(G) \ V(N) has size 2k and contains I. Because G is k-extendible, the induced subgraph G[R] has a perfect matching, which implies that |I| ≤ |R \ I| since the independent set I sends all its R-neighbors into R \ I. However, |R \ I| = 2k - (k + 1) = k - 1, giving the impossible inequality k + 1 ≤ k - 1.

  1. Assume for contradiction that |U| > k, and extract a subset I ⊆ U of size k + 1.

    We proceed by contradiction. If |U| > k, then |U| ≥ k + 1. By Finset.exists_subset_card_eq, the independent set U contains a subset I of cardinality exactly k + 1.

    lines 10–12

    uses Finset.exists_subset_card_eq

      classical
      by_contra hn
      obtain ⟨I,hIU,hI⟩ := Finset.exists_subset_card_eq (s:=U) (n:=k+1) (by omega)
  2. There exists a matching N in G with k edges whose vertices are disjoint from I.

    Applying the complement matching hypothesis to I yields a matching M of size k in the induced subgraph on V \ I. By induced_matching_lifts, M lifts to a matching N of the ambient graph G having k edges and vertices disjoint from I.

    lines 13–15

    uses induced_matching_lifts

      obtain ⟨M,hM,hMk⟩ := hmatcher I hI
      obtain ⟨N,hN,hNsub,hNk⟩ := induced_matching_lifts G {v | v ∉ I} M hM
      have hNk' : N.edgeSet.ncard=k := by omega
  3. The vertex set of the matching N contains 2k vertices.

    Since N is a matching with k edges, every edge contributes two distinct endpoints. By in1076_matching_twice_card, the vertex set of N has cardinality 2k, rewritten to finset cardinality via Set.ncard_eq_toFinset_card'.

    lines 16–19

    uses Set.ncard_eq_toFinset_card', in1076_matching_twice_card

      have hNcard : N.verts.toFinset.card=2*k := by
        rw [←Set.ncard_eq_toFinset_card']
        have hh := in1076_matching_twice_card hN
        omega
  4. I is a subset of the residual vertices R = V(G) \ V(N).

    Let R be the set of vertices outside the matching N. Because the vertices of N are disjoint from I, every vertex in I avoids V(N) and therefore belongs to R.

    lines 20–24

      let R := (Finset.univ : Finset (Fin (4*k))) \ N.verts.toFinset
      have hIR : I ⊆ R := by
        intro u hu
        have huN : u ∉ N.verts := fun h => hNsub h hu
        simp [R,huN]
  5. The induced subgraph G[R] has a perfect matching.

    Because G is k-extendible and N is a matching with k edges, N extends to a perfect matching of G. Consequently, by extendible_matching_residual_has_perfect_matching, the residual vertices outside N (which is exactly R) induce a subgraph possessing a perfect matching.

    lines 25–30

    uses extendible_matching_residual_has_perfect_matching

      have hmatch : ∃ P : (G.induce {v | v ∈ R}).Subgraph, P.IsPerfectMatching := by
        have hRset : {v | v ∈ R} = {v | v ∉ N.verts} := by
          ext v
          simp [R]
        rw [hRset]
        exact extendible_matching_residual_has_perfect_matching G k hext N hN hNk'
  6. Every neighbor of I in R belongs to R \ I.

    Suppose u ∈ I and v ∈ R are adjacent. Since I ⊆ U and U is an independent set, no two distinct vertices of I are adjacent in G. Therefore, v cannot belong to I, which means v ∈ R \ I by Finset.mem_sdiff.mpr.

    lines 31–35

    uses Finset.mem_sdiff.mpr

      have hcover : ∀ u ∈ I, ∀ v ∈ R, G.Adj u v → v ∈ R \ I := by
        intro u hu v hv hadj
        refine Finset.mem_sdiff.mpr ⟨hv,?_⟩
        intro hvI
        exact hind u (hIU hu) v (hIU hvI) hadj.ne hadj
  7. The size of I is at most the size of R \ I.

    By induced_perfect_matching_neighbors_card_bound, in any induced subgraph with a perfect matching, if all neighbors of a subset I ⊆ R lie in a set C ⊆ R, then |I| ≤ |C|. Setting C = R \ I gives the cardinality bound |I| ≤ |R \ I|.

    line 36

    uses induced_perfect_matching_neighbors_card_bound

      have hbound := induced_perfect_matching_neighbors_card_bound G R I (R \ I) hIR hcover hmatch
  8. The residual set R has cardinality 2k.

    The graph has 4k vertices in total by Finset.card_univ and Fintype.card_fin, and the matching N covers 2k vertices. By Finset.card_sdiff_of_subset and Finset.subset_univ, the complement R has size 4k - 2k = 2k.

    lines 37–40

    uses Finset.card_sdiff_of_subset, Finset.subset_univ, Finset.card_univ, Fintype.card_fin

      have hRcard : R.card=2*k := by
        dsimp [R]
        rw [Finset.card_sdiff_of_subset (Finset.subset_univ _),Finset.card_univ,Fintype.card_fin,hNcard]
        omega
  9. The cardinality bounds yield a contradiction, proving |U| ≤ k.

    By Finset.card_sdiff_add_card_inter, |R \ I| + |R ∩ I| = |R|. Since I ⊆ R, Finset.inter_eq_right.mpr gives R ∩ I = I, so |R \ I| + (k + 1) = 2k, which means |R \ I| = k - 1. Combined with the bound |I| ≤ |R \ I|, this gives k + 1 ≤ k - 1, which is impossible.

    lines 41–43

    uses Finset.card_sdiff_add_card_inter, Finset.inter_eq_right.mpr

      have hh := Finset.card_sdiff_add_card_inter R I
      rw [Finset.inter_eq_right.mpr hIR,hRcard,hI] at hh
      omega
Finset.exists_subset_card_eq
A finite set contains a subset of any specified cardinality up to its own size.
induced_matching_lifts
A matching in an induced subgraph lifts to a matching of the ambient graph with the same number of edges and vertices contained in the inducing vertex set.
Set.ncard_eq_toFinset_card'
The set cardinality (ncard) of a finite set equals the cardinality of its finset coercion.
in1076_matching_twice_card
The number of vertices covered by a matching is twice the number of edges in the matching.
extendible_matching_residual_has_perfect_matching
In a k-extendible graph, the residual subgraph induced on the vertices outside any k-edge matching has a perfect matching.
Finset.mem_sdiff.mpr
An element belongs to the set difference S \ T if it belongs to S and does not belong to T.
induced_perfect_matching_neighbors_card_bound
In an induced subgraph admitting a perfect matching, if all neighbors of a vertex subset T within the induced subgraph lie in C, then |T| ≤ |C|.
Finset.card_sdiff_of_subset
If S ⊆ T, the cardinality of the difference T \ S is |T| - |S|.
Finset.subset_univ
Every finset of elements from a finite type is a subset of the universal finset of all elements.
Finset.card_univ
The cardinality of the universal finset of a finite type equals the cardinality of the type.
Fintype.card_fin
The cardinality of Fin n is n.
Finset.card_sdiff_add_card_inter
For any two finite sets S and T, |S \ T| + |S ∩ T| = |S|.
Finset.inter_eq_right.mpr
If T ⊆ S, then S ∩ T = T.

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

set_option maxHeartbeats 1500000theorem op1957_extendible_independence_of_complement_matching    (k : ℕ) (G : SimpleGraph (Fin (4*k)))    (hext : is_k_extendable G k)    (hmatcher : ∀ I : Finset (Fin (4*k)), I.card=k+1 →      ∃ M : (G.induce {v | v ∉ I}).Subgraph, M.IsMatching ∧ M.edgeSet.ncard=k)    (U : Finset (Fin (4*k)))    (hind : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ¬ G.Adj u v) : U.card ≤ k := by  classical  by_contra hn  obtain ⟨I,hIU,hI⟩ := Finset.exists_subset_card_eq (s:=U) (n:=k+1) (by omega)  obtain ⟨M,hM,hMk⟩ := hmatcher I hI  obtain ⟨N,hN,hNsub,hNk⟩ := induced_matching_lifts G {v | v ∉ I} M hM  have hNk' : N.edgeSet.ncard=k := by omega  have hNcard : N.verts.toFinset.card=2*k := by    rw [←Set.ncard_eq_toFinset_card']    have hh := in1076_matching_twice_card hN    omega  let R := (Finset.univ : Finset (Fin (4*k))) \ N.verts.toFinset  have hIR : I ⊆ R := by    intro u hu    have huN : u ∉ N.verts := fun h => hNsub h hu    simp [R,huN]  have hmatch : ∃ P : (G.induce {v | v ∈ R}).Subgraph, P.IsPerfectMatching := by    have hRset : {v | v ∈ R} = {v | v ∉ N.verts} := by      ext v      simp [R]    rw [hRset]    exact extendible_matching_residual_has_perfect_matching G k hext N hN hNk'  have hcover : ∀ u ∈ I, ∀ v ∈ R, G.Adj u v → v ∈ R \ I := by    intro u hu v hv hadj    refine Finset.mem_sdiff.mpr ⟨hv,?_⟩    intro hvI    exact hind u (hIU hu) v (hIU hvI) hadj.ne hadj  have hbound := induced_perfect_matching_neighbors_card_bound G R I (R \ I) hIR hcover hmatch  have hRcard : R.card=2*k := by    dsimp [R]    rw [Finset.card_sdiff_of_subset (Finset.subset_univ _),Finset.card_univ,Fintype.card_fin,hNcard]    omega  have hh := Finset.card_sdiff_add_card_inter R I  rw [Finset.inter_eq_right.mpr hIR,hRcard,hI] at hh  omega
See it in the graphDiscuss this resultChallenge it