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 frequencyLength_nonneg (m n : ℤ) : 0 ≤ frequencyLength m n := |
| 119 | Real.sqrt_nonneg _ |
| 120 | |
| 121 | theorem radialConjugate_upper (m n : ℤ) : |
| 122 | |radialConjugate m n| ≤ 3 * frequencyL1 m n := by |
| 123 | rw [radialConjugate_formula] |
| 124 | calc |
| 125 | |(m : ℝ) + (1 + Real.sqrt 2) * (n : ℝ)| ≤ |
| 126 | |(m : ℝ)| + |(1 + Real.sqrt 2) * (n : ℝ)| := abs_add_le _ _ |
| 127 | _ = |(m : ℝ)| + (1 + Real.sqrt 2) * |(n : ℝ)| := by |
| 128 | rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 1 + Real.sqrt 2)] |
| 129 | _ ≤ 3 * frequencyL1 m n := by |
| 130 | unfold frequencyL1 |
| 131 | nlinarith [mul_le_mul_of_nonneg_right sqrt_two_le_two (abs_nonneg (n : ℝ)), |
| 132 | abs_nonneg (m : ℝ)] |
| 133 | |
| 134 | theorem timeConjugate_upper (m n : ℤ) : |
| 135 | |timeConjugate m n| ≤ 3 * frequencyL1 m n := by |
| 136 | rw [timeConjugate_formula] |
| 137 | calc |
| 138 | |(n : ℝ) - (1 + Real.sqrt 2) * (m : ℝ)| ≤ |
| 139 | |(n : ℝ)| + |(1 + Real.sqrt 2) * (m : ℝ)| := abs_sub _ _ |
| 140 | _ = |(n : ℝ)| + (1 + Real.sqrt 2) * |(m : ℝ)| := by |
| 141 | rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ 1 + Real.sqrt 2)] |
| 142 | _ ≤ 3 * frequencyL1 m n := by |
| 143 | unfold frequencyL1 |
| 144 | nlinarith [mul_le_mul_of_nonneg_right sqrt_two_le_two (abs_nonneg (m : ℝ)), |
| 145 | abs_nonneg (n : ℝ)] |
| 146 | |
| 147 | theorem frequencyL1_le_twice_length (m n : ℤ) : |
| 148 | frequencyL1 m n ≤ 2 * frequencyLength m n := by |
| 149 | have hs : frequencyLength m n ^ 2 = (m : ℝ) ^ 2 + (n : ℝ) ^ 2 := |
| 150 | Real.sq_sqrt (by positivity) |
| 151 | have hm : |(m : ℝ)| ≤ frequencyLength m n := by |
| 152 | apply (sq_le_sq₀ (abs_nonneg _) (frequencyLength_nonneg m n)).mp |
| 153 | rw [sq_abs, hs] |
| 154 | nlinarith [sq_nonneg (n : ℝ)] |
| 155 | have hn : |(n : ℝ)| ≤ 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 (m : ℝ)] |
| 159 | unfold frequencyL1 |
| 160 | linarith |
| 161 | |
| 162 | theorem lower_of_conjugate_bound {a b D : ℝ} (hprod : 1 ≤ |a| * |b|) |
| 163 | (hD : 0 < D) (hb : |b| ≤ D) : 1 / D ≤ |a| := by |
| 164 | apply (div_le_iff₀ hD).mpr |
| 165 | exact hprod.trans (mul_le_mul_of_nonneg_left hb (abs_nonneg a)) |
| 166 | |
| 167 | /-- The manuscript's estimate with an explicit constant and Euclidean length. -/ |
| 168 | theorem radial_diophantine (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 169 | (1 / 6 : ℝ) / (1 + frequencyLength m n) ≤ |radialSymbol m n| := by |
| 170 | rw [div_div] |
| 171 | apply lower_of_conjugate_bound (radial_product_lower m n hmn) |
| 172 | · have := frequencyLength_nonneg m n |
| 173 | positivity |
| 174 | · have := radialConjugate_upper m n |
| 175 | have := frequencyL1_le_twice_length m n |
| 176 | linarith |
| 177 | |
| 178 | /-- The manuscript's estimate for the second graph direction. -/ |
| 179 | theorem time_diophantine (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 180 | (1 / 6 : ℝ) / (1 + frequencyLength m n) ≤ |timeSymbol m n| := by |
| 181 | rw [div_div] |
| 182 | apply lower_of_conjugate_bound (time_product_lower m n hmn) |
| 183 | · have := frequencyLength_nonneg m n |
| 184 | positivity |
| 185 | · have := timeConjugate_upper m n |
| 186 | have := frequencyL1_le_twice_length m n |
| 187 | linarith |
| 188 | |
| 189 | theorem radialSymbol_ne_zero (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 190 | radialSymbol m n ≠ 0 := by |
| 191 | intro hz |
| 192 | have h := radial_product_lower m n hmn |
| 193 | norm_num [hz] at h |
| 194 | |
| 195 | theorem timeSymbol_ne_zero (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 196 | timeSymbol m n ≠ 0 := by |
| 197 | intro hz |
| 198 | have h := time_product_lower m n hmn |
| 199 | norm_num [hz] at h |
| 200 | |
| 201 | /-- The radial inverse Fourier multiplier grows at most linearly in frequency. -/ |
| 202 | theorem radial_reciprocal_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 203 | |1 / radialSymbol m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 204 | rw [abs_div, abs_one] |
| 205 | apply (div_le_iff₀ (abs_pos.mpr (radialSymbol_ne_zero m n hmn))).mpr |
| 206 | have hb : |radialConjugate m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 207 | have := radialConjugate_upper m n |
| 208 | have := frequencyL1_le_twice_length m n |
| 209 | linarith |
| 210 | calc |
| 211 | 1 ≤ |radialSymbol m n| * |radialConjugate m n| := radial_product_lower m n hmn |
| 212 | _ ≤ |radialSymbol m n| * (6 * (1 + frequencyLength m n)) := |
| 213 | mul_le_mul_of_nonneg_left hb (abs_nonneg _) |
| 214 | _ = _ := by ring |
| 215 | |
| 216 | /-- The temporal inverse Fourier multiplier grows at most linearly in frequency. -/ |
| 217 | theorem time_reciprocal_bound (m n : ℤ) (hmn : m ≠ 0 ∨ n ≠ 0) : |
| 218 | |1 / timeSymbol m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 219 | rw [abs_div, abs_one] |
| 220 | apply (div_le_iff₀ (abs_pos.mpr (timeSymbol_ne_zero m n hmn))).mpr |
| 221 | have hb : |timeConjugate m n| ≤ 6 * (1 + frequencyLength m n) := by |
| 222 | have := timeConjugate_upper m n |
| 223 | have := frequencyL1_le_twice_length m n |
| 224 | linarith |
| 225 | calc |
| 226 | 1 ≤ |timeSymbol m n| * |timeConjugate m n| := time_product_lower m n hmn |
| 227 | _ ≤ |timeSymbol m n| * (6 * (1 + frequencyLength m n)) := |
| 228 | mul_le_mul_of_nonneg_left hb (abs_nonneg _) |
| 229 | _ = _ := by ring |
| 230 | |
| 231 | /-- The integer matrix `[[3,1],[1,5]]` acting on a frequency. -/ |
| 232 | def coveringFrequency (k : ℤ × ℤ) : ℤ × ℤ := |
| 233 | (3 * k.1 + k.2, k.1 + 5 * k.2) |
| 234 | |
| 235 | end NavierStokes.DiophantineGraph |