even_linked_double_star_flexible_core
Let p≥1, 1≤s≤n, s≤m+1, and let a finite host have at least max(2n+2p−1,n+2m+3p−1) vertices. In a set C of n+m+2p−s vertices suppose at least n+max(p,2s−1) distinct vertices can each be the first endpoint of a red copy of the tree with left arm shortened from n to n−s, right arm m and the same spine, wholly inside C. Then red or blue contains the original tree.
Statement
theorem even_linked_double_star_flexible_core {V : Type*} [Fintype V] (G : SimpleGraph V) (p n m s : ℕ) (hp : 0<p) (hs : 1 ≤ s) (hsn : s ≤ n) (hsm : s ≤ m+1) (hN : max (2*n+2*p-1) (n+2*m+3*p-1) ≤ Fintype.card V) (C X : Finset V) (hC : C.card = n+m+2*p-s) (hXC : X ⊆ C) (hx : n+max p (2*s-1) ≤ X.card) (hroot : ∀ x ∈ X, ∃ f : (even_linked_double_star p (n-s) m).Copy G, (∀ v, f v ∈ C) ∧ f (.inl ⟨0,by omega⟩) = x) : (even_linked_double_star p n m).IsContained G ∨ (even_linked_double_star p n m).IsContained Gᶜ
- Related work
- https://arxiv.org/abs/2611.19632; root-diversity sufficient condition for OP-1853, motivated by experiment 44563.
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- even_linked_double_starFor natural numbers p, n, and m, the even-linked double star S_{2p}(n, m) is the simple graph on vertex set Fin(2p) ⊕ Fin(n) ⊕ Fin(m)…
- Used by 2
- even_linked_double_star_dense_core_upperLet the host have at least the conjectured Ramsey order, with p≥2, m<p and 1≤s≤min(n,m+1). If a vertex set of size at least n+m+2p−s has…
- even_linked_double_star_clique_core_upperWhen m<p, 1≤s≤min(n,m+1), and the finite host order is at least max(2n+2p−1,n+2m+3p−1), a clique in the first color on n+m+2p−s vertices…
Read back from the Lean
Let $V$ be a finite type, and let $G$ be a simple graph on $V$. Let $p, n, m, s \in \mathbb{N}$ satisfy:
1. $0 < p$,
2. $1 \le s$,
3. $s \le n$,
4. $s \le m + 1$,
5. $\max(2n + 2p - 1, n + 2m + 3p - 1) \le |V|$.
Let $C, X$ be finite subsets of $V$ such that:
6. $|C| = n + m + 2p - s$,
7. $X \subseteq C$,
8. $n + \max(p, 2s - 1) \le |X|$,
9. for every $x \in X$, there exists a graph embedding $f$ of even_linked_double_star p (n - s) m into $G$ such that:
- for all vertices $v$ in the domain of the linked double star, $f(v) \in C$, and
- $f(\text{inl}(\langle 0, \dots \rangle)) = x$ (the first endpoint of the path is mapped to $x$).
Then either $G$ contains a copy of even_linked_double_star p n m, or the complement graph $G^c$ contains a copy of even_linked_double_star p n m.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
To find a monochromatic copy of the even-linked double star, we partition the host vertices into C and its complement D = Cᶜ, so that each x ∈ X roots a shortened red copy in C with left star of size n-s. If some x ∈ X has at least s red neighbors in D, we greedily pick s such neighbors and attach them to the left star, completing a red copy of the full double star. Otherwise, every vertex in X has red degree into D strictly less than s, which makes the bipartite graph between X and D dense in the complement (blue) graph Gᶜ; double counting then ensures a blue vertex in D of high degree into X, so a greedy alternating path-and-star construction finds a blue copy of the double star.
An injective map combining a spine path and two sets of star leaves that satisfies the edge conditions embeds the even-linked double star.
We construct the vertex map f on the disjoint union Fin (2p) ⊕ Fin n ⊕ Fin m by combining the path map and the two leaf maps. By case analysis on the definition of adjacency in the even-linked double star, each edge is either a path edge between consecutive spine vertices, an edge between the first spine vertex and a left leaf, or an edge between the last spine vertex and a right leaf; in each case, the corresponding hypothesis guarantees adjacency in the host graph.
let f := Sum.elim path (Sum.elim left right) refine ⟨⟨⟨f,?_⟩,hinj⟩⟩ intro x y h rcases h.2 with h | h <;> rcases h with ⟨i,j,rfl,rfl,h|h⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ all_goals dsimp [f] all_goals first | exact hp _ _ (by assumption) | exact (hp _ _ (by assumption)).symm | exact hl _ (by assumption) _ | exact (hl _ (by assumption) _).symm | exact hr _ (by assumption) _ | exact (hr _ (by assumption) _).symm
The direct sum of two injective functions with disjoint ranges is injective.
Given two elements of the sum type with identical images under the combined map, we inspect which summands they originate from. If both belong to the left summand, injectivity of the first function applies; if both belong to the right summand, injectivity of the second function applies; if they originate from different summands, their equality contradicts the hypothesis that the two functions have disjoint ranges.
rintro (x|x) (y|y) he · exact congrArg Sum.inl (hf he) · exact (h x y he).elim · exact (h y x he.symm).elim · exact congrArg Sum.inr (hg he)
If candidate pools satisfy |pool(i)| > i for each index i < k, there exists an injective choice function selecting an element from each pool.
We argue by induction on k. For k = 0, the embedding from the empty type trivially works via Function.Embedding.ofIsEmpty. In the induction step from k to k+1, the induction hypothesis provides an injective selection for the first k pools. Its image has cardinality k, which is strictly less than the size of the (k+1)-st pool, so Finset.exists_mem_notMem_of_card_lt_card produces an unused element z in pool(k). Appending z to the embedding via Fin.snoc preserves injectivity by Fin.snoc_injective_of_injective.
uses
Function.Embedding.ofIsEmpty,Finset.exists_mem_notMem_of_card_lt_card,Fin.snoc,Fin.snoc_injective_of_injectiveinduction k with | zero => exact ⟨Function.Embedding.ofIsEmpty, fun i => i.elim0⟩ | succ k ih => obtain ⟨f,hf⟩ := ih (fun i => pool i.castSucc) (fun i => h i.castSucc) have hcard : (Finset.univ.map f).card < (pool (Fin.last k)).card := by simpa using h (Fin.last k) obtain ⟨z,hz,hnew⟩ := Finset.exists_mem_notMem_of_card_lt_card hcard have hnot : z ∉ Set.range f := by rintro ⟨i,rfl⟩; exact hnew (Finset.mem_map.mpr ⟨i,Finset.mem_univ _,rfl⟩) refine ⟨⟨Fin.snoc f z,Fin.snoc_injective_of_injective f.injective hnot⟩,?_⟩ intro i refine Fin.lastCases ?_ (fun j => ?_) i · simpa using hz · simpa using hf j
Two disjoint embeddings X and Y with alternating bridge adjacencies form a copy of the even-linked double star.
We form the spine path of length 2p by alternating between vertices of Y and the upper segment of X via ds1310_flexible_core_path_map, while the lower segment of X provides the n left leaves and the upper segment of Y provides the m right leaves. Injectivity of the combined map follows from ds1310_flexible_core_sum_inj using the disjointness of X and Y. Consecutive spine vertices are adjacent by the bridge hypothesis and SimpleGraph.Adj.symm, while the star leaves connect to the respective spine endpoints by hypothesis, completing the embedding via ds1310_flexible_core_copy_of_arrays.
uses
ds1310_flexible_core_copy_of_arrays,ds1310_flexible_core_path_map,ds1310_flexible_core_sum_inj,Fin.ext,SimpleGraph.Adj.symmprivate def ds1310_flexible_core_path_map {V : Type*} {p n m : ℕ} (X : Fin (n+p) → V) (Y : Fin (p+m) → V) (i : Fin (2*p)) : V := if i.val % 2 = 0 then Y ⟨i.val/2,by omega⟩ else X ⟨n+i.val/2,by omega⟩ private theorem ds1310_flexible_core_cross_copy {V : Type*} {G : SimpleGraph V} {p n m : ℕ} (hp : 0 < p) (X : Fin (n+p) ↪ V) (Y : Fin (p+m) ↪ V) (hdis : ∀ i j, X i ≠ Y j) (hfirst : ∀ i : Fin (n+p), i.val ≤ n → G.Adj (Y ⟨0,by omega⟩) (X i)) (hbridge : ∀ (j : Fin (p+m)) (i : Fin (n+p)), 0 < j.val → j.val < p → (i.val = n+j.val-1 ∨ i.val = n+j.val) → G.Adj (Y j) (X i)) (hlast : ∀ j : Fin (p+m), p ≤ j.val → G.Adj (X ⟨n+p-1,by omega⟩) (Y j)) : (even_linked_double_star p n m).IsContained G := by let L (i : Fin n) := X ⟨i.val,by omega⟩ let R (j : Fin m) := Y ⟨p+j.val,by omega⟩ apply ds1310_flexible_core_copy_of_arrays (ds1310_flexible_core_path_map X Y) L R · apply ds1310_flexible_core_sum_inj · intro i j he unfold ds1310_flexible_core_path_map at he split at he <;> split at he · have hh := congrArg Fin.val (Y.injective he); apply Fin.ext; dsimp at hh; omega · exact (hdis _ _ he.symm).elim · exact (hdis _ _ he).elim · have hh := congrArg Fin.val (X.injective he); apply Fin.ext; dsimp at hh; omega · apply ds1310_flexible_core_sum_inj (f := L) (g := R) · intro i j he; exact Fin.ext (congrArg (fun a : Fin (n+p) => a.val) (X.injective he)) · intro i j he have hh := congrArg Fin.val (Y.injective he) apply Fin.ext; dsimp [R] at hh; omega · exact fun i j => hdis _ _ · rintro i (j|j) he · change ds1310_flexible_core_path_map X Y i = X _ at he unfold ds1310_flexible_core_path_map at he split at he · exact hdis _ _ he.symm · have hh := congrArg Fin.val (X.injective he); dsimp [L] at hh; omega · change ds1310_flexible_core_path_map X Y i = Y _ at he unfold ds1310_flexible_core_path_map at he split at he · have hh := congrArg Fin.val (Y.injective he); dsimp [R] at hh; omega · exact hdis _ _ he · intro i j hij unfold ds1310_flexible_core_path_map split <;> split · omega · by_cases hzero : i.val/2=0 · have hj : j.val/2=0 := by omega simpa [hzero,hj] using hfirst ⟨n,by omega⟩ (by simp) · apply hbridge <;> dsimp <;> omega · apply SimpleGraph.Adj.symm apply hbridge <;> dsimp <;> omega · omega · intro i hi l simpa [ds1310_flexible_core_path_map,hi,L] using hfirst ⟨l.val,by omega⟩ (by dsimp; omega) · intro i hi l have ho : i.val % 2 ≠ 0 := by omega have hj : n+i.val/2=n+p-1 := by omega simpa [ds1310_flexible_core_path_map,ho,hj,R] using hlast ⟨p+l.val,by omega⟩ (by dsimp; omega)
In a bipartite setup with large degree and codegree into D and a high-degree vertex in D, the graph contains the even-linked double star.
Given y in D with strictly more than n neighbors in X, we greedily select an embedding f of size n+p in X using ds1310_flexible_core_greedy, ensuring the first n+1 vertices are neighbors of y. Starting with g(0) = y, we then greedily select g of size p+m in D: each bridge vertex g(j) for 0 < j < p is chosen from the common neighborhood of f(n+j-1) and f(n+j) using the codegree bound and lt_of_lt_of_le, and each leaf g(j) for j ≥ p is chosen from the neighborhood of f(n+p-1) using the degree bound. The result then follows by ds1310_flexible_core_cross_copy.
uses
ds1310_flexible_core_greedy,lt_of_lt_of_le,ds1310_flexible_core_cross_copyclassical obtain ⟨y,hy,hny⟩ := hbig let C (i : Fin (n+p)) := if i.val ≤ n then X.filter (G.Adj y) else X obtain ⟨f,hf⟩ := ds1310_flexible_core_greedy C (by intro i; dsimp [C]; split <;> omega) have hfX (i : Fin (n+p)) : f i ∈ X := by have hh := hf i; dsimp [C] at hh; split at hh · exact (Finset.mem_filter.mp hh).1 · exact hh let Z (j : Fin (p+m)) : Finset V := if h0 : j.val=0 then {y} else if h : j.val < p then (D.filter (G.Adj (f ⟨n+j.val-1,by omega⟩))) ∩ (D.filter (G.Adj (f ⟨n+j.val,by omega⟩))) else D.filter (G.Adj (f ⟨n+p-1,by omega⟩)) obtain ⟨g,hg⟩ := ds1310_flexible_core_greedy Z (by intro j dsimp [Z]; split · simp_all · split · exact lt_of_lt_of_le (by assumption) (hcodeg _ (hfX _) _ (hfX _)) · exact lt_of_lt_of_le j.isLt (hdeg _ (hfX _))) have hgD (j : Fin (p+m)) : g j ∈ D := by have hh := hg j; dsimp [Z] at hh; split at hh · simpa [Finset.mem_singleton.mp hh] using hy · split at hh · exact (Finset.mem_filter.mp (Finset.mem_inter.mp hh).1).1 · exact (Finset.mem_filter.mp hh).1 apply ds1310_flexible_core_cross_copy hp f g (fun i j he => Finset.disjoint_left.mp hdis (hfX i) (by rw [he]; exact hgD j)) · intro i hi have hh : g ⟨0,by omega⟩ = y := by simpa [Z] using hg ⟨0,by omega⟩ rw [hh] exact (Finset.mem_filter.mp (by simpa [C,hi] using hf i : f i ∈ X.filter (G.Adj y))).2 · intro j i hj hp' he have hh := hg j simp only [Z, dif_neg (by omega : j.val ≠ 0), dif_pos hp', Finset.mem_inter, Finset.mem_filter] at hh rcases he with he|he · have hidx : i = ⟨n+j.val-1,by omega⟩ := Fin.ext he rw [hidx]; exact hh.1.2.symm · have hidx : i = ⟨n+j.val,by omega⟩ := Fin.ext he rw [hidx]; exact hh.2.2.symm · intro j hj have hh := hg j simp only [Z, dif_neg (by omega : j.val ≠ 0), dif_neg (by omega : ¬j.val<p), Finset.mem_filter] at hh exact hh.2
A copy of the shortened tree in C can be extended to a full double star using s external vertices adjacent to its left center.
Given a copy f of the tree with left arm of size n-s inside C and an injective sequence g of s vertices outside C adjacent to the left center f(0), we retain the spine and right leaves from f and expand the left star to size n by appending the s vertices from g to the n-s leaves of f. Disjointness between C and the range of g guarantees injectivity via ds1310_flexible_core_sum_inj, and ds1310_flexible_core_copy_of_arrays confirms that all double star adjacencies are preserved.
uses
ds1310_flexible_core_copy_of_arrays,ds1310_flexible_core_sum_injprivate theorem ds1310_flexible_core_grow {V : Type*} {G : SimpleGraph V} {p n m s : ℕ} (hp : 0 < p) (hs : s ≤ n) (C : Finset V) (f : (even_linked_double_star p (n-s) m).Copy G) (hf : ∀ v, f v ∈ C) (g : Fin s ↪ V) (hg : ∀ j, g j ∉ C) (hnew : ∀ j, G.Adj (f (.inl ⟨0,by omega⟩)) (g j)) : (even_linked_double_star p n m).IsContained G := by let P (i : Fin (2*p)) := f (.inl i) let L (i : Fin n) := if h : i.val < n-s then f (.inr (.inl ⟨i.val,h⟩)) else g ⟨i.val-(n-s),by omega⟩ let R (i : Fin m) := f (.inr (.inr i)) have hfg (v) (j) : f v ≠ g j := fun he => hg j (he ▸ hf v) apply ds1310_flexible_core_copy_of_arrays P L R · apply ds1310_flexible_core_sum_inj (f := P) · intro i j he; exact Sum.inl.inj (f.injective he) · apply ds1310_flexible_core_sum_inj (f := L) (g := R) · intro i j he; dsimp [L] at he split at he <;> split at he · have hh := Sum.inl.inj (Sum.inr.inj (f.injective he)) exact Fin.ext (congrArg (fun a : Fin (n-s) => a.val) hh) · exact (hfg _ _ he).elim · exact (hfg _ _ he.symm).elim · have hh := congrArg Fin.val (g.injective he) apply Fin.ext; dsimp at hh; omega · intro i j he; exact Sum.inr.inj (Sum.inr.inj (f.injective he)) · intro i j he; dsimp [L,R] at he; split at he · cases (Sum.inr.inj (f.injective he)) · exact hfg _ _ he.symm · rintro i (j|j) he · change P i = L j at he dsimp [L,P] at he; split at he · cases (f.injective he) · exact hfg _ _ he · cases (f.injective he) · intro i j hij apply f.toHom.map_rel' refine ⟨?_,Or.inl (Or.inl ⟨i,j,rfl,rfl,Or.inl hij⟩)⟩ intro he; have hh := congrArg Fin.val (Sum.inl.inj he); omega · intro i hi l dsimp [L,P]; split · apply f.toHom.map_rel' exact ⟨by simp,Or.inl (Or.inr (.inl ⟨i,_,hi,.inl ⟨rfl,rfl⟩⟩))⟩ · have hzero : i = ⟨0,by omega⟩ := Fin.ext hi rw [hzero]; exact hnew _ · intro i hi l apply f.toHom.map_rel' exact ⟨by simp,Or.inl (Or.inr (.inr ⟨i,l,hi,.inl ⟨rfl,rfl⟩⟩))⟩
When red degrees from X into D are all strictly less than s, the complement graph Gᶜ contains the even-linked double star.
In the complement graph Gᶜ, every vertex x in X has blue degree into D at least u = |D| + 1 - s ≥ p + m. The blue codegree of any pair into D is at least 2u - |D| ≥ p by the inclusion-exclusion bound Finset.card_inter_add_card_union. If every vertex in D had blue degree at most n into X, double counting blue edges between X and D would give |X| u ≤ |D| n, which contradicts the arithmetic bounds n ≤ 2u and |X| ≥ n + 2(s-1) + 1. Hence some vertex in D has blue degree strictly greater than n into X, and ds1310_flexible_core_blue_cut produces the double star in Gᶜ.
uses
Finset.card_inter_add_card_union,ds1310_flexible_core_blue_cutprivate theorem ds1310_flexible_core_dense_cut {V : Type*} [DecidableEq V] (G : SimpleGraph V) (X D : Finset V) (p n m s : ℕ) (hp : 0 < p) (hs : 1 ≤ s) (hsm : s ≤ m+1) (hx : n+p ≤ X.card) (hx' : n+2*(s-1)+1 ≤ X.card) (hd : p+m+s-1 ≤ D.card) (hnd : n ≤ 2*(D.card+1-s)) (hdis : Disjoint X D) (hbad : ∀ x ∈ X, (D.filter (G.Adj x)).card < s) : (even_linked_double_star p n m).IsContained Gᶜ := by classical let A (x : V) := D.filter (Gᶜ.Adj x) let u := D.card+1-s have hA (x) (hxmem : x∈X) : u ≤ (A x).card := by have heq : A x = D.filter (fun d => ¬ G.Adj x d) := by ext d by_cases h : d∈D · have hne : x≠d := fun he => Finset.disjoint_left.mp hdis hxmem (he ▸ h) simp [A, h, SimpleGraph.compl_adj, hne] · simp [A,h] have hh := Finset.card_filter_add_card_filter_not (s := D) (p := G.Adj x) rw [heq]; dsimp [u]; have := hbad x hxmem; omega have hu : p+m ≤ u := by dsimp [u]; omega apply ds1310_flexible_core_blue_cut Gᶜ X D p n m hp hx hdis (fun x h => hu.trans (hA x h)) · intro x h1 z h2 have hbound : (A x ∪ A z).card ≤ D.card := Finset.card_le_card (Finset.union_subset (Finset.filter_subset _ _) (Finset.filter_subset _ _)) have hh := Finset.card_inter_add_card_union (A x) (A z) have ha := hA x h1; have hb := hA z h2 change p ≤ (A x ∩ A z).card dsimp [u] at ha hb; omega · by_contra! h have hsum : ∑ x ∈ X, (A x).card = ∑ y ∈ D, (X.filter (Gᶜ.Adj y)).card := by simp only [A,Finset.card_filter]; rw [Finset.sum_comm] apply Finset.sum_congr rfl; intro y _ apply Finset.sum_congr rfl; intro x _ by_cases hxy : Gᶜ.Adj x y · simp [hxy,hxy.symm] · rw [if_neg hxy, if_neg (show ¬Gᶜ.Adj y x from fun h => hxy h.symm)] have hl : X.card*u ≤ ∑ x ∈ X, (A x).card := by simpa using Finset.sum_le_sum (s := X) (f := fun _ => u) (fun x hx => hA x hx) have hh : ∑ y ∈ D, (X.filter (Gᶜ.Adj y)).card ≤ D.card*n := by simpa using Finset.sum_le_sum (s := D) (g := fun _ => n) (fun y hy => h y hy) have hd' : D.card = u+(s-1) := by dsimp [u]; omega have hn' : n*(s-1) ≤ (2*u)*(s-1) := Nat.mul_le_mul_right _ hnd have hx'' := Nat.mul_le_mul_right u hx' rw [hsum] at hl nlinarith only [hl,hh,hn',hx'',congrArg (fun z : ℕ => z*n) hd',show 0<u by omega]
Partition the host vertices by setting D = Cᶜ, so that X and D are disjoint and |D| + |C| = |V|.
We define D to be the complement of C in V. Since X is a subset of C, X and D are disjoint. By Finset.card_compl_add_card, the sizes of D and C sum to the host cardinality |V|.
uses
Finset.card_compl_add_cardtheorem even_linked_double_star_flexible_core {V : Type*} [Fintype V] (G : SimpleGraph V) (p n m s : ℕ) (hp : 0<p) (hs : 1 ≤ s) (hsn : s ≤ n) (hsm : s ≤ m+1) (hN : max (2*n+2*p-1) (n+2*m+3*p-1) ≤ Fintype.card V) (C X : Finset V) (hC : C.card = n+m+2*p-s) (hXC : X ⊆ C) (hx : n+max p (2*s-1) ≤ X.card) (hroot : ∀ x ∈ X, ∃ f : (even_linked_double_star p (n-s) m).Copy G, (∀ v, f v ∈ C) ∧ f (.inl ⟨0,by omega⟩) = x) : (even_linked_double_star p n m).IsContained G ∨ (even_linked_double_star p n m).IsContained Gᶜ := by classical let D := Cᶜ have hdis : Disjoint X D := Finset.disjoint_left.mpr (fun _ hx hd => (Finset.mem_compl.mp hd) (hXC hx)) have hcount : D.card + C.card = Fintype.card V := Finset.card_compl_add_card C
Case 1: If some vertex in X has at least s red neighbors in D, we grow the shortened red copy to a full red double star in G.
Let x in X be a vertex with at least s red neighbors in D. By hypothesis hroot, x is the left center of a red copy f of the shortened tree in C. Using ds1310_flexible_core_greedy, we pick s distinct neighbors of x in D, using lt_of_lt_of_le to verify the pool size condition. Applying ds1310_flexible_core_grow to f and these s external vertices yields a red copy of the full double star in G.
uses
ds1310_flexible_core_greedy,ds1310_flexible_core_grow,lt_of_lt_of_leby_cases rich : ∃ x ∈ X, s ≤ (D.filter (G.Adj x)).card · obtain ⟨x,hx,hd⟩ := rich obtain ⟨f,hf,hr⟩ := hroot x hx obtain ⟨g,hg⟩ := ds1310_flexible_core_greedy (fun _ : Fin s => D.filter (G.Adj x)) (fun i => lt_of_lt_of_le i.isLt hd) left apply ds1310_flexible_core_grow hp hsn C f hf g · intro j exact Finset.mem_compl.mp (Finset.mem_filter.mp (hg j)).1 · intro j; rw [hr]; exact (Finset.mem_filter.mp (hg j)).2
Case 2: If every vertex in X has fewer than s red neighbors in D, the dense cut lemma yields a blue double star in Gᶜ.
When no vertex in X has s red neighbors in D, every x in X has strictly fewer than s red neighbors in D. Linear arithmetic verifies that the degree, codegree, and cardinality preconditions on |X| and |D| hold from the host size bound |V| ≥ max(2n+2p-1, n+2m+3p-1) and |C| = n+m+2p-s. Applying ds1310_flexible_core_dense_cut yields a blue copy of the full double star in Gᶜ.
uses
ds1310_flexible_core_dense_cut· push Not at rich right apply ds1310_flexible_core_dense_cut G X D p n m s hp hs hsm (by omega) (by omega) (by omega) (by omega) hdis rich
Function.Embedding.ofIsEmpty- An embedding from an empty type into any target type.
Finset.exists_mem_notMem_of_card_lt_card- If a finite set has strictly smaller cardinality than another, there exists an element in the second that does not belong to the first.
Fin.snoc- Appends an element to a sequence indexed by Fin n, producing a sequence indexed by Fin (n+1).
Fin.snoc_injective_of_injective- Extending an injective function on Fin n by a value not in its range yields an injective function on Fin (n+1).
Fin.ext- Two elements of Fin n are equal if and only if their underlying natural numbers are equal.
SimpleGraph.Adj.symm- Adjacency in a simple graph is a symmetric relation.
lt_of_lt_of_le- Transitivity of strict and non-strict inequality: if a < b and b ≤ c, then a < c.
ds1310_flexible_core_greedy- Greedy selection lemma: if every candidate pool has cardinality strictly greater than its index, an injective choice function exists.
ds1310_flexible_core_path_map- Defines an alternating path of length 2p by interleaving vertices from two sequences.
ds1310_flexible_core_cross_copy- Combines two disjoint embeddings and bridge adjacencies into a subgraph embedding of the even-linked double star.
ds1310_flexible_core_copy_of_arrays- Builds a copy of the even-linked double star from a path and two leaf maps satisfying the required adjacencies.
ds1310_flexible_core_sum_inj- The sum of two injective functions with mutually disjoint ranges is injective.
Finset.card_inter_add_card_union- The sum of the sizes of the intersection and union of two finite sets equals the sum of their individual sizes.
ds1310_flexible_core_blue_cut- In a bipartite setup with high degrees and codegrees into D and a high-degree vertex in D, the host graph contains the even-linked double star.
ds1310_flexible_core_grow- Extends a copy of the shortened tree in C to a full double star using s external neighbors of its left center.
ds1310_flexible_core_dense_cut- When red degrees into D are all less than s, the complement graph Gᶜ contains the even-linked double star.
Finset.card_compl_add_card- The sum of the cardinality of a finite set and that of its complement is the cardinality of the ambient finite type.
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.
Lean’s trace was cut to the first 400 of 425 tactics.
open SimpleGraph Classicalopen scoped BigOperatorsprivate theorem ds1310_flexible_core_copy_of_arrays {V : Type*} {G : SimpleGraph V} {p n m : ℕ} (path : Fin (2*p) → V) (left : Fin n → V) (right : Fin m → V) (hinj : Function.Injective (Sum.elim path (Sum.elim left right))) (hp : ∀ i j : Fin (2*p), i.val+1=j.val → G.Adj (path i) (path j)) (hl : ∀ i : Fin (2*p), i.val=0 → ∀ l, G.Adj (path i) (left l)) (hr : ∀ i : Fin (2*p), i.val+1=2*p → ∀ l, G.Adj (path i) (right l)) : (even_linked_double_star p n m).IsContained G := by let f := Sum.elim path (Sum.elim left right) refine ⟨⟨⟨f,?_⟩,hinj⟩⟩ intro x y h rcases h.2 with h | h <;> rcases h with ⟨i,j,rfl,rfl,h|h⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ | ⟨i,j,h,⟨rfl,rfl⟩|⟨rfl,rfl⟩⟩ all_goals dsimp [f] all_goals first | exact hp _ _ (by assumption) | exact (hp _ _ (by assumption)).symm | exact hl _ (by assumption) _ | exact (hl _ (by assumption) _).symm | exact hr _ (by assumption) _ | exact (hr _ (by assumption) _).symmprivate theorem ds1310_flexible_core_sum_inj {α β γ : Type*} {f : α → γ} {g : β → γ} (hf : Function.Injective f) (hg : Function.Injective g) (h : ∀ i j, f i ≠ g j) : Function.Injective (Sum.elim f g) := by rintro (x|x) (y|y) he · exact congrArg Sum.inl (hf he) · exact (h x y he).elim · exact (h y x he.symm).elim · exact congrArg Sum.inr (hg he)private theorem ds1310_flexible_core_greedy {V : Type*} [DecidableEq V] {k : ℕ} (pool : Fin k → Finset V) (h : ∀ i, i.val < (pool i).card) : ∃ f : Fin k ↪ V, ∀ i, f i ∈ pool i := by induction k with | zero => exact ⟨Function.Embedding.ofIsEmpty, fun i => i.elim0⟩ | succ k ih => obtain ⟨f,hf⟩ := ih (fun i => pool i.castSucc) (fun i => h i.castSucc) have hcard : (Finset.univ.map f).card < (pool (Fin.last k)).card := by simpa using h (Fin.last k) obtain ⟨z,hz,hnew⟩ := Finset.exists_mem_notMem_of_card_lt_card hcard have hnot : z ∉ Set.range f := by rintro ⟨i,rfl⟩; exact hnew (Finset.mem_map.mpr ⟨i,Finset.mem_univ _,rfl⟩) refine ⟨⟨Fin.snoc f z,Fin.snoc_injective_of_injective f.injective hnot⟩,?_⟩ intro i refine Fin.lastCases ?_ (fun j => ?_) i · simpa using hz · simpa using hf jprivate def ds1310_flexible_core_path_map {V : Type*} {p n m : ℕ} (X : Fin (n+p) → V) (Y : Fin (p+m) → V) (i : Fin (2*p)) : V := if i.val % 2 = 0 then Y ⟨i.val/2,by omega⟩ else X ⟨n+i.val/2,by omega⟩private theorem ds1310_flexible_core_cross_copy {V : Type*} {G : SimpleGraph V} {p n m : ℕ} (hp : 0 < p) (X : Fin (n+p) ↪ V) (Y : Fin (p+m) ↪ V) (hdis : ∀ i j, X i ≠ Y j) (hfirst : ∀ i : Fin (n+p), i.val ≤ n → G.Adj (Y ⟨0,by omega⟩) (X i)) (hbridge : ∀ (j : Fin (p+m)) (i : Fin (n+p)), 0 < j.val → j.val < p → (i.val = n+j.val-1 ∨ i.val = n+j.val) → G.Adj (Y j) (X i)) (hlast : ∀ j : Fin (p+m), p ≤ j.val → G.Adj (X ⟨n+p-1,by omega⟩) (Y j)) : (even_linked_double_star p n m).IsContained G := by let L (i : Fin n) := X ⟨i.val,by omega⟩ let R (j : Fin m) := Y ⟨p+j.val,by omega⟩ apply ds1310_flexible_core_copy_of_arrays (ds1310_flexible_core_path_map X Y) L R · apply ds1310_flexible_core_sum_inj · intro i j he unfold ds1310_flexible_core_path_map at he split at he <;> split at he · have hh := congrArg Fin.val (Y.injective he); apply Fin.ext; dsimp at hh; omega · exact (hdis _ _ he.symm).elim · exact (hdis _ _ he).elim · have hh := congrArg Fin.val (X.injective he); apply Fin.ext; dsimp at hh; omega · apply ds1310_flexible_core_sum_inj (f := L) (g := R) · intro i j he; exact Fin.ext (congrArg (fun a : Fin (n+p) => a.val) (X.injective he)) · intro i j he have hh := congrArg Fin.val (Y.injective he) apply Fin.ext; dsimp [R] at hh; omega · exact fun i j => hdis _ _ · rintro i (j|j) he · change ds1310_flexible_core_path_map X Y i = X _ at he unfold ds1310_flexible_core_path_map at he split at he · exact hdis _ _ he.symm · have hh := congrArg Fin.val (X.injective he); dsimp [L] at hh; omega · change ds1310_flexible_core_path_map X Y i = Y _ at he unfold ds1310_flexible_core_path_map at he split at he · have hh := congrArg Fin.val (Y.injective he); dsimp [R] at hh; omega · exact hdis _ _ he · intro i j hij unfold ds1310_flexible_core_path_map split <;> split · omega · by_cases hzero : i.val/2=0 · have hj : j.val/2=0 := by omega simpa [hzero,hj] using hfirst ⟨n,by omega⟩ (by simp) · apply hbridge <;> dsimp <;> omega · apply SimpleGraph.Adj.symm apply hbridge <;> dsimp <;> omega · omega · intro i hi l simpa [ds1310_flexible_core_path_map,hi,L] using hfirst ⟨l.val,by omega⟩ (by dsimp; omega) · intro i hi l have ho : i.val % 2 ≠ 0 := by omega have hj : n+i.val/2=n+p-1 := by omega simpa [ds1310_flexible_core_path_map,ho,hj,R] using hlast ⟨p+l.val,by omega⟩ (by dsimp; omega)private theorem ds1310_flexible_core_blue_cut {V : Type*} [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (X D : Finset V) (p n m : ℕ) (hp : 0 < p) (hsz : n+p ≤ X.card) (hdis : Disjoint X D) (hdeg : ∀ x ∈ X, p+m ≤ (D.filter (G.Adj x)).card) (hcodeg : ∀ x ∈ X, ∀ z ∈ X, p ≤ ((D.filter (G.Adj x)) ∩ (D.filter (G.Adj z))).card) (hbig : ∃ y ∈ D, n < (X.filter (G.Adj y)).card) : (even_linked_double_star p n m).IsContained G := by classical obtain ⟨y,hy,hny⟩ := hbig let C (i : Fin (n+p)) := if i.val ≤ n then X.filter (G.Adj y) else X obtain ⟨f,hf⟩ := ds1310_flexible_core_greedy C (by intro i; dsimp [C]; split <;> omega) have hfX (i : Fin (n+p)) : f i ∈ X := by have hh := hf i; dsimp [C] at hh; split at hh · exact (Finset.mem_filter.mp hh).1 · exact hh let Z (j : Fin (p+m)) : Finset V := if h0 : j.val=0 then {y} else if h : j.val < p then (D.filter (G.Adj (f ⟨n+j.val-1,by omega⟩))) ∩ (D.filter (G.Adj (f ⟨n+j.val,by omega⟩))) else D.filter (G.Adj (f ⟨n+p-1,by omega⟩)) obtain ⟨g,hg⟩ := ds1310_flexible_core_greedy Z (by intro j dsimp [Z]; split · simp_all · split · exact lt_of_lt_of_le (by assumption) (hcodeg _ (hfX _) _ (hfX _)) · exact lt_of_lt_of_le j.isLt (hdeg _ (hfX _))) have hgD (j : Fin (p+m)) : g j ∈ D := by have hh := hg j; dsimp [Z] at hh; split at hh · simpa [Finset.mem_singleton.mp hh] using hy · split at hh · exact (Finset.mem_filter.mp (Finset.mem_inter.mp hh).1).1 · exact (Finset.mem_filter.mp hh).1 apply ds1310_flexible_core_cross_copy hp f g (fun i j he => Finset.disjoint_left.mp hdis (hfX i) (by rw [he]; exact hgD j)) · intro i hi have hh : g ⟨0,by omega⟩ = y := by simpa [Z] using hg ⟨0,by omega⟩ rw [hh] exact (Finset.mem_filter.mp (by simpa [C,hi] using hf i : f i ∈ X.filter (G.Adj y))).2 · intro j i hj hp' he have hh := hg j simp only [Z, dif_neg (by omega : j.val ≠ 0), dif_pos hp', Finset.mem_inter, Finset.mem_filter] at hh rcases he with he|he · have hidx : i = ⟨n+j.val-1,by omega⟩ := Fin.ext he rw [hidx]; exact hh.1.2.symm · have hidx : i = ⟨n+j.val,by omega⟩ := Fin.ext he rw [hidx]; exact hh.2.2.symm · intro j hj have hh := hg j simp only [Z, dif_neg (by omega : j.val ≠ 0), dif_neg (by omega : ¬j.val<p), Finset.mem_filter] at hh exact hh.2private theorem ds1310_flexible_core_grow {V : Type*} {G : SimpleGraph V} {p n m s : ℕ} (hp : 0 < p) (hs : s ≤ n) (C : Finset V) (f : (even_linked_double_star p (n-s) m).Copy G) (hf : ∀ v, f v ∈ C) (g : Fin s ↪ V) (hg : ∀ j, g j ∉ C) (hnew : ∀ j, G.Adj (f (.inl ⟨0,by omega⟩)) (g j)) : (even_linked_double_star p n m).IsContained G := by let P (i : Fin (2*p)) := f (.inl i) let L (i : Fin n) := if h : i.val < n-s then f (.inr (.inl ⟨i.val,h⟩)) else g ⟨i.val-(n-s),by omega⟩ let R (i : Fin m) := f (.inr (.inr i)) have hfg (v) (j) : f v ≠ g j := fun he => hg j (he ▸ hf v) apply ds1310_flexible_core_copy_of_arrays P L R · apply ds1310_flexible_core_sum_inj (f := P) · intro i j he; exact Sum.inl.inj (f.injective he) · apply ds1310_flexible_core_sum_inj (f := L) (g := R) · intro i j he; dsimp [L] at he split at he <;> split at he · have hh := Sum.inl.inj (Sum.inr.inj (f.injective he)) exact Fin.ext (congrArg (fun a : Fin (n-s) => a.val) hh) · exact (hfg _ _ he).elim · exact (hfg _ _ he.symm).elim · have hh := congrArg Fin.val (g.injective he) apply Fin.ext; dsimp at hh; omega · intro i j he; exact Sum.inr.inj (Sum.inr.inj (f.injective he)) · intro i j he; dsimp [L,R] at he; split at he · cases (Sum.inr.inj (f.injective he)) · exact hfg _ _ he.symm · rintro i (j|j) he · change P i = L j at he dsimp [L,P] at he; split at he · cases (f.injective he) · exact hfg _ _ he · cases (f.injective he) · intro i j hij apply f.toHom.map_rel' refine ⟨?_,Or.inl (Or.inl ⟨i,j,rfl,rfl,Or.inl hij⟩)⟩ intro he; have hh := congrArg Fin.val (Sum.inl.inj he); omega · intro i hi l dsimp [L,P]; split · apply f.toHom.map_rel' exact ⟨by simp,Or.inl (Or.inr (.inl ⟨i,_,hi,.inl ⟨rfl,rfl⟩⟩))⟩ · have hzero : i = ⟨0,by omega⟩ := Fin.ext hi rw [hzero]; exact hnew _ · intro i hi l apply f.toHom.map_rel' exact ⟨by simp,Or.inl (Or.inr (.inr ⟨i,l,hi,.inl ⟨rfl,rfl⟩⟩))⟩private theorem ds1310_flexible_core_dense_cut {V : Type*} [DecidableEq V] (G : SimpleGraph V) (X D : Finset V) (p n m s : ℕ) (hp : 0 < p) (hs : 1 ≤ s) (hsm : s ≤ m+1) (hx : n+p ≤ X.card) (hx' : n+2*(s-1)+1 ≤ X.card) (hd : p+m+s-1 ≤ D.card) (hnd : n ≤ 2*(D.card+1-s)) (hdis : Disjoint X D) (hbad : ∀ x ∈ X, (D.filter (G.Adj x)).card < s) : (even_linked_double_star p n m).IsContained Gᶜ := by classical let A (x : V) := D.filter (Gᶜ.Adj x) let u := D.card+1-s have hA (x) (hxmem : x∈X) : u ≤ (A x).card := by have heq : A x = D.filter (fun d => ¬ G.Adj x d) := by ext d by_cases h : d∈D · have hne : x≠d := fun he => Finset.disjoint_left.mp hdis hxmem (he ▸ h) simp [A, h, SimpleGraph.compl_adj, hne] · simp [A,h] have hh := Finset.card_filter_add_card_filter_not (s := D) (p := G.Adj x) rw [heq]; dsimp [u]; have := hbad x hxmem; omega have hu : p+m ≤ u := by dsimp [u]; omega apply ds1310_flexible_core_blue_cut Gᶜ X D p n m hp hx hdis (fun x h => hu.trans (hA x h)) · intro x h1 z h2 have hbound : (A x ∪ A z).card ≤ D.card := Finset.card_le_card (Finset.union_subset (Finset.filter_subset _ _) (Finset.filter_subset _ _)) have hh := Finset.card_inter_add_card_union (A x) (A z) have ha := hA x h1; have hb := hA z h2 change p ≤ (A x ∩ A z).card dsimp [u] at ha hb; omega · by_contra! h have hsum : ∑ x ∈ X, (A x).card = ∑ y ∈ D, (X.filter (Gᶜ.Adj y)).card := by simp only [A,Finset.card_filter]; rw [Finset.sum_comm] apply Finset.sum_congr rfl; intro y _ apply Finset.sum_congr rfl; intro x _ by_cases hxy : Gᶜ.Adj x y · simp [hxy,hxy.symm] · rw [if_neg hxy, if_neg (show ¬Gᶜ.Adj y x from fun h => hxy h.symm)] have hl : X.card*u ≤ ∑ x ∈ X, (A x).card := by simpa using Finset.sum_le_sum (s := X) (f := fun _ => u) (fun x hx => hA x hx) have hh : ∑ y ∈ D, (X.filter (Gᶜ.Adj y)).card ≤ D.card*n := by simpa using Finset.sum_le_sum (s := D) (g := fun _ => n) (fun y hy => h y hy) have hd' : D.card = u+(s-1) := by dsimp [u]; omega have hn' : n*(s-1) ≤ (2*u)*(s-1) := Nat.mul_le_mul_right _ hnd have hx'' := Nat.mul_le_mul_right u hx' rw [hsum] at hl nlinarith only [hl,hh,hn',hx'',congrArg (fun z : ℕ => z*n) hd',show 0<u by omega]theorem even_linked_double_star_flexible_core {V : Type*} [Fintype V] (G : SimpleGraph V) (p n m s : ℕ) (hp : 0<p) (hs : 1 ≤ s) (hsn : s ≤ n) (hsm : s ≤ m+1) (hN : max (2*n+2*p-1) (n+2*m+3*p-1) ≤ Fintype.card V) (C X : Finset V) (hC : C.card = n+m+2*p-s) (hXC : X ⊆ C) (hx : n+max p (2*s-1) ≤ X.card) (hroot : ∀ x ∈ X, ∃ f : (even_linked_double_star p (n-s) m).Copy G, (∀ v, f v ∈ C) ∧ f (.inl ⟨0,by omega⟩) = x) : (even_linked_double_star p n m).IsContained G ∨ (even_linked_double_star p n m).IsContained Gᶜ := by classical let D := Cᶜ have hdis : Disjoint X D := Finset.disjoint_left.mpr (fun _ hx hd => (Finset.mem_compl.mp hd) (hXC hx)) have hcount : D.card + C.card = Fintype.card V := Finset.card_compl_add_card C by_cases rich : ∃ x ∈ X, s ≤ (D.filter (G.Adj x)).card · obtain ⟨x,hx,hd⟩ := rich obtain ⟨f,hf,hr⟩ := hroot x hx obtain ⟨g,hg⟩ := ds1310_flexible_core_greedy (fun _ : Fin s => D.filter (G.Adj x)) (fun i => lt_of_lt_of_le i.isLt hd) left apply ds1310_flexible_core_grow hp hsn C f hf g · intro j exact Finset.mem_compl.mp (Finset.mem_filter.mp (hg j)).1 · intro j; rw [hr]; exact (Finset.mem_filter.mp (hg j)).2 · push Not at rich right apply ds1310_flexible_core_dense_cut G X D p n m s hp hs hsm (by omega) (by omega) (by omega) (by omega) hdis rich