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.Calculus.Deriv.MeanValue |
| 2 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 3 | import Mathlib.Tactic.Linarith |
| 4 | import Mathlib.Tactic.Ring |
| 5 | |
| 6 | /-! |
| 7 | # Scalar closure of the whole-space comparison estimate |
| 8 | |
| 9 | The localized energy may have derivatives only in the interior of the time |
| 10 | interval. The integrating-factor argument below therefore uses continuity on |
| 11 | the closed interval and the mean-value theorem on its interior. In particular, |
| 12 | no energy inequality at a time endpoint is assumed. |
| 13 | -/ |
| 14 | |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open Set |
| 19 | |
| 20 | namespace NavierStokesR3.ComparisonGronwall |
| 21 | |
| 22 | /-- The weighted perturbed Gronwall estimate with a nonpositive initial value. |
| 23 | Only interior derivatives of `E` are needed. -/ |
| 24 | theorem exp_neg_mul_le_of_deriv_le {T K ε : ℝ} {E E' : ℝ → ℝ} |
| 25 | (hT : 0 ≤ T) (hK : 0 ≤ K) (hε : 0 ≤ ε) |
| 26 | (hcont : ContinuousOn E (Icc 0 T)) (hinitial : E 0 ≤ 0) |
| 27 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 28 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ K * E t + ε) : |
| 29 | ∀ t ∈ Icc 0 T, Real.exp (-K * t) * E t ≤ ε * t := by |
| 30 | let G : ℝ → ℝ := fun t => Real.exp (-K * t) * E t - ε * t |
| 31 | let G' : ℝ → ℝ := fun t => Real.exp (-K * t) * (E' t - K * E t) - ε |
| 32 | have hgcont : ContinuousOn G (Icc 0 T) := |
| 33 | ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).continuousOn.mul |
| 34 | hcont).sub (continuous_const.mul continuous_id).continuousOn |
| 35 | have hgderiv (t : ℝ) (ht : t ∈ Ioo 0 T) : HasDerivAt G (G' t) t := by |
| 36 | have hexp := ((hasDerivAt_id t).const_mul (-K)).exp |
| 37 | convert! (hexp.mul (hderiv t ht)).sub ((hasDerivAt_id t).const_mul ε) using 1 |
| 38 | try dsimp [G, G'] |
| 39 | ring |
| 40 | have hG : AntitoneOn G (Icc 0 T) := by |
| 41 | apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc 0 T) hgcont |
| 42 | · intro t ht |
| 43 | exact (hgderiv t (by simpa only [interior_Icc] using ht)).hasDerivWithinAt |
| 44 | · intro t ht |
| 45 | have ht' : t ∈ Ioo 0 T := by simpa only [interior_Icc] using ht |
| 46 | have hexp : Real.exp (-K * t) ≤ 1 := by |
| 47 | rw [← Real.exp_zero] |
| 48 | exact Real.exp_le_exp.mpr |
| 49 | (mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hK) ht'.1.le) |
| 50 | have hfirst : Real.exp (-K * t) * (E' t - K * E t) ≤ |
| 51 | Real.exp (-K * t) * ε := |
| 52 | mul_le_mul_of_nonneg_left (by linarith [hbound t ht']) (Real.exp_pos _).le |
| 53 | have hsecond : Real.exp (-K * t) * ε ≤ ε := by |
| 54 | simpa only [one_mul] using mul_le_mul_of_nonneg_right hexp hε |
| 55 | dsimp only [G'] |
| 56 | linarith |
| 57 | intro t ht |
| 58 | have hle := hG ⟨le_rfl, hT⟩ ht ht.1 |
| 59 | have hzero : G 0 ≤ 0 := by simpa [G] using hinitial |
| 60 | have hnonpos := hle.trans hzero |
| 61 | exact sub_nonpos.mp hnonpos |
| 62 | |
| 63 | /-- Perturbed Gronwall, retaining the actual time in the bound. -/ |
| 64 | theorem le_exp_mul_of_deriv_le {T K ε : ℝ} {E E' : ℝ → ℝ} |
| 65 | (hT : 0 ≤ T) (hK : 0 ≤ K) (hε : 0 ≤ ε) |
| 66 | (hcont : ContinuousOn E (Icc 0 T)) (hinitial : E 0 ≤ 0) |
| 67 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 68 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ K * E t + ε) : |
| 69 | ∀ t ∈ Icc 0 T, E t ≤ ε * t * Real.exp (K * t) := by |
| 70 | intro t ht |
| 71 | have hweighted := exp_neg_mul_le_of_deriv_le hT hK hε hcont hinitial hderiv hbound t ht |
| 72 | have hmul := mul_le_mul_of_nonneg_right hweighted (Real.exp_pos (K * t)).le |
| 73 | have hexp : Real.exp (-K * t) * Real.exp (K * t) = 1 := by |
| 74 | rw [← Real.exp_add] |
| 75 | have hcancel : -K * t + K * t = 0 := by ring |
| 76 | rw [hcancel, Real.exp_zero] |
| 77 | calc |
| 78 | E t = Real.exp (-K * t) * E t * Real.exp (K * t) := by |
| 79 | calc |
| 80 | E t = E t * 1 := (mul_one _).symm |
| 81 | _ = E t * (Real.exp (-K * t) * Real.exp (K * t)) := by rw [hexp] |
| 82 | _ = _ := by ring |
| 83 | _ ≤ ε * t * Real.exp (K * t) := hmul |
| 84 | |
| 85 | /-- Perturbed Gronwall with one bound valid throughout the closed interval. -/ |
| 86 | theorem le_uniform_exp_mul_of_deriv_le {T K ε : ℝ} {E E' : ℝ → ℝ} |
| 87 | (hT : 0 ≤ T) (hK : 0 ≤ K) (hε : 0 ≤ ε) |
| 88 | (hcont : ContinuousOn E (Icc 0 T)) (hinitial : E 0 ≤ 0) |
| 89 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 90 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ K * E t + ε) : |
| 91 | ∀ t ∈ Icc 0 T, E t ≤ ε * T * Real.exp (K * T) := by |
| 92 | intro t ht |
| 93 | calc |
| 94 | E t ≤ ε * t * Real.exp (K * t) := |
| 95 | le_exp_mul_of_deriv_le hT hK hε hcont hinitial hderiv hbound t ht |
| 96 | _ ≤ ε * T * Real.exp (K * T) := by |
| 97 | apply mul_le_mul |
| 98 | · exact mul_le_mul_of_nonneg_left ht.2 hε |
| 99 | · exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 hK) |
| 100 | · exact (Real.exp_pos _).le |
| 101 | · exact mul_nonneg hε hT |
| 102 | |
| 103 | /-- A forcing error of order `1 / R` gives a uniform energy error of the same |
| 104 | order. The numerator depends only on `C`, `K`, and the time interval. -/ |
| 105 | theorem le_div_radius_of_deriv_le {T K C R : ℝ} {E E' : ℝ → ℝ} |
| 106 | (hT : 0 ≤ T) (hK : 0 ≤ K) (hC : 0 ≤ C) (hR : 0 < R) |
| 107 | (hcont : ContinuousOn E (Icc 0 T)) (hinitial : E 0 = 0) |
| 108 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt E (E' t) t) |
| 109 | (hbound : ∀ t ∈ Ioo 0 T, E' t ≤ K * E t + C / R) : |
| 110 | ∀ t ∈ Icc 0 T, E t ≤ (C * T * Real.exp (K * T)) / R := by |
| 111 | intro t ht |
| 112 | have hle := le_uniform_exp_mul_of_deriv_le hT hK (div_nonneg hC hR.le) |
| 113 | hcont hinitial.le hderiv hbound t ht |
| 114 | convert! hle using 1 |
| 115 | ring |
| 116 | |
| 117 | end NavierStokesR3.ComparisonGronwall |