AFTD Auto-Formalizing Theoretical Domains

four_odd_groups_star_forced_matching_obstruction

theoremverified

Under the displayed four-group star conditions, a partial matching forcing the center and leaving at most five vertices on the other side cannot extend to a perfect matching.

Statement

theorem four_odd_groups_star_forced_matching_obstruction
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (C : Finset V) (F : Fin 4 → Finset V)
    (hsub : ∀ i, F i ⊆ Cᶜ)
    (hodd : ∀ i, Odd (F i).card)
    (hdis : ∀ i j, i ≠ j → Disjoint (F i) (F j))
    (hanti : ∀ i j, i ≠ j → ∀ u ∈ F i, ∀ v ∈ F j, ¬ G.Adj u v)
    (hcover : Finset.univ.biUnion F = Cᶜ)
    (z : Fin 4) (x : V) (hx : x ∈ F z) (hzcard : (F z).card=5)
    (hstar : ∀ u ∈ F z, ∀ v ∈ F z, G.Adj u v → u=x ∨ v=x)
    (P T : G.Subgraph) (hP : P.IsPerfectMatching) (hT : T.IsMatching) (hTP : T ≤ P)
    (hxT : x ∈ T.verts) (hTsub : T.verts ⊆ ((C ∪ {x} : Finset V) : Set V))
    (hremain : ((C : Set V) \ T.verts).ncard ≤ 5) : False
Source
Balanced-cut k=7 reduction for OP-1957; https://arxiv.org/abs/2611.22690.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

The proof, explained

