AFTD Auto-Formalizing Theoretical Domains

crossing_bridge_shores_force_cut_equality

theoremverified

In a graph on 2k+d+3 vertices with no separator smaller than 2k, suppose two bridge-shore pairs Wᵢ,Qᵢ have |Wᵢ|+|Qᵢ|=d+1, both W and Q intersections are nonempty, the W intersection is disjoint from the Q union and vice versa, and the stated twin, endpoint, and cross-shore nonadjacencies hold. Then |W₁ ∪ W₂|+|Q₁ ∩ Q₂|=d+1, and both crossing separators have exactly 2k vertices.

Statement

theorem crossing_bridge_shores_force_cut_equality
    (k d : ℕ) (G : SimpleGraph (Fin (2 * k + d + 3)))
    (W₁ W₂ Q₁ Q₂ : Finset (Fin (2 * k + d + 3)))
    (x y z₁ z₂ : 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) (hQi : (Q₁ ∩ Q₂).Nonempty)
    (hsize₁ : W₁.card + Q₁.card = d + 1)
    (hsize₂ : W₂.card + Q₂.card = d + 1)
    (hxy : x ≠ y) (hzz : z₁ ≠ z₂)
    (hxW : x ∉ W₁ ∪ W₂) (hyW : y ∉ W₁ ∪ W₂)
    (hxQ : x ∉ Q₁ ∪ Q₂) (hyQ : y ∉ Q₁ ∪ Q₂)
    (hz₁W : z₁ ∉ W₁ ∪ W₂) (hz₂W : z₂ ∉ W₁ ∪ W₂)
    (hz₁Q : z₁ ∉ Q₁ ∩ Q₂) (hz₂Q : z₂ ∉ Q₁ ∩ Q₂)
    (hdisj₁ : Disjoint (W₁ ∩ W₂) (Q₁ ∪ Q₂))
    (hdisj₂ : Disjoint (Q₁ ∩ Q₂) (W₁ ∪ W₂))
    (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)
    (hend : ∀ q ∈ Q₁ ∩ Q₂, ¬ G.Adj q z₁ ∧ ¬ G.Adj q z₂) :
    (W₁ ∪ W₂).card + (Q₁ ∩ Q₂).card = d + 1 ∧
    (Finset.univ \ ((W₁ ∩ W₂) ∪ (Q₁ ∪ Q₂) ∪ {x, y})).card = 2 * k ∧
    (Finset.univ \ ((Q₁ ∩ Q₂) ∪ (W₁ ∪ W₂) ∪ {z₁, z₂})).card = 2 * k
Source
Crossing minimum-cut equality in the OP-1957 equality-case two-critical-bridge route.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 3

The proof, explained

