AFTD Auto-Formalizing Theoretical Domains

crossing_shores_force_two_common_opposite_vertices

theoremverified

Under the displayed connectivity, cross-shore anticompleteness, twin and cardinality assumptions, if the W shores intersect and their union has size at most d−1, the two opposite Q shores share at least two vertices.

Statement

theorem crossing_shores_force_two_common_opposite_vertices
    (k d : ℕ) (G : SimpleGraph (Fin (2 * k + d + 3)))
    (W₁ W₂ Q₁ Q₂ : Finset (Fin (2 * k + d + 3)))
    (x y : Fin (2 * k + d + 3))
    (hsep : ∀ C A B : Finset (Fin (2 * k + d + 3)),
      A.Nonempty → B.Nonempty → Disjoint C A → Disjoint C B → Disjoint A B →
      C ∪ A ∪ B = Finset.univ →
      (∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) → 2 * k ≤ C.card)
    (hWi : (W₁ ∩ W₂).Nonempty)
    (hsize₁ : W₁.card + Q₁.card = d + 1)
    (hsize₂ : W₂.card + Q₂.card = d + 1)
    (hWbound : (W₁ ∪ W₂).card + 1 ≤ d)
    (hxy : x ≠ y)
    (hxW : x ∉ W₁ ∪ W₂) (hyW : y ∉ W₁ ∪ W₂)
    (hxQ : x ∉ Q₁ ∪ Q₂) (hyQ : y ∉ Q₁ ∪ Q₂)
    (hdisj : Disjoint (W₁ ∩ W₂) (Q₁ ∪ Q₂))
    (hcross₁ : ∀ w ∈ W₁, ∀ q ∈ Q₁, ¬ G.Adj w q)
    (hcross₂ : ∀ w ∈ W₂, ∀ q ∈ Q₂, ¬ G.Adj w q)
    (htwins : ∀ w ∈ W₁ ∪ W₂, ¬ G.Adj w x ∧ ¬ G.Adj w y) :
    2 ≤ (Q₁ ∩ Q₂).card
Source
Crossing-cut bridge-to-set reduction in the OP-1957 campaign.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 3

The proof, explained

