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.ClosedIntervalCk |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.Bounds |
| 3 | import Mathlib.Analysis.Normed.Operator.Bilinear |
| 4 | import Mathlib.Data.Nat.Choose.Sum |
| 5 | |
| 6 | noncomputable section |
| 7 | |
| 8 | namespace NavierStokes.ClosedIntervalCk |
| 9 | |
| 10 | open Set |
| 11 | open scoped Topology ContDiff BigOperators |
| 12 | |
| 13 | variable {E F G : Type*} |
| 14 | [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 15 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 16 | [NormedAddCommGroup G] [NormedSpace ℝ G] [CompleteSpace G] |
| 17 | |
| 18 | /-- A bounded bilinear map acts on actual finite differentiability spaces pointwise. -/ |
| 19 | def postBilinear {k : ℕ} (A : E →L[ℝ] F →L[ℝ] G) (u : CK (E := E) k) (v : CK (E := F) k) : |
| 20 | CK (E := G) k := |
| 21 | ofContDiffOn (fun η => A (extend (value k u) η) (extend (value k v) η)) |
| 22 | ((A.contDiff.comp_contDiffOn (contDiffOn u)).clm_apply (contDiffOn v)) |
| 23 | |
| 24 | @[simp] theorem postBilinear_value {k : ℕ} (A : E →L[ℝ] F →L[ℝ] G) |
| 25 | (u : CK (E := E) k) (v : CK (E := F) k) (x : I) : |
| 26 | value k (postBilinear A u v) x = A (value k u x) (value k v x) := by |
| 27 | change A (extend (value k u) x) (extend (value k v) x) = _ |
| 28 | rw [extend_apply, extend_apply] |
| 29 | |
| 30 | theorem norm_postBilinear_le {k : ℕ} (A : E →L[ℝ] F →L[ℝ] G) |
| 31 | (u : CK (E := E) k) (v : CK (E := F) k) : |
| 32 | ‖postBilinear A u v‖ ≤ ‖A‖*(2:ℝ)^k*‖u‖*‖v‖ := by |
| 33 | apply (norm_ofContDiffOn_le_iff _ _ (by positivity)).mpr |
| 34 | intro n hn x |
| 35 | have hb := A.norm_iteratedFDerivWithin_le_of_bilinear (contDiffOn u) (contDiffOn v) |
| 36 | uniqueDiff x.property (by exact_mod_cast hn : (n : ℕ∞ω) ≤ k) |
| 37 | simp only [norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin] at hb |
| 38 | have hu (i : ℕ) (hi : i ≤ k) := (norm_le_iff u (norm_nonneg u)).mp le_rfl i hi x |
| 39 | have hv (i : ℕ) (hi : i ≤ k) := (norm_le_iff v (norm_nonneg v)).mp le_rfl i hi x |
| 40 | refine hb.trans ?_ |
| 41 | have hs : (∑ i ∈ Finset.range (n+1), (n.choose i : ℝ) * |
| 42 | ‖iteratedDerivWithin i (extend (value k u)) I x‖ * |
| 43 | ‖iteratedDerivWithin (n-i) (extend (value k v)) I x‖) ≤ (2:ℝ)^k*‖u‖*‖v‖ := by |
| 44 | calc |
| 45 | _ ≤ ∑ i ∈ Finset.range (n+1), (n.choose i : ℝ)*‖u‖*‖v‖ := by |
| 46 | apply Finset.sum_le_sum |
| 47 | intro i hi |
| 48 | have hin : i ≤ n := Nat.le_of_lt_succ (Finset.mem_range.mp hi) |
| 49 | exact mul_le_mul (mul_le_mul_of_nonneg_left (hu i (hin.trans hn)) (Nat.cast_nonneg _)) |
| 50 | (hv (n-i) ((Nat.sub_le _ _).trans hn)) (norm_nonneg _) |
| 51 | (mul_nonneg (Nat.cast_nonneg _) (norm_nonneg _)) |
| 52 | _ = (2:ℝ)^n*‖u‖*‖v‖ := by |
| 53 | rw [← Finset.sum_mul, ← Finset.sum_mul] |
| 54 | congr 2 |
| 55 | exact_mod_cast Nat.sum_range_choose n |
| 56 | _ ≤ (2:ℝ)^k*‖u‖*‖v‖ := |
| 57 | mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right |
| 58 | (pow_le_pow_right₀ (by norm_num) hn) (norm_nonneg _)) (norm_nonneg _) |
| 59 | exact (mul_le_mul_of_nonneg_left hs (norm_nonneg A)).trans_eq (by ring) |
| 60 | |
| 61 | def bilinearLinear (k : ℕ) (A : E →L[ℝ] F →L[ℝ] G) : |
| 62 | CK (E := E) k →ₗ[ℝ] CK (E := F) k →ₗ[ℝ] CK (E := G) k where |
| 63 | toFun u := { |
| 64 | toFun := postBilinear A u |
| 65 | map_add' v w := by |
| 66 | apply value_injective k |
| 67 | ext x |
| 68 | simp only [postBilinear_value, map_add, ContinuousMap.add_apply] |
| 69 | map_smul' c v := by |
| 70 | apply value_injective k |
| 71 | ext x |
| 72 | simp only [postBilinear_value, map_smul, ContinuousMap.smul_apply, RingHom.id_apply] } |
| 73 | map_add' u v := by |
| 74 | apply LinearMap.ext |
| 75 | intro w |
| 76 | apply value_injective k |
| 77 | ext x |
| 78 | change value k (postBilinear A (u+v) w) x = value k (postBilinear A u w + postBilinear A v w) x |
| 79 | simp only [postBilinear_value, map_add, ContinuousMap.add_apply, add_apply] |
| 80 | map_smul' c u := by |
| 81 | apply LinearMap.ext |
| 82 | intro v |
| 83 | apply value_injective k |
| 84 | ext x |
| 85 | change value k (postBilinear A (c • u) v) x = value k (c • postBilinear A u v) x |
| 86 | simp only [postBilinear_value, map_smul, ContinuousMap.smul_apply, smul_apply] |
| 87 | |
| 88 | |
| 89 | |
| 90 | def bilinear (k : ℕ) (A : E →L[ℝ] F →L[ℝ] G) : |
| 91 | CK (E := E) k →L[ℝ] CK (E := F) k →L[ℝ] CK (E := G) k := |
| 92 | LinearMap.mkContinuous₂ (E := CK (E := E) k) (F := CK (E := F) k) |
| 93 | (G := CK (E := G) k) (σ₁₃ := RingHom.id ℝ) (σ₂₃ := RingHom.id ℝ) |
| 94 | (bilinearLinear k A) (‖A‖*(2:ℝ)^k) |
| 95 | (fun u v => norm_postBilinear_le A u v) |
| 96 | |
| 97 | @[simp] theorem bilinear_apply (k : ℕ) (A : E →L[ℝ] F →L[ℝ] G) |
| 98 | (u : CK (E := E) k) (v : CK (E := F) k) : bilinear k A u v = postBilinear A u v := rfl |
| 99 | |
| 100 | /-- Multiplication by an actual matrix-valued coefficient on `C^k`. -/ |
| 101 | def coefficientOperator (k : ℕ) (B : ℝ → E →L[ℝ] F) (hB : ContDiffOn ℝ k B I) : |
| 102 | CK (E := E) k →L[ℝ] CK (E := F) k := |
| 103 | bilinear k (ContinuousLinearMap.apply ℝ F).flip (ofContDiffOn B hB) |
| 104 | |
| 105 | @[simp] theorem coefficientOperator_value (k : ℕ) (B : ℝ → E →L[ℝ] F) |
| 106 | (hB : ContDiffOn ℝ k B I) (f : CK (E := E) k) (x : I) : |
| 107 | value k (coefficientOperator k B hB f) x = B x (value k f x) := by |
| 108 | rw [coefficientOperator, bilinear_apply, postBilinear_value, ofContDiffOn_value] |
| 109 | rfl |
| 110 | |
| 111 | /-- The actual bilinear coefficient family acts on the same `C^k` space. -/ |
| 112 | def quadraticOperator (k : ℕ) (A : ℝ → E →L[ℝ] F →L[ℝ] G) |
| 113 | (hA : ContDiffOn ℝ k A I) : CK (E := E) k →L[ℝ] CK (E := F) k →L[ℝ] CK (E := G) k := |
| 114 | (bilinear k (ContinuousLinearMap.apply ℝ G).flip).comp (coefficientOperator k A hA) |
| 115 | |
| 116 | @[simp] theorem quadraticOperator_value (k : ℕ) (A : ℝ → E →L[ℝ] F →L[ℝ] G) |
| 117 | (hA : ContDiffOn ℝ k A I) (f : CK (E := E) k) (g : CK (E := F) k) (x : I) : |
| 118 | value k (quadraticOperator k A hA f g) x = A x (value k f x) (value k g x) := by |
| 119 | change value k (bilinear k (ContinuousLinearMap.apply ℝ G).flip (coefficientOperator k A hA f) g) x = _ |
| 120 | rw [bilinear_apply, postBilinear_value, coefficientOperator_value] |
| 121 | rfl |
| 122 | |
| 123 | theorem inverse_coefficient_smooth {k : ℕ} (B : ℝ → E →L[ℝ] E) |
| 124 | (hB : ContDiffOn ℝ k B I) (hinv : ∀ x ∈ I, (B x).IsInvertible) : |
| 125 | ContDiffOn ℝ k (fun x => (B x).inverse) I := by |
| 126 | intro x hx |
| 127 | exact ((hinv x hx).contDiffAt_map_inverse (𝕜 := ℝ) (n := k)).comp_contDiffWithinAt x (hB x hx) |
| 128 | |
| 129 | /-- An invertible matrix family gives the genuine multiplication equivalence on `C^k`. -/ |
| 130 | def coefficientEquiv (k : ℕ) (B : ℝ → E →L[ℝ] E) |
| 131 | (hB : ContDiffOn ℝ k B I) (hinv : ∀ x ∈ I, (B x).IsInvertible) : |
| 132 | CK (E := E) k ≃L[ℝ] CK (E := E) k := by |
| 133 | let hBi := inverse_coefficient_smooth B hB hinv |
| 134 | refine ContinuousLinearEquiv.equivOfInverse (coefficientOperator k B hB) |
| 135 | (coefficientOperator k (fun x => (B x).inverse) hBi) ?_ ?_ |
| 136 | · intro f |
| 137 | apply value_injective k |
| 138 | apply ContinuousMap.ext |
| 139 | intro x |
| 140 | rw [coefficientOperator_value, coefficientOperator_value] |
| 141 | obtain ⟨e,he⟩ := hinv x x.property |
| 142 | rw [← he, ContinuousLinearMap.inverse_equiv] |
| 143 | exact e.symm_apply_apply _ |
| 144 | · intro f |
| 145 | apply value_injective k |
| 146 | apply ContinuousMap.ext |
| 147 | intro x |
| 148 | rw [coefficientOperator_value, coefficientOperator_value] |
| 149 | obtain ⟨e,he⟩ := hinv x x.property |
| 150 | rw [← he, ContinuousLinearMap.inverse_equiv] |
| 151 | exact e.apply_symm_apply _ |
| 152 | |
| 153 | @[simp] theorem coefficientEquiv_apply (k : ℕ) (B : ℝ → E →L[ℝ] E) |
| 154 | (hB : ContDiffOn ℝ k B I) (hinv : ∀ x ∈ I, (B x).IsInvertible) (f : CK (E := E) k) : |
| 155 | coefficientEquiv k B hB hinv f = coefficientOperator k B hB f := rfl |
| 156 | |
| 157 | @[simp] theorem coefficientEquiv_symm_apply (k : ℕ) (B : ℝ → E →L[ℝ] E) |
| 158 | (hB : ContDiffOn ℝ k B I) (hinv : ∀ x ∈ I, (B x).IsInvertible) (f : CK (E := E) k) : |
| 159 | (coefficientEquiv k B hB hinv).symm f = |
| 160 | coefficientOperator k (fun x => (B x).inverse) (inverse_coefficient_smooth B hB hinv) f := rfl |
| 161 | |
| 162 | @[simp] theorem lower_coefficientOperator {k l : ℕ} (h : l ≤ k) |
| 163 | (B : ℝ → E →L[ℝ] F) (hB : ContDiffOn ℝ k B I) (f : CK (E := E) k) : |
| 164 | lower h (coefficientOperator k B hB f) = |
| 165 | coefficientOperator l B (hB.of_le (by exact_mod_cast h)) (lower h f) := by |
| 166 | apply value_injective l |
| 167 | apply ContinuousMap.ext |
| 168 | intro x |
| 169 | simp only [lower_apply, lowerValue_value, coefficientOperator_value] |
| 170 | |
| 171 | @[simp] theorem lower_quadraticOperator {k l : ℕ} (h : l ≤ k) |
| 172 | (A : ℝ → E →L[ℝ] F →L[ℝ] G) (hA : ContDiffOn ℝ k A I) |
| 173 | (f : CK (E := E) k) (g : CK (E := F) k) : |
| 174 | lower h (quadraticOperator k A hA f g) = |
| 175 | quadraticOperator l A (hA.of_le (by exact_mod_cast h)) (lower h f) (lower h g) := by |
| 176 | apply value_injective l |
| 177 | apply ContinuousMap.ext |
| 178 | intro x |
| 179 | simp only [lower_apply, lowerValue_value, quadraticOperator_value] |
| 180 | |
| 181 | /-- Constant functions identify the order-zero operator norm with the pointwise one. -/ |
| 182 | def constant (k : ℕ) (a : E) : CK (E := E) k := |
| 183 | ofContDiffOn (fun _ => a) contDiffOn_const |
| 184 | |
| 185 | @[simp] theorem constant_value (k : ℕ) (a : E) (x : I) : value k (constant k a) x = a := rfl |
| 186 | |
| 187 | theorem norm_constant_zero (a : E) : ‖constant 0 a‖ = ‖a‖ := by |
| 188 | apply le_antisymm |
| 189 | · apply (norm_ofContDiffOn_le_iff _ _ (norm_nonneg a)).mpr |
| 190 | intro n hn x |
| 191 | have hn0 : n = 0 := Nat.eq_zero_of_le_zero hn |
| 192 | subst n |
| 193 | exact le_rfl |
| 194 | · have he := ((value 0 (constant 0 a)).norm_coe_le_norm leftEndpoint).trans |
| 195 | (norm_value_le (constant 0 a)) |
| 196 | exact he |
| 197 | |
| 198 | theorem norm_coefficient_le (B : ℝ → E →L[ℝ] F) (hB : ContDiffOn ℝ 0 B I) (x : I) : |
| 199 | ‖B x‖ ≤ ‖coefficientOperator (E := E) (F := F) 0 B hB‖ := by |
| 200 | apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) |
| 201 | intro a |
| 202 | have he := ((value 0 (coefficientOperator 0 B hB (constant 0 a))).norm_coe_le_norm x).trans |
| 203 | (norm_value_le _) |
| 204 | rw [coefficientOperator_value 0 B hB (constant 0 a) x, constant_value] at he |
| 205 | exact he.trans (by simpa only [norm_constant_zero] using |
| 206 | (coefficientOperator 0 B hB).le_opNorm (constant 0 a)) |
| 207 | |
| 208 | theorem norm_quadratic_coefficient_le (A : ℝ → E →L[ℝ] F →L[ℝ] G) |
| 209 | (hA : ContDiffOn ℝ 0 A I) (x : I) : |
| 210 | ‖A x‖ ≤ ‖quadraticOperator (E := E) (F := F) (G := G) 0 A hA‖ := by |
| 211 | apply ContinuousLinearMap.opNorm_le_bound (A x) (norm_nonneg (quadraticOperator 0 A hA)) |
| 212 | intro a |
| 213 | apply ContinuousLinearMap.opNorm_le_bound (A x a) (by positivity) |
| 214 | intro b |
| 215 | have he := ((value 0 (quadraticOperator 0 A hA (constant 0 a) (constant 0 b))).norm_coe_le_norm x).trans |
| 216 | (norm_value_le _) |
| 217 | rw [quadraticOperator_value 0 A hA (constant 0 a) (constant 0 b) x, |
| 218 | constant_value, constant_value] at he |
| 219 | exact he.trans (by simpa only [norm_constant_zero] using |
| 220 | (quadraticOperator 0 A hA).le_opNorm₂ (constant 0 a) (constant 0 b)) |
| 221 | |
| 222 | theorem norm_coefficientOperator_zero_le (B : ℝ → E →L[ℝ] F) |
| 223 | (hB : ContDiffOn ℝ 0 B I) {M : ℝ} (hM : 0 ≤ M) (hbound : ∀ x ∈ I, ‖B x‖ ≤ M) : |
| 224 | ‖coefficientOperator 0 B hB‖ ≤ M := by |
| 225 | apply ContinuousLinearMap.opNorm_le_bound (coefficientOperator 0 B hB) hM |
| 226 | intro f |
| 227 | rw [norm_zero_eq_value] |
| 228 | apply (ContinuousMap.norm_le _ (mul_nonneg hM (norm_nonneg _))).mpr |
| 229 | intro x |
| 230 | rw [coefficientOperator_value 0 B hB f x] |
| 231 | exact ((B x).le_opNorm (value 0 f x)).trans |
| 232 | (mul_le_mul (hbound x x.property) |
| 233 | (((value 0 f).norm_coe_le_norm x).trans (norm_value_le f)) (norm_nonneg _) hM) |
| 234 | |
| 235 | theorem norm_quadraticOperator_zero_le (A : ℝ → E →L[ℝ] F →L[ℝ] G) |
| 236 | (hA : ContDiffOn ℝ 0 A I) {M : ℝ} (hM : 0 ≤ M) (hbound : ∀ x ∈ I, ‖A x‖ ≤ M) : |
| 237 | ‖quadraticOperator 0 A hA‖ ≤ M := by |
| 238 | apply ContinuousLinearMap.opNorm_le_bound (quadraticOperator 0 A hA) hM |
| 239 | intro f |
| 240 | apply ContinuousLinearMap.opNorm_le_bound (quadraticOperator 0 A hA f) |
| 241 | (mul_nonneg hM (norm_nonneg _)) |
| 242 | intro g |
| 243 | rw [norm_zero_eq_value] |
| 244 | apply (ContinuousMap.norm_le _ (by positivity)).mpr |
| 245 | intro x |
| 246 | rw [quadraticOperator_value 0 A hA f g x] |
| 247 | exact ((A x).le_opNorm₂ (value 0 f x) (value 0 g x)).trans |
| 248 | (mul_le_mul (mul_le_mul (hbound x x.property) |
| 249 | (((value 0 f).norm_coe_le_norm x).trans (norm_value_le f)) (norm_nonneg _) hM) |
| 250 | (((value 0 g).norm_coe_le_norm x).trans (norm_value_le g)) (norm_nonneg _) |
| 251 | (mul_nonneg hM (norm_nonneg _))) |
| 252 | |
| 253 | /-- The order-zero multiplication norm is exactly the supremum of the |
| 254 | pointwise matrix norms, as in `outgoing:steering`. -/ |
| 255 | theorem norm_coefficientOperator_zero (B : ℝ → E →L[ℝ] F) (hB : ContDiffOn ℝ 0 B I) : |
| 256 | ‖coefficientOperator 0 B hB‖ = ⨆ x : I, ‖B x‖ := by |
| 257 | let b : Path (E →L[ℝ] F) := value 0 (ofContDiffOn B hB) |
| 258 | have he : ‖b‖ = ⨆ x : I, ‖B x‖ := b.norm_eq_iSup_norm |
| 259 | rw [← he] |
| 260 | apply le_antisymm |
| 261 | · apply norm_coefficientOperator_zero_le B hB (norm_nonneg b) |
| 262 | intro x hx |
| 263 | exact b.norm_coe_le_norm ⟨x,hx⟩ |
| 264 | · apply (ContinuousMap.norm_le b (norm_nonneg _)).mpr |
| 265 | intro x |
| 266 | exact norm_coefficient_le B hB x |
| 267 | |
| 268 | /-- The order-zero bilinear norm is exactly its pointwise supremum. -/ |
| 269 | theorem norm_quadraticOperator_zero (A : ℝ → E →L[ℝ] F →L[ℝ] G) (hA : ContDiffOn ℝ 0 A I) : |
| 270 | ‖quadraticOperator 0 A hA‖ = ⨆ x : I, ‖A x‖ := by |
| 271 | let a : Path (E →L[ℝ] F →L[ℝ] G) := value 0 (ofContDiffOn A hA) |
| 272 | have he : ‖a‖ = ⨆ x : I, ‖A x‖ := a.norm_eq_iSup_norm |
| 273 | rw [← he] |
| 274 | apply le_antisymm |
| 275 | · apply norm_quadraticOperator_zero_le A hA (norm_nonneg a) |
| 276 | intro x hx |
| 277 | exact a.norm_coe_le_norm ⟨x,hx⟩ |
| 278 | · apply (ContinuousMap.norm_le a (norm_nonneg (quadraticOperator 0 A hA))).mpr |
| 279 | intro x |
| 280 | exact norm_quadratic_coefficient_le A hA x |
| 281 | |
| 282 | end NavierStokes.ClosedIntervalCk |