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_pos {s : ℝ} (hs : 0 < s) (z : Space) : 0 < heatKernel s z := by |
| 30 | unfold heatKernel |
| 31 | exact mul_pos (Real.rpow_pos_of_pos (by positivity) _) (Real.exp_pos _) |
| 32 | |
| 33 | theorem heatKernel_nonneg {s : ℝ} (hs : 0 ≤ s) (z : Space) : |
| 34 | 0 ≤ heatKernel s z := by |
| 35 | unfold heatKernel |
| 36 | exact mul_nonneg (Real.rpow_nonneg (by positivity) _) (Real.exp_nonneg _) |
| 37 | |
| 38 | theorem hasFDerivAt_heatKernel {s : ℝ} (hs : 0 < s) (z : Space) : |
| 39 | HasFDerivAt (heatKernel s) |
| 40 | ((-(heatKernel s z / (2 * s))) • innerSL ℝ z) z := by |
| 41 | have he : HasFDerivAt (fun x : Space => -(‖x‖ ^ 2) / (4 * s)) |
| 42 | ((4 * s)⁻¹ • (-((2 : ℝ) • innerSL ℝ z))) z := by |
| 43 | simpa only [Pi.neg_apply, div_eq_mul_inv, mul_comm, two_smul] using |
| 44 | (hasStrictFDerivAt_norm_sq z).hasFDerivAt.neg.const_mul ((4 * s)⁻¹) |
| 45 | convert! he.exp.const_mul ((4 * Real.pi * s) ^ (-(3 / 2 : ℝ))) using 1 |
| 46 | ext y |
| 47 | simp only [_root_.smul_apply, _root_.neg_apply, |
| 48 | innerSL_apply_apply, smul_eq_mul] |
| 49 | unfold heatKernel |
| 50 | field_simp |
| 51 | ; ring |
| 52 | |
| 53 | theorem partial_heatKernel {s : ℝ} (hs : 0 < s) (i : Fin 3) (z : Space) : |
| 54 | partialD i (heatKernel s) z = -(z i / (2 * s)) * heatKernel s z := by |
| 55 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 56 | rw [(hasFDerivAt_heatKernel hs z).fderiv] |
| 57 | simp [NavierStokes.ProblemStatement.coordinateVector, |
| 58 | EuclideanSpace.inner_single_right] |
| 59 | ring |
| 60 | |
| 61 | theorem differentiable_heatKernel {s : ℝ} (hs : 0 < s) : |
| 62 | Differentiable ℝ (heatKernel s) := fun z => |
| 63 | (hasFDerivAt_heatKernel hs z).differentiableAt |
| 64 | |
| 65 | theorem contDiff_heatKernel (s : ℝ) : ContDiff ℝ ∞ (heatKernel s) := by |
| 66 | unfold heatKernel |
| 67 | exact contDiff_const.mul (((contDiff_id.norm_sq ℝ).neg.div_const (4 * s)).exp) |
| 68 | |
| 69 | /-- The explicit Gaussian Hessian is the actual iterated coordinate derivative. -/ |
| 70 | theorem heatKernelSecond_eq_partial {s : ℝ} (hs : 0 < s) |
| 71 | (i j : Fin 3) (z : Space) : |
| 72 | heatKernelSecond s i j z = partialD i (partialD j (heatKernel s)) z := by |
| 73 | have hfirst : partialD j (heatKernel s) = |
| 74 | (fun x : Space => -(x j / (2 * s)) * heatKernel s x) := |
| 75 | funext (partial_heatKernel hs j) |
| 76 | have hc : HasFDerivAt (fun x : Space => x j) |
| 77 | (innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)) z := by |
| 78 | convert! (innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)).hasFDerivAt |
| 79 | (x := z) using 1 |
| 80 | ext x |
| 81 | simp [NavierStokes.ProblemStatement.coordinateVector, |
| 82 | EuclideanSpace.inner_single_left] |
| 83 | have hg : HasFDerivAt (fun x : Space => -(x j / (2 * s))) |
| 84 | ((-((2 * s)⁻¹)) • innerSL ℝ (NavierStokes.ProblemStatement.coordinateVector j)) z := by |
| 85 | convert! hc.const_mul (-((2 * s)⁻¹)) using 1 |
| 86 | ext x |
| 87 | ring |
| 88 | rw [hfirst] |
| 89 | unfold partialD NavierStokes.PeriodicIntegration.spatialPartial |
| 90 | change heatKernelSecond s i j z = fderiv ℝ ((fun x : Space => -(x j / (2 * s))) * heatKernel s) z (NavierStokes.ProblemStatement.coordinateVector i) |
| 91 | rw [(hg.mul (hasFDerivAt_heatKernel hs z)).fderiv] |
| 92 | by_cases hij : i = j |
| 93 | · subst i |
| 94 | simp [heatKernelSecond, NavierStokes.ProblemStatement.coordinateVector, EuclideanSpace.inner_single_right] |
| 95 | ; field_simp |
| 96 | ; ring |
| 97 | · simp [heatKernelSecond, hij, |
| 98 | NavierStokes.ProblemStatement.coordinateVector, EuclideanSpace.inner_single_right] |
| 99 | ; field_simp |
| 100 | ; ring |
| 101 | |
| 102 | /-- A radial envelope for every component of the Gaussian Hessian. -/ |
| 103 | theorem norm_heatKernelSecond_le {s : ℝ} (hs : 0 < s) |
| 104 | (i j : Fin 3) (z : Space) : |
| 105 | ‖heatKernelSecond s i j z‖ ≤ |
| 106 | (‖z‖ ^ 2 / (4 * s ^ 2) + 1 / (2 * s)) * heatKernel s z := by |
| 107 | have hden₁ : 0 < 4 * s ^ 2 := by positivity |
| 108 | have hden₂ : 0 < 2 * s := by positivity |
| 109 | have hcoord : ‖z i * z j‖ ≤ ‖z‖ ^ 2 := by |
| 110 | rw [norm_mul, pow_two] |
| 111 | exact mul_le_mul (PiLp.norm_apply_le z i) (PiLp.norm_apply_le z j) |
| 112 | (norm_nonneg _) (norm_nonneg _) |
| 113 | have hdiag : ‖(if i = j then (1 : ℝ) else 0)‖ ≤ 1 := by |
| 114 | split_ifs <;> norm_num |
| 115 | have hcoeff : |
| 116 | ‖z i * z j / (4 * s ^ 2) - (if i = j then 1 else 0) / (2 * s)‖ ≤ |
| 117 | ‖z‖ ^ 2 / (4 * s ^ 2) + 1 / (2 * s) := by |
| 118 | calc |
| 119 | _ ≤ ‖z i * z j / (4 * s ^ 2)‖ + |
| 120 | ‖(if i = j then (1 : ℝ) else 0) / (2 * s)‖ := norm_sub_le _ _ |
| 121 | _ = ‖z i * z j‖ / (4 * s ^ 2) + |
| 122 | ‖(if i = j then (1 : ℝ) else 0)‖ / (2 * s) := by |
| 123 | simp only [norm_div, Real.norm_eq_abs, abs_of_pos hden₁, abs_of_pos hden₂] |
| 124 | _ ≤ _ := add_le_add |
| 125 | (div_le_div_of_nonneg_right hcoord hden₁.le) |
| 126 | (div_le_div_of_nonneg_right hdiag hden₂.le) |
| 127 | rw [heatKernelSecond, norm_mul, Real.norm_of_nonneg (heatKernel_nonneg hs.le z)] |
| 128 | exact mul_le_mul_of_nonneg_right hcoeff (heatKernel_nonneg hs.le z) |
| 129 | |
| 130 | end NavierStokesR3.Comparison |