The argument applies the 2k-connectivity cardinality bound to the two anticomplete sets I = W₁ ∩ W₂ and B = (Q₁ ∪ Q₂) ∪ {x, y}. The separation condition, cross-shore anticompleteness, and twin hypotheses ensure that I and B are disjoint and have no edges between them, yielding |I| + |Q₁ ∪ Q₂| + 2 ≤ d + 3. Combining this bound with inclusion-exclusion and the given shore cardinalities forces the overlap |Q₁ ∩ Q₂| to be at least 2.

  1. The intersections I = W₁ ∩ W₂ and J = Q₁ ∩ Q₂, and unions U = W₁ ∪ W₂ and V = Q₁ ∪ Q₂, are introduced.

    We enable classical reasoning and introduce concise notations for the shore intersections and unions: I and J for the intersections, and U and V for the unions.

    lines 21–25

      classical
      let I := W₁ ∩ W₂
      let J := Q₁ ∩ Q₂
      let U := W₁ ∪ W₂
      let V := Q₁ ∪ Q₂
  2. I ⊆ U.

    Any vertex in the intersection I = W₁ ∩ W₂ belongs to W₁, and therefore belongs to the union U = W₁ ∪ W₂.

    lines 26–28

      have hIU : I ⊆ U := by
        intro w hw
        exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hw).1)
  3. I is disjoint from {x, y}.

    For any vertex w ∈ I, since I ⊆ U = W₁ ∪ W₂, w belongs to W₁ ∪ W₂. By the assumptions hxW and hyW, neither x nor y belongs to W₁ ∪ W₂, so w cannot equal x or y.

    lines 29–35

    uses Finset.disjoint_left.mpr

      have hIxy : Disjoint I ({x,y} : Finset _) := by
        apply Finset.disjoint_left.mpr
        intro w hw hp
        simp only [Finset.mem_insert, Finset.mem_singleton] at hp
        rcases hp with rfl | rfl
        · exact hxW (hIU hw)
        · exact hyW (hIU hw)
  4. V is disjoint from {x, y}.

    For any vertex q ∈ V = Q₁ ∪ Q₂, neither x nor y belongs to Q₁ ∪ Q₂ by assumptions hxQ and hyQ, so q cannot equal x or y.

    lines 36–42

    uses Finset.disjoint_left.mpr

      have hVxy : Disjoint V ({x,y} : Finset _) := by
        apply Finset.disjoint_left.mpr
        intro q hq hp
        simp only [Finset.mem_insert, Finset.mem_singleton] at hp
        rcases hp with rfl | rfl
        · exact hxQ hq
        · exact hyQ hq
  5. I is disjoint from V ∪ {x, y}.

    The hypothesis hdisj states that I is disjoint from V, and the previous step established that I is disjoint from {x, y}. Therefore, I is disjoint from their union V ∪ {x, y}.

    lines 43–44

    uses Finset.disjoint_union_right.mpr

      have hIleft : Disjoint I (V ∪ {x,y}) :=
        Finset.disjoint_union_right.mpr ⟨hdisj, hIxy⟩
  6. There are no edges between I and V ∪ {x, y}.

    Let w ∈ I and q ∈ V ∪ {x, y}. If q ∈ V = Q₁ ∪ Q₂, then either q ∈ Q₁ (so w and q are non-adjacent by cross-shore anticompleteness hcross₁ since w ∈ W₁) or q ∈ Q₂ (so w and q are non-adjacent by hcross₂ since w ∈ W₂). If instead q ∈ {x, y}, then since w ∈ I ⊆ W₁ ∪ W₂, the twin assumption htwins ensures w is adjacent to neither x nor y.

    lines 45–55

      have hcrossI : ∀ w ∈ I, ∀ q ∈ V ∪ {x,y}, ¬ G.Adj w q := by
        intro w hw q hq
        have hwI := Finset.mem_inter.mp hw
        rcases Finset.mem_union.mp hq with hqV | hqxy
        · rcases Finset.mem_union.mp hqV with hq1 | hq2
          · exact hcross₁ w hwI.1 q hq1
          · exact hcross₂ w hwI.2 q hq2
        · simp only [Finset.mem_insert, Finset.mem_singleton] at hqxy
          rcases hqxy with rfl | rfl
          · exact (htwins w (hIU hw)).1
          · exact (htwins w (hIU hw)).2
  7. V ∪ {x, y} is nonempty.

    The vertex x belongs to {x, y} and hence to V ∪ {x, y}, witnessing that the set is nonempty.

    lines 56–57

      have hB : (V ∪ {x,y}).Nonempty := by
        exact ⟨x, Finset.mem_union.mpr (Or.inr (by simp))⟩
  8. |I| + |V ∪ {x, y}| ≤ d + 3.

    We apply the connectivity cardinality bound lemma two_k_connected_anticomplete_sets_cardinality_bound to the pair of sets I and V ∪ {x, y}, which are nonempty, disjoint, and anticomplete.

    lines 58–59

    uses two_k_connected_anticomplete_sets_cardinality_bound

      have hbd := two_k_connected_anticomplete_sets_cardinality_bound k d G I (V ∪ {x,y})
        hsep hWi hB hIleft hcrossI
  9. |I| + |V| + 2 ≤ d + 3.

    Because V and {x, y} are disjoint and x ≠ y, the size of V ∪ {x, y} is |V| + 2. Substituting this into the previous bound gives |I| + |V| + 2 ≤ d + 3.

    lines 60–62

    uses Finset.card_union_of_disjoint, Finset.card_pair

      have hBcard : (V ∪ {x,y}).card = V.card + 2 := by
        rw [Finset.card_union_of_disjoint hVxy, Finset.card_pair hxy]
      rw [hBcard] at hbd
  10. 2 ≤ |Q₁ ∩ Q₂|. automation

    By inclusion-exclusion, |U| + |I| = |W₁| + |W₂| and |V| + |J| = |Q₁| + |Q₂|. Adding the shore size equations gives (|U| + |I|) + (|V| + |J|) = 2d + 2. Since |U| ≤ d - 1 and |I| + |V| ≤ d + 1, subtracting them from 2d + 2 leaves |J| ≥ 2.

    lines 63–67

    uses Finset.card_union_add_card_inter

      have hWcard : U.card + I.card = W₁.card + W₂.card := Finset.card_union_add_card_inter _ _
      have hQcard : V.card + J.card = Q₁.card + Q₂.card := Finset.card_union_add_card_inter _ _
      dsimp [I, J, U, V] at hbd hWcard hQcard
      change 2 ≤ (Q₁ ∩ Q₂).card
      omega
