dense_four_block_grouped_matching_barrier_impossible
The displayed grouped odd-component barrier is incompatible with the four-block degree and separator counts.
Statement
theorem dense_four_block_grouped_matching_barrier_impossible
(k : ℕ) (hk : 7 ≤ k)
(G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
(A B C D U D₀ S : 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)
(hA : A.card=5) (hB : B.card=2*k-5) (hC : 7 ≤ C.card)
(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)
(hUB : U ⊆ B) (hUD : D₀ ⊆ D) (hUcard : U.card ≤ k-4) (hsmall : U.card+D₀.card ≤ k)
(hSZ : Disjoint S (U ∪ (A ∪ D₀)))
(hslo : 2*k ≤ S.card+U.card+D₀.card+5)
(q : ℕ) (F : Fin q → Finset (Fin (4*k)))
(hodd : ∀ i, Odd (F i).card)
(hFdis : ∀ i j, i ≠ j → Disjoint (F i) (F j))
(hFS : ∀ i, Disjoint (F i) S)
(hFZ : ∀ i, Disjoint (F i) (U ∪ (A ∪ D₀)))
(hcover : ((Finset.univ : Finset (Fin q)).biUnion F) ∪ S ∪ (U ∪ (A ∪ D₀)) = Finset.univ)
(hclosed : ∀ i v, v ∈ F i → ∀ w, G.Adj v w →
w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ (A ∪ D₀))
(hq : 2*k+S.card ≤ q+U.card+D₀.card+3) : False- Source
- OP-1957; graph-to-count transfer for the deleted-four-block matching obstruction.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- group_vertex_degree_budgetA vertex whose neighbors lie in its group, separator or outside pool has the displayed degree budget.
- dense_four_block_matching_barrier_arithmeticThe displayed odd group sizes and separator inequalities are incompatible with both the small- and large-separator degree alternatives.
The proof, explained
The proof derives a contradiction from the assumed existence of a grouped Tutte-Berge odd component barrier in a 4-block dense graph. Using the degree budget of vertices and the non-edge structure between blocks A and B and between C and D, every component that intersects (B \ U) ∪ C is shown to have size at least 3. A large subset T ⊆ (B \ U) ∪ C of cardinality at least 7 is proven to be completely contained in the odd components, forcing the sum of sizes of components of size at least 3 to be at least 7. This lower bound, together with parity and separator constraints, contradicts an arithmetic classification lemma for 4-block matching barriers.
Define Z = U ∪ (A ∪ D₀) and compute its cardinality as |Z| = |U| + |D₀| + 5.
We set Z = U ∪ (A ∪ D₀). Because U ⊆ B, A, and D₀ ⊆ D are subsets of the mutually disjoint blocks B, A, and D, they are pairwise disjoint: U ∩ A = ∅, U ∩ D₀ = ∅, and A ∩ D₀ = ∅. Since |A| = 5, the cardinality of their disjoint union is |Z| = |U| + |D₀| + 5.
uses
Finset.disjoint_of_subset_left,Finset.disjoint_of_subset_right,Finset.card_union_of_disjoint,Finset.disjoint_union_right.mprclassical let Z := U ∪ (A ∪ D₀) let H := (Finset.univ : Finset (Fin q)).biUnion F have hUA : Disjoint U A := Finset.disjoint_of_subset_left hUB hAB.symm have hUDdis : Disjoint U D₀ := Finset.disjoint_of_subset_left hUB (Finset.disjoint_of_subset_right hUD hBD) have hADdis : Disjoint A D₀ := Finset.disjoint_of_subset_right hUD hAD have hZcard : Z.card = U.card+D₀.card+5 := by dsimp [Z] rw [Finset.card_union_of_disjoint (Finset.disjoint_union_right.mpr ⟨hUA,hUDdis⟩), Finset.card_union_of_disjoint hADdis,hA] omega
The total number of vertices partitions as ∑_{i=0}^{q-1} |F_i| + |S| + |U| + |D₀| + 5 = 4k.
Let H = ⋃_{i=0}^{q-1} F_i. Each component F_i is disjoint from S and from Z, which implies that H is disjoint from both S and Z, so H, S, and Z are mutually disjoint. Since H ∪ S ∪ Z covers all 4k vertices of the graph, and the components F_i are pairwise disjoint, taking cardinalities yields ∑_{i} |F_i| + |S| + |Z| = 4k. Substituting |Z| = |U| + |D₀| + 5 yields the partition equation.
uses
Finset.disjoint_left.mpr,Finset.mem_biUnion.mp,Finset.disjoint_left.mp,Finset.disjoint_union_left.mpr,congrArg,Finset.card_union_of_disjoint,Finset.card_biUnion,Finset.card_univ,Fintype.card_finhave hHS : Disjoint H S := by apply Finset.disjoint_left.mpr intro v hv hs obtain ⟨i,_,hvi⟩ := Finset.mem_biUnion.mp hv exact Finset.disjoint_left.mp (hFS i) hvi hs have hHZ : Disjoint H Z := by apply Finset.disjoint_left.mpr intro v hv hz obtain ⟨i,_,hvi⟩ := Finset.mem_biUnion.mp hv exact Finset.disjoint_left.mp (hFZ i) hvi hz have hHScard : Disjoint (H ∪ S) Z := Finset.disjoint_union_left.mpr ⟨hHZ,hSZ⟩ have htotal : (∑ i : Fin q, (F i).card) + S.card+U.card+D₀.card+5 = 4*k := by have hp : ((Finset.univ : Finset (Fin q)) : Set (Fin q)).PairwiseDisjoint F := by intro i _ j _ hij exact hFdis i j hij have hh := congrArg Finset.card hcover rw [Finset.card_union_of_disjoint hHScard,Finset.card_union_of_disjoint hHS, Finset.card_biUnion hp] at hh simp only [Finset.card_univ,Fintype.card_fin] at hh rw [hZcard] at hh omega
Each component has size at least 1, the number of components satisfies q ≤ ∑ |F_i|, and |S| ≤ k - 1. automation
Because each component F_i has odd cardinality, |F_i| ≥ 1. Summing over all q components yields q ≤ ∑_{i} |F_i|. Combining this inequality with the barrier bound 2k + |S| ≤ q + |U| + |D₀| + 3 and the partition sum ∑ |F_i| + |S| + |U| + |D₀| + 5 = 4k eliminates q and the component sizes to give 2k + 2|S| + 5 ≤ 4k + 3, which forces |S| ≤ k - 1 by linear arithmetic.
uses
Finset.sum_le_sumhave hFpos : ∀ i, 1 ≤ (F i).card := by intro i obtain ⟨t,ht⟩ := hodd i omega have hqle : q ≤ ∑ i : Fin q, (F i).card := by have hh := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin q))) (fun i _ => hFpos i) simpa using hh have hshi : S.card ≤ k-1 := by omega
Every vertex v in a component satisfies deg(v) + 1 ≤ |F_i| + |S| + |Z|; hence, if |S| ≤ k - 4, then no component is a singleton (|F_i| ≥ 2 for all i).
Since all neighbors of v ∈ F_i lie in F_i ∪ S ∪ Z, the degree budget lemma group_vertex_degree_budget gives deg(v) + 1 ≤ |F_i| + |S| + |Z|. If |S| ≤ k - 4, choosing any vertex v in F_i (which is nonempty since |F_i| ≥ 1) and applying the minimum degree hypothesis deg(v) ≥ 2k + 2 together with |Z| = |U| + |D₀| + 5 ≤ k + 5 forces |F_i| ≥ 2 by linear arithmetic.
uses
group_vertex_degree_budget,Finset.card_pos.mphave hgroupdegree (i : Fin q) (v : Fin (4*k)) (hv : v ∈ F i) : (G.neighborFinset v).card + 1 ≤ (F i).card + S.card + Z.card := group_vertex_degree_budget G (F i) S Z v hv (hclosed i v hv) have hnosingle : S.card ≤ k-4 → ∀ i, 2 ≤ (F i).card := by intro hs i have hfpos : 0 < (F i).card := by have hi := hFpos i; omega obtain ⟨v,hv⟩ := Finset.card_pos.mp hfpos have hh := hgroupdegree i v hv have hd := hdegree v omega
The set T = ((B \ U) ∪ C) \ S has cardinality at least 7.
Since B \ U ⊆ B and B, C are disjoint, B \ U and C are disjoint. With U ⊆ B and |B| = 2k - 5, we have |B \ U| = 2k - 5 - |U|. The union (B \ U) ∪ C therefore has size (2k - 5 - |U|) + |C|. Removing S leaves at least ((B \ U) ∪ C).card - |S| vertices. Using |C| ≥ 7, |S| ≤ k - 1, and |U| ≤ k - 4, linear arithmetic shows |T| ≥ 7.
uses
Finset.sdiff_subset,Finset.disjoint_of_subset_left,Finset.card_sdiff_of_subset,Finset.card_sdiff_add_card_inter,Finset.card_le_card,Finset.inter_subset_right,Finset.card_union_of_disjointlet T : Finset (Fin (4*k)) := ((B \ U) ∪ C) \ S have hBUs : B \ U ⊆ B := Finset.sdiff_subset have hBUC : Disjoint (B \ U) C := Finset.disjoint_of_subset_left hBUs hBC have hBUcard : (B \ U).card+U.card = 2*k-5 := by rw [Finset.card_sdiff_of_subset hUB,hB] omega have hTlow : 7 ≤ T.card := by have hh := Finset.card_sdiff_add_card_inter ((B \ U) ∪ C) S have hi : (((B \ U) ∪ C) ∩ S).card ≤ S.card := Finset.card_le_card Finset.inter_subset_right have hu : ((B \ U) ∪ C).card = (B \ U).card+C.card := Finset.card_union_of_disjoint hBUC dsimp [T] omega
The set T is disjoint from Z, so T ⊆ H.
Elements of T belong to (B \ U) ∪ C and are disjoint from S. A vertex in B \ U is not in U, not in A (since A ∩ B = ∅), and not in D₀ ⊆ D (since B ∩ D = ∅). A vertex in C is not in U ⊆ B, not in A, and not in D₀ ⊆ D (since C is disjoint from B, A, D). Thus T is disjoint from Z = U ∪ A ∪ D₀. Since the entire vertex set is covered by H ∪ S ∪ Z and T is disjoint from both S and Z, T must be a subset of H = ⋃ F_i.
uses
Finset.disjoint_left.mpr,Finset.mem_sdiff.mp,Finset.mem_union.mp,Finset.disjoint_left.mp,False.elimhave hTZ : Disjoint T Z := by apply Finset.disjoint_left.mpr intro v hv hz have hv' := (Finset.mem_sdiff.mp hv).1 rcases Finset.mem_union.mp hv' with hb | hc · have hbB := (Finset.mem_sdiff.mp hb).1 have hbU := (Finset.mem_sdiff.mp hb).2 rcases Finset.mem_union.mp hz with hu | hz · exact hbU hu · rcases Finset.mem_union.mp hz with ha | hd · exact Finset.disjoint_left.mp hAB ha hbB · exact Finset.disjoint_left.mp hBD hbB (hUD hd) · rcases Finset.mem_union.mp hz with hu | hz · exact Finset.disjoint_left.mp hBC (hUB hu) hc · rcases Finset.mem_union.mp hz with ha | hd · exact Finset.disjoint_left.mp hAC ha hc · exact Finset.disjoint_left.mp hCD hc (hUD hd) have hTinH : T ⊆ H := by intro v hv have hvall : v ∈ H ∪ S ∪ Z := by rw [hcover]; simp rcases Finset.mem_union.mp hvall with hvHS | hvZ · rcases Finset.mem_union.mp hvHS with hvH | hvS · exact hvH · exact False.elim ((Finset.mem_sdiff.mp hv).2 hvS) · exact False.elim (Finset.disjoint_left.mp hTZ hv hvZ)
Any component F_i that contains a vertex of (B \ U) ∪ C has size at least 3.
Let v ∈ F_i ∩ ((B \ U) ∪ C). If v ∈ B \ U, then v ∈ B has no neighbors in A, so its neighbors lie in F_i ∪ S ∪ (U ∪ D₀). Applying group_vertex_degree_budget with |U ∪ D₀| = |U| + |D₀| gives deg(v) + 1 ≤ |F_i| + |S| + |U| + |D₀|. Using deg(v) ≥ 2k + 2, |S| ≤ k - 1, and |U| + |D₀| ≤ k, linear arithmetic forces |F_i| ≥ 3. If instead v ∈ C, then v has no neighbors in D, so none in D₀ ⊆ D; its neighbors lie in F_i ∪ S ∪ (U ∪ A). The degree budget with |U ∪ A| = |U| + 5 gives deg(v) + 1 ≤ |F_i| + |S| + |U| + 5. Using |U| ≤ k - 4 and |S| ≤ k - 1, arithmetic again implies |F_i| ≥ 3.
uses
Finset.card_union_of_disjoint,Finset.mem_union.mp,Finset.mem_sdiff.mp,Or.inl,Or.inr,Finset.mem_union_left,Finset.mem_union_right,False.elim,group_vertex_degree_budgethave hUDis : Disjoint U D₀ := hUDdis have hUAcard : (U ∪ A).card = U.card+5 := by rw [Finset.card_union_of_disjoint hUA,hA] have hUDcard : (U ∪ D₀).card = U.card+D₀.card := by rw [Finset.card_union_of_disjoint hUDis] have hlargegroup : ∀ i, ∀ v ∈ F i, v ∈ (B \ U) ∪ C → 3 ≤ (F i).card := by intro i v hv hvBC have hvcover := hclosed i v hv rcases Finset.mem_union.mp hvBC with hvB | hvC · have hvB' := (Finset.mem_sdiff.mp hvB).1 have hallowed : ∀ w, G.Adj v w → w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ D₀ := by intro w hadj rcases hvcover w hadj with hf | hs | hz · exact Or.inl hf · exact Or.inr (Or.inl hs) · rcases Finset.mem_union.mp hz with hu | hz · exact Or.inr (Or.inr (Finset.mem_union_left _ hu)) · rcases Finset.mem_union.mp hz with ha | hd · exact False.elim (hnoAB w ha v hvB' hadj.symm) · exact Or.inr (Or.inr (Finset.mem_union_right _ hd)) have hh := group_vertex_degree_budget G (F i) S (U ∪ D₀) v hv hallowed have hd := hdegree v omega · have hallowed : ∀ w, G.Adj v w → w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ A := by intro w hadj rcases hvcover w hadj with hf | hs | hz · exact Or.inl hf · exact Or.inr (Or.inl hs) · rcases Finset.mem_union.mp hz with hu | hz · exact Or.inr (Or.inr (Finset.mem_union_left _ hu)) · rcases Finset.mem_union.mp hz with ha | hd · exact Or.inr (Or.inr (Finset.mem_union_right _ ha)) · exact False.elim (hnoCD v hvC w (hUD hd) hadj) have hh := group_vertex_degree_budget G (F i) S (U ∪ A) v hv hallowed have hd := hdegree v omega
The components of size at least 3 sum to at least 7, contradicting the arithmetic barrier lemma.
Let J be the set of indices i with |F_i| ≥ 3. Since T ⊆ H and T ⊆ (B \ U) ∪ C, every vertex of T belongs to a component of size at least 3, so T ⊆ ⋃_{i ∈ J} F_i. Hence 7 ≤ |T| ≤ ∑_{i ∈ J} |F_i| = ∑_{i} (if 3 ≤ |F_i| then |F_i| else 0). We then apply dense_four_block_matching_barrier_arithmetic with k, |U|, |D₀|, |S|, q and component sizes |F_i|. All required hypotheses (the degree bounds, component parity, total vertex sum 4k, absence of singletons when |S| ≤ k - 4, and the lower bound of 7 on components of size at least 3 when |S| ≥ k - 3) hold, producing False.
uses
Finset.mem_biUnion.mp,Finset.mem_sdiff.mp,Finset.mem_biUnion.mpr,Finset.mem_filter.mpr,Finset.card_le_card,Finset.card_biUnion_le,Finset.sum_filter,dense_four_block_matching_barrier_arithmeticlet J : Finset (Fin q) := Finset.univ.filter (fun i => 3 ≤ (F i).card) have hTJ : T ⊆ J.biUnion F := by intro v hv obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp (hTinH hv) have hlarge := hlargegroup i v hvi (Finset.mem_sdiff.mp hv).1 exact Finset.mem_biUnion.mpr ⟨i,Finset.mem_filter.mpr ⟨hi,hlarge⟩,hvi⟩ have hsum : T.card ≤ ∑ i : Fin q, if 3 ≤ (F i).card then (F i).card else 0 := by have hh := (Finset.card_le_card hTJ).trans (Finset.card_biUnion_le) simpa [J,Finset.sum_filter] using hh apply dense_four_block_matching_barrier_arithmetic k U.card D₀.card S.card q (fun i => (F i).card) hk hUcard hsmall hslo hshi hq hodd htotal hnosingle intro _ omega
Finset.disjoint_of_subset_left- If s ⊆ u and u and t are disjoint, then s and t are disjoint.
Finset.disjoint_of_subset_right- If t ⊆ u and s and u are disjoint, then s and t are disjoint.
Finset.card_union_of_disjoint- The cardinality of the union of two disjoint finite sets is the sum of their cardinalities.
Finset.disjoint_union_right.mpr- If s is disjoint from t and from u, then s is disjoint from t ∪ u.
Finset.disjoint_left.mpr- If no element of s belongs to t, then s and t are disjoint.
Finset.mem_biUnion.mp- If an element belongs to a union of sets over an index set, then it belongs to at least one set in the family.
Finset.disjoint_left.mp- If s and t are disjoint and an element belongs to s, then it does not belong to t.
Finset.disjoint_union_left.mpr- If s and t are both disjoint from u, then s ∪ t is disjoint from u.
congrArg- Equality is preserved under function application: if x = y, then f(x) = f(y).
Finset.card_biUnion- The cardinality of a disjoint union of finite sets is the sum of their cardinalities.
Finset.card_univ- The cardinality of the universal finset of a finite type is the cardinality of the type.
Fintype.card_fin- The cardinality of Fin n is n.
Finset.sum_le_sum- If f(i) ≤ g(i) for all i in a finite set, then the sum of f over the set is at most the sum of g.
group_vertex_degree_budget- If all neighbors of a vertex v in F belong to F ∪ S ∪ T, then deg(v) + 1 ≤ |F| + |S| + |T|.
Finset.card_pos.mp- A finite set with strictly positive cardinality is nonempty.
Finset.sdiff_subset- The set difference s \ t is a subset of s.
Finset.card_sdiff_of_subset- If s ⊆ t, then |t \ s| = |t| - |s|.
Finset.card_sdiff_add_card_inter- For any finite sets s and t, |s \ t| + |s ∩ t| = |s|.
Finset.card_le_card- If s ⊆ t, then |s| ≤ |t|.
Finset.inter_subset_right- The intersection s₁ ∩ s₂ is a subset of s₂.
Finset.mem_sdiff.mp- If x ∈ s \ t, then x ∈ s and x ∉ t.
Finset.mem_union.mp- If x ∈ s ∪ t, then x ∈ s or x ∈ t.
False.elim- From a contradiction (False), any conclusion follows.
Or.inl- Infers A ∨ B from a proof of A.
Or.inr- Infers A ∨ B from a proof of 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.
Finset.mem_biUnion.mpr- If an element belongs to some set t(a) for a ∈ s, then it belongs to the union of the family over s.
Finset.mem_filter.mpr- If an element belongs to s and satisfies property p, then it belongs to the filtered subset.
Finset.card_biUnion_le- The cardinality of a union of finite sets is bounded by the sum of their cardinalities.
Finset.sum_filter- The sum of f over a filtered subset equals the sum over the whole set with an if-then-else indicator.
dense_four_block_matching_barrier_arithmetic- The parameters k, u, d, s, q and odd component sizes satisfying the degree, partition, and barrier bounds cannot simultaneously satisfy the lower bound ∑_{n_i ≥ 3} n_i ≥ 7 when s ≥ k - 3.
- Step 3 uses linear arithmetic automation (omega) to derive |S| ≤ k - 1 from the barrier inequality and the partition sum.
- The final contradiction in Step 8 is outsourced to the arithmetic lemma dense_four_block_matching_barrier_arithmetic.
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.
set_option maxHeartbeats 2000000theorem dense_four_block_grouped_matching_barrier_impossible (k : ℕ) (hk : 7 ≤ k) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj] (A B C D U D₀ S : 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) (hA : A.card=5) (hB : B.card=2*k-5) (hC : 7 ≤ C.card) (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) (hUB : U ⊆ B) (hUD : D₀ ⊆ D) (hUcard : U.card ≤ k-4) (hsmall : U.card+D₀.card ≤ k) (hSZ : Disjoint S (U ∪ (A ∪ D₀))) (hslo : 2*k ≤ S.card+U.card+D₀.card+5) (q : ℕ) (F : Fin q → Finset (Fin (4*k))) (hodd : ∀ i, Odd (F i).card) (hFdis : ∀ i j, i ≠ j → Disjoint (F i) (F j)) (hFS : ∀ i, Disjoint (F i) S) (hFZ : ∀ i, Disjoint (F i) (U ∪ (A ∪ D₀))) (hcover : ((Finset.univ : Finset (Fin q)).biUnion F) ∪ S ∪ (U ∪ (A ∪ D₀)) = Finset.univ) (hclosed : ∀ i v, v ∈ F i → ∀ w, G.Adj v w → w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ (A ∪ D₀)) (hq : 2*k+S.card ≤ q+U.card+D₀.card+3) : False := by classical let Z := U ∪ (A ∪ D₀) let H := (Finset.univ : Finset (Fin q)).biUnion F have hUA : Disjoint U A := Finset.disjoint_of_subset_left hUB hAB.symm have hUDdis : Disjoint U D₀ := Finset.disjoint_of_subset_left hUB (Finset.disjoint_of_subset_right hUD hBD) have hADdis : Disjoint A D₀ := Finset.disjoint_of_subset_right hUD hAD have hZcard : Z.card = U.card+D₀.card+5 := by dsimp [Z] rw [Finset.card_union_of_disjoint (Finset.disjoint_union_right.mpr ⟨hUA,hUDdis⟩), Finset.card_union_of_disjoint hADdis,hA] omega have hHS : Disjoint H S := by apply Finset.disjoint_left.mpr intro v hv hs obtain ⟨i,_,hvi⟩ := Finset.mem_biUnion.mp hv exact Finset.disjoint_left.mp (hFS i) hvi hs have hHZ : Disjoint H Z := by apply Finset.disjoint_left.mpr intro v hv hz obtain ⟨i,_,hvi⟩ := Finset.mem_biUnion.mp hv exact Finset.disjoint_left.mp (hFZ i) hvi hz have hHScard : Disjoint (H ∪ S) Z := Finset.disjoint_union_left.mpr ⟨hHZ,hSZ⟩ have htotal : (∑ i : Fin q, (F i).card) + S.card+U.card+D₀.card+5 = 4*k := by have hp : ((Finset.univ : Finset (Fin q)) : Set (Fin q)).PairwiseDisjoint F := by intro i _ j _ hij exact hFdis i j hij have hh := congrArg Finset.card hcover rw [Finset.card_union_of_disjoint hHScard,Finset.card_union_of_disjoint hHS, Finset.card_biUnion hp] at hh simp only [Finset.card_univ,Fintype.card_fin] at hh rw [hZcard] at hh omega have hFpos : ∀ i, 1 ≤ (F i).card := by intro i obtain ⟨t,ht⟩ := hodd i omega have hqle : q ≤ ∑ i : Fin q, (F i).card := by have hh := Finset.sum_le_sum (s := (Finset.univ : Finset (Fin q))) (fun i _ => hFpos i) simpa using hh have hshi : S.card ≤ k-1 := by omega have hgroupdegree (i : Fin q) (v : Fin (4*k)) (hv : v ∈ F i) : (G.neighborFinset v).card + 1 ≤ (F i).card + S.card + Z.card := group_vertex_degree_budget G (F i) S Z v hv (hclosed i v hv) have hnosingle : S.card ≤ k-4 → ∀ i, 2 ≤ (F i).card := by intro hs i have hfpos : 0 < (F i).card := by have hi := hFpos i; omega obtain ⟨v,hv⟩ := Finset.card_pos.mp hfpos have hh := hgroupdegree i v hv have hd := hdegree v omega let T : Finset (Fin (4*k)) := ((B \ U) ∪ C) \ S have hBUs : B \ U ⊆ B := Finset.sdiff_subset have hBUC : Disjoint (B \ U) C := Finset.disjoint_of_subset_left hBUs hBC have hBUcard : (B \ U).card+U.card = 2*k-5 := by rw [Finset.card_sdiff_of_subset hUB,hB] omega have hTlow : 7 ≤ T.card := by have hh := Finset.card_sdiff_add_card_inter ((B \ U) ∪ C) S have hi : (((B \ U) ∪ C) ∩ S).card ≤ S.card := Finset.card_le_card Finset.inter_subset_right have hu : ((B \ U) ∪ C).card = (B \ U).card+C.card := Finset.card_union_of_disjoint hBUC dsimp [T] omega have hTZ : Disjoint T Z := by apply Finset.disjoint_left.mpr intro v hv hz have hv' := (Finset.mem_sdiff.mp hv).1 rcases Finset.mem_union.mp hv' with hb | hc · have hbB := (Finset.mem_sdiff.mp hb).1 have hbU := (Finset.mem_sdiff.mp hb).2 rcases Finset.mem_union.mp hz with hu | hz · exact hbU hu · rcases Finset.mem_union.mp hz with ha | hd · exact Finset.disjoint_left.mp hAB ha hbB · exact Finset.disjoint_left.mp hBD hbB (hUD hd) · rcases Finset.mem_union.mp hz with hu | hz · exact Finset.disjoint_left.mp hBC (hUB hu) hc · rcases Finset.mem_union.mp hz with ha | hd · exact Finset.disjoint_left.mp hAC ha hc · exact Finset.disjoint_left.mp hCD hc (hUD hd) have hTinH : T ⊆ H := by intro v hv have hvall : v ∈ H ∪ S ∪ Z := by rw [hcover]; simp rcases Finset.mem_union.mp hvall with hvHS | hvZ · rcases Finset.mem_union.mp hvHS with hvH | hvS · exact hvH · exact False.elim ((Finset.mem_sdiff.mp hv).2 hvS) · exact False.elim (Finset.disjoint_left.mp hTZ hv hvZ) have hUDis : Disjoint U D₀ := hUDdis have hUAcard : (U ∪ A).card = U.card+5 := by rw [Finset.card_union_of_disjoint hUA,hA] have hUDcard : (U ∪ D₀).card = U.card+D₀.card := by rw [Finset.card_union_of_disjoint hUDis] have hlargegroup : ∀ i, ∀ v ∈ F i, v ∈ (B \ U) ∪ C → 3 ≤ (F i).card := by intro i v hv hvBC have hvcover := hclosed i v hv rcases Finset.mem_union.mp hvBC with hvB | hvC · have hvB' := (Finset.mem_sdiff.mp hvB).1 have hallowed : ∀ w, G.Adj v w → w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ D₀ := by intro w hadj rcases hvcover w hadj with hf | hs | hz · exact Or.inl hf · exact Or.inr (Or.inl hs) · rcases Finset.mem_union.mp hz with hu | hz · exact Or.inr (Or.inr (Finset.mem_union_left _ hu)) · rcases Finset.mem_union.mp hz with ha | hd · exact False.elim (hnoAB w ha v hvB' hadj.symm) · exact Or.inr (Or.inr (Finset.mem_union_right _ hd)) have hh := group_vertex_degree_budget G (F i) S (U ∪ D₀) v hv hallowed have hd := hdegree v omega · have hallowed : ∀ w, G.Adj v w → w ∈ F i ∨ w ∈ S ∨ w ∈ U ∪ A := by intro w hadj rcases hvcover w hadj with hf | hs | hz · exact Or.inl hf · exact Or.inr (Or.inl hs) · rcases Finset.mem_union.mp hz with hu | hz · exact Or.inr (Or.inr (Finset.mem_union_left _ hu)) · rcases Finset.mem_union.mp hz with ha | hd · exact Or.inr (Or.inr (Finset.mem_union_right _ ha)) · exact False.elim (hnoCD v hvC w (hUD hd) hadj) have hh := group_vertex_degree_budget G (F i) S (U ∪ A) v hv hallowed have hd := hdegree v omega let J : Finset (Fin q) := Finset.univ.filter (fun i => 3 ≤ (F i).card) have hTJ : T ⊆ J.biUnion F := by intro v hv obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp (hTinH hv) have hlarge := hlargegroup i v hvi (Finset.mem_sdiff.mp hv).1 exact Finset.mem_biUnion.mpr ⟨i,Finset.mem_filter.mpr ⟨hi,hlarge⟩,hvi⟩ have hsum : T.card ≤ ∑ i : Fin q, if 3 ≤ (F i).card then (F i).card else 0 := by have hh := (Finset.card_le_card hTJ).trans (Finset.card_biUnion_le) simpa [J,Finset.sum_filter] using hh apply dense_four_block_matching_barrier_arithmetic k U.card D₀.card S.card q (fun i => (F i).card) hk hUcard hsmall hslo hshi hq hodd htotal hnosingle intro _ omega