AFTD Auto-Formalizing Theoretical Domains

graph_two_unbalanced_bridge_complements_degree_obstruction

theoremverified

For j at least eight, two unbalanced bridge-complement configurations of side sizes j−1 and j+1 cannot coexist under the displayed complement degree and endpoint-avoidance conditions, regardless of which side contains the second endpoint.

Statement

theorem graph_two_unbalanced_bridge_complements_degree_obstruction
    (n j : ℕ) (hj : 8 ≤ 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')
    (hA : A.card = j-1) (hB : B.card = j+1)
    (hsizes : (A'.card = j-1 ∧ B'.card = j+1) ∨ (A'.card = j+1 ∧ B'.card = j-1))
    (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)
    (havoid : ∀ x ∈ A, x ≠ u → ¬ H.Adj w x) : False
Source
OP-1957: near-twin complement degree-budget obstruction for even parameters; experiments 34681 and 34682.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

The proof derives a contradiction with the maximum degree bound $\le j+2$. First, vertex $a \in A \cap A'$ must be adjacent to all vertices of $B$ and all vertices of $B' \setminus \{w\}$, which by inclusion-exclusion forces $B$ and $B' \setminus \{w\}$ to share a common vertex $y$ since $j \ge 8$. Next, this vertex $y$ must be adjacent to all of $A \setminus \{u\}$ and all of $A'$. Finally, the endpoint-avoidance hypothesis restricts $(A \setminus \{u\}) \cap A'$ to at most $\{a\}$, which forces the degree of $y$ to be at least $2j - 4 > j+2$, an impossibility for $j \ge 8$.

  1. The neighborhood of $a$ contains $B \cup (B' \setminus \{w\})$.

    For any vertex $y \in B \cup (B' \setminus \{w\})$, we consider two cases. If $y \in B$, the cross-edge condition between $A$ and $B$ guarantees adjacency unless $(a, y) = (u, v)$; since $a \ne u$, $a$ is adjacent to $y$. If $y \in B' \setminus \{w\}$, the cross-edge condition between $A'$ and $B'$ guarantees adjacency unless $(a, y) = (a, w)$; since $y \ne w$, $a$ is adjacent to $y$. Thus every such $y$ is adjacent to $a$.

    lines 13–25

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

      classical
      -- the neighbourhood of a contains B and B' minus w
      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 \cap (B' \setminus \{w\})$ is non-empty, so there is a common element $y \in B \cap B'$ with $y \ne w$.

    Since $B \cup (B' \setminus \{w\}) \subseteq N(a)$, its cardinality is bounded by $\deg(a) \le j+2$. We have $|B| = j+1$ and $|B' \setminus \{w\}| = |B'| - 1$. By inclusion-exclusion, $|B \cup (B' \setminus \{w\})| + |B \cap (B' \setminus \{w\})| = |B| + |B' \setminus \{w\}|$. In either case for $|B'|$ ($j+1$ or $j-1$), the right-hand side is at least $(j+1) + (j-2) = 2j-1$. Because $j \ge 8$, the intersection size must be at least $(2j-1) - (j+2) = j - 3 \ge 5 > 0$. Hence we can choose an element $y \in B \cap (B' \setminus \{w\})$.

    lines 26–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.card_pos.mp, Finset.mem_inter.mp, Finset.mem_erase.mp

      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 hinter : 0 < (B ∩ B'.erase w).card := by rcases hsizes with ⟨-, h⟩ | ⟨-, h⟩ <;> 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
  3. The neighborhood of $y$ contains $(A \setminus \{u\}) \cup A'$.

    For any vertex $x \in (A \setminus \{u\}) \cup A'$, if $x \in A \setminus \{u\}$, the cross-edge condition between $A$ and $B$ implies $x \sim y$ because $x \ne u$ prevents $(x, y) = (u, v)$. If $x \in A'$, the cross-edge condition between $A'$ and $B'$ implies $x \sim y$ because $y \ne w$ prevents $(x, y) = (a, w)$. In either case, by symmetry of adjacency, $y$ is adjacent to $x$.

    lines 36–47

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

      -- the neighbourhood of y contains A minus u and A'
      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 intersection $(A \setminus \{u\}) \cap A'$ has cardinality at most 1.

    We show that $(A \setminus \{u\}) \cap A' \subseteq \{a\}$. Suppose $x \in (A \setminus \{u\}) \cap A'$ and $x \ne a$. Since $x \in A'$ and $w \in B'$, the cross-edge condition on $A' \times B'$ implies that either $(x = a \land w = w)$ or $x \sim w$. Because $x \ne a$, we must have $x \sim w$. However, $x \in A$ with $x \ne u$, so the endpoint-avoidance hypothesis asserts that $w$ is not adjacent to $x$, a contradiction. Therefore $x = a$, and the intersection has size at most 1.

    lines 48–58

    uses Finset.mem_inter.mp, Finset.mem_erase.mp, Finset.mem_singleton, Finset.card_le_card

      have hsmall : (A.erase u ∩ A').card ≤ 1 := by
        have hsub : A.erase u ∩ A' ⊆ {a} := by
          intro x hx
          obtain ⟨hxAe, hxA'⟩ := Finset.mem_inter.mp hx
          obtain ⟨hxu, hxA⟩ := Finset.mem_erase.mp hxAe
          rw [Finset.mem_singleton]
          by_contra hxa
          rcases hcross' x hxA' w hw' with ⟨h, -⟩ | h
          · exact hxa h
          · exact havoid x hxA hxu h.symm
        simpa using Finset.card_le_card hsub
  5. A contradiction is reached from the degree bound on $y$, completing the proof.

    Since $(A \setminus \{u\}) \cup A' \subseteq N(y)$, its size is at most $\deg(y) \le j+2$. By inclusion-exclusion, the union has size $|A \setminus \{u\}| + |A'| - |(A \setminus \{u\}) \cap A'| \ge (j-2) + |A'| - 1 = j + |A'| - 3$. If $|A'| = j-1$, this requires $2j - 4 \le j+2 \implies j \le 6$; if $|A'| = j+1$, it requires $2j - 2 \le j+2 \implies j \le 4$. Both contradict $j \ge 8$.

    lines 59–64

    uses Finset.card_le_card, SimpleGraph.card_neighborFinset_eq_degree, Finset.card_erase_of_mem, 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 = j - 2 := by rw [Finset.card_erase_of_mem hu, hA]; omega
      have hui2 := Finset.card_union_add_card_inter (A.erase u) A'
      rcases hsizes with ⟨h1, -⟩ | ⟨h1, -⟩ <;> omega
SimpleGraph.mem_neighborFinset
A vertex $w$ belongs to the neighbor finset of $v$ if and only if $v$ and $w$ are adjacent in the graph.
Finset.mem_union.mp
If an element belongs to the union of two finite sets, it belongs to at least one of them.
Finset.mem_erase.mp
If an element belongs to a finite set with $a$ removed, it is not equal to $a$ and belongs to the original set.
Finset.card_le_card
If one finite set is a subset of another, its cardinality is at most the cardinality of the superset.
SimpleGraph.card_neighborFinset_eq_degree
The cardinality of the neighbor finset of a vertex is equal to the vertex's degree.
Finset.card_erase_of_mem
Removing an element that belongs to a finite set decreases its cardinality by one.
Finset.card_pos.mpr
A finite set that contains an element has strictly positive cardinality.
Finset.card_pos.mp
A finite set with strictly positive cardinality contains at least one element.
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 cardinalities.
Finset.mem_inter.mp
If an element belongs to the intersection of two finite sets, it belongs to both sets.
Finset.mem_singleton
An element belongs to the singleton $\{a\}$ if and only if it equals $a$.

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_unbalanced_bridge_complements_degree_obstruction    (n j : ℕ) (hj : 8 ≤ 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')    (hA : A.card = j-1) (hB : B.card = j+1)    (hsizes : (A'.card = j-1 ∧ B'.card = j+1) ∨ (A'.card = j+1 ∧ B'.card = j-1))    (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)    (havoid : ∀ x ∈ A, x ≠ u → ¬ H.Adj w x) : False := by  classical  -- the neighbourhood of a contains B and B' minus w  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 hinter : 0 < (B ∩ B'.erase w).card := by rcases hsizes with ⟨-, h⟩ | ⟨-, h⟩ <;> 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  -- the neighbourhood of y contains A minus u and A'  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 hsmall : (A.erase u ∩ A').card ≤ 1 := by    have hsub : A.erase u ∩ A' ⊆ {a} := by      intro x hx      obtain ⟨hxAe, hxA'⟩ := Finset.mem_inter.mp hx      obtain ⟨hxu, hxA⟩ := Finset.mem_erase.mp hxAe      rw [Finset.mem_singleton]      by_contra hxa      rcases hcross' x hxA' w hw' with ⟨h, -⟩ | h      · exact hxa h      · exact havoid x hxA hxu h.symm    simpa using Finset.card_le_card hsub  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 = j - 2 := by rw [Finset.card_erase_of_mem hu, hA]; omega  have hui2 := Finset.card_union_add_card_inter (A.erase u) A'  rcases hsizes with ⟨h1, -⟩ | ⟨h1, -⟩ <;> omega
See it in the graphDiscuss this resultChallenge it