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 Mathlib.NumberTheory.Real.Irrational |
| 2 | import Mathlib.Tactic.FieldSimp |
| 3 | import Mathlib.Tactic.Linarith |
| 4 | import Mathlib.Tactic.NormNum |
| 5 | import Mathlib.Tactic.Positivity |
| 6 | import Mathlib.Tactic.Ring |
| 7 | |
| 8 | /-! |
| 9 | # Diophantine bounds for the manuscript's graph directions |
| 10 | |
| 11 | For every nonzero integer frequency `(m,n)`, the directions |
| 12 | `v_r = (1, 1 - sqrt 2)` and `v_t = (sqrt 2 - 1, 1)` have symbols bounded |
| 13 | below by `(1/6)/(1 + sqrt (m^2+n^2))`. The proof multiplies each quadratic |
| 14 | integer by its conjugate, proves that the resulting integer is nonzero using |
| 15 | irrationality of `sqrt 2`, and bounds the conjugate explicitly. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace NavierStokes.DiophantineGraph |
| 21 | |
| 22 | def quadraticForm (p q : ℤ) : ℝ := (p : ℝ) + Real.sqrt 2 * (q : ℝ) |
| 23 | |
| 24 | def integerNorm (p q : ℤ) : ℤ := p ^ 2 - 2 * q ^ 2 |
| 25 | |
| 26 | theorem sqrt_two_square : (Real.sqrt 2) ^ 2 = (2 : ℝ) := |
| 27 | Real.sq_sqrt (by norm_num) |
| 28 | |
| 29 | theorem sqrt_two_le_two : Real.sqrt 2 ≤ (2 : ℝ) := by |
| 30 | nlinarith [sqrt_two_square, Real.sqrt_nonneg (2 : ℝ)] |
| 31 | |
| 32 | theorem quadraticForm_ne_zero (p q : ℤ) (hpq : p ≠ 0 ∨ q ≠ 0) : |
| 33 | quadraticForm p q ≠ 0 := by |
| 34 | by_cases hq : q = 0 |
| 35 | · have hp : p ≠ 0 := hpq.resolve_right (not_not.mpr hq) |
| 36 | simpa [quadraticForm, hq] using hp |
| 37 | · exact ((irrational_sqrt_two.mul_intCast hq).intCast_add p).ne_zero |
| 38 | |
| 39 | theorem conjugate_product (p q : ℤ) : |
| 40 | quadraticForm p q * quadraticForm p (-q) = (integerNorm p q : ℝ) := by |
| 41 | simp only [quadraticForm, integerNorm, Int.cast_neg, Int.cast_sub, |
| 42 | Int.cast_pow, Int.cast_mul, Int.cast_ofNat] |
| 43 | nlinarith [congrArg (fun x : ℝ => x * (q : ℝ) ^ 2) sqrt_two_square] |
| 44 | |
| 45 | theorem integerNorm_ne_zero (p q : ℤ) (hpq : p ≠ 0 ∨ q ≠ 0) : |
| 46 | integerNorm p q ≠ 0 := by |
| 47 | have hconj : p ≠ 0 ∨ -q ≠ 0 := by |
| 48 | rcases hpq with hp | hq |
| 49 | · exact Or.inl hp |
| 50 | · exact Or.inr (neg_ne_zero.mpr hq) |
| 51 | have hprod := mul_ne_zero (quadraticForm_ne_zero p q hpq) |
| 52 | (quadraticForm_ne_zero p (-q) hconj) |
| 53 | intro hz |
| 54 | apply hprod |
| 55 | rw [conjugate_product, hz, Int.cast_zero] |
| 56 | |
| 57 | /-- The nonzero algebraic norm is an integer, so its absolute value is at least one. -/ |
| 58 | theorem conjugate_product_lower (p q : ℤ) (hpq : p ≠ 0 ∨ q ≠ 0) : |
| 59 | 1 ≤ |quadraticForm p q| * |quadraticForm p (-q)| := by |
| 60 | have hi : (1 : ℤ) ≤ |integerNorm p q| := |
| 61 | Int.add_one_le_iff.mpr (abs_pos.mpr (integerNorm_ne_zero p q hpq)) |
| 62 | have hr : (1 : ℝ) ≤ |(integerNorm p q : ℝ)| := by exact_mod_cast hi |
| 63 | rw [← conjugate_product, abs_mul] at hr |
| 64 | exact hr |
| 65 | |
| 66 | def radialSymbol (m n : ℤ) : ℝ := quadraticForm (m + n) (-n) |
| 67 | |
| 68 | def timeSymbol (m n : ℤ) : ℝ := quadraticForm (n - m) m |
| 69 | |
| 70 | def radialConjugate (m n : ℤ) : ℝ := quadraticForm (m + n) n |
| 71 | |
| 72 | def timeConjugate (m n : ℤ) : ℝ := quadraticForm (n - m) (-m) |
| 73 | |
| 74 | theorem radialSymbol_formula (m n : ℤ) : |
| 75 | radialSymbol m n = (m : ℝ) + (1 - Real.sqrt 2) * (n : ℝ) := by |
| 76 | simp only [radialSymbol, quadraticForm, Int.cast_add, Int.cast_neg] |
| 77 | ring |
| 78 | |
| 79 | theorem timeSymbol_formula (m n : ℤ) : |
| 80 | timeSymbol m n = (Real.sqrt 2 - 1) * (m : ℝ) + (n : ℝ) := by |
| 81 | simp only [timeSymbol, quadraticForm, Int.cast_sub] |
| 82 | ring |
| 83 | |
| 84 | theorem radialConjugate_formula (m n : ℤ) : |
| 85 | radialConjugate m n = (m : ℝ) + (1 + Real.sqrt 2) * (n : ℝ) := by |
| 86 | simp only [radialConjugate, quadraticForm, Int.cast_add] |
| 87 | ring |
| 88 | |
| 89 | theorem timeConjugate_formula (m n : ℤ) : |
| 90 | timeConjugate m n = (n : ℝ) - (1 + Real.sqrt 2) * (m : ℝ) := by |
| 91 | simp only [timeConjugate, quadraticForm, Int.cast_sub, Int.cast_neg] |
| 92 | ring |
| 93 | |
| 94 | theorem radial_product_lower (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 95 | 1 ≤ |radialSymbol m n| * |radialConjugate m n| := by |
| 96 | have hpq : m + n ≠ 0 ∨ -n ≠ 0 := by |
| 97 | by_cases hn : n = 0 |
| 98 | · left |
| 99 | simpa [hn] using hmn.resolve_right (not_not.mpr hn) |
| 100 | · exact Or.inr (neg_ne_zero.mpr hn) |
| 101 | simpa only [radialSymbol, radialConjugate, neg_neg] using |
| 102 | conjugate_product_lower (m + n) (-n) hpq |
| 103 | |
| 104 | theorem time_product_lower (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 105 | 1 ≤ |timeSymbol m n| * |timeConjugate m n| := by |
| 106 | have hpq : n - m ≠ 0 ∨ m ≠ 0 := by |
| 107 | by_cases hm : m = 0 |
| 108 | · left |
| 109 | simpa [hm] using hmn.resolve_left (not_not.mpr hm) |
| 110 | · exact Or.inr hm |
| 111 | exact conjugate_product_lower (n - m) m hpq |
| 112 | |
| 113 | def frequencyL1 (m n : ℤ) : ℝ := |(m : ℝ)| + |(n : ℝ)| |
| 114 | |
| 115 | /-- This is the usual Euclidean length of the integer frequency. -/ |
| 116 | def frequencyLength (m n : ℤ) : ℝ := Real.sqrt ((m : ℝ) ^ 2 + (n : ℝ) ^ 2) |
| 117 | |
| 118 | theorem frequencyL1_nonneg (m n : ℤ) : 0 ≤ frequencyL1 m n := by |
| 119 | unfold frequencyL1 |
| 120 | positivity |
| 121 | |
| 122 | theorem frequencyLength_nonneg (m n : ℤ) : 0 ≤ frequencyLength m n := |
| 123 | Real.sqrt_nonneg _ |
| 124 | |
| 125 | theorem radialConjugate_upper (m n : ℤ) : |
| 126 | |radialConjugate m n| ≤ 3 * frequencyL1 m n := by |
| 127 | rw [radialConjugate_formula] |
| 128 | calc |
| 129 | |(m : ℝ) + (1 + Real.sqrt 2) * (n : ℝ)| ≤ |
| 130 | |(m : ℝ)| + |(1 + Real.sqrt 2) * (n : ℝ)| := abs_add_le _ _ |
| 131 | _ = |(m : ℝ)| + (1 + Real.sqrt 2) * |(n : ℝ)| := by |
| 132 | rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 1 + Real.sqrt 2)] |
| 133 | _ ≤ 3 * frequencyL1 m n := by |
| 134 | unfold frequencyL1 |
| 135 | nlinarith [mul_le_mul_of_nonneg_right sqrt_two_le_two (abs_nonneg (n : ℝ)), |
| 136 | abs_nonneg (m : ℝ)] |
| 137 | |
| 138 | theorem timeConjugate_upper (m n : ℤ) : |
| 139 | |timeConjugate m n| ≤ 3 * frequencyL1 m n := by |
| 140 | rw [timeConjugate_formula] |
| 141 | calc |
| 142 | |(n : ℝ) - (1 + Real.sqrt 2) * (m : ℝ)| ≤ |
| 143 | |(n : ℝ)| + |(1 + Real.sqrt 2) * (m : ℝ)| := abs_sub _ _ |
| 144 | _ = |(n : ℝ)| + (1 + Real.sqrt 2) * |(m : ℝ)| := by |
| 145 | rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 1 + Real.sqrt 2)] |
| 146 | _ ≤ 3 * frequencyL1 m n := by |
| 147 | unfold frequencyL1 |
| 148 | nlinarith [mul_le_mul_of_nonneg_right sqrt_two_le_two (abs_nonneg (m : ℝ)), |
| 149 | abs_nonneg (n : ℝ)] |
| 150 | |
| 151 | theorem frequencyL1_le_twice_length (m n : ℤ) : |
| 152 | frequencyL1 m n ≤ 2 * frequencyLength m n := by |
| 153 | have hs : frequencyLength m n ^ 2 = (m : ℝ) ^ 2 + (n : ℝ) ^ 2 := |
| 154 | Real.sq_sqrt (by positivity) |
| 155 | have hm : |(m : ℝ)| ≤ frequencyLength m n := by |
| 156 | apply (sq_le_sq₀ (abs_nonneg _) (frequencyLength_nonneg m n)).mp |
| 157 | rw [sq_abs, hs] |
| 158 | nlinarith [sq_nonneg (n : ℝ)] |
| 159 | have hn : |(n : ℝ)| ≤ frequencyLength m n := by |
| 160 | apply (sq_le_sq₀ (abs_nonneg _) (frequencyLength_nonneg m n)).mp |
| 161 | rw [sq_abs, hs] |
| 162 | nlinarith [sq_nonneg (m : ℝ)] |
| 163 | unfold frequencyL1 |
| 164 | linarith |
| 165 | |
| 166 | theorem lower_of_conjugate_bound {a b D : ℝ} (hprod : 1 ≤ |a| * |b|) |
| 167 | (hD : 0 < D) (hb : |b| ≤ D) : 1 / D ≤ |a| := by |
| 168 | apply (div_le_iff₀ hD).mpr |
| 169 | exact hprod.trans (mul_le_mul_of_nonneg_left hb (abs_nonneg a)) |
| 170 | |
| 171 | /-- Explicit Diophantine bound for `v_r = (1,1-sqrt 2)` in the L1 length. -/ |
| 172 | theorem radial_diophantine_l1 (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 173 | (1 / 3 : ℝ) / (1 + frequencyL1 m n) ≤ |radialSymbol m n| := by |
| 174 | rw [div_div] |
| 175 | apply lower_of_conjugate_bound (radial_product_lower m n hmn) |
| 176 | · have := frequencyL1_nonneg m n |
| 177 | positivity |
| 178 | · have := radialConjugate_upper m n |
| 179 | linarith |
| 180 | |
| 181 | /-- Explicit Diophantine bound for `v_t = (sqrt 2-1,1)` in the L1 length. -/ |
| 182 | theorem time_diophantine_l1 (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 183 | (1 / 3 : ℝ) / (1 + frequencyL1 m n) ≤ |timeSymbol m n| := by |
| 184 | rw [div_div] |
| 185 | apply lower_of_conjugate_bound (time_product_lower m n hmn) |
| 186 | · have := frequencyL1_nonneg m n |
| 187 | positivity |
| 188 | · have := timeConjugate_upper m n |
| 189 | linarith |
| 190 | |
| 191 | /-- The manuscript's estimate with an explicit constant and Euclidean length. -/ |
| 192 | theorem radial_diophantine (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 193 | (1 / 6 : ℝ) / (1 + frequencyLength m n) ≤ |radialSymbol m n| := by |
| 194 | rw [div_div] |
| 195 | apply lower_of_conjugate_bound (radial_product_lower m n hmn) |
| 196 | · have := frequencyLength_nonneg m n |
| 197 | positivity |
| 198 | · have := radialConjugate_upper m n |
| 199 | have := frequencyL1_le_twice_length m n |
| 200 | linarith |
| 201 | |
| 202 | /-- The manuscript's estimate for the second graph direction. -/ |
| 203 | theorem time_diophantine (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 204 | (1 / 6 : ℝ) / (1 + frequencyLength m n) ≤ |timeSymbol m n| := by |
| 205 | rw [div_div] |
| 206 | apply lower_of_conjugate_bound (time_product_lower m n hmn) |
| 207 | · have := frequencyLength_nonneg m n |
| 208 | positivity |
| 209 | · have := timeConjugate_upper m n |
| 210 | have := frequencyL1_le_twice_length m n |
| 211 | linarith |
| 212 | |
| 213 | theorem radialSymbol_ne_zero (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 214 | radialSymbol m n ≠ 0 := by |
| 215 | intro hz |
| 216 | have h := radial_product_lower m n hmn |
| 217 | norm_num [hz] at h |
| 218 | |
| 219 | theorem timeSymbol_ne_zero (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 220 | timeSymbol m n ≠ 0 := by |
| 221 | intro hz |
| 222 | have h := time_product_lower m n hmn |
| 223 | norm_num [hz] at h |
| 224 | |
| 225 | /-- The radial inverse Fourier multiplier grows at most linearly in frequency. -/ |
| 226 | theorem radial_reciprocal_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 227 | |1 / radialSymbol m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 228 | rw [abs_div, abs_one] |
| 229 | apply (div_le_iff₀ (abs_pos.mpr (radialSymbol_ne_zero m n hmn))).mpr |
| 230 | have hb : |radialConjugate m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 231 | have := radialConjugate_upper m n |
| 232 | have := frequencyL1_le_twice_length m n |
| 233 | linarith |
| 234 | calc |
| 235 | 1 ≤ |radialSymbol m n| * |radialConjugate m n| := radial_product_lower m n hmn |
| 236 | _ ≤ |radialSymbol m n| * (6 * (1 + frequencyLength m n)) := |
| 237 | mul_le_mul_of_nonneg_left hb (abs_nonneg _) |
| 238 | _ = _ := by ring |
| 239 | |
| 240 | /-- The temporal inverse Fourier multiplier grows at most linearly in frequency. -/ |
| 241 | theorem time_reciprocal_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 242 | |1 / timeSymbol m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 243 | rw [abs_div, abs_one] |
| 244 | apply (div_le_iff₀ (abs_pos.mpr (timeSymbol_ne_zero m n hmn))).mpr |
| 245 | have hb : |timeConjugate m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 246 | have := timeConjugate_upper m n |
| 247 | have := frequencyL1_le_twice_length m n |
| 248 | linarith |
| 249 | calc |
| 250 | 1 ≤ |timeSymbol m n| * |timeConjugate m n| := time_product_lower m n hmn |
| 251 | _ ≤ |timeSymbol m n| * (6 * (1 + frequencyLength m n)) := |
| 252 | mul_le_mul_of_nonneg_left hb (abs_nonneg _) |
| 253 | _ = _ := by ring |
| 254 | |
| 255 | /-- Repeated radial inversion has the corresponding finite polynomial loss. -/ |
| 256 | theorem radial_inverse_power_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) (p : ℕ) : |
| 257 | |1 / radialSymbol m n| ^ p ≤ (6 * (1 + frequencyLength m n)) ^ p := by |
| 258 | exact pow_le_pow_left₀ (abs_nonneg _) (radial_reciprocal_bound m n hmn) p |
| 259 | |
| 260 | /-- Repeated temporal inversion has the corresponding finite polynomial loss. -/ |
| 261 | theorem time_inverse_power_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) (p : ℕ) : |
| 262 | |1 / timeSymbol m n| ^ p ≤ (6 * (1 + frequencyLength m n)) ^ p := by |
| 263 | exact pow_le_pow_left₀ (abs_nonneg _) (time_reciprocal_bound m n hmn) p |
| 264 | |
| 265 | /-- Both estimates packaged for a nonzero integer vector. -/ |
| 266 | theorem graph_directions_diophantine (k : ℤ × ℤ) (hk : k ≠ 0) : |
| 267 | (1 / 6 : ℝ) / (1 + frequencyLength k.1 k.2) ≤ |
| 268 | |(k.1 : ℝ) + (1 - Real.sqrt 2) * (k.2 : ℝ)| ∧ |
| 269 | (1 / 6 : ℝ) / (1 + frequencyLength k.1 k.2) ≤ |
| 270 | |(Real.sqrt 2 - 1) * (k.1 : ℝ) + (k.2 : ℝ)| := by |
| 271 | have hmn : k.1 ≠ 0 ∨ k.2 ≠ 0 := by |
| 272 | by_cases hm : k.1 = 0 |
| 273 | · right |
| 274 | intro hn |
| 275 | exact hk (Prod.ext hm hn) |
| 276 | · exact Or.inl hm |
| 277 | constructor |
| 278 | · simpa only [radialSymbol_formula] using radial_diophantine k.1 k.2 hmn |
| 279 | · simpa only [timeSymbol_formula] using time_diophantine k.1 k.2 hmn |
| 280 | |
| 281 | /-- The integer matrix `[[3,1],[1,5]]` acting on a frequency. -/ |
| 282 | def coveringFrequency (k : ℤ × ℤ) : ℤ × ℤ := |
| 283 | (3 * k.1 + k.2, k.1 + 5 * k.2) |
| 284 | |
| 285 | theorem coveringFrequency_injective : Function.Injective coveringFrequency := by |
| 286 | intro k l hkl |
| 287 | have h₁ := congrArg Prod.fst hkl |
| 288 | have h₂ := congrArg Prod.snd hkl |
| 289 | simp only [coveringFrequency] at h₁ h₂ |
| 290 | apply Prod.ext <;> linarith |
| 291 | |
| 292 | theorem coveringFrequency_ne_zero (k : ℤ × ℤ) (hk : k ≠ 0) : |
| 293 | coveringFrequency k ≠ 0 := by |
| 294 | intro hz |
| 295 | apply hk |
| 296 | apply coveringFrequency_injective |
| 297 | simpa [coveringFrequency] using hz |
| 298 | |
| 299 | /-- The radial symbol scales by the smaller eigenvalue of the covering matrix. -/ |
| 300 | theorem radial_symbol_covering (k : ℤ × ℤ) : |
| 301 | radialSymbol (coveringFrequency k).1 (coveringFrequency k).2 = |
| 302 | (4 - Real.sqrt 2) * radialSymbol k.1 k.2 := by |
| 303 | simp only [coveringFrequency, radialSymbol_formula, Int.cast_add, |
| 304 | Int.cast_mul, Int.cast_ofNat] |
| 305 | nlinarith [congrArg (fun x : ℝ => x * (k.2 : ℝ)) sqrt_two_square] |
| 306 | |
| 307 | /-- The temporal symbol scales by the larger eigenvalue of the covering matrix. -/ |
| 308 | theorem time_symbol_covering (k : ℤ × ℤ) : |
| 309 | timeSymbol (coveringFrequency k).1 (coveringFrequency k).2 = |
| 310 | (4 + Real.sqrt 2) * timeSymbol k.1 k.2 := by |
| 311 | simp only [coveringFrequency, timeSymbol_formula, Int.cast_add, |
| 312 | Int.cast_mul, Int.cast_ofNat] |
| 313 | nlinarith [congrArg (fun x : ℝ => x * (k.1 : ℝ)) sqrt_two_square] |
| 314 | |
| 315 | theorem covering_eigenvalues_gt_one : |
| 316 | 1 < 4 - Real.sqrt 2 ∧ 1 < 4 + Real.sqrt 2 := by |
| 317 | constructor <;> nlinarith [sqrt_two_le_two, Real.sqrt_nonneg (2 : ℝ)] |
| 318 | |
| 319 | end NavierStokes.DiophantineGraph |