AFTD Auto-Formalizing Theoretical Domains

boundary_five_odd_saturated_empty_barrier_force_patterns

theoremverified

Under the displayed saturated five-by-odd block, degree, separator and B-block connectedness hypotheses, an empty-separator forced-edge residual with two odd endpoint shores yields one of the three stated defect patterns.

Statement

theorem boundary_five_odd_saturated_empty_barrier_force_patterns
    (k c : ℕ) (hc : 7 ≤ c) (hcodd : Odd c) (hkc : c ≤ k)
    (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
    (A B C D : Finset (Fin (4*k)))
    (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D)
    (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D)
    (hcover : A ∪ B ∪ C ∪ D = Finset.univ)
    (hA : A.card=5) (hB : B.card=2*k-5) (hC : C.card=c) (hD : D.card=2*k-c)
    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)
    (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d)
    (hconnB : (G.induce {v | v ∈ B}).Connected)
    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)
    (hsep : ∀ X U V : Finset (Fin (4*k)), U.Nonempty → V.Nonempty →
      Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ →
      (∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → 2*k ≤ X.card)
    (x p q : Fin (4*k)) (hx : x ∈ A)
    (hp : p ∈ C) (hq : q ∈ C) (hpq : p ≠ q)
    (hxp : ¬ G.Adj x p) (hxq : ¬ G.Adj x q)
    (hfull : ∀ y ∈ C, y ≠ p → y ≠ q → G.Adj x y)
    (hsatA : ∀ a ∈ A, a ≠ x → G.Adj x a)
    (hsatD : ∀ d ∈ D, G.Adj x d)
    (y : Fin (4*k)) (hy : y ∈ C) (hyp : y ≠ p) (hyq : y ≠ q)
    (X Y U : Finset (Fin (4*k))) (hXY : Disjoint X Y)
    (hXU : Disjoint X U) (hYU : Disjoint Y U)
    (hsize : X.card + Y.card + U.card = 2*k) (hxX : x ∈ X) (hyY : y ∈ Y)
    (hoddX : Odd X.card) (hoddY : Odd Y.card)
    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)
    (hanti : ∀ a ∈ U, ∀ b ∈ X, ¬ G.Adj a b) :
    (∃ r ∈ ({p,q} : Finset (Fin (4*k))), ∃ U ⊆ A.erase x, U.card=2 ∧
      ∀ a ∈ U, ¬ G.Adj a y ∧ ¬ G.Adj a r) ∨
    (∀ a ∈ A.erase x, ¬ G.Adj a y) ∨
    (G.Adj p q ∧ (G.Adj y p ∨ G.Adj y q) ∧
      ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=c-4 ∧
        (∀ b ∈ U, ¬ G.Adj b p ∧ ¬ G.Adj b q ∧ ¬ G.Adj b y) ∧
        (∀ z ∈ Z, ¬ G.Adj z p ∧ ¬ G.Adj z q ∧ ¬ G.Adj z y))
Source
OP-1957; saturated barrier graph-to-count reduction.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • boundary_five_odd_saturated_two_odd_shores_force_patternsUnder the displayed five-by-odd block, degree, separator, B-block connectedness and saturation hypotheses, two disjoint odd shores of…
  • cFor a group $G$ and an element $s \in G$, the local count $c_G(s)$ is the cardinality of the set of elements $g \in G$ such that…
Used by 2

The proof, explained

