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.Analysis.SpecialFunctions.Sqrt |
| 2 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus |
| 3 | import Mathlib.Tactic.Linarith |
| 4 | |
| 5 | /-! |
| 6 | # The sharp scalar estimate for forced kinetic energy |
| 7 | |
| 8 | Regularizing the square root removes the apparent singularity at zero energy. |
| 9 | The estimate requires derivatives only in the interior of the time interval. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | open Set MeasureTheory |
| 15 | |
| 16 | namespace NavierStokesR3.SharpEnergyBound |
| 17 | |
| 18 | /-- A zero-initial-energy differential inequality controls the square root of |
| 19 | the energy by the time integral of the forcing norm. -/ |
| 20 | theorem sqrt_energy_le_integral {T : ℝ} {E E' q : ℝ → ℝ} |
| 21 | (hT : 0 ≤ T) (hcont : ContinuousOn E (Icc 0 T)) |
| 22 | (hnonneg : ∀ t ∈ Icc 0 T, 0 ≤ E t) (hinitial : E 0 = 0) |
| 23 | (hq : ContinuousOn q (Icc 0 T)) (hqnonneg : ∀ t ∈ Ioo 0 T, 0 ≤ q t) |
| 24 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 25 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ 2 * Real.sqrt (E t) * q t) : |
| 26 | Real.sqrt (E T) ≤ ∫ t in 0..T, q t := by |
| 27 | apply le_of_forall_pos_le_add |
| 28 | intro ε hε |
| 29 | have hpos (t : ℝ) (ht : t ∈ Icc 0 T) : 0 < E t + ε ^ 2 := |
| 30 | add_pos_of_nonneg_of_pos (hnonneg t ht) (sq_pos_of_pos hε) |
| 31 | have hscont : ContinuousOn (fun t => Real.sqrt (E t + ε ^ 2)) (Icc 0 T) := |
| 32 | Real.continuous_sqrt.comp_continuousOn (hcont.add continuousOn_const) |
| 33 | have hsderiv (t : ℝ) (ht : t ∈ Ioo 0 T) : |
| 34 | HasDerivWithinAt (fun t => Real.sqrt (E t + ε ^ 2)) |
| 35 | (E' t / (2 * Real.sqrt (E t + ε ^ 2))) (Ioi t) t := |
| 36 | ((hderiv t ht).add_const (ε ^ 2)).sqrt |
| 37 | (ne_of_gt (hpos t ⟨ht.1.le, ht.2.le⟩)) |>.hasDerivWithinAt |
| 38 | have hsbound (t : ℝ) (ht : t ∈ Ioo 0 T) : |
| 39 | E' t / (2 * Real.sqrt (E t + ε ^ 2)) ≤ q t := by |
| 40 | apply (div_le_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 2) |
| 41 | (Real.sqrt_pos.2 (hpos t ⟨ht.1.le, ht.2.le⟩)))).2 |
| 42 | have hsqrt : Real.sqrt (E t) ≤ Real.sqrt (E t + ε ^ 2) := |
| 43 | Real.sqrt_le_sqrt (le_add_of_nonneg_right (sq_nonneg ε)) |
| 44 | have hmul := mul_le_mul_of_nonneg_right hsqrt (hqnonneg t ht) |
| 45 | nlinarith [hbound t ht] |
| 46 | have h := intervalIntegral.sub_le_integral_of_hasDeriv_right_of_le |
| 47 | hT hscont hsderiv (hq.integrableOn_Icc) hsbound |
| 48 | have hzero : Real.sqrt (E 0 + ε ^ 2) = ε := by |
| 49 | rw [hinitial, zero_add, Real.sqrt_sq hε.le] |
| 50 | rw [hzero] at h |
| 51 | have hsqrt : Real.sqrt (E T) ≤ Real.sqrt (E T + ε ^ 2) := |
| 52 | Real.sqrt_le_sqrt (le_add_of_nonneg_right (sq_nonneg ε)) |
| 53 | linarith |
| 54 | |
| 55 | /-- The corresponding sharp squared-energy bound. -/ |
| 56 | theorem energy_le_integral_sq {T : ℝ} {E E' q : ℝ → ℝ} |
| 57 | (hT : 0 ≤ T) (hcont : ContinuousOn E (Icc 0 T)) |
| 58 | (hnonneg : ∀ t ∈ Icc 0 T, 0 ≤ E t) (hinitial : E 0 = 0) |
| 59 | (hq : ContinuousOn q (Icc 0 T)) (hqnonneg : ∀ t ∈ Ioo 0 T, 0 ≤ q t) |
| 60 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 61 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ 2 * Real.sqrt (E t) * q t) : |
| 62 | E T ≤ (∫ t in 0..T, q t) ^ 2 := by |
| 63 | have h := sqrt_energy_le_integral hT hcont hnonneg hinitial hq hqnonneg hderiv hbound |
| 64 | have hi : 0 ≤ ∫ t in 0..T, q t := (Real.sqrt_nonneg _).trans h |
| 65 | have hs := (sq_le_sq₀ (Real.sqrt_nonneg _) hi).2 h |
| 66 | simpa only [Real.sq_sqrt (hnonneg T ⟨hT, le_rfl⟩)] using hs |
| 67 | |
| 68 | end NavierStokesR3.SharpEnergyBound |