Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.SquaredPartition |
| 2 | import Mathlib.Data.Set.Card |
| 3 | import NavierStokes.SlotColoring |
| 4 | import Mathlib.Analysis.Normed.Group.Bounded |
| 5 | import NavierStokes.PhysicalWaveSum |
| 6 | |
| 7 | /-! |
| 8 | # Quantitative counts of slow-grid labels |
| 9 | |
| 10 | The boxes here use the actual normalized spacing `S_n⁻³` and the actual |
| 11 | `SlotColoring.Label` indices. The radius factor is arbitrary and fixed, so |
| 12 | the counting bounds include every fixed-factor enlargement. |
| 13 | -/ |
| 14 | |
| 15 | /-! ## From `NavierStokes/LabelCountingFinite.lean` |
| 16 | |
| 17 | The text of `NavierStokes/LabelCountingFinite.lean`, folded into this file, which was its only importer. -/ |
| 18 | |
| 19 | section |
| 20 | |
| 21 | noncomputable section |
| 22 | |
| 23 | namespace NavierStokes.LabelCountingFinite |
| 24 | |
| 25 | open SlotColoring |
| 26 | open scoped BigOperators |
| 27 | |
| 28 | def gridCandidates (c : Grid) (K : Fin 3 → ℕ) : Finset Grid := |
| 29 | Fintype.piFinset (fun j => Finset.Icc (c j - (K j : ℤ)) (c j + (K j : ℤ))) |
| 30 | |
| 31 | def labelCandidates (n : ℕ) (c : Grid) (K : Fin 3 → ℕ) : Finset Label := |
| 32 | ((gridCandidates c K).product (Finset.univ : Finset Bool)).image (fun gs => (n, gs)) |
| 33 | |
| 34 | theorem mem_gridCandidates_iff (c : Grid) (K : Fin 3 → ℕ) (g : Grid) : |
| 35 | g ∈ gridCandidates c K ↔ ∀ j, |g j - c j| ≤ (K j : ℤ) := by |
| 36 | simp only [gridCandidates, Fintype.mem_piFinset, Finset.mem_Icc, abs_le] |
| 37 | constructor |
| 38 | · intro h j |
| 39 | obtain ⟨hlo, hhi⟩ := h j |
| 40 | omega |
| 41 | · intro h j |
| 42 | obtain ⟨hlo, hhi⟩ := h j |
| 43 | omega |
| 44 | |
| 45 | theorem mem_labelCandidates_iff (n : ℕ) (c : Grid) (K : Fin 3 → ℕ) (L : Label) : |
| 46 | L ∈ labelCandidates n c K ↔ L.1 = n ∧ ∀ j, |L.2.1 j - c j| ≤ (K j : ℤ) := by |
| 47 | constructor |
| 48 | · intro h |
| 49 | obtain ⟨gs, hgs, rfl⟩ := Finset.mem_image.mp h |
| 50 | exact ⟨rfl, (mem_gridCandidates_iff c K gs.1).mp (Finset.mem_product.mp hgs).1⟩ |
| 51 | · rintro ⟨hn, hL⟩ |
| 52 | apply Finset.mem_image.mpr |
| 53 | refine ⟨L.2, Finset.mem_product.mpr ⟨(mem_gridCandidates_iff c K L.2.1).mpr hL, |
| 54 | Finset.mem_univ _⟩, ?_⟩ |
| 55 | exact Prod.ext hn.symm rfl |
| 56 | |
| 57 | theorem gridCandidates_card (c : Grid) (K : Fin 3 → ℕ) : |
| 58 | (gridCandidates c K).card = ∏ j, (2 * K j + 1) := by |
| 59 | simp only [gridCandidates, Fintype.card_piFinset, integer_interval_card] |
| 60 | |
| 61 | theorem labelCandidates_card (n : ℕ) (c : Grid) (K : Fin 3 → ℕ) : |
| 62 | (labelCandidates n c K).card = 2 * ∏ j, (2 * K j + 1) := by |
| 63 | unfold labelCandidates |
| 64 | rw [Finset.card_image_of_injective _ (fun _ _ h => Prod.mk.inj h |>.2)] |
| 65 | change ((gridCandidates c K) ×ˢ (Finset.univ : Finset Bool)).card = _ |
| 66 | rw [Finset.card_product, gridCandidates_card] |
| 67 | simp only [Finset.card_univ, Fintype.card_bool, Nat.mul_comm] |
| 68 | |
| 69 | theorem finite_of_index_bounds {s : Set Label} (n : ℕ) (c : Grid) (K : Fin 3 → ℕ) |
| 70 | (hs : ∀ L ∈ s, L.1 = n ∧ ∀ j, |L.2.1 j - c j| ≤ (K j : ℤ)) : s.Finite := by |
| 71 | apply (labelCandidates n c K).finite_toSet.subset |
| 72 | intro L hL |
| 73 | exact (mem_labelCandidates_iff n c K L).mpr (hs L hL) |
| 74 | |
| 75 | theorem ncard_le_of_index_bounds {s : Set Label} (n : ℕ) (c : Grid) (K : Fin 3 → ℕ) |
| 76 | (hs : ∀ L ∈ s, L.1 = n ∧ ∀ j, |L.2.1 j - c j| ≤ (K j : ℤ)) : |
| 77 | s.ncard ≤ 2 * ∏ j, (2 * K j + 1) := by |
| 78 | have hsub : s ⊆ (labelCandidates n c K : Set Label) := by |
| 79 | intro L hL |
| 80 | exact (mem_labelCandidates_iff n c K L).mpr (hs L hL) |
| 81 | simpa only [Set.ncard_coe_finset, labelCandidates_card] using |
| 82 | Set.ncard_le_ncard hsub (labelCandidates n c K).finite_toSet |
| 83 | |
| 84 | /-- Count a finite collection of bands while allowing the grid center to |
| 85 | depend on the band. This dependence is essential for physical points viewed |
| 86 | in their respective normalized charts. -/ |
| 87 | theorem count_of_band_index_bounds {s : Set Label} (F : Finset ℕ) |
| 88 | (c : ℕ → Grid) (K : Fin 3 → ℕ) |
| 89 | (hs : ∀ L ∈ s, L.1 ∈ F ∧ ∀ j, |L.2.1 j - c L.1 j| ≤ (K j : ℤ)) : |
| 90 | s.Finite ∧ s.ncard ≤ F.card * (2 * ∏ j, (2 * K j + 1)) := by |
| 91 | classical |
| 92 | let G := F.biUnion (fun n => labelCandidates n (c n) K) |
| 93 | have hsub : s ⊆ (G : Set Label) := by |
| 94 | intro L hL |
| 95 | obtain ⟨hn, hj⟩ := hs L hL |
| 96 | exact Finset.mem_biUnion.mpr ⟨L.1, hn, |
| 97 | (mem_labelCandidates_iff L.1 (c L.1) K L).mpr ⟨rfl, hj⟩⟩ |
| 98 | refine ⟨G.finite_toSet.subset hsub, ?_⟩ |
| 99 | have hcount : G.card ≤ F.card * (2 * ∏ j, (2 * K j + 1)) := by |
| 100 | calc |
| 101 | G.card ≤ ∑ n ∈ F, (labelCandidates n (c n) K).card := Finset.card_biUnion_le |
| 102 | _ = F.card * (2 * ∏ j, (2 * K j + 1)) := by |
| 103 | simp [labelCandidates_card] |
| 104 | exact (Set.ncard_le_ncard hsub G.finite_toSet).trans |
| 105 | (by simpa only [Set.ncard_coe_finset] using hcount) |
| 106 | |
| 107 | /-- Five consecutive integer indices include every natural band at distance |
| 108 | at most one from a real logarithmic coordinate. -/ |
| 109 | def bandCandidates (c : ℝ) : Finset ℕ := |
| 110 | (Finset.Icc (⌊c⌋ - 2) (⌊c⌋ + 2)).image Int.toNat |
| 111 | |
| 112 | theorem mem_bandCandidates {c : ℝ} {n : ℕ} |
| 113 | (hc : c ∈ Set.Icc ((n : ℝ) - 1) ((n : ℝ) + 1)) : |
| 114 | n ∈ bandCandidates c := by |
| 115 | have hi : |(n : ℤ) - ⌊c⌋| ≤ (2 : ℤ) := by |
| 116 | apply index_near_floor c 1 (n : ℤ) 2 |
| 117 | · simp only [Int.cast_natCast, abs_le] |
| 118 | constructor <;> linarith [hc.1, hc.2] |
| 119 | · norm_num |
| 120 | apply Finset.mem_image.mpr |
| 121 | refine ⟨(n : ℤ), Finset.mem_Icc.mpr ?_, Int.toNat_natCast n⟩ |
| 122 | rw [abs_le] at hi |
| 123 | omega |
| 124 | |
| 125 | theorem bandCandidates_card_le (c : ℝ) : (bandCandidates c).card ≤ 5 := by |
| 126 | calc |
| 127 | (bandCandidates c).card ≤ (Finset.Icc (⌊c⌋ - 2) (⌊c⌋ + 2)).card := |
| 128 | Finset.card_image_le |
| 129 | _ = 5 := by simpa using integer_interval_card ⌊c⌋ 2 |
| 130 | |
| 131 | theorem index_factor_le (n M K : ℕ) (hn : 1 ≤ n) : |
| 132 | 2 * (M * n ^ 6 + K + 1) + 1 ≤ (2 * (M + K + 1) + 1) * n ^ 6 := by |
| 133 | have hpow : 1 ≤ n ^ 6 := Nat.one_le_pow 6 n hn |
| 134 | have hconst : 2 * K + 3 ≤ (2 * K + 3) * n ^ 6 := by |
| 135 | simpa only [Nat.mul_one] using Nat.mul_le_mul_left (2 * K + 3) hpow |
| 136 | calc |
| 137 | 2 * (M * n ^ 6 + K + 1) + 1 = 2 * M * n ^ 6 + (2 * K + 3) := by ring |
| 138 | _ ≤ 2 * M * n ^ 6 + (2 * K + 3) * n ^ 6 := Nat.add_le_add_left hconst _ |
| 139 | _ = (2 * (M + K + 1) + 1) * n ^ 6 := by ring |
| 140 | |
| 141 | theorem box_polynomial_bound (n M K : ℕ) (hn : 1 ≤ n) : |
| 142 | 2 * (∏ _j : Fin 3, (2 * (M * n ^ 6 + K + 1) + 1)) ≤ |
| 143 | (2 * (2 * (M + K + 1) + 1) ^ 3) * n ^ 18 := by |
| 144 | simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] |
| 145 | calc |
| 146 | 2 * (2 * (M * n ^ 6 + K + 1) + 1) ^ 3 ≤ |
| 147 | 2 * ((2 * (M + K + 1) + 1) * n ^ 6) ^ 3 := |
| 148 | Nat.mul_le_mul_left 2 (Nat.pow_le_pow_left (index_factor_le n M K hn) 3) |
| 149 | _ = (2 * (2 * (M + K + 1) + 1) ^ 3) * n ^ 18 := by ring |
| 150 | |
| 151 | theorem radial_polynomial_bound (n M K : ℕ) (hn : 1 ≤ n) : |
| 152 | 2 * (∏ j : Fin 3, (2 * (![M * n ^ 6 + K + 1, K + 1, K + 1] j) + 1)) ≤ |
| 153 | (2 * (2 * (M + K + 1) + 1) * (2 * (K + 1) + 1) ^ 2) * n ^ 6 := by |
| 154 | simp only [Fin.prod_univ_three, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 155 | Matrix.cons_val_two] |
| 156 | calc |
| 157 | 2 * ((2 * (M * n ^ 6 + K + 1) + 1) * (2 * (K + 1) + 1) * |
| 158 | (2 * (K + 1) + 1)) ≤ |
| 159 | 2 * (((2 * (M + K + 1) + 1) * n ^ 6) * (2 * (K + 1) + 1) * |
| 160 | (2 * (K + 1) + 1)) := |
| 161 | Nat.mul_le_mul_left 2 (Nat.mul_le_mul_right _ |
| 162 | (Nat.mul_le_mul_right _ (index_factor_le n M K hn))) |
| 163 | _ = (2 * (2 * (M + K + 1) + 1) * (2 * (K + 1) + 1) ^ 2) * n ^ 6 := by ring |
| 164 | |
| 165 | end NavierStokes.LabelCountingFinite |
| 166 | end |
| 167 | |
| 168 | end |
| 169 | |
| 170 | noncomputable section |
| 171 | |
| 172 | namespace NavierStokes.LabelCounting |
| 173 | |
| 174 | open Set |
| 175 | open scoped BigOperators |
| 176 | open SlotColoring SquaredPartition |
| 177 | |
| 178 | /-- A closed slow-coordinate grid box with an arbitrary enlargement factor. -/ |
| 179 | def normalizedBox (A : ℝ) (L : Label) : Set Position := |
| 180 | {x | ∀ j, |x j - nativeSpacing L.1 * (L.2.1 j : ℝ)| ≤ A * nativeSpacing L.1} |
| 181 | |
| 182 | /-- Both signs are counted separately, exactly as in the manuscript. -/ |
| 183 | def relevantLabels (n : ℕ) (A : ℝ) (B : Set Position) : Set Label := |
| 184 | {L | L.1 = n ∧ (normalizedBox A L ∩ B).Nonempty} |
| 185 | |
| 186 | theorem nativeSpacing_eq (n : ℕ) : nativeSpacing n = ((n : ℝ) ^ 6)⁻¹ := by |
| 187 | simp only [nativeSpacing, ChartScales.S, ← pow_mul] |
| 188 | |
| 189 | /-- A coordinate bounded in physical chart units gives an explicit integer |
| 190 | index bound. The center may vary freely; only the radius affects the count. -/ |
| 191 | theorem index_bound {n : ℕ} (hn : 1 ≤ n) {A x c : ℝ} {i : ℤ} {M K : ℕ} |
| 192 | (hA : A ≤ K) (hx : |x - c| ≤ M) |
| 193 | (hi : |x - nativeSpacing n * (i : ℝ)| ≤ A * nativeSpacing n) : |
| 194 | |i - ⌊c / nativeSpacing n⌋| ≤ (M * n ^ 6 + K + 1 : ℕ) := by |
| 195 | have hd := nativeSpacing_pos hn |
| 196 | have hdist : |c - nativeSpacing n * (i : ℝ)| ≤ (M : ℝ) + A * nativeSpacing n := by |
| 197 | have h := abs_sub_le c x (nativeSpacing n * (i : ℝ)) |
| 198 | rw [abs_sub_comm c x] at h |
| 199 | linarith |
| 200 | have hgap : |c / nativeSpacing n - (i : ℝ)| ≤ (M : ℝ) * (n : ℝ) ^ 6 + K := by |
| 201 | calc |
| 202 | |c / nativeSpacing n - (i : ℝ)| = |
| 203 | |c - nativeSpacing n * (i : ℝ)| / nativeSpacing n := by |
| 204 | have he : c / nativeSpacing n - (i : ℝ) = |
| 205 | (c - nativeSpacing n * (i : ℝ)) / nativeSpacing n := by field_simp |
| 206 | rw [he, abs_div, abs_of_pos hd] |
| 207 | _ ≤ ((M : ℝ) + A * nativeSpacing n) / nativeSpacing n := |
| 208 | div_le_div_of_nonneg_right hdist hd.le |
| 209 | _ = (M : ℝ) * (n : ℝ) ^ 6 + A := by |
| 210 | rw [add_div, mul_div_cancel_right₀ _ hd.ne'] |
| 211 | simp [nativeSpacing_eq, div_eq_mul_inv] |
| 212 | _ ≤ (M : ℝ) * (n : ℝ) ^ 6 + K := by linarith |
| 213 | apply index_near_floor _ _ _ _ hgap |
| 214 | push_cast |
| 215 | rfl |
| 216 | |
| 217 | /-- Explicit count for any chart region contained in a coordinate rectangle. |
| 218 | Coordinates of radius zero make only a constant contribution to this bound. -/ |
| 219 | theorem rectangle_count {n : ℕ} (hn : 1 ≤ n) {A : ℝ} {K : ℕ} (hA : A ≤ K) |
| 220 | (B : Set Position) (c : Position) (M : Fin 3 → ℕ) |
| 221 | (hB : ∀ x ∈ B, ∀ j, |x j - c j| ≤ (M j : ℝ)) : |
| 222 | (relevantLabels n A B).Finite ∧ |
| 223 | (relevantLabels n A B).ncard ≤ 2 * ∏ j, (2 * (M j * n ^ 6 + K + 1) + 1) := by |
| 224 | have hi : ∀ L ∈ relevantLabels n A B, L.1 = n ∧ |
| 225 | ∀ j, |L.2.1 j - ⌊c j / nativeSpacing n⌋| ≤ (M j * n ^ 6 + K + 1 : ℕ) := by |
| 226 | intro L hL |
| 227 | obtain ⟨hl, x, hx, hxB⟩ := hL |
| 228 | refine ⟨hl, fun j => ?_⟩ |
| 229 | apply index_bound hn hA (hB x hxB j) |
| 230 | simpa only [normalizedBox, mem_ofPred_eq, hl] using hx j |
| 231 | exact ⟨LabelCountingFinite.finite_of_index_bounds n _ _ hi, |
| 232 | LabelCountingFinite.ncard_le_of_index_bounds n _ _ hi⟩ |
| 233 | |
| 234 | /-- A normalized radial slice; the two transverse coordinates are arbitrary. -/ |
| 235 | def radialSlice (I : Set ℝ) (Z T : ℝ) : Set Position := |
| 236 | {x | x 0 ∈ I ∧ x 1 = Z ∧ x 2 = T} |
| 237 | |
| 238 | theorem radial_rectangle_count {n : ℕ} (hn : 1 ≤ n) {A : ℝ} {K M : ℕ} |
| 239 | (hA : A ≤ K) (I : Set ℝ) (hI : ∀ r ∈ I, |r| ≤ (M : ℝ)) (Z T : ℝ) : |
| 240 | (relevantLabels n A (radialSlice I Z T)).Finite ∧ |
| 241 | (relevantLabels n A (radialSlice I Z T)).ncard ≤ |
| 242 | 2 * ∏ j, (2 * (![M, 0, 0] j * n ^ 6 + K + 1) + 1) := by |
| 243 | apply rectangle_count hn hA _ ![0, Z, T] ![M, 0, 0] |
| 244 | intro x hx j |
| 245 | fin_cases j |
| 246 | · simpa using hI _ hx.1 |
| 247 | · simp [hx.2.1] |
| 248 | · simp [hx.2.2] |
| 249 | |
| 250 | /-- The three-coordinate count with its polynomial dependence separated from |
| 251 | the fixed chart radius and the fixed box enlargement. -/ |
| 252 | theorem chart_count_of_coordinate_bound {n : ℕ} (hn : 1 ≤ n) {A : ℝ} |
| 253 | {K M : ℕ} (hA : A ≤ K) (B : Set Position) |
| 254 | (hB : ∀ x ∈ B, ∀ j, |x j| ≤ (M : ℝ)) : |
| 255 | (relevantLabels n A B).Finite ∧ |
| 256 | ((relevantLabels n A B).ncard : ℝ) ≤ |
| 257 | (2 * (2 * ((M : ℝ) + K + 1) + 1) ^ 3) * ChartScales.S n ^ 9 := by |
| 258 | obtain ⟨hfin, hcard⟩ := rectangle_count hn hA B 0 (fun _ => M) |
| 259 | (by simpa only [Pi.zero_apply, sub_zero] using hB) |
| 260 | refine ⟨hfin, ?_⟩ |
| 261 | have hb := hcard.trans (LabelCountingFinite.box_polynomial_bound n M K hn) |
| 262 | have hr : ((relevantLabels n A B).ncard : ℝ) ≤ |
| 263 | (2 * (2 * ((M : ℝ) + K + 1) + 1) ^ 3) * (n : ℝ) ^ 18 := by |
| 264 | exact_mod_cast hb |
| 265 | simpa only [ChartScales.S, ← pow_mul] using hr |
| 266 | |
| 267 | /-- The radial count has only one growing coordinate. Its constant is |
| 268 | independent of both transverse coordinates, including arbitrarily large ones. -/ |
| 269 | theorem radial_count_of_bound {n : ℕ} (hn : 1 ≤ n) {A : ℝ} {K M : ℕ} |
| 270 | (hA : A ≤ K) (I : Set ℝ) (hI : ∀ r ∈ I, |r| ≤ (M : ℝ)) (Z T : ℝ) : |
| 271 | (relevantLabels n A (radialSlice I Z T)).Finite ∧ |
| 272 | ((relevantLabels n A (radialSlice I Z T)).ncard : ℝ) ≤ |
| 273 | (2 * (2 * ((M : ℝ) + K + 1) + 1) * (2 * (K + 1) + 1) ^ 2) * |
| 274 | ChartScales.S n ^ 3 := by |
| 275 | obtain ⟨hfin, hcard⟩ := radial_rectangle_count hn hA I hI Z T |
| 276 | refine ⟨hfin, ?_⟩ |
| 277 | have hpoly := LabelCountingFinite.radial_polynomial_bound n M K hn |
| 278 | simp [Fin.prod_univ_three] at hcard hpoly |
| 279 | have hb := hcard.trans hpoly |
| 280 | have hr : ((relevantLabels n A (radialSlice I Z T)).ncard : ℝ) ≤ |
| 281 | (2 * (2 * ((M : ℝ) + K + 1) + 1) * (2 * (K + 1) + 1) ^ 2) * |
| 282 | (n : ℝ) ^ 6 := by |
| 283 | exact_mod_cast hb |
| 284 | simpa only [ChartScales.S, ← pow_mul] using hr |
| 285 | |
| 286 | /-- The compact-chart estimate of `geom:counting-bounds`, proved for every |
| 287 | bounded chart set. The one constant works in every positive band. -/ |
| 288 | theorem bounded_chart_count (A : ℝ) {B : Set Position} (hB : Bornology.IsBounded B) : |
| 289 | ∃ C > 0, ∀ n : ℕ, 1 ≤ n → |
| 290 | (relevantLabels n A B).Finite ∧ |
| 291 | ((relevantLabels n A B).ncard : ℝ) ≤ C * ChartScales.S n ^ 9 := by |
| 292 | obtain ⟨R, hR⟩ := hB.exists_norm_le |
| 293 | obtain ⟨M, hM⟩ := exists_nat_ge R |
| 294 | obtain ⟨K, hK⟩ := exists_nat_ge A |
| 295 | refine ⟨2 * (2 * ((M : ℝ) + K + 1) + 1) ^ 3, by positivity, ?_⟩ |
| 296 | intro n hn |
| 297 | apply chart_count_of_coordinate_bound hn hK B |
| 298 | intro x hx j |
| 299 | simpa only [Real.norm_eq_abs] using (norm_le_pi_norm x j).trans ((hR x hx).trans hM) |
| 300 | |
| 301 | /-- Compact chart sets satisfy the manuscript's `C_B S_n^9` estimate. |
| 302 | The enlargement factor is arbitrary and affects only `C_B`. -/ |
| 303 | theorem compact_chart_count (A : ℝ) {B : Set Position} (hB : IsCompact B) : |
| 304 | ∃ C > 0, ∀ n : ℕ, 1 ≤ n → |
| 305 | (relevantLabels n A B).Finite ∧ |
| 306 | ((relevantLabels n A B).ncard : ℝ) ≤ C * ChartScales.S n ^ 9 := |
| 307 | bounded_chart_count A hB.isBounded |
| 308 | |
| 309 | /-- The radial-line estimate of `geom:counting-bounds`. A single constant |
| 310 | works simultaneously for all bands and all `Z,T`. Bounded intervals are |
| 311 | included; no closedness or endpoint conventions are needed. -/ |
| 312 | theorem bounded_radial_count (A : ℝ) {I : Set ℝ} (hI : Bornology.IsBounded I) : |
| 313 | ∃ C > 0, ∀ n : ℕ, 1 ≤ n → ∀ Z T : ℝ, |
| 314 | (relevantLabels n A (radialSlice I Z T)).Finite ∧ |
| 315 | ((relevantLabels n A (radialSlice I Z T)).ncard : ℝ) ≤ C * ChartScales.S n ^ 3 := by |
| 316 | obtain ⟨R, hR⟩ := hI.exists_norm_le |
| 317 | obtain ⟨M, hM⟩ := exists_nat_ge R |
| 318 | obtain ⟨K, hK⟩ := exists_nat_ge A |
| 319 | refine ⟨2 * (2 * ((M : ℝ) + K + 1) + 1) * (2 * (K + 1) + 1) ^ 2, |
| 320 | by positivity, ?_⟩ |
| 321 | intro n hn Z T |
| 322 | apply radial_count_of_bound hn hK I _ Z T |
| 323 | intro r hr |
| 324 | simpa only [Real.norm_eq_abs] using (hR r hr).trans hM |
| 325 | |
| 326 | /-- Labels whose genuine closed dyadic band and enlarged slow box contain |
| 327 | the point. Each band uses its own physical-to-normalized chart. -/ |
| 328 | def pointwiseLabels (D A q : ℝ) (x : Position) : Set Label := |
| 329 | {L | 1 ≤ L.1 ∧ q ∈ tsupport (dyadicMask (L.1 : ℤ)) ∧ |
| 330 | slowCoordinates D L.1 x ∈ normalizedBox A L} |
| 331 | |
| 332 | /-- For arbitrary fixed slow-box enlargement, no more than five bands and |
| 333 | a constant number of grid indices per band contribute at a point. -/ |
| 334 | theorem pointwise_count_of_bound (D : ℝ) {A : ℝ} {K : ℕ} (hA : A ≤ K) |
| 335 | (q : ℝ) (x : Position) : |
| 336 | (pointwiseLabels D A q x).Finite ∧ |
| 337 | (pointwiseLabels D A q x).ncard ≤ 5 * (2 * (2 * (K + 1) + 1) ^ 3) := by |
| 338 | by_cases hq : 0 < q |
| 339 | · have hs : ∀ L ∈ pointwiseLabels D A q x, |
| 340 | L.1 ∈ LabelCountingFinite.bandCandidates (logCoordinate q) ∧ |
| 341 | ∀ j, |L.2.1 j - ⌊slowCoordinates D L.1 x j / nativeSpacing L.1⌋| ≤ |
| 342 | ((fun _ : Fin 3 => K + 1) j : ℤ) := by |
| 343 | intro L hL |
| 344 | have hb : ChartScales.Q L.1 / 2 ≤ q ∧ q ≤ 2 * ChartScales.Q L.1 := by |
| 345 | simpa only [dyadicMask_tsupport, integerQ_nat, mem_Icc] using hL.2.1 |
| 346 | refine ⟨LabelCountingFinite.mem_bandCandidates |
| 347 | (PhysicalWaveSum.logCoordinate_in_band hq hb.1 hb.2), ?_⟩ |
| 348 | intro j |
| 349 | have hi := index_bound hL.1 hA (M := 0) |
| 350 | (x := slowCoordinates D L.1 x j) (c := slowCoordinates D L.1 x j) |
| 351 | (by simp) (hL.2.2 j) |
| 352 | simpa only [Nat.zero_mul, Nat.zero_add] using hi |
| 353 | obtain ⟨hfin, hcount⟩ := LabelCountingFinite.count_of_band_index_bounds |
| 354 | (LabelCountingFinite.bandCandidates (logCoordinate q)) |
| 355 | (fun n j => ⌊slowCoordinates D n x j / nativeSpacing n⌋) (fun _ => K + 1) hs |
| 356 | refine ⟨hfin, hcount.trans ?_⟩ |
| 357 | simpa only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] using |
| 358 | Nat.mul_le_mul_right (2 * (2 * (K + 1) + 1) ^ 3) |
| 359 | (LabelCountingFinite.bandCandidates_card_le (logCoordinate q)) |
| 360 | · have he : pointwiseLabels D A q x = ∅ := by |
| 361 | apply Set.eq_empty_iff_forall_notMem.mpr |
| 362 | intro L hL |
| 363 | have hb : ChartScales.Q L.1 / 2 ≤ q ∧ q ≤ 2 * ChartScales.Q L.1 := by |
| 364 | simpa only [dyadicMask_tsupport, integerQ_nat, mem_Icc] using hL.2.1 |
| 365 | exact hq ((div_pos (ChartScales.Q_pos L.1) (by norm_num)).trans_le hb.1) |
| 366 | simp [he] |
| 367 | |
| 368 | /-- The uniform pointwise overlap estimate, including every fixed-factor |
| 369 | enlargement of the mesh boxes. The constant is also independent of `D`. -/ |
| 370 | theorem pointwise_count (A : ℝ) : |
| 371 | ∃ C > 0, ∀ D q : ℝ, ∀ x : Position, |
| 372 | (pointwiseLabels D A q x).Finite ∧ |
| 373 | ((pointwiseLabels D A q x).ncard : ℝ) ≤ C := by |
| 374 | obtain ⟨K, hK⟩ := exists_nat_ge A |
| 375 | refine ⟨(5 * (2 * (2 * ((K : ℝ) + 1) + 1) ^ 3)), by positivity, ?_⟩ |
| 376 | intro D q x |
| 377 | obtain ⟨hfin, hcount⟩ := pointwise_count_of_bound D hK q x |
| 378 | exact ⟨hfin, by exact_mod_cast hcount⟩ |
| 379 | |
| 380 | /-- All three conclusions of `geom:label-counts` for an arbitrary fixed |
| 381 | enlargement. Constants are chosen before the band and point variables. -/ |
| 382 | theorem number_of_relevant_labels (A : ℝ) : |
| 383 | (∃ C > 0, ∀ D q : ℝ, ∀ x : Position, |
| 384 | (pointwiseLabels D A q x).Finite ∧ |
| 385 | ((pointwiseLabels D A q x).ncard : ℝ) ≤ C) ∧ |
| 386 | (∀ B : Set Position, IsCompact B → ∃ C > 0, ∀ n : ℕ, 1 ≤ n → |
| 387 | (relevantLabels n A B).Finite ∧ |
| 388 | ((relevantLabels n A B).ncard : ℝ) ≤ C * ChartScales.S n ^ 9) ∧ |
| 389 | (∀ I : Set ℝ, Bornology.IsBounded I → ∃ C > 0, ∀ n : ℕ, 1 ≤ n → ∀ Z T : ℝ, |
| 390 | (relevantLabels n A (radialSlice I Z T)).Finite ∧ |
| 391 | ((relevantLabels n A (radialSlice I Z T)).ncard : ℝ) ≤ C * ChartScales.S n ^ 3) := |
| 392 | ⟨pointwise_count A, fun _ hB => compact_chart_count A hB, |
| 393 | fun _ hI => bounded_radial_count A hI⟩ |
| 394 | |
| 395 | /-- Admissibility restrictions on labels can only reduce any of the three |
| 396 | counts. This applies without any finiteness assumption on the restriction |
| 397 | `Γ` itself. -/ |
| 398 | theorem restrict_count (Γ : Set Label) {s : Set Label} {C : ℝ} |
| 399 | (hs : s.Finite ∧ (s.ncard : ℝ) ≤ C) : |
| 400 | (Γ ∩ s).Finite ∧ ((Γ ∩ s).ncard : ℝ) ≤ C := by |
| 401 | refine ⟨hs.1.subset inter_subset_right, ?_⟩ |
| 402 | have hcard : ((Γ ∩ s).ncard : ℝ) ≤ s.ncard := by |
| 403 | exact_mod_cast Set.ncard_le_ncard inter_subset_right hs.1 |
| 404 | exact hcard.trans hs.2 |
| 405 | |
| 406 | end NavierStokes.LabelCounting |