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.TangentODE |
| 2 | import Mathlib.Analysis.Normed.Operator.Banach |
| 3 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 4 | |
| 5 | /-! |
| 6 | # Smooth dependence of finite-interval linear ODE solutions |
| 7 | |
| 8 | The coefficient and forcing are elements of spaces of continuous paths with |
| 9 | the supremum norm. The actual integral equation is solved by an invertible |
| 10 | Volterra operator. Smooth inversion then gives parameter dependence without |
| 11 | assuming smoothness of a pre-existing family of solutions. |
| 12 | -/ |
| 13 | |
| 14 | namespace NavierStokes.ParametricODE |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open Set Function Filter Metric intervalIntegral MeasureTheory |
| 19 | open scoped Topology NNReal Nat Interval ContDiff |
| 20 | |
| 21 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 22 | |
| 23 | abbrev Curve (a b : ℝ) (E : Type*) [TopologicalSpace E] := C(Icc a b, E) |
| 24 | |
| 25 | abbrev Coefficient (a b : ℝ) (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] := |
| 26 | Curve a b (E →L[ℝ] E) |
| 27 | |
| 28 | variable {a b : ℝ} (hab : a ≤ b) |
| 29 | |
| 30 | def extend (f : Curve a b E) (t : ℝ) : E := f (projIcc a b hab t) |
| 31 | |
| 32 | omit [NormedSpace ℝ E] [CompleteSpace E] in |
| 33 | theorem continuous_extend (f : Curve a b E) : Continuous (extend hab f) := |
| 34 | f.continuous.comp continuous_projIcc |
| 35 | |
| 36 | omit [NormedSpace ℝ E] [CompleteSpace E] in |
| 37 | theorem extend_coe (f : Curve a b E) (t : Icc a b) : extend hab f t = f t := by |
| 38 | simp only [extend, projIcc_val] |
| 39 | |
| 40 | def integralPath (f : Curve a b E) : Curve a b E := |
| 41 | ⟨fun t => ∫ s in a..t, extend hab f s, by |
| 42 | have hd (t : ℝ) : HasDerivAt (fun t => ∫ s in a..t, extend hab f s) |
| 43 | (extend hab f t) t := |
| 44 | integral_hasDerivAt_right ((continuous_extend hab f).intervalIntegrable _ _) |
| 45 | ((continuous_extend hab f).stronglyMeasurableAtFilter _ _) |
| 46 | (continuous_extend hab f).continuousAt |
| 47 | exact (continuous_iff_continuousAt.mpr (fun t => (hd t).continuousAt)).comp |
| 48 | continuous_subtype_val⟩ |
| 49 | |
| 50 | theorem norm_integralPath_le (f : Curve a b E) : |
| 51 | ‖integralPath hab f‖ ≤ (b - a) * ‖f‖ := by |
| 52 | apply (ContinuousMap.norm_le _ (mul_nonneg (sub_nonneg.mpr hab) (norm_nonneg _))).mpr |
| 53 | intro t |
| 54 | change ‖∫ s in a..(t : ℝ), extend hab f s‖ ≤ _ |
| 55 | calc |
| 56 | _ ≤ ‖f‖ * |(t : ℝ) - a| := |
| 57 | norm_integral_le_of_norm_le_const fun s _ => f.norm_coe_le_norm _ |
| 58 | _ ≤ ‖f‖ * (b - a) := by |
| 59 | apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) |
| 60 | rw [abs_of_nonneg (sub_nonneg.mpr t.2.1)] |
| 61 | exact sub_le_sub_right t.2.2 a |
| 62 | _ = _ := mul_comm _ _ |
| 63 | |
| 64 | def integrator : Curve a b E →L[ℝ] Curve a b E := |
| 65 | LinearMap.mkContinuous { |
| 66 | toFun := integralPath hab |
| 67 | map_add' := by |
| 68 | intro f g |
| 69 | ext t |
| 70 | exact integral_add ((continuous_extend hab f).intervalIntegrable _ _) |
| 71 | ((continuous_extend hab g).intervalIntegrable _ _) |
| 72 | map_smul' := by |
| 73 | intro c f |
| 74 | ext t |
| 75 | exact integral_smul c (extend hab f) |
| 76 | } (b - a) (norm_integralPath_le hab) |
| 77 | |
| 78 | theorem integrator_apply (f : Curve a b E) (t : Icc a b) : |
| 79 | integrator hab f t = ∫ s in a..(t : ℝ), extend hab f s := rfl |
| 80 | |
| 81 | noncomputable def applyCoefficient (A : Coefficient a b E) (u : Curve a b E) : Curve a b E := |
| 82 | ⟨fun t => A t (u t), A.continuous.clm_apply u.continuous⟩ |
| 83 | |
| 84 | omit [CompleteSpace E] in |
| 85 | theorem norm_applyCoefficient_le (A : Coefficient a b E) (u : Curve a b E) : |
| 86 | ‖applyCoefficient A u‖ ≤ ‖A‖ * ‖u‖ := by |
| 87 | apply (ContinuousMap.norm_le (applyCoefficient A u) |
| 88 | (mul_nonneg (norm_nonneg A) (norm_nonneg u))).mpr |
| 89 | intro t |
| 90 | exact ((A t).le_opNorm (u t)).trans |
| 91 | (mul_le_mul (A.norm_coe_le_norm t) (u.norm_coe_le_norm t) |
| 92 | (norm_nonneg _) (norm_nonneg _)) |
| 93 | |
| 94 | def coefficientLinear : Coefficient a b E →ₗ[ℝ] Curve a b E →ₗ[ℝ] Curve a b E where |
| 95 | toFun A := { |
| 96 | toFun := applyCoefficient A |
| 97 | map_add' := by intro u w; ext t; exact map_add (A t) _ _ |
| 98 | map_smul' := by intro c u; ext t; exact map_smul (A t) _ _ } |
| 99 | map_add' := by intro A B; ext u t; rfl |
| 100 | map_smul' := by intro c A; ext u t; rfl |
| 101 | |
| 102 | def coefficientAction : Coefficient a b E →L[ℝ] Curve a b E →L[ℝ] Curve a b E := |
| 103 | (coefficientLinear (a := a) (b := b) (E := E)).mkContinuous₂ |
| 104 | (𝕜 := ℝ) (𝕜₂ := ℝ) (𝕜₃ := ℝ) 1 |
| 105 | (fun (A : Coefficient a b E) (u : Curve a b E) => by |
| 106 | change ‖applyCoefficient A u‖ ≤ 1 * ‖A‖ * ‖u‖ |
| 107 | simpa only [one_mul] using norm_applyCoefficient_le (E := E) A u) |
| 108 | |
| 109 | def volterra : Coefficient a b E →L[ℝ] Curve a b E →L[ℝ] Curve a b E := |
| 110 | ((ContinuousLinearMap.compL ℝ (Curve a b E) (Curve a b E) (Curve a b E)) |
| 111 | (integrator hab)).comp (coefficientAction (E := E)) |
| 112 | |
| 113 | def homogeneousSystem (A : Coefficient a b E) : TangentODE.IntervalSystem E := { |
| 114 | left := a |
| 115 | right := b |
| 116 | ordered := hab |
| 117 | initial := 0 |
| 118 | field := fun t x => extend hab A t x |
| 119 | lip := ‖A‖₊ |
| 120 | lipschitz := fun t _ => (extend hab A t).lipschitzWith.weaken (A.norm_coe_le_norm _) |
| 121 | continuous := by |
| 122 | have he : Continuous (fun t : Icc a b => extend hab A t) := |
| 123 | (continuous_extend hab A).comp continuous_subtype_val |
| 124 | exact (he.comp continuous_fst).clm_apply continuous_snd } |
| 125 | |
| 126 | theorem volterra_eq_next (A : Coefficient a b E) : |
| 127 | (volterra (E := E) hab A : Curve a b E → Curve a b E) = (homogeneousSystem hab A).next := by |
| 128 | funext u |
| 129 | ext t |
| 130 | change (∫ s in a..(t : ℝ), extend hab A s (extend hab u s)) = |
| 131 | 0 + ∫ s in a..(t : ℝ), extend hab A (projIcc a b hab s) (u (projIcc a b hab s)) |
| 132 | simp only [zero_add, extend, projIcc_val] |
| 133 | |
| 134 | theorem volterra_contracting_iterate (A : Coefficient a b E) : |
| 135 | ∃ (N : ℕ) (K : ℝ≥0), ContractingWith K (volterra (E := E) hab A)^[N] := by |
| 136 | rw [volterra_eq_next] |
| 137 | exact (homogeneousSystem hab A).exists_contracting_iterate |
| 138 | |
| 139 | section AbstractInverse |
| 140 | |
| 141 | variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] [CompleteSpace X] |
| 142 | |
| 143 | omit [CompleteSpace X] in |
| 144 | theorem affine_iterate_sub (L : X →L[ℝ] X) (g : X) (n : ℕ) (u w : X) : |
| 145 | (fun x => g + L x)^[n] u - (fun x => g + L x)^[n] w = |
| 146 | L^[n] u - L^[n] w := by |
| 147 | induction n with |
| 148 | | zero => rfl |
| 149 | | succ n ih => |
| 150 | simp only [iterate_succ_apply', add_sub_add_left_eq_sub] |
| 151 | rw [← L.map_sub, ih, L.map_sub] |
| 152 | |
| 153 | theorem id_sub_isInvertible (L : X →L[ℝ] X) |
| 154 | (hL : ∃ (N : ℕ) (K : ℝ≥0), ContractingWith K L^[N]) : |
| 155 | (ContinuousLinearMap.id ℝ X - L).IsInvertible := by |
| 156 | obtain ⟨N, K, hK⟩ := hL |
| 157 | have htrans (g : X) : ContractingWith K (fun x => g + L x)^[N] := by |
| 158 | refine ⟨hK.1, LipschitzWith.of_dist_le_mul fun u w => ?_⟩ |
| 159 | simpa only [dist_eq_norm, affine_iterate_sub] using hK.2.dist_le_mul u w |
| 160 | have hsurj : Surjective (ContinuousLinearMap.id ℝ X - L) := by |
| 161 | intro g |
| 162 | let x := (htrans g).fixedPoint (fun x => g + L x)^[N] |
| 163 | have hf : g + L x = x := (htrans g).isFixedPt_fixedPoint_iterate.eq |
| 164 | refine ⟨x, ?_⟩ |
| 165 | change x - L x = g |
| 166 | exact sub_eq_iff_eq_add.mpr hf.symm |
| 167 | have hinj : Injective (ContinuousLinearMap.id ℝ X - L) := by |
| 168 | intro u w huv |
| 169 | let g := (ContinuousLinearMap.id ℝ X - L) u |
| 170 | have hu : IsFixedPt (fun x => g + L x) u := by |
| 171 | change (u - L u) + L u = u |
| 172 | exact sub_add_cancel _ _ |
| 173 | have hw : IsFixedPt (fun x => g + L x) w := by |
| 174 | change ((ContinuousLinearMap.id ℝ X - L) u) + L w = w |
| 175 | rw [huv] |
| 176 | exact sub_add_cancel _ _ |
| 177 | exact (htrans g).fixedPoint_unique' (hu.iterate N) (hw.iterate N) |
| 178 | exact ⟨ContinuousLinearEquiv.ofBijective _ (LinearMap.ker_eq_bot.mpr hinj) |
| 179 | (LinearMap.range_eq_top.mpr hsurj), ContinuousLinearEquiv.coe_ofBijective _ _ _⟩ |
| 180 | |
| 181 | end AbstractInverse |
| 182 | |
| 183 | theorem contDiff_inverse_family {X Q : Type*} |
| 184 | [NormedAddCommGroup X] [NormedSpace ℝ X] [CompleteSpace X] |
| 185 | [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 186 | (L : Q → X →L[ℝ] X) (hL : ContDiff ℝ ∞ L) (hInv : ∀ q, (L q).IsInvertible) : |
| 187 | ContDiff ℝ ∞ (fun q => (L q).inverse) := by |
| 188 | rw [contDiff_iff_contDiffAt] |
| 189 | intro q |
| 190 | exact (hInv q).contDiffAt_map_inverse.comp q hL.contDiffAt |
| 191 | |
| 192 | def equationOperator (A : Coefficient a b E) : Curve a b E →L[ℝ] Curve a b E := |
| 193 | ContinuousLinearMap.id ℝ (Curve a b E) - volterra (E := E) hab A |
| 194 | |
| 195 | theorem equationOperator_isInvertible (A : Coefficient a b E) : |
| 196 | (equationOperator hab A).IsInvertible := |
| 197 | id_sub_isInvertible _ (volterra_contracting_iterate hab A) |
| 198 | |
| 199 | /-- Resolvent of the actual Volterra integral equation on the full finite interval. -/ |
| 200 | def resolvent (A : Coefficient a b E) : Curve a b E →L[ℝ] Curve a b E := |
| 201 | (equationOperator hab A).inverse |
| 202 | |
| 203 | theorem contDiff_resolvent : ContDiff ℝ ∞ (resolvent (E := E) hab) := by |
| 204 | change ContDiff ℝ ∞ (fun A : Coefficient a b E => (equationOperator hab A).inverse) |
| 205 | apply contDiff_inverse_family (equationOperator (E := E) hab) |
| 206 | · unfold equationOperator |
| 207 | apply ContDiff.sub contDiff_const |
| 208 | exact ContinuousLinearMap.contDiff (𝕜 := ℝ) (n := ∞) |
| 209 | (E := Coefficient a b E) (F := Curve a b E →L[ℝ] Curve a b E) |
| 210 | (volterra (E := E) hab) |
| 211 | · exact equationOperator_isInvertible hab |
| 212 | |
| 213 | def constantCurve : E →L[ℝ] Curve a b E := |
| 214 | LinearMap.mkContinuous { |
| 215 | toFun := ContinuousMap.const (Icc a b) |
| 216 | map_add' := by intros; rfl |
| 217 | map_smul' := by intros; rfl |
| 218 | } 1 (fun x => by |
| 219 | change ‖ContinuousMap.const (Icc a b) x‖ ≤ 1 * ‖x‖ |
| 220 | simpa only [one_mul] using |
| 221 | (ContinuousMap.norm_le (ContinuousMap.const (Icc a b) x) (norm_nonneg x)).mpr |
| 222 | (fun _ => le_rfl)) |
| 223 | |
| 224 | def source (x₀ : E) (f : Curve a b E) : Curve a b E := |
| 225 | constantCurve x₀ + integrator hab f |
| 226 | |
| 227 | /-- The constructed solution as a continuous path, not an assumed solution family. -/ |
| 228 | def solution (A : Coefficient a b E) (x₀ : E) (f : Curve a b E) : Curve a b E := |
| 229 | resolvent hab A (source hab x₀ f) |
| 230 | |
| 231 | theorem resolvent_equation (A : Coefficient a b E) (g : Curve a b E) : |
| 232 | equationOperator hab A (resolvent hab A g) = g := by |
| 233 | exact ((equationOperator_isInvertible hab A).inverse_apply_eq.mp rfl).symm |
| 234 | |
| 235 | theorem solution_integralEquation (A : Coefficient a b E) (x₀ : E) (f : Curve a b E) : |
| 236 | solution hab A x₀ f = constantCurve x₀ + |
| 237 | integrator hab (applyCoefficient A (solution hab A x₀ f) + f) := by |
| 238 | have h := resolvent_equation hab A (source hab x₀ f) |
| 239 | change solution hab A x₀ f - volterra (E := E) hab A (solution hab A x₀ f) = |
| 240 | source hab x₀ f at h |
| 241 | rw [map_add] |
| 242 | change solution hab A x₀ f = constantCurve x₀ + |
| 243 | (volterra (E := E) hab A (solution hab A x₀ f) + integrator hab f) |
| 244 | rw [sub_eq_iff_eq_add] at h |
| 245 | calc |
| 246 | _ = source hab x₀ f + volterra (E := E) hab A (solution hab A x₀ f) := h |
| 247 | _ = _ := by unfold source; abel |
| 248 | |
| 249 | theorem solution_initial (A : Coefficient a b E) (x₀ : E) (f : Curve a b E) : |
| 250 | solution hab A x₀ f ⟨a, le_rfl, hab⟩ = x₀ := by |
| 251 | have h := congrArg (fun u : Curve a b E => u ⟨a, le_rfl, hab⟩) |
| 252 | (solution_integralEquation hab A x₀ f) |
| 253 | dsimp [constantCurve] at h |
| 254 | simp only [integrator_apply, intervalIntegral.integral_same, add_zero] at h |
| 255 | exact h |
| 256 | |
| 257 | def solutionExtension (A : Coefficient a b E) (x₀ : E) (f : Curve a b E) (t : ℝ) : E := |
| 258 | x₀ + ∫ s in a..t, extend hab (applyCoefficient A (solution hab A x₀ f) + f) s |
| 259 | |
| 260 | theorem solutionExtension_coe (A : Coefficient a b E) (x₀ : E) |
| 261 | (f : Curve a b E) (t : Icc a b) : |
| 262 | solutionExtension hab A x₀ f t = solution hab A x₀ f t := by |
| 263 | have h := congrArg (fun u : Curve a b E => u t) (solution_integralEquation hab A x₀ f) |
| 264 | exact h.symm |
| 265 | |
| 266 | /-- The constructed path has a differentiable extension satisfying the actual ODE |
| 267 | at every point of the prescribed interval. -/ |
| 268 | theorem solutionExtension_hasDerivAt (A : Coefficient a b E) (x₀ : E) |
| 269 | (f : Curve a b E) (t : Icc a b) : |
| 270 | HasDerivAt (solutionExtension hab A x₀ f) |
| 271 | (A t (solutionExtension hab A x₀ f t) + f t) t := by |
| 272 | let g := applyCoefficient A (solution hab A x₀ f) + f |
| 273 | have hd := (integral_hasDerivAt_right ((continuous_extend hab g).intervalIntegrable a t) |
| 274 | ((continuous_extend hab g).stronglyMeasurableAtFilter _ _) |
| 275 | (continuous_extend hab g).continuousAt).const_add x₀ |
| 276 | rw [extend_coe] at hd |
| 277 | rw [solutionExtension_coe] |
| 278 | unfold solutionExtension |
| 279 | simpa only [g, ContinuousMap.add_apply, applyCoefficient, ContinuousMap.coe_mk] using hd |
| 280 | |
| 281 | theorem solution_hasDerivWithinAt (A : Coefficient a b E) (x₀ : E) |
| 282 | (f : Curve a b E) (t : Icc a b) : |
| 283 | HasDerivWithinAt (extend hab (solution hab A x₀ f)) |
| 284 | (A t (solution hab A x₀ f t) + f t) (Icc a b) t := by |
| 285 | have hd := (solutionExtension_hasDerivAt hab A x₀ f t).hasDerivWithinAt (s := Icc a b) |
| 286 | rw [solutionExtension_coe] at hd |
| 287 | apply hd.congr_of_eventuallyEq_of_mem _ t.2 |
| 288 | filter_upwards [self_mem_nhdsWithin] with s hs |
| 289 | have h := solutionExtension_coe hab A x₀ f ⟨s, hs⟩ |
| 290 | simpa only [extend, projIcc_of_mem hab hs] using h.symm |
| 291 | |
| 292 | variable {P : Type*} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 293 | |
| 294 | theorem contDiffOn_solution_family {s : Set P} |
| 295 | (A : P → Coefficient a b E) (x₀ : P → E) (f : P → Curve a b E) |
| 296 | (hA : ContDiffOn ℝ ∞ A s) (hx₀ : ContDiffOn ℝ ∞ x₀ s) |
| 297 | (hf : ContDiffOn ℝ ∞ f s) : |
| 298 | ContDiffOn ℝ ∞ (fun p => solution hab (A p) (x₀ p) (f p)) s := by |
| 299 | change ContDiffOn ℝ ∞ (fun p => resolvent hab (A p) |
| 300 | (constantCurve (a := a) (b := b) (x₀ p) + integrator hab (f p))) s |
| 301 | exact ((contDiff_resolvent hab).comp_contDiffOn hA).clm_apply |
| 302 | (((constantCurve (E := E) (a := a) (b := b)).contDiff.comp_contDiffOn hx₀).add |
| 303 | ((integrator (E := E) hab).contDiff.comp_contDiffOn hf)) |
| 304 | |
| 305 | end |
| 306 | |
| 307 | end NavierStokes.ParametricODE |