boundary_five_blocks_defect_from_shore_shape
Under the displayed four-block degree and anticompleteness hypotheses, the two specified shore-shape implications yield the corresponding cross-nonneighbor defect classification.
Statement
theorem boundary_five_blocks_defect_from_shore_shape (k : ℕ) (hk : 5 ≤ k) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj] (A B C D : Finset (Fin (4*k))) (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D) (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D) (hC : C.card=5) (hsizeCD : C.card+D.card=2*k) (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d) (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card) (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (Q W : Finset (Fin (4*k))) (hyQadj : ∀ q ∈ Q, ¬ G.Adj y q) (hxWadj : ∀ w ∈ W, ¬ G.Adj x w) (hcross : ∀ q ∈ Q, ∀ w ∈ W, ¬ G.Adj q w) (hone : (C.filter (fun c => ¬ G.Adj x c)).card ≤ 1 → 2 ≤ (Q ∩ A).card) (htwo : (C.filter (fun c => ¬ G.Adj x c)).card = 2 → (W ∩ C).card = 2 ∧ (Q ∩ B).card = 1) : (((C.filter (fun c => ¬ G.Adj x c)).card = 2) → ∀ u ∈ C, ¬ G.Adj x u → (A.filter (fun a => ¬ G.Adj a u)).card = 1) ∧ (((C.filter (fun c => ¬ G.Adj x c)).card ≤ 1) → (A.filter (fun a => ¬ G.Adj a y)).card = 2)
- Source
- OP-1957: final finite-set step from bridge-shore counts to cross-defect restrictions.
- Verified
- 24 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- anticomplete_neighbor_defect_boundA vertex anticomplete to a specified block misses at most r of its allowed neighbors when its degree is within r of their total number.
- Used by 1
- boundary_five_blocks_essential_edge_cross_defect_patternIn the displayed four-block partition with both selected blocks of size five, minimum degree at least 2k+2, a separator property and…
The proof, explained
The proof establishes the cross-nonneighbor defect classification for a graph on 4k vertices partitioned into blocks A, B, C, D. First, using the minimum degree hypothesis and anticompleteness between C and D, the non-neighbor defect outside D for any vertex in C is bounded above by 2. When x ∈ A has 2 non-neighbors in C, the shore-shape assumption forces the defect set of any such non-neighbor u ∈ C to be precisely {x, b} for a unique b ∈ B, leaving x as the only non-neighbor of u in A. When x has at most 1 non-neighbor in C, the hypothesis yields at least 2 non-neighbors of y in A, which matches the universal upper bound of 2.
The partition blocks are mutually disjoint, and the block D has cardinality 2k - 5.
Using the disjointness hypotheses between blocks A, B, C, D, `Finset.disjoint_left.mp` establishes that membership in one block precludes membership in another. Since |C| = 5 and |C| + |D| = 2k, linear arithmetic (`omega`) deduces |D| = 2k - 5.
uses
Finset.disjoint_left.mpclassical have nAB : ∀ v, v ∈ A → v ∉ B := fun v h => Finset.disjoint_left.mp hAB h have nAC : ∀ v, v ∈ A → v ∉ C := fun v h => Finset.disjoint_left.mp hAC h have nAD : ∀ v, v ∈ A → v ∉ D := fun v h => Finset.disjoint_left.mp hAD h have nBC : ∀ v, v ∈ B → v ∉ C := fun v h => Finset.disjoint_left.mp hBC h have nBD : ∀ v, v ∈ B → v ∉ D := fun v h => Finset.disjoint_left.mp hBD h have nCD : ∀ v, v ∈ C → v ∉ D := fun v h => Finset.disjoint_left.mp hCD h have hDcard : D.card = 2*k-5 := by omega
For every vertex c ∈ C, the number of non-neighbors of c outside D ∪ {c} is at most 2.
We apply `anticomplete_neighbor_defect_bound` to c and the block D with parameters d = 2k + 4 and defect bound r = 2. The total number of vertices is 4k, which equals |D| + (2k + 4) + 1 by `Fintype.card_fin` and linear arithmetic since |D| = 2k - 5. The degree condition 2k + 4 ≤ deg(c) + 2 follows from the minimum degree hypothesis deg(c) ≥ 2k + 2.
uses
anticomplete_neighbor_defect_bound,Fintype.card_finhave hbud : ∀ c ∈ C, (((Finset.univ \ D).erase c) \ G.neighborFinset c).card ≤ 2 := by intro c hc apply anticomplete_neighbor_defect_bound G D c (nCD c hc) (hnoCD c hc) (2*k+4) 2 · simp only [Fintype.card_fin]; omega · have hh := hdegree c; omega
The vertex y ∈ C has at most 2 non-neighbors in A.
Any vertex a ∈ A non-adjacent to y is distinct from y (since A and C are disjoint) and does not belong to D (since A and D are disjoint). Thus, the non-neighbors of y in A form a subset of the non-neighbors of y outside D ∪ {y}. By monotonicity of cardinality (`Finset.card_le_card`) and the defect bound from Step 2, this set has cardinality at most 2.
uses
Finset.mem_filter.mp,Finset.mem_sdiff,Finset.mem_erase,Finset.mem_univ,true_and,SimpleGraph.mem_neighborFinset,Finset.card_le_cardhave hYupper : (A.filter (fun a => ¬ G.Adj a y)).card ≤ 2 := by have hsub : A.filter (fun a => ¬ G.Adj a y) ⊆ ((Finset.univ \ D).erase y) \ G.neighborFinset y := by intro a ha obtain ⟨haA,hano⟩ := Finset.mem_filter.mp ha simp only [Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC y (h ▸ haA) hy, nAD a haA⟩, fun h => hano h.symm⟩ exact (Finset.card_le_card hsub).trans (hbud y hy)
The goal splits into two conditional statements.
Applying `constructor` divides the conjunction into the two shore-shape cases: when x has exactly 2 non-neighbors in C, and when x has at most 1 non-neighbor in C.
constructorAssuming x has 2 non-neighbors in C, the set W ∩ C equals the set of non-neighbors of x in C, and any non-neighbor u ∈ C of x belongs to W.
Assume x has 2 non-neighbors in C, and let u ∈ C be non-adjacent to x. By hypothesis `htwo`, |W ∩ C| = 2 and |Q ∩ B| = 1. Since no vertex in W is adjacent to x, W ∩ C is a subset of the non-neighbors of x in C. Because both sets have cardinality 2, they are equal by `Finset.eq_of_subset_of_card_le`. Hence u ∈ W ∩ C, so u ∈ W.
uses
Finset.mem_filter.mpr,Finset.mem_inter.mp,Finset.eq_of_subset_of_card_le· intro hr u hu huno obtain ⟨hwc,hqb⟩ := htwo hr have hWsub : W ∩ C ⊆ C.filter (fun c => ¬ G.Adj x c) := by intro c hc exact Finset.mem_filter.mpr ⟨(Finset.mem_inter.mp hc).2, hxWadj c (Finset.mem_inter.mp hc).1⟩ have hWeq : W ∩ C = C.filter (fun c => ¬ G.Adj x c) := by apply Finset.eq_of_subset_of_card_le hWsub omega have huWC : u ∈ W ∩ C := by rw [hWeq] exact Finset.mem_filter.mpr ⟨hu,huno⟩ have huW : u ∈ W := (Finset.mem_inter.mp huWC).1
There is a unique element b ∈ Q ∩ B, and x ≠ b.
Since |Q ∩ B| = 1, `Finset.card_eq_one.mp` gives a unique vertex b ∈ Q ∩ B. Since x ∈ A, b ∈ B, and A and B are disjoint, x ≠ b.
uses
Finset.card_eq_one.mp,Finset.mem_inter.mpobtain ⟨b,hbeq⟩ := Finset.card_eq_one.mp hqb have hbQB : b ∈ Q∩B := by rw [hbeq]; simp have hbQ : b ∈ Q := (Finset.mem_inter.mp hbQB).1 have hbB : b ∈ B := (Finset.mem_inter.mp hbQB).2 have hxb : x ≠ b := fun h => nAB b (h ▸ hx) hbB
The set F of non-neighbors of u outside D ∪ {u} is precisely {x, b}.
We show {x, b} ⊆ F. First, x ∈ A is distinct from u ∈ C, not in D, and non-adjacent to u by assumption. Second, b ∈ B is distinct from u ∈ C, not in D, and non-adjacent to u because b ∈ Q, u ∈ W, and no edge connects Q and W (`hcross`). Since x ≠ b, {x, b} has 2 elements (`Finset.card_pair`). Because |F| ≤ 2 by Step 2, the subset inclusion implies F = {x, b} via `Finset.eq_of_subset_of_card_le`.
uses
Finset.mem_insert,Finset.mem_singleton,Finset.mem_sdiff,Finset.mem_erase,Finset.mem_univ,true_and,SimpleGraph.mem_neighborFinset,Finset.eq_of_subset_of_card_le,Finset.card_pairlet F := ((Finset.univ \ D).erase u) \ G.neighborFinset u have hpair : ({x,b} : Finset (Fin (4*k))) ⊆ F := by intro v hv simp only [Finset.mem_insert, Finset.mem_singleton] at hv rcases hv with hv | hv · subst v simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC u (h ▸ hx) hu, nAD x hx⟩, fun h => huno h.symm⟩ · subst v simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nBC u (h ▸ hbB) hu, nBD b hbB⟩, fun h => hcross b hbQ u huW h.symm⟩ have hF : F = {x,b} := by symm apply Finset.eq_of_subset_of_card_le hpair rw [Finset.card_pair hxb] exact hbud u hu
The set of non-neighbors of u in A is the singleton {x}, which has cardinality 1.
Any non-neighbor a ∈ A of u must belong to F = {x, b}. However, a cannot equal b because a ∈ A, b ∈ B, and A and B are disjoint; hence a = x. Conversely, x ∈ A is non-adjacent to u. Thus the set of non-neighbors in A is exactly {x}, whose cardinality is 1 by `Finset.card_singleton`.
uses
Finset.mem_filter.mp,Finset.mem_sdiff,Finset.mem_erase,Finset.mem_univ,true_and,SimpleGraph.mem_neighborFinset,Finset.mem_insert,Finset.mem_singleton,False.elim,Finset.mem_singleton.mp,Finset.mem_filter.mpr,Finset.card_singletonhave hAeq : A.filter (fun a => ¬ G.Adj a u) = {x} := by ext a constructor · intro ha obtain ⟨haA,hano⟩ := Finset.mem_filter.mp ha have haF : a ∈ F := by simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC u (h ▸ haA) hu, nAD a haA⟩, fun h => hano h.symm⟩ rw [hF] at haF simp only [Finset.mem_insert, Finset.mem_singleton] at haF rcases haF with h | h · simpa [h] · exact False.elim (nAB a haA (h.symm ▸ hbB)) · intro ha have : a=x := Finset.mem_singleton.mp ha subst a exact Finset.mem_filter.mpr ⟨hx,huno⟩ rw [hAeq, Finset.card_singleton]
If x has at most 1 non-neighbor in C, then the number of non-neighbors of y in A is 2.
Assuming x has at most 1 non-neighbor in C, hypothesis `hone` yields 2 ≤ |Q ∩ A|. Every element of Q is non-adjacent to y by `hyQadj`, so Q ∩ A is a subset of the non-neighbors of y in A. Thus 2 ≤ |Q ∩ A| ≤ |A \ N(y)| by `Finset.card_le_card`. Combined with the upper bound |A \ N(y)| ≤ 2 from Step 3, linear arithmetic (`omega`) completes the proof that |A \ N(y)| = 2.
uses
Finset.mem_filter.mpr,Finset.mem_inter.mp,Finset.card_le_card· intro hr have hsub : Q∩A ⊆ A.filter (fun a => ¬ G.Adj a y) := by intro a ha exact Finset.mem_filter.mpr ⟨(Finset.mem_inter.mp ha).2, fun h => hyQadj a (Finset.mem_inter.mp ha).1 h.symm⟩ have hlo := Finset.card_le_card hsub have h2 := hone hr omega
Finset.disjoint_left.mp- If two sets are disjoint, any element of the first set does not belong to the second set.
anticomplete_neighbor_defect_bound- In a finite graph, if a vertex x is not in B and has no neighbors in B, then the number of non-neighbors of x outside B ∪ {x} is bounded by r, provided |V| = |B| + d + 1 and d ≤ deg(x) + r.
Fintype.card_fin- The cardinality of `Fin n` is n.
Finset.mem_filter.mp- An element in a filtered finset belongs to the underlying finset and satisfies the filter predicate.
Finset.mem_sdiff- An element is in the set difference s \ t if and only if it is in s and not in t.
Finset.mem_erase- An element is in s.erase b if and only if it is not equal to b and belongs to s.
Finset.mem_univ- Every element of a finite type belongs to the universal finset `Finset.univ`.
true_and- The proposition `True ∧ p` is equivalent to `p`.
SimpleGraph.mem_neighborFinset- A vertex w is in the neighbor set of v if and only if v and w are adjacent in G.
Finset.card_le_card- If s ⊆ t for finite sets, then the cardinality of s is at most that of t.
Finset.mem_filter.mpr- If an element belongs to s and satisfies predicate p, it belongs to the filtered finset s.filter p.
Finset.mem_inter.mp- An element belongs to the intersection s ∩ t if and only if it belongs to both s and t.
Finset.eq_of_subset_of_card_le- If s ⊆ t and |t| ≤ |s| for finite sets, then s = t.
Finset.card_eq_one.mp- A finite set has cardinality 1 if and only if it is a singleton {a} for some element a.
Finset.mem_insert- An element belongs to insert b s if and only if it equals b or belongs to s.
Finset.mem_singleton- An element belongs to the singleton {a} if and only if it equals a.
Finset.card_pair- If a ≠ b, the pair {a, b} has cardinality 2.
False.elim- From a contradiction (False), any conclusion follows.
Finset.mem_singleton.mp- If an element belongs to {a}, then it equals a.
Finset.card_singleton- Any singleton finset {a} has cardinality 1.
- Linear arithmetic deductions on finset cardinalities and vertex degrees are automated via `omega`.
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_five_blocks_defect_from_shore_shape (k : ℕ) (hk : 5 ≤ k) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj] (A B C D : Finset (Fin (4*k))) (hAB : Disjoint A B) (hAC : Disjoint A C) (hAD : Disjoint A D) (hBC : Disjoint B C) (hBD : Disjoint B D) (hCD : Disjoint C D) (hC : C.card=5) (hsizeCD : C.card+D.card=2*k) (hnoCD : ∀ c ∈ C, ∀ d ∈ D, ¬ G.Adj c d) (hdegree : ∀ v, 2*k+2 ≤ (G.neighborFinset v).card) (x y : Fin (4*k)) (hx : x ∈ A) (hy : y ∈ C) (Q W : Finset (Fin (4*k))) (hyQadj : ∀ q ∈ Q, ¬ G.Adj y q) (hxWadj : ∀ w ∈ W, ¬ G.Adj x w) (hcross : ∀ q ∈ Q, ∀ w ∈ W, ¬ G.Adj q w) (hone : (C.filter (fun c => ¬ G.Adj x c)).card ≤ 1 → 2 ≤ (Q ∩ A).card) (htwo : (C.filter (fun c => ¬ G.Adj x c)).card = 2 → (W ∩ C).card = 2 ∧ (Q ∩ B).card = 1) : (((C.filter (fun c => ¬ G.Adj x c)).card = 2) → ∀ u ∈ C, ¬ G.Adj x u → (A.filter (fun a => ¬ G.Adj a u)).card = 1) ∧ (((C.filter (fun c => ¬ G.Adj x c)).card ≤ 1) → (A.filter (fun a => ¬ G.Adj a y)).card = 2) := by classical have nAB : ∀ v, v ∈ A → v ∉ B := fun v h => Finset.disjoint_left.mp hAB h have nAC : ∀ v, v ∈ A → v ∉ C := fun v h => Finset.disjoint_left.mp hAC h have nAD : ∀ v, v ∈ A → v ∉ D := fun v h => Finset.disjoint_left.mp hAD h have nBC : ∀ v, v ∈ B → v ∉ C := fun v h => Finset.disjoint_left.mp hBC h have nBD : ∀ v, v ∈ B → v ∉ D := fun v h => Finset.disjoint_left.mp hBD h have nCD : ∀ v, v ∈ C → v ∉ D := fun v h => Finset.disjoint_left.mp hCD h have hDcard : D.card = 2*k-5 := by omega have hbud : ∀ c ∈ C, (((Finset.univ \ D).erase c) \ G.neighborFinset c).card ≤ 2 := by intro c hc apply anticomplete_neighbor_defect_bound G D c (nCD c hc) (hnoCD c hc) (2*k+4) 2 · simp only [Fintype.card_fin]; omega · have hh := hdegree c; omega have hYupper : (A.filter (fun a => ¬ G.Adj a y)).card ≤ 2 := by have hsub : A.filter (fun a => ¬ G.Adj a y) ⊆ ((Finset.univ \ D).erase y) \ G.neighborFinset y := by intro a ha obtain ⟨haA,hano⟩ := Finset.mem_filter.mp ha simp only [Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC y (h ▸ haA) hy, nAD a haA⟩, fun h => hano h.symm⟩ exact (Finset.card_le_card hsub).trans (hbud y hy) constructor · intro hr u hu huno obtain ⟨hwc,hqb⟩ := htwo hr have hWsub : W ∩ C ⊆ C.filter (fun c => ¬ G.Adj x c) := by intro c hc exact Finset.mem_filter.mpr ⟨(Finset.mem_inter.mp hc).2, hxWadj c (Finset.mem_inter.mp hc).1⟩ have hWeq : W ∩ C = C.filter (fun c => ¬ G.Adj x c) := by apply Finset.eq_of_subset_of_card_le hWsub omega have huWC : u ∈ W ∩ C := by rw [hWeq] exact Finset.mem_filter.mpr ⟨hu,huno⟩ have huW : u ∈ W := (Finset.mem_inter.mp huWC).1 obtain ⟨b,hbeq⟩ := Finset.card_eq_one.mp hqb have hbQB : b ∈ Q∩B := by rw [hbeq]; simp have hbQ : b ∈ Q := (Finset.mem_inter.mp hbQB).1 have hbB : b ∈ B := (Finset.mem_inter.mp hbQB).2 have hxb : x ≠ b := fun h => nAB b (h ▸ hx) hbB let F := ((Finset.univ \ D).erase u) \ G.neighborFinset u have hpair : ({x,b} : Finset (Fin (4*k))) ⊆ F := by intro v hv simp only [Finset.mem_insert, Finset.mem_singleton] at hv rcases hv with hv | hv · subst v simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC u (h ▸ hx) hu, nAD x hx⟩, fun h => huno h.symm⟩ · subst v simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nBC u (h ▸ hbB) hu, nBD b hbB⟩, fun h => hcross b hbQ u huW h.symm⟩ have hF : F = {x,b} := by symm apply Finset.eq_of_subset_of_card_le hpair rw [Finset.card_pair hxb] exact hbud u hu have hAeq : A.filter (fun a => ¬ G.Adj a u) = {x} := by ext a constructor · intro ha obtain ⟨haA,hano⟩ := Finset.mem_filter.mp ha have haF : a ∈ F := by simp only [F, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset] exact ⟨⟨fun h => nAC u (h ▸ haA) hu, nAD a haA⟩, fun h => hano h.symm⟩ rw [hF] at haF simp only [Finset.mem_insert, Finset.mem_singleton] at haF rcases haF with h | h · simpa [h] · exact False.elim (nAB a haA (h.symm ▸ hbB)) · intro ha have : a=x := Finset.mem_singleton.mp ha subst a exact Finset.mem_filter.mpr ⟨hx,huno⟩ rw [hAeq, Finset.card_singleton] · intro hr have hsub : Q∩A ⊆ A.filter (fun a => ¬ G.Adj a y) := by intro a ha exact Finset.mem_filter.mpr ⟨(Finset.mem_inter.mp ha).2, fun h => hyQadj a (Finset.mem_inter.mp ha).1 h.symm⟩ have hlo := Finset.card_le_card hsub have h2 := hone hr omega