AFTD Auto-Formalizing Theoretical Domains

extendible_balanced_cut_matching_deficiency_two_odd_bound

theoremverified

Under the stated separator and degree conditions, a balanced side with a matching of k−2 edges has at most two odd components on the opposite side.

Statement

theorem extendible_balanced_cut_matching_deficiency_two_odd_bound
    (k : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
    (hext : is_k_extendable G k)
    (hsep : ∀ S P Q : Finset (Fin (4*k)), P.Nonempty → Q.Nonempty →
      Disjoint S P → Disjoint S Q → Disjoint P Q → S ∪ P ∪ Q = Finset.univ →
      (∀ u ∈ P, ∀ v ∈ Q, ¬ G.Adj u v) → 2*k ≤ S.card)
    (hdegree : ∀ v, 2*k+1 ≤ (G.neighborFinset v).card)
    (C : Finset (Fin (4*k))) (hcard : C.card = 2*k)
    (M : G.Subgraph)
    (hM : M.IsMatching) (hMC : M.verts ⊆ (C : Set (Fin (4*k)))) (hm : M.edgeSet.ncard + 2 = k) :
    (G.induce {v | v ∉ C}).oddComponents.ncard ≤ 2
Source
Balanced-cut matching obstruction for OP-1957; https://arxiv.org/abs/2611.22690.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
Used by 2

The proof, explained

The proof proceeds by contradiction, assuming that the induced subgraph H = G[Cᶜ] has more than two odd components. Since the complement of the balanced cut C has size 4k − 2k = 2k (which is even), the number of odd components of H must be even, ruling out any odd count. Every vertex has degree at least 2k + 1 while |C| = 2k, so each vertex in H has a neighbor outside C, implying that every connected component of H contains at least two vertices. Applying the component bound theorem for a matching of deficiency r = 2 then shows that H has at most r + 1 = 3 odd components. This forces the number of odd components to be 3, contradicting the parity requirement and establishing the bound.

  1. The complement set R = Cᶜ has cardinality 2k.

    We define R to be the complement of C in the 4k-element vertex set Fin(4k), and let H = G[R] be the induced subgraph. Because the total number of vertices is 4k and |C| = 2k, the cardinality of R is 4k − 2k = 2k.

    lines 12–19

    uses Nat.card_coe_set_eq, Set.ncard_compl, Set.ncard_coe_finset, Nat.card_eq_fintype_card, Fintype.card_fin

      classical
      let R : Set (Fin (4*k)) := {v | v ∉ C}
      let H := G.induce R
      have hsize : Nat.card R = 2*k := by
        rw [Nat.card_coe_set_eq]
        change ((C : Set (Fin (4*k)))ᶜ).ncard = 2*k
        rw [Set.ncard_compl, Set.ncard_coe_finset, Nat.card_eq_fintype_card, Fintype.card_fin, hcard]
        omega
  2. The number of odd components of H has the same parity as 2k, and is therefore even.

    By `SimpleGraph.odd_ncard_oddComponents`, the number of odd components of any finite graph has the same parity as the total number of vertices. Since |V(H)| = |R| = 2k is an even number, the number of odd components of H must also be even.

    lines 20–21

    uses SimpleGraph.odd_ncard_oddComponents, Nat.odd_iff

      have hpar := SimpleGraph.odd_ncard_oddComponents H
      rw [hsize, Nat.odd_iff, Nat.odd_iff] at hpar
  3. Assuming for contradiction that H has more than two odd components, there exists at least one odd component K.

    We assume for contradiction that the number of odd components of H is not at most 2. It follows that the number of odd components is at least 3, and in particular strictly positive. Since the set of odd components is non-empty, we can pick an odd connected component K of H.

    lines 22–25

    uses Set.ncard_pos, Set.toFinite

      by_contra hnot
      change ¬ H.oddComponents.ncard ≤ 2 at hnot
      have hq : 0 < H.oddComponents.ncard := by omega
      obtain ⟨K,hK⟩ := (Set.ncard_pos (Set.toFinite _)).mp hq
  4. The odd component K contains at least two distinct vertices (|K| ≥ 2).

    The component K is non-empty, so it contains some vertex a ∈ R. By the minimum degree condition, a has at least 2k + 1 neighbors in G. Since |C| = 2k, the neighborhood of a cannot be entirely contained in C, meaning a has a neighbor b ∉ C, so b ∈ R. Because b is adjacent to a in G[R], b belongs to the same connected component K. Furthermore, G has no self-loops, so a ≠ b. The two distinct vertices {a, b} are both in K, establishing that |K| ≥ 2.

    lines 26–49

    uses Finset.card_le_card, Finset.not_subset.mp, congrArg, Finset.mem_insert, Finset.mem_singleton, Set.mem_toFinset.mpr, Finset.card_pair, Set.ncard_eq_toFinset_card'

      have hlarge : 2 ≤ K.supp.ncard := by
        obtain ⟨a,ha⟩ := K.nonempty_supp
        have hneg : ¬ G.neighborFinset a.val ⊆ C := by
          intro h
          have hh := Finset.card_le_card h
          have hd := hdegree a.val
          omega
        obtain ⟨b,hbN,hbC⟩ := Finset.not_subset.mp hneg
        have hab : G.Adj a.val b := by simpa using hbN
        let b' : R := ⟨b,hbC⟩
        have hb : b' ∈ K.supp := K.mem_supp_of_adj_mem_supp ha hab
        have habne : a ≠ b' := by
          intro h
          have hv := congrArg Subtype.val h
          exact (G.ne_of_adj hab) hv
        have hpair : ({a,b'} : Finset R) ⊆ K.supp.toFinset := by
          intro x hx
          simp only [Finset.mem_insert, Finset.mem_singleton] at hx
          rcases hx with rfl | rfl
          · exact Set.mem_toFinset.mpr ha
          · exact Set.mem_toFinset.mpr hb
        have hh := Finset.card_le_card hpair
        rw [Finset.card_pair habne, ← Set.ncard_eq_toFinset_card'] at hh
        exact hh
  5. The number of odd components of H is at most 2.

    We apply `extendible_balanced_cut_internal_matching_component_bound` with deficiency r = 2 (since |E(M)| + 2 = k) and the odd component K satisfying |K| ≥ 2, obtaining that H has at most r + 1 = 3 odd components. Combined with the assumption that H has strictly more than 2 odd components, the count would have to be exactly 3. However, Step 2 showed that the number of odd components must be even. This contradiction completes the proof.

    lines 50–53

    uses extendible_balanced_cut_internal_matching_component_bound

      have hb := extendible_balanced_cut_internal_matching_component_bound k 2 (by omega)
        G hext hsep C hcard M hM hMC hm K hK hlarge
      change H.oddComponents.ncard ≤ 3 at hb
      omega
Nat.card_coe_set_eq
The cardinality of a subtype coerced from a set equals the set's cardinality `ncard`.
Set.ncard_compl
The set cardinality of the complement of a subset is the cardinality of the ambient type minus the subset's cardinality.
Set.ncard_coe_finset
The set cardinality `ncard` of a coerced finite set equals its `Finset` cardinality `card`.
Nat.card_eq_fintype_card
The cardinality `Nat.card` of a finite type equals its `Fintype.card`.
Fintype.card_fin
The cardinality of the standard finite type `Fin n` is n.
SimpleGraph.odd_ncard_oddComponents
In any finite graph, the number of odd connected components has the same parity as the total number of vertices.
Nat.odd_iff
A natural number is odd if and only if its remainder modulo 2 is 1.
Set.ncard_pos
A finite set has strictly positive cardinality if and only if it is non-empty.
Set.toFinite
A subset of a type with a finite coerced subtype is a finite set.
Finset.card_le_card
If one finite set is a subset of another, its cardinality is less than or equal to the other's.
Finset.not_subset.mp
If a finite set s is not a subset of t, there exists an element of s that is not in t.
congrArg
Applying a function to equal arguments produces equal values.
Finset.mem_insert
An element is in the insertion of b into s if and only if it equals b or is in s.
Finset.mem_singleton
An element is in the singleton {a} if and only if it equals a.
Set.mem_toFinset.mpr
An element belonging to a set also belongs to its converted finite set `toFinset`.
Finset.card_pair
A finite set consisting of two distinct elements has cardinality 2.
Set.ncard_eq_toFinset_card'
The set cardinality `ncard` of a set equals the cardinality of its converted finite set `toFinset`.
extendible_balanced_cut_internal_matching_component_bound
In a k-extendable graph satisfying the balanced cut separator condition, if C is a balanced cut of size 2k, M is a matching with vertices in C and deficiency r ≥ 1 (so |E(M)| + r = k), and some odd component K of G[Cᶜ] has at least r vertices, then G[Cᶜ] has at most r + 1 odd components.

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

theorem extendible_balanced_cut_matching_deficiency_two_odd_bound    (k : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]    (hext : is_k_extendable G k)    (hsep : ∀ S P Q : Finset (Fin (4*k)), P.Nonempty → Q.Nonempty →      Disjoint S P → Disjoint S Q → Disjoint P Q → S ∪ P ∪ Q = Finset.univ →      (∀ u ∈ P, ∀ v ∈ Q, ¬ G.Adj u v) → 2*k ≤ S.card)    (hdegree : ∀ v, 2*k+1 ≤ (G.neighborFinset v).card)    (C : Finset (Fin (4*k))) (hcard : C.card = 2*k)    (M : G.Subgraph)    (hM : M.IsMatching) (hMC : M.verts ⊆ (C : Set (Fin (4*k)))) (hm : M.edgeSet.ncard + 2 = k) :    (G.induce {v | v ∉ C}).oddComponents.ncard ≤ 2 := by  classical  let R : Set (Fin (4*k)) := {v | v ∉ C}  let H := G.induce R  have hsize : Nat.card R = 2*k := by    rw [Nat.card_coe_set_eq]    change ((C : Set (Fin (4*k)))ᶜ).ncard = 2*k    rw [Set.ncard_compl, Set.ncard_coe_finset, Nat.card_eq_fintype_card, Fintype.card_fin, hcard]    omega  have hpar := SimpleGraph.odd_ncard_oddComponents H  rw [hsize, Nat.odd_iff, Nat.odd_iff] at hpar  by_contra hnot  change ¬ H.oddComponents.ncard ≤ 2 at hnot  have hq : 0 < H.oddComponents.ncard := by omega  obtain ⟨K,hK⟩ := (Set.ncard_pos (Set.toFinite _)).mp hq  have hlarge : 2 ≤ K.supp.ncard := by    obtain ⟨a,ha⟩ := K.nonempty_supp    have hneg : ¬ G.neighborFinset a.val ⊆ C := by      intro h      have hh := Finset.card_le_card h      have hd := hdegree a.val      omega    obtain ⟨b,hbN,hbC⟩ := Finset.not_subset.mp hneg    have hab : G.Adj a.val b := by simpa using hbN    let b' : R := ⟨b,hbC⟩    have hb : b' ∈ K.supp := K.mem_supp_of_adj_mem_supp ha hab    have habne : a ≠ b' := by      intro h      have hv := congrArg Subtype.val h      exact (G.ne_of_adj hab) hv    have hpair : ({a,b'} : Finset R) ⊆ K.supp.toFinset := by      intro x hx      simp only [Finset.mem_insert, Finset.mem_singleton] at hx      rcases hx with rfl | rfl      · exact Set.mem_toFinset.mpr ha      · exact Set.mem_toFinset.mpr hb    have hh := Finset.card_le_card hpair    rw [Finset.card_pair habne, ← Set.ncard_eq_toFinset_card'] at hh    exact hh  have hb := extendible_balanced_cut_internal_matching_component_bound k 2 (by omega)    G hext hsep C hcard M hM hMC hm K hK hlarge  change H.oddComponents.ncard ≤ 3 at hb  omega
See it in the graphDiscuss this resultChallenge it