Under the saturated 5-by-odd block, separator, and degree conditions, we are given two odd shores X and Y with a single cross edge (x, y) between them, and an anti-neighbourhood reservoir U disjoint from X and Y such that |X| + |Y| + |U| = 2k. The strategy is to absorb U into Y to reduce to the two-odd-shores setting. By parity, |U| is even because the total size is 2k and |X| and |Y| are odd, so Y ∪ U is an odd shore with the exact same unique cross edge to X. Applying the two-odd-shores classification theorem boundary_five_odd_saturated_two_odd_shores_force_patterns to X and Y ∪ U yields the conclusion.

  1. The cardinality of the reservoir set U is even.

    Since |X| and |Y| are both odd, their cardinalities are of the form 2a + 1 and 2b + 1. Case splitting on the parity of |U| via Nat.even_or_odd, if |U| were odd (2c + 1), the sum |X| + |Y| + |U| would equal 2(a + b + c + 1) + 1, contradicting the assumption that the total size is the even number 2k; hence |U| must be even.

    lines 13–20

    uses Nat.even_or_odd

      classical
      have hu : Even U.card := by
        obtain ⟨a,ha⟩ := hoddX
        obtain ⟨b,hb⟩ := hoddY
        rcases Nat.even_or_odd U.card with h | h
        · exact h
        · obtain ⟨c,hc⟩ := h
          omega
  2. The union Y ∪ U has odd cardinality.

    Because Y and U are disjoint, Finset.card_union_of_disjoint shows that |Y ∪ U| = |Y| + |U|. Adding the even number |U| to the odd number |Y| yields an odd cardinality.

    lines 21–23

    uses Finset.card_union_of_disjoint

      have hyu : Odd (Y ∪ U).card := by
        rw [Finset.card_union_of_disjoint hYU]
        exact hoddY.add_even hu
  3. The combined size |X| + |Y ∪ U| equals 2k.

    Rewriting |Y ∪ U| as |Y| + |U| by Finset.card_union_of_disjoint, the equality |X| + (|Y| + |U|) = 2k is immediate from the hypothesis |X| + |Y| + |U| = 2k using linear integer arithmetic.

    lines 24–26

    uses Finset.card_union_of_disjoint

      have hsz : X.card+(Y ∪ U).card=2*k := by
        rw [Finset.card_union_of_disjoint hYU]
        omega
  4. X is disjoint from Y ∪ U, and the membership conditions x ∈ X and y ∈ Y ∪ U hold.

    Using refine to establish the conjunction, y ∈ Y ∪ U follows from y ∈ Y via Finset.mem_union_left. Disjointness of X and Y ∪ U is shown by taking any element z in both sets: by Finset.mem_union.mp, z is in Y or in U, contradicting the disjointness of X and Y (via Finset.disjoint_left.mp) or of X and U.

    lines 27–32

    uses Finset.disjoint_left.mp, Finset.disjoint_left.mpr, Finset.mem_union.mp, Finset.mem_union_left

      refine ⟨?_,hsz,hx,Finset.mem_union_left U hy,hyu,?_⟩
      · apply Finset.disjoint_left.mpr
        intro z hzx hz
        rcases Finset.mem_union.mp hz with hzy | hzu
        · exact Finset.disjoint_left.mp hXY hzx hzy
        · exact Finset.disjoint_left.mp hXU hzx hzu
  5. Any edge between X and Y ∪ U must connect x and y.

    Let a ∈ X and b ∈ Y ∪ U be adjacent. By Finset.mem_union.mp, b is either in Y or in U. If b ∈ Y, the cross-edge hypothesis hcross forces a = x and b = y. If b ∈ U, the adjacency contradicts the hypothesis hanti that there are no edges between U and X, yielding False by False.elim.

    lines 33–36

    uses False.elim, Finset.mem_union.mp

      · intro a ha b hb hab
        rcases Finset.mem_union.mp hb with hb | hb
        · exact hcross a ha b hb hab
        · exact False.elim (hanti b hb a ha hab.symm)
  6. The reservoir set U is absorbed into Y to form an odd shore Y ∪ U disjoint from X, of total size |X| + |Y ∪ U| = 2k, such that the only cross edge to X is between x and y.

    We apply the helper lemma in1159_absorb_even_reservoir_of_even_total to merge Y and U into a single shore Y ∪ U satisfying all the two-odd-shores conditions with X.

    lines 73–76

    uses in1159_absorb_even_reservoir_of_even_total

      classical
      obtain ⟨hXW,hWsize,_,hyW,hWodd,hXWcross⟩ :=
        in1159_absorb_even_reservoir_of_even_total G X Y U x y k hXY hXU hYU hsize
          hxX hyY hcross hanti hoddX hoddY
  7. One of the three defect patterns holds.

    We apply the two-odd-shores classification theorem boundary_five_odd_saturated_two_odd_shores_force_patterns to the graph G with partition (A, B, C, D) and the odd shores X and Y ∪ U. Since all separator, degree, connectivity, and cross-edge conditions are satisfied, one of the three defect patterns holds.

    lines 77–80

    uses boundary_five_odd_saturated_two_odd_shores_force_patterns

      exact boundary_five_odd_saturated_two_odd_shores_force_patterns k c hc hcodd hkc G A B C D
        hAB hAC hAD hBC hBD hCD hcover hA hB hC hD hnoAB hnoCD hconnB hdegree hsep
        x p q hx hp hq hpq hxp hxq hfull hsatA hsatD y hy hyp hyq
        X (Y ∪ U) hXW hWsize hxX hyW hoddX hWodd hXWcross
