AFTD Auto-Formalizing Theoretical Domains

op1957_large_shore_reduction_to_B_only

theoremverified

In the large-shore case, if the complement of the first shore is supported in B together with p, q and y, then ruling out a B-only barrier when the first shore contains three or four A vertices implies the desired common-defect or all-four-defect alternative.

Statement

theorem op1957_large_shore_reduction_to_B_only
    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)
    (A B X Y U : Finset V) (x y p q : V)
    (hxA : x ∈ A) (hxX : x ∈ X) (hyY : y ∈ Y)
    (hYU : Disjoint Y U) (hA : A.card=5)
    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)
    (hantiX : ∀ a ∈ X, ∀ u ∈ U, ¬ G.Adj a u)
    (hregion : Y ∪ U ⊆ B ∪ {p,q,y})
    (hlarge : 3 ≤ (X ∩ A).card)
    (hNoPool : Y ⊆ B ∪ {y} → U ⊆ B → (X ∩ A).card ≤ 4 → False) :
    (∃ r ∈ ({p,q} : Finset V), ∃ T ⊆ A.erase x, T.card=2 ∧
      ∀ a ∈ T, ¬ G.Adj a y ∧ ¬ G.Adj a r) ∨
    (∀ a ∈ A.erase x, ¬ G.Adj a y)
Source
OP-1957 direct large-shore reduction to a B-only positive barrier
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

