AFTD Auto-Formalizing Theoretical Domains

graph_two_mixed_bridge_complements_degree_obstruction

theoremverified

For j at least nine, the displayed balanced or unbalanced complement bridge block cannot coexist with a second allowed bridge block when the new endpoint has at most one complement neighbor in the first nonendpoint side and the maximum degree is at most j+2.

Statement

theorem graph_two_mixed_bridge_complements_degree_obstruction
    (n j : ℕ) (hj : 9 ≤ j) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
    (hmax : ∀ x, H.degree x ≤ j+2)
    (A B A' B' : Finset (Fin n))
    (hAB : Disjoint A B) (hAB' : Disjoint A' B')
    (hold : (A.card = j-2 ∧ B.card = j+2) ∨ (A.card = j ∧ B.card = j))
    (hnew : (A'.card = j-2 ∧ B'.card = j+2) ∨ (A'.card = j ∧ B'.card = j) ∨ (A'.card = j+2 ∧ B'.card = j-2))
    (u v a w : Fin n) (hu : u ∈ A) (hv : v ∈ B) (huv : ¬ H.Adj u v)
    (ha : a ∈ A) (hau : a ≠ u) (hwA : w ∉ A) (hwB : w ∉ B) (ha' : a ∈ A') (hw' : w ∈ B')
    (hcross : ∀ x ∈ A, ∀ y ∈ B, (x = u ∧ y = v) ∨ H.Adj x y)
    (hcross' : ∀ x ∈ A', ∀ y ∈ B', (x = a ∧ y = w) ∨ H.Adj x y)
    (haw : ¬ H.Adj a w) (havoid : ((A.erase u).filter (fun x => H.Adj w x)).card ≤ 1) : False
Source
OP-1957: mixed-size complement bridge degree obstruction for odd parameters; experiments 34687 and 34688.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

The proof derives a contradiction by analyzing the degree bounds of vertices in the overlap of two quasi-complete bipartite bridge blocks (A, B) and (A', B'). Because a ∈ A \ {u} and a ∈ A', its neighborhood must contain B ∪ (B' \ {w}), which forces B and B' \ {w} to share a common vertex y by the maximum degree constraint deg(a) ≤ j + 2. In turn, y is adjacent to all of (A \ {u}) ∪ A', bounding the size of this union by deg(y) ≤ j + 2. Finally, a case split on whether (A \ {u}) ∩ A' contains any vertex other than a shows that the overlap of the A-sides cannot simultaneously satisfy the degree bounds and the bridge-block edge conditions when j ≥ 9.

  1. The vertex a is adjacent to every vertex in B ∪ (B' \ {w}), so B ∪ (B' \ {w}) ⊆ N(a).

    Since a ∈ A and a ≠ u, the cross-edges hypothesis between A and B implies that a is adjacent to every vertex in B. Similarly, since a ∈ A', the cross-edges hypothesis between A' and B' ensures that a is adjacent to every vertex in B' except possibly w. Therefore, a is adjacent to every vertex in the union B ∪ (B' \ {w}).

    lines 13–24

    uses SimpleGraph.mem_neighborFinset, Finset.mem_union.mp, Finset.mem_erase.mp

      classical
      have hNa : B ∪ B'.erase w ⊆ H.neighborFinset a := by
        intro y hy
        rw [SimpleGraph.mem_neighborFinset]
        rcases Finset.mem_union.mp hy with hyB | hyB'
        · rcases hcross a ha y hyB with ⟨h, -⟩ | h
          · exact absurd h hau
          · exact h
        · obtain ⟨hyw, hyB'⟩ := Finset.mem_erase.mp hyB'
          rcases hcross' a ha' y hyB' with ⟨-, h⟩ | h
          · exact absurd h hyw
          · exact h
  2. The intersection B ∩ (B' \ {w}) is nonempty.

    The neighborhood inclusion implies |B ∪ (B' \ {w})| ≤ deg(a) ≤ j + 2. Since w ∈ B', removing w gives |B' \ {w}| = |B'| - 1. By inclusion-exclusion, |B ∩ (B' \ {w})| = |B| + |B' \ {w}| - |B ∪ (B' \ {w})|. Because j ≥ 9 and the permitted cardinalities for B and B' are each at least j - 2, this quantity is strictly positive across all combinations of sizes, which omega verifies.

    lines 25–35

    uses Finset.card_le_card, SimpleGraph.card_neighborFinset_eq_degree, Finset.card_erase_of_mem, Finset.card_pos.mpr, Finset.card_union_add_card_inter, Finset.inter_subset_right

      have hcardNa := Finset.card_le_card hNa
      rw [SimpleGraph.card_neighborFinset_eq_degree] at hcardNa
      have hdega := hmax a
      have hEr : (B'.erase w).card = B'.card - 1 := Finset.card_erase_of_mem hw'
      have hB'pos : 0 < B'.card := Finset.card_pos.mpr ⟨w, hw'⟩
      have hui := Finset.card_union_add_card_inter B (B'.erase w)
      have hinterle : (B ∩ B'.erase w).card ≤ (B'.erase w).card :=
        Finset.card_le_card Finset.inter_subset_right
      have hinter : 0 < (B ∩ B'.erase w).card := by
        rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>
        rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega
  3. There exists a vertex y ∈ B ∩ (B' \ {w}), and its neighborhood contains (A \ {u}) ∪ A'.

    Since the intersection is nonempty, choose an element y ∈ B ∩ (B' \ {w}). Because y ∈ B, its only possible non-neighbor in A is u, so A \ {u} ⊆ N(y). Because y ∈ B' and y ≠ w, it cannot be the non-neighbor w of any vertex in A', so A' ⊆ N(y). Therefore, (A \ {u}) ∪ A' ⊆ N(y).

    lines 36–49

    uses Finset.card_pos.mp, Finset.mem_inter.mp, Finset.mem_erase.mp, SimpleGraph.mem_neighborFinset, Finset.mem_union.mp

      obtain ⟨y, hy⟩ := Finset.card_pos.mp hinter
      obtain ⟨hyB, hyB'e⟩ := Finset.mem_inter.mp hy
      obtain ⟨hyw, hyB'⟩ := Finset.mem_erase.mp hyB'e
      have hNy : A.erase u ∪ A' ⊆ H.neighborFinset y := by
        intro x hx
        rw [SimpleGraph.mem_neighborFinset]
        rcases Finset.mem_union.mp hx with hxA | hxA'
        · obtain ⟨hxu, hxA⟩ := Finset.mem_erase.mp hxA
          rcases hcross x hxA y hyB with ⟨h, -⟩ | h
          · exact absurd h hxu
          · exact h.symm
        · rcases hcross' x hxA' y hyB' with ⟨-, h⟩ | h
          · exact absurd h hyw
          · exact h.symm
  4. The union (A \ {u}) ∪ A' has cardinality at most j + 2, and satisfies the inclusion-exclusion identity with (A \ {u}) ∩ A'.

    The inclusion into N(y) gives |(A \ {u}) ∪ A'| ≤ deg(y) ≤ j + 2. Furthermore, since u ∈ A, |A \ {u}| = |A| - 1 > 0, and inclusion-exclusion relates the cardinalities of the union and intersection of A \ {u} and A'.

    lines 50–55

    uses Finset.card_le_card, SimpleGraph.card_neighborFinset_eq_degree, Finset.card_erase_of_mem, Finset.card_pos.mpr, Finset.card_union_add_card_inter

      have hcardNy := Finset.card_le_card hNy
      rw [SimpleGraph.card_neighborFinset_eq_degree] at hcardNy
      have hdegy := hmax y
      have hAe : (A.erase u).card = A.card - 1 := Finset.card_erase_of_mem hu
      have hApos : 0 < A.card := Finset.card_pos.mpr ⟨u, hu⟩
      have hui2 := Finset.card_union_add_card_inter (A.erase u) A'
  5. If there exists a vertex x₀ ∈ (A \ {u}) ∩ A' with x₀ ≠ a, a contradiction is reached.

    Because x₀ ∈ A \ {u}, it is adjacent to all of B. Because x₀ ∈ A' \ {a}, it is adjacent to all of B', which includes w and B' \ {w}. Since w ∉ B and w ∉ B' \ {w}, the set {w} ∪ B ∪ (B' \ {w}) has size 1 + |B ∪ (B' \ {w})| and lies in N(x₀), so |B ∪ (B' \ {w})| ≤ deg(x₀) - 1 ≤ j + 1. Next, any x ∈ (A \ {u}) ∩ A' with x ≠ a must be adjacent to w, so (A \ {u}) ∩ A' ⊆ {a} ∪ {x ∈ A \ {u} | x ~ w}. By havoid, this filter contains at most 1 vertex, so |(A \ {u}) ∩ A'| ≤ 2. Combining this bound with inclusion-exclusion and the maximum degree bounds yields an integer linear arithmetic contradiction via omega for all allowed block sizes when j ≥ 9.

    lines 56–95

    uses Finset.mem_inter.mp, Finset.mem_erase.mp, SimpleGraph.mem_neighborFinset, Finset.mem_insert.mp, Finset.mem_union.mp, Finset.card_le_card, Finset.card_insert_of_notMem, SimpleGraph.card_neighborFinset_eq_degree, Finset.mem_insert, Finset.mem_filter, Or.inl, le_trans, Finset.card_insert_le

      by_cases hex : ∃ x0 ∈ A.erase u ∩ A', x0 ≠ a
      · obtain ⟨x0, hx0, hx0a⟩ := hex
        obtain ⟨hx0Ae, hx0A'⟩ := Finset.mem_inter.mp hx0
        obtain ⟨hx0u, hx0A⟩ := Finset.mem_erase.mp hx0Ae
        -- x0 sees all of B and all of B'
        have hNx : insert w (B ∪ B'.erase w) ⊆ H.neighborFinset x0 := by
          intro z hz
          rw [SimpleGraph.mem_neighborFinset]
          rcases Finset.mem_insert.mp hz with rfl | hz
          · rcases hcross' x0 hx0A' z hw' with ⟨h, -⟩ | h
            · exact absurd h hx0a
            · exact h
          rcases Finset.mem_union.mp hz with hzB | hzB'
          · rcases hcross x0 hx0A z hzB with ⟨h, -⟩ | h
            · exact absurd h hx0u
            · exact h
          · obtain ⟨-, hzB'⟩ := Finset.mem_erase.mp hzB'
            rcases hcross' x0 hx0A' z hzB' with ⟨h, -⟩ | h
            · exact absurd h hx0a
            · exact h
        have hwnot : w ∉ B ∪ B'.erase w := by
          simp [hwB]
        have hcardNx := Finset.card_le_card hNx
        rw [Finset.card_insert_of_notMem hwnot, SimpleGraph.card_neighborFinset_eq_degree] at hcardNx
        have hdegx := hmax x0
        -- the overlap has at most two vertices: a and one neighbour of w
        have hsub : A.erase u ∩ A' ⊆ insert a ((A.erase u).filter (fun x => H.Adj w x)) := by
          intro x hx
          obtain ⟨hxAe, hxA'⟩ := Finset.mem_inter.mp hx
          rw [Finset.mem_insert, Finset.mem_filter]
          by_cases hxa : x = a
          · exact Or.inl hxa
          · right
            refine ⟨hxAe, ?_⟩
            rcases hcross' x hxA' w hw' with ⟨h, -⟩ | h
            · exact absurd h hxa
            · exact h.symm
        have hov := le_trans (Finset.card_le_card hsub) (Finset.card_insert_le _ _)
        rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>
        rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega
  6. If no such vertex x₀ exists, a contradiction is also reached.

    If no element of (A \ {u}) ∩ A' is distinct from a, then the intersection is a subset of {a} and has cardinality at most 1. By inclusion-exclusion, |(A \ {u}) ∪ A'| = (|A| - 1) + |A'| - |(A \ {u}) ∩ A'| ≥ |A| + |A'| - 2. For j ≥ 9, this lower bound strictly exceeds the maximum degree bound j + 2 on deg(y), which omega recognizes as an arithmetic contradiction in every cardinality branch.

    lines 96–101

    uses Finset.mem_singleton.mpr, Finset.card_le_card, Finset.card_singleton

      · push Not at hex
        have hsub : A.erase u ∩ A' ⊆ {a} := fun x hx => Finset.mem_singleton.mpr (hex x hx)
        have hov := Finset.card_le_card hsub
        rw [Finset.card_singleton] at hov
        rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>
        rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega
SimpleGraph.mem_neighborFinset
A vertex w is in the neighbor finset of v if and only if v and w are adjacent.
Finset.mem_union.mp
If an element belongs to the union s ∪ t, it belongs to s or to t.
Finset.mem_erase.mp
If an element belongs to s \ {a}, then it is not equal to a and belongs to s.
Finset.card_le_card
If s ⊆ t, then |s| ≤ |t|.
SimpleGraph.card_neighborFinset_eq_degree
The cardinality of the neighbor finset of a vertex equals its degree.
Finset.card_erase_of_mem
Removing an element a from a finset s in which it lies decreases its cardinality by 1.
Finset.card_pos.mpr
A nonempty finset has strictly positive cardinality.
Finset.card_union_add_card_inter
The principle of inclusion-exclusion for two finsets: |s ∪ t| + |s ∩ t| = |s| + |t|.
Finset.inter_subset_right
The intersection s₁ ∩ s₂ is a subset of s₂.
Finset.card_pos.mp
If a finset has cardinality strictly greater than 0, it is nonempty.
Finset.mem_inter.mp
If an element belongs to s ∩ t, it belongs to both s and t.
Finset.mem_insert.mp
If an element belongs to {a} ∪ s, it is equal to a or belongs to s.
Finset.card_insert_of_notMem
Inserting an element a ∉ s into s yields a finset of size |s| + 1.
Finset.mem_insert
An element belongs to {a} ∪ s if and only if it equals a or belongs to s.
Finset.mem_filter
An element belongs to the filtered sub-finset if and only if it belongs to s and satisfies the predicate p.
Or.inl
From a proof of A, deduce the disjunction A ∨ B.
le_trans
Transitivity of the order relation: if a ≤ b and b ≤ c, then a ≤ c.
Finset.card_insert_le
Adding an element to a finset increases its cardinality by at most 1.
Finset.mem_singleton.mpr
If an element equals a, it belongs to the singleton {a}.
Finset.card_singleton
A singleton finset has cardinality 1.

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 graph_two_mixed_bridge_complements_degree_obstruction    (n j : ℕ) (hj : 9 ≤ j) (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]    (hmax : ∀ x, H.degree x ≤ j+2)    (A B A' B' : Finset (Fin n))    (hAB : Disjoint A B) (hAB' : Disjoint A' B')    (hold : (A.card = j-2 ∧ B.card = j+2) ∨ (A.card = j ∧ B.card = j))    (hnew : (A'.card = j-2 ∧ B'.card = j+2) ∨ (A'.card = j ∧ B'.card = j) ∨ (A'.card = j+2 ∧ B'.card = j-2))    (u v a w : Fin n) (hu : u ∈ A) (hv : v ∈ B) (huv : ¬ H.Adj u v)    (ha : a ∈ A) (hau : a ≠ u) (hwA : w ∉ A) (hwB : w ∉ B) (ha' : a ∈ A') (hw' : w ∈ B')    (hcross : ∀ x ∈ A, ∀ y ∈ B, (x = u ∧ y = v) ∨ H.Adj x y)    (hcross' : ∀ x ∈ A', ∀ y ∈ B', (x = a ∧ y = w) ∨ H.Adj x y)    (haw : ¬ H.Adj a w) (havoid : ((A.erase u).filter (fun x => H.Adj w x)).card ≤ 1) : False := by  classical  have hNa : B ∪ B'.erase w ⊆ H.neighborFinset a := by    intro y hy    rw [SimpleGraph.mem_neighborFinset]    rcases Finset.mem_union.mp hy with hyB | hyB'    · rcases hcross a ha y hyB with ⟨h, -⟩ | h      · exact absurd h hau      · exact h    · obtain ⟨hyw, hyB'⟩ := Finset.mem_erase.mp hyB'      rcases hcross' a ha' y hyB' with ⟨-, h⟩ | h      · exact absurd h hyw      · exact h  have hcardNa := Finset.card_le_card hNa  rw [SimpleGraph.card_neighborFinset_eq_degree] at hcardNa  have hdega := hmax a  have hEr : (B'.erase w).card = B'.card - 1 := Finset.card_erase_of_mem hw'  have hB'pos : 0 < B'.card := Finset.card_pos.mpr ⟨w, hw'⟩  have hui := Finset.card_union_add_card_inter B (B'.erase w)  have hinterle : (B ∩ B'.erase w).card ≤ (B'.erase w).card :=    Finset.card_le_card Finset.inter_subset_right  have hinter : 0 < (B ∩ B'.erase w).card := by    rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>    rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega  obtain ⟨y, hy⟩ := Finset.card_pos.mp hinter  obtain ⟨hyB, hyB'e⟩ := Finset.mem_inter.mp hy  obtain ⟨hyw, hyB'⟩ := Finset.mem_erase.mp hyB'e  have hNy : A.erase u ∪ A' ⊆ H.neighborFinset y := by    intro x hx    rw [SimpleGraph.mem_neighborFinset]    rcases Finset.mem_union.mp hx with hxA | hxA'    · obtain ⟨hxu, hxA⟩ := Finset.mem_erase.mp hxA      rcases hcross x hxA y hyB with ⟨h, -⟩ | h      · exact absurd h hxu      · exact h.symm    · rcases hcross' x hxA' y hyB' with ⟨-, h⟩ | h      · exact absurd h hyw      · exact h.symm  have hcardNy := Finset.card_le_card hNy  rw [SimpleGraph.card_neighborFinset_eq_degree] at hcardNy  have hdegy := hmax y  have hAe : (A.erase u).card = A.card - 1 := Finset.card_erase_of_mem hu  have hApos : 0 < A.card := Finset.card_pos.mpr ⟨u, hu⟩  have hui2 := Finset.card_union_add_card_inter (A.erase u) A'  by_cases hex : ∃ x0 ∈ A.erase u ∩ A', x0 ≠ a  · obtain ⟨x0, hx0, hx0a⟩ := hex    obtain ⟨hx0Ae, hx0A'⟩ := Finset.mem_inter.mp hx0    obtain ⟨hx0u, hx0A⟩ := Finset.mem_erase.mp hx0Ae    -- x0 sees all of B and all of B'    have hNx : insert w (B ∪ B'.erase w) ⊆ H.neighborFinset x0 := by      intro z hz      rw [SimpleGraph.mem_neighborFinset]      rcases Finset.mem_insert.mp hz with rfl | hz      · rcases hcross' x0 hx0A' z hw' with ⟨h, -⟩ | h        · exact absurd h hx0a        · exact h      rcases Finset.mem_union.mp hz with hzB | hzB'      · rcases hcross x0 hx0A z hzB with ⟨h, -⟩ | h        · exact absurd h hx0u        · exact h      · obtain ⟨-, hzB'⟩ := Finset.mem_erase.mp hzB'        rcases hcross' x0 hx0A' z hzB' with ⟨h, -⟩ | h        · exact absurd h hx0a        · exact h    have hwnot : w ∉ B ∪ B'.erase w := by      simp [hwB]    have hcardNx := Finset.card_le_card hNx    rw [Finset.card_insert_of_notMem hwnot, SimpleGraph.card_neighborFinset_eq_degree] at hcardNx    have hdegx := hmax x0    -- the overlap has at most two vertices: a and one neighbour of w    have hsub : A.erase u ∩ A' ⊆ insert a ((A.erase u).filter (fun x => H.Adj w x)) := by      intro x hx      obtain ⟨hxAe, hxA'⟩ := Finset.mem_inter.mp hx      rw [Finset.mem_insert, Finset.mem_filter]      by_cases hxa : x = a      · exact Or.inl hxa      · right        refine ⟨hxAe, ?_⟩        rcases hcross' x hxA' w hw' with ⟨h, -⟩ | h        · exact absurd h hxa        · exact h.symm    have hov := le_trans (Finset.card_le_card hsub) (Finset.card_insert_le _ _)    rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>    rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega  · push Not at hex    have hsub : A.erase u ∩ A' ⊆ {a} := fun x hx => Finset.mem_singleton.mpr (hex x hx)    have hov := Finset.card_le_card hsub    rw [Finset.card_singleton] at hov    rcases hold with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>    rcases hnew with ⟨h3, h4⟩ | ⟨h3, h4⟩ | ⟨h3, h4⟩ <;> omega
See it in the graphDiscuss this resultChallenge it