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 | private theorem hasFDerivAt_velocity_at {B F U : Profile} {t : ℝ} {x : Space} |
| 150 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 151 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 152 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 153 | HasFDerivAt (fun y => AxisymmetricResidual.velocity B F U (t, y)) |
| 154 | (velocityJacobian B F U t x) x := by |
| 155 | have hb := hasFDerivAt_profile_composition B t x hB |
| 156 | have hf := hasFDerivAt_profile_composition F t x hF |
| 157 | have hu := hasFDerivAt_profile_composition U t x hU |
| 158 | exact hasFDerivAt_pack |
| 159 | ((((projection 0).hasFDerivAt.mul hb).add ((projection 1).hasFDerivAt.mul hf)).neg) |
| 160 | (((projection 0).hasFDerivAt.mul hf).sub ((projection 1).hasFDerivAt.mul hb)) hu |
| 161 | |
| 162 | noncomputable def fluxResidual (V F U P : Profile) (p : ProfilePoint) : ℝ := |
| 163 | partialT V p + V p * (partialS V p - V p / (2 * p.2.1)) + U p * partialZ V p - |
| 164 | 2 * p.2.1 * partialS (partialS V) p - partialZ (partialZ V) p + |
| 165 | 2 * p.2.1 * (partialS P p - (F p) ^ 2) |
| 166 | |
| 167 | /-- The radial residual coefficient in `AxisymmetricResidual` multiplies |
| 168 | `(x₀,x₁,0)`. Thus its product with `2s=r²` is `r` times the cylindrical |
| 169 | radial residual, with the positive sign in this identity. -/ |
| 170 | theorem residualRadial_radialB {V : Profile} (F U P : Profile) {p : ProfilePoint} |
| 171 | (hV : ContDiffAt ℝ 2 V p) (hs : 0 < p.2.1) : |
| 172 | 2 * p.2.1 * residualRadial (radialB V) F U P p = fluxResidual V F U P p := by |
| 173 | have hne := ne_of_gt hs |
| 174 | have hd := hV.differentiableAt (by norm_num) |
| 175 | unfold residualRadial advectionRadial |
| 176 | rw [partialT_radialB hd hne, partialS_radialB_explicit hd hne, |
| 177 | partialZ_radialB hd hne, laplaceWeighted_radialB hV hne] |
| 178 | unfold fluxResidual radialB |
| 179 | field_simp [hne] ; ring |
| 180 | |
| 181 | end |
| 182 | |
| 183 | end NavierStokes.RadialFluxResidual |