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.RadialHeatProfile |
| 2 | import NavierStokes.BorelExtension |
| 3 | import NavierStokes.EndpointExtension |
| 4 | |
| 5 | /-! |
| 6 | # A genuine smooth extension of the radial heat profile |
| 7 | |
| 8 | For each fixed `a > 1`, the actual gamma-integral derivative kernels prescribe |
| 9 | all right jets at zero. A constructed Taylor--Borel series realizes precisely |
| 10 | these jets on the negative side. Gluing the two branches preserves the actual |
| 11 | heat profile on the entire nonnegative half-line and gives a globally smooth |
| 12 | function. No kernel formula at a negative argument is used. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Topology ContDiff |
| 19 | |
| 20 | namespace NavierStokes.HeatProfileExtension |
| 21 | |
| 22 | open RadialHeatProfile |
| 23 | |
| 24 | /-- The actual right endpoint jets, as derived from the integral kernels. -/ |
| 25 | noncomputable def endpointJet (a : ℝ) (n : ℕ) : ℝ := profileJet a n 0 |
| 26 | |
| 27 | theorem endpointJet_eq_gamma {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 28 | endpointJet a n = |
| 29 | (Real.Gamma a)⁻¹ * derivativeCoeff a n * Real.Gamma (a + (n : ℝ)) := by |
| 30 | rw [endpointJet, profileJet, moment_zero ha] |
| 31 | |
| 32 | theorem endpointJet_eq_right_derivative {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 33 | endpointJet a n = iteratedDerivWithin n (profile a) (Ici 0) 0 := |
| 34 | (iteratedDerivWithin_profile ha n le_rfl).symm |
| 35 | |
| 36 | theorem profileJet_continuousOn {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 37 | ContinuousOn (profileJet a n) (Ici 0) := |
| 38 | continuousOn_const.mul (moment_continuousOn ha n) |
| 39 | |
| 40 | /-- The negative branch is the actual compactly supported Borel series. -/ |
| 41 | noncomputable def leftBranch (a : ℝ) : ℝ → ℝ := BorelExtension.extension (endpointJet a) |
| 42 | |
| 43 | theorem leftBranch_contDiff (a : ℝ) : ContDiff ℝ ∞ (leftBranch a) := |
| 44 | BorelExtension.extension_contDiff (endpointJet a) |
| 45 | |
| 46 | theorem leftBranch_jets (a : ℝ) (n : ℕ) : |
| 47 | iteratedDeriv n (leftBranch a) 0 = endpointJet a n := |
| 48 | BorelExtension.extension_jets (endpointJet a) n |
| 49 | |
| 50 | theorem leftBranch_left_jets (a : ℝ) (n : ℕ) : |
| 51 | iteratedDerivWithin n (leftBranch a) (Iic 0) 0 = endpointJet a n := by |
| 52 | rw [iteratedDerivWithin_eq_iteratedFDerivWithin, |
| 53 | iteratedFDerivWithin_eq_iteratedFDeriv (uniqueDiffOn_Iic 0) |
| 54 | ((leftBranch_contDiff a).of_le |
| 55 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl n)).contDiffAt (mem_Iic.mpr le_rfl)] |
| 56 | exact leftBranch_jets a n |
| 57 | |
| 58 | theorem leftBranch_zero (a : ℝ) : leftBranch a 0 = profile a 0 := by |
| 59 | have h := leftBranch_jets a 0 |
| 60 | simpa only [iteratedDeriv_zero, endpointJet, profileJet, derivativeCoeff, |
| 61 | mul_one, profile] using h |
| 62 | |
| 63 | theorem matching_jets {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 64 | iteratedDerivWithin n (leftBranch a) (Iic 0) 0 = |
| 65 | iteratedDerivWithin n (profile a) (Ici 0) 0 := by |
| 66 | rw [leftBranch_left_jets, ← endpointJet_eq_right_derivative ha] |
| 67 | |
| 68 | /-- The globally defined extension. The original profile is used at every |
| 69 | positive argument, and matching zeroth jets preserve it at zero as well. -/ |
| 70 | noncomputable def extension (a : ℝ) : ℝ → ℝ := |
| 71 | EndpointExtension.glue 0 (leftBranch a) (profile a) |
| 72 | |
| 73 | theorem extension_contDiff {a : ℝ} (ha : 1 < a) : ContDiff ℝ ∞ (extension a) := |
| 74 | EndpointExtension.contDiff_glue (leftBranch_contDiff a).contDiffOn |
| 75 | (profile_contDiffOn ha) (matching_jets ha) |
| 76 | |
| 77 | theorem extension_eq_profile (a : ℝ) {z : ℝ} (hz : 0 ≤ z) : |
| 78 | extension a z = profile a z := |
| 79 | EndpointExtension.glue_eqOn_right (leftBranch_zero a) hz |
| 80 | |
| 81 | theorem extension_eq_leftBranch (a : ℝ) {z : ℝ} (hz : z ≤ 0) : |
| 82 | extension a z = leftBranch a z := EndpointExtension.glue_eq_left hz |
| 83 | |
| 84 | theorem extension_zero {a : ℝ} (ha : 1 < a) : extension a 0 = 1 := by |
| 85 | rw [extension_eq_profile a le_rfl, profile_zero ha] |
| 86 | |
| 87 | /-- Ordinary derivatives of the smooth extension preserve every actual |
| 88 | one-sided profile derivative throughout the closed nonnegative half-line. -/ |
| 89 | theorem iteratedDeriv_extension_eq_profileJet {a : ℝ} (ha : 1 < a) |
| 90 | (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 91 | iteratedDeriv n (extension a) z = profileJet a n z := by |
| 92 | rw [extension, EndpointExtension.iteratedDeriv_glue |
| 93 | (leftBranch_contDiff a).contDiffOn (profile_contDiffOn ha) (matching_jets ha)] |
| 94 | exact (EndpointExtension.glue_eqOn_right (matching_jets ha n) hz).trans |
| 95 | (iteratedDerivWithin_profile ha n hz) |
| 96 | |
| 97 | theorem iteratedDeriv_extension_zero {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 98 | iteratedDeriv n (extension a) 0 = endpointJet a n := |
| 99 | iteratedDeriv_extension_eq_profileJet ha n le_rfl |
| 100 | |
| 101 | theorem extension_preserves_right_jets {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 102 | iteratedDeriv n (extension a) 0 = |
| 103 | iteratedDerivWithin n (profile a) (Ici 0) 0 := |
| 104 | (iteratedDeriv_extension_zero ha n).trans (endpointJet_eq_right_derivative ha n) |
| 105 | |
| 106 | theorem extension_pos {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 107 | 0 < extension a z := by |
| 108 | rw [extension_eq_profile a hz] |
| 109 | exact profile_pos ha hz |
| 110 | |
| 111 | theorem extension_zero_of_le_neg_one (a : ℝ) {z : ℝ} (hz : z ≤ -1) : |
| 112 | extension a z = 0 := by |
| 113 | rw [extension_eq_leftBranch a (by linarith)] |
| 114 | exact BorelExtension.extension_zero_of_one_le_abs (endpointJet a) |
| 115 | ((by linarith : (1 : ℝ) ≤ -z).trans (neg_le_abs z)) |
| 116 | |
| 117 | /-! ## Global fixed-order derivative bounds -/ |
| 118 | |
| 119 | /-- The convergent majorant from the actual Borel construction. -/ |
| 120 | noncomputable def leftBound (a : ℝ) (n : ℕ) : ℝ := |
| 121 | ∑' j : ℕ, BorelExtension.majorant (endpointJet a) n j |
| 122 | |
| 123 | theorem leftBranch_derivative_bound (a : ℝ) (n : ℕ) (z : ℝ) : |
| 124 | ‖iteratedDeriv n (leftBranch a) z‖ ≤ leftBound a n := by |
| 125 | rw [leftBranch, BorelExtension.iteratedDeriv_extension] |
| 126 | exact tsum_of_norm_bounded (BorelExtension.majorant_summable (endpointJet a) n).hasSum |
| 127 | (fun j => BorelExtension.norm_iteratedDeriv_term_le_majorant (endpointJet a) n j z) |
| 128 | |
| 129 | theorem leftBound_nonneg (a : ℝ) (n : ℕ) : 0 ≤ leftBound a n := |
| 130 | (norm_nonneg _).trans (leftBranch_derivative_bound a n 0) |
| 131 | |
| 132 | /-- A finite bound at every fixed order, uniform over the entire real line. -/ |
| 133 | noncomputable def derivativeBound (a : ℝ) (n : ℕ) : ℝ := |
| 134 | max (leftBound a n) |
| 135 | (|(Real.Gamma a)⁻¹ * derivativeCoeff a n| * Real.Gamma (a + (n : ℝ))) |
| 136 | |
| 137 | theorem derivativeBound_nonneg (a : ℝ) (n : ℕ) : 0 ≤ derivativeBound a n := |
| 138 | (leftBound_nonneg a n).trans (le_max_left _ _) |
| 139 | |
| 140 | theorem extension_derivative_bound {a : ℝ} (ha : 1 < a) (n : ℕ) (z : ℝ) : |
| 141 | ‖iteratedDeriv n (extension a) z‖ ≤ derivativeBound a n := by |
| 142 | by_cases hz : 0 ≤ z |
| 143 | · rw [iteratedDeriv_extension_eq_profileJet ha n hz, |
| 144 | ← iteratedDerivWithin_profile ha n hz, Real.norm_eq_abs] |
| 145 | exact (profile_derivative_bound ha n hz).trans (le_max_right _ _) |
| 146 | · have hz' : z < 0 := lt_of_not_ge hz |
| 147 | have heq : extension a =ᶠ[𝓝 z] leftBranch a := by |
| 148 | filter_upwards [Iio_mem_nhds hz'] with y hy |
| 149 | exact extension_eq_leftBranch a (show y < 0 from hy).le |
| 150 | rw [heq.iteratedDeriv_eq] |
| 151 | exact (leftBranch_derivative_bound a n z).trans (le_max_left _ _) |
| 152 | |
| 153 | /-- The first-order error has a global linear bound, including negative |
| 154 | arguments. It is useful for domination of the extended tail integrals. -/ |
| 155 | theorem extension_sub_one_bound {a : ℝ} (ha : 1 < a) (z : ℝ) : |
| 156 | |extension a z - 1| ≤ derivativeBound a 1 * |z| := by |
| 157 | have hc := (extension_contDiff ha).differentiable (by simp) |
| 158 | have hb (y : ℝ) (_hy : y ∈ (univ : Set ℝ)) : |
| 159 | ‖deriv (extension a) y‖ ≤ derivativeBound a 1 := by |
| 160 | simpa only [iteratedDeriv_one] using extension_derivative_bound ha 1 y |
| 161 | have hm := (convex_univ : Convex ℝ (univ : Set ℝ)).norm_image_sub_le_of_norm_deriv_le |
| 162 | (fun y _ => hc y) hb (mem_univ (0 : ℝ)) (mem_univ z) |
| 163 | simpa only [extension_zero ha, sub_zero, Real.norm_eq_abs] using hm |
| 164 | |
| 165 | /-- Positivity persists on a genuine two-sided neighborhood of the origin. -/ |
| 166 | theorem extension_positive_near_zero {a : ℝ} (ha : 1 < a) : |
| 167 | ∃ δ : ℝ, 0 < δ ∧ ∀ z : ℝ, |z| < δ → |
| 168 | (1 / 2 : ℝ) < extension a z ∧ extension a z < 3 / 2 := by |
| 169 | have hev : ∀ᶠ z in 𝓝 (0 : ℝ), (1 / 2 : ℝ) < extension a z ∧ extension a z < 3 / 2 := |
| 170 | ((extension_contDiff ha).continuous.continuousAt.preimage_mem_nhds |
| 171 | (Ioo_mem_nhds (by rw [extension_zero ha]; norm_num) |
| 172 | (by rw [extension_zero ha]; norm_num))) |
| 173 | obtain ⟨δ, hδ, hnear⟩ := Metric.eventually_nhds_iff.mp hev |
| 174 | refine ⟨δ, hδ, fun z hz => hnear ?_⟩ |
| 175 | simpa only [Real.dist_eq, sub_zero] using hz |
| 176 | |
| 177 | theorem extension_positive_on_collar {a : ℝ} (ha : 1 < a) : |
| 178 | ∃ δ : ℝ, 0 < δ ∧ ∀ z : ℝ, -δ < z → 0 < extension a z := by |
| 179 | obtain ⟨δ, hδ, hnear⟩ := extension_positive_near_zero ha |
| 180 | refine ⟨δ, hδ, fun z hz => ?_⟩ |
| 181 | by_cases hnonneg : 0 ≤ z |
| 182 | · exact extension_pos ha hnonneg |
| 183 | · have hz0 : z < 0 := lt_of_not_ge hnonneg |
| 184 | have hsmall : |z| < δ := by rw [abs_of_neg hz0]; linarith |
| 185 | exact lt_trans (by norm_num) (hnear z hsmall).1 |
| 186 | |
| 187 | /-! ## Physical parameter composition -/ |
| 188 | |
| 189 | /-- Diffusion-parametrized profile; negative diffusion uses only the Borel |
| 190 | extension, never the original gamma-integral expression. -/ |
| 191 | noncomputable def scaledProfile (a X ν : ℝ) : ℝ := extension a (2 * ν / X) |
| 192 | |
| 193 | theorem scaledProfile_contDiffOn {a : ℝ} (ha : 1 < a) : |
| 194 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => scaledProfile a p.1 p.2) |
| 195 | (Ioi 0 ×ˢ (univ : Set ℝ)) := by |
| 196 | exact (extension_contDiff ha).comp_contDiffOn |
| 197 | ((contDiffOn_const.mul contDiffOn_snd).div contDiffOn_fst |
| 198 | (fun p hp => (show 0 < p.1 from hp.1).ne')) |
| 199 | |
| 200 | theorem scaledProfile_eq_profile (a : ℝ) {X ν : ℝ} (hX : 0 < X) (hν : 0 ≤ ν) : |
| 201 | scaledProfile a X ν = profile a (2 * ν / X) := |
| 202 | extension_eq_profile a (by positivity) |
| 203 | |
| 204 | /-- Every ordinary diffusion derivative is an actual derivative of the |
| 205 | constructed smooth extension, including at and below zero diffusion. -/ |
| 206 | theorem iteratedDeriv_scaledProfile {a : ℝ} (ha : 1 < a) (n : ℕ) (X ν : ℝ) : |
| 207 | iteratedDeriv n (scaledProfile a X) ν = |
| 208 | (2 / X) ^ n * iteratedDeriv n (extension a) (2 * ν / X) := by |
| 209 | have heq : scaledProfile a X = fun u : ℝ => extension a ((2 / X) * u) := by |
| 210 | funext u |
| 211 | unfold scaledProfile |
| 212 | congr 1 |
| 213 | ring |
| 214 | rw [heq] |
| 215 | have h := congrFun (iteratedDeriv_comp_const_mul |
| 216 | ((extension_contDiff ha).of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl n)) (2 / X)) ν |
| 217 | simpa only [show 2 / X * ν = 2 * ν / X by ring] using h |
| 218 | |
| 219 | theorem scaledProfile_derivative_bound {a X : ℝ} (ha : 1 < a) (hX : 0 < X) |
| 220 | (n : ℕ) (ν : ℝ) : |
| 221 | |iteratedDeriv n (scaledProfile a X) ν| ≤ (2 / X) ^ n * derivativeBound a n := by |
| 222 | rw [iteratedDeriv_scaledProfile ha, abs_mul, abs_of_nonneg (by positivity : 0 ≤ (2 / X) ^ n)] |
| 223 | exact mul_le_mul_of_nonneg_left |
| 224 | (by simpa only [Real.norm_eq_abs] using extension_derivative_bound ha n (2 * ν / X)) |
| 225 | (by positivity) |
| 226 | |
| 227 | /-- On a bounded diffusion set this supplies a uniform inverse-radius |
| 228 | majorant on either side of zero diffusion. -/ |
| 229 | theorem scaledProfile_sub_one_bound {a : ℝ} (ha : 1 < a) {X : ℝ} (hX : 0 < X) |
| 230 | (ν : ℝ) : |
| 231 | |scaledProfile a X ν - 1| ≤ 2 * derivativeBound a 1 * |ν| / X := by |
| 232 | calc |
| 233 | _ ≤ derivativeBound a 1 * |2 * ν / X| := extension_sub_one_bound ha (2 * ν / X) |
| 234 | _ = _ := by |
| 235 | rw [abs_div, abs_mul, abs_of_pos hX, abs_of_pos (by norm_num : (0 : ℝ) < 2)] |
| 236 | ring |
| 237 | |
| 238 | noncomputable def physicalProfile (a X η : ℝ) : ℝ := scaledProfile a X (1 - η ^ 2) |
| 239 | |
| 240 | /-- The physical profile now has an ordinary smooth neighborhood beyond |
| 241 | both endpoints `eta = ±1`, for every positive radius coordinate. -/ |
| 242 | theorem physicalProfile_contDiffOn {a : ℝ} (ha : 1 < a) : |
| 243 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => physicalProfile a p.1 p.2) |
| 244 | (Ioi 0 ×ˢ (univ : Set ℝ)) := by |
| 245 | exact (extension_contDiff ha).comp_contDiffOn |
| 246 | ((contDiffOn_const.mul (contDiffOn_const.sub (contDiffOn_snd.pow 2))).div contDiffOn_fst |
| 247 | (fun p hp => (show 0 < p.1 from hp.1).ne')) |
| 248 | |
| 249 | theorem physicalProfile_eq_profile (a : ℝ) {X η : ℝ} (hX : 0 < X) |
| 250 | (hη : η ∈ Icc (-1 : ℝ) 1) : |
| 251 | physicalProfile a X η = profile a (2 * (1 - η ^ 2) / X) := by |
| 252 | apply scaledProfile_eq_profile a hX |
| 253 | have hp : 0 ≤ (η + 1) * (1 - η) := mul_nonneg (by linarith [hη.1]) (by linarith [hη.2]) |
| 254 | nlinarith |
| 255 | |
| 256 | end NavierStokes.HeatProfileExtension |