The argument establishes that either a 2-element common-defect set or an all-four-defect alternative holds. An auxiliary lemma first shows that if an outside vertex p or q lies in Y ∪ U, the large-shore condition |X ∩ A| ≥ 3 allows selecting two vertices in (X ∩ A) \ {x} non-adjacent to y and that vertex. For the main reduction, if neither p nor q is in Y ∪ U, then Y ⊆ B ∪ {y} and U ⊆ B, so the no-pool hypothesis eliminates the possibility |X ∩ A| ≤ 4; consequently, X must contain all five vertices of A, and the unique cross-edge condition between X and Y forces every vertex in A \ {x} to be non-adjacent to y.

  1. There exists a 2-element subset T of (X ∩ A) \ {x}.

    Because x ∈ X and x ∈ A, x belongs to X ∩ A by `Finset.mem_inter.mpr`. Since |X ∩ A| ≥ 3, removing x leaves a set of cardinality at least 2 by `Finset.card_erase_add_one` and integer arithmetic. By `Finset.exists_subset_card_eq`, we extract a 2-element subset T ⊆ (X ∩ A) \ {x}.

    lines 11–16

    uses Finset.mem_inter.mpr, Finset.card_erase_add_one, Finset.exists_subset_card_eq

      classical
      have hx : x ∈ X ∩ A := Finset.mem_inter.mpr ⟨hxX,hxA⟩
      have hc : 2 ≤ ((X ∩ A).erase x).card := by
        have h := Finset.card_erase_add_one hx
        omega
      obtain ⟨T,hT,hcard⟩ := Finset.exists_subset_card_eq hc
  2. There exists a vertex r ∈ {p, q} that belongs to Y ∪ U.

    The hypothesis `houtside` asserts that p ∈ Y ∪ U or q ∈ Y ∪ U. Branching on this disjunction yields a witness r ∈ {p, q} belonging to Y ∪ U.

    lines 17–20

      obtain ⟨r,hr,hrout⟩ : ∃ r ∈ ({p,q} : Finset V), r ∈ Y ∪ U := by
        rcases houtside with hp | hq
        · exact ⟨p,by simp,hp⟩
        · exact ⟨q,by simp,hq⟩
  3. The 2-element set T is a subset of A \ {x}.

    We provide r, T, and the cardinality witness |T| = 2 to refine the existential goal. Any vertex a ∈ T belongs to (X ∩ A) \ {x}, so a ≠ x and a ∈ A by `Finset.mem_erase.mp` and `Finset.mem_inter.mp`. Recombining these via `Finset.mem_erase.mpr` shows a ∈ A \ {x}.

    lines 21–24

    uses Finset.mem_erase.mp, Finset.mem_erase.mpr, Finset.mem_inter.mp

      refine ⟨r,hr,T,?_,hcard,?_⟩
      · intro a ha
        have hh := Finset.mem_erase.mp (hT ha)
        exact Finset.mem_erase.mpr ⟨hh.1,(Finset.mem_inter.mp hh.2).2⟩
  4. Every vertex a ∈ T is non-adjacent to both y and r, proving in1245_outside_C_defect_pair.

    For any a ∈ T, we have a ∈ X and a ≠ x. If a were adjacent to y ∈ Y, the unique cross-edge condition `hcross` would force a = x, contradiction. If a were adjacent to r ∈ Y ∪ U, we split on whether r ∈ Y or r ∈ U using `Finset.mem_union.mp`: if r ∈ Y, `hcross` again forces a = x, while if r ∈ U, `hantiX` forbids any edge between X and U. Hence a is adjacent to neither y nor r.

    lines 25–35

    uses Finset.mem_erase.mp, Finset.mem_inter.mp, Finset.mem_union.mp

      · intro a ha
        have hh := Finset.mem_erase.mp (hT ha)
        have haX := (Finset.mem_inter.mp hh.2).1
        have hne : a ≠ x := hh.1
        constructor
        · intro hay
          exact hne (hcross a haX y hyY hay).1
        · intro har
          rcases Finset.mem_union.mp hrout with hrY | hrU
          · exact hne (hcross a haX r hrY har).1
          · exact hantiX a haX r hrU har
  5. If p or q belongs to Y ∪ U, the first disjunct holds: there exist r ∈ {p, q} and a 2-element set T ⊆ A \ {x} non-adjacent to y and r.

    We case split on whether p ∈ Y ∪ U or q ∈ Y ∪ U. If so, lemma `in1245_outside_C_defect_pair` directly constructs the witness r ∈ {p, q} and the 2-element set T ⊆ A \ {x} whose vertices are non-adjacent to both y and r. This establishes the left disjunct via `Or.inl`.

    lines 50–52

    uses in1245_outside_C_defect_pair, Or.inl

      classical
      by_cases hout : p ∈ Y ∪ U ∨ q ∈ Y ∪ U
      · exact Or.inl (in1245_outside_C_defect_pair G A X Y U x y p q hxA hxX hyY hcross hantiX hlarge hout)
  6. Neither p nor q belongs to Y ∪ U, and y does not belong to U.

    In the remaining branch, both p and q are outside Y ∪ U. Furthermore, because y ∈ Y and Y is disjoint from U, `Finset.disjoint_left.mp` implies that y ∉ U.

    lines 53–55

    uses Or.inl, Or.inr, Finset.disjoint_left.mp

      · have hp : p ∉ Y ∪ U := fun h => hout (Or.inl h)
        have hq : q ∉ Y ∪ U := fun h => hout (Or.inr h)
        have hyU : y ∉ U := fun h => Finset.disjoint_left.mp hYU hyY h
  7. The shore Y is contained in B ∪ {y}.

    For any z ∈ Y, z belongs to Y ∪ U ⊆ B ∪ {p, q, y}. Expanding this set membership gives z ∈ B, z = p, z = q, or z = y. The cases z = p and z = q contradict p, q ∉ Y ∪ U, so z must belong to B or equal y.

    lines 56–65

    uses Finset.mem_union_left, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton, Or.inl, Or.inr, False.elim

        have hY : Y ⊆ B ∪ {y} := by
          intro z hz
          have hz' : z ∈ Y ∪ U := Finset.mem_union_left _ hz
          have h := hregion hz'
          simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at h ⊢
          rcases h with h | h | h | h
          · exact Or.inl h
          · subst z; exact False.elim (hp hz')
          · subst z; exact False.elim (hq hz')
          · exact Or.inr h
  8. The set U is contained in B.

    For any z ∈ U, z belongs to Y ∪ U ⊆ B ∪ {p, q, y}. The cases z = p and z = q again contradict p, q ∉ Y ∪ U, while z = y contradicts y ∉ U. Hence z must belong to B.

    lines 66–75

    uses Finset.mem_union_right, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton, False.elim

        have hU : U ⊆ B := by
          intro z hz
          have hz' : z ∈ Y ∪ U := Finset.mem_union_right _ hz
          have h := hregion hz'
          simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at h
          rcases h with h | h | h | h
          · exact h
          · subst z; exact False.elim (hp hz')
          · subst z; exact False.elim (hq hz')
          · subst z; exact False.elim (hyU hz)
  9. The case |X ∩ A| ≤ 4 is impossible.

    We case split on whether |X ∩ A| ≤ 4. If it is, all three preconditions of the hypothesis `hNoPool` are met (Y ⊆ B ∪ {y}, U ⊆ B, and |X ∩ A| ≤ 4), yielding False and closing the branch via `False.elim`.

    lines 76–77

    uses False.elim

        by_cases hs : (X ∩ A).card ≤ 4
        · exact False.elim (hNoPool hY hU hs)
  10. The shore X contains all of A, that is, A ⊆ X.

    Because |X ∩ A| ≤ 4 was ruled out and |A| = 5 with X ∩ A ⊆ A, linear arithmetic forces |X ∩ A| = |A| = 5. By `Finset.eq_of_subset_of_card_le`, the subset inclusion X ∩ A ⊆ A of equal finite cardinality implies X ∩ A = A, so every vertex of A belongs to X.

    lines 78–84

    uses Finset.card_le_card, Finset.inter_subset_right, Finset.eq_of_subset_of_card_le, Finset.mem_inter.mp

        · have hcard : (X ∩ A).card = A.card := by
            have hh := Finset.card_le_card (Finset.inter_subset_right : X ∩ A ⊆ A)
            omega
          have hsub : A ⊆ X := by
            have heq : X ∩ A = A := Finset.eq_of_subset_of_card_le Finset.inter_subset_right (by omega)
            intro a ha
            exact (Finset.mem_inter.mp (heq.symm ▸ ha)).1
  11. Every vertex in A \ {x} is not adjacent to y, establishing the right disjunct.

    We select the right disjunct. For any a ∈ A \ {x}, we have a ≠ x and a ∈ A ⊆ X. If a were adjacent to y ∈ Y, the unique cross-edge condition between X and Y would force a = x, contradicting a ≠ x.

    lines 85–88

    uses Finset.mem_erase.mp

          right
          intro a ha hay
          have ha' := Finset.mem_erase.mp ha
          exact ha'.1 (hcross a (hsub ha'.2) y hyY hay).1
Finset.mem_inter.mpr
If an element belongs to both s and t, then it belongs to their intersection s ∩ t.
Finset.card_erase_add_one
Removing an element a from a finite set s that contains it decreases its cardinality by 1: |s \ {a}| + 1 = |s|.
Finset.exists_subset_card_eq
A finite set of cardinality at least n contains a subset of cardinality n.
Finset.mem_erase.mp
If an element belongs to s \ {b}, then it is distinct from b and belongs to s.
Finset.mem_erase.mpr
If an element belongs to s and is distinct from b, then it belongs to s \ {b}.
Finset.mem_inter.mp
If an element belongs to s ∩ t, then it belongs to both s and t.
Finset.mem_union.mp
If an element belongs to s ∪ t, then it belongs to s or to t.
in1245_outside_C_defect_pair
In a graph where x ∈ A ∩ X, y ∈ Y, the only cross-edge between X and Y is xy, there are no edges between X and U, and |X ∩ A| ≥ 3: if p or q belongs to Y ∪ U, then there exist r ∈ {p, q} and a 2-element set T ⊆ A \ {x} non-adjacent to both y and r.
Or.inl
If proposition a holds, then the disjunction a ∨ b holds.
Or.inr
If proposition b holds, then the disjunction a ∨ b holds.
Finset.disjoint_left.mp
If two sets are disjoint, any element of the first set is not in the second set.
Finset.mem_union_left
An element of s belongs to the union s ∪ t.
Finset.mem_union_right
An element of t belongs to the union s ∪ t.
Finset.mem_union
An element belongs to s ∪ t if and only if it belongs to s or to t.
Finset.mem_insert
An element belongs to {b} ∪ s if and only if it equals b or belongs to s.
Finset.mem_singleton
An element belongs to the singleton {a} if and only if it equals a.
False.elim
From a contradiction (False), any conclusion follows.
Finset.card_le_card
If s ⊆ t, then |s| ≤ |t|.
Finset.inter_subset_right
The intersection s₁ ∩ s₂ is a subset of s₂.
Finset.eq_of_subset_of_card_le
If s ⊆ t and |t| ≤ |s|, then s = 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

theorem in1245_outside_C_defect_pair    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)    (A X Y U : Finset V) (x y p q : V)    (hxA : x ∈ A) (hxX : x ∈ X) (hyY : y ∈ Y)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hantiX : ∀ a ∈ X, ∀ u ∈ U, ¬ G.Adj a u)    (hlarge : 3 ≤ (X ∩ A).card)    (houtside : p ∈ Y ∪ U ∨ q ∈ Y ∪ U) :    ∃ r ∈ ({p,q} : Finset V), ∃ T ⊆ A.erase x, T.card=2 ∧      ∀ a ∈ T, ¬ G.Adj a y ∧ ¬ G.Adj a r := by  classical  have hx : x ∈ X ∩ A := Finset.mem_inter.mpr ⟨hxX,hxA⟩  have hc : 2 ≤ ((X ∩ A).erase x).card := by    have h := Finset.card_erase_add_one hx    omega  obtain ⟨T,hT,hcard⟩ := Finset.exists_subset_card_eq hc  obtain ⟨r,hr,hrout⟩ : ∃ r ∈ ({p,q} : Finset V), r ∈ Y ∪ U := by    rcases houtside with hp | hq    · exact ⟨p,by simp,hp⟩    · exact ⟨q,by simp,hq⟩  refine ⟨r,hr,T,?_,hcard,?_⟩  · intro a ha    have hh := Finset.mem_erase.mp (hT ha)    exact Finset.mem_erase.mpr ⟨hh.1,(Finset.mem_inter.mp hh.2).2⟩  · intro a ha    have hh := Finset.mem_erase.mp (hT ha)    have haX := (Finset.mem_inter.mp hh.2).1    have hne : a ≠ x := hh.1    constructor    · intro hay      exact hne (hcross a haX y hyY hay).1    · intro har      rcases Finset.mem_union.mp hrout with hrY | hrU      · exact hne (hcross a haX r hrY har).1      · exact hantiX a haX r hrU hartheorem op1957_large_shore_reduction_to_B_only    {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V)    (A B X Y U : Finset V) (x y p q : V)    (hxA : x ∈ A) (hxX : x ∈ X) (hyY : y ∈ Y)    (hYU : Disjoint Y U) (hA : A.card=5)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hantiX : ∀ a ∈ X, ∀ u ∈ U, ¬ G.Adj a u)    (hregion : Y ∪ U ⊆ B ∪ {p,q,y})    (hlarge : 3 ≤ (X ∩ A).card)    (hNoPool : Y ⊆ B ∪ {y} → U ⊆ B → (X ∩ A).card ≤ 4 → False) :    (∃ r ∈ ({p,q} : Finset V), ∃ T ⊆ A.erase x, T.card=2 ∧      ∀ a ∈ T, ¬ G.Adj a y ∧ ¬ G.Adj a r) ∨    (∀ a ∈ A.erase x, ¬ G.Adj a y) := by  classical  by_cases hout : p ∈ Y ∪ U ∨ q ∈ Y ∪ U  · exact Or.inl (in1245_outside_C_defect_pair G A X Y U x y p q hxA hxX hyY hcross hantiX hlarge hout)  · have hp : p ∉ Y ∪ U := fun h => hout (Or.inl h)    have hq : q ∉ Y ∪ U := fun h => hout (Or.inr h)    have hyU : y ∉ U := fun h => Finset.disjoint_left.mp hYU hyY h    have hY : Y ⊆ B ∪ {y} := by      intro z hz      have hz' : z ∈ Y ∪ U := Finset.mem_union_left _ hz      have h := hregion hz'      simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at h ⊢      rcases h with h | h | h | h      · exact Or.inl h      · subst z; exact False.elim (hp hz')      · subst z; exact False.elim (hq hz')      · exact Or.inr h    have hU : U ⊆ B := by      intro z hz      have hz' : z ∈ Y ∪ U := Finset.mem_union_right _ hz      have h := hregion hz'      simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at h      rcases h with h | h | h | h      · exact h      · subst z; exact False.elim (hp hz')      · subst z; exact False.elim (hq hz')      · subst z; exact False.elim (hyU hz)    by_cases hs : (X ∩ A).card ≤ 4    · exact False.elim (hNoPool hY hU hs)    · have hcard : (X ∩ A).card = A.card := by        have hh := Finset.card_le_card (Finset.inter_subset_right : X ∩ A ⊆ A)        omega      have hsub : A ⊆ X := by        have heq : X ∩ A = A := Finset.eq_of_subset_of_card_le Finset.inter_subset_right (by omega)        intro a ha        exact (Finset.mem_inter.mp (heq.symm ▸ ha)).1      right      intro a ha hay      have ha' := Finset.mem_erase.mp ha      exact ha'.1 (hcross a (hsub ha'.2) y hyY hay).1
See it in the graphDiscuss this resultChallenge it