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.SlotGeometry |
| 2 | import Mathlib.Analysis.SpecialFunctions.Pow.Real |
| 3 | import Mathlib.Data.Fintype.Pi |
| 4 | import Mathlib.Data.Fintype.Card |
| 5 | import Mathlib.Data.Fintype.BigOperators |
| 6 | import Mathlib.LinearAlgebra.Matrix.Notation |
| 7 | import Mathlib.Algebra.Order.Floor.Ring |
| 8 | import Mathlib.Algebra.Order.Floor.Semiring |
| 9 | import Mathlib.Order.Interval.Finset.Nat |
| 10 | import Mathlib.Analysis.Real.Sqrt |
| 11 | |
| 12 | /-! |
| 13 | # Physical grid labels, bounded degree, and an explicit finite coloring |
| 14 | |
| 15 | Labels consist of a dyadic level, three integer grid coordinates, and a sign. |
| 16 | The physical mesh at exponent `a` is `2^(-n*a)/n^6`, namely the mesh |
| 17 | `S_n^-3` with `S_n=n²`, rescaled by `Q_n^a` with `Q_n=2^-n`. |
| 18 | Closed boxes of two mesh widths include the fixed small enlargement of the |
| 19 | one-mesh supports in the manuscript. |
| 20 | -/ |
| 21 | |
| 22 | noncomputable section |
| 23 | |
| 24 | namespace NavierStokes.SlotColoring |
| 25 | |
| 26 | open Set |
| 27 | open scoped BigOperators |
| 28 | |
| 29 | abbrev Grid := Fin 3 → ℤ |
| 30 | abbrev Position := Fin 3 → ℝ |
| 31 | abbrev Label := ℕ × (Grid × Bool) |
| 32 | |
| 33 | def dyadicQ (n : ℕ) : ℝ := (2 : ℝ) ^ (-(n : ℝ)) |
| 34 | |
| 35 | def spacing (a : ℝ) (n : ℕ) : ℝ := (2 : ℝ) ^ (-(n : ℝ) * a) / (n : ℝ) ^ 6 |
| 36 | |
| 37 | theorem spacing_eq_scaled_mesh (a : ℝ) (n : ℕ) : |
| 38 | spacing a n = dyadicQ n ^ a * (1 / (((n : ℝ) ^ 2) ^ 3)) := by |
| 39 | unfold spacing dyadicQ |
| 40 | rw [← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2)] |
| 41 | simp only [← pow_mul] |
| 42 | norm_num |
| 43 | ring |
| 44 | |
| 45 | theorem spacing_pos (a : ℝ) {n : ℕ} (hn : 1 ≤ n) : 0 < spacing a n := by |
| 46 | have hn' : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) |
| 47 | exact div_pos (Real.rpow_pos_of_pos (by norm_num) _) (pow_pos hn' _) |
| 48 | |
| 49 | theorem spacing_ratio (a : ℝ) {n m : ℕ} (hn : 1 ≤ n) (hm : 1 ≤ m) : |
| 50 | spacing a n / spacing a m = |
| 51 | ((m : ℝ) / (n : ℝ)) ^ 6 * (2 : ℝ) ^ (((m : ℝ) - (n : ℝ)) * a) := by |
| 52 | have hn' : (n : ℝ) ≠ 0 := by exact_mod_cast (by omega : n ≠ 0) |
| 53 | have hm' : (m : ℝ) ≠ 0 := by exact_mod_cast (by omega : m ≠ 0) |
| 54 | have he : (2 : ℝ) ^ (-(m : ℝ) * a) ≠ 0 := ne_of_gt (Real.rpow_pos_of_pos (by norm_num) _) |
| 55 | have hp : (2 : ℝ) ^ (((m : ℝ) - (n : ℝ)) * a) = |
| 56 | (2 : ℝ) ^ (-(n : ℝ) * a) / (2 : ℝ) ^ (-(m : ℝ) * a) := by |
| 57 | rw [← Real.rpow_sub (by norm_num : (0 : ℝ) < 2)] |
| 58 | congr 1 |
| 59 | ring |
| 60 | rw [hp] |
| 61 | unfold spacing |
| 62 | rw [div_pow] |
| 63 | field_simp |
| 64 | |
| 65 | /-- The mesh ratio is uniform across levels at distance at most four. -/ |
| 66 | theorem spacing_ratio_le (a A : ℝ) {n m : ℕ} |
| 67 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) |
| 68 | (ha : |a| ≤ A) : |
| 69 | spacing a n / spacing a m ≤ (5 : ℝ) ^ 6 * (2 : ℝ) ^ (4 * A) := by |
| 70 | rw [spacing_ratio a hn hm] |
| 71 | have hn' : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) |
| 72 | have hm0 : (0 : ℝ) ≤ m := by positivity |
| 73 | have hm5 : (m : ℝ) ≤ 5 * (n : ℝ) := by exact_mod_cast (by omega : m ≤ 5 * n) |
| 74 | have hquot : (m : ℝ) / (n : ℝ) ≤ 5 := (div_le_iff₀ hn').mpr hm5 |
| 75 | have hpow : ((m : ℝ) / (n : ℝ)) ^ 6 ≤ (5 : ℝ) ^ 6 := |
| 76 | pow_le_pow_left₀ (div_nonneg hm0 hn'.le) hquot 6 |
| 77 | have hdiff : |(m : ℝ) - (n : ℝ)| ≤ 4 := by |
| 78 | have h1 : (n : ℝ) ≤ (m : ℝ) + 4 := by exact_mod_cast hnm |
| 79 | have h2 : (m : ℝ) ≤ (n : ℝ) + 4 := by exact_mod_cast hmn |
| 80 | rw [abs_le] |
| 81 | constructor <;> linarith |
| 82 | have hexp : ((m : ℝ) - (n : ℝ)) * a ≤ 4 * A := by |
| 83 | calc |
| 84 | ((m : ℝ) - (n : ℝ)) * a ≤ |((m : ℝ) - (n : ℝ)) * a| := le_abs_self _ |
| 85 | _ = |(m : ℝ) - (n : ℝ)| * |a| := abs_mul _ _ |
| 86 | _ ≤ 4 * |a| := mul_le_mul_of_nonneg_right hdiff (abs_nonneg a) |
| 87 | _ ≤ 4 * A := mul_le_mul_of_nonneg_left ha (by norm_num) |
| 88 | exact mul_le_mul hpow (Real.rpow_le_rpow_of_exponent_le (by norm_num) hexp) |
| 89 | (Real.rpow_nonneg (by norm_num) _) (by positivity) |
| 90 | |
| 91 | def axisExponent (D : ℝ) : Fin 3 → ℝ := ![1 / 2, D, 1] |
| 92 | def width (D : ℝ) (j : Fin 3) (n : ℕ) : ℝ := spacing (axisExponent D j) n |
| 93 | def ratioBound (D : ℝ) : ℝ := (5 : ℝ) ^ 6 * (2 : ℝ) ^ (4 * (1 + |D|)) |
| 94 | |
| 95 | theorem width_pos (D : ℝ) (j : Fin 3) {n : ℕ} (hn : 1 ≤ n) : 0 < width D j n := |
| 96 | spacing_pos _ hn |
| 97 | |
| 98 | theorem width_ratio_le (D : ℝ) (j : Fin 3) {n m : ℕ} |
| 99 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 100 | width D j n / width D j m ≤ ratioBound D := by |
| 101 | apply spacing_ratio_le _ _ hn hm hnm hmn |
| 102 | fin_cases j |
| 103 | · change |(1 / 2 : ℝ)| ≤ 1 + |D| |
| 104 | rw [abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2)] |
| 105 | linarith [abs_nonneg D] |
| 106 | · change |D| ≤ 1 + |D| |
| 107 | linarith |
| 108 | · change |(1 : ℝ)| ≤ 1 + |D| |
| 109 | rw [abs_one] |
| 110 | linarith [abs_nonneg D] |
| 111 | |
| 112 | def physicalBox (D : ℝ) (L : Label) : Set Position := |
| 113 | {x | ∀ j, |x j - width D j L.1 * (L.2.1 j : ℝ)| ≤ 2 * width D j L.1} |
| 114 | |
| 115 | /-- The exact enlarged-box interaction relation used for coloring. -/ |
| 116 | structure Adj (D : ℝ) (L M : Label) : Prop where |
| 117 | left_positive : 1 ≤ L.1 |
| 118 | right_positive : 1 ≤ M.1 |
| 119 | distinct : L ≠ M |
| 120 | left_level_le : L.1 ≤ M.1 + 4 |
| 121 | right_level_le : M.1 ≤ L.1 + 4 |
| 122 | overlap : (physicalBox D L ∩ physicalBox D M).Nonempty |
| 123 | |
| 124 | theorem overlapping_centers (D : ℝ) (L M : Label) |
| 125 | (hov : (physicalBox D L ∩ physicalBox D M).Nonempty) (j : Fin 3) : |
| 126 | |width D j L.1 * (L.2.1 j : ℝ) - width D j M.1 * (M.2.1 j : ℝ)| ≤ |
| 127 | 2 * (width D j L.1 + width D j M.1) := by |
| 128 | obtain ⟨x, hx, hy⟩ := hov |
| 129 | have htriangle := abs_sub_le (width D j L.1 * (L.2.1 j : ℝ)) (x j) |
| 130 | (width D j M.1 * (M.2.1 j : ℝ)) |
| 131 | rw [abs_sub_comm (width D j L.1 * (L.2.1 j : ℝ)) (x j)] at htriangle |
| 132 | linarith [hx j, hy j] |
| 133 | |
| 134 | theorem same_level_grid_gap (D : ℝ) (L M : Label) (hn : 1 ≤ L.1) |
| 135 | (hl : L.1 = M.1) (hov : (physicalBox D L ∩ physicalBox D M).Nonempty) (j : Fin 3) : |
| 136 | |L.2.1 j - M.2.1 j| ≤ (4 : ℤ) := by |
| 137 | have h := overlapping_centers D L M hov j |
| 138 | rw [← hl, ← mul_sub, abs_mul, abs_of_pos (width_pos D j hn)] at h |
| 139 | have hr : |(L.2.1 j : ℝ) - (M.2.1 j : ℝ)| ≤ 4 := by |
| 140 | nlinarith [width_pos D j hn] |
| 141 | exact_mod_cast hr |
| 142 | |
| 143 | def intColor (z : ℤ) : Fin 5 := |
| 144 | ⟨(z % 5).toNat, by |
| 145 | have h0 := Int.emod_nonneg z (by norm_num : (5 : ℤ) ≠ 0) |
| 146 | have h1 := Int.emod_lt_of_pos z (by norm_num : (0 : ℤ) < 5) |
| 147 | omega⟩ |
| 148 | |
| 149 | theorem intColor_eq_of_close {z w : ℤ} (hc : intColor z = intColor w) |
| 150 | (hd : |z - w| ≤ 4) : z = w := by |
| 151 | have hv := congrArg Fin.val hc |
| 152 | dsimp [intColor] at hv |
| 153 | have hz0 := Int.emod_nonneg z (by norm_num : (5 : ℤ) ≠ 0) |
| 154 | have hw0 := Int.emod_nonneg w (by norm_num : (5 : ℤ) ≠ 0) |
| 155 | have hdiff := abs_le.mp hd |
| 156 | omega |
| 157 | |
| 158 | abbrev Palette := Fin 9 × ((Fin 3 → Fin 5) × Bool) |
| 159 | |
| 160 | def colorData (L : Label) : Palette := |
| 161 | (⟨L.1 % 9, Nat.mod_lt _ (by norm_num)⟩, (fun j => intColor (L.2.1 j), L.2.2)) |
| 162 | |
| 163 | theorem palette_card : Fintype.card Palette = 2250 := by |
| 164 | norm_num [Palette, Fintype.card_prod, Fintype.card_fun] |
| 165 | |
| 166 | /-- This is a constructed coloring, not a coloring hypothesis. -/ |
| 167 | theorem colorData_proper (D : ℝ) {L M : Label} (h : Adj D L M) : colorData L ≠ colorData M := by |
| 168 | intro hc |
| 169 | have hlevel := congrArg (fun c : Palette => c.1.val) hc |
| 170 | change L.1 % 9 = M.1 % 9 at hlevel |
| 171 | have hl : L.1 = M.1 := by |
| 172 | have h1 := h.left_level_le |
| 173 | have h2 := h.right_level_le |
| 174 | omega |
| 175 | have hg : L.2.1 = M.2.1 := by |
| 176 | funext j |
| 177 | apply intColor_eq_of_close |
| 178 | · exact congrArg (fun c : Palette => c.2.1 j) hc |
| 179 | · exact same_level_grid_gap D L M h.left_positive hl h.overlap j |
| 180 | have hs : L.2.2 = M.2.2 := congrArg (fun c : Palette => c.2.2) hc |
| 181 | exact h.distinct (Prod.ext hl (Prod.ext hg hs)) |
| 182 | |
| 183 | def color (L : Label) : Fin (Fintype.card Palette) := (Fintype.equivFin Palette) (colorData L) |
| 184 | |
| 185 | theorem color_proper (D : ℝ) {L M : Label} (h : Adj D L M) : color L ≠ color M := by |
| 186 | intro hc |
| 187 | exact colorData_proper D h ((Fintype.equivFin Palette).injective hc) |
| 188 | |
| 189 | theorem index_near_floor (c A : ℝ) (j : ℤ) (K : ℕ) |
| 190 | (hgap : |c - (j : ℝ)| ≤ A) (hK : A + 1 ≤ (K : ℝ)) : |
| 191 | |j - ⌊c⌋| ≤ (K : ℤ) := by |
| 192 | have hfloor : |c - (⌊c⌋ : ℝ)| ≤ 1 := by |
| 193 | rw [abs_of_nonneg (sub_nonneg.mpr (Int.floor_le c))] |
| 194 | linarith [Int.lt_floor_add_one c] |
| 195 | have ht := abs_sub_le (j : ℝ) c (⌊c⌋ : ℝ) |
| 196 | rw [abs_sub_comm (j : ℝ) c] at ht |
| 197 | have hreal : |(j : ℝ) - (⌊c⌋ : ℝ)| ≤ (K : ℝ) := by linarith |
| 198 | exact_mod_cast hreal |
| 199 | |
| 200 | theorem integer_interval_card (c : ℤ) (K : ℕ) : |
| 201 | (Finset.Icc (c - (K : ℤ)) (c + (K : ℤ))).card = 2 * K + 1 := by |
| 202 | rw [Int.card_Icc] |
| 203 | omega |
| 204 | |
| 205 | /-- The expanding eigenvalue of the actual covering matrix. -/ |
| 206 | def coverGrowth : ℝ := 4 + Real.sqrt 2 |
| 207 | |
| 208 | theorem log_coverGrowth_pos : 0 < Real.log coverGrowth := by |
| 209 | apply Real.log_pos |
| 210 | unfold coverGrowth |
| 211 | linarith [Real.sqrt_nonneg (2 : ℝ)] |
| 212 | |
| 213 | /-- The real expression whose floor defines the manuscript's native index. -/ |
| 214 | def nativeArgument (h : ℝ) (n : ℕ) : ℝ := |
| 215 | Real.log (dyadicQ n ^ (-1 - h) / (n : ℝ) ^ 2) / Real.log coverGrowth |
| 216 | |
| 217 | def nativeIndex (h : ℝ) (n : ℕ) : ℕ := ⌊nativeArgument h n⌋₊ |
| 218 | |
| 219 | theorem nativeArgument_expanded (h : ℝ) {n : ℕ} (hn : 1 ≤ n) : |
| 220 | nativeArgument h n = |
| 221 | ((n : ℝ) * (1 + h) * Real.log 2 - 2 * Real.log (n : ℝ)) / Real.log coverGrowth := by |
| 222 | have hn' : (n : ℝ) ≠ 0 := by exact_mod_cast (by omega : n ≠ 0) |
| 223 | have hq : 0 < dyadicQ n := Real.rpow_pos_of_pos (by norm_num) _ |
| 224 | unfold nativeArgument |
| 225 | rw [Real.log_div (ne_of_gt (Real.rpow_pos_of_pos hq _)) (pow_ne_zero 2 hn'), |
| 226 | Real.log_rpow hq, Real.log_pow] |
| 227 | unfold dyadicQ |
| 228 | rw [Real.log_rpow (by norm_num : (0 : ℝ) < 2)] |
| 229 | norm_num |
| 230 | ring |
| 231 | |
| 232 | def nativeGapBudget (h : ℝ) : ℝ := |
| 233 | (4 * (1 + h) * Real.log 2 + 2 * Real.log 5) / Real.log coverGrowth |
| 234 | |
| 235 | def nativeGap (h : ℝ) : ℕ := ⌈nativeGapBudget h⌉₊ + 1 |
| 236 | |
| 237 | theorem log_level_gap {n m : ℕ} (hn : 1 ≤ n) (hm : 1 ≤ m) |
| 238 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 239 | |Real.log (n : ℝ) - Real.log (m : ℝ)| ≤ Real.log 5 := by |
| 240 | have hn' : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) |
| 241 | have hm' : (0 : ℝ) < m := by exact_mod_cast (by omega : 0 < m) |
| 242 | have hn5 : (n : ℝ) ≤ 5 * (m : ℝ) := by exact_mod_cast (by omega : n ≤ 5 * m) |
| 243 | have hm5 : (m : ℝ) ≤ 5 * (n : ℝ) := by exact_mod_cast (by omega : m ≤ 5 * n) |
| 244 | have h1 := Real.log_le_log hn' hn5 |
| 245 | have h2 := Real.log_le_log hm' hm5 |
| 246 | rw [Real.log_mul (by norm_num : (5 : ℝ) ≠ 0) (ne_of_gt hm')] at h1 |
| 247 | rw [Real.log_mul (by norm_num : (5 : ℝ) ≠ 0) (ne_of_gt hn')] at h2 |
| 248 | rw [abs_le] |
| 249 | constructor <;> linarith |
| 250 | |
| 251 | theorem nativeArgument_gap (h : ℝ) (hh : 0 ≤ h) {n m : ℕ} |
| 252 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 253 | |nativeArgument h n - nativeArgument h m| ≤ nativeGapBudget h := by |
| 254 | have hlog2 : 0 ≤ Real.log (2 : ℝ) := (Real.log_pos (by norm_num)).le |
| 255 | have h1h : 0 ≤ 1 + h := by linarith |
| 256 | have hdiff : |(n : ℝ) - (m : ℝ)| ≤ 4 := by |
| 257 | have hn' : (n : ℝ) ≤ (m : ℝ) + 4 := by exact_mod_cast hnm |
| 258 | have hm' : (m : ℝ) ≤ (n : ℝ) + 4 := by exact_mod_cast hmn |
| 259 | rw [abs_le] |
| 260 | constructor <;> linarith |
| 261 | have hlogs := log_level_gap hn hm hnm hmn |
| 262 | have hnum : |
| 263 | |((n : ℝ) - (m : ℝ)) * (1 + h) * Real.log 2 - |
| 264 | 2 * (Real.log (n : ℝ) - Real.log (m : ℝ))| ≤ |
| 265 | 4 * (1 + h) * Real.log 2 + 2 * Real.log 5 := by |
| 266 | calc |
| 267 | _ ≤ |((n : ℝ) - (m : ℝ)) * (1 + h) * Real.log 2| + |
| 268 | |2 * (Real.log (n : ℝ) - Real.log (m : ℝ))| := abs_sub _ _ |
| 269 | _ = |(n : ℝ) - (m : ℝ)| * (1 + h) * Real.log 2 + |
| 270 | 2 * |Real.log (n : ℝ) - Real.log (m : ℝ)| := by |
| 271 | rw [abs_mul, abs_mul, abs_of_nonneg hlog2, abs_of_nonneg h1h, |
| 272 | abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] |
| 273 | _ ≤ _ := add_le_add |
| 274 | (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hdiff h1h) hlog2) |
| 275 | (mul_le_mul_of_nonneg_left hlogs (by norm_num)) |
| 276 | calc |
| 277 | |nativeArgument h n - nativeArgument h m| = |
| 278 | |(((n : ℝ) - (m : ℝ)) * (1 + h) * Real.log 2 - |
| 279 | 2 * (Real.log (n : ℝ) - Real.log (m : ℝ))) / Real.log coverGrowth| := by |
| 280 | rw [nativeArgument_expanded h hn, nativeArgument_expanded h hm] |
| 281 | congr 1 |
| 282 | ring |
| 283 | _ = |((n : ℝ) - (m : ℝ)) * (1 + h) * Real.log 2 - |
| 284 | 2 * (Real.log (n : ℝ) - Real.log (m : ℝ))| / Real.log coverGrowth := by |
| 285 | rw [abs_div, abs_of_pos log_coverGrowth_pos] |
| 286 | _ ≤ nativeGapBudget h := div_le_div_of_nonneg_right hnum log_coverGrowth_pos.le |
| 287 | |
| 288 | theorem natFloor_gap_le (u v C : ℝ) (h : u - v ≤ C) : |
| 289 | ⌊u⌋₊ ≤ ⌊v⌋₊ + (⌈C⌉₊ + 1) := by |
| 290 | apply Nat.floor_le_of_le |
| 291 | push_cast |
| 292 | linarith [Nat.lt_floor_add_one v, Nat.le_ceil C] |
| 293 | |
| 294 | /-- The actual adjacent native indices have an explicit uniform gap. -/ |
| 295 | theorem nativeIndex_gap (h : ℝ) (hh : 0 ≤ h) {n m : ℕ} |
| 296 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 297 | nativeIndex h n ≤ nativeIndex h m + nativeGap h ∧ |
| 298 | nativeIndex h m ≤ nativeIndex h n + nativeGap h := by |
| 299 | have hg := abs_le.mp (nativeArgument_gap h hh hn hm hnm hmn) |
| 300 | constructor |
| 301 | · exact natFloor_gap_le _ _ _ hg.2 |
| 302 | · exact natFloor_gap_le _ _ _ (by linarith [hg.1]) |
| 303 | |
| 304 | theorem nat_square_le_two_pow {n : ℕ} (hn : 4 ≤ n) : n ^ 2 ≤ 2 ^ n := by |
| 305 | induction n, hn using Nat.le_induction with |
| 306 | | base => norm_num |
| 307 | | succ n hn ih => |
| 308 | have hmul := Nat.mul_le_mul_right n hn |
| 309 | calc |
| 310 | (n + 1) ^ 2 ≤ 2 * n ^ 2 := by nlinarith |
| 311 | _ ≤ 2 * 2 ^ n := Nat.mul_le_mul_left 2 ih |
| 312 | _ = 2 ^ (n + 1) := by rw [pow_succ]; ring |
| 313 | |
| 314 | /-- `n=4` is already a valid uniform threshold for nonnegative native indices |
| 315 | when `h≥0`; the manuscript subsequently retains still larger bands. -/ |
| 316 | theorem nativeArgument_nonneg (h : ℝ) (hh : 0 ≤ h) {n : ℕ} (hn : 4 ≤ n) : |
| 317 | 0 ≤ nativeArgument h n := by |
| 318 | have hn' : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) |
| 319 | have hsquare : (n : ℝ) ^ 2 ≤ (2 : ℝ) ^ n := by exact_mod_cast nat_square_le_two_pow hn |
| 320 | have hq : (n : ℝ) ^ 2 ≤ dyadicQ n ^ (-1 - h) := by |
| 321 | unfold dyadicQ |
| 322 | rw [← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2)] |
| 323 | calc |
| 324 | (n : ℝ) ^ 2 ≤ (2 : ℝ) ^ n := hsquare |
| 325 | _ = (2 : ℝ) ^ (n : ℝ) := (Real.rpow_natCast _ _).symm |
| 326 | _ ≤ (2 : ℝ) ^ (-(n : ℝ) * (-1 - h)) := |
| 327 | Real.rpow_le_rpow_of_exponent_le (by norm_num) (by nlinarith) |
| 328 | have hratio : 1 ≤ dyadicQ n ^ (-1 - h) / (n : ℝ) ^ 2 := by |
| 329 | apply (le_div_iff₀ (pow_pos hn' 2)).mpr |
| 330 | simpa using hq |
| 331 | exact div_nonneg (Real.log_nonneg hratio) log_coverGrowth_pos.le |
| 332 | |
| 333 | end NavierStokes.SlotColoring |