The proof applies a cardinality bound for anticomplete sets in 2k-connected graphs to two crossing pairs: (W₁ ∩ W₂, (Q₁ ∪ Q₂) ∪ {x, y}) and (Q₁ ∩ Q₂, (W₁ ∪ W₂) ∪ {z₁, z₂}). This yields the upper bounds |W₁ ∩ W₂| + |Q₁ ∪ Q₂| ≤ d + 1 and |W₁ ∪ W₂| + |Q₁ ∩ Q₂| ≤ d + 1. By inclusion-exclusion, the sum of these two quantities is (|W₁| + |Q₁|) + (|W₂| + |Q₂|) = 2(d + 1), which forces both inequalities to hold with equality. Subtracting these sets of size d + 3 from the total vertex set of size 2k + d + 3 shows that both crossing separators have size exactly 2k.

  1. Define shorthand notation I = W₁ ∩ W₂, J = Q₁ ∩ Q₂, U = W₁ ∪ W₂, and V = Q₁ ∪ Q₂, and establish the inclusions I ⊆ U and J ⊆ V.

    We introduce abbreviations for the intersections I, J and unions U, V of the two shore pairs. Any vertex in the intersection I = W₁ ∩ W₂ belongs to W₁ and therefore to the union U = W₁ ∪ W₂; similarly, any vertex in J = Q₁ ∩ Q₂ belongs to V = Q₁ ∪ Q₂.

    lines 26–36

    uses Finset.mem_union.mpr, Or.inl, Finset.mem_inter.mp

      classical
      let I := W₁ ∩ W₂
      let J := Q₁ ∩ Q₂
      let U := W₁ ∪ W₂
      let V := Q₁ ∪ Q₂
      have hIU : I ⊆ U := by
        intro x hx
        exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hx).1)
      have hJV : J ⊆ V := by
        intro x hx
        exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hx).1)
  2. The intersection I is disjoint from V ∪ {x, y}, and the intersection J is disjoint from U ∪ {z₁, z₂}.

    Because x and y do not belong to U = W₁ ∪ W₂ and I ⊆ U, neither vertex belongs to I, making I disjoint from {x, y}. Since I is also given to be disjoint from V = Q₁ ∪ Q₂, it is disjoint from V ∪ {x, y}. Symmetrically, V is disjoint from {x, y}, and using the hypotheses that z₁ and z₂ do not belong to U or J, we obtain that J is disjoint from U ∪ {z₁, z₂}.

    lines 37–68

    uses Finset.disjoint_left.mpr, Finset.mem_insert, Finset.mem_singleton, Finset.disjoint_union_right.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)
      have hJzz : Disjoint J ({z₁,z₂} : 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 hz₁Q hq
        · exact hz₂Q hq
      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 hUzz : Disjoint U ({z₁,z₂} : 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 hz₁W hw
        · exact hz₂W hw
      have hIleft : Disjoint I (V ∪ {x,y}) :=
        Finset.disjoint_union_right.mpr ⟨hdisj₁, hIxy⟩
      have hJleft : Disjoint J (U ∪ {z₁,z₂}) :=
        Finset.disjoint_union_right.mpr ⟨hdisj₂, hJzz⟩
  3. There are no edges between I and V ∪ {x, y}, and no edges between J and U ∪ {z₁, z₂}.

    For any w ∈ I and q ∈ V ∪ {x, y}, if q ∈ V = Q₁ ∪ Q₂, then w and q belong to opposite shores of the same pair (w ∈ W₁ with q ∈ Q₁, or w ∈ W₂ with q ∈ Q₂), so they are nonadjacent by the cross-shore nonadjacency hypotheses. If q ∈ {x, y}, nonadjacency follows from the twin hypothesis on U. Symmetrically, no vertex in J is adjacent to any vertex in U ∪ {z₁, z₂}, using the endpoint nonadjacency hypothesis for z₁, z₂.

    lines 69–90

    uses Finset.mem_inter.mp, Finset.mem_union.mp, Finset.mem_insert, Finset.mem_singleton

      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 hcrossJ : ∀ q ∈ J, ∀ w ∈ U ∪ {z₁,z₂}, ¬ G.Adj q w := by
        intro q hq w hw
        have hqJ := Finset.mem_inter.mp hq
        rcases Finset.mem_union.mp hw with hwU | hwzz
        · rcases Finset.mem_union.mp hwU with hw1 | hw2
          · exact fun h => hcross₁ w hw1 q hqJ.1 h.symm
          · exact fun h => hcross₂ w hw2 q hqJ.2 h.symm
        · simp only [Finset.mem_insert, Finset.mem_singleton] at hwzz
          rcases hwzz with rfl | rfl
          · exact (hend q hq).1
          · exact (hend q hq).2
  4. |I| + |V| + 2 ≤ d + 3 and |J| + |U| + 2 ≤ d + 3.

    Since x ≠ y and {x, y} is disjoint from V, the set V ∪ {x, y} is nonempty with cardinality |V| + 2. Because the graph has no separator smaller than 2k between disjoint anticomplete sets, any two disjoint nonempty anticomplete sets have total cardinality at most d + 3. Applying this bound to the anticomplete pair (I, V ∪ {x, y}) gives |I| + (|V| + 2) ≤ d + 3, and applying it to (J, U ∪ {z₁, z₂}) gives |J| + (|U| + 2) ≤ d + 3.

    lines 91–104

    uses Finset.mem_union.mpr, Or.inr, two_k_connected_anticomplete_sets_cardinality_bound, Finset.card_union_of_disjoint, Finset.card_pair

      have hB1 : (V ∪ {x,y}).Nonempty := by
        exact ⟨x, Finset.mem_union.mpr (Or.inr (by simp))⟩
      have hB2 : (U ∪ {z₁,z₂}).Nonempty := by
        exact ⟨z₁, Finset.mem_union.mpr (Or.inr (by simp))⟩
      have hbd1 := two_k_connected_anticomplete_sets_cardinality_bound k d G I (V ∪ {x,y})
        hsep hWi hB1 hIleft hcrossI
      have hbd2 := two_k_connected_anticomplete_sets_cardinality_bound k d G J (U ∪ {z₁,z₂})
        hsep hQi hB2 hJleft hcrossJ
      have hB1card : (V ∪ {x,y}).card = V.card + 2 := by
        rw [Finset.card_union_of_disjoint hVxy, Finset.card_pair hxy]
      have hB2card : (U ∪ {z₁,z₂}).card = U.card + 2 := by
        rw [Finset.card_union_of_disjoint hUzz, Finset.card_pair hzz]
      rw [hB1card] at hbd1
      rw [hB2card] at hbd2
  5. |W₁ ∪ W₂| + |Q₁ ∩ Q₂| = d + 1.

    By inclusion-exclusion, |U| + |I| = |W₁| + |W₂| and |V| + |J| = |Q₁| + |Q₂|. Adding these gives (|U| + |J|) + (|I| + |V|) = (|W₁| + |Q₁|) + (|W₂| + |Q₂|) = 2(d + 1). Together with the inequalities |I| + |V| ≤ d + 1 and |U| + |J| ≤ d + 1 from the previous step, linear arithmetic forces both bounds to be equalities, yielding |U| + |J| = d + 1.

    lines 105–107

    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 _ _
      have heq : U.card + J.card = d + 1 := by omega
  6. The complements of I ∪ (V ∪ {x, y}) and J ∪ (U ∪ {z₁, z₂}) in the vertex set each have cardinality exactly 2k.

    Since I and V ∪ {x, y} are disjoint, |I ∪ (V ∪ {x, y})| = |I| + |V| + 2 = (d + 1) + 2 = d + 3. Subtracting this subset from the total vertex set of size 2k + d + 3 leaves a complement of size (2k + d + 3) - (d + 3) = 2k. Symmetrically, J ∪ (U ∪ {z₁, z₂}) also has cardinality d + 3, so its complement likewise has size 2k.

    lines 108–121

    uses Finset.card_union_of_disjoint, Finset.card_sdiff_add_card_eq_card, Finset.subset_univ, Finset.card_univ, Fintype.card_fin

      have htotal1 : (I ∪ (V ∪ {x,y})).card = d + 3 := by
        rw [Finset.card_union_of_disjoint hIleft, hB1card]
        omega
      have htotal2 : (J ∪ (U ∪ {z₁,z₂})).card = d + 3 := by
        rw [Finset.card_union_of_disjoint hJleft, hB2card]
        omega
      have hc1 : ((Finset.univ : Finset (Fin (2 * k + d + 3))) \ (I ∪ (V ∪ {x,y}))).card = 2 * k := by
        have hc := Finset.card_sdiff_add_card_eq_card (Finset.subset_univ (I ∪ (V ∪ {x,y})))
        simp only [Finset.card_univ, Fintype.card_fin, htotal1] at hc
        omega
      have hc2 : ((Finset.univ : Finset (Fin (2 * k + d + 3))) \ (J ∪ (U ∪ {z₁,z₂}))).card = 2 * k := by
        have hc := Finset.card_sdiff_add_card_eq_card (Finset.subset_univ (J ∪ (U ∪ {z₁,z₂})))
        simp only [Finset.card_univ, Fintype.card_fin, htotal2] at hc
        omega
  7. |W₁ ∪ W₂| + |Q₁ ∩ Q₂| = d + 1 and both crossing separators have cardinality 2k.

    We combine the shore size equality and the two separator size equalities into the final conjunction, expanding the abbreviations I, J, U, V and reassociating the set unions.

    lines 122–124

    uses Finset.union_assoc

      refine ⟨heq, ?_, ?_⟩
      · simpa only [I, V, Finset.union_assoc] using hc1
      · simpa only [J, U, Finset.union_assoc] using hc2
Finset.mem_union.mpr
An element belongs to the union s ∪ t if it belongs to s or to t.
Finset.mem_inter.mp
If an element belongs to the intersection s ∩ t, then it belongs to both s and t.
Or.inl
From a proof of a, infer the disjunction a ∨ b.
Finset.disjoint_left.mpr
Two finite sets are disjoint if no element of the first belongs to the second.
Finset.mem_insert
An element belongs to insert a s if and only if it equals a or belongs to s.
Finset.mem_singleton
An element belongs to the singleton {a} if and only if it equals a.
Finset.disjoint_union_right.mpr
A set s is disjoint from a union t₁ ∪ t₂ if it is disjoint from both t₁ and t₂.
Finset.mem_union.mp
If an element belongs to the union s ∪ t, then it belongs to s or to t.
Or.inr
From a proof of b, infer the disjunction a ∨ b.
two_k_connected_anticomplete_sets_cardinality_bound
In a graph on 2k+d+3 vertices where every separator between disjoint nonempty anticomplete sets has size at least 2k, any two disjoint nonempty anticomplete sets A and B satisfy |A| + |B| ≤ 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 pair set {a, b} of distinct elements has cardinality 2.
Finset.card_union_add_card_inter
For any two finite sets s and t, |s ∪ t| + |s ∩ t| = |s| + |t|.
Finset.card_sdiff_add_card_eq_card
If s ⊆ t, then |t \ s| + |s| = |t|.
Finset.subset_univ
Every finite set of elements from a finite type is a subset of the universal set Finset.univ.
Finset.card_univ
The cardinality of Finset.univ for a finite type equals the cardinality of the type.
Fintype.card_fin
The finite type Fin n has cardinality n.
Finset.union_assoc
Union of finite sets is associative: s₁ ∪ s₂ ∪ s₃ = s₁ ∪ (s₂ ∪ s₃).

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_bridge_shores_force_cut_equality    (k d : ℕ) (G : SimpleGraph (Fin (2 * k + d + 3)))    (W₁ W₂ Q₁ Q₂ : Finset (Fin (2 * k + d + 3)))    (x y z₁ z₂ : 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) (hQi : (Q₁ ∩ Q₂).Nonempty)    (hsize₁ : W₁.card + Q₁.card = d + 1)    (hsize₂ : W₂.card + Q₂.card = d + 1)    (hxy : x ≠ y) (hzz : z₁ ≠ z₂)    (hxW : x ∉ W₁ ∪ W₂) (hyW : y ∉ W₁ ∪ W₂)    (hxQ : x ∉ Q₁ ∪ Q₂) (hyQ : y ∉ Q₁ ∪ Q₂)    (hz₁W : z₁ ∉ W₁ ∪ W₂) (hz₂W : z₂ ∉ W₁ ∪ W₂)    (hz₁Q : z₁ ∉ Q₁ ∩ Q₂) (hz₂Q : z₂ ∉ Q₁ ∩ Q₂)    (hdisj₁ : Disjoint (W₁ ∩ W₂) (Q₁ ∪ Q₂))    (hdisj₂ : Disjoint (Q₁ ∩ Q₂) (W₁ ∪ W₂))    (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)    (hend : ∀ q ∈ Q₁ ∩ Q₂, ¬ G.Adj q z₁ ∧ ¬ G.Adj q z₂) :    (W₁ ∪ W₂).card + (Q₁ ∩ Q₂).card = d + 1 ∧    (Finset.univ \ ((W₁ ∩ W₂) ∪ (Q₁ ∪ Q₂) ∪ {x, y})).card = 2 * k ∧    (Finset.univ \ ((Q₁ ∩ Q₂) ∪ (W₁ ∪ W₂) ∪ {z₁, z₂})).card = 2 * k := by  classical  let I := W₁ ∩ W₂  let J := Q₁ ∩ Q₂  let U := W₁ ∪ W₂  let V := Q₁ ∪ Q₂  have hIU : I ⊆ U := by    intro x hx    exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hx).1)  have hJV : J ⊆ V := by    intro x hx    exact Finset.mem_union.mpr (Or.inl (Finset.mem_inter.mp hx).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 hJzz : Disjoint J ({z₁,z₂} : 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 hz₁Q hq    · exact hz₂Q hq  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 hUzz : Disjoint U ({z₁,z₂} : 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 hz₁W hw    · exact hz₂W hw  have hIleft : Disjoint I (V ∪ {x,y}) :=    Finset.disjoint_union_right.mpr ⟨hdisj₁, hIxy⟩  have hJleft : Disjoint J (U ∪ {z₁,z₂}) :=    Finset.disjoint_union_right.mpr ⟨hdisj₂, hJzz⟩  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 hcrossJ : ∀ q ∈ J, ∀ w ∈ U ∪ {z₁,z₂}, ¬ G.Adj q w := by    intro q hq w hw    have hqJ := Finset.mem_inter.mp hq    rcases Finset.mem_union.mp hw with hwU | hwzz    · rcases Finset.mem_union.mp hwU with hw1 | hw2      · exact fun h => hcross₁ w hw1 q hqJ.1 h.symm      · exact fun h => hcross₂ w hw2 q hqJ.2 h.symm    · simp only [Finset.mem_insert, Finset.mem_singleton] at hwzz      rcases hwzz with rfl | rfl      · exact (hend q hq).1      · exact (hend q hq).2  have hB1 : (V ∪ {x,y}).Nonempty := by    exact ⟨x, Finset.mem_union.mpr (Or.inr (by simp))⟩  have hB2 : (U ∪ {z₁,z₂}).Nonempty := by    exact ⟨z₁, Finset.mem_union.mpr (Or.inr (by simp))⟩  have hbd1 := two_k_connected_anticomplete_sets_cardinality_bound k d G I (V ∪ {x,y})    hsep hWi hB1 hIleft hcrossI  have hbd2 := two_k_connected_anticomplete_sets_cardinality_bound k d G J (U ∪ {z₁,z₂})    hsep hQi hB2 hJleft hcrossJ  have hB1card : (V ∪ {x,y}).card = V.card + 2 := by    rw [Finset.card_union_of_disjoint hVxy, Finset.card_pair hxy]  have hB2card : (U ∪ {z₁,z₂}).card = U.card + 2 := by    rw [Finset.card_union_of_disjoint hUzz, Finset.card_pair hzz]  rw [hB1card] at hbd1  rw [hB2card] at hbd2  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 _ _  have heq : U.card + J.card = d + 1 := by omega  have htotal1 : (I ∪ (V ∪ {x,y})).card = d + 3 := by    rw [Finset.card_union_of_disjoint hIleft, hB1card]    omega  have htotal2 : (J ∪ (U ∪ {z₁,z₂})).card = d + 3 := by    rw [Finset.card_union_of_disjoint hJleft, hB2card]    omega  have hc1 : ((Finset.univ : Finset (Fin (2 * k + d + 3))) \ (I ∪ (V ∪ {x,y}))).card = 2 * k := by    have hc := Finset.card_sdiff_add_card_eq_card (Finset.subset_univ (I ∪ (V ∪ {x,y})))    simp only [Finset.card_univ, Fintype.card_fin, htotal1] at hc    omega  have hc2 : ((Finset.univ : Finset (Fin (2 * k + d + 3))) \ (J ∪ (U ∪ {z₁,z₂}))).card = 2 * k := by    have hc := Finset.card_sdiff_add_card_eq_card (Finset.subset_univ (J ∪ (U ∪ {z₁,z₂})))    simp only [Finset.card_univ, Fintype.card_fin, htotal2] at hc    omega  refine ⟨heq, ?_, ?_⟩  · simpa only [I, V, Finset.union_assoc] using hc1  · simpa only [J, U, Finset.union_assoc] using hc2
See it in the graphDiscuss this resultChallenge it