AFTD Auto-Formalizing Theoretical Domains

boundary_five_blocks_single_odd_extra_shore_impossible

theoremverified

In the displayed degree-bounded four-block graph, a 2k-vertex residual cannot split into two endpoint shores with no cross edge except possibly xy, a third odd shore anticomplete to both, and one remaining barrier vertex. The disjointness and membership assumptions are explicit.

Statement

theorem boundary_five_blocks_single_odd_extra_shore_impossible
    (k : ℕ) (hk : 5 ≤ k) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
    (A B C D : Finset (Fin (4*k)))
    (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D)
    (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D)
    (hcover : A ∪ B ∪ C ∪ D = Finset.univ)
    (hA : A.card=5) (hC : C.card=5)
    (hsizeAB : A.card+B.card=2*k) (hsizeCD : C.card+D.card=2*k)
    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)
    (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d)
    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)
    (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C)
    (X Y U S : Finset (Fin (4*k)))
    (hXY : Disjoint X Y) (hXU : Disjoint X U) (hXS : Disjoint X S)
    (hYU : Disjoint Y U) (hYS : Disjoint Y S) (hUS : Disjoint U S)
    (hxX : x ∈ X) (hyY : y ∈ Y) (hS : S.card=1)
    (hres : (X ∪ Y ∪ U ∪ S).card=2*k) (hodd : Odd U.card)
    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)
    (hanti : ∀ u ∈ U, ∀ v ∈ X ∪ Y, ¬ G.Adj u v) : False
Source
OP-1957: graph-to-count transfer for the nonclique five-block bridge route; experiments 37129–37130 and 37135.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 1

The proof, explained

