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.R3PressureFourier |
| 2 | import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform |
| 3 | import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts |
| 4 | |
| 5 | /-! |
| 6 | # Gaussian kernels for regularizing the whole-space pressure |
| 7 | |
| 8 | The spatial second derivatives of a Gaussian are integrable. Their Fourier |
| 9 | transforms provide smooth approximations to the second-order Riesz symbol. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | namespace NavierStokes.R3GaussianPressure |
| 14 | |
| 15 | open Set Filter MeasureTheory ProblemStatement FourierTransform InnerProductSpace |
| 16 | open scoped Topology RealInnerProductSpace |
| 17 | |
| 18 | def gaussianReal (a : ℝ) (x : Space) : ℝ := Real.exp (-a * ‖x‖ ^ 2) |
| 19 | def gaussian (a : ℝ) (x : Space) : ℂ := (gaussianReal a x : ℝ) |
| 20 | def firstGaussian (a : ℝ) (i : Fin 3) (x : Space) : ℂ := |
| 21 | ((-2 * a * x i * gaussianReal a x : ℝ) : ℂ) |
| 22 | def secondGaussian (a : ℝ) (i j : Fin 3) (x : Space) : ℂ := |
| 23 | (((4 * a ^ 2 * x i * x j - 2 * a * (if i = j then 1 else 0)) * gaussianReal a x : ℝ) : ℂ) |
| 24 | |
| 25 | theorem gaussianReal_pos (a : ℝ) (x : Space) : 0 < gaussianReal a x := Real.exp_pos _ |
| 26 | |
| 27 | theorem gaussianReal_contDiff (a : ℝ) : ContDiff ℝ ⊤ (gaussianReal a) := by |
| 28 | exact (contDiff_const.mul (contDiff_norm_sq ℝ)).exp |
| 29 | |
| 30 | theorem gaussian_contDiff (a : ℝ) : ContDiff ℝ ⊤ (gaussian a) := |
| 31 | Complex.ofRealCLM.contDiff.comp (gaussianReal_contDiff a) |
| 32 | |
| 33 | theorem firstGaussian_contDiff (a : ℝ) (i : Fin 3) : ContDiff ℝ ⊤ (firstGaussian a i) := by |
| 34 | have h := gaussianReal_contDiff a |
| 35 | change ContDiff ℝ ⊤ (Complex.ofRealCLM ∘ (fun x : Space => -2 * a * x i * gaussianReal a x)) |
| 36 | apply Complex.ofRealCLM.contDiff.comp |
| 37 | fun_prop |
| 38 | |
| 39 | theorem gaussian_moment_integrable {a : ℝ} (ha : 0 < a) (k : ℕ) : |
| 40 | Integrable (fun x : Space => ‖x‖ ^ k * gaussianReal a x) := by |
| 41 | apply (integrable_fun_norm_addHaar (volume : Measure Space) |
| 42 | (f := fun r => r ^ k * Real.exp (-a * r ^ 2))).mpr |
| 43 | have hi := integrableOn_rpow_mul_exp_neg_mul_sq ha |
| 44 | (s := 2 + (k : ℝ)) (by linarith [Nat.cast_nonneg (α := ℝ) k] : (-1 : ℝ) < 2 + (k : ℝ)) |
| 45 | apply hi.congr_fun _ measurableSet_Ioi |
| 46 | intro r hr |
| 47 | norm_num only [finrank_euclideanSpace, Fintype.card_fin, Nat.reduceSub, smul_eq_mul] |
| 48 | rw [Real.rpow_add hr, Real.rpow_two, Real.rpow_natCast] |
| 49 | ring |
| 50 | |
| 51 | theorem gaussianReal_integrable {a : ℝ} (ha : 0 < a) : Integrable (gaussianReal a) := by |
| 52 | simpa using gaussian_moment_integrable ha 0 |
| 53 | |
| 54 | theorem gaussian_integrable {a : ℝ} (ha : 0 < a) : Integrable (gaussian a) := |
| 55 | Complex.ofRealCLM.integrable_comp (gaussianReal_integrable ha) |
| 56 | |
| 57 | theorem firstGaussian_integrable {a : ℝ} (ha : 0 < a) (i : Fin 3) : |
| 58 | Integrable (firstGaussian a i) := by |
| 59 | apply ((gaussian_moment_integrable ha 1).const_mul (2 * a)).mono' |
| 60 | (firstGaussian_contDiff a i).continuous.aestronglyMeasurable |
| 61 | apply Eventually.of_forall |
| 62 | intro x |
| 63 | simp only [firstGaussian, Complex.norm_real, Real.norm_eq_abs, abs_mul, abs_neg, |
| 64 | abs_of_pos ha, abs_of_pos (gaussianReal_pos a x), abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2), pow_one] |
| 65 | have hi : |x i| ≤ ‖x‖ := PiLp.norm_apply_le x i |
| 66 | have hb := mul_le_mul_of_nonneg_right |
| 67 | (mul_le_mul_of_nonneg_left hi (by positivity : 0 ≤ 2 * a)) (gaussianReal_pos a x).le |
| 68 | nlinarith |
| 69 | |
| 70 | theorem secondGaussian_contDiff (a : ℝ) (i j : Fin 3) : ContDiff ℝ ⊤ (secondGaussian a i j) := by |
| 71 | have h := gaussianReal_contDiff a |
| 72 | change ContDiff ℝ ⊤ (Complex.ofRealCLM ∘ (fun x : Space => |
| 73 | (4 * a ^ 2 * x i * x j - 2 * a * (if i = j then 1 else 0)) * gaussianReal a x)) |
| 74 | apply Complex.ofRealCLM.contDiff.comp |
| 75 | fun_prop |
| 76 | |
| 77 | theorem secondGaussian_integrable {a : ℝ} (ha : 0 < a) (i j : Fin 3) : |
| 78 | Integrable (secondGaussian a i j) := by |
| 79 | apply (((gaussian_moment_integrable ha 2).const_mul (4 * a ^ 2)).add |
| 80 | ((gaussianReal_integrable ha).const_mul (2 * a))).mono' |
| 81 | (secondGaussian_contDiff a i j).continuous.aestronglyMeasurable |
| 82 | apply Eventually.of_forall |
| 83 | intro x |
| 84 | simp only [secondGaussian, Complex.norm_real, Real.norm_eq_abs, abs_mul, |
| 85 | abs_of_pos (gaussianReal_pos a x)] |
| 86 | have hij : |(if i = j then 1 else 0 : ℝ)| ≤ 1 := by split <;> norm_num |
| 87 | have hprod : |x i| * |x j| ≤ ‖x‖ ^ 2 := by |
| 88 | simpa only [Real.norm_eq_abs, pow_two] using |
| 89 | mul_le_mul (PiLp.norm_apply_le x i) (PiLp.norm_apply_le x j) |
| 90 | (norm_nonneg (x j)) (norm_nonneg x) |
| 91 | have hb : |4 * a ^ 2 * x i * x j - 2 * a * (if i = j then 1 else 0 : ℝ)| ≤ |
| 92 | 4 * a ^ 2 * ‖x‖ ^ 2 + 2 * a := by |
| 93 | calc |
| 94 | _ ≤ |4 * a ^ 2 * x i * x j| + |2 * a * (if i = j then 1 else 0 : ℝ)| := abs_sub _ _ |
| 95 | _ = 4 * a ^ 2 * (|x i| * |x j|) + 2 * a * |(if i = j then 1 else 0 : ℝ)| := by |
| 96 | rw [abs_mul, abs_mul, abs_mul, abs_mul, abs_mul, abs_of_pos ha, abs_pow] |
| 97 | norm_num |
| 98 | ring |
| 99 | _ ≤ _ := by nlinarith |
| 100 | simp only [Pi.add_apply] |
| 101 | nlinarith [mul_le_mul_of_nonneg_right hb (gaussianReal_pos a x).le] |
| 102 | |
| 103 | theorem hasFDerivAt_gaussianReal (a : ℝ) (x : Space) : |
| 104 | HasFDerivAt (gaussianReal a) ((-2 * a * gaussianReal a x) • innerSL ℝ x) x := by |
| 105 | have h := ((hasStrictFDerivAt_norm_sq x).hasFDerivAt.const_mul (-a)).exp |
| 106 | convert! h using 1 |
| 107 | ext y |
| 108 | simp only [smul_apply, smul_eq_mul, gaussianReal] |
| 109 | ring |
| 110 | |
| 111 | theorem gaussian_partial (a : ℝ) (i : Fin 3) (x : Space) : |
| 112 | fderiv ℝ (gaussian a) x (coordinateVector i) = firstGaussian a i x := by |
| 113 | have h := Complex.ofRealCLM.hasFDerivAt.comp x (hasFDerivAt_gaussianReal a x) |
| 114 | rw [show gaussian a = Complex.ofRealCLM ∘ gaussianReal a from rfl, h.fderiv] |
| 115 | simp only [ContinuousLinearMap.comp_apply, smul_apply, smul_eq_mul, |
| 116 | innerSL_apply_apply, Complex.ofRealCLM_apply] |
| 117 | have hi : ⟪x, coordinateVector i⟫_ℝ = x i := by |
| 118 | simp [coordinateVector, EuclideanSpace.inner_eq_star_dotProduct, dotProduct] |
| 119 | rw [hi] |
| 120 | unfold firstGaussian |
| 121 | push_cast |
| 122 | ring |
| 123 | |
| 124 | theorem firstGaussian_partial (a : ℝ) (i j : Fin 3) (x : Space) : |
| 125 | fderiv ℝ (firstGaussian a i) x (coordinateVector j) = secondGaussian a i j x := by |
| 126 | have hp := (EuclideanSpace.proj i : Space →L[ℝ] ℝ).hasFDerivAt (x := x) |
| 127 | have h := ((hp.const_mul (-2 * a)).mul (hasFDerivAt_gaussianReal a x)) |
| 128 | have hc := Complex.ofRealCLM.hasFDerivAt.comp x h |
| 129 | change (fderiv ℝ (Complex.ofRealCLM ∘ |
| 130 | ((fun y : Space => (-2 * a) * (EuclideanSpace.proj i) y) * gaussianReal a)) x) |
| 131 | (coordinateVector j) = _ |
| 132 | rw [hc.fderiv] |
| 133 | simp only [ContinuousLinearMap.comp_apply, add_apply, |
| 134 | smul_apply, smul_eq_mul, Complex.ofRealCLM_apply, innerSL_apply_apply] |
| 135 | have hi : ⟪x, coordinateVector j⟫_ℝ = x j := by |
| 136 | simp [coordinateVector, EuclideanSpace.inner_eq_star_dotProduct, dotProduct] |
| 137 | simp only [hi] |
| 138 | change Complex.ofReal ((-2 * a * x i) * ((-2 * a * gaussianReal a x) * x j) + |
| 139 | gaussianReal a x * ((-2 * a) * (coordinateVector j) i)) = _ |
| 140 | have hij : (coordinateVector j) i = if i = j then 1 else 0 := by |
| 141 | simp [coordinateVector] |
| 142 | rw [hij] |
| 143 | unfold secondGaussian |
| 144 | congr 1 |
| 145 | ring |
| 146 | |
| 147 | |
| 148 | /-- Fourier differentiation in one direction only needs integrability of |
| 149 | that directional derivative. -/ |
| 150 | theorem fourier_directional_derivative {f : Space → ℂ} (v ξ : Space) |
| 151 | (hf : Integrable f) (hfd : Differentiable ℝ f) |
| 152 | (hfi : Integrable (fun x => fderiv ℝ f x v)) : |
| 153 | 𝓕 (fun x => fderiv ℝ f x v) ξ = |
| 154 | (2 * (Real.pi : ℂ) * Complex.I * (⟪v, ξ⟫_ℝ : ℂ)) * 𝓕 f ξ := by |
| 155 | let c (x : Space) : ℂ := Real.fourierChar (-⟪x, ξ⟫_ℝ) |
| 156 | have hc : Integrable (fun x => c x * f x) := by |
| 157 | simpa only [c, Circle.smul_def, smul_eq_mul] using (Real.fourierIntegral_convergent_iff ξ).2 hf |
| 158 | have hcp : Integrable (fun x => c x * fderiv ℝ f x v) := by |
| 159 | simpa only [c, Circle.smul_def, smul_eq_mul] using (Real.fourierIntegral_convergent_iff ξ).2 hfi |
| 160 | have hd (x : Space) : fderiv ℝ c x v = |
| 161 | -(2 * (Real.pi : ℂ) * Complex.I * (⟪v, ξ⟫_ℝ : ℂ)) * c x := by |
| 162 | simpa only [c, innerSL_apply_apply ℝ, neg_mul] using |
| 163 | Real.fderiv_fourierChar_neg_bilinear_left_apply (innerSL ℝ) x v ξ |
| 164 | have hdint : Integrable (fun x => fderiv ℝ c x v * f x) := by |
| 165 | simp only [hd, mul_assoc] |
| 166 | exact hc.const_mul _ |
| 167 | have hi := integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable hdint hcp hc |
| 168 | (fun _ _ => (Real.differentiable_fourierChar_neg_bilinear_left (innerSL ℝ) ξ).differentiableAt) |
| 169 | (fun _ _ => hfd.differentiableAt) |
| 170 | simp only [hd, mul_assoc, integral_const_mul, neg_mul, integral_neg, neg_neg] at hi |
| 171 | simpa only [Real.fourier_eq, Circle.smul_def, smul_eq_mul, c, mul_assoc] using hi |
| 172 | |
| 173 | theorem fourier_firstGaussian {a : ℝ} (ha : 0 < a) (i : Fin 3) (ξ : Space) : |
| 174 | 𝓕 (firstGaussian a i) ξ = (2 * (Real.pi : ℂ) * Complex.I * (ξ i : ℂ)) * 𝓕 (gaussian a) ξ := by |
| 175 | have hi : ⟪coordinateVector i, ξ⟫_ℝ = ξ i := by |
| 176 | rw [real_inner_comm] |
| 177 | simp [coordinateVector, EuclideanSpace.inner_eq_star_dotProduct, dotProduct] |
| 178 | simpa only [gaussian_partial, hi] using |
| 179 | fourier_directional_derivative (coordinateVector i) ξ (gaussian_integrable ha) |
| 180 | ((gaussian_contDiff a).differentiable (by simp)) |
| 181 | (by simpa only [gaussian_partial] using firstGaussian_integrable ha i) |
| 182 | |
| 183 | theorem fourier_secondGaussian {a : ℝ} (ha : 0 < a) (i j : Fin 3) (ξ : Space) : |
| 184 | 𝓕 (secondGaussian a i j) ξ = |
| 185 | (-4 * (Real.pi : ℂ) ^ 2 * (ξ i : ℂ) * (ξ j : ℂ)) * 𝓕 (gaussian a) ξ := by |
| 186 | have hj : ⟪coordinateVector j, ξ⟫_ℝ = ξ j := by |
| 187 | rw [real_inner_comm] |
| 188 | simp [coordinateVector, EuclideanSpace.inner_eq_star_dotProduct, dotProduct] |
| 189 | have hh := fourier_directional_derivative (coordinateVector j) ξ (firstGaussian_integrable ha i) |
| 190 | ((firstGaussian_contDiff a i).differentiable (by simp)) |
| 191 | (by simpa only [firstGaussian_partial] using secondGaussian_integrable ha i j) |
| 192 | simp only [firstGaussian_partial, hj, fourier_firstGaussian ha] at hh |
| 193 | rw [hh] |
| 194 | calc |
| 195 | _ = (4 * (Real.pi : ℂ) ^ 2 * (ξ i : ℂ) * (ξ j : ℂ) * Complex.I ^ 2) * |
| 196 | 𝓕 (gaussian a) ξ := by ring |
| 197 | _ = _ := by rw [Complex.I_sq]; ring |
| 198 | |
| 199 | /-- The classical Gaussian Fourier formula with real parameters. -/ |
| 200 | theorem fourier_gaussian {a : ℝ} (ha : 0 < a) (ξ : Space) : |
| 201 | 𝓕 (gaussian a) ξ = |
| 202 | (((Real.pi / a) ^ (3 / 2 : ℝ) * Real.exp (-(Real.pi ^ 2) * ‖ξ‖ ^ 2 / a) : ℝ) : ℂ) := by |
| 203 | have hh := fourier_gaussian_innerProductSpace (V := Space) |
| 204 | (b := (a : ℂ)) (by simpa using ha) ξ |
| 205 | have he : (fun x : Space => Complex.exp (-(a : ℂ) * ‖x‖ ^ 2)) = gaussian a := by |
| 206 | funext x |
| 207 | simp [gaussian, gaussianReal, Complex.ofReal_exp] |
| 208 | rw [he] at hh |
| 209 | rw [hh] |
| 210 | norm_num only [finrank_euclideanSpace, Fintype.card_fin] |
| 211 | have hp : ((Real.pi / a : ℝ) : ℂ) ^ (3 / 2 : ℂ) = |
| 212 | (((Real.pi / a) ^ (3 / 2 : ℝ) : ℝ) : ℂ) := by |
| 213 | simpa only [Complex.ofReal_div, Complex.ofReal_ofNat] using |
| 214 | (Complex.ofReal_cpow (y := (3 / 2 : ℝ)) (by positivity : 0 ≤ Real.pi / a)).symm |
| 215 | rw [← Complex.ofReal_div, hp] |
| 216 | push_cast |
| 217 | rfl |
| 218 | |
| 219 | end NavierStokes.R3GaussianPressure |