k_extendable_essential_low_codegree_edge_yields_small_vertex_cut
An essential graph edge of complement codegree at most one gives a vertex separator of size at most 2k+1 in a k-extendable graph of minimum degree at least 2k+2.
Statement
theorem k_extendable_essential_low_codegree_edge_yields_small_vertex_cut (k j : ℕ) (hj : 2 ≤ j) (G : SimpleGraph (Fin (2*k+2*j))) [DecidableRel G.Adj] (hG : is_k_extendable G k) (hdeg : 2*k+2 ≤ G.minDegree) (u v : Fin (2*k+2*j)) (huv : G.Adj u v) (hessential : ¬ is_k_extendable (G.deleteEdges {s(u,v)}) k) (hcodeg : ((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)).card ≤ 1) : ∃ S A B : Finset (Fin (2*k+2*j)), S.card ≤ 2*k+1 ∧ A.Nonempty ∧ B.Nonempty ∧ Disjoint S A ∧ Disjoint S B ∧ Disjoint A B ∧ S ∪ A ∪ B = Finset.univ ∧ ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b
- Source
- OP-1957: vertex-cut formulation of the strict low-codegree residual bridge lemma; experiment 34826 checks a near-sharp example.
- Verified
- 22 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 5
- 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…
- k_extendable_essential_edge_unextendible_matchingIf G is k-extendable and deleting edge e destroys k-extendability, then a k-matching remains after the deletion but fails to extend to a…
- forced_matching_edge_common_nonneighbors_below_min_degree_is_bridgeIn a finite graph of minimum degree at least r, a perfect-matching edge belonging to every perfect matching is a bridge whenever its…
- 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.
- Arena.Reachable.transReachability is transitive.
The proof, explained
Because e = uv is an essential edge in the k-extendable graph G, there is a residual set of vertices R of size |V(G)| - 2k = 2j such that the induced subgraph H = G[R] has a perfect matching, but no perfect matching avoids e. Since G has minimum degree at least 2k + 2, removing the 2k vertices outside R leaves H with minimum degree at least 2. The low codegree condition ensures u and v have fewer than 2 common non-neighbors in H, which forces e to be a bridge in H. The disconnected components of H \ {e} partition R \ {u} into two non-empty sets A and B, and setting S = (V(G) \ R) ∪ {u} produces a vertex cut of size 2k + 1 separating A and B.
There exists a residual vertex set R of size 2j containing u and v such that uv is forced in all perfect matchings of the induced subgraph H = G[R].
Because uv is an essential edge in the k-extendable graph G, lemma k_extendable_essential_edge_has_forced_matching_residual yields a subset of vertices R ⊆ V(G) of size |V(G)| - 2k = 2j containing u and v. The induced subgraph H = G[R] has a perfect matching, but deleting uv leaves H with no perfect matching.
uses
k_extendable_essential_edge_has_forced_matching_residualclassical obtain ⟨R, hR, hu, hv, ⟨P, hP⟩, hforced⟩ := k_extendable_essential_edge_has_forced_matching_residual (2*k+2*j) k G u v huv hG hessential let VR := {a : Fin (2*k+2*j) // a ∈ ({a | a ∈ R} : Set (Fin (2*k+2*j)))} let H := G.induce {a | a ∈ R} let uH : VR := ⟨u, hu⟩ let vH : VR := ⟨v, hv⟩ have huvH : H.Adj uH vH := huv
Every vertex in H has degree at least 2.
In G, every vertex has degree at least 2k + 2 by the minimum degree assumption (minDegree_le_degree, le_trans). The vertices outside R number |V(G) \ R| = 2k (Finset.card_sdiff_of_subset, Finset.card_fin, Finset.subset_univ), so removing them subtracts at most 2k from the degree of any vertex in R (Finset.card_le_card, Finset.card_union_le). Identifying the neighbors of x in H with its neighbors in G that lie in R (Finset.card_map) yields deg_H(x) ≥ (2k + 2) - 2k = 2.
uses
le_trans,minDegree_le_degree,Finset.card_fin,Finset.card_sdiff_of_subset,Finset.subset_univ,Finset.card_le_card,Finset.card_union_le,Finset.card_maphave hdegH : ∀ x : VR, 2 ≤ H.degree x := by intro x have hdG : 2 * k + 2 ≤ G.degree x.1 := le_trans hdeg (minDegree_le_degree G x.1) have h_univ : (Finset.univ : Finset (Fin (2*k+2*j))).card = 2*k+2*j := Finset.card_fin (2*k+2*j) have h_diff_card : (Finset.univ \ R).card = 2 * k := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ R), h_univ] omega have h_sub : 2 ≤ (G.neighborFinset x.1 \ (Finset.univ \ R)).card := by have h2 : G.neighborFinset x.1 ⊆ (G.neighborFinset x.1 \ (Finset.univ \ R)) ∪ (Finset.univ \ R) := by intro y hy rw [Finset.mem_union] by_cases hyR : y ∈ R · left; simp [hy, hyR] · right; simp [hyR] have h3 := Finset.card_le_card h2 have h4 := le_trans h3 (Finset.card_union_le (G.neighborFinset x.1 \ (Finset.univ \ R)) (Finset.univ \ R)) rw [G.card_neighborFinset_eq_degree x.1, h_diff_card] at h4 omega have hdegH_card : H.degree x = (H.neighborFinset x).card := (H.card_neighborFinset_eq_degree x).symm have h_inj : (H.neighborFinset x).map ⟨Subtype.val, Subtype.val_injective⟩ = (G.neighborFinset x.1 \ (Finset.univ \ R)) := by ext y simp only [Finset.mem_map, Function.Embedding.coeFn_mk, Finset.mem_sdiff, Finset.mem_univ, true_and] constructor · rintro ⟨⟨z, hzR⟩, hzH, rfl⟩ rw [H.neighborFinset_eq_filter] at hzH simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hzH change G.Adj x.1 z at hzH rw [G.neighborFinset_eq_filter] refine ⟨by simpa using hzH, ?_⟩ simpa using hzR · intro ⟨hyG, hyR⟩ rw [G.neighborFinset_eq_filter] at hyG simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hyG have hyR' : y ∈ ({a | a ∈ R} : Set (Fin (2*k+2*j))) := by exact not_not.mp hyR refine ⟨⟨y, hyR'⟩, ?_, rfl⟩ rw [H.neighborFinset_eq_filter] simp only [Finset.mem_filter, Finset.mem_univ, true_and] exact hyG rw [hdegH_card, ← Finset.card_map ⟨Subtype.val, Subtype.val_injective⟩, h_inj] exact h_sub
There is a perfect matching of H containing the edge uv.
If the existing perfect matching P of H did not contain uv, it would remain a valid perfect matching in H \ {uv} (deleteEdges_adj), contradicting the fact that H \ {uv} has no perfect matching.
uses
deleteEdges_adjhave hPuv : ∃ P : H.Subgraph, P.IsPerfectMatching ∧ P.Adj uH vH := by by_cases hPuv : P.Adj uH vH · exact ⟨P, hP, hPuv⟩ · exfalso apply hforced let P' : (H.deleteEdges {s(uH, vH)}).Subgraph := { verts := P.verts Adj := P.Adj adj_sub := by intro x y hxy rw [deleteEdges_adj] refine ⟨P.adj_sub hxy, ?_⟩ intro he simp only [Set.mem_singleton_iff, Sym2.eq_iff] at he rcases he with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ · exact hPuv hxy · exact hPuv hxy.symm edge_vert := P.edge_vert symm := P.symm } have hP'm : P'.IsPerfectMatching := hP exact ⟨P', hP'm⟩
The endpoints u and v have strictly fewer than 2 common non-neighbors in H.
Any common non-neighbor of u and v in H is also a common non-neighbor of u and v in G (compl_adj). Because the vertex set of H embeds injectively into V(G) (Subtype.ext), the count in H cannot exceed the count in G (Set.InjOn.ncard_image, Set.ncard_coe_finset, Set.ncard_le_ncard, Set.toFinite). By hypothesis hcodeg, there is at most 1 such vertex in G, which is strictly less than 2.
uses
compl_adj,Subtype.ext,Set.InjOn.ncard_image,Set.ncard_coe_finset,Set.ncard_le_ncard,Set.toFinitehave hco : ({w | (Hᶜ).Adj uH w ∧ (Hᶜ).Adj vH w} : Set VR).ncard < 2 := by set C := {w : VR | (Hᶜ).Adj uH w ∧ (Hᶜ).Adj vH w} have hinj : Set.InjOn Subtype.val C := Subtype.val_injective.injOn have himage : Subtype.val '' C ⊆ (((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)) : Set (Fin (2*k+2*j))) := by rintro z ⟨w, hw, rfl⟩ have hw1 : (Hᶜ).Adj uH w := hw.1 have hw2 : (Hᶜ).Adj vH w := hw.2 rw [Finset.mem_coe, Finset.mem_filter] refine ⟨Finset.mem_univ w.1, ?_⟩ constructor · rw [compl_adj] at hw1 ⊢ refine ⟨fun h => hw1.1 (Subtype.ext h), ?_⟩ intro hadj exact hw1.2 hadj · rw [compl_adj] at hw2 ⊢ refine ⟨fun h => hw2.1 (Subtype.ext h), ?_⟩ intro hadj exact hw2.2 hadj have hcard : C.ncard ≤ ((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)).card := by rw [← Set.InjOn.ncard_image hinj, ← Set.ncard_coe_finset] exact Set.ncard_le_ncard himage (Set.toFinite _) change C.ncard < 2 omega
The edge uv is a bridge in H; that is, u and v are disconnected in H \ {uv}.
By forced_matching_edge_common_nonneighbors_below_min_degree_is_bridge, in a graph with minimum degree at least r, any edge forced in all perfect matchings with strictly fewer than r common non-neighbors is a bridge. Setting r = 2, u and v cannot reach each other in H \ {uv}.
uses
forced_matching_edge_common_nonneighbors_below_min_degree_is_bridgehave hbridge : ¬ (H.deleteEdges {s(uH, vH)}).Reachable uH vH := forced_matching_edge_common_nonneighbors_below_min_degree_is_bridge H 2 hdegH uH vH huvH hPuv hforced hcoThere is a vertex w ∈ R distinct from u that is reachable from u in H \ {uv}.
Since deg_H(u) ≥ 2 and v is adjacent to u (mem_neighborFinset), u must have at least one other neighbor w ≠ v in H (Finset.card_sdiff_of_subset, Finset.card_singleton). The edge uw is not deleted when removing uv (deleteEdges_adj), so w is adjacent to u in H \ {uv} and therefore reachable from u (Adj.reachable).
uses
mem_neighborFinset,Finset.card_sdiff_of_subset,Finset.card_singleton,deleteEdges_adj,Adj.reachablehave hw : ∃ w : VR, w ≠ uH ∧ (H.deleteEdges {s(uH, vH)}).Reachable uH w := by have hcard : (H.neighborFinset uH).card = H.degree uH := H.card_neighborFinset_eq_degree uH have hvmem : vH ∈ H.neighborFinset uH := by rw [mem_neighborFinset] exact huvH have hdiff : 1 ≤ ((H.neighborFinset uH) \ {vH}).card := by rw [Finset.card_sdiff_of_subset (Finset.singleton_subset_iff.mpr hvmem), Finset.card_singleton, hcard] have := hdegH uH omega have hpos : 0 < ((H.neighborFinset uH) \ {vH}).card := by omega obtain ⟨w, hw⟩ := Finset.card_pos.mp hpos rw [Finset.mem_sdiff, Finset.mem_singleton] at hw have hwadj : H.Adj uH w := by have := hw.1 rw [mem_neighborFinset] at this exact this have hne_u : w ≠ uH := hwadj.ne' have hne_v : w ≠ vH := hw.2 have hne_sym : s(uH, w) ≠ s(uH, vH) := by intro he simp only [Sym2.eq_iff] at he rcases he with ⟨-, h⟩ | ⟨-, h⟩ · exact hne_v h · exact hne_u h have hH'adj : (H.deleteEdges {s(uH, vH)}).Adj uH w := by rw [deleteEdges_adj] exact ⟨hwadj, by simpa using hne_sym⟩ exact ⟨w, hne_u, Adj.reachable hH'adj⟩
The separator S and candidate components A and B are defined, with |S| = 2k + 1, and both A and B are non-empty.
In H' = H \ {uv}, let AR be the vertices of R \ {u} reachable from u, and BR be those unreachable from u. Define A and B as their images in V(G), and set S = (V(G) \ R) ∪ {u}. Since |V(G) \ R| = 2k and u ∈ R, S has cardinality 2k + 1 (Finset.card_sdiff_of_subset, Finset.subset_univ, Finset.card_fin, Finset.card_union_of_disjoint, Finset.card_singleton). Since u and v are disconnected in H' and u ≠ v (congrArg), v lies in BR, making B non-empty; the neighbor w found in the previous step lies in AR, making A non-empty.
uses
Finset.card_sdiff_of_subset,Finset.subset_univ,Finset.card_fin,Finset.card_union_of_disjoint,Finset.card_singleton,congrArglet H' := H.deleteEdges {s(uH, vH)} let AR : Finset VR := Finset.univ.filter (fun x => x ≠ uH ∧ H'.Reachable uH x) let BR : Finset VR := Finset.univ.filter (fun x => x ≠ uH ∧ ¬ H'.Reachable uH x) let A : Finset (Fin (2*k+2*j)) := AR.map ⟨Subtype.val, Subtype.val_injective⟩ let B : Finset (Fin (2*k+2*j)) := BR.map ⟨Subtype.val, Subtype.val_injective⟩ let S0 : Finset (Fin (2*k+2*j)) := Finset.univ \ R let S : Finset (Fin (2*k+2*j)) := S0 ∪ {u} have hS0_card : S0.card = 2 * k := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ R), Finset.card_fin] omega have hu_not_S0 : u ∉ S0 := by simp [S0, hu] have hS_card : S.card = 2 * k + 1 := by rw [Finset.card_union_of_disjoint (Finset.disjoint_singleton_right.mpr hu_not_S0), hS0_card, Finset.card_singleton] have hAR_vH : vH ∈ BR := by rw [Finset.mem_filter] refine ⟨Finset.mem_univ _, ?_, hbridge⟩ intro h have : v = u := congrArg Subtype.val h exact huv.ne this.symm have hB_nonempty : B.Nonempty := by refine ⟨v, ?_⟩ rw [Finset.mem_map] exact ⟨vH, hAR_vH, rfl⟩ obtain ⟨w, hw1, hw2⟩ := hw have hAR_w : w ∈ AR := by rw [Finset.mem_filter] exact ⟨Finset.mem_univ _, hw1, hw2⟩ have hA_nonempty : A.Nonempty := by refine ⟨w.1, ?_⟩ rw [Finset.mem_map] exact ⟨w, hAR_w, rfl⟩
The sets S, A, and B are pairwise disjoint.
Both A and B are subsets of R and exclude u by construction (Subtype.ext). Since S consists of V(G) \ R together with {u}, S is disjoint from both A and B (Finset.disjoint_left). Furthermore, A and B are disjoint because no vertex can be simultaneously reachable and unreachable from u in H'.
uses
Subtype.ext,Finset.disjoint_lefthave hA_sub_R : ∀ a ∈ A, a ∈ R := by rintro a ha rw [Finset.mem_map] at ha rcases ha with ⟨x, -, rfl⟩ exact x.2 have hB_sub_R : ∀ b ∈ B, b ∈ R := by rintro b hb rw [Finset.mem_map] at hb rcases hb with ⟨x, -, rfl⟩ exact x.2 have hu_not_A : u ∉ A := by intro ha rw [Finset.mem_map] at ha rcases ha with ⟨x, hx, hxu⟩ rw [Finset.mem_filter] at hx apply hx.2.1 exact Subtype.ext hxu have hu_not_B : u ∉ B := by intro hb rw [Finset.mem_map] at hb rcases hb with ⟨x, hx, hxu⟩ rw [Finset.mem_filter] at hx apply hx.2.1 exact Subtype.ext hxu have hdisj_SA : Disjoint S A := by rw [Finset.disjoint_left] intro x hxS hxA rw [Finset.mem_union, Finset.mem_singleton] at hxS rcases hxS with hxS0 | rfl · have hxR : x ∈ R := hA_sub_R x hxA simp [S0] at hxS0 exact hxS0 hxR · exact hu_not_A hxA have hdisj_SB : Disjoint S B := by rw [Finset.disjoint_left] intro x hxS hxB rw [Finset.mem_union, Finset.mem_singleton] at hxS rcases hxS with hxS0 | rfl · have hxR : x ∈ R := hB_sub_R x hxB simp [S0] at hxS0 exact hxS0 hxR · exact hu_not_B hxB have hdisj_AB : Disjoint A B := by rw [Finset.disjoint_left] intro x hxA hxB rw [Finset.mem_map] at hxA hxB rcases hxA with ⟨a, ha, rfl⟩ rcases hxB with ⟨b, hb, heq⟩ have hab : a = b := Subtype.ext heq.symm subst hab rw [Finset.mem_filter] at ha hb exact hb.2.2 ha.2.2
The sets S, A, and B form a partition of the vertex set: S ∪ A ∪ B = V(G).
Every vertex of G either lies outside R (placing it in S), equals u (placing it in S), or belongs to R \ {u}. In the third case, it is either reachable from u in H' (placing it in A) or unreachable (placing it in B). Thus every vertex is covered (le_antisymm, Finset.subset_univ, Finset.mem_union_left, Finset.mem_union_right).
uses
le_antisymm,Finset.subset_univ,Finset.mem_union_left,Finset.mem_union_righthave h_univ : S ∪ A ∪ B = Finset.univ := by refine le_antisymm (Finset.subset_univ _) (fun x _ => ?_) by_cases hxR : x ∈ R · by_cases hxu : x = u · subst hxu apply Finset.mem_union_left apply Finset.mem_union_left apply Finset.mem_union_right simp · let xH : VR := ⟨x, hxR⟩ have hxHne : xH ≠ uH := fun h => hxu (congrArg Subtype.val h) by_cases hr : H'.Reachable uH xH · apply Finset.mem_union_left apply Finset.mem_union_right rw [Finset.mem_map] exact ⟨xH, by simp [AR, hxHne, hr], rfl⟩ · apply Finset.mem_union_right rw [Finset.mem_map] exact ⟨xH, by simp [BR, hxHne, hr], rfl⟩ · apply Finset.mem_union_left apply Finset.mem_union_left apply Finset.mem_union_left simp [S0, hxR]
There are no edges in G between A and B.
Suppose an edge existed between a ∈ A and b ∈ B. Since A, B ⊆ R, this edge is in H. Because a, b ≠ u, it is not the edge uv, so it survives in H' = H \ {uv} (deleteEdges_adj). But then a path from u to a in H' could be extended across this edge to reach b (Adj.reachable), contradicting b ∈ B.
uses
deleteEdges_adj,Adj.reachablehave h_no_adj : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b := by rintro a ha b hb hadj rw [Finset.mem_map] at ha hb rcases ha with ⟨aH, haH, rfl⟩ rcases hb with ⟨bH, hbH, rfl⟩ rw [Finset.mem_filter] at haH hbH have hHadj : H.Adj aH bH := hadj have hne : s(aH, bH) ≠ s(uH, vH) := by intro he simp only [Sym2.eq_iff] at he rcases he with ⟨h1, -⟩ | ⟨-, h2⟩ · exact haH.2.1 h1 · exact hbH.2.1 h2 have hH'adj : H'.Adj aH bH := by rw [deleteEdges_adj] exact ⟨hHadj, by simpa using hne⟩ have hr : H'.Reachable uH bH := haH.2.2.trans (Adj.reachable hH'adj) exact hbH.2.2 hr
The sets S, A, and B provide the required vertex separator of size at most 2k + 1.
Combining the constructed sets S, A, B with the established properties—cardinality |S| = 2k + 1 ≤ 2k + 1, non-emptiness of A and B, pairwise disjointness, partitioning of V(G), and absence of cross-edges—completes the proof.
refine ⟨S, A, B, ?_, hA_nonempty, hB_nonempty, hdisj_SA, hdisj_SB, hdisj_AB, h_univ, h_no_adj⟩ omega
k_extendable_essential_edge_has_forced_matching_residual- In a k-extendable graph, an essential edge uv leaves a residual vertex subset R with |R| + 2k = |V| containing u and v such that the induced subgraph G[R] has a perfect matching, but G[R] with uv deleted does not.
le_trans- Transitivity of inequality: if a ≤ b and b ≤ c, then a ≤ c.
minDegree_le_degree- The minimum degree of a graph is at most the degree of any vertex.
Finset.card_fin- The cardinality of the universal finset on Fin n equals n.
Finset.card_sdiff_of_subset- If s ⊆ t, then the cardinality of t \ s is |t| - |s|.
Finset.subset_univ- Every finset of elements of a type is a subset of the universal finset of that type.
Finset.card_le_card- If s ⊆ t, then |s| ≤ |t|.
Finset.card_union_le- The cardinality of the union of two finsets is at most the sum of their cardinalities: |s ∪ t| ≤ |s| + |t|.
Finset.card_map- Mapping a finset through an injective function preserves its cardinality: |f(s)| = |s|.
deleteEdges_adj- An edge is present in G \ s if and only if it is in G and not in s.
compl_adj- Two vertices are adjacent in the graph complement if and only if they are distinct and not adjacent in the graph.
Subtype.ext- Two elements of a subtype are equal if their underlying values are equal.
Set.InjOn.ncard_image- The cardinality of the image of a set under an injective map equals the cardinality of the original set.
Set.ncard_coe_finset- The set cardinality of a coerced finset equals the finset cardinality.
Set.ncard_le_ncard- If s ⊆ t and t is finite, then |s| ≤ |t|.
Set.toFinite- A set whose subtype is finite is finite.
forced_matching_edge_common_nonneighbors_below_min_degree_is_bridge- In a graph with minimum degree at least r, if an edge is forced in all perfect matchings and the number of common non-neighbors of its endpoints is strictly less than r, then that edge is a bridge.
mem_neighborFinset- A vertex w belongs to the neighbor finset of v if and only if v and w are adjacent.
Finset.card_singleton- The cardinality of a singleton finset {a} is 1.
Adj.reachable- Adjacent vertices are reachable from each other.
Finset.card_union_of_disjoint- The cardinality of the union of two disjoint finsets is the sum of their cardinalities.
congrArg- Functions respect equality: if x = y, then f(x) = f(y).
Finset.disjoint_left- Two finsets are disjoint if and only if no element of the first belongs to the second.
le_antisymm- Antisymmetry of partial orders: if a ≤ b and b ≤ a, then a = b.
Finset.mem_union_left- If an element belongs to s, then it belongs to s ∪ t.
Finset.mem_union_right- If an element belongs to t, then it belongs to s ∪ 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
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 k_extendable_essential_low_codegree_edge_yields_small_vertex_cut (k j : ℕ) (hj : 2 ≤ j) (G : SimpleGraph (Fin (2*k+2*j))) [DecidableRel G.Adj] (hG : is_k_extendable G k) (hdeg : 2*k+2 ≤ G.minDegree) (u v : Fin (2*k+2*j)) (huv : G.Adj u v) (hessential : ¬ is_k_extendable (G.deleteEdges {s(u,v)}) k) (hcodeg : ((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)).card ≤ 1) : ∃ S A B : Finset (Fin (2*k+2*j)), S.card ≤ 2*k+1 ∧ A.Nonempty ∧ B.Nonempty ∧ Disjoint S A ∧ Disjoint S B ∧ Disjoint A B ∧ S ∪ A ∪ B = Finset.univ ∧ ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b := open SimpleGraph in by classical obtain ⟨R, hR, hu, hv, ⟨P, hP⟩, hforced⟩ := k_extendable_essential_edge_has_forced_matching_residual (2*k+2*j) k G u v huv hG hessential let VR := {a : Fin (2*k+2*j) // a ∈ ({a | a ∈ R} : Set (Fin (2*k+2*j)))} let H := G.induce {a | a ∈ R} let uH : VR := ⟨u, hu⟩ let vH : VR := ⟨v, hv⟩ have huvH : H.Adj uH vH := huv have hdegH : ∀ x : VR, 2 ≤ H.degree x := by intro x have hdG : 2 * k + 2 ≤ G.degree x.1 := le_trans hdeg (minDegree_le_degree G x.1) have h_univ : (Finset.univ : Finset (Fin (2*k+2*j))).card = 2*k+2*j := Finset.card_fin (2*k+2*j) have h_diff_card : (Finset.univ \ R).card = 2 * k := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ R), h_univ] omega have h_sub : 2 ≤ (G.neighborFinset x.1 \ (Finset.univ \ R)).card := by have h2 : G.neighborFinset x.1 ⊆ (G.neighborFinset x.1 \ (Finset.univ \ R)) ∪ (Finset.univ \ R) := by intro y hy rw [Finset.mem_union] by_cases hyR : y ∈ R · left; simp [hy, hyR] · right; simp [hyR] have h3 := Finset.card_le_card h2 have h4 := le_trans h3 (Finset.card_union_le (G.neighborFinset x.1 \ (Finset.univ \ R)) (Finset.univ \ R)) rw [G.card_neighborFinset_eq_degree x.1, h_diff_card] at h4 omega have hdegH_card : H.degree x = (H.neighborFinset x).card := (H.card_neighborFinset_eq_degree x).symm have h_inj : (H.neighborFinset x).map ⟨Subtype.val, Subtype.val_injective⟩ = (G.neighborFinset x.1 \ (Finset.univ \ R)) := by ext y simp only [Finset.mem_map, Function.Embedding.coeFn_mk, Finset.mem_sdiff, Finset.mem_univ, true_and] constructor · rintro ⟨⟨z, hzR⟩, hzH, rfl⟩ rw [H.neighborFinset_eq_filter] at hzH simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hzH change G.Adj x.1 z at hzH rw [G.neighborFinset_eq_filter] refine ⟨by simpa using hzH, ?_⟩ simpa using hzR · intro ⟨hyG, hyR⟩ rw [G.neighborFinset_eq_filter] at hyG simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hyG have hyR' : y ∈ ({a | a ∈ R} : Set (Fin (2*k+2*j))) := by exact not_not.mp hyR refine ⟨⟨y, hyR'⟩, ?_, rfl⟩ rw [H.neighborFinset_eq_filter] simp only [Finset.mem_filter, Finset.mem_univ, true_and] exact hyG rw [hdegH_card, ← Finset.card_map ⟨Subtype.val, Subtype.val_injective⟩, h_inj] exact h_sub have hPuv : ∃ P : H.Subgraph, P.IsPerfectMatching ∧ P.Adj uH vH := by by_cases hPuv : P.Adj uH vH · exact ⟨P, hP, hPuv⟩ · exfalso apply hforced let P' : (H.deleteEdges {s(uH, vH)}).Subgraph := { verts := P.verts Adj := P.Adj adj_sub := by intro x y hxy rw [deleteEdges_adj] refine ⟨P.adj_sub hxy, ?_⟩ intro he simp only [Set.mem_singleton_iff, Sym2.eq_iff] at he rcases he with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩ · exact hPuv hxy · exact hPuv hxy.symm edge_vert := P.edge_vert symm := P.symm } have hP'm : P'.IsPerfectMatching := hP exact ⟨P', hP'm⟩ have hco : ({w | (Hᶜ).Adj uH w ∧ (Hᶜ).Adj vH w} : Set VR).ncard < 2 := by set C := {w : VR | (Hᶜ).Adj uH w ∧ (Hᶜ).Adj vH w} have hinj : Set.InjOn Subtype.val C := Subtype.val_injective.injOn have himage : Subtype.val '' C ⊆ (((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)) : Set (Fin (2*k+2*j))) := by rintro z ⟨w, hw, rfl⟩ have hw1 : (Hᶜ).Adj uH w := hw.1 have hw2 : (Hᶜ).Adj vH w := hw.2 rw [Finset.mem_coe, Finset.mem_filter] refine ⟨Finset.mem_univ w.1, ?_⟩ constructor · rw [compl_adj] at hw1 ⊢ refine ⟨fun h => hw1.1 (Subtype.ext h), ?_⟩ intro hadj exact hw1.2 hadj · rw [compl_adj] at hw2 ⊢ refine ⟨fun h => hw2.1 (Subtype.ext h), ?_⟩ intro hadj exact hw2.2 hadj have hcard : C.ncard ≤ ((Finset.univ : Finset (Fin (2*k+2*j))).filter (fun w => (Gᶜ).Adj u w ∧ (Gᶜ).Adj v w)).card := by rw [← Set.InjOn.ncard_image hinj, ← Set.ncard_coe_finset] exact Set.ncard_le_ncard himage (Set.toFinite _) change C.ncard < 2 omega have hbridge : ¬ (H.deleteEdges {s(uH, vH)}).Reachable uH vH := forced_matching_edge_common_nonneighbors_below_min_degree_is_bridge H 2 hdegH uH vH huvH hPuv hforced hco have hw : ∃ w : VR, w ≠ uH ∧ (H.deleteEdges {s(uH, vH)}).Reachable uH w := by have hcard : (H.neighborFinset uH).card = H.degree uH := H.card_neighborFinset_eq_degree uH have hvmem : vH ∈ H.neighborFinset uH := by rw [mem_neighborFinset] exact huvH have hdiff : 1 ≤ ((H.neighborFinset uH) \ {vH}).card := by rw [Finset.card_sdiff_of_subset (Finset.singleton_subset_iff.mpr hvmem), Finset.card_singleton, hcard] have := hdegH uH omega have hpos : 0 < ((H.neighborFinset uH) \ {vH}).card := by omega obtain ⟨w, hw⟩ := Finset.card_pos.mp hpos rw [Finset.mem_sdiff, Finset.mem_singleton] at hw have hwadj : H.Adj uH w := by have := hw.1 rw [mem_neighborFinset] at this exact this have hne_u : w ≠ uH := hwadj.ne' have hne_v : w ≠ vH := hw.2 have hne_sym : s(uH, w) ≠ s(uH, vH) := by intro he simp only [Sym2.eq_iff] at he rcases he with ⟨-, h⟩ | ⟨-, h⟩ · exact hne_v h · exact hne_u h have hH'adj : (H.deleteEdges {s(uH, vH)}).Adj uH w := by rw [deleteEdges_adj] exact ⟨hwadj, by simpa using hne_sym⟩ exact ⟨w, hne_u, Adj.reachable hH'adj⟩ let H' := H.deleteEdges {s(uH, vH)} let AR : Finset VR := Finset.univ.filter (fun x => x ≠ uH ∧ H'.Reachable uH x) let BR : Finset VR := Finset.univ.filter (fun x => x ≠ uH ∧ ¬ H'.Reachable uH x) let A : Finset (Fin (2*k+2*j)) := AR.map ⟨Subtype.val, Subtype.val_injective⟩ let B : Finset (Fin (2*k+2*j)) := BR.map ⟨Subtype.val, Subtype.val_injective⟩ let S0 : Finset (Fin (2*k+2*j)) := Finset.univ \ R let S : Finset (Fin (2*k+2*j)) := S0 ∪ {u} have hS0_card : S0.card = 2 * k := by rw [Finset.card_sdiff_of_subset (Finset.subset_univ R), Finset.card_fin] omega have hu_not_S0 : u ∉ S0 := by simp [S0, hu] have hS_card : S.card = 2 * k + 1 := by rw [Finset.card_union_of_disjoint (Finset.disjoint_singleton_right.mpr hu_not_S0), hS0_card, Finset.card_singleton] have hAR_vH : vH ∈ BR := by rw [Finset.mem_filter] refine ⟨Finset.mem_univ _, ?_, hbridge⟩ intro h have : v = u := congrArg Subtype.val h exact huv.ne this.symm have hB_nonempty : B.Nonempty := by refine ⟨v, ?_⟩ rw [Finset.mem_map] exact ⟨vH, hAR_vH, rfl⟩ obtain ⟨w, hw1, hw2⟩ := hw have hAR_w : w ∈ AR := by rw [Finset.mem_filter] exact ⟨Finset.mem_univ _, hw1, hw2⟩ have hA_nonempty : A.Nonempty := by refine ⟨w.1, ?_⟩ rw [Finset.mem_map] exact ⟨w, hAR_w, rfl⟩ have hA_sub_R : ∀ a ∈ A, a ∈ R := by rintro a ha rw [Finset.mem_map] at ha rcases ha with ⟨x, -, rfl⟩ exact x.2 have hB_sub_R : ∀ b ∈ B, b ∈ R := by rintro b hb rw [Finset.mem_map] at hb rcases hb with ⟨x, -, rfl⟩ exact x.2 have hu_not_A : u ∉ A := by intro ha rw [Finset.mem_map] at ha rcases ha with ⟨x, hx, hxu⟩ rw [Finset.mem_filter] at hx apply hx.2.1 exact Subtype.ext hxu have hu_not_B : u ∉ B := by intro hb rw [Finset.mem_map] at hb rcases hb with ⟨x, hx, hxu⟩ rw [Finset.mem_filter] at hx apply hx.2.1 exact Subtype.ext hxu have hdisj_SA : Disjoint S A := by rw [Finset.disjoint_left] intro x hxS hxA rw [Finset.mem_union, Finset.mem_singleton] at hxS rcases hxS with hxS0 | rfl · have hxR : x ∈ R := hA_sub_R x hxA simp [S0] at hxS0 exact hxS0 hxR · exact hu_not_A hxA have hdisj_SB : Disjoint S B := by rw [Finset.disjoint_left] intro x hxS hxB rw [Finset.mem_union, Finset.mem_singleton] at hxS rcases hxS with hxS0 | rfl · have hxR : x ∈ R := hB_sub_R x hxB simp [S0] at hxS0 exact hxS0 hxR · exact hu_not_B hxB have hdisj_AB : Disjoint A B := by rw [Finset.disjoint_left] intro x hxA hxB rw [Finset.mem_map] at hxA hxB rcases hxA with ⟨a, ha, rfl⟩ rcases hxB with ⟨b, hb, heq⟩ have hab : a = b := Subtype.ext heq.symm subst hab rw [Finset.mem_filter] at ha hb exact hb.2.2 ha.2.2 have h_univ : S ∪ A ∪ B = Finset.univ := by refine le_antisymm (Finset.subset_univ _) (fun x _ => ?_) by_cases hxR : x ∈ R · by_cases hxu : x = u · subst hxu apply Finset.mem_union_left apply Finset.mem_union_left apply Finset.mem_union_right simp · let xH : VR := ⟨x, hxR⟩ have hxHne : xH ≠ uH := fun h => hxu (congrArg Subtype.val h) by_cases hr : H'.Reachable uH xH · apply Finset.mem_union_left apply Finset.mem_union_right rw [Finset.mem_map] exact ⟨xH, by simp [AR, hxHne, hr], rfl⟩ · apply Finset.mem_union_right rw [Finset.mem_map] exact ⟨xH, by simp [BR, hxHne, hr], rfl⟩ · apply Finset.mem_union_left apply Finset.mem_union_left apply Finset.mem_union_left simp [S0, hxR] have h_no_adj : ∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b := by rintro a ha b hb hadj rw [Finset.mem_map] at ha hb rcases ha with ⟨aH, haH, rfl⟩ rcases hb with ⟨bH, hbH, rfl⟩ rw [Finset.mem_filter] at haH hbH have hHadj : H.Adj aH bH := hadj have hne : s(aH, bH) ≠ s(uH, vH) := by intro he simp only [Sym2.eq_iff] at he rcases he with ⟨h1, -⟩ | ⟨-, h2⟩ · exact haH.2.1 h1 · exact hbH.2.1 h2 have hH'adj : H'.Adj aH bH := by rw [deleteEdges_adj] exact ⟨hHadj, by simpa using hne⟩ have hr : H'.Reachable uH bH := haH.2.2.trans (Adj.reachable hH'adj) exact hbH.2.2 hr refine ⟨S, A, B, ?_, hA_nonempty, hB_nonempty, hdisj_SA, hdisj_SB, hdisj_AB, h_univ, h_no_adj⟩ omega