AFTD Auto-Formalizing Theoretical Domains

two_hub_nested_bicliques_opposite_disjoint

theoremverified

With two hub neighbors and the displayed pair of complete bipartite subgraphs, the first opposite shore is disjoint from the second shore whenever their disjoint neighbor sets exceed the degree bound.

Statement

theorem two_hub_nested_bicliques_opposite_disjoint
    {V : Type*} [Fintype V] [DecidableEq V]
    (H : SimpleGraph V) [DecidableRel H.Adj]
    (d : ℕ) (x y : V) (hxy : x ≠ y) (S A B W Q : Finset V)
    (hA : A ⊆ S) (hW : W ⊆ S) (hAB : Disjoint A B) (hQB : Q ⊆ B)
    (hxS : x ∉ S) (hyS : y ∉ S) (hxQ : x ∉ Q) (hyQ : y ∉ Q)
    (hsize : d < A.card + Q.card + 2)
    (hmax : ∀ v, (H.neighborFinset v).card ≤ d)
    (hSxy : ∀ v ∈ S, H.Adj v x ∧ H.Adj v y)
    (hBA : ∀ b ∈ B, ∀ a ∈ A, H.Adj b a)
    (hQW : ∀ q ∈ Q, ∀ w ∈ W, H.Adj q w) : Disjoint B W
Source
OP-1957 crossing-shore structural reduction, session IN-1122.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The proof proceeds by contradiction. If B and W shared a vertex b, then b would be in S (since W ⊆ S) and thus adjacent to both hub vertices x and y. Additionally, b would be adjacent to every vertex in A (as b ∈ B) and every vertex in Q (as b ∈ W). Because x, y, A, and Q are pairwise disjoint, this exhibits at least |A| + |Q| + 2 distinct neighbors of b, contradicting the maximum degree upper bound d.

  1. Assume for contradiction that B and W are not disjoint, fixing a common vertex b ∈ B ∩ W.

    By Finset.disjoint_left.mpr, showing that B and W are disjoint is equivalent to showing that no vertex belongs to both sets. We introduce an assumed common vertex b belonging to both B and W to derive a contradiction.

    lines 12–14

    uses Finset.disjoint_left.mpr

      classical
      apply Finset.disjoint_left.mpr
      intro b hbB hbW
  2. The vertex b is in S and is adjacent to both hub vertices x and y.

    Since b ∈ W and W ⊆ S, b lies in S. By assumption hSxy, every vertex in S is adjacent to both x and y, so b is adjacent to both x and y.

    lines 15–17

      have hbS : b ∈ S := hW hbW
      have hbx : H.Adj b x := (hSxy b hbS).1
      have hby : H.Adj b y := (hSxy b hbS).2
  3. The sets A and Q are disjoint, and neither hub vertex x nor y belongs to A ∪ Q.

    Since A and B are disjoint and Q ⊆ B, no element of A can be in Q, so A and Q are disjoint (using Finset.disjoint_left.mpr and Finset.disjoint_left.mp). Furthermore, A ⊆ S while x ∉ S and y ∉ S, so neither x nor y can belong to A. Combined with the hypotheses x ∉ Q and y ∉ Q, neither x nor y belongs to the union A ∪ Q.

    lines 18–24

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

      have hAQ : Disjoint A Q := Finset.disjoint_left.mpr (by
        intro a haA haQ
        exact (Finset.disjoint_left.mp hAB) haA (hQB haQ))
      have hxA : x ∉ A := fun h => hxS (hA h)
      have hyA : y ∉ A := fun h => hyS (hA h)
      have hxU : x ∉ A ∪ Q := by simp [hxQ, hxA]
      have hyU : y ∉ A ∪ Q := by simp [hyQ, hyA]
  4. Every vertex in {x, y} ∪ A ∪ Q is a neighbor of b.

    We verify that any vertex v ∈ {x, y} ∪ (A ∪ Q) is adjacent to b, unpacking set membership via Finset.mem_insert and Finset.mem_union, and converting neighborhood membership to adjacency via H.mem_neighborFinset. If v is x or y, b is adjacent to v from being in S. If v ∈ A, b is adjacent to v because b ∈ B (by hBA). If v ∈ Q, b is adjacent to v by graph symmetry because b ∈ W (by hQW).

    lines 25–33

    uses H.mem_neighborFinset, Finset.mem_insert, Finset.mem_union

      have hsub : insert x (insert y (A ∪ Q)) ⊆ H.neighborFinset b := by
        intro v hv
        rw [H.mem_neighborFinset]
        simp only [Finset.mem_insert, Finset.mem_union] at hv
        rcases hv with rfl | rfl | hv | hv
        · exact hbx
        · exact hby
        · exact hBA b hbB v hv
        · exact (hQW v hv b hbW).symm
  5. The neighbor set has size |A| + |Q| + 2 ≤ d, contradicting d < |A| + |Q| + 2.

    By subset monotonicity of cardinality (Finset.card_le_card) and the maximum degree bound hmax, the size of {x, y} ∪ (A ∪ Q) is at most deg(b) ≤ d. Since x ≠ y, neither hub is in A ∪ Q, and A is disjoint from Q, we compute the cardinality as |A| + |Q| + 2 using Finset.card_insert_of_notMem and Finset.card_union_of_disjoint. This yields |A| + |Q| + 2 ≤ d, contradicting the hypothesis hsize that d < |A| + |Q| + 2. Linear integer arithmetic (omega) finishes the proof.

    lines 34–37

    uses Finset.card_le_card, Finset.card_insert_of_notMem, Finset.card_union_of_disjoint

      have hn := (Finset.card_le_card hsub).trans (hmax b)
      rw [Finset.card_insert_of_notMem (by simp [hxy, hxU]), Finset.card_insert_of_notMem hyU,
        Finset.card_union_of_disjoint hAQ] at hn
      omega
