AFTD Auto-Formalizing Theoretical Domains

boundary_five_odd_positive_small_shore_forces_independent_triple

theoremverified

Under the displayed saturated five-by-odd partition, extendibility, independence, degree and separator hypotheses, a positive barrier whose x-shore meets A in at most two vertices forces p, q and y to be pairwise nonadjacent.

Statement

theorem boundary_five_odd_positive_small_shore_forces_independent_triple
    (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 : ∀ a ∈ C, ∀ b ∈ D, ¬ G.Adj a b)
    (hcritB : is_k_factor_critical (G.induce {v | v ∈ B}) 1)
    (hconnB : (G.induce {v | v ∈ B}).Connected)
    (hext : is_k_extendable G k)
    (hind : ∀ I : Finset (Fin (4*k)),
      (∀ u ∈ I, ∀ v ∈ I, u ≠ v → ¬ G.Adj u v) → I.card ≤ k)
    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)
    (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)
    (x p q y : Fin (4*k)) (hxA : x ∈ A) (hp : p ∈ C) (hq : q ∈ C)
    (hpq : p ≠ q) (hxp : ¬ G.Adj x p) (hxq : ¬ G.Adj x q)
    (hfull : ∀ z ∈ C, z ≠ p → z ≠ q → G.Adj x z)
    (hsatA : ∀ a ∈ A, a ≠ x → G.Adj x a)
    (hsatD : ∀ d ∈ D, G.Adj x d)
    (hyC : y ∈ C) (hyp : y ≠ p) (hyq : y ≠ q)
    (X Y U : Finset (Fin (4*k))) (s : ℕ)
    (hXY : Disjoint X Y) (hXU : Disjoint X U) (hYU : Disjoint Y U)
    (hxX : x ∈ X) (hyY : y ∈ Y) (hoddX : Odd X.card) (hoddY : Odd Y.card)
    (hs : 1 ≤ s) (hsize : X.card+Y.card+U.card+s=2*k)
    (hUodd : s ≤ (G.induce {v | v ∈ U}).oddComponents.ncard)
    (hUparity : U.card % 2 = s % 2)
    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)
    (hantiX : ∀ a ∈ X, ∀ u ∈ U, ¬ G.Adj a u)
    (hantiY : ∀ b ∈ Y, ∀ u ∈ U, ¬ G.Adj b u)
    (hsmall : (X ∩ A).card ≤ 2) :
    ¬ G.Adj p q ∧ ¬ G.Adj y p ∧ ¬ G.Adj y q
Source
OP-1957: small-shore positive-barrier assembly with extendibility and an independence bound.
Verified
27 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 14
Used by 1

The proof, explained

