AFTD Auto-Formalizing Theoretical Domains

extendible_equal_cut_maximum_matching_deficiency_at_most_one

theoremverified

Under the displayed extendibility, minimum degree, independence and equal-half matching assumptions, a maximum internal matching has at least k−1 edges.

Statement

theorem extendible_equal_cut_maximum_matching_deficiency_at_most_one
    (k : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
    (hext : is_k_extendable G k)
    (hdegree : ∀ v, 2*k+1 ≤ (G.neighborFinset v).card)
    (C : Finset (Fin (4*k))) (hcard : C.card = 2*k)
    (M N : G.Subgraph) (hM : M.IsMatching) (hN : N.IsMatching)
    (hMC : M.verts ⊆ (C : Set (Fin (4*k))))
    (hNC : N.verts ⊆ ((C : Set (Fin (4*k)))ᶜ))
    (hmaxM : ∀ T : G.Subgraph, T.IsMatching → T.verts ⊆ (C : Set (Fin (4*k))) → T.edgeSet.ncard ≤ M.edgeSet.ncard)
    (hmaxN : ∀ T : G.Subgraph, T.IsMatching → T.verts ⊆ ((C : Set (Fin (4*k)))ᶜ) → T.edgeSet.ncard ≤ N.edgeSet.ncard)
    (heq : M.edgeSet.ncard = N.edgeSet.ncard)
    (hind : ∀ I : Finset (Fin (4*k)),
      (∀ x ∈ I, ∀ y ∈ I, x ≠ y → ¬ G.Adj x y) → I.card ≤ k) :
    k ≤ M.edgeSet.ncard + 1
Source
Balanced-cut reduction for OP-1957; https://arxiv.org/abs/1011.3384.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 7
Used by 5

The proof, explained

The proof bounds the deficiency of a maximum matching M within a balanced cut C of size 2k by reducing to balanced_cut_near_perfect_of_incidence_bounds. Under the assumption that the deficiency r = k − |M| is at least 2, the unmatched vertices U in C form an independent set of size 2r. The internal degrees from U into C are bounded by 2r(k − 2r + 1) using the maximality of M, while the crossing degrees into Cᶜ are bounded by 2rk + 2r because k-extendibility forbids crossing edges from U having adjacent endpoints in Cᶜ. These two incidence bounds rule out r ≥ 2, proving |M| ≥ k − 1.

  1. Define the vertex sets D = V(M), U = C \ D, and R = Cᶜ, and note that D ⊆ C, U ⊆ C, and vertices in U are unmatched by M.

    We define D as the vertices covered by M, U = C \ D as the unmatched vertices in C, and R as the complement Cᶜ. Since M is supported on C, D ⊆ C, which implies U ⊆ C via Finset.sdiff_subset. By definition of set difference (Finset.mem_sdiff.mp), no vertex in U belongs to V(M).

    lines 15–25

    uses Finset.sdiff_subset, Finset.mem_sdiff.mp

      set_option maxHeartbeats 4000000 in
        classical
        let D : Finset (Fin (4*k)) := M.verts.toFinset
        let U : Finset (Fin (4*k)) := C \ D
        let R : Finset (Fin (4*k)) := Cᶜ
        have hDC : D ⊆ C := by intro x hx; exact hMC (by simpa [D] using hx)
        have hUC : U ⊆ C := Finset.sdiff_subset
        have hUn : ∀ x ∈ U, x ∉ M.verts := by
          intro x hx
          have hx' := (Finset.mem_sdiff.mp hx).2
          simpa [D] using hx'
  2. The set of unmatched vertices U is an independent set of size at most k.

    Because M is a maximum matching supported on C, no two vertices in U can be adjacent: if they were, adding that edge would yield a larger matching in C. This independence is established by maximum_matching_unmatched_independent. Since every independent set has size at most k by hypothesis, |U| ≤ k.

    lines 26–29

    uses maximum_matching_unmatched_independent

        have hUind : ∀ x ∈ U, ∀ y ∈ U, x ≠ y → ¬ G.Adj x y := by
          intro x hx y hy hne
          exact maximum_matching_unmatched_independent G C M hM hMC hmaxM x (hUC hx) (hUn x hx) y (hUC hy) (hUn y hy)
        have hindU : U.card ≤ k := hind U hUind
  3. The complement cut R = Cᶜ has size 2k, and the matching N is supported on R.

    Since the whole graph has 4k vertices, the complement R of the 2k-element cut C has cardinality 4k - 2k = 2k by Finset.card_compl and Fintype.card_fin. The hypothesis that N is supported on Cᶜ directly gives V(N) ⊆ R.

    lines 30–36

    uses Finset.card_compl, Fintype.card_fin

        have hRcard : R.card = 2*k := by
          have hh := Finset.card_compl C
          simp only [Fintype.card_fin] at hh
          dsimp [R]
          omega
        have hRset : (R : Set (Fin (4*k))) = (C : Set (Fin (4*k)))ᶜ := by ext x; simp [R]
        have hNR : N.verts ⊆ (R : Set (Fin (4*k))) := by simpa [hRset] using hNC
  4. To show |M| ≥ k - 1, it suffices to assume deficiency r = k - |M| ≥ 2 and establish upper bounds on the internal and crossing degree sums of U.

    We apply balanced_cut_near_perfect_of_incidence_bounds. Its first precondition |U| ≤ k is verified from the independence bound on U. The second precondition requires showing that for any deficiency r ≥ 2 with |M| + r = k, the internal degree sum from U into C is at most 2r(k - 2r + 1) and the crossing degree sum from U into Cᶜ is at most 2rk + 2r. We introduce r, hr : 2 ≤ r, and hm : |M| + r = k.

    lines 37–39

    uses balanced_cut_near_perfect_of_incidence_bounds

        apply balanced_cut_near_perfect_of_incidence_bounds k G hdegree C hcard M hM hMC
        · simpa [U,D] using hindU
        · intro r hr hm
  5. The matched set D has size 2|M| and the unmatched set U has size 2r.

    Since M is a matching, its vertex set has size |D| = 2|M| by in1076_matching_twice_card and Set.ncard_eq_toFinset_card'. Since D ⊆ C and |C| = 2k, Finset.card_sdiff_add_card_eq_card shows that |U| = |C| - |D| = 2k - 2|M| = 2(k - |M|) = 2r.

    lines 40–47

    uses in1076_matching_twice_card, Set.ncard_eq_toFinset_card', Finset.card_sdiff_add_card_eq_card

          have hDcard : D.card = 2*M.edgeSet.ncard := by
            dsimp [D]
            rw [← Set.ncard_eq_toFinset_card']
            exact (in1076_matching_twice_card hM).symm
          have hUcard : U.card = 2*r := by
            have hh := Finset.card_sdiff_add_card_eq_card hDC
            dsimp [U]
            omega
  6. The sum of degrees from U into C is at most 2r(k - 2r + 1).

    This is given directly by maximum_matching_uncovered_incidence_independence_bound, using the facts that M is a maximum matching in C, U is the uncovered set of size 2r, |C| = 2k, and the graph has independence number at most k.

    lines 48–49

    uses maximum_matching_uncovered_incidence_independence_bound

          have hstar := maximum_matching_uncovered_incidence_independence_bound G C U M hM hMC hmaxM
            (by rfl) (2*r) k (by omega) hUcard hcard hind
  7. No two crossing edges from distinct vertices in U to R have adjacent endpoints in R.

    Suppose for contradiction that distinct u, v ∈ U are adjacent to x, y ∈ R respectively with x ~ y. Since x, y ∉ C, the graph is k-extendable with minimum degree at least 2k, and M, N are equal-sized maximum matchings with deficiency r ≥ 2 (so |M| + 2 ≤ k), two_crossing_adjacent_endpoints_impossible proves that such a crossing adjacent pair cannot exist.

    lines 50–57

    uses two_crossing_adjacent_endpoints_impossible

          have hforbid : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ∀ x ∈ R, ∀ y ∈ R,
              G.Adj u x → G.Adj v y → ¬ G.Adj x y := by
            intro u hu v hv huv x hx y hy hux hvy hxy
            have hxC : x ∉ C := by simpa [R] using hx
            have hyC : y ∉ C := by simpa [R] using hy
            exact two_crossing_adjacent_endpoints_impossible k G hext (by intro z; have hh := hdegree z; omega)
              C hcard M N hM hN hMC hNC hmaxM hmaxN heq (by omega)
              u v x y (hUC hu) (hUC hv) huv (hUn u hu) (hUn v hv) hxC hyC hux hvy hxy
  8. The sum of crossing degrees from U into R is at most 2rk + 2r.

    Applying no_two_crossing_matching_independence_incidence_bound with the forbidden adjacent-endpoints configuration, the matching N in R of size k - r, and the independence bound at most k yields the upper bound ∑_{u ∈ U} |N(u) ∩ R| ≤ 2rk + 2r.

    lines 58–59

    uses no_two_crossing_matching_independence_incidence_bound

          have hcross := no_two_crossing_matching_independence_incidence_bound G U R r k (by omega)
            hUcard hRcard N hN hNR (by omega) hforbid hind
  9. Both required incidence bounds hold, concluding the proof.

    Splitting the conjunction of the two bounds and rewriting U, D, and R with their definitions discharges the goal using the internal bound hstar and the crossing bound hcross.

    lines 60–62

          constructor
          · simpa [U,D] using hstar
          · simpa [U,D,R] using hcross
Finset.sdiff_subset
For any sets s and t, s \ t ⊆ s.
Finset.mem_sdiff.mp
If x ∈ s \ t, then x ∈ s and x ∉ t.
maximum_matching_unmatched_independent
In any graph, the unmatched vertices with respect to a maximum matching in an induced subgraph form an independent set.
Finset.card_compl
The cardinality of the complement of a subset s in a finite type is the size of the whole type minus |s|.
Fintype.card_fin
The cardinality of Fin n is n.
balanced_cut_near_perfect_of_incidence_bounds
In a graph on 4k vertices with minimum degree at least 2k + 1 and a balanced cut C of size 2k, if the set of unmatched vertices in C has size at most k and satisfies specific degree-sum bounds into C and Cᶜ whenever deficiency r ≥ 2, then any maximum matching in C has deficiency at most 1 (size at least k - 1).
Set.ncard_eq_toFinset_card'
For a finite set s, its set cardinality s.ncard equals s.toFinset.card.
in1076_matching_twice_card
For any matching M, the number of vertices covered by M is twice the number of edges in M.
Finset.card_sdiff_add_card_eq_card
If s ⊆ t, then |t \ s| + |s| = |t|.
maximum_matching_uncovered_incidence_independence_bound
If M is a maximum matching in C and U = C \ V(M) has size t, then the sum of internal degrees ∑_{u ∈ U} |N(u) ∩ C| is at most t(k - t + 1), provided the graph's independence number is at most k.
two_crossing_adjacent_endpoints_impossible
In a k-extendable graph on 4k vertices with minimum degree at least 2k and balanced cut C, two distinct unmatched vertices in C cannot have crossing edges to adjacent endpoints in Cᶜ when deficiency is at least 2.
no_two_crossing_matching_independence_incidence_bound
If no two crossing edges from U to R have adjacent endpoints in R, then ∑_{u ∈ U} |N(u) ∩ R| ≤ 2rk + 2r, given an internal matching of size k - r in R and independence number at most k.

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_equal_cut_maximum_matching_deficiency_at_most_one    (k : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]    (hext : is_k_extendable G k)    (hdegree : ∀ v, 2*k+1 ≤ (G.neighborFinset v).card)    (C : Finset (Fin (4*k))) (hcard : C.card = 2*k)    (M N : G.Subgraph) (hM : M.IsMatching) (hN : N.IsMatching)    (hMC : M.verts ⊆ (C : Set (Fin (4*k))))    (hNC : N.verts ⊆ ((C : Set (Fin (4*k)))ᶜ))    (hmaxM : ∀ T : G.Subgraph, T.IsMatching → T.verts ⊆ (C : Set (Fin (4*k))) → T.edgeSet.ncard ≤ M.edgeSet.ncard)    (hmaxN : ∀ T : G.Subgraph, T.IsMatching → T.verts ⊆ ((C : Set (Fin (4*k)))ᶜ) → T.edgeSet.ncard ≤ N.edgeSet.ncard)    (heq : M.edgeSet.ncard = N.edgeSet.ncard)    (hind : ∀ I : Finset (Fin (4*k)),      (∀ x ∈ I, ∀ y ∈ I, x ≠ y → ¬ G.Adj x y) → I.card ≤ k) :    k ≤ M.edgeSet.ncard + 1 := by  set_option maxHeartbeats 4000000 in    classical    let D : Finset (Fin (4*k)) := M.verts.toFinset    let U : Finset (Fin (4*k)) := C \ D    let R : Finset (Fin (4*k)) := Cᶜ    have hDC : D ⊆ C := by intro x hx; exact hMC (by simpa [D] using hx)    have hUC : U ⊆ C := Finset.sdiff_subset    have hUn : ∀ x ∈ U, x ∉ M.verts := by      intro x hx      have hx' := (Finset.mem_sdiff.mp hx).2      simpa [D] using hx'    have hUind : ∀ x ∈ U, ∀ y ∈ U, x ≠ y → ¬ G.Adj x y := by      intro x hx y hy hne      exact maximum_matching_unmatched_independent G C M hM hMC hmaxM x (hUC hx) (hUn x hx) y (hUC hy) (hUn y hy)    have hindU : U.card ≤ k := hind U hUind    have hRcard : R.card = 2*k := by      have hh := Finset.card_compl C      simp only [Fintype.card_fin] at hh      dsimp [R]      omega    have hRset : (R : Set (Fin (4*k))) = (C : Set (Fin (4*k)))ᶜ := by ext x; simp [R]    have hNR : N.verts ⊆ (R : Set (Fin (4*k))) := by simpa [hRset] using hNC    apply balanced_cut_near_perfect_of_incidence_bounds k G hdegree C hcard M hM hMC    · simpa [U,D] using hindU    · intro r hr hm      have hDcard : D.card = 2*M.edgeSet.ncard := by        dsimp [D]        rw [← Set.ncard_eq_toFinset_card']        exact (in1076_matching_twice_card hM).symm      have hUcard : U.card = 2*r := by        have hh := Finset.card_sdiff_add_card_eq_card hDC        dsimp [U]        omega      have hstar := maximum_matching_uncovered_incidence_independence_bound G C U M hM hMC hmaxM        (by rfl) (2*r) k (by omega) hUcard hcard hind      have hforbid : ∀ u ∈ U, ∀ v ∈ U, u ≠ v → ∀ x ∈ R, ∀ y ∈ R,          G.Adj u x → G.Adj v y → ¬ G.Adj x y := by        intro u hu v hv huv x hx y hy hux hvy hxy        have hxC : x ∉ C := by simpa [R] using hx        have hyC : y ∉ C := by simpa [R] using hy        exact two_crossing_adjacent_endpoints_impossible k G hext (by intro z; have hh := hdegree z; omega)          C hcard M N hM hN hMC hNC hmaxM hmaxN heq (by omega)          u v x y (hUC hu) (hUC hv) huv (hUn u hu) (hUn v hv) hxC hyC hux hvy hxy      have hcross := no_two_crossing_matching_independence_incidence_bound G U R r k (by omega)        hUcard hRcard N hN hNR (by omega) hforbid hind      constructor      · simpa [U,D] using hstar      · simpa [U,D,R] using hcross
See it in the graphDiscuss this resultChallenge it