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 | /-- Apply the scalar estimate to a family of localized energies. All radii |
| 118 | share the same constant in the numerator. -/ |
| 119 | theorem exists_uniform_radius_bound {T K C : ℝ} {E E' : ℝ → ℝ → ℝ} |
| 120 | (hT : 0 ≤ T) (hK : 0 ≤ K) (hC : 0 ≤ C) |
| 121 | (hcont : ∀ R : ℝ, 1 ≤ R → ContinuousOn (E R) (Icc 0 T)) |
| 122 | (hinitial : ∀ R : ℝ, 1 ≤ R → E R 0 = 0) |
| 123 | (hderiv : ∀ R : ℝ, 1 ≤ R → ∀ t ∈ Ioo 0 T, HasDerivAt (E R) (E' R t) t) |
| 124 | (hbound : ∀ R : ℝ, 1 ≤ R → ∀ t ∈ Ioo 0 T, E' R t ≤ K * E R t + C / R) : |
| 125 | ∃ D : ℝ, 0 ≤ D ∧ ∀ R : ℝ, 1 ≤ R → ∀ t ∈ Icc 0 T, E R t ≤ D / R := by |
| 126 | refine ⟨C * T * Real.exp (K * T), mul_nonneg (mul_nonneg hC hT) (Real.exp_pos _).le, |
| 127 | ?_⟩ |
| 128 | intro R hR |
| 129 | exact le_div_radius_of_deriv_le hT hK hC (lt_of_lt_of_le zero_lt_one hR) |
| 130 | (hcont R hR) (hinitial R hR) (hderiv R hR) (hbound R hR) |
| 131 | |
| 132 | /-- A nonnegative scalar with a uniform `1 / R` bound for every `R ≥ 1` |
| 133 | vanishes. This is the final scalar step in cutoff exhaustion. -/ |
| 134 | theorem eq_zero_of_forall_radius_bound {x D : ℝ} (hx : 0 ≤ x) (hD : 0 ≤ D) |
| 135 | (hbound : ∀ R : ℝ, 1 ≤ R → x ≤ D / R) : x = 0 := by |
| 136 | by_contra hzero |
| 137 | have hxpos : 0 < x := lt_of_le_of_ne hx (Ne.symm hzero) |
| 138 | let R : ℝ := (D + 1) / x + 1 |
| 139 | have hR : 1 ≤ R := by |
| 140 | dsimp [R] |
| 141 | linarith [div_nonneg (show 0 ≤ D + 1 by linarith) hx] |
| 142 | have hRpos : 0 < R := lt_of_lt_of_le zero_lt_one hR |
| 143 | have hmul : x * R ≤ D := (le_div_iff₀ hRpos).mp (hbound R hR) |
| 144 | have hcancel : (D + 1) / x * x = D + 1 := div_mul_cancel₀ _ hxpos.ne' |
| 145 | dsimp [R] at hmul |
| 146 | nlinarith |
| 147 | |
| 148 | /-- For a fixed compact set, the cutoff bound is available only after the |
| 149 | radius contains that set. Such a bound is still sufficient for vanishing. -/ |
| 150 | theorem eq_zero_of_forall_large_radius_bound {x D R₀ : ℝ} (hx : 0 ≤ x) |
| 151 | (hbound : ∀ R : ℝ, max 1 R₀ ≤ R → x ≤ D / R) : x = 0 := by |
| 152 | by_contra hzero |
| 153 | have hxpos : 0 < x := lt_of_le_of_ne hx (Ne.symm hzero) |
| 154 | let R : ℝ := max (max 1 R₀) ((D + 1) / x + 1) |
| 155 | have hR : max 1 R₀ ≤ R := le_max_left _ _ |
| 156 | have hRpos : 0 < R := lt_of_lt_of_le zero_lt_one ((le_max_left _ _).trans hR) |
| 157 | have hmul : x * R ≤ D := (le_div_iff₀ hRpos).mp (hbound R hR) |
| 158 | have hsize : (D + 1) / x + 1 ≤ R := le_max_right _ _ |
| 159 | have hsize_mul := mul_le_mul_of_nonneg_left hsize hx |
| 160 | have hcancel : (D + 1) / x * x = D + 1 := div_mul_cancel₀ _ hxpos.ne' |
| 161 | nlinarith |
| 162 | |
| 163 | end NavierStokesR3.ComparisonGronwall |