The proof shows that p, q, y ∈ C are pairwise nonadjacent by organizing the barrier into a four-group configuration and applying numeric assembly. First, the saturation of x confines the shores Y and U to B ∪ C, with at most two odd components of U escaping B. Isolating these at most two components as exceptional slots P and Q alongside X and Y, the structural assembly lemma op1957_small_shore_four_group_numeric_assembly proves that both P and Q must intersect C. Finally, having two independent components of U meeting C forces {p, q, y} to be an independent triple via op1957_two_exceptional_slots_force_independent_triple.

  1. The shores Y and U are contained in B ∪ C, and specifically Y ∪ U ⊆ B ∪ {p, q, y}.

    Since x ∈ X, x is disjoint from U and has no neighbors in U, while its only potential neighbor in Y is y. Because x is saturated toward A \ {x}, D, and C \ {p, q}, lemma in1159_saturated_other_shores_subset restricts Y ∪ U to vertices nonadjacent to x outside X, namely B ∪ {p, q, y}. Since p, q, y ∈ C, both Y and U are subsets of B ∪ C.

    lines 40–56

    uses Finset.disjoint_left.mp, in1159_saturated_other_shores_subset, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton, Or.inl, Or.inr, Finset.mem_union_left, Finset.mem_union_right

      classical
      have hxU : x ∉ U := fun hu => Finset.disjoint_left.mp hXU hxX hu
      have hanti : ∀ u ∈ U, ¬ G.Adj x u := fun u hu => hantiX x hxX u hu
      have hregion : Y ∪ U ⊆ B ∪ {p,q,y} :=
        in1159_saturated_other_shores_subset G A B C D X Y U x y p q
          hAC hCD hcover hxX hyC hXY hXU hcross hanti hsatA hsatD hfull
      have hotherBC : Y ∪ U ⊆ B ∪ C := by
        intro z hz
        have hh := hregion hz
        simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at hh ⊢
        rcases hh with hb | rfl | rfl | rfl
        · exact Or.inl hb
        · exact Or.inr hp
        · exact Or.inr hq
        · exact Or.inr hyC
      have hYBC : Y ⊆ B ∪ C := fun z hz => hotherBC (Finset.mem_union_left _ hz)
      have hUBC : U ⊆ B ∪ C := fun z hz => hotherBC (Finset.mem_union_right _ hz)
  2. The odd components of U decompose into a pool J of components contained in B and at most two exceptional components P and Q.

    Lemma op1957_odd_components_ambient_partition extracts s pairwise disjoint, odd, mutually nonadjacent components R_i covering U. Because x has no neighbors in U and dominates C \ {p, q}, at most two components can contain vertices outside B by saturated_barrier_groups_outside_b_at_most_two. Lemma op1957_two_exceptional_groups_exact_block_pool then partitions these components into an index set J entirely inside B and at most two exceptional components P and Q that can meet C.

    lines 57–74

    uses op1957_odd_components_ambient_partition, Finset.card_pos.mp, saturated_barrier_groups_outside_b_at_most_two, op1957_two_exceptional_groups_exact_block_pool

      obtain ⟨R,hRodd,hRdis,hRcover⟩ := op1957_odd_components_ambient_partition G U s hs hUodd hUparity
      let K : Finset (Fin s) := Finset.univ
      have hsub : ∀ i ∈ K, R i ⊆ U := by intro i _; exact (hRodd i).1
      have hne : ∀ i ∈ K, (R i).Nonempty := by
        intro i _
        apply Finset.card_pos.mp
        obtain ⟨t,ht⟩ := (hRodd i).2
        omega
      have hd : ∀ i ∈ K, ∀ j ∈ K, i ≠ j → Disjoint (R i) (R j) := by
        intro i _ j _ hij
        exact (hRdis i j hij).1
      have hantiR : ∀ i ∈ K, ∀ j ∈ K, i ≠ j → ∀ u ∈ R i, ∀ v ∈ R j, ¬ G.Adj u v := by
        intro i _ j _ hij
        exact (hRdis i j hij).2
      have hout := saturated_barrier_groups_outside_b_at_most_two G A B C D U x p q
        hcover hxU hanti hsatA hsatD hfull K R hsub hd
      obtain ⟨J,hJK,P,Q,hJB,houtside,hP,hQ,hslot,hPQ,hJdis,hcount,heb⟩ :=
        op1957_two_exceptional_groups_exact_block_pool K R B hne hd hout
  3. The four sets F = [X, Y, P, Q] form a 4-group system disjoint from the pool E = ⋃_{i ∈ J} R_i, with Y, P, Q disjoint from A and D.

    Lemma op1957_exceptional_slots_four_shore_structure establishes that P, Q, E partition U, the shores F_0 = X, F_1 = Y, F_2 = P, F_3 = Q are pairwise disjoint and disjoint from E, there are no edges to E, and the only cross-edge between distinct shores is between x and y. Because E ⊆ B and Y, P, Q ⊆ B ∪ C, and B ∪ C is disjoint from A and D, the shores F_1, F_2, F_3 are disjoint from both A and D.

    lines 75–102

    uses op1957_exceptional_slots_four_shore_structure, Finset.mem_biUnion.mp, Finset.disjoint_union_left.mpr, False.elim, Finset.disjoint_of_subset_left

      let F : Fin 4 → Finset (Fin (4*k)) := ![X,Y,P,Q]
      let E : Finset (Fin (4*k)) := J.biUnion R
      have hstructure := op1957_exceptional_slots_four_shore_structure G K J R U X Y P Q x y hJK hsub hne hd hantiR
        (by simpa [K] using hRcover) hP hQ hslot hPQ hXY hXU hYU hcross hantiX hantiY
      dsimp only at hstructure
      obtain ⟨hPU,hQU,hEU,hUeq,hFdis,hEdis,hcross4,hEanti⟩ := hstructure
      have hEB : E ⊆ B := by
        intro v hv
        obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hv
        exact hJB i hi hvi
      have hPB : P ⊆ B ∪ C := fun v hv => hUBC (hPU hv)
      have hQB : Q ⊆ B ∪ C := fun v hv => hUBC (hQU hv)
      have hBCA : Disjoint (B ∪ C) A := Finset.disjoint_union_left.mpr ⟨hAB.symm,hAC.symm⟩
      have hBCD : Disjoint (B ∪ C) D := Finset.disjoint_union_left.mpr ⟨hBD,hCD⟩
      have hFA : ∀ i : Fin 4, i ≠ 0 → Disjoint (F i) A := by
        intro i hi
        fin_cases i
        · exact False.elim (hi rfl)
        · simpa [F] using Finset.disjoint_of_subset_left hYBC hBCA
        · simpa [F] using Finset.disjoint_of_subset_left hPB hBCA
        · simpa [F] using Finset.disjoint_of_subset_left hQB hBCA
      have hFD : ∀ i : Fin 4, i ≠ 0 → Disjoint (F i) D := by
        intro i hi
        fin_cases i
        · exact False.elim (hi rfl)
        · simpa [F] using Finset.disjoint_of_subset_left hYBC hBCD
        · simpa [F] using Finset.disjoint_of_subset_left hPB hBCD
        · simpa [F] using Finset.disjoint_of_subset_left hQB hBCD
  4. If either exceptional component P or Q is nonempty, it must contain at least one vertex of C.

    Any nonempty exceptional component corresponds to an index outside J, which by definition contains a vertex outside B. Since U ⊆ B ∪ C, this vertex must belong to C, so |P ∩ C| ≥ 1 and |Q ∩ C| ≥ 1 whenever P and Q are nonempty. Hence for each of F_2 = P and F_3 = Q, either the set is empty or it meets C in at least one vertex.

    lines 103–136

    uses Finset.mem_sdiff.mp, Finset.mem_union.mp, False.elim, Finset.card_pos.mpr, Finset.mem_inter.mpr, Finset.not_nonempty_iff_eq_empty.mp

      have hPgood : P.Nonempty → 1 ≤ (P ∩ C).card := by
        intro hpne
        rcases hP with hp0 | ⟨i,hi,hpi⟩
        · simp [hp0] at hpne
        · obtain ⟨v,hv⟩ := houtside i hi
          have hvR := (Finset.mem_sdiff.mp hv).1
          have hvnB := (Finset.mem_sdiff.mp hv).2
          have hvC : v ∈ C := by
            rcases Finset.mem_union.mp (hUBC (hsub i (Finset.mem_sdiff.mp hi).1 hvR)) with hb | hc
            · exact False.elim (hvnB hb)
            · exact hc
          exact Finset.card_pos.mpr ⟨v,Finset.mem_inter.mpr ⟨hpi.symm ▸ hvR,hvC⟩⟩
      have hQgood : Q.Nonempty → 1 ≤ (Q ∩ C).card := by
        intro hqne
        rcases hQ with hq0 | ⟨i,hi,hqi⟩
        · simp [hq0] at hqne
        · obtain ⟨v,hv⟩ := houtside i hi
          have hvR := (Finset.mem_sdiff.mp hv).1
          have hvnB := (Finset.mem_sdiff.mp hv).2
          have hvC : v ∈ C := by
            rcases Finset.mem_union.mp (hUBC (hsub i (Finset.mem_sdiff.mp hi).1 hvR)) with hb | hc
            · exact False.elim (hvnB hb)
            · exact hc
          exact Finset.card_pos.mpr ⟨v,Finset.mem_inter.mpr ⟨hqi.symm ▸ hvR,hvC⟩⟩
      have he2 : ((F 2 ∩ C).card=0 ∧ (F 2 ∩ B).card=0) ∨ 1 ≤ (F 2 ∩ C).card := by
        by_cases hn : P.Nonempty
        · exact Or.inr (by simpa [F] using hPgood hn)
        · have hp0 : P=∅ := Finset.not_nonempty_iff_eq_empty.mp hn
          exact Or.inl (by simp [F,hp0])
      have he3 : ((F 3 ∩ C).card=0 ∧ (F 3 ∩ B).card=0) ∨ 1 ≤ (F 3 ∩ C).card := by
        by_cases hn : Q.Nonempty
        · exact Or.inr (by simpa [F] using hQgood hn)
        · have hq0 : Q=∅ := Finset.not_nonempty_iff_eq_empty.mp hn
          exact Or.inl (by simp [F,hq0])
  5. The size and parity conditions for the four-group system match the hypotheses of the numerical assembly lemma.

    Since nonemptiness of P (and Q) is equivalent to intersecting C, the indicators for nonemptiness coincide with the indicators for meeting C. Combining |U| = |P| + |Q| + |E| with the component count relation |J| + [|P ∩ C| ≥ 1] + [|Q ∩ C| ≥ 1] = s rewrites the total barrier size equation |X| + |Y| + |U| + s = 2k into the required 4-group numeric relation, with s ≥ 1 ensuring positivity. The oddness, disjointness, and anti-adjacency conditions on the components in J are directly inherited.

    lines 137–169

    uses Finset.not_nonempty_iff_eq_empty.mp, Finset.card_union_of_disjoint, Finset.disjoint_union_left.mpr, Fin.sum_univ_four

      have hPocc : (if P.Nonempty then 1 else 0) = (if 1 ≤ (P ∩ C).card then 1 else 0) := by
        by_cases hn : P.Nonempty
        · simp [hn,hPgood hn]
        · have hp0 : P=∅ := Finset.not_nonempty_iff_eq_empty.mp hn
          simp [hp0]
      have hQocc : (if Q.Nonempty then 1 else 0) = (if 1 ≤ (Q ∩ C).card then 1 else 0) := by
        by_cases hn : Q.Nonempty
        · simp [hn,hQgood hn]
        · have hq0 : Q=∅ := Finset.not_nonempty_iff_eq_empty.mp hn
          simp [hq0]
      have hUcard : U.card=P.card+Q.card+E.card := by
        rw [hUeq,Finset.card_union_of_disjoint,Finset.card_union_of_disjoint hPQ]
        exact Finset.disjoint_union_left.mpr ⟨hEdis 2,hEdis 3⟩
      have hcount' : J.card+(if 1 ≤ (P ∩ C).card then 1 else 0)+
          (if 1 ≤ (Q ∩ C).card then 1 else 0)=s := by
        simpa [K,hPocc,hQocc] using hcount
      have hsize' : (∑ i : Fin 4, (F i).card)+E.card+J.card+
          (if 1 ≤ (F 2 ∩ C).card then 1 else 0)+
          (if 1 ≤ (F 3 ∩ C).card then 1 else 0)=2*k := by
        simp only [Fin.sum_univ_four]
        change X.card+Y.card+P.card+Q.card+E.card+J.card+
          (if 1 ≤ (P ∩ C).card then 1 else 0)+
          (if 1 ≤ (Q ∩ C).card then 1 else 0)=2*k
        dsimp only [E] at hUcard ⊢
        omega
      have hspos' : 1 ≤ J.card+(if 1 ≤ (F 2 ∩ C).card then 1 else 0)+
          (if 1 ≤ (F 3 ∩ C).card then 1 else 0) := by
        simpa [F,←hcount'] using hs
      have hRodd' : ∀ i ∈ J, Odd (R i).card := fun i _ => (hRodd i).2
      have hRdis' : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (R i) (R j) :=
        fun i hi j hj hij => hd i (hJK hi) j (hJK hj) hij
      have hRanti' : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ R i, ∀ v ∈ R j, ¬ G.Adj u v :=
        fun i hi j hj hij => hantiR i (hJK hi) j (hJK hj) hij
  6. Both exceptional components P and Q must intersect C nonemptily.

    Applying the numerical assembly lemma op1957_small_shore_four_group_numeric_assembly with the small shore condition |X ∩ A| ≤ 2 and the verified degree, criticality, connectivity, and separator bounds forces both F_2 ∩ C and F_3 ∩ C to be nonempty.

    lines 170–174

    uses op1957_small_shore_four_group_numeric_assembly

      have hCpos := op1957_small_shore_four_group_numeric_assembly k c hc hkc G A B C D E F J R x y p q
        hAB hAC hAD hBC hBD hCD hcover hA hB hC hD hnoAB hnoCD hcritB hconnB hext hind hdegree hsep
        hFdis hEdis hEB hFA hFD hxA hyC (by simpa [F] using hxX) (by simpa [F] using hyY)
        hfull hcross4 hEanti hRodd' hRdis' hRanti' rfl (by simpa [F] using hoddX) (by simpa [F] using hoddY)
        (by simpa [F] using hsmall) he2 he3 heb hsize' hspos'
  7. The vertices p, q, y form an independent triple.

    The shore cross-edge bounds guarantee that there are no edges between P and Q. Since P and Q are disjoint subsets of U that both meet C and are mutually nonadjacent to each other and to X and Y, lemma op1957_two_exceptional_slots_force_independent_triple concludes that p, q, and y are pairwise nonadjacent.

    lines 175–180

    uses op1957_two_exceptional_slots_force_independent_triple

      have hPQanti : ∀ a ∈ P, ∀ b ∈ Q, ¬ G.Adj a b := by
        intro a ha b hb hab
        have hh := hcross4 2 3 (by decide) a (by simpa [F] using ha) b (by simpa [F] using hb) hab
        simp at hh
      exact op1957_two_exceptional_slots_force_independent_triple G C X Y U P Q x y p q hxX hyY hPU hQU hPQ
        (by simpa [F] using hCpos.1) (by simpa [F] using hCpos.2) hfull hantiX hantiY hPQanti
Finset.disjoint_left.mp
If two finite sets are disjoint and an element belongs to the first, it does not belong to the second.
in1159_saturated_other_shores_subset
In the saturated partition where x dominates all of A \ {x}, D, and C \ {p, q}, and has no edges to U and at most y in Y, the remaining shores Y ∪ U are contained in B ∪ {p, q, y}.
Finset.mem_union
An element belongs to the union of two finite sets if and only if it belongs to either set.
Finset.mem_insert
An element belongs to insert b s if and only if it equals b or belongs to s.
Finset.mem_singleton
An element b belongs to the singleton {a} if and only if b = a.
Or.inl
From a proof of P, deduces P ∨ Q.
Or.inr
From a proof of Q, deduces P ∨ Q.
Finset.mem_union_left
If an element belongs to s, it belongs to s ∪ t.
Finset.mem_union_right
If an element belongs to t, it belongs to s ∪ t.
op1957_odd_components_ambient_partition
An induced subgraph with at least s odd components and matching parity admits a partition into s pairwise disjoint, mutually nonadjacent odd finite sets covering U.
Finset.card_pos.mp
A finite set with strictly positive cardinality is nonempty.
saturated_barrier_groups_outside_b_at_most_two
Among pairwise disjoint subsets of U, at most two can contain vertices outside B under the saturation conditions on x.
op1957_two_exceptional_groups_exact_block_pool
Partitions a family of disjoint nonempty finite sets having at most two members meeting the complement of B into a pool of sets J contained in B and at most two exceptional sets P and Q.
op1957_exceptional_slots_four_shore_structure
Given the pool J and exceptional sets P and Q, constructs a 4-group system F = [X, Y, P, Q] and verifies mutual disjointness, lack of cross-edges other than {x, y}, and anti-adjacency to the pool E.
Finset.mem_biUnion.mp
If an element belongs to a indexed union of finite sets, it belongs to at least one member of the family.
Finset.disjoint_union_left.mpr
If two finite sets are each disjoint from a third, their union is disjoint from the third.
False.elim
From a contradiction (False), any statement follows.
Finset.disjoint_of_subset_left
If a subset of a set is disjoint from another set, the subset is also disjoint from it.
Finset.mem_sdiff.mp
If an element belongs to s \ t, then it belongs to s and does not belong to t.
Finset.mem_union.mp
If an element belongs to s ∪ t, then it belongs to s or to t.
Finset.card_pos.mpr
A nonempty finite set has strictly positive cardinality.
Finset.mem_inter.mpr
If an element belongs to s and to t, then it belongs to s ∩ t.
Finset.not_nonempty_iff_eq_empty.mp
A finite set is not nonempty if and only if it is the empty set.
Finset.card_union_of_disjoint
The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Fin.sum_univ_four
The sum of a four-element sequence indexed by Fin 4 equals the sum of its four values.
op1957_small_shore_four_group_numeric_assembly
In a four-group configuration with |X ∩ A| ≤ 2 under the given partition, degree, criticality, and separator bounds, both exceptional shores F 2 and F 3 must intersect C nonemptily.
op1957_two_exceptional_slots_force_independent_triple
If two disjoint components in U both intersect C and have no cross-edges between them or to X and Y, then p, q, and y are pairwise nonadjacent.

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

set_option maxHeartbeats 3000000open scoped BigOperatorstheorem boundary_five_odd_positive_small_shore_forces_independent_triple    (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 : ∀ a ∈ C, ∀ b ∈ D, ¬ G.Adj a b)    (hcritB : is_k_factor_critical (G.induce {v | v ∈ B}) 1)    (hconnB : (G.induce {v | v ∈ B}).Connected)    (hext : is_k_extendable G k)    (hind : ∀ I : Finset (Fin (4*k)),      (∀ u ∈ I, ∀ v ∈ I, u ≠ v → ¬ G.Adj u v) → I.card ≤ k)    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)    (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)    (x p q y : Fin (4*k)) (hxA : x ∈ A) (hp : p ∈ C) (hq : q ∈ C)    (hpq : p ≠ q) (hxp : ¬ G.Adj x p) (hxq : ¬ G.Adj x q)    (hfull : ∀ z ∈ C, z ≠ p → z ≠ q → G.Adj x z)    (hsatA : ∀ a ∈ A, a ≠ x → G.Adj x a)    (hsatD : ∀ d ∈ D, G.Adj x d)    (hyC : y ∈ C) (hyp : y ≠ p) (hyq : y ≠ q)    (X Y U : Finset (Fin (4*k))) (s : ℕ)    (hXY : Disjoint X Y) (hXU : Disjoint X U) (hYU : Disjoint Y U)    (hxX : x ∈ X) (hyY : y ∈ Y) (hoddX : Odd X.card) (hoddY : Odd Y.card)    (hs : 1 ≤ s) (hsize : X.card+Y.card+U.card+s=2*k)    (hUodd : s ≤ (G.induce {v | v ∈ U}).oddComponents.ncard)    (hUparity : U.card % 2 = s % 2)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hantiX : ∀ a ∈ X, ∀ u ∈ U, ¬ G.Adj a u)    (hantiY : ∀ b ∈ Y, ∀ u ∈ U, ¬ G.Adj b u)    (hsmall : (X ∩ A).card ≤ 2) :    ¬ G.Adj p q ∧ ¬ G.Adj y p ∧ ¬ G.Adj y q := by  classical  have hxU : x ∉ U := fun hu => Finset.disjoint_left.mp hXU hxX hu  have hanti : ∀ u ∈ U, ¬ G.Adj x u := fun u hu => hantiX x hxX u hu  have hregion : Y ∪ U ⊆ B ∪ {p,q,y} :=    in1159_saturated_other_shores_subset G A B C D X Y U x y p q      hAC hCD hcover hxX hyC hXY hXU hcross hanti hsatA hsatD hfull  have hotherBC : Y ∪ U ⊆ B ∪ C := by    intro z hz    have hh := hregion hz    simp only [Finset.mem_union,Finset.mem_insert,Finset.mem_singleton] at hh ⊢    rcases hh with hb | rfl | rfl | rfl    · exact Or.inl hb    · exact Or.inr hp    · exact Or.inr hq    · exact Or.inr hyC  have hYBC : Y ⊆ B ∪ C := fun z hz => hotherBC (Finset.mem_union_left _ hz)  have hUBC : U ⊆ B ∪ C := fun z hz => hotherBC (Finset.mem_union_right _ hz)  obtain ⟨R,hRodd,hRdis,hRcover⟩ := op1957_odd_components_ambient_partition G U s hs hUodd hUparity  let K : Finset (Fin s) := Finset.univ  have hsub : ∀ i ∈ K, R i ⊆ U := by intro i _; exact (hRodd i).1  have hne : ∀ i ∈ K, (R i).Nonempty := by    intro i _    apply Finset.card_pos.mp    obtain ⟨t,ht⟩ := (hRodd i).2    omega  have hd : ∀ i ∈ K, ∀ j ∈ K, i ≠ j → Disjoint (R i) (R j) := by    intro i _ j _ hij    exact (hRdis i j hij).1  have hantiR : ∀ i ∈ K, ∀ j ∈ K, i ≠ j → ∀ u ∈ R i, ∀ v ∈ R j, ¬ G.Adj u v := by    intro i _ j _ hij    exact (hRdis i j hij).2  have hout := saturated_barrier_groups_outside_b_at_most_two G A B C D U x p q    hcover hxU hanti hsatA hsatD hfull K R hsub hd  obtain ⟨J,hJK,P,Q,hJB,houtside,hP,hQ,hslot,hPQ,hJdis,hcount,heb⟩ :=    op1957_two_exceptional_groups_exact_block_pool K R B hne hd hout  let F : Fin 4 → Finset (Fin (4*k)) := ![X,Y,P,Q]  let E : Finset (Fin (4*k)) := J.biUnion R  have hstructure := op1957_exceptional_slots_four_shore_structure G K J R U X Y P Q x y hJK hsub hne hd hantiR    (by simpa [K] using hRcover) hP hQ hslot hPQ hXY hXU hYU hcross hantiX hantiY  dsimp only at hstructure  obtain ⟨hPU,hQU,hEU,hUeq,hFdis,hEdis,hcross4,hEanti⟩ := hstructure  have hEB : E ⊆ B := by    intro v hv    obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hv    exact hJB i hi hvi  have hPB : P ⊆ B ∪ C := fun v hv => hUBC (hPU hv)  have hQB : Q ⊆ B ∪ C := fun v hv => hUBC (hQU hv)  have hBCA : Disjoint (B ∪ C) A := Finset.disjoint_union_left.mpr ⟨hAB.symm,hAC.symm⟩  have hBCD : Disjoint (B ∪ C) D := Finset.disjoint_union_left.mpr ⟨hBD,hCD⟩  have hFA : ∀ i : Fin 4, i ≠ 0 → Disjoint (F i) A := by    intro i hi    fin_cases i    · exact False.elim (hi rfl)    · simpa [F] using Finset.disjoint_of_subset_left hYBC hBCA    · simpa [F] using Finset.disjoint_of_subset_left hPB hBCA    · simpa [F] using Finset.disjoint_of_subset_left hQB hBCA  have hFD : ∀ i : Fin 4, i ≠ 0 → Disjoint (F i) D := by    intro i hi    fin_cases i    · exact False.elim (hi rfl)    · simpa [F] using Finset.disjoint_of_subset_left hYBC hBCD    · simpa [F] using Finset.disjoint_of_subset_left hPB hBCD    · simpa [F] using Finset.disjoint_of_subset_left hQB hBCD  have hPgood : P.Nonempty → 1 ≤ (P ∩ C).card := by    intro hpne    rcases hP with hp0 | ⟨i,hi,hpi⟩    · simp [hp0] at hpne    · obtain ⟨v,hv⟩ := houtside i hi      have hvR := (Finset.mem_sdiff.mp hv).1      have hvnB := (Finset.mem_sdiff.mp hv).2      have hvC : v ∈ C := by        rcases Finset.mem_union.mp (hUBC (hsub i (Finset.mem_sdiff.mp hi).1 hvR)) with hb | hc        · exact False.elim (hvnB hb)        · exact hc      exact Finset.card_pos.mpr ⟨v,Finset.mem_inter.mpr ⟨hpi.symm ▸ hvR,hvC⟩⟩  have hQgood : Q.Nonempty → 1 ≤ (Q ∩ C).card := by    intro hqne    rcases hQ with hq0 | ⟨i,hi,hqi⟩    · simp [hq0] at hqne    · obtain ⟨v,hv⟩ := houtside i hi      have hvR := (Finset.mem_sdiff.mp hv).1      have hvnB := (Finset.mem_sdiff.mp hv).2      have hvC : v ∈ C := by        rcases Finset.mem_union.mp (hUBC (hsub i (Finset.mem_sdiff.mp hi).1 hvR)) with hb | hc        · exact False.elim (hvnB hb)        · exact hc      exact Finset.card_pos.mpr ⟨v,Finset.mem_inter.mpr ⟨hqi.symm ▸ hvR,hvC⟩⟩  have he2 : ((F 2 ∩ C).card=0 ∧ (F 2 ∩ B).card=0) ∨ 1 ≤ (F 2 ∩ C).card := by    by_cases hn : P.Nonempty    · exact Or.inr (by simpa [F] using hPgood hn)    · have hp0 : P=∅ := Finset.not_nonempty_iff_eq_empty.mp hn      exact Or.inl (by simp [F,hp0])  have he3 : ((F 3 ∩ C).card=0 ∧ (F 3 ∩ B).card=0) ∨ 1 ≤ (F 3 ∩ C).card := by    by_cases hn : Q.Nonempty    · exact Or.inr (by simpa [F] using hQgood hn)    · have hq0 : Q=∅ := Finset.not_nonempty_iff_eq_empty.mp hn      exact Or.inl (by simp [F,hq0])  have hPocc : (if P.Nonempty then 1 else 0) = (if 1 ≤ (P ∩ C).card then 1 else 0) := by    by_cases hn : P.Nonempty    · simp [hn,hPgood hn]    · have hp0 : P=∅ := Finset.not_nonempty_iff_eq_empty.mp hn      simp [hp0]  have hQocc : (if Q.Nonempty then 1 else 0) = (if 1 ≤ (Q ∩ C).card then 1 else 0) := by    by_cases hn : Q.Nonempty    · simp [hn,hQgood hn]    · have hq0 : Q=∅ := Finset.not_nonempty_iff_eq_empty.mp hn      simp [hq0]  have hUcard : U.card=P.card+Q.card+E.card := by    rw [hUeq,Finset.card_union_of_disjoint,Finset.card_union_of_disjoint hPQ]    exact Finset.disjoint_union_left.mpr ⟨hEdis 2,hEdis 3⟩  have hcount' : J.card+(if 1 ≤ (P ∩ C).card then 1 else 0)+      (if 1 ≤ (Q ∩ C).card then 1 else 0)=s := by    simpa [K,hPocc,hQocc] using hcount  have hsize' : (∑ i : Fin 4, (F i).card)+E.card+J.card+      (if 1 ≤ (F 2 ∩ C).card then 1 else 0)+      (if 1 ≤ (F 3 ∩ C).card then 1 else 0)=2*k := by    simp only [Fin.sum_univ_four]    change X.card+Y.card+P.card+Q.card+E.card+J.card+      (if 1 ≤ (P ∩ C).card then 1 else 0)+      (if 1 ≤ (Q ∩ C).card then 1 else 0)=2*k    dsimp only [E] at hUcard ⊢    omega  have hspos' : 1 ≤ J.card+(if 1 ≤ (F 2 ∩ C).card then 1 else 0)+      (if 1 ≤ (F 3 ∩ C).card then 1 else 0) := by    simpa [F,←hcount'] using hs  have hRodd' : ∀ i ∈ J, Odd (R i).card := fun i _ => (hRodd i).2  have hRdis' : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (R i) (R j) :=    fun i hi j hj hij => hd i (hJK hi) j (hJK hj) hij  have hRanti' : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → ∀ u ∈ R i, ∀ v ∈ R j, ¬ G.Adj u v :=    fun i hi j hj hij => hantiR i (hJK hi) j (hJK hj) hij  have hCpos := op1957_small_shore_four_group_numeric_assembly k c hc hkc G A B C D E F J R x y p q    hAB hAC hAD hBC hBD hCD hcover hA hB hC hD hnoAB hnoCD hcritB hconnB hext hind hdegree hsep    hFdis hEdis hEB hFA hFD hxA hyC (by simpa [F] using hxX) (by simpa [F] using hyY)    hfull hcross4 hEanti hRodd' hRdis' hRanti' rfl (by simpa [F] using hoddX) (by simpa [F] using hoddY)    (by simpa [F] using hsmall) he2 he3 heb hsize' hspos'  have hPQanti : ∀ a ∈ P, ∀ b ∈ Q, ¬ G.Adj a b := by    intro a ha b hb hab    have hh := hcross4 2 3 (by decide) a (by simpa [F] using ha) b (by simpa [F] using hb) hab    simp at hh  exact op1957_two_exceptional_slots_force_independent_triple G C X Y U P Q x y p q hxX hyY hPU hQU hPQ    (by simpa [F] using hCpos.1) (by simpa [F] using hCpos.2) hfull hantiX hantiY hPQanti
See it in the graphDiscuss this resultChallenge it