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.SpatialCurl |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Mul |
| 4 | import Mathlib.Tactic.Ring |
| 5 | |
| 6 | /-! |
| 7 | # Smooth axisymmetric fields in Cartesian coordinates |
| 8 | |
| 9 | Profiles use coordinates `(t,s,z)`, where `s=(x₀²+x₁²)/2`. The velocity is an |
| 10 | actual Euclidean curl. No division by the radius is used, including at the axis. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | namespace NavierStokes.AxisymmetricFields |
| 16 | |
| 17 | open ProblemStatement Set Filter |
| 18 | open scoped BigOperators ContDiff Topology |
| 19 | |
| 20 | abbrev ProfilePoint := ℝ × (ℝ × ℝ) |
| 21 | abbrev Profile := ProfilePoint → ℝ |
| 22 | |
| 23 | def projection (i : Fin 3) : Space →L[ℝ] ℝ := EuclideanSpace.proj i |
| 24 | |
| 25 | @[simp] theorem projection_apply (i : Fin 3) (x : Space) : projection i x = x i := rfl |
| 26 | |
| 27 | def radialEnergy (x : Space) : ℝ := (x 0 ^ 2 + x 1 ^ 2) / 2 |
| 28 | |
| 29 | def profilePoint (t : ℝ) (x : Space) : ProfilePoint := (t, (radialEnergy x, x 2)) |
| 30 | |
| 31 | def partialS (F : Profile) (p : ProfilePoint) : ℝ := fderiv ℝ F p (0, (1, 0)) |
| 32 | def partialZ (F : Profile) (p : ProfilePoint) : ℝ := fderiv ℝ F p (0, (0, 1)) |
| 33 | |
| 34 | def potential (H K : Profile) : VelocityField := fun w => |
| 35 | ((-(1 / 2) : ℝ) * (w.2 1 * H (profilePoint w.1 w.2))) • coordinateVector 0 + |
| 36 | ((1 / 2 : ℝ) * (w.2 0 * H (profilePoint w.1 w.2))) • coordinateVector 1 + |
| 37 | K (profilePoint w.1 w.2) • coordinateVector 2 |
| 38 | |
| 39 | def velocity (H K : Profile) : VelocityField := SpatialCurl.spatialCurl (potential H K) |
| 40 | |
| 41 | theorem radialEnergy_nonneg (x : Space) : 0 ≤ radialEnergy x := by |
| 42 | exact div_nonneg (add_nonneg (sq_nonneg _) (sq_nonneg _)) (by norm_num) |
| 43 | |
| 44 | theorem contDiff_radialEnergy {n : WithTop ℕ∞} : ContDiff ℝ n radialEnergy := by |
| 45 | exact (((projection 0).contDiff.pow 2).add |
| 46 | ((projection 1).contDiff.pow 2)).div_const 2 |
| 47 | |
| 48 | theorem contDiff_profilePoint {n : WithTop ℕ∞} : |
| 49 | ContDiff ℝ n (fun w : SpaceTime => profilePoint w.1 w.2) := |
| 50 | contDiff_fst.prodMk ((contDiff_radialEnergy.comp contDiff_snd).prodMk |
| 51 | ((projection 2).contDiff.comp contDiff_snd)) |
| 52 | |
| 53 | theorem contDiff_profilePoint_slice (t : ℝ) {n : WithTop ℕ∞} : |
| 54 | ContDiff ℝ n (profilePoint t) := |
| 55 | contDiff_const.prodMk (contDiff_radialEnergy.prodMk (projection 2).contDiff) |
| 56 | |
| 57 | def radialLinear (x : Space) : Space →L[ℝ] ℝ := |
| 58 | x 0 • projection 0 + x 1 • projection 1 |
| 59 | |
| 60 | theorem hasFDerivAt_radialEnergy (x : Space) : HasFDerivAt radialEnergy (radialLinear x) x := by |
| 61 | have h0 := (projection 0).hasFDerivAt (x := x) |
| 62 | have h1 := (projection 1).hasFDerivAt (x := x) |
| 63 | convert! ((h0.fun_mul h0).fun_add (h1.fun_mul h1)).mul_const (1 / 2 : ℝ) using 1 |
| 64 | · funext y |
| 65 | simp only [radialEnergy, projection_apply] |
| 66 | ring |
| 67 | · ext v |
| 68 | simp [radialLinear] |
| 69 | ring |
| 70 | |
| 71 | def profileJacobian (x : Space) : Space →L[ℝ] ProfilePoint := |
| 72 | (0 : Space →L[ℝ] ℝ).prod ((radialLinear x).prod (projection 2)) |
| 73 | |
| 74 | theorem hasFDerivAt_profilePoint (t : ℝ) (x : Space) : |
| 75 | HasFDerivAt (profilePoint t) (profileJacobian x) x := |
| 76 | (hasFDerivAt_const t x).prodMk |
| 77 | ((hasFDerivAt_radialEnergy x).prodMk (projection 2).hasFDerivAt) |
| 78 | |
| 79 | @[simp] theorem profileJacobian_apply (x v : Space) : |
| 80 | profileJacobian x v = (0, (x 0 * v 0 + x 1 * v 1, v 2)) := by |
| 81 | simp [profileJacobian, radialLinear] |
| 82 | |
| 83 | def profileDerivative (F : Profile) (t : ℝ) (x : Space) : Space →L[ℝ] ℝ := |
| 84 | (fderiv ℝ F (profilePoint t x)).comp (profileJacobian x) |
| 85 | |
| 86 | theorem hasFDerivAt_profile_composition (F : Profile) (t : ℝ) (x : Space) |
| 87 | (hF : DifferentiableAt ℝ F (profilePoint t x)) : |
| 88 | HasFDerivAt (fun y => F (profilePoint t y)) (profileDerivative F t x) x := |
| 89 | hF.hasFDerivAt.comp x (hasFDerivAt_profilePoint t x) |
| 90 | |
| 91 | theorem profileDerivative_apply (F : Profile) (t : ℝ) (x v : Space) : |
| 92 | profileDerivative F t x v = |
| 93 | (x 0 * v 0 + x 1 * v 1) * partialS F (profilePoint t x) + |
| 94 | v 2 * partialZ F (profilePoint t x) := by |
| 95 | unfold profileDerivative |
| 96 | rw [ContinuousLinearMap.comp_apply, profileJacobian_apply] |
| 97 | have hsplit : (0, (x 0 * v 0 + x 1 * v 1, v 2)) = |
| 98 | (x 0 * v 0 + x 1 * v 1) • ((0, (1, 0)) : ProfilePoint) + |
| 99 | v 2 • ((0, (0, 1)) : ProfilePoint) := by |
| 100 | ext <;> simp |
| 101 | rw [hsplit, map_add, map_smul, map_smul] |
| 102 | rfl |
| 103 | |
| 104 | def potentialJacobian (H K : Profile) (t : ℝ) (x : Space) : Space →L[ℝ] Space := |
| 105 | ((-(1 / 2) : ℝ) • |
| 106 | (x 1 • profileDerivative H t x + H (profilePoint t x) • projection 1)).smulRight |
| 107 | (coordinateVector 0) + |
| 108 | ((1 / 2 : ℝ) • |
| 109 | (x 0 • profileDerivative H t x + H (profilePoint t x) • projection 0)).smulRight |
| 110 | (coordinateVector 1) + |
| 111 | (profileDerivative K t x).smulRight (coordinateVector 2) |
| 112 | |
| 113 | theorem hasFDerivAt_potential (H K : Profile) (t : ℝ) (x : Space) |
| 114 | (hH : DifferentiableAt ℝ H (profilePoint t x)) |
| 115 | (hK : DifferentiableAt ℝ K (profilePoint t x)) : |
| 116 | HasFDerivAt (fun y => potential H K (t, y)) (potentialJacobian H K t x) x := by |
| 117 | have hHv := hasFDerivAt_profile_composition H t x hH |
| 118 | have hKv := hasFDerivAt_profile_composition K t x hK |
| 119 | exact ((((projection 1).hasFDerivAt.mul hHv).const_mul (-(1 / 2))).smul_const |
| 120 | (coordinateVector 0)).add |
| 121 | (((((projection 0).hasFDerivAt.mul hHv).const_mul (1 / 2)).smul_const |
| 122 | (coordinateVector 1))) |>.add (hKv.smul_const (coordinateVector 2)) |
| 123 | |
| 124 | theorem velocity_zero (H K : Profile) (t : ℝ) (x : Space) |
| 125 | (hH : DifferentiableAt ℝ H (profilePoint t x)) |
| 126 | (hK : DifferentiableAt ℝ K (profilePoint t x)) : |
| 127 | velocity H K (t, x) 0 = |
| 128 | -x 0 * partialZ H (profilePoint t x) / 2 + x 1 * partialS K (profilePoint t x) := by |
| 129 | change (SpatialCurl.curlLinear (fderiv ℝ (fun y => potential H K (t, y)) x)) 0 = _ |
| 130 | rw [(hasFDerivAt_potential H K t x hH hK).fderiv, SpatialCurl.curlLinear_apply_zero] |
| 131 | simp [potentialJacobian, profileDerivative_apply, coordinateVector] |
| 132 | ring |
| 133 | |
| 134 | theorem velocity_one (H K : Profile) (t : ℝ) (x : Space) |
| 135 | (hH : DifferentiableAt ℝ H (profilePoint t x)) |
| 136 | (hK : DifferentiableAt ℝ K (profilePoint t x)) : |
| 137 | velocity H K (t, x) 1 = |
| 138 | -x 1 * partialZ H (profilePoint t x) / 2 - x 0 * partialS K (profilePoint t x) := by |
| 139 | change (SpatialCurl.curlLinear (fderiv ℝ (fun y => potential H K (t, y)) x)) 1 = _ |
| 140 | rw [(hasFDerivAt_potential H K t x hH hK).fderiv, SpatialCurl.curlLinear_apply_one] |
| 141 | simp [potentialJacobian, profileDerivative_apply, coordinateVector] |
| 142 | ring |
| 143 | |
| 144 | theorem velocity_two (H K : Profile) (t : ℝ) (x : Space) |
| 145 | (hH : DifferentiableAt ℝ H (profilePoint t x)) |
| 146 | (hK : DifferentiableAt ℝ K (profilePoint t x)) : |
| 147 | velocity H K (t, x) 2 = |
| 148 | H (profilePoint t x) + radialEnergy x * partialS H (profilePoint t x) := by |
| 149 | change (SpatialCurl.curlLinear (fderiv ℝ (fun y => potential H K (t, y)) x)) 2 = _ |
| 150 | rw [(hasFDerivAt_potential H K t x hH hK).fderiv, SpatialCurl.curlLinear_apply_two] |
| 151 | simp [potentialJacobian, profileDerivative_apply, coordinateVector] |
| 152 | unfold radialEnergy |
| 153 | ring |
| 154 | |
| 155 | /-- The Cartesian potential is smooth on all of space, including the axis. -/ |
| 156 | theorem contDiff_potential {H K : Profile} {n : WithTop ℕ∞} |
| 157 | (hH : ContDiff ℝ n H) (hK : ContDiff ℝ n K) : ContDiff ℝ n (potential H K) := by |
| 158 | have h0 : ContDiff ℝ n (fun w : SpaceTime => w.2 0) := |
| 159 | (projection 0).contDiff.comp contDiff_snd |
| 160 | have h1 : ContDiff ℝ n (fun w : SpaceTime => w.2 1) := |
| 161 | (projection 1).contDiff.comp contDiff_snd |
| 162 | have hHv := hH.comp contDiff_profilePoint |
| 163 | have hKv := hK.comp contDiff_profilePoint |
| 164 | exact (((contDiff_const.mul (h1.mul hHv)).smul contDiff_const).add |
| 165 | ((contDiff_const.mul (h0.mul hHv)).smul contDiff_const)).add |
| 166 | (hKv.smul contDiff_const) |
| 167 | |
| 168 | /-- Smoothness may be required only on a prescribed set of times. -/ |
| 169 | theorem contDiffOn_potential {H K : Profile} {times : Set ℝ} {n : WithTop ℕ∞} |
| 170 | (hH : ContDiffOn ℝ n H (times ×ˢ (univ : Set (ℝ × ℝ)))) |
| 171 | (hK : ContDiffOn ℝ n K (times ×ˢ (univ : Set (ℝ × ℝ)))) : |
| 172 | ContDiffOn ℝ n (potential H K) (times ×ˢ (univ : Set Space)) := by |
| 173 | have hm : MapsTo (fun w : SpaceTime => profilePoint w.1 w.2) |
| 174 | (times ×ˢ (univ : Set Space)) (times ×ˢ (univ : Set (ℝ × ℝ))) := by |
| 175 | intro w hw |
| 176 | exact ⟨hw.1, mem_univ _⟩ |
| 177 | have h0 : ContDiffOn ℝ n (fun w : SpaceTime => w.2 0) (times ×ˢ univ) := |
| 178 | ((projection 0).contDiff.comp contDiff_snd).contDiffOn |
| 179 | have h1 : ContDiffOn ℝ n (fun w : SpaceTime => w.2 1) (times ×ˢ univ) := |
| 180 | ((projection 1).contDiff.comp contDiff_snd).contDiffOn |
| 181 | have hHv := hH.comp contDiff_profilePoint.contDiffOn hm |
| 182 | have hKv := hK.comp contDiff_profilePoint.contDiffOn hm |
| 183 | exact (((contDiffOn_const.mul (h1.mul hHv)).smul contDiffOn_const).add |
| 184 | ((contDiffOn_const.mul (h0.mul hHv)).smul contDiffOn_const)).add |
| 185 | (hKv.smul contDiffOn_const) |
| 186 | |
| 187 | theorem contDiff_velocity {H K : Profile} {m n : WithTop ℕ∞} |
| 188 | (hH : ContDiff ℝ n H) (hK : ContDiff ℝ n K) (hmn : m + 1 ≤ n) : |
| 189 | ContDiff ℝ m (velocity H K) := |
| 190 | SpatialCurl.contDiff_spatialCurl (contDiff_potential hH hK) hmn |
| 191 | |
| 192 | theorem smooth_velocity {H K : Profile} |
| 193 | (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) : ContDiff ℝ ∞ (velocity H K) := |
| 194 | contDiff_velocity hH hK (by simp) |
| 195 | |
| 196 | theorem contDiffOn_velocity {H K : Profile} {times : Set ℝ} {m n : WithTop ℕ∞} |
| 197 | (hH : ContDiffOn ℝ n H (times ×ˢ (univ : Set (ℝ × ℝ)))) |
| 198 | (hK : ContDiffOn ℝ n K (times ×ˢ (univ : Set (ℝ × ℝ)))) (hmn : m + 1 ≤ n) : |
| 199 | ContDiffOn ℝ m (velocity H K) (times ×ˢ (univ : Set Space)) := |
| 200 | SpatialCurl.contDiffOn_spatialCurl (contDiffOn_potential hH hK) hmn |
| 201 | |
| 202 | theorem divergence_velocity {H K : Profile} |
| 203 | (hH : ContDiff ℝ 2 H) (hK : ContDiff ℝ 2 K) (t : ℝ) (x : Space) : |
| 204 | spatialDivergence (velocity H K) t x = 0 := |
| 205 | SpatialCurl.spatialDivergence_spatialCurl (potential H K) t x |
| 206 | (((contDiff_potential hH hK).comp (contDiff_const.prodMk contDiff_id)).contDiffAt) |
| 207 | |
| 208 | theorem divergence_velocity_on {H K : Profile} {times : Set ℝ} |
| 209 | (hH : ContDiffOn ℝ 2 H (times ×ˢ (univ : Set (ℝ × ℝ)))) |
| 210 | (hK : ContDiffOn ℝ 2 K (times ×ˢ (univ : Set (ℝ × ℝ)))) |
| 211 | {t : ℝ} (ht : t ∈ times) (x : Space) : spatialDivergence (velocity H K) t x = 0 := |
| 212 | SpatialCurl.spatialDivergence_spatialCurl_on (contDiffOn_potential hH hK) ht x |
| 213 | |
| 214 | /-- On the axis the field is purely axial with value `H(t,0,z)`, with no |
| 215 | limit or removable-singularity argument required. -/ |
| 216 | theorem velocity_on_axis (H K : Profile) (t : ℝ) (x : Space) |
| 217 | (hH : DifferentiableAt ℝ H (profilePoint t x)) |
| 218 | (hK : DifferentiableAt ℝ K (profilePoint t x)) (hx0 : x 0 = 0) (hx1 : x 1 = 0) : |
| 219 | velocity H K (t, x) = H (t, (0, x 2)) • coordinateVector 2 := by |
| 220 | ext i |
| 221 | fin_cases i |
| 222 | · change velocity H K (t, x) 0 = (H (t, (0, x 2)) • coordinateVector 2) 0 |
| 223 | rw [velocity_zero H K t x hH hK] |
| 224 | simp [hx0, hx1, coordinateVector] |
| 225 | · change velocity H K (t, x) 1 = (H (t, (0, x 2)) • coordinateVector 2) 1 |
| 226 | rw [velocity_one H K t x hH hK] |
| 227 | simp [hx0, hx1, coordinateVector] |
| 228 | · change velocity H K (t, x) 2 = (H (t, (0, x 2)) • coordinateVector 2) 2 |
| 229 | rw [velocity_two H K t x hH hK] |
| 230 | simp [profilePoint, radialEnergy, hx0, hx1, coordinateVector] |
| 231 | |
| 232 | /-- The potential's closed spatial support is controlled by the two profile |
| 233 | supports, pulled back under the smooth `(t,s,z)` coordinate map. -/ |
| 234 | theorem tsupport_potential_slice_subset (H K : Profile) (t : ℝ) : |
| 235 | tsupport (fun x : Space => potential H K (t, x)) ⊆ |
| 236 | profilePoint t ⁻¹' (tsupport H ∪ tsupport K) := by |
| 237 | apply closure_minimal |
| 238 | · intro x hx |
| 239 | by_contra hn |
| 240 | have hnH : profilePoint t x ∉ tsupport H := fun h => hn (Or.inl h) |
| 241 | have hnK : profilePoint t x ∉ tsupport K := fun h => hn (Or.inr h) |
| 242 | have hHzero := image_eq_zero_of_notMem_tsupport hnH |
| 243 | have hKzero := image_eq_zero_of_notMem_tsupport hnK |
| 244 | exact hx (by simp [potential, hHzero, hKzero]) |
| 245 | · exact ((isClosed_tsupport H).union (isClosed_tsupport K)).preimage |
| 246 | (contDiff_profilePoint_slice t (n := 0)).continuous |
| 247 | |
| 248 | /-- Taking the actual curl does not enlarge this closed spatial support. -/ |
| 249 | theorem tsupport_velocity_slice_subset (H K : Profile) (t : ℝ) : |
| 250 | tsupport (fun x : Space => velocity H K (t, x)) ⊆ |
| 251 | profilePoint t ⁻¹' (tsupport H ∪ tsupport K) := |
| 252 | (SpatialCurl.tsupport_curl_subset (fun x : Space => potential H K (t, x))).trans |
| 253 | (tsupport_potential_slice_subset H K t) |
| 254 | |
| 255 | theorem velocity_eq_zero_outside_profile_support (H K : Profile) (t : ℝ) (x : Space) |
| 256 | (hH : profilePoint t x ∉ tsupport H) (hK : profilePoint t x ∉ tsupport K) : |
| 257 | velocity H K (t, x) = 0 := by |
| 258 | apply image_eq_zero_of_notMem_tsupport (f := fun y : Space => velocity H K (t, y)) |
| 259 | intro hx |
| 260 | rcases tsupport_velocity_slice_subset H K t hx with h | h |
| 261 | · exact hH h |
| 262 | · exact hK h |
| 263 | |
| 264 | /-- The Cartesian cylinder cut out by bounds on `s` and `z` is compact. -/ |
| 265 | theorem isCompact_cylinder (R Z : ℝ) : |
| 266 | IsCompact {x : Space | radialEnergy x ≤ R ∧ |x 2| ≤ Z} := by |
| 267 | have hc : IsClosed {x : Space | radialEnergy x ≤ R ∧ |x 2| ≤ Z} := |
| 268 | (isClosed_le (contDiff_radialEnergy (n := 0)).continuous continuous_const).inter |
| 269 | (isClosed_le (projection 2).continuous.abs continuous_const) |
| 270 | apply (isCompact_closedBall (0 : Space) (Real.sqrt (2 * R + Z ^ 2))).of_isClosed_subset hc |
| 271 | intro x hx |
| 272 | have hz : (x 2) ^ 2 ≤ Z ^ 2 := by |
| 273 | have hZ : 0 ≤ Z := (abs_nonneg (x 2)).trans hx.2 |
| 274 | simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg (x 2)) hZ).2 hx.2 |
| 275 | have hs : (∑ i : Fin 3, (x i) ^ 2) ≤ 2 * R + Z ^ 2 := by |
| 276 | rw [Fin.sum_univ_three] |
| 277 | have hr := hx.1 |
| 278 | dsimp [radialEnergy] at hr |
| 279 | linarith |
| 280 | rw [Metric.mem_closedBall, dist_zero_right, EuclideanSpace.norm_eq] |
| 281 | apply Real.sqrt_le_sqrt |
| 282 | simpa only [Real.norm_eq_abs, sq_abs] using hs |
| 283 | |
| 284 | /-- Bounds on profile support give a literal closed cylinder in Cartesian |
| 285 | space: `s ≤ R` and `|z| ≤ Z`. -/ |
| 286 | theorem tsupport_velocity_cylinder_subset (H K : Profile) (t R Z : ℝ) |
| 287 | (hH : tsupport H ⊆ {p : ProfilePoint | p.2.1 ≤ R ∧ |p.2.2| ≤ Z}) |
| 288 | (hK : tsupport K ⊆ {p : ProfilePoint | p.2.1 ≤ R ∧ |p.2.2| ≤ Z}) : |
| 289 | tsupport (fun x : Space => velocity H K (t, x)) ⊆ |
| 290 | {x : Space | radialEnergy x ≤ R ∧ |x 2| ≤ Z} := by |
| 291 | intro x hx |
| 292 | rcases tsupport_velocity_slice_subset H K t hx with h | h |
| 293 | · exact hH h |
| 294 | · exact hK h |
| 295 | |
| 296 | theorem hasCompactSupport_velocity_of_profile_bounds (H K : Profile) (t R Z : ℝ) |
| 297 | (hH : tsupport H ⊆ {p : ProfilePoint | p.2.1 ≤ R ∧ |p.2.2| ≤ Z}) |
| 298 | (hK : tsupport K ⊆ {p : ProfilePoint | p.2.1 ≤ R ∧ |p.2.2| ≤ Z}) : |
| 299 | HasCompactSupport (fun x : Space => velocity H K (t, x)) := |
| 300 | (isCompact_cylinder R Z).of_isClosed_subset (isClosed_tsupport _) |
| 301 | (tsupport_velocity_cylinder_subset H K t R Z hH hK) |
| 302 | |
| 303 | end NavierStokes.AxisymmetricFields |