Finset.disjoint_left.mpr
Two sets are disjoint if no element of the first set belongs to the second set.
Finset.disjoint_union_right.mpr
If a set is disjoint from each of two sets, it is disjoint from their union.
two_k_connected_anticomplete_sets_cardinality_bound
In a graph on 2k + d + 3 vertices satisfying the 2k-connectivity separator condition, any two disjoint, nonempty, anticomplete vertex subsets A and B have total size at most d + 3.
Finset.card_union_of_disjoint
The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Finset.card_pair
A set containing two distinct elements has cardinality 2.
Finset.card_union_add_card_inter
For any two finite sets, the sum of the cardinalities of their union and intersection equals the sum of their individual cardinalities.

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 crossing_shores_force_two_common_opposite_vertices    (k d : ℕ) (G : SimpleGraph (Fin (2 * k + d + 3)))    (W₁ W₂ Q₁ Q₂ : Finset (Fin (2 * k + d + 3)))    (x y : Fin (2 * k + d + 3))    (hsep : ∀ C A B : Finset (Fin (2 * k + d + 3)),      A.Nonempty → B.Nonempty → Disjoint C A → Disjoint C B → Disjoint A B →      C ∪ A ∪ B = Finset.univ →      (∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) → 2 * k ≤ C.card)    (hWi : (W₁ ∩ W₂).Nonempty)    (hsize₁ : W₁.card + Q₁.card = d + 1)    (hsize₂ : W₂.card + Q₂.card = d + 1)    (hWbound : (W₁ ∪ W₂).card + 1 ≤ d)    (hxy : x ≠ y)    (hxW : x ∉ W₁ ∪ W₂) (hyW : y ∉ W₁ ∪ W₂)    (hxQ : x ∉ Q₁ ∪ Q₂) (hyQ : y ∉ Q₁ ∪ Q₂)    (hdisj : Disjoint (W₁ ∩ W₂) (Q₁ ∪ Q₂))    (hcross₁ : ∀ w ∈ W₁, ∀ q ∈ Q₁, ¬ G.Adj w q)    (hcross₂ : ∀ w ∈ W₂, ∀ q ∈ Q₂, ¬ G.Adj w q)    (htwins : ∀ w ∈ W₁ ∪ W₂, ¬ G.Adj w x ∧ ¬ G.Adj w y) :    2 ≤ (Q₁ ∩ Q₂).card := by  classical  let I := W₁ ∩ W₂  let J := Q₁ ∩ Q₂  let U := W₁ ∪ W₂  let V := Q₁ ∪ Q₂  have hIU : I ⊆ U := by    intro w hw    exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hw).1)  have hIxy : Disjoint I ({x,y} : Finset _) := by    apply Finset.disjoint_left.mpr    intro w hw hp    simp only [Finset.mem_insert, Finset.mem_singleton] at hp    rcases hp with rfl | rfl    · exact hxW (hIU hw)    · exact hyW (hIU hw)  have hVxy : Disjoint V ({x,y} : Finset _) := by    apply Finset.disjoint_left.mpr    intro q hq hp    simp only [Finset.mem_insert, Finset.mem_singleton] at hp    rcases hp with rfl | rfl    · exact hxQ hq    · exact hyQ hq  have hIleft : Disjoint I (V ∪ {x,y}) :=    Finset.disjoint_union_right.mpr ⟨hdisj, hIxy⟩  have hcrossI : ∀ w ∈ I, ∀ q ∈ V ∪ {x,y}, ¬ G.Adj w q := by    intro w hw q hq    have hwI := Finset.mem_inter.mp hw    rcases Finset.mem_union.mp hq with hqV | hqxy    · rcases Finset.mem_union.mp hqV with hq1 | hq2      · exact hcross₁ w hwI.1 q hq1      · exact hcross₂ w hwI.2 q hq2    · simp only [Finset.mem_insert, Finset.mem_singleton] at hqxy      rcases hqxy with rfl | rfl      · exact (htwins w (hIU hw)).1      · exact (htwins w (hIU hw)).2  have hB : (V ∪ {x,y}).Nonempty := by    exact ⟨x, Finset.mem_union.mpr (Or.inr (by simp))⟩  have hbd := two_k_connected_anticomplete_sets_cardinality_bound k d G I (V ∪ {x,y})    hsep hWi hB hIleft hcrossI  have hBcard : (V ∪ {x,y}).card = V.card + 2 := by    rw [Finset.card_union_of_disjoint hVxy, Finset.card_pair hxy]  rw [hBcard] at hbd  have hWcard : U.card + I.card = W₁.card + W₂.card := Finset.card_union_add_card_inter _ _  have hQcard : V.card + J.card = Q₁.card + Q₂.card := Finset.card_union_add_card_inter _ _  dsimp [I, J, U, V] at hbd hWcard hQcard  change 2 ≤ (Q₁ ∩ Q₂).card  omega
See it in the graphDiscuss this resultChallenge it