The theorem establishes that a partial matching T cannot extend to a perfect matching P under the given star conditions by exhibiting a Tutte-type matching obstruction. Removing the center vertex x from the star-configured odd group F z (of size 5) isolates its remaining 4 vertices into singletons, which together with the 3 other odd groups yield 7 pairwise disjoint odd components inside L = Cᶜ \ {x} with no edges to one another. By `odd_groups_budget_after_forced_matching`, any perfect matching extending T must match each of these 7 components to distinct vertices outside L not covered by T, requiring at least 7 such vertices in C \ T.verts, which contradicts the hypothesis that at most 5 remain.

  1. Define the domain L = Cᶜ \ {x}, the index set J = (Fin 4 \ {z}) ⊕ (F z \ {x}), and the family of sets B: B(inl j) = F j and B(inr v) = {v}.

    We remove the center vertex x from the star group F z to decompose it into isolated singletons, while retaining the other three groups intact. The domain L is the complement of C with x removed. We record the explicit membership conditions for elements of J.

    lines 14–22

      set_option maxHeartbeats 4000000 in
        classical
        let JL : Finset (Fin 4) := Finset.univ.erase z
        let JR : Finset V := (F z).erase x
        let J : Finset (Fin 4 ⊕ V) := JL.disjSum JR
        let B : Fin 4 ⊕ V → Finset V := Sum.elim F (fun v => {v})
        let L : Finset V := Cᶜ \ {x}
        have hleft : ∀ i, Sum.inl i ∈ J ↔ i ≠ z := by intro i; simp [J,JL]
        have hright : ∀ v, Sum.inr v ∈ J ↔ v ≠ x ∧ v ∈ F z := by intro v; simp [J,JR]
  2. The index set J has cardinality 7.

    The 4-element set Fin 4 minus {z} has 3 elements, and F z (which has 5 elements) minus {x} has 4 elements. The disjoint sum J has 3 + 4 = 7 elements.

    lines 23–29

    uses Finset.card_erase_add_one, Finset.mem_univ, Finset.card_univ, Fintype.card_fin, Finset.card_disjSum

        have hJcard : J.card = 7 := by
          have hl := Finset.card_erase_add_one (Finset.mem_univ z)
          have hr := Finset.card_erase_add_one hx
          simp only [Finset.card_univ,Fintype.card_fin] at hl
          dsimp [J,JL,JR]
          rw [Finset.card_disjSum]
          omega
  3. Every set in the family B is contained in L.

    For j ≠ z, F j is contained in Cᶜ and is disjoint from F z (which contains x), so F j ⊆ Cᶜ \ {x} = L. For v ∈ F z \ {x}, the singleton {v} is also in Cᶜ \ {x} = L.

    lines 30–47

    uses Finset.disjoint_left.mp, Finset.mem_sdiff.mpr

        have hJsub : ∀ i ∈ J, B i ⊆ L := by
          intro i hi
          cases i with
          | inl j =>
            have hj : j ≠ z := (hleft j).mp hi
            intro v hv
            have hvF : v ∈ F j := hv
            have hvC : v ∈ Cᶜ := hsub j hvF
            have hvx : v ≠ x := by
              intro he
              exact Finset.disjoint_left.mp (hdis j z hj) hvF (he.symm ▸ hx)
            exact Finset.mem_sdiff.mpr ⟨hvC,by simpa using hvx⟩
          | inr v =>
            have hv := (hright v).mp hi
            intro w hw
            have he : w=v := by simpa [B] using hw
            subst w
            exact Finset.mem_sdiff.mpr ⟨hsub z hv.2,by simpa using hv.1⟩
  4. Every set in the family B has odd cardinality.

    For j ≠ z, |B(inl j)| = |F j| is odd by the hypothesis hodd. For v ∈ F z \ {x}, |B(inr v)| = |{v}| = 1, which is odd.

    lines 48–52

        have hJodd : ∀ i ∈ J, Odd (B i).card := by
          intro i hi
          cases i with
          | inl j => exact hodd j
          | inr v => simp [B]
  5. The sets in B are pairwise disjoint.

    Two groups F a and F b are disjoint by hdis; a group F a (with a ≠ z) and a singleton {b} ⊆ F z are disjoint because F a and F z are disjoint; and two distinct singletons {a} and {b} are trivially disjoint.

    lines 53–77

    uses Finset.disjoint_left.mpr, Finset.disjoint_left.mp

        have hJdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (B i) (B j) := by
          intro i hi j hj hij
          cases i with
          | inl a =>
            cases j with
            | inl b => exact hdis a b (by intro h; apply hij; simp [h])
            | inr b =>
              have ha := (hleft a).mp hi
              have hb := (hright b).mp hj
              apply Finset.disjoint_left.mpr
              intro v hva hvb
              have he : v=b := by simpa [B] using hvb
              exact Finset.disjoint_left.mp (hdis a z ha) hva (he.symm ▸ hb.2)
          | inr a =>
            cases j with
            | inl b =>
              have ha := (hright a).mp hi
              have hb := (hleft b).mp hj
              apply Finset.disjoint_left.mpr
              intro v hva hvb
              have he : v=a := by simpa [B] using hva
              exact Finset.disjoint_left.mp (hdis b z hb) hvb (he.symm ▸ ha.2)
            | inr b =>
              have hab : a ≠ b := by intro h; apply hij; simp [h]
              simpa [B] using hab
  6. No edge exists between a vertex in B i and any other vertex in L \ B i.

    Every vertex v ∈ L belongs to some F j and satisfies v ≠ x. If B i = F a with a ≠ z, then j ≠ a and hanti forbids edges between F a and F j. If B i = {a} with a ∈ F z \ {x}, then if j ≠ z, hanti again forbids edges; while if j = z, any edge in F z must touch the star center x by hstar, but neither a nor v equals x.

    lines 78–99

    uses Finset.mem_sdiff.mp, Finset.mem_biUnion.mp, Ne.symm

        have hJanti : ∀ i ∈ J, ∀ u ∈ B i, ∀ v ∈ L, v ∉ B i → ¬ G.Adj u v := by
          intro i hi u hu v hv hvnot hadj
          have hvC : v ∈ Cᶜ := (Finset.mem_sdiff.mp hv).1
          have hvx : v ≠ x := by simpa using (Finset.mem_sdiff.mp hv).2
          have hvcover : v ∈ Finset.univ.biUnion F := by rw [hcover]; exact hvC
          obtain ⟨j,_,hvj⟩ := Finset.mem_biUnion.mp hvcover
          cases i with
          | inl a =>
            have huF : u ∈ F a := hu
            have haj : a ≠ j := by intro he; apply hvnot; simpa [B,he] using hvj
            exact hanti a j haj u huF v hvj hadj
          | inr a =>
            have ha := (hright a).mp hi
            have hua : u=a := by simpa [B] using hu
            subst u
            by_cases hj : j=z
            · subst j
              have hh := hstar a ha.2 v hvj hadj
              rcases hh with hh | hh
              · exact ha.1 hh
              · exact hvx hh
            · exact hanti z j (Ne.symm hj) a ha.2 v hvj hadj
  7. No vertex in any B i is covered by the partial matching T.

    The vertices covered by T are assumed to lie in C ∪ {x}, whereas every vertex in every B i belongs to L = Cᶜ \ {x}, which is disjoint from C ∪ {x}.

    lines 100–107

    uses Finset.mem_union.mp, Finset.mem_compl.mp, Finset.mem_sdiff.mp

        have hJfree : ∀ i ∈ J, ∀ u ∈ B i, u ∉ T.verts := by
          intro i hi u hu huT
          have huL := hJsub i hi hu
          have huCX := hTsub huT
          rcases Finset.mem_union.mp huCX with huC | hux
          · exact (Finset.mem_compl.mp (Finset.mem_sdiff.mp huL).1) huC
          · have hu' : u=x := by simpa using hux
            exact (Finset.mem_sdiff.mp huL).2 (by simpa [hu'])
  8. The number of odd groups |J| is at most the number of vertices outside L untouched by T.

    We apply the budget lemma `odd_groups_budget_after_forced_matching` to the family of 7 disjoint odd sets B in L, all of which are untouched by T and have no internal edges to other parts of L. Each such component requires at least one vertex outside L uncovered by T in any perfect matching extending T.

    lines 108–109

    uses odd_groups_budget_after_forced_matching

        have hbudget := odd_groups_budget_after_forced_matching G P T hP hT hTP J B L
          hJsub hJodd hJdis hJanti hJfree
  9. The number of vertices outside L untouched by T equals |C \ T.verts|.

    The complement of L = Cᶜ \ {x} is C ∪ {x}. Since x is already covered by T (hxT), the vertices in (C ∪ {x}) \ T.verts are precisely C \ T.verts.

    lines 110–118

    uses Set.ncard_coe_finset

        have hcount : ((Finset.univ \ L).filter (fun v => v ∉ T.verts)).card = ((C : Set V) \ T.verts).ncard := by
          have heq : (((Finset.univ \ L).filter (fun v => v ∉ T.verts)) : Set V) =
              (C : Set V) \ T.verts := by
            ext v
            by_cases ht : v ∈ T.verts
            · simp [ht]
            · have hne : v ≠ x := fun he => ht (he.symm ▸ hxT)
              simp [L,ht,hne]
          rw [← Set.ncard_coe_finset,heq]
  10. Derive False from the budget inequality.

    Substituting |J| = 7 and |C \ T.verts| into the budget inequality gives 7 ≤ |C \ T.verts|. Combined with the hypothesis hremain that |C \ T.verts| ≤ 5, this yields 7 ≤ 5, an arithmetic contradiction.

    lines 119–120

        rw [hJcard,hcount] at hbudget
        omega
Finset.card_disjSum
The cardinality of the disjoint sum of two finite sets is the sum of their cardinalities.
Finset.card_erase_add_one
Removing an element from a finite set yields a set whose cardinality plus 1 is the original cardinality.
Finset.card_univ
The cardinality of the universal finset of a finite type equals the cardinality of the type.
Finset.disjoint_left.mp
If two finite sets are disjoint, any element in the first does not belong to the second.
Finset.disjoint_left.mpr
If no element in the first set belongs to the second, then the two sets are disjoint.
Finset.mem_biUnion.mp
An element in a bounded union belongs to at least one of the indexed sets.
Finset.mem_compl.mp
An element in the complement of a set does not belong to that set.
Finset.mem_sdiff.mp
An element in the difference of two sets belongs to the first and not to the second.
Finset.mem_sdiff.mpr
An element belongs to the difference of two sets if it belongs to the first and not to the second.
Finset.mem_union.mp
An element in the union of two sets belongs to the first or to the second.
Finset.mem_univ
Every element of a finite type belongs to its universal finset.
Fintype.card_fin
The standard finite set Fin n has n elements.
Ne.symm
Inequality is symmetric: if a ≠ b then b ≠ a.
odd_groups_budget_after_forced_matching
In a graph with a partial matching extending to a perfect matching, the number of disjoint odd-sized vertex sets in L with no external edges in L and untouched by the partial matching is at most the number of vertices outside L untouched by the matching.
Set.ncard_coe_finset
The set cardinality of a coerced finset equals the finset cardinality.

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 four_odd_groups_star_forced_matching_obstruction    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)    (C : Finset V) (F : Fin 4 → Finset V)    (hsub : ∀ i, F i ⊆ Cᶜ)    (hodd : ∀ i, Odd (F i).card)    (hdis : ∀ i j, i ≠ j → Disjoint (F i) (F j))    (hanti : ∀ i j, i ≠ j → ∀ u ∈ F i, ∀ v ∈ F j, ¬ G.Adj u v)    (hcover : Finset.univ.biUnion F = Cᶜ)    (z : Fin 4) (x : V) (hx : x ∈ F z) (hzcard : (F z).card=5)    (hstar : ∀ u ∈ F z, ∀ v ∈ F z, G.Adj u v → u=x ∨ v=x)    (P T : G.Subgraph) (hP : P.IsPerfectMatching) (hT : T.IsMatching) (hTP : T ≤ P)    (hxT : x ∈ T.verts) (hTsub : T.verts ⊆ ((C ∪ {x} : Finset V) : Set V))    (hremain : ((C : Set V) \ T.verts).ncard ≤ 5) : False := by  set_option maxHeartbeats 4000000 in    classical    let JL : Finset (Fin 4) := Finset.univ.erase z    let JR : Finset V := (F z).erase x    let J : Finset (Fin 4 ⊕ V) := JL.disjSum JR    let B : Fin 4 ⊕ V → Finset V := Sum.elim F (fun v => {v})    let L : Finset V := Cᶜ \ {x}    have hleft : ∀ i, Sum.inl i ∈ J ↔ i ≠ z := by intro i; simp [J,JL]    have hright : ∀ v, Sum.inr v ∈ J ↔ v ≠ x ∧ v ∈ F z := by intro v; simp [J,JR]    have hJcard : J.card = 7 := by      have hl := Finset.card_erase_add_one (Finset.mem_univ z)      have hr := Finset.card_erase_add_one hx      simp only [Finset.card_univ,Fintype.card_fin] at hl      dsimp [J,JL,JR]      rw [Finset.card_disjSum]      omega    have hJsub : ∀ i ∈ J, B i ⊆ L := by      intro i hi      cases i with      | inl j =>        have hj : j ≠ z := (hleft j).mp hi        intro v hv        have hvF : v ∈ F j := hv        have hvC : v ∈ Cᶜ := hsub j hvF        have hvx : v ≠ x := by          intro he          exact Finset.disjoint_left.mp (hdis j z hj) hvF (he.symm ▸ hx)        exact Finset.mem_sdiff.mpr ⟨hvC,by simpa using hvx⟩      | inr v =>        have hv := (hright v).mp hi        intro w hw        have he : w=v := by simpa [B] using hw        subst w        exact Finset.mem_sdiff.mpr ⟨hsub z hv.2,by simpa using hv.1⟩    have hJodd : ∀ i ∈ J, Odd (B i).card := by      intro i hi      cases i with      | inl j => exact hodd j      | inr v => simp [B]    have hJdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (B i) (B j) := by      intro i hi j hj hij      cases i with      | inl a =>        cases j with        | inl b => exact hdis a b (by intro h; apply hij; simp [h])        | inr b =>          have ha := (hleft a).mp hi          have hb := (hright b).mp hj          apply Finset.disjoint_left.mpr          intro v hva hvb          have he : v=b := by simpa [B] using hvb          exact Finset.disjoint_left.mp (hdis a z ha) hva (he.symm ▸ hb.2)      | inr a =>        cases j with        | inl b =>          have ha := (hright a).mp hi          have hb := (hleft b).mp hj          apply Finset.disjoint_left.mpr          intro v hva hvb          have he : v=a := by simpa [B] using hva          exact Finset.disjoint_left.mp (hdis b z hb) hvb (he.symm ▸ ha.2)        | inr b =>          have hab : a ≠ b := by intro h; apply hij; simp [h]          simpa [B] using hab    have hJanti : ∀ i ∈ J, ∀ u ∈ B i, ∀ v ∈ L, v ∉ B i → ¬ G.Adj u v := by      intro i hi u hu v hv hvnot hadj      have hvC : v ∈ Cᶜ := (Finset.mem_sdiff.mp hv).1      have hvx : v ≠ x := by simpa using (Finset.mem_sdiff.mp hv).2      have hvcover : v ∈ Finset.univ.biUnion F := by rw [hcover]; exact hvC      obtain ⟨j,_,hvj⟩ := Finset.mem_biUnion.mp hvcover      cases i with      | inl a =>        have huF : u ∈ F a := hu        have haj : a ≠ j := by intro he; apply hvnot; simpa [B,he] using hvj        exact hanti a j haj u huF v hvj hadj      | inr a =>        have ha := (hright a).mp hi        have hua : u=a := by simpa [B] using hu        subst u        by_cases hj : j=z        · subst j          have hh := hstar a ha.2 v hvj hadj          rcases hh with hh | hh          · exact ha.1 hh          · exact hvx hh        · exact hanti z j (Ne.symm hj) a ha.2 v hvj hadj    have hJfree : ∀ i ∈ J, ∀ u ∈ B i, u ∉ T.verts := by      intro i hi u hu huT      have huL := hJsub i hi hu      have huCX := hTsub huT      rcases Finset.mem_union.mp huCX with huC | hux      · exact (Finset.mem_compl.mp (Finset.mem_sdiff.mp huL).1) huC      · have hu' : u=x := by simpa using hux        exact (Finset.mem_sdiff.mp huL).2 (by simpa [hu'])    have hbudget := odd_groups_budget_after_forced_matching G P T hP hT hTP J B L      hJsub hJodd hJdis hJanti hJfree    have hcount : ((Finset.univ \ L).filter (fun v => v ∉ T.verts)).card = ((C : Set V) \ T.verts).ncard := by      have heq : (((Finset.univ \ L).filter (fun v => v ∉ T.verts)) : Set V) =          (C : Set V) \ T.verts := by        ext v        by_cases ht : v ∈ T.verts        · simp [ht]        · have hne : v ≠ x := fun he => ht (he.symm ▸ hxT)          simp [L,ht,hne]      rw [← Set.ncard_coe_finset,heq]    rw [hJcard,hcount] at hbudget    omega
See it in the graphDiscuss this resultChallenge it