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.R3.ComparisonSetup |
| 2 | |
| 3 | /-! |
| 4 | # The three dimensional heat kernel |
| 5 | |
| 6 | The definitions in this file are the ordinary Gaussian heat kernel and its |
| 7 | coordinate Hessian. The latter is proved to agree with the spatial derivatives |
| 8 | used in the comparison argument. |
| 9 | -/ |
| 10 | |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | open scoped ContDiff |
| 15 | |
| 16 | namespace NavierStokesR3.Comparison |
| 17 | |
| 18 | open ProblemStatement |
| 19 | |
| 20 | /-- The Euclidean heat kernel in three spatial dimensions. -/ |
| 21 | def heatKernel (s : ℝ) (z : Space) : ℝ := |
| 22 | (4 * Real.pi * s) ^ (-(3 / 2 : ℝ)) * Real.exp (-(‖z‖ ^ 2) / (4 * s)) |
| 23 | |
| 24 | /-- The explicit coordinate Hessian of the Euclidean heat kernel. -/ |
| 25 | def heatKernelSecond (s : ℝ) (i j : Fin 3) (z : Space) : ℝ := |
| 26 | (z i * z j / (4 * s ^ 2) - (if i = j then 1 else 0) / (2 * s)) * |
| 27 | heatKernel s z |
| 28 | |
| 29 | theorem heatKernel_nonneg {s : ℝ} (hs : 0 ≤ s) (z : Space) : |
| 30 | 0 ≤ heatKernel s z := by |
| 31 | unfold heatKernel |
| 32 | exact mul_nonneg (Real.rpow_nonneg (by positivity) _) (Real.exp_nonneg _) |
| 33 | |
| 34 | theorem hasFDerivAt_heatKernel {s : ℝ} (hs : 0 < s) (z : Space) : |
| 35 | HasFDerivAt (heatKernel s) |
| 36 | ((-(heatKernel s z / (2 * s))) • innerSL ℝ z) z := by |
| 37 | have he : HasFDerivAt (fun x : Space => -(‖x‖ ^ 2) / (4 * s)) |
| 38 | ((4 * s)⁻¹ • (-((2 : ℝ) • innerSL ℝ z))) z := by |
| 39 | simpa only [Pi.neg_apply, div_eq_mul_inv, mul_comm, two_smul] using |
| 40 | (hasStrictFDerivAt_norm_sq z).hasFDerivAt.neg.const_mul ((4 * s)⁻¹) |
| 41 | convert! he.exp.const_mul ((4 * Real.pi * s) ^ (-(3 / 2 : ℝ))) using 1 |
| 42 | ext y |
| 43 | simp only [_root_.smul_apply, _root_.neg_apply, |
| 44 | innerSL_apply_apply, smul_eq_mul] |
| 45 | unfold heatKernel |
| 46 | field_simp |
| 47 | ; ring |
| 48 | |
| 49 | theorem partial_heatKernel {s : ℝ} (hs : 0 < s) (i : Fin 3) (z : Space) : |
| 50 | partialD i (heatKernel s) z = -(z i / (2 * s)) * heatKernel s z := by |
| 51 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 52 | rw [(hasFDerivAt_heatKernel hs z).fderiv] |
| 53 | simp [NavierStokes.ProblemStatement.coordinateVector, |
| 54 | EuclideanSpace.inner_single_right] |
| 55 | ring |
| 56 | |
| 57 | theorem differentiable_heatKernel {s : ℝ} (hs : 0 < s) : |
| 58 | Differentiable ℝ (heatKernel s) := fun z => |
| 59 | (hasFDerivAt_heatKernel hs z).differentiableAt |
| 60 | |
| 61 | /-- The explicit Gaussian Hessian is the actual iterated coordinate derivative. -/ |
| 62 | theorem heatKernelSecond_eq_partial {s : ℝ} (hs : 0 < s) |
| 63 | (i j : Fin 3) (z : Space) : |
| 64 | heatKernelSecond s i j z = partialD i (partialD j (heatKernel s)) z := by |
| 65 | have hfirst : partialD j (heatKernel s) = |
| 66 | (fun x : Space => -(x j / (2 * s)) * heatKernel s x) := |
| 67 | funext (partial_heatKernel hs j) |
| 68 | have hc : HasFDerivAt (fun x : Space => x j) |
| 69 | (innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)) z := by |
| 70 | convert! (innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)).hasFDerivAt |
| 71 | (x := z) using 1 |
| 72 | ext x |
| 73 | simp [NavierStokes.ProblemStatement.coordinateVector, |
| 74 | EuclideanSpace.inner_single_left] |
| 75 | have hg : HasFDerivAt (fun x : Space => -(x j / (2 * s))) |
| 76 | ((-((2 * s)⁻¹)) • innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)) z := by |
| 77 | convert! hc.const_mul (-((2 * s)⁻¹)) using 1 |
| 78 | ext x |
| 79 | ring |
| 80 | rw [hfirst] |
| 81 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 82 | change heatKernelSecond s i j z = fderiv ℝ ((fun x : Space => -(x j / (2 * s))) * heatKernel s) z (NavierStokes.ProblemStatement.coordinateVector i) |
| 83 | rw [(hg.mul (hasFDerivAt_heatKernel hs z)).fderiv] |
| 84 | by_cases hij : i = j |
| 85 | · subst i |
| 86 | simp [heatKernelSecond, NavierStokes.ProblemStatement.coordinateVector, EuclideanSpace.inner_single_right] |
| 87 | ; field_simp |
| 88 | ; ring |
| 89 | · simp [heatKernelSecond, hij, |
| 90 | NavierStokes.ProblemStatement.coordinateVector, EuclideanSpace.inner_single_right] |
| 91 | ; field_simp |
| 92 | ; ring |
| 93 | |
| 94 | /-- A radial envelope for every component of the Gaussian Hessian. -/ |
| 95 | theorem norm_heatKernelSecond_le {s : ℝ} (hs : 0 < s) |
| 96 | (i j : Fin 3) (z : Space) : |
| 97 | ‖heatKernelSecond s i j z‖ ≤ |
| 98 | (‖z‖ ^ 2 / (4 * s ^ 2) + 1 / (2 * s)) * heatKernel s z := by |
| 99 | have hden₁ : 0 < 4 * s ^ 2 := by positivity |
| 100 | have hden₂ : 0 < 2 * s := by positivity |
| 101 | have hcoord : ‖z i * z j‖ ≤ ‖z‖ ^ 2 := by |
| 102 | rw [norm_mul, pow_two] |
| 103 | exact mul_le_mul (PiLp.norm_apply_le z i) (PiLp.norm_apply_le z j) |
| 104 | (norm_nonneg _) (norm_nonneg _) |
| 105 | have hdiag : ‖(if i = j then (1 : ℝ) else 0)‖ ≤ 1 := by |
| 106 | split_ifs <;> norm_num |
| 107 | have hcoeff : |
| 108 | ‖z i * z j / (4 * s ^ 2) - (if i = j then 1 else 0) / (2 * s)‖ ≤ |
| 109 | ‖z‖ ^ 2 / (4 * s ^ 2) + 1 / (2 * s) := by |
| 110 | calc |
| 111 | _ ≤ ‖z i * z j / (4 * s ^ 2)‖ + |
| 112 | ‖(if i = j then (1 : ℝ) else 0) / (2 * s)‖ := norm_sub_le _ _ |
| 113 | _ = ‖z i * z j‖ / (4 * s ^ 2) + |
| 114 | ‖(if i = j then (1 : ℝ) else 0)‖ / (2 * s) := by |
| 115 | simp only [norm_div, Real.norm_eq_abs, abs_of_pos hden₁, abs_of_pos hden₂] |
| 116 | _ ≤ _ := add_le_add |
| 117 | (div_le_div_of_nonneg_right hcoord hden₁.le) |
| 118 | (div_le_div_of_nonneg_right hdiag hden₂.le) |
| 119 | rw [heatKernelSecond, norm_mul, Real.norm_of_nonneg (heatKernel_nonneg hs.le z)] |
| 120 | exact mul_le_mul_of_nonneg_right hcoeff (heatKernel_nonneg hs.le z) |
| 121 | |
| 122 | end NavierStokesR3.Comparison |