The proof partitions each of the shores X, Y, and U across the four graph blocks A, B, C, D, obtaining twelve non-negative integers representing the cell sizes. Using the degree bound and bipartite non-edge assumptions, the vertex non-neighbor defect lemma yields strict bounds on the non-neighbors of x ∈ A, y ∈ C, and any vertex in U outside their opposing blocks. Finally, the arithmetic impossibility lemma `boundary_one_barrier_count_impossible` proves that no integer assignment can simultaneously satisfy these defect bounds, the block capacities, the parity requirement that |U| is odd, and the total residual size 2k.

  1. Set up the vertex non-neighbor defect theorem and set-theoretic partitioning tools.

    We enable classical logic and instantiate the main structural lemma `boundary_five_blocks_vertex_nonneighbor_defects` (as `VD`) for the graph G and blocks A, B, C, D. We also record basic set-theoretic tools: `sp` expresses the size of any subset P as the sum of the sizes of its intersections with the four partition blocks A, B, C, D; `sdi` relates set differences and intersections; and `hE`, `hEl`, `e0` provide facts about the empty set.

    lines 20–28

    uses boundary_five_blocks_vertex_nonneighbor_defects, finset_card_eq_sum_four_block_inter, Finset.card_sdiff_add_card_inter, Finset.disjoint_empty_right, Finset.disjoint_empty_left

      classical
      have VD := boundary_five_blocks_vertex_nonneighbor_defects k hk G A B C D hAB hCD hA hC hsizeAB hsizeCD
        hnoAB hnoCD hdegree
      have sp := fun P => finset_card_eq_sum_four_block_inter A B C D P hAB hAC hAD hBC hBD hCD hcover
      have sdi := fun P Q => Finset.card_sdiff_add_card_inter (s := (P : Finset (Fin (4*k)))) (t := Q)
      have e0 : ∀ Q : Finset (Fin (4*k)), ((∅ : Finset (Fin (4*k))) \ Q).card = 0 := by
        intro Q; simp
      have hE := fun (s : Finset (Fin (4*k))) => Finset.disjoint_empty_right s
      have hEl := fun (s : Finset (Fin (4*k))) => Finset.disjoint_empty_left s
  2. Bound the non-neighbor defects of the endpoints x and y.

    We apply `VD` to x ∈ A with candidate non-neighbor sets Y \ {y}, U, ∅, ∅. Because X and Y are disjoint and any edge between X and Y must be xy, every vertex in Y \ {y} is distinct from x and non-adjacent to x. Likewise, U is disjoint from X and anticomplete to X ∪ Y. Since x ∈ A, this bounds |(Y \ {y}) \ B| + |U \ B| ≤ 2. Combining this with |Y \ B| ≤ |(Y \ {y}) \ B| + 1 from `finset_sdiff_card_le_erase_sdiff_card_add_one`, we get |Y \ B| + |U \ B| ≤ 3. A symmetric argument for y ∈ C with X \ {x} and U yields |X \ D| + |U \ D| ≤ 3.

    lines 29–54

    uses Finset.mem_of_mem_erase, Finset.disjoint_left.mp, Finset.ne_of_mem_erase, Finset.disjoint_of_subset_left, Finset.erase_subset, finset_sdiff_card_le_erase_sdiff_card_add_one

      have hxd := (VD x (Y.erase y) U ∅ ∅ (by
          intro w hw
          rcases hw with hw | hw | hw | hw
          · have hwY := Finset.mem_of_mem_erase hw
            refine ⟨fun h => Finset.disjoint_left.mp hXY (h ▸ hxX) hwY, fun h => ?_⟩
            exact Finset.ne_of_mem_erase hw (hcross x hxX w hwY h).2
          · exact ⟨fun h => Finset.disjoint_left.mp hXU (h ▸ hxX) hw,
              fun h => hanti w hw x (by simp [hxX]) h.symm⟩
          · simp at hw
          · simp at hw)
        (Finset.disjoint_of_subset_left (Finset.erase_subset _ _) hYU)
        (hE _) (hE _) (hE _) (hE _) (hE _)).1 hx
      have hyd := (VD y (X.erase x) U ∅ ∅ (by
          intro w hw
          rcases hw with hw | hw | hw | hw
          · have hwX := Finset.mem_of_mem_erase hw
            refine ⟨fun h => Finset.disjoint_left.mp hXY (h ▸ hwX) hyY, fun h => ?_⟩
            exact Finset.ne_of_mem_erase hw (hcross w hwX y hyY h.symm).1
          · exact ⟨fun h => Finset.disjoint_left.mp hYU (h ▸ hyY) hw,
              fun h => hanti w hw y (by simp [hyY]) h.symm⟩
          · simp at hw
          · simp at hw)
        (Finset.disjoint_of_subset_left (Finset.erase_subset _ _) hXU)
        (hE _) (hE _) (hE _) (hE _) (hE _)).2.2.1 hy
      have hx1 := finset_sdiff_card_le_erase_sdiff_card_add_one Y B y
      have hy1 := finset_sdiff_card_le_erase_sdiff_card_add_one X D x
  3. Bound the non-neighbor defects for every vertex in U.

    For any u ∈ U, because U is disjoint from and anticomplete to X ∪ Y, both X and Y consist entirely of non-neighbors of u distinct from u. Applying `VD` to u with non-neighbor sets X, Y, ∅, ∅ provides conditional upper bounds on |X \ ·| + |Y \ ·| depending on whether u lies in block A, B, C, or D.

    lines 55–63

    uses Finset.disjoint_left.mp

      have hud : ∀ u ∈ U, _ := fun u hu => VD u X Y ∅ ∅ (by
          intro v hv
          rcases hv with hv | hv | hv | hv
          · exact ⟨fun h => Finset.disjoint_left.mp hXU hv (h ▸ hu),
              fun h => hanti u hu v (by simp [hv]) h⟩
          · exact ⟨fun h => Finset.disjoint_left.mp hYU hv (h ▸ hu),
              fun h => hanti u hu v (by simp [hv]) h⟩
          · simp at hv
          · simp at hv) hXY (hE _) (hE _) (hE _) (hE _) (hE _)
  4. Establish block capacities, total residual size, and non-emptiness for the cell intersection sizes.

    Since X, Y, U, S are pairwise disjoint, the size of their union equals the sum of their individual sizes, giving |X| + |Y| + |U| + 1 = 2k. For each block Q ∈ {A, B, C, D}, the pairwise disjoint subsets X ∩ Q, Y ∩ Q, and U ∩ Q have total size at most |Q|, yielding capacity bounds for each block. In addition, the witnesses x ∈ X ∩ A and y ∈ Y ∩ C ensure |X ∩ A| ≥ 1 and |Y ∩ C| ≥ 1, and any block Q with |U ∩ Q| ≥ 1 contains a witness u ∈ U ∩ Q.

    lines 64–109

    uses Finset.card_union_of_disjoint, Finset.disjoint_union_left.mpr, four_disjoint_subsets_card_sum_le, Finset.inter_subset_right, Finset.inter_subset_left, Finset.disjoint_of_subset_left, Finset.disjoint_of_subset_right, Finset.card_pos.mpr, Finset.mem_inter.mpr, Finset.card_pos.mp, Finset.mem_inter.mp, Finset.empty_inter, Finset.card_empty, add_zero

      have hun : (X ∪ Y ∪ U ∪ S).card = X.card + Y.card + U.card + S.card := by
        rw [Finset.card_union_of_disjoint, Finset.card_union_of_disjoint,
          Finset.card_union_of_disjoint]
        · exact hXY
        · exact Finset.disjoint_union_left.mpr ⟨hXU, hYU⟩
        · exact Finset.disjoint_union_left.mpr ⟨Finset.disjoint_union_left.mpr ⟨hXS, hYS⟩, hUS⟩
      have blk : ∀ Q : Finset (Fin (4*k)),
          (X ∩ Q).card + (Y ∩ Q).card + (U ∩ Q).card + (∅ ∩ Q : Finset (Fin (4*k))).card
            ≤ Q.card := by
        intro Q
        exact four_disjoint_subsets_card_sum_le _ _ _ _ Q Finset.inter_subset_right Finset.inter_subset_right
          Finset.inter_subset_right Finset.inter_subset_right
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left hXY))
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left hXU))
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left hYU))
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))
          (Finset.disjoint_of_subset_left Finset.inter_subset_left
            (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))
      have pos : ∀ (P Q : Finset (Fin (4*k))) (v : Fin (4*k)), v ∈ P → v ∈ Q → 1 ≤ (P ∩ Q).card :=
        fun P Q v h1 h2 => Finset.card_pos.mpr ⟨v, Finset.mem_inter.mpr ⟨h1, h2⟩⟩
      have getu : ∀ Q : Finset (Fin (4*k)), 1 ≤ (U ∩ Q).card → ∃ u ∈ U, u ∈ Q := by
        intro Q h
        obtain ⟨u, hu⟩ := Finset.card_pos.mp h
        exact ⟨u, (Finset.mem_inter.mp hu).1, (Finset.mem_inter.mp hu).2⟩
      have hxA := pos X A x hxX hx
      have hyC := pos Y C y hyY hy
      have bA := blk A
      have bB := blk B
      have bC := blk C
      have bD := blk D
      have sX := sp X
      have sY := sp Y
      have sU := sp U
      have t1 := sdi X B; have t2 := sdi Y B
      have t5 := sdi X D; have t6 := sdi Y D
      have t9 := sdi X A; have t10 := sdi Y A
      have t13 := sdi X C; have t14 := sdi Y C
      have t3 := sdi U B; have t7 := sdi U D
      have ez := e0 A; have ez2 := e0 B; have ez3 := e0 C; have ez4 := e0 D
      simp only [Finset.empty_inter, Finset.card_empty, add_zero] at bA bB bC bD
  5. Derive a contradiction from the numerical impossibility of the cell sizes.

    We write |U| = 2t + 1 since U has odd cardinality. We then apply `boundary_one_barrier_count_impossible` to the twelve intersection sizes of X, Y, U with A, B, C, D. The eight linear equality and inequality conditions (parity, total sum 2k, block capacities, and non-neighbor defect bounds for x and y) are verified by linear arithmetic (`omega`). For the remaining four conditional hypotheses, if |U ∩ Q| ≥ 1, we extract a witness u ∈ U ∩ Q and apply the corresponding branch of `hud`, which linear arithmetic (`omega`) confirms is satisfied. The lemma then yields False.

    lines 110–120

    uses boundary_one_barrier_count_impossible

      obtain ⟨t, ht⟩ := hodd
      apply boundary_one_barrier_count_impossible k
        (X ∩ A).card (X ∩ B).card (X ∩ C).card (X ∩ D).card
        (Y ∩ A).card (Y ∩ B).card (Y ∩ C).card (Y ∩ D).card
        (U ∩ A).card (U ∩ B).card (U ∩ C).card (U ∩ D).card t hk hxA hyC
        (by omega) (by omega) (by omega) (by omega) (by omega) (by omega)
        (by omega) (by omega)
      · intro h; obtain ⟨u, hu, huQ⟩ := getu A h; have := (hud u hu).1 huQ; omega
      · intro h; obtain ⟨u, hu, huQ⟩ := getu B h; have := (hud u hu).2.1 huQ; omega
      · intro h; obtain ⟨u, hu, huQ⟩ := getu C h; have := (hud u hu).2.2.1 huQ; omega
      · intro h; obtain ⟨u, hu, huQ⟩ := getu D h; have := (hud u hu).2.2.2 huQ; omega
