AFTD Auto-Formalizing Theoretical Domains

boundary_five_blocks_forced_cross_edge_is_bridge

theoremverified

For every k at least five, in a four-block boundary partition with the two displayed opposite blocks of size five and minimum degree at least 2k+2, any forced perfect-matching cross edge in a 2k-vertex residual is a bridge of that residual. No clique, factor-criticality, connectivity or complementary-matching hypothesis is assumed.

Statement

theorem boundary_five_blocks_forced_cross_edge_is_bridge
    (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)
    (R : Finset (Fin (4*k))) (hR : R.card=2*k)
    (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (hxy : G.Adj x y)
    (hxR : x ∈ R) (hyR : y ∈ R)
    (hP : ∃ P : (G.induce {v | v ∈ R}).Subgraph, P.IsPerfectMatching)
    (hforced : ¬ ∃ P : ((G.induce {v | v ∈ R}).deleteEdges
      {s(⟨x,hxR⟩,⟨y,hyR⟩)}).Subgraph, P.IsPerfectMatching) :
    ¬ ((G.induce {v | v ∈ R}).deleteEdges
      {s(⟨x,hxR⟩,⟨y,hyR⟩)}).Reachable ⟨x,hxR⟩ ⟨y,hyR⟩
Source
OP-1957: proposed all-k forced-bridge strengthening, guided by unbounded-integer degree-count experiments 37123 and 37127–37130.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 3

The proof, explained

The theorem is proved by contradiction: assuming the forced cross-edge xy is not a bridge of the 2k-vertex residual G[R], deleting xy leaves x and y connected. By the barrier theorem for forced matching edges, this yields a Tutte-Berge partition S ∪ X ∪ Y ∪ U = R with at least |S| ≥ 1 odd components in G[U] and no edges between U and X ∪ Y. Under the boundary degree conditions and block sizes |A| = |C| = 5, the extra shore U must have size at most 4. Decomposing the barrier into either a single odd component (|S| = 1) or two disconnected shores (|S| ≤ 4) leads in both cases to configurations known to be impossible in this boundary setting, completing the proof.

  1. Assuming for contradiction that xy is not a bridge in G[R], there is a Tutte-Berge barrier partition S ∪ X ∪ Y ∪ U = R.

    We assume for contradiction that x and y remain reachable in the residual G[R] after deleting the cross edge xy. Since G[R] has a perfect matching but no perfect matching avoids xy (xy is forced), forced_matching_edge_barrier_component_partition produces a partition of R into pairwise disjoint sets S, X, Y, U such that S is nonempty, x ∈ X, y ∈ Y, xy is the unique edge in G[R] between X and Y, U has no edges to X ∪ Y, and G[U] has at least |S| odd components.

    lines 20–25

    uses forced_matching_edge_barrier_component_partition

      classical
      intro hpath
      obtain ⟨S, X, Y, U, hSne, hSX, hSY, hSU, hXY, hXU, hYU, hcov, hxX, hyY, hcross,
          hanti, hodd⟩ :=
        forced_matching_edge_barrier_component_partition (G.induce {v | v ∈ R})
          ⟨x,hxR⟩ ⟨y,hyR⟩ hxy hP hforced hpath
  2. The barrier partition embeds into V(G) as pairwise disjoint sets X', Y', U', S', with xy remaining the unique edge between X' and Y'.

    Using the canonical inclusion embedding ι : R ↪ V(G), we define X', Y', U', S' as the images of X, Y, U, S in V(G). Because ι is an embedding, it preserves membership and disjointness: x ∈ X', y ∈ Y', and any edge in G between X' and Y' must have endpoints x and y.

    lines 26–46

    uses Function.Embedding.subtype, Finset.mem_map', Finset.disjoint_map, congrArg, Subtype.val

      let ι : ↥{v | v ∈ R} ↪ Fin (4*k) := Function.Embedding.subtype _
      have hmem : ∀ (T : Finset ↥{v | v ∈ R}) (a : ↥{v | v ∈ R}), ι a ∈ T.map ι ↔ a ∈ T :=
        fun T a => Finset.mem_map' ι
      have hmem' : ∀ (T : Finset ↥{v | v ∈ R}) (b : Fin (4*k)), b ∈ T.map ι →
          ∃ a ∈ T, ι a = b := fun T b h => Finset.mem_map.mp h
      have hdis : ∀ T T' : Finset ↥{v | v ∈ R}, Disjoint T T' → Disjoint (T.map ι) (T'.map ι) :=
        fun T T' h => (Finset.disjoint_map _).mpr h
      have huniv : (Finset.univ : Finset ↥{v | v ∈ R}).card = 2*k := by
        simp [hR]
      set X' := X.map ι with hX'
      set Y' := Y.map ι with hY'
      set U' := U.map ι with hU'
      set S' := S.map ι with hS'
      have hxX' : x ∈ X' := (hmem X ⟨x,hxR⟩).mpr hxX
      have hyY' : y ∈ Y' := (hmem Y ⟨y,hyR⟩).mpr hyY
      have hcross' : ∀ a ∈ X', ∀ b ∈ Y', G.Adj a b → a = x ∧ b = y := by
        intro a ha b hb hab
        obtain ⟨a0, ha0, rfl⟩ := hmem' X a ha
        obtain ⟨b0, hb0, rfl⟩ := hmem' Y b hb
        obtain ⟨h1, h2⟩ := hcross a0 ha0 b0 hb0 hab
        exact ⟨congrArg Subtype.val h1, congrArg Subtype.val h2⟩
  3. The extra shore U' satisfies |U'| ≤ 4 and has no edges to X' ∪ Y'.

    Since U has no edges to X ∪ Y in G[R], its image U' has no edges to X' ∪ Y' in G. In particular, x, y ∉ U' and neither x nor y has any neighbor in U'. Under the minimum degree hypothesis 2k+2 and block sizes |A| = |C| = 5, the lemma boundary_five_block_extra_part_card_le_four forces |U'| ≤ 4.

    lines 47–61

    uses Finset.mem_union, Finset.mem_union_left, Finset.mem_union_right, boundary_five_block_extra_part_card_le_four

      have hantiU : ∀ u ∈ U', ∀ v ∈ X' ∪ Y', ¬ G.Adj u v := by
        intro u hu v hv huv
        obtain ⟨u0, hu0, rfl⟩ := hmem' U u hu
        rw [Finset.mem_union] at hv
        rcases hv with hv | hv
        · obtain ⟨v0, hv0, rfl⟩ := hmem' X v hv
          exact hanti u0 hu0 v0 (Finset.mem_union_left _ hv0) huv
        · obtain ⟨v0, hv0, rfl⟩ := hmem' Y v hv
          exact hanti u0 hu0 v0 (Finset.mem_union_right _ hv0) huv
      have hxU' : x ∉ U' := fun h => Finset.disjoint_left.mp (hdis X U hXU) hxX' h
      have hyU' : y ∉ U' := fun h => Finset.disjoint_left.mp (hdis Y U hYU) hyY' h
      have hU4 : U'.card ≤ 4 := boundary_five_block_extra_part_card_le_four k hk G A B C D
        hAB hCD hBD hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy U' hxU' hyU'
        (fun u hu h => hantiU u hu x (Finset.mem_union_left _ hxX') h.symm)
        (fun u hu h => hantiU u hu y (Finset.mem_union_right _ hyY') h.symm)
  4. The barrier components of U either form a single odd component with |S| = 1, or split U into two disconnected sets Z and W with |S| ≤ |W| + 1.

    Because S is nonempty, 1 ≤ |S|. The number of odd components of G[U] is bounded above by |U|, and G[U] has at least |S| odd components. By odd_components_split_for_positive_barrier, this forces a dichotomy: either |S| = 1 with |U| odd, or U splits into two nonempty disjoint sets Z and W with no edges between them and |S| ≤ |W| + 1.

    lines 62–73

    uses Finset.card_map, simple_graph_odd_components_card_le_vertices, odd_components_split_for_positive_barrier

      have hUcard : U'.card = U.card := Finset.card_map _
      have hs1 : 1 ≤ S.card := Finset.card_pos.mpr hSne
      have hcardU : Fintype.card ↥{a | a ∈ U} = U.card := by simp
      have hoddle := simple_graph_odd_components_card_le_vertices
        ((G.induce {v | v ∈ R}).induce {a | a ∈ U})
      have hS'card : S'.card = S.card := Finset.card_map _
      have hmemcov : ∀ a : ↥{v | v ∈ R}, a ∈ S ∨ a ∈ X ∨ a ∈ Y ∨ a ∈ U := by
        intro a
        have : a ∈ S ∪ X ∪ Y ∪ U := hcov ▸ Finset.mem_univ a
        simpa [or_assoc] using this
      rcases odd_components_split_for_positive_barrier _ S.card hs1 hodd with
        ⟨h1, hodd1⟩ | ⟨Z, W, hZ, hW, hZW, hZWu, hWs, hZWanti⟩
  5. Case 1 is impossible: no single odd extra shore can exist in this boundary partition.

    In the first case, |S'| = |S| = 1 and |U'| = |U| is odd. The union X' ∪ Y' ∪ U' ∪ S' covers the 2k vertices of R. With pairwise disjointness, unique cross edge xy, and no edges between U' and X' ∪ Y', boundary_five_blocks_single_odd_extra_shore_impossible proves that such a configuration contradicts the degree and block hypotheses.

    lines 74–85

    uses Finset.map_union, Finset.card_map, boundary_five_blocks_single_odd_extra_shore_impossible

      · have hres : (X' ∪ Y' ∪ U' ∪ S').card = 2*k := by
          have e : X' ∪ Y' ∪ U' ∪ S' = (X ∪ Y ∪ U ∪ S).map ι := by
            simp only [hX', hY', hU', hS', Finset.map_union]
          have e2 : X ∪ Y ∪ U ∪ S = Finset.univ := by
            ext a; simp only [Finset.mem_union, Finset.mem_univ, iff_true]
            rcases hmemcov a with h | h | h | h <;> simp [h]
          rw [e, Finset.card_map, e2, huniv]
        exact boundary_five_blocks_single_odd_extra_shore_impossible k hk G A B C D
          hAB hAC hAD hBC hBD hCD hcover hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy
          X' Y' U' S' (hdis _ _ hXY) (hdis _ _ hXU) (hdis _ _ hSX.symm) (hdis _ _ hYU)
          (hdis _ _ hSY.symm) (hdis _ _ hSU.symm) hxX' hyY' (by rw [hS'card]; exact h1) hres
          (by rw [hUcard, ← hcardU]; exact hodd1) hcross' hantiU
  6. In Case 2, the partition U = Z ∪ W lifts to subsets Z', W' ⊆ U' of V(G).

    We view Z and W as subsets Z₂, W₂ of R via the subtype embedding of U, confirming Z₂ ∪ W₂ = U. Then mapping along ι produces subsets Z', W' of U' in V(G).

    lines 86–108

    uses Function.Embedding.subtype, Finset.Subset.antisymm, Finset.union_subset

      · let ι2 : ↥{a | a ∈ U} ↪ ↥{v | v ∈ R} := Function.Embedding.subtype _
        set Z2 := Z.map ι2 with hZ2
        set W2 := W.map ι2 with hW2
        have hZ2U : Z2 ⊆ U := by
          intro a ha
          obtain ⟨a0, -, rfl⟩ := Finset.mem_map.mp ha
          exact a0.2
        have hW2U : W2 ⊆ U := by
          intro a ha
          obtain ⟨a0, -, rfl⟩ := Finset.mem_map.mp ha
          exact a0.2
        have hZW2 : Z2 ∪ W2 = U := by
          apply Finset.Subset.antisymm (Finset.union_subset hZ2U hW2U)
          intro a ha
          have : (⟨a, ha⟩ : ↥{a | a ∈ U}) ∈ Z ∪ W := hZWu ▸ Finset.mem_univ _
          rw [Finset.mem_union] at this ⊢
          rcases this with h | h
          · exact Or.inl (Finset.mem_map.mpr ⟨_, h, rfl⟩)
          · exact Or.inr (Finset.mem_map.mpr ⟨_, h, rfl⟩)
        set Z' := Z2.map ι with hZ'
        set W' := W2.map ι with hW'
        have hZ'U : Z' ⊆ U' := Finset.map_subset_map.mpr hZ2U
        have hW'U : W' ⊆ U' := Finset.map_subset_map.mpr hW2U
  7. The five sets X', Y', Z', W', S' partition the 2k vertices of R and are pairwise disjoint.

    Because Z₂ ∪ W₂ = U, the sets X, Y, Z₂, W₂, S cover all 2k vertices of R. Mapping via ι gives |X' ∪ Y' ∪ Z' ∪ W' ∪ S'| = 2k. Pairwise disjointness follows from the disjointness of the original partition together with Z', W' ⊆ U'.

    lines 109–125

    uses Finset.map_union, Finset.card_map, Finset.disjoint_map

        have hres : (X' ∪ Y' ∪ Z' ∪ W' ∪ S').card = 2*k := by
          have e : X' ∪ Y' ∪ Z' ∪ W' ∪ S' = (X ∪ Y ∪ Z2 ∪ W2 ∪ S).map ι := by
            simp only [hX', hY', hZ', hW', hS', Finset.map_union]
          have e2 : X ∪ Y ∪ Z2 ∪ W2 ∪ S = Finset.univ := by
            ext a; simp only [Finset.mem_union, Finset.mem_univ, iff_true]
            rcases hmemcov a with h | h | h | h
            · simp [h]
            · simp [h]
            · simp [h]
            · rw [← hZW2, Finset.mem_union] at h
              rcases h with h | h <;> simp [h]
          rw [e, Finset.card_map, e2, huniv]
        have hZ2W2 : Disjoint Z2 W2 := (Finset.disjoint_map _).mpr hZW
        have hZ'W' : Disjoint Z' W' := hdis _ _ hZ2W2
        have hXU' := hdis _ _ hXU
        have hYU' := hdis _ _ hYU
        have hSU' := hdis _ _ hSU
  8. Case 2 is impossible: a five-set barrier configuration cannot exist, completing the contradiction.

    We invoke boundary_five_blocks_two_extra_shores_impossible. The conditions hold: 1 ≤ |S'| ≤ 4 (since |S| ≤ q(G[U]) ≤ |U| ≤ 4), Z' and W' are nonempty with |S'| ≤ |W'| + 1, xy is the unique cross edge between X' and Y', and there are no edges from Z' to X' ∪ Y' ∪ W' or from W' to X' ∪ Y'. This completes the proof that xy must be a bridge.

    lines 126–150

    uses boundary_five_blocks_two_extra_shores_impossible, Finset.disjoint_of_subset_right, Finset.disjoint_of_subset_left

        refine boundary_five_blocks_two_extra_shores_impossible k hk G A B C D
          hAB hAC hAD hBC hBD hCD hcover hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy
          X' Y' Z' W' S' (hdis _ _ hXY)
          (Finset.disjoint_of_subset_right hZ'U hXU') (Finset.disjoint_of_subset_right hW'U hXU')
          (hdis _ _ hSX.symm)
          (Finset.disjoint_of_subset_right hZ'U hYU') (Finset.disjoint_of_subset_right hW'U hYU')
          (hdis _ _ hSY.symm) hZ'W'
          (Finset.disjoint_of_subset_left hZ'U hSU'.symm).symm.symm
          (Finset.disjoint_of_subset_left hW'U hSU'.symm).symm.symm
          hxX' hyY' (by rw [hS'card]; exact hs1) (by omega)
          (by simp only [hZ', Finset.map_nonempty, hZ2]; exact hZ)
          (by simp only [hW', Finset.map_nonempty, hW2]; exact hW)
          (by rw [hS'card, hW', Finset.card_map, hW2, Finset.card_map]; exact hWs)
          hres hcross' ?_ ?_
        · intro u hu v hv huv
          rw [Finset.mem_union] at hv
          rcases hv with hv | hv
          · exact hantiU u (hZ'U hu) v hv huv
          · obtain ⟨u1, hu1, rfl⟩ := Finset.mem_map.mp hu
            obtain ⟨u0, hu0, rfl⟩ := Finset.mem_map.mp hu1
            obtain ⟨v1, hv1, rfl⟩ := Finset.mem_map.mp hv
            obtain ⟨v0, hv0, rfl⟩ := Finset.mem_map.mp hv1
            exact hZWanti u0 hu0 v0 hv0 huv
        · intro u hu v hv huv
          exact hantiU u (hW'U hu) v hv huv
forced_matching_edge_barrier_component_partition
In a finite graph with a perfect matching, if an edge uv is forced but u and v remain connected when uv is deleted, there exists a barrier partition S, X, Y, U where S is nonempty, uv is the unique X–Y edge, U has no edges to X ∪ Y, and G[U] has at least |S| odd components.
Function.Embedding.subtype
The canonical inclusion embedding from a subtype into the ambient type.
Finset.mem_map'
An element belongs to a finset if and only if its image belongs to the mapped finset under an embedding.
Finset.disjoint_map
An embedding maps disjoint finsets to disjoint finsets, and conversely.
congrArg
Applying a function to equal arguments produces equal results.
Subtype.val
Extracts the underlying value of a subtype element.
Finset.mem_union
An element belongs to the union of two finsets if and only if it belongs to at least one of them.
Finset.mem_union_left
An element in the first finset belongs to the union of the two finsets.
Finset.mem_union_right
An element in the second finset belongs to the union of the two finsets.
boundary_five_block_extra_part_card_le_four
In a four-block boundary partition with blocks A and C of size 5 and minimum degree at least 2k+2, any subset U disconnected from both endpoints of a cross edge xy has size at most 4.
Finset.card_map
Mapping a finset along an embedding preserves its cardinality.
simple_graph_odd_components_card_le_vertices
The number of odd connected components of a finite graph is at most its number of vertices.
odd_components_split_for_positive_barrier
If a graph has at least s ≥ 1 odd components, then either s = 1 and the vertex count is odd, or the vertices partition into two nonempty sets with no edges between them and s ≤ |W| + 1.
Finset.map_union
Mapping a finset along an embedding distributes over finset union.
boundary_five_blocks_single_odd_extra_shore_impossible
In the four-block boundary partition, no 2k-vertex residual can have a barrier partition with |S| = 1, an odd-sized extra shore U, unique cross edge xy, and no edges between U and X ∪ Y.
Finset.Subset.antisymm
Two finsets are equal if each is a subset of the other.
Finset.union_subset
The union of two finsets is contained in a third finset if both are contained in it.
boundary_five_blocks_two_extra_shores_impossible
In the four-block boundary partition, no 2k-vertex residual can have a five-part barrier partition with 1 ≤ |S| ≤ 4, two nonempty disconnected extra shores Z and W with |S| ≤ |W| + 1, and no edges from Z to X ∪ Y ∪ W or from W to X ∪ Y.
Finset.disjoint_of_subset_right
If t ⊆ u and s is disjoint from u, then s is disjoint from t.
Finset.disjoint_of_subset_left
If s ⊆ u and u is disjoint from t, then s is disjoint from t.

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_forced_cross_edge_is_bridge    (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)    (R : Finset (Fin (4*k))) (hR : R.card=2*k)    (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (hxy : G.Adj x y)    (hxR : x ∈ R) (hyR : y ∈ R)    (hP : ∃ P : (G.induce {v | v ∈ R}).Subgraph, P.IsPerfectMatching)    (hforced : ¬ ∃ P : ((G.induce {v | v ∈ R}).deleteEdges      {s(⟨x,hxR⟩,⟨y,hyR⟩)}).Subgraph, P.IsPerfectMatching) :    ¬ ((G.induce {v | v ∈ R}).deleteEdges      {s(⟨x,hxR⟩,⟨y,hyR⟩)}).Reachable ⟨x,hxR⟩ ⟨y,hyR⟩ := by  classical  intro hpath  obtain ⟨S, X, Y, U, hSne, hSX, hSY, hSU, hXY, hXU, hYU, hcov, hxX, hyY, hcross,      hanti, hodd⟩ :=    forced_matching_edge_barrier_component_partition (G.induce {v | v ∈ R})      ⟨x,hxR⟩ ⟨y,hyR⟩ hxy hP hforced hpath  let ι : ↥{v | v ∈ R} ↪ Fin (4*k) := Function.Embedding.subtype _  have hmem : ∀ (T : Finset ↥{v | v ∈ R}) (a : ↥{v | v ∈ R}), ι a ∈ T.map ι ↔ a ∈ T :=    fun T a => Finset.mem_map' ι  have hmem' : ∀ (T : Finset ↥{v | v ∈ R}) (b : Fin (4*k)), b ∈ T.map ι →      ∃ a ∈ T, ι a = b := fun T b h => Finset.mem_map.mp h  have hdis : ∀ T T' : Finset ↥{v | v ∈ R}, Disjoint T T' → Disjoint (T.map ι) (T'.map ι) :=    fun T T' h => (Finset.disjoint_map _).mpr h  have huniv : (Finset.univ : Finset ↥{v | v ∈ R}).card = 2*k := by    simp [hR]  set X' := X.map ι with hX'  set Y' := Y.map ι with hY'  set U' := U.map ι with hU'  set S' := S.map ι with hS'  have hxX' : x ∈ X' := (hmem X ⟨x,hxR⟩).mpr hxX  have hyY' : y ∈ Y' := (hmem Y ⟨y,hyR⟩).mpr hyY  have hcross' : ∀ a ∈ X', ∀ b ∈ Y', G.Adj a b → a = x ∧ b = y := by    intro a ha b hb hab    obtain ⟨a0, ha0, rfl⟩ := hmem' X a ha    obtain ⟨b0, hb0, rfl⟩ := hmem' Y b hb    obtain ⟨h1, h2⟩ := hcross a0 ha0 b0 hb0 hab    exact ⟨congrArg Subtype.val h1, congrArg Subtype.val h2⟩  have hantiU : ∀ u ∈ U', ∀ v ∈ X' ∪ Y', ¬ G.Adj u v := by    intro u hu v hv huv    obtain ⟨u0, hu0, rfl⟩ := hmem' U u hu    rw [Finset.mem_union] at hv    rcases hv with hv | hv    · obtain ⟨v0, hv0, rfl⟩ := hmem' X v hv      exact hanti u0 hu0 v0 (Finset.mem_union_left _ hv0) huv    · obtain ⟨v0, hv0, rfl⟩ := hmem' Y v hv      exact hanti u0 hu0 v0 (Finset.mem_union_right _ hv0) huv  have hxU' : x ∉ U' := fun h => Finset.disjoint_left.mp (hdis X U hXU) hxX' h  have hyU' : y ∉ U' := fun h => Finset.disjoint_left.mp (hdis Y U hYU) hyY' h  have hU4 : U'.card ≤ 4 := boundary_five_block_extra_part_card_le_four k hk G A B C D    hAB hCD hBD hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy U' hxU' hyU'    (fun u hu h => hantiU u hu x (Finset.mem_union_left _ hxX') h.symm)    (fun u hu h => hantiU u hu y (Finset.mem_union_right _ hyY') h.symm)  have hUcard : U'.card = U.card := Finset.card_map _  have hs1 : 1 ≤ S.card := Finset.card_pos.mpr hSne  have hcardU : Fintype.card ↥{a | a ∈ U} = U.card := by simp  have hoddle := simple_graph_odd_components_card_le_vertices    ((G.induce {v | v ∈ R}).induce {a | a ∈ U})  have hS'card : S'.card = S.card := Finset.card_map _  have hmemcov : ∀ a : ↥{v | v ∈ R}, a ∈ S ∨ a ∈ X ∨ a ∈ Y ∨ a ∈ U := by    intro a    have : a ∈ S ∪ X ∪ Y ∪ U := hcov ▸ Finset.mem_univ a    simpa [or_assoc] using this  rcases odd_components_split_for_positive_barrier _ S.card hs1 hodd with    ⟨h1, hodd1⟩ | ⟨Z, W, hZ, hW, hZW, hZWu, hWs, hZWanti⟩  · have hres : (X' ∪ Y' ∪ U' ∪ S').card = 2*k := by      have e : X' ∪ Y' ∪ U' ∪ S' = (X ∪ Y ∪ U ∪ S).map ι := by        simp only [hX', hY', hU', hS', Finset.map_union]      have e2 : X ∪ Y ∪ U ∪ S = Finset.univ := by        ext a; simp only [Finset.mem_union, Finset.mem_univ, iff_true]        rcases hmemcov a with h | h | h | h <;> simp [h]      rw [e, Finset.card_map, e2, huniv]    exact boundary_five_blocks_single_odd_extra_shore_impossible k hk G A B C D      hAB hAC hAD hBC hBD hCD hcover hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy      X' Y' U' S' (hdis _ _ hXY) (hdis _ _ hXU) (hdis _ _ hSX.symm) (hdis _ _ hYU)      (hdis _ _ hSY.symm) (hdis _ _ hSU.symm) hxX' hyY' (by rw [hS'card]; exact h1) hres      (by rw [hUcard, ← hcardU]; exact hodd1) hcross' hantiU  · let ι2 : ↥{a | a ∈ U} ↪ ↥{v | v ∈ R} := Function.Embedding.subtype _    set Z2 := Z.map ι2 with hZ2    set W2 := W.map ι2 with hW2    have hZ2U : Z2 ⊆ U := by      intro a ha      obtain ⟨a0, -, rfl⟩ := Finset.mem_map.mp ha      exact a0.2    have hW2U : W2 ⊆ U := by      intro a ha      obtain ⟨a0, -, rfl⟩ := Finset.mem_map.mp ha      exact a0.2    have hZW2 : Z2 ∪ W2 = U := by      apply Finset.Subset.antisymm (Finset.union_subset hZ2U hW2U)      intro a ha      have : (⟨a, ha⟩ : ↥{a | a ∈ U}) ∈ Z ∪ W := hZWu ▸ Finset.mem_univ _      rw [Finset.mem_union] at this ⊢      rcases this with h | h      · exact Or.inl (Finset.mem_map.mpr ⟨_, h, rfl⟩)      · exact Or.inr (Finset.mem_map.mpr ⟨_, h, rfl⟩)    set Z' := Z2.map ι with hZ'    set W' := W2.map ι with hW'    have hZ'U : Z' ⊆ U' := Finset.map_subset_map.mpr hZ2U    have hW'U : W' ⊆ U' := Finset.map_subset_map.mpr hW2U    have hres : (X' ∪ Y' ∪ Z' ∪ W' ∪ S').card = 2*k := by      have e : X' ∪ Y' ∪ Z' ∪ W' ∪ S' = (X ∪ Y ∪ Z2 ∪ W2 ∪ S).map ι := by        simp only [hX', hY', hZ', hW', hS', Finset.map_union]      have e2 : X ∪ Y ∪ Z2 ∪ W2 ∪ S = Finset.univ := by        ext a; simp only [Finset.mem_union, Finset.mem_univ, iff_true]        rcases hmemcov a with h | h | h | h        · simp [h]        · simp [h]        · simp [h]        · rw [← hZW2, Finset.mem_union] at h          rcases h with h | h <;> simp [h]      rw [e, Finset.card_map, e2, huniv]    have hZ2W2 : Disjoint Z2 W2 := (Finset.disjoint_map _).mpr hZW    have hZ'W' : Disjoint Z' W' := hdis _ _ hZ2W2    have hXU' := hdis _ _ hXU    have hYU' := hdis _ _ hYU    have hSU' := hdis _ _ hSU    refine boundary_five_blocks_two_extra_shores_impossible k hk G A B C D      hAB hAC hAD hBC hBD hCD hcover hA hC hsizeAB hsizeCD hnoAB hnoCD hdegree x y hx hy      X' Y' Z' W' S' (hdis _ _ hXY)      (Finset.disjoint_of_subset_right hZ'U hXU') (Finset.disjoint_of_subset_right hW'U hXU')      (hdis _ _ hSX.symm)      (Finset.disjoint_of_subset_right hZ'U hYU') (Finset.disjoint_of_subset_right hW'U hYU')      (hdis _ _ hSY.symm) hZ'W'      (Finset.disjoint_of_subset_left hZ'U hSU'.symm).symm.symm      (Finset.disjoint_of_subset_left hW'U hSU'.symm).symm.symm      hxX' hyY' (by rw [hS'card]; exact hs1) (by omega)      (by simp only [hZ', Finset.map_nonempty, hZ2]; exact hZ)      (by simp only [hW', Finset.map_nonempty, hW2]; exact hW)      (by rw [hS'card, hW', Finset.card_map, hW2, Finset.card_map]; exact hWs)      hres hcross' ?_ ?_    · intro u hu v hv huv      rw [Finset.mem_union] at hv      rcases hv with hv | hv      · exact hantiU u (hZ'U hu) v hv huv      · obtain ⟨u1, hu1, rfl⟩ := Finset.mem_map.mp hu        obtain ⟨u0, hu0, rfl⟩ := Finset.mem_map.mp hu1        obtain ⟨v1, hv1, rfl⟩ := Finset.mem_map.mp hv        obtain ⟨v0, hv0, rfl⟩ := Finset.mem_map.mp hv1        exact hZWanti u0 hu0 v0 hv0 huv    · intro u hu v hv huv      exact hantiU u (hW'U hu) v hv huv
See it in the graphDiscuss this resultChallenge it