Finset.disjoint_left.mpr
Two finite sets are disjoint if every element of the first set is not in the second set.
Finset.disjoint_left.mp
If two finite sets are disjoint, no element of the first set can belong to the second set.
H.mem_neighborFinset
A vertex belongs to the neighbor finset of u if and only if it is adjacent to u.
Finset.mem_insert
An element belongs to an inserted set if and only if it equals the inserted element or belongs to the original set.
Finset.mem_union
An element belongs to the union of two sets if and only if it belongs to at least one of them.
Finset.card_le_card
If one finite set is a subset of another, its cardinality is at most the cardinality of the superset.
Finset.card_insert_of_notMem
Inserting an element that is not in a finite set increases its cardinality by 1.
Finset.card_union_of_disjoint
The cardinality of the union of two disjoint finite sets is the sum of their 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 two_hub_nested_bicliques_opposite_disjoint    {V : Type*} [Fintype V] [DecidableEq V]    (H : SimpleGraph V) [DecidableRel H.Adj]    (d : ℕ) (x y : V) (hxy : x ≠ y) (S A B W Q : Finset V)    (hA : A ⊆ S) (hW : W ⊆ S) (hAB : Disjoint A B) (hQB : Q ⊆ B)    (hxS : x ∉ S) (hyS : y ∉ S) (hxQ : x ∉ Q) (hyQ : y ∉ Q)    (hsize : d < A.card + Q.card + 2)    (hmax : ∀ v, (H.neighborFinset v).card ≤ d)    (hSxy : ∀ v ∈ S, H.Adj v x ∧ H.Adj v y)    (hBA : ∀ b ∈ B, ∀ a ∈ A, H.Adj b a)    (hQW : ∀ q ∈ Q, ∀ w ∈ W, H.Adj q w) : Disjoint B W := by  classical  apply Finset.disjoint_left.mpr  intro b hbB hbW  have hbS : b ∈ S := hW hbW  have hbx : H.Adj b x := (hSxy b hbS).1  have hby : H.Adj b y := (hSxy b hbS).2  have hAQ : Disjoint A Q := Finset.disjoint_left.mpr (by    intro a haA haQ    exact (Finset.disjoint_left.mp hAB) haA (hQB haQ))  have hxA : x ∉ A := fun h => hxS (hA h)  have hyA : y ∉ A := fun h => hyS (hA h)  have hxU : x ∉ A ∪ Q := by simp [hxQ, hxA]  have hyU : y ∉ A ∪ Q := by simp [hyQ, hyA]  have hsub : insert x (insert y (A ∪ Q)) ⊆ H.neighborFinset b := by    intro v hv    rw [H.mem_neighborFinset]    simp only [Finset.mem_insert, Finset.mem_union] at hv    rcases hv with rfl | rfl | hv | hv    · exact hbx    · exact hby    · exact hBA b hbB v hv    · exact (hQW v hv b hbW).symm  have hn := (Finset.card_le_card hsub).trans (hmax b)  rw [Finset.card_insert_of_notMem (by simp [hxy, hxU]), Finset.card_insert_of_notMem hyU,    Finset.card_union_of_disjoint hAQ] at hn  omega
See it in the graphDiscuss this resultChallenge it