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 Mathlib.Analysis.Calculus.ContDiff.Deriv |
| 2 | import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas |
| 3 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus |
| 4 | import Mathlib.Topology.ContinuousMap.Interval |
| 5 | import Mathlib.Topology.ContinuousMap.Compact |
| 6 | import Mathlib.Analysis.Normed.Module.FiniteDimension |
| 7 | |
| 8 | /-! |
| 9 | # The Banach space of finite jets on a closed interval |
| 10 | |
| 11 | A finite tuple of continuous functions is a genuine jet when neighboring |
| 12 | components satisfy the fundamental theorem of calculus. These are closed |
| 13 | linear constraints, so the resulting space is complete in the maximum jet norm. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | namespace NavierStokes.ClosedIntervalCk |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Topology ContDiff |
| 22 | |
| 23 | abbrev I : Set ℝ := Icc (-1 : ℝ) 1 |
| 24 | |
| 25 | variable (E : Type*) [NormedAddCommGroup E] |
| 26 | |
| 27 | abbrev Path := C(I,E) |
| 28 | abbrev Jets (k : ℕ) := Fin (k+1) → Path E |
| 29 | |
| 30 | variable {E} |
| 31 | |
| 32 | def extend (f : Path E) : ℝ → E := Set.IccExtend (by norm_num : (-1:ℝ) ≤ 1) f |
| 33 | |
| 34 | theorem extend_continuous (f : Path E) : Continuous (extend f) := |
| 35 | continuous_IccExtend_iff.mpr f.continuous |
| 36 | |
| 37 | @[simp] theorem extend_apply (f : Path E) (x : I) : extend f x = f x := by |
| 38 | simp [extend] |
| 39 | |
| 40 | theorem extend_of_mem (f : Path E) {x : ℝ} (hx : x ∈ I) : |
| 41 | extend f x = f ⟨x,hx⟩ := extend_apply f ⟨x,hx⟩ |
| 42 | |
| 43 | @[simp] theorem extend_zero : extend (0 : Path E) = 0 := by funext x; rfl |
| 44 | @[simp] theorem extend_add (f g : Path E) : extend (f+g) = extend f+extend g := by funext x; rfl |
| 45 | |
| 46 | variable [NormedSpace ℝ E] |
| 47 | |
| 48 | @[simp] theorem extend_smul (c : ℝ) (f : Path E) : extend (c • f) = c • extend f := by funext x; rfl |
| 49 | |
| 50 | def primitiveLinear (x : ℝ) : Path E →ₗ[ℝ] E where |
| 51 | toFun f := ∫ t in (-1:ℝ)..x, extend f t |
| 52 | map_add' f g := by |
| 53 | simp only [extend_add, Pi.add_apply] |
| 54 | exact intervalIntegral.integral_add ((extend_continuous f).intervalIntegrable _ _) |
| 55 | ((extend_continuous g).intervalIntegrable _ _) |
| 56 | map_smul' c f := by |
| 57 | simp only [extend_smul, Pi.smul_apply, RingHom.id_apply] |
| 58 | exact intervalIntegral.integral_smul c (extend f) |
| 59 | |
| 60 | theorem norm_primitiveLinear_le (x : ℝ) (f : Path E) : |
| 61 | ‖primitiveLinear x f‖ ≤ |x+1| *‖f‖ := by |
| 62 | have hb : ∀ t ∈ uIcc (-1:ℝ) x, ‖extend f t‖ ≤ ‖f‖ := by |
| 63 | intro t ht |
| 64 | exact f.norm_coe_le_norm _ |
| 65 | have hi := intervalIntegral.norm_integral_le_of_norm_le_const (fun t ht => hb t (uIoc_subset_uIcc ht)) |
| 66 | simpa only [primitiveLinear, LinearMap.coe_mk, AddHom.coe_mk, sub_neg_eq_add, |
| 67 | mul_comm] using hi |
| 68 | |
| 69 | def primitive (x : ℝ) : Path E →L[ℝ] E := |
| 70 | (primitiveLinear x).mkContinuous |x+1| (norm_primitiveLinear_le x) |
| 71 | |
| 72 | @[simp] theorem primitive_apply (x : ℝ) (f : Path E) : |
| 73 | primitive x f = ∫ t in (-1:ℝ)..x, extend f t := rfl |
| 74 | |
| 75 | def leftEndpoint : I := ⟨-1, by constructor <;> norm_num⟩ |
| 76 | |
| 77 | def constraint (k : ℕ) (j : Fin k) (x : I) : Jets E k →L[ℝ] E := |
| 78 | (((ContinuousMap.evalCLM ℝ x - ContinuousMap.evalCLM ℝ leftEndpoint) : Path E →L[ℝ] E).comp |
| 79 | (ContinuousLinearMap.proj j.castSucc)) - |
| 80 | (primitive x).comp (ContinuousLinearMap.proj j.succ) |
| 81 | |
| 82 | @[simp] theorem constraint_apply (k : ℕ) (j : Fin k) (x : I) (f : Jets E k) : |
| 83 | constraint k j x f = f j.castSucc x-f j.castSucc leftEndpoint- |
| 84 | ∫ t in (-1:ℝ)..(x:ℝ), extend (f j.succ) t := rfl |
| 85 | |
| 86 | /-- Every compatibility condition is the kernel of a concrete continuous linear map. -/ |
| 87 | def jetSubmodule (k : ℕ) : Submodule ℝ (Jets E k) := |
| 88 | ⨅ (j : Fin k) (x : I), (constraint k j x).ker |
| 89 | |
| 90 | theorem mem_jetSubmodule_iff (k : ℕ) (f : Jets E k) : |
| 91 | f ∈ jetSubmodule k ↔ ∀ (j : Fin k) (x : I), |
| 92 | f j.castSucc x = f j.castSucc leftEndpoint+ |
| 93 | ∫ t in (-1:ℝ)..(x:ℝ), extend (f j.succ) t := by |
| 94 | simp only [jetSubmodule, Submodule.mem_iInf, LinearMap.mem_ker] |
| 95 | constructor |
| 96 | · intro hf j x |
| 97 | have hx := hf j x |
| 98 | change f j.castSucc x-f j.castSucc leftEndpoint- |
| 99 | (∫ t in (-1:ℝ)..(x:ℝ), extend (f j.succ) t) = 0 at hx |
| 100 | exact (sub_eq_iff_eq_add.mp (sub_eq_zero.mp hx)).trans (add_comm _ _) |
| 101 | · intro hf j x |
| 102 | change f j.castSucc x-f j.castSucc leftEndpoint- |
| 103 | (∫ t in (-1:ℝ)..(x:ℝ), extend (f j.succ) t) = 0 |
| 104 | rw [hf j x] |
| 105 | abel |
| 106 | |
| 107 | theorem jetSubmodule_closed (k : ℕ) : IsClosed (jetSubmodule (E := E) k : Set (Jets E k)) := by |
| 108 | simp only [jetSubmodule, Submodule.coe_iInf] |
| 109 | exact isClosed_iInter (fun j => isClosed_iInter (fun x => (constraint k j x).isClosed_ker)) |
| 110 | |
| 111 | /-- The actual finite `C^k` jet space with the inherited maximum-component norm. -/ |
| 112 | def CK (k : ℕ) : Type _ := jetSubmodule (E := E) k |
| 113 | |
| 114 | instance (k : ℕ) : NormedAddCommGroup (CK (E := E) k) := |
| 115 | inferInstanceAs (NormedAddCommGroup (jetSubmodule (E := E) k)) |
| 116 | |
| 117 | instance (k : ℕ) : NormedSpace ℝ (CK (E := E) k) := |
| 118 | inferInstanceAs (NormedSpace ℝ (jetSubmodule (E := E) k)) |
| 119 | |
| 120 | instance [CompleteSpace E] (k : ℕ) : CompleteSpace (CK (E := E) k) := |
| 121 | (jetSubmodule_closed (E := E) k).completeSpace_coe |
| 122 | |
| 123 | |
| 124 | |
| 125 | theorem uniqueDiff : UniqueDiffOn ℝ I := uniqueDiffOn_Icc (by norm_num) |
| 126 | |
| 127 | variable [CompleteSpace E] |
| 128 | |
| 129 | /-- Compatibility gives the actual one-sided derivative, including both endpoints. -/ |
| 130 | theorem component_hasDerivWithinAt {k : ℕ} (f : CK (E := E) k) (j : Fin k) (x : I) : |
| 131 | HasDerivWithinAt (extend (f.val j.castSucc)) (f.val j.succ x) I x := by |
| 132 | have hc := extend_continuous (f.val j.succ) |
| 133 | have hd := intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable (-1) x) |
| 134 | (hc.continuousOn.stronglyMeasurableAtFilter isOpen_univ x (mem_univ _)) hc.continuousAt |
| 135 | have hs := (hd.const_add (f.val j.castSucc leftEndpoint)).hasDerivWithinAt (s := I) |
| 136 | rw [extend_apply] at hs |
| 137 | have he : EqOn (extend (f.val j.castSucc)) |
| 138 | (fun y => f.val j.castSucc leftEndpoint+∫ t in (-1:ℝ)..y, extend (f.val j.succ) t) I := by |
| 139 | intro y hy |
| 140 | have h := (mem_jetSubmodule_iff k f.val).mp f.property j ⟨y,hy⟩ |
| 141 | simpa only [← extend_apply, Subtype.coe_mk] using h |
| 142 | exact hs.congr he (he x.property) |
| 143 | |
| 144 | /-- Every stored component is the actual iterated parameter derivative. -/ |
| 145 | theorem actual_jet {k : ℕ} (f : CK (E := E) k) (n : ℕ) (hn : n ≤ k) (x : I) : |
| 146 | iteratedDerivWithin n (extend (f.val 0)) I x = f.val ⟨n,by omega⟩ x := by |
| 147 | induction n generalizing x with |
| 148 | | zero => simp [iteratedDerivWithin_zero] |
| 149 | | succ n ih => |
| 150 | have hnk : n ≤ k := by omega |
| 151 | have he : EqOn (iteratedDerivWithin n (extend (f.val 0)) I) |
| 152 | (extend (f.val ⟨n,by omega⟩)) I := by |
| 153 | intro y hy |
| 154 | simpa only [extend_of_mem _ hy] using ih hnk ⟨y,hy⟩ |
| 155 | rw [iteratedDerivWithin_succ, derivWithin_congr he (he x.property)] |
| 156 | exact (component_hasDerivWithinAt f ⟨n,by omega⟩ x).derivWithin (uniqueDiff x x.property) |
| 157 | |
| 158 | /-- Genuine `C^k` regularity follows from the defining closed constraints. -/ |
| 159 | theorem contDiffOn {k : ℕ} (f : CK (E := E) k) : |
| 160 | ContDiffOn ℝ k (extend (f.val 0)) I := by |
| 161 | apply (contDiffOn_nat_iff_continuousOn_differentiableOn_deriv uniqueDiff).mpr |
| 162 | constructor |
| 163 | · intro n hn |
| 164 | apply (extend_continuous (f.val ⟨n,by omega⟩)).continuousOn.congr |
| 165 | intro x hx |
| 166 | simpa only [extend_of_mem _ hx] using actual_jet f n hn ⟨x,hx⟩ |
| 167 | · intro n hn x hx |
| 168 | have hj : (⟨n,hn⟩ : Fin k).castSucc = (⟨n,by omega⟩ : Fin (k+1)) := Fin.ext rfl |
| 169 | have hd : DifferentiableWithinAt ℝ (extend (f.val (⟨n,by omega⟩ : Fin (k+1)))) I x := by |
| 170 | simpa only [hj] using (component_hasDerivWithinAt f ⟨n,hn⟩ ⟨x,hx⟩).differentiableWithinAt |
| 171 | apply hd.congr |
| 172 | · intro y hy |
| 173 | simpa only [extend_of_mem _ hy] using actual_jet f n hn.le ⟨y,hy⟩ |
| 174 | · simpa only [extend_of_mem _ hx] using actual_jet f n hn.le ⟨x,hx⟩ |
| 175 | |
| 176 | /-- The inherited norm is precisely the maximum norm of all derivatives through `k`. -/ |
| 177 | theorem norm_le_iff {k : ℕ} (f : CK (E := E) k) {B : ℝ} (hB : 0 ≤ B) : |
| 178 | ‖f‖ ≤ B ↔ ∀ n ≤ k, ∀ x : I, ‖iteratedDerivWithin n (extend (f.val 0)) I x‖ ≤ B := by |
| 179 | change ‖f.val‖ ≤ B ↔ _ |
| 180 | rw [pi_norm_le_iff_of_nonneg hB] |
| 181 | constructor |
| 182 | · intro hf n hn x |
| 183 | rw [actual_jet f n hn x] |
| 184 | exact (ContinuousMap.norm_le (f.val ⟨n,by omega⟩) hB).mp (hf _) x |
| 185 | · intro hf j |
| 186 | apply (ContinuousMap.norm_le (f.val j) hB).mpr |
| 187 | intro x |
| 188 | have hh := hf j.val (by omega) x |
| 189 | rw [actual_jet f j.val (by omega) x] at hh |
| 190 | exact hh |
| 191 | |
| 192 | |
| 193 | |
| 194 | /-- Forgetting derivatives is a continuous linear map to continuous functions. -/ |
| 195 | def value (k : ℕ) : CK (E := E) k →L[ℝ] Path E := |
| 196 | (ContinuousLinearMap.proj 0).comp (jetSubmodule (E := E) k).subtypeL |
| 197 | |
| 198 | omit [CompleteSpace E] in |
| 199 | @[simp] theorem value_apply {k : ℕ} (f : CK (E := E) k) : value k f = f.val 0 := rfl |
| 200 | |
| 201 | theorem value_injective (k : ℕ) : Function.Injective (value (E := E) k) := by |
| 202 | intro f g hfg |
| 203 | have he : extend (f.val 0) = extend (g.val 0) := congrArg extend hfg |
| 204 | apply Subtype.ext |
| 205 | funext j |
| 206 | apply ContinuousMap.ext |
| 207 | intro x |
| 208 | rw [← actual_jet f j.val (by omega) x, ← actual_jet g j.val (by omega) x, he] |
| 209 | |
| 210 | theorem norm_value_le {k : ℕ} (f : CK (E := E) k) : ‖value k f‖ ≤ ‖f‖ := by |
| 211 | apply (ContinuousMap.norm_le _ (norm_nonneg f)).mpr |
| 212 | intro x |
| 213 | simpa only [iteratedDerivWithin_zero, value_apply, extend_apply] using |
| 214 | (norm_le_iff f (norm_nonneg f)).mp le_rfl 0 (Nat.zero_le _) x |
| 215 | |
| 216 | theorem norm_zero_eq_value (f : CK (E := E) 0) : ‖f‖ = ‖value 0 f‖ := by |
| 217 | apply le_antisymm _ (norm_value_le f) |
| 218 | apply (norm_le_iff f (norm_nonneg _)).mpr |
| 219 | intro n hn x |
| 220 | have hn0 : n = 0 := Nat.eq_zero_of_le_zero hn |
| 221 | subst n |
| 222 | simpa only [iteratedDerivWithin_zero, value_apply, extend_apply] using |
| 223 | (value 0 f).norm_coe_le_norm x |
| 224 | |
| 225 | /-- The actual derivative tuple of a `C^k` function. -/ |
| 226 | def functionJets {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) : Jets E k := |
| 227 | fun j => ⟨fun x => iteratedDerivWithin j.val f I x, |
| 228 | (hf.continuousOn_iteratedDerivWithin (by exact_mod_cast Nat.le_of_lt_succ j.isLt) |
| 229 | uniqueDiff).domRestrict⟩ |
| 230 | |
| 231 | omit [CompleteSpace E] in |
| 232 | @[simp] theorem functionJets_apply {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) |
| 233 | (j : Fin (k+1)) (x : I) : functionJets f hf j x = iteratedDerivWithin j.val f I x := rfl |
| 234 | |
| 235 | theorem functionJets_mem {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) : |
| 236 | functionJets f hf ∈ jetSubmodule k := by |
| 237 | apply (mem_jetSubmodule_iff k _).mpr |
| 238 | intro j x |
| 239 | have hj : j.val < k := j.isLt |
| 240 | have hcont := hf.continuousOn_iteratedDerivWithin (m := j.val) (by exact_mod_cast hj.le) uniqueDiff |
| 241 | have hcont' := hf.continuousOn_iteratedDerivWithin (m := j.val+1) (by exact_mod_cast Nat.succ_le_of_lt hj) uniqueDiff |
| 242 | have hsub : Icc (-1:ℝ) (x:ℝ) ⊆ I := Icc_subset_Icc le_rfl x.property.2 |
| 243 | have hder : ∀ y ∈ Ioo (-1:ℝ) (x:ℝ), |
| 244 | HasDerivAt (iteratedDerivWithin j.val f I) (iteratedDerivWithin (j.val+1) f I y) y := by |
| 245 | intro y hy |
| 246 | have hyI : y ∈ I := ⟨hy.1.le,hy.2.le.trans x.property.2⟩ |
| 247 | have hd := (hf.differentiableOn_iteratedDerivWithin (m := j.val) |
| 248 | (by exact_mod_cast hj) uniqueDiff y hyI).hasDerivWithinAt |
| 249 | have hn : I ∈ nhds y := Icc_mem_nhds hy.1 (hy.2.trans_le x.property.2) |
| 250 | simpa only [← iteratedDerivWithin_succ] using hd.hasDerivAt hn |
| 251 | have hi := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le x.property.1 |
| 252 | (hcont.mono hsub) hder ((hcont'.mono hsub).intervalIntegrable_of_Icc x.property.1) |
| 253 | have he : (∫ t in (-1:ℝ)..(x:ℝ), extend (functionJets f hf j.succ) t) = |
| 254 | ∫ t in (-1:ℝ)..(x:ℝ), iteratedDerivWithin (j.val+1) f I t := by |
| 255 | apply intervalIntegral.integral_congr |
| 256 | intro y hy |
| 257 | have hyI : y ∈ I := hsub (by simpa only [uIcc_of_le x.property.1] using hy) |
| 258 | rw [extend_of_mem _ hyI] |
| 259 | rfl |
| 260 | rw [he, hi] |
| 261 | simp only [functionJets_apply, Fin.val_castSucc, leftEndpoint] |
| 262 | abel |
| 263 | |
| 264 | /-- Every ordinary `C^k` function supplies an element of the complete jet space. -/ |
| 265 | def ofContDiffOn {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) : CK (E := E) k := |
| 266 | ⟨functionJets f hf,functionJets_mem f hf⟩ |
| 267 | |
| 268 | @[simp] theorem ofContDiffOn_value {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) (x : I) : |
| 269 | value k (ofContDiffOn f hf) x = f x := rfl |
| 270 | |
| 271 | |
| 272 | |
| 273 | theorem norm_ofContDiffOn_le_iff {k : ℕ} (f : ℝ → E) (hf : ContDiffOn ℝ k f I) |
| 274 | {B : ℝ} (hB : 0 ≤ B) : |
| 275 | ‖ofContDiffOn f hf‖ ≤ B ↔ ∀ n ≤ k, ∀ x : I, ‖iteratedDerivWithin n f I x‖ ≤ B := by |
| 276 | change ‖functionJets f hf‖ ≤ B ↔ _ |
| 277 | rw [pi_norm_le_iff_of_nonneg hB] |
| 278 | constructor |
| 279 | · intro hb n hn x |
| 280 | exact (ContinuousMap.norm_le (functionJets f hf ⟨n,by omega⟩) hB).mp (hb _) x |
| 281 | · intro hb j |
| 282 | apply (ContinuousMap.norm_le (functionJets f hf j) hB).mpr |
| 283 | exact fun x => hb j.val (by omega) x |
| 284 | |
| 285 | |
| 286 | |
| 287 | def lowerValue {k l : ℕ} (h : l ≤ k) (f : CK (E := E) k) : CK (E := E) l := |
| 288 | ofContDiffOn (extend (value k f)) ((contDiffOn f).of_le (by exact_mod_cast h)) |
| 289 | |
| 290 | @[simp] theorem lowerValue_value {k l : ℕ} (h : l ≤ k) (f : CK (E := E) k) (x : I) : |
| 291 | value l (lowerValue h f) x = value k f x := by |
| 292 | change extend (value k f) x = _ |
| 293 | exact extend_apply _ _ |
| 294 | |
| 295 | theorem norm_lowerValue_le {k l : ℕ} (h : l ≤ k) (f : CK (E := E) k) : |
| 296 | ‖lowerValue h f‖ ≤ ‖f‖ := by |
| 297 | apply (norm_ofContDiffOn_le_iff _ _ (norm_nonneg f)).mpr |
| 298 | intro n hn x |
| 299 | exact (norm_le_iff f (norm_nonneg f)).mp le_rfl n (hn.trans h) x |
| 300 | |
| 301 | def lowerLinear {k l : ℕ} (h : l ≤ k) : CK (E := E) k →ₗ[ℝ] CK (E := E) l where |
| 302 | toFun := lowerValue h |
| 303 | map_add' f g := by |
| 304 | apply value_injective l |
| 305 | apply ContinuousMap.ext |
| 306 | intro x |
| 307 | simp only [lowerValue_value, map_add, ContinuousMap.add_apply] |
| 308 | map_smul' c f := by |
| 309 | apply value_injective l |
| 310 | apply ContinuousMap.ext |
| 311 | intro x |
| 312 | simp only [lowerValue_value, map_smul, ContinuousMap.smul_apply, RingHom.id_apply] |
| 313 | |
| 314 | /-- The natural inclusion `C^k → C^l` for `l ≤ k`, with its actual maximum derivative norm. -/ |
| 315 | def lower {k l : ℕ} (h : l ≤ k) : CK (E := E) k →L[ℝ] CK (E := E) l := |
| 316 | (lowerLinear (E := E) h).mkContinuous 1 (fun f => by |
| 317 | change ‖lowerValue h f‖ ≤ 1 * ‖f‖ |
| 318 | simpa only [one_mul] using norm_lowerValue_le h f) |
| 319 | |
| 320 | @[simp] theorem lower_apply {k l : ℕ} (h : l ≤ k) (f : CK (E := E) k) : lower h f = lowerValue h f := rfl |
| 321 | |
| 322 | theorem lower_injective {k l : ℕ} (h : l ≤ k) : Function.Injective (lower (E := E) h) := by |
| 323 | intro f g hfg |
| 324 | apply value_injective k |
| 325 | apply ContinuousMap.ext |
| 326 | intro x |
| 327 | have he := congrArg (fun u : CK (E := E) l => value l u x) hfg |
| 328 | simpa only [lower_apply, lowerValue_value] using he |
| 329 | |
| 330 | @[simp] theorem lower_ofContDiffOn {k l : ℕ} (h : l ≤ k) (f : ℝ → E) (hf : ContDiffOn ℝ k f I) : |
| 331 | lower h (ofContDiffOn f hf) = ofContDiffOn f (hf.of_le (by exact_mod_cast h)) := by |
| 332 | apply value_injective l |
| 333 | apply ContinuousMap.ext |
| 334 | intro x |
| 335 | simp only [lower_apply, lowerValue_value, ofContDiffOn_value] |
| 336 | |
| 337 | end NavierStokes.ClosedIntervalCk |