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.ParametricODE |
| 2 | import Mathlib.Analysis.Calculus.MeanValue |
| 3 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 4 | import Mathlib.Topology.CompactOpen |
| 5 | |
| 6 | /-! |
| 7 | # Jointly smooth functions as smooth families of continuous paths |
| 8 | |
| 9 | The first derivative is proved with a uniform mean-value remainder estimate. |
| 10 | Continuity into the supremum-norm path space follows from compact-open currying. |
| 11 | All path derivatives are constructed from genuine parameter derivatives. |
| 12 | -/ |
| 13 | |
| 14 | namespace NavierStokes.SmoothPathFamily |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open Set Filter Function Metric Asymptotics |
| 19 | open scoped Topology ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 24 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 25 | variable {a b : ℝ} |
| 26 | |
| 27 | /-- Canonical continuous path where the slice is continuous, zero elsewhere. |
| 28 | Only values in the stated open parameter domain enter any theorem. -/ |
| 29 | noncomputable def pathFamily (F : P × ℝ → E) (p : P) : C(Icc a b, E) := by |
| 30 | classical |
| 31 | exact if h : Continuous (fun t : Icc a b => F (p, t)) then ⟨_, h⟩ else 0 |
| 32 | |
| 33 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] [NormedSpace ℝ E] in |
| 34 | theorem pathFamily_apply (F : P × ℝ → E) (p : P) |
| 35 | (hp : Continuous (fun t : Icc a b => F (p, t))) (t : Icc a b) : |
| 36 | pathFamily (a := a) (b := b) F p t = F (p, t) := by |
| 37 | simp only [pathFamily, dite_eq_left hp, ContinuousMap.coe_mk] |
| 38 | |
| 39 | omit [NormedSpace ℝ P] [NormedSpace ℝ E] in |
| 40 | theorem slice_continuous {U : Set P} {F : P × ℝ → E} |
| 41 | (hF : ContinuousOn F (U ×ˢ Icc a b)) {p : P} (hp : p ∈ U) : |
| 42 | Continuous (fun t : Icc a b => F (p, t)) := |
| 43 | hF.comp_continuous (continuous_const.prodMk continuous_subtype_val) |
| 44 | (fun t => ⟨hp, t.2⟩) |
| 45 | |
| 46 | omit [NormedSpace ℝ P] [NormedSpace ℝ E] in |
| 47 | /-- Compact-open continuity becomes norm continuity because the time interval |
| 48 | is compact. No smoothness of a path map is assumed here. -/ |
| 49 | theorem continuousOn_pathFamily {U : Set P} {F : P × ℝ → E} |
| 50 | (hF : ContinuousOn F (U ×ˢ Icc a b)) : |
| 51 | ContinuousOn (pathFamily (a := a) (b := b) F) U := by |
| 52 | apply continuousOn_iff_continuous_domRestrict.mpr |
| 53 | apply ContinuousMap.continuous_of_continuous_uncurry |
| 54 | have hc : Continuous (fun z : U × Icc a b => F (z.1, z.2)) := |
| 55 | hF.comp_continuous |
| 56 | ((continuous_subtype_val.comp continuous_fst).prodMk |
| 57 | (continuous_subtype_val.comp continuous_snd)) |
| 58 | (fun z => ⟨z.1.2, z.2.2⟩) |
| 59 | convert! hc using 1 |
| 60 | funext z |
| 61 | exact pathFamily_apply F z.1 (slice_continuous hF z.1.2) z.2 |
| 62 | |
| 63 | noncomputable def flipLinear : C(Icc a b, P →L[ℝ] E) →ₗ[ℝ] P →ₗ[ℝ] C(Icc a b, E) where |
| 64 | toFun g := { |
| 65 | toFun := fun v => ⟨fun t => g t v, g.continuous.clm_apply continuous_const⟩ |
| 66 | map_add' := by intros; ext t; exact map_add (g t) _ _ |
| 67 | map_smul' := by intros; ext t; exact map_smul (g t) _ _ } |
| 68 | map_add' := by intros; ext v t; rfl |
| 69 | map_smul' := by intros; ext v t; rfl |
| 70 | |
| 71 | theorem norm_flipLinear_le (g : C(Icc a b, P →L[ℝ] E)) (v : P) : |
| 72 | ‖flipLinear g v‖ ≤ ‖g‖ * ‖v‖ := by |
| 73 | apply (ContinuousMap.norm_le (flipLinear g v) |
| 74 | (mul_nonneg (norm_nonneg g) (norm_nonneg v))).mpr |
| 75 | intro t |
| 76 | exact ((g t).le_opNorm v).trans |
| 77 | (mul_le_mul_of_nonneg_right (g.norm_coe_le_norm t) (norm_nonneg v)) |
| 78 | |
| 79 | /-- Reorder the continuous time variable and the bounded linear parameter |
| 80 | variable. This is a proved bounded linear operation. -/ |
| 81 | noncomputable def flipPath : C(Icc a b, P →L[ℝ] E) →L[ℝ] P →L[ℝ] C(Icc a b, E) := |
| 82 | (flipLinear (P := P) (E := E) (a := a) (b := b)).mkContinuous₂ |
| 83 | (𝕜 := ℝ) (𝕜₂ := ℝ) (𝕜₃ := ℝ) 1 |
| 84 | (fun (g : C(Icc a b, P →L[ℝ] E)) (v : P) => by |
| 85 | simpa only [one_mul] using norm_flipLinear_le g v) |
| 86 | |
| 87 | theorem flipPath_apply (g : C(Icc a b, P →L[ℝ] E)) (v : P) (t : Icc a b) : |
| 88 | flipPath (P := P) (E := E) g v t = g t v := rfl |
| 89 | |
| 90 | /-- The key uniform differentiability theorem. Joint continuity of the actual |
| 91 | slice derivative supplies a common remainder estimate for every time point. -/ |
| 92 | theorem hasFDerivAt_pathFamily {U : Set P} (hU : IsOpen U) |
| 93 | (F : P × ℝ → E) (G : P × ℝ → P →L[ℝ] E) |
| 94 | (hF : ContinuousOn F (U ×ˢ Icc a b)) |
| 95 | (hG : ContinuousOn G (U ×ˢ Icc a b)) |
| 96 | (hderiv : ∀ p ∈ U, ∀ t : Icc a b, HasFDerivAt (fun q => F (q, t)) (G (p, t)) p) |
| 97 | {p : P} (hp : p ∈ U) : |
| 98 | HasFDerivAt (pathFamily (a := a) (b := b) F) |
| 99 | (flipPath (P := P) (E := E) (pathFamily (a := a) (b := b) G p)) p := by |
| 100 | rw [hasFDerivAt_iff_isLittleO_nhds_zero] |
| 101 | apply isLittleO_iff.mpr |
| 102 | intro ε hε |
| 103 | have hgc : ContinuousAt (pathFamily (a := a) (b := b) G) p := |
| 104 | (continuousOn_pathFamily hG).continuousAt (hU.mem_nhds hp) |
| 105 | have hsmall : ∀ᶠ q in 𝓝 p, |
| 106 | ‖pathFamily (a := a) (b := b) G q - pathFamily G p‖ < ε := by |
| 107 | simpa only [dist_eq_norm] using (Metric.tendsto_nhds.mp hgc ε hε) |
| 108 | have hnear : ∀ᶠ q in 𝓝 p, q ∈ U := hU.mem_nhds hp |
| 109 | obtain ⟨δ, hδ, hδmem⟩ := Metric.eventually_nhds_iff.mp |
| 110 | (hnear.and hsmall) |
| 111 | filter_upwards [Metric.ball_mem_nhds (0 : P) hδ] with v hv |
| 112 | have hv' : p + v ∈ ball p δ := by |
| 113 | simpa only [mem_ball, dist_eq_norm, add_sub_cancel_left, sub_zero] using hv |
| 114 | have hq := (hδmem hv').1 |
| 115 | apply (ContinuousMap.norm_le _ (mul_nonneg hε.le (norm_nonneg v))).mpr |
| 116 | intro t |
| 117 | simp only [ContinuousMap.sub_apply, flipPath_apply, |
| 118 | pathFamily_apply F (p + v) (slice_continuous hF hq), |
| 119 | pathFamily_apply F p (slice_continuous hF hp), |
| 120 | pathFamily_apply G p (slice_continuous hG hp)] |
| 121 | have hd : ∀ q ∈ ball p δ, |
| 122 | HasFDerivWithinAt (fun q => F (q, t) - G (p, t) q) |
| 123 | (G (q, t) - G (p, t)) (ball p δ) q := by |
| 124 | intro q hq' |
| 125 | exact ((hderiv q (hδmem hq').1 t).sub (G (p, t)).hasFDerivAt).hasFDerivWithinAt |
| 126 | have hb : ∀ q ∈ ball p δ, ‖G (q, t) - G (p, t)‖ ≤ ε := by |
| 127 | intro q hq' |
| 128 | have hcontq := slice_continuous hG (hδmem hq').1 |
| 129 | have hcontp := slice_continuous hG hp |
| 130 | calc |
| 131 | _ = ‖(pathFamily G q - pathFamily G p : C(Icc a b, P →L[ℝ] E)) t‖ := by |
| 132 | simp only [ContinuousMap.sub_apply, pathFamily_apply G q hcontq, |
| 133 | pathFamily_apply G p hcontp] |
| 134 | _ ≤ ‖pathFamily (a := a) (b := b) G q - pathFamily G p‖ := |
| 135 | ContinuousMap.norm_coe_le_norm _ t |
| 136 | _ ≤ ε := (hδmem hq').2.le |
| 137 | have hmean := (convex_ball p δ).norm_image_sub_le_of_norm_hasFDerivWithin_le |
| 138 | hd hb (mem_ball_self hδ) hv' |
| 139 | have heq : F (p + v, t) - F (p, t) - G (p, t) v = |
| 140 | (F (p + v, t) - G (p, t) (p + v)) - (F (p, t) - G (p, t) p) := by |
| 141 | rw [map_add] |
| 142 | abel |
| 143 | rw [heq] |
| 144 | simpa only [add_sub_cancel_left] using hmean |
| 145 | |
| 146 | /-- The actual parameter derivative, obtained by restricting the joint derivative |
| 147 | to the parameter direction. -/ |
| 148 | noncomputable def parameterDerivative (F : P × ℝ → E) (z : P × ℝ) : P →L[ℝ] E := |
| 149 | (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ P ℝ) |
| 150 | |
| 151 | /-- Every finite joint differentiability order lifts to the path Banach space. |
| 152 | The induction changes the target to the space of parameter derivatives. -/ |
| 153 | theorem contDiffOn_pathFamily_nat (U : Set P) (V : Set ℝ) |
| 154 | (hU : IsOpen U) (hV : IsOpen V) (hI : Icc a b ⊆ V) (n : ℕ) : |
| 155 | ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] (F : P × ℝ → W), |
| 156 | ContDiffOn ℝ n F (U ×ˢ V) → |
| 157 | ContDiffOn ℝ n (pathFamily (a := a) (b := b) F) U := by |
| 158 | induction n with |
| 159 | | zero => |
| 160 | intro W _ _ F hF |
| 161 | exact contDiffOn_zero.mpr (continuousOn_pathFamily |
| 162 | (hF.continuousOn.mono (Set.prod_mono Subset.rfl hI))) |
| 163 | | succ n ih => |
| 164 | intro W _ _ F hF |
| 165 | have hFs : ContDiffOn ℝ ((n : WithTop ℕ∞) + 1) F (U ×ˢ V) := by |
| 166 | simpa only [Nat.cast_add, Nat.cast_one] using hF |
| 167 | have hdata := (contDiffOn_succ_iff_fderiv_of_isOpen (hU.prod hV)).mp hFs |
| 168 | have hD : ContDiffOn ℝ n (parameterDerivative F) (U ×ˢ V) := |
| 169 | hdata.2.2.clm_comp contDiffOn_const |
| 170 | have hFc : ContinuousOn F (U ×ˢ Icc a b) := |
| 171 | hF.continuousOn.mono (Set.prod_mono Subset.rfl hI) |
| 172 | have hDc : ContinuousOn (parameterDerivative F) (U ×ˢ Icc a b) := |
| 173 | hD.continuousOn.mono (Set.prod_mono Subset.rfl hI) |
| 174 | have hd : ∀ p ∈ U, HasFDerivAt (pathFamily (a := a) (b := b) F) |
| 175 | (flipPath (P := P) (E := W) (pathFamily (a := a) (b := b) (parameterDerivative F) p)) p := by |
| 176 | intro p hp |
| 177 | apply hasFDerivAt_pathFamily hU F (parameterDerivative F) hFc hDc _ hp |
| 178 | intro q hq t |
| 179 | have hDF := (hdata.1 (q, (t : ℝ)) ⟨hq, hI t.2⟩).differentiableAt |
| 180 | ((hU.prod hV).mem_nhds ⟨hq, hI t.2⟩) |
| 181 | exact hDF.hasFDerivAt.comp q (hasFDerivAt_prodMk_left q (t : ℝ)) |
| 182 | have hpathD := ih (parameterDerivative F) hD |
| 183 | let L : C(Icc a b, P →L[ℝ] W) →L[ℝ] P →L[ℝ] C(Icc a b, W) := |
| 184 | flipPath (P := P) (E := W) (a := a) (b := b) |
| 185 | have hL : ContDiff ℝ (n : WithTop ℕ∞) L := |
| 186 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (n := n) |
| 187 | (E := C(Icc a b, P →L[ℝ] W)) (F := P →L[ℝ] C(Icc a b, W)) L |
| 188 | have hflip : ContDiffOn ℝ n |
| 189 | (fun p => flipPath (P := P) (E := W) (a := a) (b := b) |
| 190 | (pathFamily (a := a) (b := b) (parameterDerivative F) p)) U := by |
| 191 | exact hL.comp_contDiffOn hpathD |
| 192 | have hresult : ContDiffOn ℝ ((n : WithTop ℕ∞) + 1) |
| 193 | (pathFamily (a := a) (b := b) F) U := by |
| 194 | apply (contDiffOn_succ_iff_hasFDerivWithinAt_of_uniqueDiffOn hU.uniqueDiffOn).mpr |
| 195 | refine ⟨?_, _, hflip, fun p hp => (hd p hp).hasFDerivWithinAt⟩ |
| 196 | intro hω |
| 197 | exact (WithTop.coe_ne_top hω).elim |
| 198 | simpa only [Nat.cast_add, Nat.cast_one] using hresult |
| 199 | |
| 200 | /-- Joint C∞ regularity on an open product containing the compact time interval |
| 201 | implies C∞ dependence as a path in the supremum norm. -/ |
| 202 | theorem contDiffOn_pathFamily_of_joint (U : Set P) (V : Set ℝ) |
| 203 | (hU : IsOpen U) (hV : IsOpen V) (hI : Icc a b ⊆ V) |
| 204 | (F : P × ℝ → E) (hF : ContDiffOn ℝ ∞ F (U ×ˢ V)) : |
| 205 | ContDiffOn ℝ ∞ (pathFamily (a := a) (b := b) F) U := by |
| 206 | apply contDiffOn_infty.mpr |
| 207 | intro n |
| 208 | exact contDiffOn_pathFamily_nat U V hU hV hI n F |
| 209 | (hF.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl n)) |
| 210 | |
| 211 | /-- Every actual path jet evaluates to the genuine iterated parameter derivative |
| 212 | of the original scalar-time slice. -/ |
| 213 | theorem iteratedFDeriv_pathFamily_apply (U : Set P) (V : Set ℝ) |
| 214 | (hU : IsOpen U) (hV : IsOpen V) (hI : Icc a b ⊆ V) |
| 215 | (F : P × ℝ → E) (hF : ContDiffOn ℝ ∞ F (U ×ˢ V)) |
| 216 | {p : P} (hp : p ∈ U) (k : ℕ) (v : Fin k → P) (t : Icc a b) : |
| 217 | (iteratedFDeriv ℝ k (pathFamily (a := a) (b := b) F) p v) t = |
| 218 | iteratedFDeriv ℝ k (fun q => F (q, t)) p v := by |
| 219 | let ev : C(Icc a b, E) →L[ℝ] E := ContinuousMap.evalCLM ℝ t |
| 220 | have hpath := contDiffOn_pathFamily_of_joint U V hU hV hI F hF |
| 221 | have hcomp := ev.iteratedFDerivWithin_comp_left (hpath p hp) hU.uniqueDiffOn hp |
| 222 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl k) |
| 223 | have hsame : EqOn (ev ∘ pathFamily (a := a) (b := b) F) (fun q => F (q, t)) U := by |
| 224 | intro q hq |
| 225 | exact pathFamily_apply F q |
| 226 | (slice_continuous (hF.continuousOn.mono (Set.prod_mono Subset.rfl hI)) hq) t |
| 227 | have heq := iteratedFDerivWithin_congr (𝕜 := ℝ) hsame hp k |
| 228 | have hv := congrArg (fun L : P [×k]→L[ℝ] E => L v) (hcomp.symm.trans heq) |
| 229 | change (iteratedFDerivWithin ℝ k (pathFamily F) U p v) t = |
| 230 | iteratedFDerivWithin ℝ k (fun q => F (q, t)) U p v at hv |
| 231 | simpa only [iteratedFDerivWithin_of_isOpen k hU hp] using hv |
| 232 | |
| 233 | section ODE |
| 234 | |
| 235 | variable [CompleteSpace E] (hab : a ≤ b) |
| 236 | |
| 237 | /-- The actual finite-interval ODE solution for the supplied joint coefficient |
| 238 | and forcing families. -/ |
| 239 | noncomputable def odeFamily (A : P × ℝ → E →L[ℝ] E) (x₀ : P → E) |
| 240 | (f : P × ℝ → E) (p : P) : C(Icc a b, E) := |
| 241 | ParametricODE.solution hab (pathFamily A p) (x₀ p) (pathFamily f p) |
| 242 | |
| 243 | /-- Directly closes the joint-smoothness interface of `ParametricODE`. -/ |
| 244 | theorem contDiffOn_odeFamily_of_joint (U : Set P) (V : Set ℝ) |
| 245 | (hU : IsOpen U) (hV : IsOpen V) (hI : Icc a b ⊆ V) |
| 246 | (A : P × ℝ → E →L[ℝ] E) (x₀ : P → E) (f : P × ℝ → E) |
| 247 | (hA : ContDiffOn ℝ ∞ A (U ×ˢ V)) (hx₀ : ContDiffOn ℝ ∞ x₀ U) |
| 248 | (hf : ContDiffOn ℝ ∞ f (U ×ˢ V)) : |
| 249 | ContDiffOn ℝ ∞ (odeFamily hab A x₀ f) U := |
| 250 | ParametricODE.contDiffOn_solution_family hab (pathFamily A) x₀ (pathFamily f) |
| 251 | (contDiffOn_pathFamily_of_joint U V hU hV hI A hA) hx₀ |
| 252 | (contDiffOn_pathFamily_of_joint U V hU hV hI f hf) |
| 253 | |
| 254 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 255 | theorem odeFamily_initial (A : P × ℝ → E →L[ℝ] E) (x₀ : P → E) |
| 256 | (f : P × ℝ → E) (p : P) : |
| 257 | odeFamily hab A x₀ f p ⟨a, le_rfl, hab⟩ = x₀ p := |
| 258 | ParametricODE.solution_initial hab (pathFamily A p) (x₀ p) (pathFamily f p) |
| 259 | |
| 260 | omit [NormedSpace ℝ P] in |
| 261 | /-- The smooth path family satisfies the ODE with the originally supplied |
| 262 | coefficient values at every time in the closed interval. -/ |
| 263 | theorem odeFamily_hasDerivWithinAt (U : Set P) (V : Set ℝ) |
| 264 | (hI : Icc a b ⊆ V) (A : P × ℝ → E →L[ℝ] E) (x₀ : P → E) (f : P × ℝ → E) |
| 265 | (hA : ContinuousOn A (U ×ˢ V)) (hf : ContinuousOn f (U ×ˢ V)) |
| 266 | {p : P} (hp : p ∈ U) (t : Icc a b) : |
| 267 | HasDerivWithinAt (ParametricODE.extend hab (odeFamily hab A x₀ f p)) |
| 268 | (A (p, t) (odeFamily hab A x₀ f p t) + f (p, t)) (Icc a b) t := by |
| 269 | have hAc := slice_continuous (hA.mono (Set.prod_mono Subset.rfl hI)) hp |
| 270 | have hfc := slice_continuous (hf.mono (Set.prod_mono Subset.rfl hI)) hp |
| 271 | unfold odeFamily |
| 272 | simpa only [pathFamily_apply A p hAc, pathFamily_apply f p hfc] using |
| 273 | ParametricODE.solution_hasDerivWithinAt hab (pathFamily A p) (x₀ p) (pathFamily f p) t |
| 274 | |
| 275 | end ODE |
| 276 | |
| 277 | end |
| 278 | |
| 279 | end NavierStokes.SmoothPathFamily |