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.CompactEnergy |
| 2 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus |
| 3 | |
| 4 | /-! |
| 5 | # The time primitive of the spatial L² norm of a compact force |
| 6 | |
| 7 | All spatial and temporal integrals use ordinary Lebesgue volume. |
| 8 | -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | open Set Filter MeasureTheory Function |
| 13 | open scoped Topology BigOperators ContDiff InnerProductSpace |
| 14 | |
| 15 | namespace NavierStokesR3.CompactEnergy |
| 16 | |
| 17 | open NavierStokes.ProblemStatement |
| 18 | |
| 19 | /-- The ordinary spatial L² norm, used with square-integrable slices. -/ |
| 20 | def l2Norm (f : VelocityField) (t : ℝ) : ℝ := Real.sqrt (l2Sq f t) |
| 21 | |
| 22 | /-- The time integral of the spatial L² norm starting at time zero. -/ |
| 23 | def cumulativeForceNorm (f : VelocityField) (T : ℝ) : ℝ := |
| 24 | ∫ t in (0 : ℝ)..T, l2Norm f t |
| 25 | |
| 26 | theorem l2Norm_nonneg (f : VelocityField) (t : ℝ) : 0 ≤ l2Norm f t := |
| 27 | Real.sqrt_nonneg _ |
| 28 | |
| 29 | /-- A compact spacetime support supplies one compact spatial support for every |
| 30 | slice, and therefore continuity of the full spatial square integral. -/ |
| 31 | theorem l2Sq_continuous {f : VelocityField} (hf : Continuous f) |
| 32 | (hcf : HasCompactSupport f) : Continuous (l2Sq f) := by |
| 33 | let K : Set Space := Prod.snd '' tsupport f |
| 34 | have hK : IsCompact K := hcf.isCompact.image continuous_snd |
| 35 | rw [← continuousOn_univ] |
| 36 | apply CompactTimeIntegral.continuousOn_integral |
| 37 | (F := fun z : SpaceTime => ‖f z‖ ^ 2) hK (hf.norm.pow 2).continuousOn |
| 38 | intro t ht x hx |
| 39 | have hz : f (t, x) = 0 := by |
| 40 | apply image_eq_zero_of_notMem_tsupport |
| 41 | intro h |
| 42 | exact hx ⟨(t, x), h, rfl⟩ |
| 43 | simp [hz] |
| 44 | |
| 45 | theorem l2Norm_continuous {f : VelocityField} (hf : Continuous f) |
| 46 | (hcf : HasCompactSupport f) : Continuous (l2Norm f) := |
| 47 | (l2Sq_continuous hf hcf).sqrt |
| 48 | |
| 49 | theorem l2Norm_intervalIntegrable {f : VelocityField} (hf : Continuous f) |
| 50 | (hcf : HasCompactSupport f) (a b : ℝ) : |
| 51 | IntervalIntegrable (l2Norm f) volume a b := |
| 52 | (l2Norm_continuous hf hcf).intervalIntegrable a b |
| 53 | |
| 54 | @[simp] theorem cumulativeForceNorm_zero (f : VelocityField) : |
| 55 | cumulativeForceNorm f 0 = 0 := by |
| 56 | simp [cumulativeForceNorm] |
| 57 | |
| 58 | theorem cumulativeForceNorm_continuous {f : VelocityField} (hf : Continuous f) |
| 59 | (hcf : HasCompactSupport f) : Continuous (cumulativeForceNorm f) := |
| 60 | intervalIntegral.continuous_primitive (l2Norm_intervalIntegrable hf hcf) 0 |
| 61 | |
| 62 | theorem cumulativeForceNorm_hasDerivAt {f : VelocityField} (hf : Continuous f) |
| 63 | (hcf : HasCompactSupport f) (t : ℝ) : |
| 64 | HasDerivAt (cumulativeForceNorm f) (l2Norm f t) t := by |
| 65 | have hc := l2Norm_continuous hf hcf |
| 66 | exact intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 t) |
| 67 | hc.aestronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt |
| 68 | |
| 69 | theorem cumulativeForceNorm_nonneg (f : VelocityField) {T : ℝ} (hT : 0 ≤ T) : |
| 70 | 0 ≤ cumulativeForceNorm f T := |
| 71 | intervalIntegral.integral_nonneg_of_forall hT (l2Norm_nonneg f) |
| 72 | |
| 73 | /-- The primitive is monotone because the spatial L² norm is nonnegative. -/ |
| 74 | theorem cumulativeForceNorm_monotone {f : VelocityField} (hf : Continuous f) |
| 75 | (hcf : HasCompactSupport f) : Monotone (cumulativeForceNorm f) := by |
| 76 | apply monotone_of_hasDerivAt_nonneg (cumulativeForceNorm_hasDerivAt hf hcf) |
| 77 | exact l2Norm_nonneg f |
| 78 | |
| 79 | /-- The exact square-primitive identity needed in the integrated energy bound. -/ |
| 80 | theorem integral_l2Norm_cumulative_eq_sq {f : VelocityField} (hf : Continuous f) |
| 81 | (hcf : HasCompactSupport f) (T : ℝ) : |
| 82 | (∫ t in (0 : ℝ)..T, 2 * l2Norm f t * cumulativeForceNorm f t) = |
| 83 | (cumulativeForceNorm f T) ^ 2 := by |
| 84 | have hc := l2Norm_continuous hf hcf |
| 85 | have hF := cumulativeForceNorm_continuous hf hcf |
| 86 | have hderiv (t : ℝ) : |
| 87 | HasDerivAt (fun s => (cumulativeForceNorm f s) ^ 2) |
| 88 | (2 * l2Norm f t * cumulativeForceNorm f t) t := by |
| 89 | convert! (cumulativeForceNorm_hasDerivAt hf hcf t).pow 2 using 1 |
| 90 | norm_num |
| 91 | ring |
| 92 | have h := intervalIntegral.integral_eq_sub_of_hasDerivAt |
| 93 | (fun t _ => hderiv t) (((continuous_const.mul hc).mul hF).intervalIntegrable 0 T) |
| 94 | simpa using h |
| 95 | |
| 96 | end NavierStokesR3.CompactEnergy |