boundary_saturated_block_factorcritical_opposite_cross_removable
Under the displayed four-block, saturation, separator, and degree hypotheses, if A has at least three vertices, B is factor-critical and the opposite block C has at most k vertices, a k-extendible graph remains k-extendible after deleting any A-to-C edge.
Statement
theorem boundary_saturated_block_factorcritical_opposite_cross_removable
(k : ℕ) (hk : 4 ≤ 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)
(hsizeAB : A.card+B.card=2*k) (hsizeCD : C.card+D.card=2*k)
(hA : 3 ≤ A.card) (hC : C.card ≤ k)
(hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b)
(hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d)
(hAsat : ∀ a ∈ A, ∀ w ∈ A ∪ C ∪ D, a ≠ w → G.Adj a w)
(hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card)
(hsep : ∀ X U V : Finset (Fin (4*k)), U.Nonempty → V.Nonempty →
Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ →
(∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → 2*k ≤ X.card)
(hBcrit : is_k_factor_critical (G.induce {v | v ∈ B}) 1)
(hext : is_k_extendable G k)
(x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (hxy : G.Adj x y) :
is_k_extendable (G.deleteEdges {s(x,y)}) k- Source
- OP-1957; all-k forced-edge barrier reduction for a three-vertex non-factor-critical boundary component, session IN-1122.
- Verified
- 27 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 13
- is_k_extendableFor a finite vertex type V (with [Fintype V]), a simple graph G : SimpleGraph V and k : ℕ, is_k_extendable G k is the Prop that is the…
- is_k_factor_criticalA simple graph G on a finite vertex type V is k-factor-critical if for every subset S of V with cardinality k, the induced subgraph on Sᶜ…
- k_extendable_essential_edge_has_forced_matching_residualAn essential edge of a k-extendible graph is forced in a perfect-matching residual on n−2k vertices.
- boundary_saturated_block_cross_edge_residual_reachableUnder the displayed four-block, saturation, degree, and 2k-separator hypotheses, if A has at least three vertices and the opposite block C…
- forced_matching_edge_excludes_adjacent_true_twinA forced edge of a perfect matching cannot have an endpoint with a distinct adjacent true twin other than the edge's other endpoint.
- forced_matching_edge_barrier_component_partitionA perfect-matchable finite graph with a forced edge that has an alternate path admits the displayed nonempty barrier and component…
- factorcritical_anticomplete_odd_components_boundIn a finite 1-factor-critical graph, if U is anticomplete to L minus U and L contains a vertex outside U, then the number of odd…
- boundary_barrier_numeric_contradictionsThe displayed cardinality and degree-defect constraints yield the four separator, lower-bound, degree-budget, and factor-critical…
- op1957_saturated_b_only_connected_shore_impossibleThe displayed disjoint connected endpoint shores and B-only odd reservoir cannot satisfy the four-block degree, separator and…
- op1957_saturated_forced_residual_single_block_vertexIn the displayed four-block graph with fully saturated A, a perfect-matchable residual in which an A-to-C edge is forced meets A only at…
- forced_matching_edge_barrier_partition_connected_endpoint_shoresA forced matching edge with an alternate path admits the displayed nonempty barrier and odd-component reservoir partition, with the…
- graph_iso_odd_components_cardA finite graph isomorphism preserves the number of odd connected components.
- Arena.Reachable.transReachability is transitive.
- Used by 1
- minimally_k_extendable_triangle_component_boundary_degree_bound_with_separatorFor a minimally k-extendible graph with the displayed four-block partition, a three-vertex block, a factor-critical opposite same-side…
The proof, explained
The proof shows by contradiction that deleting an edge xy between A and C preserves k-extendibility. Assuming xy is essential, there exists a 2k-vertex residual subgraph G[R] containing x and y in which xy is forced in every perfect matching, with A ∩ R = {x} and x, y connected in G[R] \ {xy}. Applying the Gallai-Edmonds barrier theorem for forced edges yields a partition S, X, Y, U of R, which the saturation of A forces to satisfy U ⊆ B and Y ⊆ B ∪ {y}, while the minimum degree condition forces |C| ≥ 3. This barrier configuration within the 1-factor-critical block B is shown to be impossible by op1957_saturated_b_only_connected_shore_impossible, completing the proof.
Assuming G \ {xy} is not k-extendible, there exists a 2k-vertex residual set R containing x and y such that G[R] has a perfect matching but G[R] \ {xy} does not.
We argue by contradiction. If deleting the edge xy destroys k-extendibility, xy is an essential edge. By k_extendable_essential_edge_has_forced_matching_residual, any essential edge in a k-extendible graph on 4k vertices yields a residual vertex set R of size 4k - 2k = 2k containing x and y such that the induced subgraph G[R] has a perfect matching, but no perfect matching exists in G[R] \ {xy}.
uses
k_extendable_essential_edge_has_forced_matching_residualclassical by_contra hess obtain ⟨R,hR0,hxR,hyR,hP,hforced⟩ := k_extendable_essential_edge_has_forced_matching_residual (4*k) k G x y hxy hext hess have hR : R.card=2*k := by omega
In H = G[R], A ∩ R = {x}, x and y are connected in H \ {xy}, and there is a Gallai-Edmonds barrier partition S, X, Y, U of R.
We define H = G[R] with endpoints x', y' corresponding to x, y. Because A is saturated towards A ∪ C ∪ D and xy is forced in H, op1957_saturated_forced_residual_single_block_vertex implies A ∩ R = {x}. By boundary_saturated_block_cross_edge_residual_reachable, x' and y' are reachable from each other in H \ {x'y'}. We then apply forced_matching_edge_barrier_partition_connected_endpoint_shores to obtain a partition of R into S, X, Y, U where S is nonempty, x' ∈ X, y' ∈ Y, xy is the unique edge between X and Y, U has no edges to X ∪ Y, |S| ≤ odd(H[U]), and X, Y are connected internally from x', y'.
uses
op1957_saturated_forced_residual_single_block_vertex,boundary_saturated_block_cross_edge_residual_reachable,forced_matching_edge_barrier_partition_connected_endpoint_shoreslet H := G.induce {v | v ∈ R} let x' : {v // v ∈ R} := ⟨x,hxR⟩ let y' : {v // v ∈ R} := ⟨y,hyR⟩ have hAR : A ∩ R = {x} := op1957_saturated_forced_residual_single_block_vertex G A B C D R hAB hAC hAD hBC hBD hCD hcover hnoAB hAsat x y hx hy hxR hyR hP hforced have hpath := boundary_saturated_block_cross_edge_residual_reachable k hk G A B C D hAB hAC hAD hBC hBD hCD hcover hsizeAB hsizeCD hA hC hnoAB hnoCD hAsat hdegree hsep R hR x y hx hy hxy hxR hyR obtain ⟨S,X,Y,U,hSpos,hSX,hSY,hSU,hXY,hXU,hYU,hcoverR,hxX,hyY,hcross,hanti,hodd,hreachX,hreachY⟩ := forced_matching_edge_barrier_partition_connected_endpoint_shores H x' y' hxy hP hforced hpath
The partition sets embed into V(G) as disjoint sets S', X', Y', U' whose sizes sum to 2k, with |S'| ≥ 1.
We map S, X, Y, U into Fin (4*k) via the inclusion f : R ↪ Fin (4*k) to obtain S', X', Y', U'. The map f is injective, so disjointness of the sets is preserved. Since S, X, Y, U partition R and |R| = 2k, their sizes sum to |X'| + |Y'| + |U'| + |S'| = 2k. Since S is nonempty, |S'| ≥ 1.
uses
Finset.card_union_of_disjoint,Finset.card_univlet f : {v // v ∈ R} ↪ Fin (4*k) := ⟨Subtype.val,Subtype.val_injective⟩ let S' := S.map f let X' := X.map f let Y' := Y.map f let U' := U.map f have hmem (T : Finset {v // v ∈ R}) (z : {v // v ∈ R}) : z.val ∈ T.map f ↔ z ∈ T := by simp [f] have hd (T W : Finset {v // v ∈ R}) (h : Disjoint T W) : Disjoint (T.map f) (W.map f) := by apply Finset.disjoint_left.mpr intro z hzT hzW obtain ⟨a,ha,he⟩ := Finset.mem_map.mp hzT obtain ⟨b,hb,he'⟩ := Finset.mem_map.mp hzW have hab : a=b := f.injective (he.trans he'.symm) exact Finset.disjoint_left.mp h ha (hab ▸ hb) have hsize : X'.card+Y'.card+U'.card+S'.card=2*k := by have h1 : Disjoint (S ∪ X) Y := Finset.disjoint_union_left.mpr ⟨hSY,hXY⟩ have h2 : Disjoint (S ∪ X ∪ Y) U := Finset.disjoint_union_left.mpr ⟨Finset.disjoint_union_left.mpr ⟨hSU,hXU⟩,hYU⟩ have hc := congrArg Finset.card hcoverR rw [Finset.card_union_of_disjoint h2,Finset.card_union_of_disjoint h1,Finset.card_union_of_disjoint hSX] at hc simp only [Finset.card_univ] at hc have hcardR : Fintype.card {v : Fin (4*k) | v ∈ R}=R.card := by simp rw [hcardR,hR] at hc simp [S',X',Y',U',Finset.card_map] omega have hs : 1 ≤ S'.card := by have hh := Finset.card_pos.mpr hSpos simp only [S',Finset.card_map] omega
x ∈ X', y ∈ Y', X' ∩ A = {x}, xy is the unique edge between X' and Y', and there are no edges between U' and X' ∪ Y'.
The inclusion of x' ∈ X and y' ∈ Y translates directly to x ∈ X' and y ∈ Y'. Because X' ⊆ R and A ∩ R = {x}, we have X' ∩ A = {x}. By the properties of the barrier partition mapped into G, any edge between X' and Y' must be xy, and no edges exist between U' and X' or between U' and Y'. Disjointness of X', Y', and U' also follows.
have hxX' : x ∈ X' := (hmem X x').2 hxX have hyY' : y ∈ Y' := (hmem Y y').2 hyY have hXsub : X' ⊆ R := by intro z hz obtain ⟨a,ha,rfl⟩ := Finset.mem_map.mp hz exact a.property have hXAdis : X' ∩ A = {x} := by ext z constructor · intro hz have hzX := (Finset.mem_inter.mp hz).1 have hzA := (Finset.mem_inter.mp hz).2 have hzAR : z ∈ A ∩ R := Finset.mem_inter.mpr ⟨hzA,hXsub hzX⟩ rw [hAR] at hzAR exact hzAR · intro hz have he := Finset.mem_singleton.mp hz subst z exact Finset.mem_inter.mpr ⟨hxX',hx⟩ have hcross' : ∀ a ∈ X', ∀ b ∈ Y', G.Adj a b → a=x ∧ b=y := by intro a ha b hb hab obtain ⟨a',ha',rfl⟩ := Finset.mem_map.mp ha obtain ⟨b',hb',rfl⟩ := Finset.mem_map.mp hb have hh := hcross a' ha' b' hb' hab exact ⟨congrArg Subtype.val hh.1,congrArg Subtype.val hh.2⟩ have hantiX : ∀ a ∈ X', ∀ u ∈ U', ¬ G.Adj a u := by intro a ha u hu hadj obtain ⟨a',ha',rfl⟩ := Finset.mem_map.mp ha obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu exact hanti u' hu' a' (Finset.mem_union_left _ ha') hadj.symm have hantiY : ∀ b ∈ Y', ∀ u ∈ U', ¬ G.Adj b u := by intro b hb u hu hadj obtain ⟨b',hb',rfl⟩ := Finset.mem_map.mp hb obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu exact hanti u' hu' b' (Finset.mem_union_right _ hb') hadj.symm have hXU' := hd X U hXU have hXY' := hd X Y hXY have hYU' := hd Y U hYU
U' ⊆ B and Y' ⊆ B ∪ {y}.
Neither x nor y is in B because A and C are disjoint from B. Since A ∪ B ∪ C ∪ D covers the whole graph, any vertex outside B belongs to A ∪ C ∪ D. If some z ∈ U' were not in B, then z ∈ A ∪ C ∪ D with z ≠ x (as X' and U' are disjoint); saturation of A would then make x adjacent to z, contradicting that there are no edges between X' and U'. Thus U' ⊆ B. Similarly, if z ∈ Y' is not in B, saturation of A forces x to be adjacent to z; since xy is the unique edge between X' and Y', this forces z = y, so Y' ⊆ B ∪ {y}.
have hyB : y ∉ B := fun h => Finset.disjoint_left.mp hBC h hy have hxB : x ∉ B := fun h => Finset.disjoint_left.mp hAB hx h have hsubset (z : Fin (4*k)) (hzB : z ∉ B) : z ∈ A ∪ C ∪ D := by have h := show z ∈ A ∪ B ∪ C ∪ D by rw [hcover]; simp simp only [Finset.mem_union] at h ⊢ rcases h with ((ha | hb) | hc') | hd' · exact Or.inl (Or.inl ha) · exact False.elim (hzB hb) · exact Or.inl (Or.inr hc') · exact Or.inr hd' have hUB : U' ⊆ B := by intro z hz by_contra hzB have hzx : z ≠ x := fun he => Finset.disjoint_left.mp hXU' hxX' (he ▸ hz) have hadj := hAsat x hx z (hsubset z hzB) hzx.symm exact hantiX x hxX' z hz hadj have hY : Y' ⊆ B ∪ {y} := by intro z hz by_cases hzB : z ∈ B · exact Finset.mem_union_left _ hzB · have hzx : z ≠ x := fun he => Finset.disjoint_left.mp hXY' hxX' (he ▸ hz) have hadj := hAsat x hx z (hsubset z hzB) hzx.symm have he := (hcross' x hxX' z hz hadj).2 exact Finset.mem_union_right _ (Finset.mem_singleton.mpr he)
|S'| ≤ odd(G[U']) and all vertices in X' are reachable from x in G[X'].
An explicit isomorphism eU : H[U] ≃g G[U'] preserves the number of odd components by graph_iso_odd_components_card, giving |S'| ≤ odd(G[U']). An embedding eX : H[X] →g G[X'] together with SimpleGraph.Reachable.map transfers reachability from x' in H[X] to x in G[X'].
uses
graph_iso_odd_components_card,SimpleGraph.Reachable.maplet eU : (H.induce {v | v ∈ U}) ≃g (G.induce {v | v ∈ U'}) := { toFun := fun a => ⟨a.val.val,(hmem U a.val).2 a.property⟩ invFun := fun a => ⟨⟨a.val,by obtain ⟨w,hw,he⟩ := Finset.mem_map.mp a.property; exact he ▸ w.property⟩, by have haU : a.val ∈ U.map f := by simpa [U'] using a.property exact (hmem U _).1 haU⟩ left_inv := fun a => by apply Subtype.ext; apply Subtype.ext; rfl right_inv := fun a => by apply Subtype.ext; rfl map_rel_iff' := by rfl } have hiso := graph_iso_odd_components_card _ _ eU have hodd' : S'.card ≤ (G.induce {v | v ∈ U'}).oddComponents.ncard := by rw [← hiso] simpa [S'] using hodd let eX : (H.induce {v | v ∈ X}) →g (G.induce {v | v ∈ X'}) := { toFun := fun a => ⟨a.val.val,(hmem X a.val).2 a.property⟩ map_rel' := by intro a b h; exact h } have hreach' : ∀ z (hz : z ∈ X'), (G.induce {a | a ∈ X'}).Reachable ⟨x,hxX'⟩ ⟨z,hz⟩ := by intro z hz obtain ⟨a,ha,rfl⟩ := Finset.mem_map.mp hz have hh := SimpleGraph.Reachable.map eX (hreachX a ha) simpa [eX,x',f] using hh
|C| ≥ 3.
Because C and D are disjoint, y ∉ D. Since there are no edges between C and D, the neighborhood of y is contained in (Finset.univ \ D) \ {y}. The size of Finset.univ \ D is 4k - |D| = 2k + |C|, so |N(y)| ≤ 2k + |C| - 1. Combining this with the minimum degree hypothesis 2k + 2 ≤ |N(y)| yields 2k + 2 ≤ 2k + |C| - 1, which implies |C| ≥ 3.
uses
Finset.card_le_card,Finset.card_sdiff_of_subset,Finset.card_univ,Fintype.card_fin,Finset.card_erase_of_memhave hyD : y ∉ D := fun h => Finset.disjoint_left.mp hCD hy h have hsubN : G.neighborFinset y ⊆ ((Finset.univ \ D).erase y) := by intro z hz have hyz : G.Adj y z := by simpa using hz simp only [Finset.mem_erase,Finset.mem_sdiff,Finset.mem_univ,true_and] exact ⟨hyz.ne.symm,fun hzD => hnoCD y hy z hzD hyz⟩ have hNcard := Finset.card_le_card hsubN have hUcard : ((Finset.univ : Finset (Fin (4*k))) \ D).card=2*k+C.card := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ D),Finset.card_univ,Fintype.card_fin] omega have hyout : y ∈ (Finset.univ : Finset (Fin (4*k))) \ D := by simp [hyD] rw [Finset.card_erase_of_mem hyout,hUcard] at hNcard have hc : 3 ≤ C.card := by have hh := hdegree y; omega
Contradiction (False), so G \ {xy} remains k-extendible.
We invoke op1957_saturated_b_only_connected_shore_impossible using all established hypotheses: |C| ≥ 3, |C| ≤ k, B is 1-factor-critical, the separator condition holds, X' ∩ A = {x}, Y' ⊆ B ∪ {y}, U' ⊆ B, the sizes sum to 2k with 1 ≤ |S'| ≤ odd(G[U']), xy is the only edge between X' and Y', and X' is connected from x. The theorem derives False, refuting the assumption that G \ {xy} fails to be k-extendible.
uses
op1957_saturated_b_only_connected_shore_impossibleexact op1957_saturated_b_only_connected_shore_impossible G k C.card S'.card hc hC (by simp) A B C D X' Y' U' hAB hAC hAD hBC hBD hCD hcover hA hsizeAB rfl hsizeCD hnoAB hnoCD hBcrit hdegree hsep x y hx hy hxX' hyY' hXY' hXU' hYU' hXAdis hY hUB hsize hs hodd' hcross' hantiX hantiY hreach'
k_extendable_essential_edge_has_forced_matching_residual- If deleting an edge uv in a k-extendible graph on n vertices destroys k-extendibility, there is a residual vertex set R of size n - 2k containing u and v such that G[R] has a perfect matching, but G[R] \ {uv} does not (so uv is forced in G[R]).
op1957_saturated_forced_residual_single_block_vertex- In the four-block partition where A is saturated towards A ∪ C ∪ D, if an edge xy with x ∈ A and y ∈ C is forced in the induced residual subgraph G[R], then A ∩ R = {x}.
boundary_saturated_block_cross_edge_residual_reachable- Under the four-block and degree hypotheses, the endpoints x ∈ A and y ∈ C of an edge xy remain connected by a path in the residual subgraph G[R] \ {xy}.
forced_matching_edge_barrier_partition_connected_endpoint_shores- If an edge uv is forced in a graph with a perfect matching and u, v are reachable in G \ {uv}, the vertex set admits a Gallai-Edmonds barrier partition S, X, Y, U where S is nonempty, u ∈ X, v ∈ Y, uv is the unique edge between X and Y, U has no edges to X ∪ Y, |S| is at most the number of odd components of G[U], and X, Y are internally connected from u, v.
Finset.card_union_of_disjoint- The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Finset.card_univ- The cardinality of the universal finset of a finite type equals the cardinality of that type.
graph_iso_odd_components_card- An isomorphism of simple graphs preserves the number of odd connected components.
SimpleGraph.Reachable.map- A homomorphism of simple graphs maps reachable pairs of vertices to reachable pairs of vertices.
Finset.card_le_card- If a finite set s is a subset of a finite set t, then |s| ≤ |t|.
Finset.card_sdiff_of_subset- If s ⊆ t are finite sets, then |t \ s| = |t| - |s|.
Fintype.card_fin- The cardinality of the finite type Fin n is n.
Finset.card_erase_of_mem- Removing an element a from a finite set s decreases its cardinality by 1.
op1957_saturated_b_only_connected_shore_impossible- Under the four-block hypotheses with B 1-factor-critical, the separator condition, 3 ≤ |C| ≤ k, and a barrier partition of a 2k-vertex set satisfying X ∩ A = {x}, Y ⊆ B ∪ {y}, and U ⊆ B, no such configuration can exist (yielding False).
- The barrier partition sets S, X, Y, U are initially constructed on the subtype vertices of the induced subgraph H = G[R], and then embedded into the ambient vertex set Fin (4*k) via the map f to obtain S', X', Y', U'.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem boundary_saturated_block_factorcritical_opposite_cross_removable (k : ℕ) (hk : 4 ≤ 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) (hsizeAB : A.card+B.card=2*k) (hsizeCD : C.card+D.card=2*k) (hA : 3 ≤ A.card) (hC : C.card ≤ k) (hnoAB : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d) (hAsat : ∀ a ∈ A, ∀ w ∈ A ∪ C ∪ D, a ≠ w → G.Adj a w) (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card) (hsep : ∀ X U V : Finset (Fin (4*k)), U.Nonempty → V.Nonempty → Disjoint X U → Disjoint X V → Disjoint U V → X ∪ U ∪ V = Finset.univ → (∀ u ∈ U, ∀ v ∈ V, ¬ G.Adj u v) → 2*k ≤ X.card) (hBcrit : is_k_factor_critical (G.induce {v | v ∈ B}) 1) (hext : is_k_extendable G k) (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (hxy : G.Adj x y) : is_k_extendable (G.deleteEdges {s(x,y)}) k := by classical by_contra hess obtain ⟨R,hR0,hxR,hyR,hP,hforced⟩ := k_extendable_essential_edge_has_forced_matching_residual (4*k) k G x y hxy hext hess have hR : R.card=2*k := by omega let H := G.induce {v | v ∈ R} let x' : {v // v ∈ R} := ⟨x,hxR⟩ let y' : {v // v ∈ R} := ⟨y,hyR⟩ have hAR : A ∩ R = {x} := op1957_saturated_forced_residual_single_block_vertex G A B C D R hAB hAC hAD hBC hBD hCD hcover hnoAB hAsat x y hx hy hxR hyR hP hforced have hpath := boundary_saturated_block_cross_edge_residual_reachable k hk G A B C D hAB hAC hAD hBC hBD hCD hcover hsizeAB hsizeCD hA hC hnoAB hnoCD hAsat hdegree hsep R hR x y hx hy hxy hxR hyR obtain ⟨S,X,Y,U,hSpos,hSX,hSY,hSU,hXY,hXU,hYU,hcoverR,hxX,hyY,hcross,hanti,hodd,hreachX,hreachY⟩ := forced_matching_edge_barrier_partition_connected_endpoint_shores H x' y' hxy hP hforced hpath let f : {v // v ∈ R} ↪ Fin (4*k) := ⟨Subtype.val,Subtype.val_injective⟩ let S' := S.map f let X' := X.map f let Y' := Y.map f let U' := U.map f have hmem (T : Finset {v // v ∈ R}) (z : {v // v ∈ R}) : z.val ∈ T.map f ↔ z ∈ T := by simp [f] have hd (T W : Finset {v // v ∈ R}) (h : Disjoint T W) : Disjoint (T.map f) (W.map f) := by apply Finset.disjoint_left.mpr intro z hzT hzW obtain ⟨a,ha,he⟩ := Finset.mem_map.mp hzT obtain ⟨b,hb,he'⟩ := Finset.mem_map.mp hzW have hab : a=b := f.injective (he.trans he'.symm) exact Finset.disjoint_left.mp h ha (hab ▸ hb) have hsize : X'.card+Y'.card+U'.card+S'.card=2*k := by have h1 : Disjoint (S ∪ X) Y := Finset.disjoint_union_left.mpr ⟨hSY,hXY⟩ have h2 : Disjoint (S ∪ X ∪ Y) U := Finset.disjoint_union_left.mpr ⟨Finset.disjoint_union_left.mpr ⟨hSU,hXU⟩,hYU⟩ have hc := congrArg Finset.card hcoverR rw [Finset.card_union_of_disjoint h2,Finset.card_union_of_disjoint h1,Finset.card_union_of_disjoint hSX] at hc simp only [Finset.card_univ] at hc have hcardR : Fintype.card {v : Fin (4*k) | v ∈ R}=R.card := by simp rw [hcardR,hR] at hc simp [S',X',Y',U',Finset.card_map] omega have hs : 1 ≤ S'.card := by have hh := Finset.card_pos.mpr hSpos simp only [S',Finset.card_map] omega have hxX' : x ∈ X' := (hmem X x').2 hxX have hyY' : y ∈ Y' := (hmem Y y').2 hyY have hXsub : X' ⊆ R := by intro z hz obtain ⟨a,ha,rfl⟩ := Finset.mem_map.mp hz exact a.property have hXAdis : X' ∩ A = {x} := by ext z constructor · intro hz have hzX := (Finset.mem_inter.mp hz).1 have hzA := (Finset.mem_inter.mp hz).2 have hzAR : z ∈ A ∩ R := Finset.mem_inter.mpr ⟨hzA,hXsub hzX⟩ rw [hAR] at hzAR exact hzAR · intro hz have he := Finset.mem_singleton.mp hz subst z exact Finset.mem_inter.mpr ⟨hxX',hx⟩ have hcross' : ∀ a ∈ X', ∀ b ∈ Y', G.Adj a b → a=x ∧ b=y := by intro a ha b hb hab obtain ⟨a',ha',rfl⟩ := Finset.mem_map.mp ha obtain ⟨b',hb',rfl⟩ := Finset.mem_map.mp hb have hh := hcross a' ha' b' hb' hab exact ⟨congrArg Subtype.val hh.1,congrArg Subtype.val hh.2⟩ have hantiX : ∀ a ∈ X', ∀ u ∈ U', ¬ G.Adj a u := by intro a ha u hu hadj obtain ⟨a',ha',rfl⟩ := Finset.mem_map.mp ha obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu exact hanti u' hu' a' (Finset.mem_union_left _ ha') hadj.symm have hantiY : ∀ b ∈ Y', ∀ u ∈ U', ¬ G.Adj b u := by intro b hb u hu hadj obtain ⟨b',hb',rfl⟩ := Finset.mem_map.mp hb obtain ⟨u',hu',rfl⟩ := Finset.mem_map.mp hu exact hanti u' hu' b' (Finset.mem_union_right _ hb') hadj.symm have hXU' := hd X U hXU have hXY' := hd X Y hXY have hYU' := hd Y U hYU have hyB : y ∉ B := fun h => Finset.disjoint_left.mp hBC h hy have hxB : x ∉ B := fun h => Finset.disjoint_left.mp hAB hx h have hsubset (z : Fin (4*k)) (hzB : z ∉ B) : z ∈ A ∪ C ∪ D := by have h := show z ∈ A ∪ B ∪ C ∪ D by rw [hcover]; simp simp only [Finset.mem_union] at h ⊢ rcases h with ((ha | hb) | hc') | hd' · exact Or.inl (Or.inl ha) · exact False.elim (hzB hb) · exact Or.inl (Or.inr hc') · exact Or.inr hd' have hUB : U' ⊆ B := by intro z hz by_contra hzB have hzx : z ≠ x := fun he => Finset.disjoint_left.mp hXU' hxX' (he ▸ hz) have hadj := hAsat x hx z (hsubset z hzB) hzx.symm exact hantiX x hxX' z hz hadj have hY : Y' ⊆ B ∪ {y} := by intro z hz by_cases hzB : z ∈ B · exact Finset.mem_union_left _ hzB · have hzx : z ≠ x := fun he => Finset.disjoint_left.mp hXY' hxX' (he ▸ hz) have hadj := hAsat x hx z (hsubset z hzB) hzx.symm have he := (hcross' x hxX' z hz hadj).2 exact Finset.mem_union_right _ (Finset.mem_singleton.mpr he) let eU : (H.induce {v | v ∈ U}) ≃g (G.induce {v | v ∈ U'}) := { toFun := fun a => ⟨a.val.val,(hmem U a.val).2 a.property⟩ invFun := fun a => ⟨⟨a.val,by obtain ⟨w,hw,he⟩ := Finset.mem_map.mp a.property; exact he ▸ w.property⟩, by have haU : a.val ∈ U.map f := by simpa [U'] using a.property exact (hmem U _).1 haU⟩ left_inv := fun a => by apply Subtype.ext; apply Subtype.ext; rfl right_inv := fun a => by apply Subtype.ext; rfl map_rel_iff' := by rfl } have hiso := graph_iso_odd_components_card _ _ eU have hodd' : S'.card ≤ (G.induce {v | v ∈ U'}).oddComponents.ncard := by rw [← hiso] simpa [S'] using hodd let eX : (H.induce {v | v ∈ X}) →g (G.induce {v | v ∈ X'}) := { toFun := fun a => ⟨a.val.val,(hmem X a.val).2 a.property⟩ map_rel' := by intro a b h; exact h } have hreach' : ∀ z (hz : z ∈ X'), (G.induce {a | a ∈ X'}).Reachable ⟨x,hxX'⟩ ⟨z,hz⟩ := by intro z hz obtain ⟨a,ha,rfl⟩ := Finset.mem_map.mp hz have hh := SimpleGraph.Reachable.map eX (hreachX a ha) simpa [eX,x',f] using hh have hyD : y ∉ D := fun h => Finset.disjoint_left.mp hCD hy h have hsubN : G.neighborFinset y ⊆ ((Finset.univ \ D).erase y) := by intro z hz have hyz : G.Adj y z := by simpa using hz simp only [Finset.mem_erase,Finset.mem_sdiff,Finset.mem_univ,true_and] exact ⟨hyz.ne.symm,fun hzD => hnoCD y hy z hzD hyz⟩ have hNcard := Finset.card_le_card hsubN have hUcard : ((Finset.univ : Finset (Fin (4*k))) \ D).card=2*k+C.card := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ D),Finset.card_univ,Fintype.card_fin] omega have hyout : y ∈ (Finset.univ : Finset (Fin (4*k))) \ D := by simp [hyD] rw [Finset.card_erase_of_mem hyout,hUcard] at hNcard have hc : 3 ≤ C.card := by have hh := hdegree y; omega exact op1957_saturated_b_only_connected_shore_impossible G k C.card S'.card hc hC (by simp) A B C D X' Y' U' hAB hAC hAD hBC hBD hCD hcover hA hsizeAB rfl hsizeCD hnoAB hnoCD hBcrit hdegree hsep x y hx hy hxX' hyY' hXY' hXU' hYU' hXAdis hY hUB hsize hs hodd' hcross' hantiX hantiY hreach'