boundary_five_blocks_vertex_nonneighbor_defects
For four pairwise disjoint sets of non-neighbors of a vertex v in the four-block degree-bounded graph, the sum of their sizes outside the opposing block is bounded by 2 (if v ∈ A or v ∈ C) or 2k - 8 (if v ∈ B or v ∈ D).
boundary_one_barrier_count_impossible
No system of twelve natural numbers can simultaneously satisfy the block capacities, the total residual size 2k, the odd size of U, the defect bounds for x and y, and the conditional defect bounds for vertices in U.
finset_card_eq_sum_four_block_inter
The size of any set P partitioned across the four blocks A, B, C, D equals the sum of the sizes of its intersections with A, B, C, and D.
finset_sdiff_card_le_erase_sdiff_card_add_one
Removing a single element y from s decreases the size of s \ Q by at most 1.
four_disjoint_subsets_card_sum_le
The sum of the sizes of four pairwise disjoint subsets of a set T is at most the size of T.
Finset.card_sdiff_add_card_inter
For any finite sets s and t, |s \ t| + |s ∩ t| = |s|.
Finset.card_empty
The empty set has cardinality 0.
Finset.card_pos.mp
A finite set has cardinality at least 1 if and only if it is nonempty (forward implication).
Finset.card_pos.mpr
A nonempty finite set has cardinality at least 1 (reverse implication).
Finset.card_union_of_disjoint
If s and t are disjoint finite sets, |s ∪ t| = |s| + |t|.
Finset.disjoint_empty_right
Any set is disjoint from the empty set on the right.
Finset.disjoint_empty_left
The empty set is disjoint from any set on the left.
Finset.disjoint_left.mp
If two sets are disjoint, an element of the first does not belong to the second.
Finset.disjoint_of_subset_left
If s ⊆ u and u is disjoint from t, then s is disjoint from t.
Finset.disjoint_of_subset_right
If t ⊆ u and s is disjoint from u, then s is disjoint from t.
Finset.disjoint_union_left.mpr
If s and t are both disjoint from u, then s ∪ t is disjoint from u.
Finset.empty_inter
The intersection of the empty set with any set is the empty set.
Finset.erase_subset
Removing an element from a set produces a subset of the original set.
Finset.inter_subset_left
The intersection s₁ ∩ s₂ is a subset of s₁.
Finset.inter_subset_right
The intersection s₁ ∩ s₂ is a subset of s₂.
Finset.mem_inter.mp
If an element belongs to s ∩ t, it belongs to both s and t.
Finset.mem_inter.mpr
If an element belongs to both s and t, it belongs to s ∩ t.
Finset.mem_of_mem_erase
If an element belongs to s \ {a}, it belongs to s.
Finset.ne_of_mem_erase
If an element belongs to s \ {a}, it is not equal to a.
add_zero
Adding zero to a number leaves it unchanged.

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 boundary_five_blocks_single_odd_extra_shore_impossible    (k : ℕ) (hk : 5 ≤ k) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]    (A B C D : Finset (Fin (4*k)))    (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D)    (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D)    (hcover : A ∪ B ∪ C ∪ D = Finset.univ)    (hA : A.card=5) (hC : C.card=5)    (hsizeAB : A.card+B.card=2*k) (hsizeCD : C.card+D.card=2*k)    (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)    (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d)    (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)    (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C)    (X Y U S : Finset (Fin (4*k)))    (hXY : Disjoint X Y) (hXU : Disjoint X U) (hXS : Disjoint X S)    (hYU : Disjoint Y U) (hYS : Disjoint Y S) (hUS : Disjoint U S)    (hxX : x ∈ X) (hyY : y ∈ Y) (hS : S.card=1)    (hres : (X ∪ Y ∪ U ∪ S).card=2*k) (hodd : Odd U.card)    (hcross : ∀ a ∈ X, ∀ b ∈ Y, G.Adj a b → a=x ∧ b=y)    (hanti : ∀ u ∈ U, ∀ v ∈ X ∪ Y, ¬ G.Adj u v) : False := by  classical  have VD := boundary_five_blocks_vertex_nonneighbor_defects k hk G A B C D hAB hCD hA hC hsizeAB hsizeCD    hnoAB hnoCD hdegree  have sp := fun P => finset_card_eq_sum_four_block_inter A B C D P hAB hAC hAD hBC hBD hCD hcover  have sdi := fun P Q => Finset.card_sdiff_add_card_inter (s := (P : Finset (Fin (4*k)))) (t := Q)  have e0 : ∀ Q : Finset (Fin (4*k)), ((∅ : Finset (Fin (4*k))) \ Q).card = 0 := by    intro Q; simp  have hE := fun (s : Finset (Fin (4*k))) => Finset.disjoint_empty_right s  have hEl := fun (s : Finset (Fin (4*k))) => Finset.disjoint_empty_left s  have hxd := (VD x (Y.erase y) U ∅ ∅ (by      intro w hw      rcases hw with hw | hw | hw | hw      · have hwY := Finset.mem_of_mem_erase hw        refine ⟨fun h => Finset.disjoint_left.mp hXY (h ▸ hxX) hwY, fun h => ?_⟩        exact Finset.ne_of_mem_erase hw (hcross x hxX w hwY h).2      · exact ⟨fun h => Finset.disjoint_left.mp hXU (h ▸ hxX) hw,          fun h => hanti w hw x (by simp [hxX]) h.symm⟩      · simp at hw      · simp at hw)    (Finset.disjoint_of_subset_left (Finset.erase_subset _ _) hYU)    (hE _) (hE _) (hE _) (hE _) (hE _)).1 hx  have hyd := (VD y (X.erase x) U ∅ ∅ (by      intro w hw      rcases hw with hw | hw | hw | hw      · have hwX := Finset.mem_of_mem_erase hw        refine ⟨fun h => Finset.disjoint_left.mp hXY (h ▸ hwX) hyY, fun h => ?_⟩        exact Finset.ne_of_mem_erase hw (hcross w hwX y hyY h.symm).1      · exact ⟨fun h => Finset.disjoint_left.mp hYU (h ▸ hyY) hw,          fun h => hanti w hw y (by simp [hyY]) h.symm⟩      · simp at hw      · simp at hw)    (Finset.disjoint_of_subset_left (Finset.erase_subset _ _) hXU)    (hE _) (hE _) (hE _) (hE _) (hE _)).2.2.1 hy  have hx1 := finset_sdiff_card_le_erase_sdiff_card_add_one Y B y  have hy1 := finset_sdiff_card_le_erase_sdiff_card_add_one X D x  have hud : ∀ u ∈ U, _ := fun u hu => VD u X Y ∅ ∅ (by      intro v hv      rcases hv with hv | hv | hv | hv      · exact ⟨fun h => Finset.disjoint_left.mp hXU hv (h ▸ hu),          fun h => hanti u hu v (by simp [hv]) h⟩      · exact ⟨fun h => Finset.disjoint_left.mp hYU hv (h ▸ hu),          fun h => hanti u hu v (by simp [hv]) h⟩      · simp at hv      · simp at hv) hXY (hE _) (hE _) (hE _) (hE _) (hE _)  have hun : (X ∪ Y ∪ U ∪ S).card = X.card + Y.card + U.card + S.card := by    rw [Finset.card_union_of_disjoint, Finset.card_union_of_disjoint,      Finset.card_union_of_disjoint]    · exact hXY    · exact Finset.disjoint_union_left.mpr ⟨hXU, hYU⟩    · exact Finset.disjoint_union_left.mpr ⟨Finset.disjoint_union_left.mpr ⟨hXS, hYS⟩, hUS⟩  have blk : ∀ Q : Finset (Fin (4*k)),      (X ∩ Q).card + (Y ∩ Q).card + (U ∩ Q).card + (∅ ∩ Q : Finset (Fin (4*k))).card        ≤ Q.card := by    intro Q    exact four_disjoint_subsets_card_sum_le _ _ _ _ Q Finset.inter_subset_right Finset.inter_subset_right      Finset.inter_subset_right Finset.inter_subset_right      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left hXY))      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left hXU))      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left hYU))      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))      (Finset.disjoint_of_subset_left Finset.inter_subset_left        (Finset.disjoint_of_subset_right Finset.inter_subset_left (hE _)))  have pos : ∀ (P Q : Finset (Fin (4*k))) (v : Fin (4*k)), v ∈ P → v ∈ Q → 1 ≤ (P ∩ Q).card :=    fun P Q v h1 h2 => Finset.card_pos.mpr ⟨v, Finset.mem_inter.mpr ⟨h1, h2⟩⟩  have getu : ∀ Q : Finset (Fin (4*k)), 1 ≤ (U ∩ Q).card → ∃ u ∈ U, u ∈ Q := by    intro Q h    obtain ⟨u, hu⟩ := Finset.card_pos.mp h    exact ⟨u, (Finset.mem_inter.mp hu).1, (Finset.mem_inter.mp hu).2⟩  have hxA := pos X A x hxX hx  have hyC := pos Y C y hyY hy  have bA := blk A  have bB := blk B  have bC := blk C  have bD := blk D  have sX := sp X  have sY := sp Y  have sU := sp U  have t1 := sdi X B; have t2 := sdi Y B  have t5 := sdi X D; have t6 := sdi Y D  have t9 := sdi X A; have t10 := sdi Y A  have t13 := sdi X C; have t14 := sdi Y C  have t3 := sdi U B; have t7 := sdi U D  have ez := e0 A; have ez2 := e0 B; have ez3 := e0 C; have ez4 := e0 D  simp only [Finset.empty_inter, Finset.card_empty, add_zero] at bA bB bC bD  obtain ⟨t, ht⟩ := hodd  apply boundary_one_barrier_count_impossible k    (X ∩ A).card (X ∩ B).card (X ∩ C).card (X ∩ D).card    (Y ∩ A).card (Y ∩ B).card (Y ∩ C).card (Y ∩ D).card    (U ∩ A).card (U ∩ B).card (U ∩ C).card (U ∩ D).card t hk hxA hyC    (by omega) (by omega) (by omega) (by omega) (by omega) (by omega)    (by omega) (by omega)  · intro h; obtain ⟨u, hu, huQ⟩ := getu A h; have := (hud u hu).1 huQ; omega  · intro h; obtain ⟨u, hu, huQ⟩ := getu B h; have := (hud u hu).2.1 huQ; omega  · intro h; obtain ⟨u, hu, huQ⟩ := getu C h; have := (hud u hu).2.2.1 huQ; omega  · intro h; obtain ⟨u, hu, huQ⟩ := getu D h; have := (hud u hu).2.2.2 huQ; omega
See it in the graphDiscuss this resultChallenge it