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.AxisymmetricResidual |
| 2 | import NavierStokes.LocalAxisymmetricResidual |
| 3 | import Mathlib.Analysis.Calculus.Deriv.Inv |
| 4 | import Mathlib.Tactic.FieldSimp |
| 5 | import Mathlib.Tactic.Linarith |
| 6 | |
| 7 | /-! |
| 8 | # Radial flux coordinates for the actual axisymmetric residual |
| 9 | |
| 10 | Write `s = r²/2` and `V = r u_r`. The convention in |
| 11 | `AxisymmetricResidual` is `u_r = -r B`, hence `B = -V/(2s)`. |
| 12 | All quotient derivatives in this file are genuine Fréchet derivatives, |
| 13 | and their hypotheses are local at a point with positive `s`. |
| 14 | -/ |
| 15 | |
| 16 | namespace NavierStokes.RadialFluxResidual |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | open ProblemStatement AxisymmetricFields AxisymmetricResidual Filter |
| 21 | open scoped BigOperators ContDiff Topology |
| 22 | |
| 23 | noncomputable def radialB (V : Profile) : Profile := |
| 24 | fun p => -V p / (2 * p.2.1) |
| 25 | |
| 26 | private noncomputable def sProjection : ProfilePoint →L[ℝ] ℝ := |
| 27 | (ContinuousLinearMap.fst ℝ ℝ ℝ).comp |
| 28 | (ContinuousLinearMap.snd ℝ ℝ (ℝ × ℝ)) |
| 29 | |
| 30 | @[simp] private theorem sProjection_apply (p : ProfilePoint) : sProjection p = p.2.1 := rfl |
| 31 | |
| 32 | theorem contDiffAt_radialB {V : Profile} {p : ProfilePoint} {n : WithTop ℕ∞} |
| 33 | (hV : ContDiffAt ℝ n V p) (hs : p.2.1 ≠ 0) : |
| 34 | ContDiffAt ℝ n (radialB V) p := |
| 35 | hV.neg.div (contDiffAt_const.mul sProjection.contDiff.contDiffAt) |
| 36 | (mul_ne_zero (by norm_num) hs) |
| 37 | |
| 38 | theorem fderiv_radialB_apply {V : Profile} {p : ProfilePoint} |
| 39 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) (v : ProfilePoint) : |
| 40 | fderiv ℝ (radialB V) p v = |
| 41 | -fderiv ℝ V p v / (2 * p.2.1) + V p * v.2.1 / (2 * p.2.1 ^ 2) := by |
| 42 | have hi := (hasDerivAt_inv hs).comp_hasFDerivAt p sProjection.hasFDerivAt |
| 43 | simp only [Function.comp_def] at hi |
| 44 | have hb := (hV.hasFDerivAt.fun_mul hi).const_mul (-(1 / 2 : ℝ)) |
| 45 | have he : radialB V = (fun q => -(1 / 2 : ℝ) * (V q * (sProjection q)⁻¹)) := by |
| 46 | funext q |
| 47 | simp only [radialB, sProjection_apply, div_eq_mul_inv, mul_inv_rev] |
| 48 | ring |
| 49 | rw [he, hb.fderiv] |
| 50 | simp only [_root_.smul_apply, _root_.add_apply, sProjection_apply, smul_eq_mul] |
| 51 | field_simp [hs] ; ring |
| 52 | |
| 53 | theorem differentiableAt_radialB {V : Profile} {p : ProfilePoint} |
| 54 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 55 | DifferentiableAt ℝ (radialB V) p := by |
| 56 | have hi := (hasDerivAt_inv hs).comp_hasFDerivAt p sProjection.hasFDerivAt |
| 57 | simp only [Function.comp_def] at hi |
| 58 | have hb := (hV.hasFDerivAt.fun_mul hi).const_mul (-(1 / 2 : ℝ)) |
| 59 | convert! hb.differentiableAt using 1 |
| 60 | funext q |
| 61 | simp only [radialB, sProjection_apply, div_eq_mul_inv, mul_inv_rev] |
| 62 | ring |
| 63 | |
| 64 | theorem partialT_radialB {V : Profile} {p : ProfilePoint} |
| 65 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 66 | partialT (radialB V) p = radialB (partialT V) p := by |
| 67 | rw [partialT, fderiv_radialB_apply hV hs] |
| 68 | simp [radialB, partialT] |
| 69 | |
| 70 | theorem partialZ_radialB {V : Profile} {p : ProfilePoint} |
| 71 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 72 | partialZ (radialB V) p = radialB (partialZ V) p := by |
| 73 | rw [partialZ, fderiv_radialB_apply hV hs] |
| 74 | simp [radialB, partialZ] |
| 75 | |
| 76 | theorem partialS_radialB_explicit {V : Profile} {p : ProfilePoint} |
| 77 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 78 | partialS (radialB V) p = |
| 79 | -partialS V p / (2 * p.2.1) + V p / (2 * p.2.1 ^ 2) := by |
| 80 | rw [partialS, fderiv_radialB_apply hV hs] |
| 81 | simp [partialS] |
| 82 | |
| 83 | theorem partialS_radialB {V : Profile} {p : ProfilePoint} |
| 84 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 85 | partialS (radialB V) p = |
| 86 | radialB (partialS V) p + 2 * radialB (radialB V) p := by |
| 87 | rw [partialS_radialB_explicit hV hs] |
| 88 | unfold radialB |
| 89 | field_simp [hs] |
| 90 | |
| 91 | private theorem differentiableAt_partialS {V : Profile} {p : ProfilePoint} |
| 92 | (hV : ContDiffAt ℝ 2 V p) : DifferentiableAt ℝ (partialS V) p := |
| 93 | (((hV.fderiv_right (m := 1) (by norm_num)).clm_apply |
| 94 | contDiffAt_const).differentiableAt (by norm_num)) |
| 95 | |
| 96 | private theorem differentiableAt_partialZ {V : Profile} {p : ProfilePoint} |
| 97 | (hV : ContDiffAt ℝ 2 V p) : DifferentiableAt ℝ (partialZ V) p := |
| 98 | (((hV.fderiv_right (m := 1) (by norm_num)).clm_apply |
| 99 | contDiffAt_const).differentiableAt (by norm_num)) |
| 100 | |
| 101 | theorem partialS_partialS_radialB {V : Profile} {p : ProfilePoint} |
| 102 | (hV : ContDiffAt ℝ 2 V p) (hs : p.2.1 ≠ 0) : |
| 103 | partialS (partialS (radialB V)) p = |
| 104 | -partialS (partialS V) p / (2 * p.2.1) + |
| 105 | partialS V p / p.2.1 ^ 2 - V p / p.2.1 ^ 3 := by |
| 106 | have hd := hV.differentiableAt (by norm_num) |
| 107 | have hds := differentiableAt_partialS hV |
| 108 | have hdb := differentiableAt_radialB hd hs |
| 109 | have hdbs := differentiableAt_radialB hds hs |
| 110 | have hdbb := differentiableAt_radialB hdb hs |
| 111 | have he : partialS (radialB V) =ᶠ[𝓝 p] |
| 112 | (fun q => radialB (partialS V) q + 2 * radialB (radialB V) q) := by |
| 113 | filter_upwards [hV.eventually (by norm_num), |
| 114 | sProjection.continuous.continuousAt.eventually_ne hs] with q hq hsq |
| 115 | exact partialS_radialB (hq.differentiableAt (by norm_num)) hsq |
| 116 | change fderiv ℝ (partialS (radialB V)) p (0, (1, 0)) = _ |
| 117 | rw [he.fderiv_eq, fderiv_fun_add hdbs (hdbb.const_mul 2), fderiv_const_mul hdbb] |
| 118 | simp only [_root_.add_apply, _root_.smul_apply, smul_eq_mul] |
| 119 | change partialS (radialB (partialS V)) p + |
| 120 | 2 * partialS (radialB (radialB V)) p = _ |
| 121 | rw [partialS_radialB hds hs, partialS_radialB hdb hs] |
| 122 | simp only [radialB] |
| 123 | rw [partialS_radialB_explicit hd hs] |
| 124 | field_simp [hs] ; ring |
| 125 | |
| 126 | theorem partialZ_partialZ_radialB {V : Profile} {p : ProfilePoint} |
| 127 | (hV : ContDiffAt ℝ 2 V p) (hs : p.2.1 ≠ 0) : |
| 128 | partialZ (partialZ (radialB V)) p = radialB (partialZ (partialZ V)) p := by |
| 129 | have he : partialZ (radialB V) =ᶠ[𝓝 p] radialB (partialZ V) := by |
| 130 | filter_upwards [hV.eventually (by norm_num), |
| 131 | sProjection.continuous.continuousAt.eventually_ne hs] with q hq hsq |
| 132 | exact partialZ_radialB (hq.differentiableAt (by norm_num)) hsq |
| 133 | change fderiv ℝ (partialZ (radialB V)) p (0, (0, 1)) = _ |
| 134 | rw [he.fderiv_eq] |
| 135 | exact partialZ_radialB (differentiableAt_partialZ hV) hs |
| 136 | |
| 137 | /-- The `4 B_s` connection term cancels the extra radial quotient terms. -/ |
| 138 | theorem laplaceWeighted_radialB {V : Profile} {p : ProfilePoint} |
| 139 | (hV : ContDiffAt ℝ 2 V p) (hs : p.2.1 ≠ 0) : |
| 140 | laplaceWeighted (radialB V) p = |
| 141 | -partialS (partialS V) p - partialZ (partialZ V) p / (2 * p.2.1) := by |
| 142 | have hd := hV.differentiableAt (by norm_num) |
| 143 | unfold laplaceWeighted |
| 144 | rw [partialS_partialS_radialB hV hs, partialS_radialB_explicit hd hs, |
| 145 | partialZ_partialZ_radialB hV hs] |
| 146 | unfold radialB |
| 147 | field_simp [hs] ; ring |
| 148 | |
| 149 | theorem divergence_coefficient {V : Profile} (U : Profile) {p : ProfilePoint} |
| 150 | (hV : DifferentiableAt ℝ V p) (hs : p.2.1 ≠ 0) : |
| 151 | partialZ U p - 2 * radialB V p - 2 * p.2.1 * partialS (radialB V) p = |
| 152 | partialS V p + partialZ U p := by |
| 153 | rw [partialS_radialB_explicit hV hs] |
| 154 | unfold radialB |
| 155 | field_simp [hs] ; ring |
| 156 | |
| 157 | private theorem hasFDerivAt_velocity_at {B F U : Profile} {t : ℝ} {x : Space} |
| 158 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 159 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 160 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 161 | HasFDerivAt (fun y => AxisymmetricResidual.velocity B F U (t, y)) |
| 162 | (velocityJacobian B F U t x) x := by |
| 163 | have hb := hasFDerivAt_profile_composition B t x hB |
| 164 | have hf := hasFDerivAt_profile_composition F t x hF |
| 165 | have hu := hasFDerivAt_profile_composition U t x hU |
| 166 | exact hasFDerivAt_pack |
| 167 | ((((projection 0).hasFDerivAt.mul hb).add ((projection 1).hasFDerivAt.mul hf)).neg) |
| 168 | (((projection 0).hasFDerivAt.mul hf).sub ((projection 1).hasFDerivAt.mul hb)) hu |
| 169 | |
| 170 | theorem divergence_velocity_at {B F U : Profile} {t : ℝ} {x : Space} |
| 171 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 172 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 173 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 174 | spatialDivergence (AxisymmetricResidual.velocity B F U) t x = |
| 175 | partialZ U (profilePoint t x) - 2 * B (profilePoint t x) - |
| 176 | 2 * radialEnergy x * partialS B (profilePoint t x) := by |
| 177 | unfold spatialDivergence spatialDerivative |
| 178 | rw [(hasFDerivAt_velocity_at hB hF hU).fderiv, Fin.sum_univ_three] |
| 179 | simp [velocityJacobian, packDerivative_apply, profileDerivative_apply, |
| 180 | coordinateVector, profilePoint, radialEnergy, lift] |
| 181 | ring |
| 182 | |
| 183 | /-- Actual Cartesian divergence, needing regularity only at the evaluated |
| 184 | profile point. No smooth extension of the quotient across the axis is assumed. -/ |
| 185 | theorem divergence_radialB {V F U : Profile} {t : ℝ} {x : Space} |
| 186 | (hV : DifferentiableAt ℝ V (profilePoint t x)) |
| 187 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 188 | (hU : DifferentiableAt ℝ U (profilePoint t x)) (hs : 0 < radialEnergy x) : |
| 189 | spatialDivergence (AxisymmetricResidual.velocity (radialB V) F U) t x = |
| 190 | partialS V (profilePoint t x) + partialZ U (profilePoint t x) := by |
| 191 | have hne : (profilePoint t x).2.1 ≠ 0 := ne_of_gt hs |
| 192 | rw [divergence_velocity_at (differentiableAt_radialB hV hne) hF hU] |
| 193 | exact divergence_coefficient U hV hne |
| 194 | |
| 195 | /-- The substitution has exactly the intended physical radial flux. -/ |
| 196 | theorem radial_flux_velocity (V F U : Profile) (t : ℝ) (x : Space) |
| 197 | (hs : 0 < radialEnergy x) : |
| 198 | x 0 * AxisymmetricResidual.velocity (radialB V) F U (t, x) 0 + |
| 199 | x 1 * AxisymmetricResidual.velocity (radialB V) F U (t, x) 1 = |
| 200 | V (profilePoint t x) := by |
| 201 | calc |
| 202 | _ = -2 * radialEnergy x * radialB V (profilePoint t x) := by |
| 203 | simp [AxisymmetricResidual.velocity, componentX, componentY, lift, radialEnergy] |
| 204 | ring |
| 205 | _ = _ := by |
| 206 | change -2 * radialEnergy x * (-V (profilePoint t x) / (2 * radialEnergy x)) = _ |
| 207 | field_simp [ne_of_gt hs] |
| 208 | |
| 209 | noncomputable def fluxResidual (V F U P : Profile) (p : ProfilePoint) : ℝ := |
| 210 | partialT V p + V p * (partialS V p - V p / (2 * p.2.1)) + U p * partialZ V p - |
| 211 | 2 * p.2.1 * partialS (partialS V) p - partialZ (partialZ V) p + |
| 212 | 2 * p.2.1 * (partialS P p - (F p) ^ 2) |
| 213 | |
| 214 | /-- The radial residual coefficient in `AxisymmetricResidual` multiplies |
| 215 | `(x₀,x₁,0)`. Thus its product with `2s=r²` is `r` times the cylindrical |
| 216 | radial residual, with the positive sign in this identity. -/ |
| 217 | theorem residualRadial_radialB {V : Profile} (F U P : Profile) {p : ProfilePoint} |
| 218 | (hV : ContDiffAt ℝ 2 V p) (hs : 0 < p.2.1) : |
| 219 | 2 * p.2.1 * residualRadial (radialB V) F U P p = fluxResidual V F U P p := by |
| 220 | have hne := ne_of_gt hs |
| 221 | have hd := hV.differentiableAt (by norm_num) |
| 222 | unfold residualRadial advectionRadial |
| 223 | rw [partialT_radialB hd hne, partialS_radialB_explicit hd hne, |
| 224 | partialZ_radialB hd hne, laplaceWeighted_radialB hV hne] |
| 225 | unfold fluxResidual radialB |
| 226 | field_simp [hne] ; ring |
| 227 | |
| 228 | /-- The actual physical radial residual multiplied by `r`, expressed |
| 229 | without introducing a square root or a radial unit vector. All regularity |
| 230 | hypotheses are local at the evaluated point with `s > 0`. -/ |
| 231 | theorem physical_radial_flux_residual {V F U P : Profile} {t : ℝ} {x : Space} |
| 232 | (hV : ContDiffAt ℝ 2 V (profilePoint t x)) |
| 233 | (hF : ContDiffAt ℝ 2 F (profilePoint t x)) |
| 234 | (hU : ContDiffAt ℝ 2 U (profilePoint t x)) |
| 235 | (hP : DifferentiableAt ℝ P (profilePoint t x)) (hs : 0 < radialEnergy x) : |
| 236 | x 0 * navierStokesResidual (AxisymmetricResidual.velocity (radialB V) F U) |
| 237 | (pressure P) t x 0 + |
| 238 | x 1 * navierStokesResidual (AxisymmetricResidual.velocity (radialB V) F U) |
| 239 | (pressure P) t x 1 = fluxResidual V F U P (profilePoint t x) := by |
| 240 | have hB := contDiffAt_radialB hV (ne_of_gt hs) |
| 241 | have hR := LocalAxisymmetricResidual.navierStokesResidual_velocity hB hF hU hP |
| 242 | simp only [hR, pack_zero, pack_one] |
| 243 | calc |
| 244 | _ = 2 * radialEnergy x * residualRadial (radialB V) F U P (profilePoint t x) := by |
| 245 | unfold radialEnergy |
| 246 | ring |
| 247 | _ = _ := residualRadial_radialB F U P hV hs |
| 248 | |
| 249 | end |
| 250 | |
| 251 | end NavierStokes.RadialFluxResidual |