Nat.even_or_odd
Every natural number is either even or odd.
Finset.card_union_of_disjoint
The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Finset.mem_union_left
An element belonging to a finite set s also belongs to the union of s with any finite set t.
Finset.disjoint_left.mpr
Two finite sets are disjoint if no element of the first set belongs to the second set.
Finset.mem_union.mp
An element in the union of two sets belongs to the first set or to the second set.
Finset.disjoint_left.mp
If two finite sets are disjoint, then no element of the first set belongs to the second set.
False.elim
From a false proposition (contradiction), any proposition follows.
in1159_absorb_even_reservoir_of_even_total
For pairwise disjoint vertex sets X, Y, and U in a graph with |X| + |Y| + |U| = 2k, if |X| and |Y| are odd, the only edge between X and Y is between x ∈ X and y ∈ Y, and there are no edges between X and U, then X and Y ∪ U are disjoint, have total size 2k, Y ∪ U has odd size and contains y, and the only edge between X and Y ∪ U is between x and y.
boundary_five_odd_saturated_two_odd_shores_force_patterns
Under the saturated 5-by-c block structure, degree bounds, connectivity, and separator hypotheses, if two disjoint odd sets X and Y have total size 2k and have a single cross edge between x ∈ X and y ∈ Y, then one of the three defect patterns holds.

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 in1159_absorb_even_reservoir_of_even_total    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)    (X Y U : Finset V) (x y : V) (k : ℕ)    (hXY : Disjoint X Y) (hXU : Disjoint X U) (hYU : Disjoint Y U)    (hsize : X.card+Y.card+U.card=2*k)    (hx : x ∈ X) (hy : y ∈ Y)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hanti : ∀ a ∈ U, ∀ b ∈ X, ¬ G.Adj a b)    (hoddX : Odd X.card) (hoddY : Odd Y.card) :    Disjoint X (Y ∪ U) ∧ X.card+(Y ∪ U).card=2*k ∧    x ∈ X ∧ y ∈ Y ∪ U ∧ Odd (Y ∪ U).card ∧    (∀ a ∈ X, ∀ b ∈ Y ∪ U, G.Adj a b → a=x ∧ b=y) := by  classical  have hu : Even U.card := by    obtain ⟨a,ha⟩ := hoddX    obtain ⟨b,hb⟩ := hoddY    rcases Nat.even_or_odd U.card with h | h    · exact h    · obtain ⟨c,hc⟩ := h      omega  have hyu : Odd (Y ∪ U).card := by    rw [Finset.card_union_of_disjoint hYU]    exact hoddY.add_even hu  have hsz : X.card+(Y ∪ U).card=2*k := by    rw [Finset.card_union_of_disjoint hYU]    omega  refine ⟨?_,hsz,hx,Finset.mem_union_left U hy,hyu,?_⟩  · apply Finset.disjoint_left.mpr    intro z hzx hz    rcases Finset.mem_union.mp hz with hzy | hzu    · exact Finset.disjoint_left.mp hXY hzx hzy    · exact Finset.disjoint_left.mp hXU hzx hzu  · intro a ha b hb hab    rcases Finset.mem_union.mp hb with hb | hb    · exact hcross a ha b hb hab    · exact False.elim (hanti b hb a ha hab.symm)theorem boundary_five_odd_saturated_empty_barrier_force_patterns    (k c : ℕ) (hc : 7 ≤ c) (hcodd : Odd c) (hkc : c ≤ k)    (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]    (A B C D : Finset (Fin (4*k)))    (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D)    (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D)    (hcover : A ∪ B ∪ C ∪ D = Finset.univ)    (hA : A.card=5) (hB : B.card=2*k-5) (hC : C.card=c) (hD : D.card=2*k-c)    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)    (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d)    (hconnB : (G.induce {v | v ∈ B}).Connected)    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)    (hsep : ∀ X U V : Finset (Fin (4*k)), U.Nonempty → V.Nonempty →      Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ →      (∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → 2*k ≤ X.card)    (x p q : Fin (4*k)) (hx : x ∈ A)    (hp : p ∈ C) (hq : q ∈ C) (hpq : p ≠ q)    (hxp : ¬ G.Adj x p) (hxq : ¬ G.Adj x q)    (hfull : ∀ y ∈ C, y ≠ p → y ≠ q → G.Adj x y)    (hsatA : ∀ a ∈ A, a ≠ x → G.Adj x a)    (hsatD : ∀ d ∈ D, G.Adj x d)    (y : Fin (4*k)) (hy : y ∈ C) (hyp : y ≠ p) (hyq : y ≠ q)    (X Y U : Finset (Fin (4*k))) (hXY : Disjoint X Y)    (hXU : Disjoint X U) (hYU : Disjoint Y U)    (hsize : X.card + Y.card + U.card = 2*k) (hxX : x ∈ X) (hyY : y ∈ Y)    (hoddX : Odd X.card) (hoddY : Odd Y.card)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hanti : ∀ a ∈ U, ∀ b ∈ X, ¬ G.Adj a b) :    (∃ r ∈ ({p,q} : Finset (Fin (4*k))), ∃ U ⊆ A.erase x, U.card=2 ∧      ∀ a ∈ U, ¬ G.Adj a y ∧ ¬ G.Adj a r) ∨    (∀ a ∈ A.erase x, ¬ G.Adj a y) ∨    (G.Adj p q ∧ (G.Adj y p ∨ G.Adj y q) ∧      ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=c-4 ∧        (∀ b ∈ U, ¬ G.Adj b p ∧ ¬ G.Adj b q ∧ ¬ G.Adj b y) ∧        (∀ z ∈ Z, ¬ G.Adj z p ∧ ¬ G.Adj z q ∧ ¬ G.Adj z y)) := by  classical  obtain ⟨hXW,hWsize,_,hyW,hWodd,hXWcross⟩ :=    in1159_absorb_even_reservoir_of_even_total G X Y U x y k hXY hXU hYU hsize      hxX hyY hcross hanti hoddX hoddY  exact boundary_five_odd_saturated_two_odd_shores_force_patterns k c hc hcodd hkc G A B C D    hAB hAC hAD hBC hBD hCD hcover hA hB hC hD hnoAB hnoCD hconnB hdegree hsep    x p q hx hp hq hpq hxp hxq hfull hsatA hsatD y hy hyp hyq    X (Y ∪ U) hXW hWsize hxX hyW hoddX hWodd hXWcross
See it in the graphDiscuss this resultChallenge it