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 | |
| 3 | /-! |
| 4 | # Local Cartesian residual formulas for axisymmetric profiles |
| 5 | |
| 6 | Only regularity at the evaluated profile point is required. The second |
| 7 | derivative formulas use equality of germs of first derivatives, so they do |
| 8 | not impose any condition on an unrelated profile point such as the axis. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | namespace NavierStokes.LocalAxisymmetricResidual |
| 14 | |
| 15 | open ProblemStatement Filter |
| 16 | open AxisymmetricFields (Profile ProfilePoint profilePoint partialS partialZ radialEnergy |
| 17 | projection hasFDerivAt_profile_composition profileDerivative_apply contDiff_profilePoint_slice) |
| 18 | open AxisymmetricResidual |
| 19 | open scoped BigOperators ContDiff Topology |
| 20 | |
| 21 | theorem contDiffAt_direction {g : Space → ℝ} {x : Space} {m n : WithTop ℕ∞} |
| 22 | (hg : ContDiffAt ℝ n g x) (hmn : m + 1 ≤ n) (i : Fin 3) : |
| 23 | ContDiffAt ℝ m (fun y => direction g i y) x := |
| 24 | (hg.fderiv_right hmn).clm_apply contDiffAt_const |
| 25 | |
| 26 | theorem direction_congr {a b : Space → ℝ} {x : Space} |
| 27 | (h : a =ᶠ[𝓝 x] b) (i : Fin 3) : direction a i x = direction b i x := by |
| 28 | unfold direction |
| 29 | rw [h.fderiv_eq] |
| 30 | |
| 31 | theorem direction_add {a b : Space → ℝ} {x : Space} |
| 32 | (ha : DifferentiableAt ℝ a x) (hb : DifferentiableAt ℝ b x) (i : Fin 3) : |
| 33 | direction (fun y => a y + b y) i x = direction a i x + direction b i x := by |
| 34 | unfold direction |
| 35 | rw [fderiv_fun_add ha hb] |
| 36 | rfl |
| 37 | |
| 38 | theorem direction_sub {a b : Space → ℝ} {x : Space} |
| 39 | (ha : DifferentiableAt ℝ a x) (hb : DifferentiableAt ℝ b x) (i : Fin 3) : |
| 40 | direction (fun y => a y - b y) i x = direction a i x - direction b i x := by |
| 41 | unfold direction |
| 42 | rw [fderiv_fun_sub ha hb] |
| 43 | rfl |
| 44 | |
| 45 | theorem scalarLaplacian_add {a b : Space → ℝ} {x : Space} |
| 46 | (ha : ContDiffAt ℝ 2 a x) (hb : ContDiffAt ℝ 2 b x) : |
| 47 | scalarLaplacian (fun y => a y + b y) x = scalarLaplacian a x + scalarLaplacian b x := by |
| 48 | unfold scalarLaplacian |
| 49 | rw [← Finset.sum_add_distrib] |
| 50 | apply Finset.sum_congr rfl |
| 51 | intro i _ |
| 52 | have heq : (fun y => direction (fun z => a z + b z) i y) =ᶠ[𝓝 x] |
| 53 | (fun y => direction a i y + direction b i y) := by |
| 54 | filter_upwards [ha.eventually (by norm_num), hb.eventually (by norm_num)] with y hay hby |
| 55 | exact direction_add (hay.differentiableAt (by norm_num)) |
| 56 | (hby.differentiableAt (by norm_num)) i |
| 57 | rw [direction_congr heq i] |
| 58 | exact direction_add |
| 59 | ((contDiffAt_direction ha (m := 1) (by norm_num) i).differentiableAt (by norm_num)) |
| 60 | ((contDiffAt_direction hb (m := 1) (by norm_num) i).differentiableAt (by norm_num)) i |
| 61 | |
| 62 | theorem scalarLaplacian_sub {a b : Space → ℝ} {x : Space} |
| 63 | (ha : ContDiffAt ℝ 2 a x) (hb : ContDiffAt ℝ 2 b x) : |
| 64 | scalarLaplacian (fun y => a y - b y) x = scalarLaplacian a x - scalarLaplacian b x := by |
| 65 | unfold scalarLaplacian |
| 66 | rw [← Finset.sum_sub_distrib] |
| 67 | apply Finset.sum_congr rfl |
| 68 | intro i _ |
| 69 | have heq : (fun y => direction (fun z => a z - b z) i y) =ᶠ[𝓝 x] |
| 70 | (fun y => direction a i y - direction b i y) := by |
| 71 | filter_upwards [ha.eventually (by norm_num), hb.eventually (by norm_num)] with y hay hby |
| 72 | exact direction_sub (hay.differentiableAt (by norm_num)) |
| 73 | (hby.differentiableAt (by norm_num)) i |
| 74 | rw [direction_congr heq i] |
| 75 | exact direction_sub |
| 76 | ((contDiffAt_direction ha (m := 1) (by norm_num) i).differentiableAt (by norm_num)) |
| 77 | ((contDiffAt_direction hb (m := 1) (by norm_num) i).differentiableAt (by norm_num)) i |
| 78 | |
| 79 | theorem direction_coord_mul {g : Space → ℝ} {x : Space} |
| 80 | (hg : DifferentiableAt ℝ g x) (i j : Fin 3) : |
| 81 | direction (fun y => y i * g y) j x = |
| 82 | (coordinateVector j) i * g x + x i * direction g j x := by |
| 83 | unfold direction |
| 84 | change (fderiv ℝ (fun y => projection i y * g y) x) (coordinateVector j) = _ |
| 85 | rw [fderiv_fun_mul (projection i).differentiableAt hg] |
| 86 | simp |
| 87 | ring |
| 88 | |
| 89 | theorem second_direction_coord_mul {g : Space → ℝ} {x : Space} |
| 90 | (hg : ContDiffAt ℝ 2 g x) (i j : Fin 3) : |
| 91 | direction (fun y => direction (fun z => z i * g z) j y) j x = |
| 92 | 2 * (coordinateVector j) i * direction g j x + |
| 93 | x i * direction (fun y => direction g j y) j x := by |
| 94 | have hd := hg.differentiableAt (by norm_num) |
| 95 | have hdg := (contDiffAt_direction hg (m := 1) (by norm_num) j).differentiableAt (by norm_num) |
| 96 | have heq : (fun y => direction (fun z => z i * g z) j y) =ᶠ[𝓝 x] |
| 97 | (fun y => (coordinateVector j) i * g y + y i * direction g j y) := by |
| 98 | filter_upwards [hg.eventually (by norm_num)] with y hy |
| 99 | exact direction_coord_mul (hy.differentiableAt (by norm_num)) i j |
| 100 | rw [direction_congr heq j] |
| 101 | change (fderiv ℝ (fun y => (coordinateVector j) i * g y + |
| 102 | projection i y * direction g j y) x) (coordinateVector j) = _ |
| 103 | rw [fderiv_fun_add (hd.const_mul ((coordinateVector j) i)) |
| 104 | ((projection i).differentiableAt.fun_mul hdg)] |
| 105 | rw [fderiv_const_mul hd, fderiv_fun_mul (projection i).differentiableAt hdg] |
| 106 | simp [direction] |
| 107 | ring |
| 108 | |
| 109 | theorem scalarLaplacian_coord_mul {g : Space → ℝ} {x : Space} |
| 110 | (hg : ContDiffAt ℝ 2 g x) (i : Fin 3) : |
| 111 | scalarLaplacian (fun y => y i * g y) x = |
| 112 | x i * scalarLaplacian g x + 2 * direction g i x := by |
| 113 | unfold scalarLaplacian |
| 114 | simp_rw [second_direction_coord_mul hg] |
| 115 | fin_cases i <;> simp [Fin.sum_univ_three, coordinateVector] <;> ring |
| 116 | |
| 117 | theorem vectorLaplacian_pack {a b c : Space → ℝ} {x : Space} |
| 118 | (ha : ContDiffAt ℝ 2 a x) (hb : ContDiffAt ℝ 2 b x) (hc : ContDiffAt ℝ 2 c x) : |
| 119 | vectorLaplacian (fun y => pack (a y) (b y) (c y)) x = |
| 120 | pack (scalarLaplacian a x) (scalarLaplacian b x) (scalarLaplacian c x) := by |
| 121 | have hterm (i : Fin 3) : |
| 122 | fderiv ℝ (fun y => fderiv ℝ (fun z => pack (a z) (b z) (c z)) y |
| 123 | (coordinateVector i)) x (coordinateVector i) = |
| 124 | pack (direction (fun y => direction a i y) i x) |
| 125 | (direction (fun y => direction b i y) i x) |
| 126 | (direction (fun y => direction c i y) i x) := by |
| 127 | have heq : (fun y => fderiv ℝ (fun z => pack (a z) (b z) (c z)) y |
| 128 | (coordinateVector i)) =ᶠ[𝓝 x] |
| 129 | (fun y => pack (direction a i y) (direction b i y) (direction c i y)) := by |
| 130 | filter_upwards [ha.eventually (by norm_num), hb.eventually (by norm_num), |
| 131 | hc.eventually (by norm_num)] with y hay hby hcy |
| 132 | exact fderiv_pack_apply (hay.differentiableAt (by norm_num)) |
| 133 | (hby.differentiableAt (by norm_num)) (hcy.differentiableAt (by norm_num)) |
| 134 | (coordinateVector i) |
| 135 | rw [heq.fderiv_eq] |
| 136 | exact fderiv_pack_apply |
| 137 | ((contDiffAt_direction ha (m := 1) (by norm_num) i).differentiableAt (by norm_num)) |
| 138 | ((contDiffAt_direction hb (m := 1) (by norm_num) i).differentiableAt (by norm_num)) |
| 139 | ((contDiffAt_direction hc (m := 1) (by norm_num) i).differentiableAt (by norm_num)) |
| 140 | (coordinateVector i) |
| 141 | unfold vectorLaplacian |
| 142 | simp_rw [hterm] |
| 143 | simp only [scalarLaplacian, direction, pack, Finset.sum_add_distrib, ← Finset.sum_smul] |
| 144 | |
| 145 | theorem contDiffAt_lift {G : Profile} {t : ℝ} {x : Space} {n : WithTop ℕ∞} |
| 146 | (hG : ContDiffAt ℝ n G (profilePoint t x)) : ContDiffAt ℝ n (lift G t) x := |
| 147 | hG.comp x (contDiff_profilePoint_slice t).contDiffAt |
| 148 | |
| 149 | theorem fderiv_lift_apply {G : Profile} {t : ℝ} {x : Space} |
| 150 | (hG : DifferentiableAt ℝ G (profilePoint t x)) (v : Space) : |
| 151 | fderiv ℝ (lift G t) x v = |
| 152 | (x 0 * v 0 + x 1 * v 1) * partialS G (profilePoint t x) + |
| 153 | v 2 * partialZ G (profilePoint t x) := by |
| 154 | change (fderiv ℝ (fun y => G (profilePoint t y)) x) v = _ |
| 155 | rw [(hasFDerivAt_profile_composition G t x hG).fderiv] |
| 156 | exact profileDerivative_apply G t x v |
| 157 | |
| 158 | theorem direction_lift_zero {G : Profile} {t : ℝ} {x : Space} |
| 159 | (hG : DifferentiableAt ℝ G (profilePoint t x)) : |
| 160 | direction (lift G t) 0 x = x 0 * lift (partialS G) t x := by |
| 161 | unfold direction |
| 162 | rw [fderiv_lift_apply hG] |
| 163 | simp [coordinateVector, lift] |
| 164 | |
| 165 | theorem direction_lift_one {G : Profile} {t : ℝ} {x : Space} |
| 166 | (hG : DifferentiableAt ℝ G (profilePoint t x)) : |
| 167 | direction (lift G t) 1 x = x 1 * lift (partialS G) t x := by |
| 168 | unfold direction |
| 169 | rw [fderiv_lift_apply hG] |
| 170 | simp [coordinateVector, lift] |
| 171 | |
| 172 | theorem direction_lift_two {G : Profile} {t : ℝ} {x : Space} |
| 173 | (hG : DifferentiableAt ℝ G (profilePoint t x)) : |
| 174 | direction (lift G t) 2 x = lift (partialZ G) t x := by |
| 175 | unfold direction |
| 176 | rw [fderiv_lift_apply hG] |
| 177 | simp [coordinateVector, lift] |
| 178 | |
| 179 | theorem scalarLaplacian_lift {G : Profile} {t : ℝ} {x : Space} |
| 180 | (hG : ContDiffAt ℝ 2 G (profilePoint t x)) : |
| 181 | scalarLaplacian (lift G t) x = laplaceScalar G (profilePoint t x) := by |
| 182 | have hs : DifferentiableAt ℝ (partialS G) (profilePoint t x) := |
| 183 | (((hG.fderiv_right (m := 1) (by norm_num)).clm_apply contDiffAt_const).differentiableAt (by norm_num)) |
| 184 | have hz : DifferentiableAt ℝ (partialZ G) (profilePoint t x) := |
| 185 | (((hG.fderiv_right (m := 1) (by norm_num)).clm_apply contDiffAt_const).differentiableAt (by norm_num)) |
| 186 | have hls : DifferentiableAt ℝ (lift (partialS G) t) x := |
| 187 | (hasFDerivAt_profile_composition (partialS G) t x hs).differentiableAt |
| 188 | have hnear : ∀ᶠ y in 𝓝 x, ContDiffAt ℝ 2 G (profilePoint t y) := |
| 189 | (contDiff_profilePoint_slice t (n := 0)).continuous.continuousAt |
| 190 | (hG.eventually (by norm_num)) |
| 191 | have he0 : (fun y => direction (lift G t) 0 y) =ᶠ[𝓝 x] |
| 192 | (fun y => y 0 * lift (partialS G) t y) := by |
| 193 | filter_upwards [hnear] with y hy |
| 194 | exact direction_lift_zero (hy.differentiableAt (by norm_num)) |
| 195 | have he1 : (fun y => direction (lift G t) 1 y) =ᶠ[𝓝 x] |
| 196 | (fun y => y 1 * lift (partialS G) t y) := by |
| 197 | filter_upwards [hnear] with y hy |
| 198 | exact direction_lift_one (hy.differentiableAt (by norm_num)) |
| 199 | have he2 : (fun y => direction (lift G t) 2 y) =ᶠ[𝓝 x] lift (partialZ G) t := by |
| 200 | filter_upwards [hnear] with y hy |
| 201 | exact direction_lift_two (hy.differentiableAt (by norm_num)) |
| 202 | unfold scalarLaplacian |
| 203 | rw [Fin.sum_univ_three, direction_congr he0 0, direction_congr he1 1, direction_congr he2 2] |
| 204 | rw [direction_coord_mul hls, direction_coord_mul hls] |
| 205 | rw [direction_lift_zero hs, direction_lift_one hs, direction_lift_two hz] |
| 206 | simp [coordinateVector, lift, laplaceScalar, profilePoint, radialEnergy] |
| 207 | ring |
| 208 | |
| 209 | theorem scalarLaplacian_weighted_zero {G : Profile} {t : ℝ} {x : Space} |
| 210 | (hG : ContDiffAt ℝ 2 G (profilePoint t x)) : |
| 211 | scalarLaplacian (fun y => y 0 * lift G t y) x = |
| 212 | x 0 * laplaceWeighted G (profilePoint t x) := by |
| 213 | rw [scalarLaplacian_coord_mul (contDiffAt_lift hG), scalarLaplacian_lift hG, |
| 214 | direction_lift_zero (hG.differentiableAt (by norm_num))] |
| 215 | unfold lift laplaceScalar laplaceWeighted |
| 216 | ring |
| 217 | |
| 218 | theorem scalarLaplacian_weighted_one {G : Profile} {t : ℝ} {x : Space} |
| 219 | (hG : ContDiffAt ℝ 2 G (profilePoint t x)) : |
| 220 | scalarLaplacian (fun y => y 1 * lift G t y) x = |
| 221 | x 1 * laplaceWeighted G (profilePoint t x) := by |
| 222 | rw [scalarLaplacian_coord_mul (contDiffAt_lift hG), scalarLaplacian_lift hG, |
| 223 | direction_lift_one (hG.differentiableAt (by norm_num))] |
| 224 | unfold lift laplaceScalar laplaceWeighted |
| 225 | ring |
| 226 | |
| 227 | /-- The spatial Jacobian uses derivatives only at the evaluated profile point. -/ |
| 228 | theorem hasFDerivAt_velocity {B F U : Profile} {t : ℝ} {x : Space} |
| 229 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 230 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 231 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 232 | HasFDerivAt (fun y => velocity B F U (t, y)) (velocityJacobian B F U t x) x := by |
| 233 | have hb := hasFDerivAt_profile_composition B t x hB |
| 234 | have hf := hasFDerivAt_profile_composition F t x hF |
| 235 | have hu := hasFDerivAt_profile_composition U t x hU |
| 236 | exact hasFDerivAt_pack |
| 237 | ((((projection 0).hasFDerivAt.mul hb).add ((projection 1).hasFDerivAt.mul hf)).neg) |
| 238 | (((projection 0).hasFDerivAt.mul hf).sub ((projection 1).hasFDerivAt.mul hb)) hu |
| 239 | |
| 240 | theorem advection_velocity {B F U : Profile} {t : ℝ} {x : Space} |
| 241 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 242 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 243 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 244 | advection (velocity B F U) t x = |
| 245 | pack (x 0 * advectionRadial B F U (profilePoint t x) + |
| 246 | x 1 * advectionAngular B F U (profilePoint t x)) |
| 247 | (x 1 * advectionRadial B F U (profilePoint t x) - |
| 248 | x 0 * advectionAngular B F U (profilePoint t x)) |
| 249 | (advectionAxial B U (profilePoint t x)) := by |
| 250 | change (fderiv ℝ (fun y => velocity B F U (t, y)) x) (velocity B F U (t, x)) = _ |
| 251 | rw [(hasFDerivAt_velocity hB hF hU).fderiv] |
| 252 | simp only [velocityJacobian, packDerivative_apply] |
| 253 | ext i |
| 254 | fin_cases i <;> simp [profileDerivative_apply, velocity, componentX, componentY, lift, |
| 255 | advectionRadial, advectionAngular, advectionAxial, profilePoint, radialEnergy, |
| 256 | pack, coordinateVector] <;> ring |
| 257 | |
| 258 | theorem divergence_velocity {B F U : Profile} {t : ℝ} {x : Space} |
| 259 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 260 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 261 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 262 | spatialDivergence (velocity B F U) t x = |
| 263 | partialZ U (profilePoint t x) - 2 * B (profilePoint t x) - |
| 264 | 2 * radialEnergy x * partialS B (profilePoint t x) := by |
| 265 | unfold spatialDivergence spatialDerivative |
| 266 | rw [(hasFDerivAt_velocity hB hF hU).fderiv, Fin.sum_univ_three] |
| 267 | simp [velocityJacobian, packDerivative_apply, profileDerivative_apply, |
| 268 | coordinateVector, profilePoint, radialEnergy, lift] |
| 269 | ring |
| 270 | |
| 271 | /-- The physical vector Laplacian is local in all three profiles. In |
| 272 | particular this applies to a radial quotient at any point where it is C². -/ |
| 273 | theorem spatialLaplacian_velocity {B F U : Profile} {t : ℝ} {x : Space} |
| 274 | (hB : ContDiffAt ℝ 2 B (profilePoint t x)) |
| 275 | (hF : ContDiffAt ℝ 2 F (profilePoint t x)) |
| 276 | (hU : ContDiffAt ℝ 2 U (profilePoint t x)) : |
| 277 | spatialLaplacian (velocity B F U) t x = |
| 278 | pack (-x 0 * laplaceWeighted B (profilePoint t x) - |
| 279 | x 1 * laplaceWeighted F (profilePoint t x)) |
| 280 | (-x 1 * laplaceWeighted B (profilePoint t x) + |
| 281 | x 0 * laplaceWeighted F (profilePoint t x)) |
| 282 | (laplaceScalar U (profilePoint t x)) := by |
| 283 | have hb := contDiffAt_lift hB |
| 284 | have hf := contDiffAt_lift hF |
| 285 | have hu := contDiffAt_lift hU |
| 286 | have h0b : ContDiffAt ℝ 2 (fun y : Space => y 0 * lift B t y) x := |
| 287 | (projection 0).contDiff.contDiffAt.mul hb |
| 288 | have h1b : ContDiffAt ℝ 2 (fun y : Space => y 1 * lift B t y) x := |
| 289 | (projection 1).contDiff.contDiffAt.mul hb |
| 290 | have h0f : ContDiffAt ℝ 2 (fun y : Space => y 0 * lift F t y) x := |
| 291 | (projection 0).contDiff.contDiffAt.mul hf |
| 292 | have h1f : ContDiffAt ℝ 2 (fun y : Space => y 1 * lift F t y) x := |
| 293 | (projection 1).contDiff.contDiffAt.mul hf |
| 294 | have hx : ContDiffAt ℝ 2 (componentX B F t) x := (h0b.add h1f).neg |
| 295 | have hy : ContDiffAt ℝ 2 (componentY B F t) x := h0f.sub h1b |
| 296 | change vectorLaplacian (fun y => pack (componentX B F t y) (componentY B F t y) |
| 297 | (lift U t y)) x = _ |
| 298 | rw [vectorLaplacian_pack hx hy hu] |
| 299 | unfold componentX componentY |
| 300 | rw [scalarLaplacian_neg, scalarLaplacian_add h0b h1f, scalarLaplacian_sub h0f h1b] |
| 301 | rw [scalarLaplacian_weighted_zero hB, scalarLaplacian_weighted_one hF, |
| 302 | scalarLaplacian_weighted_zero hF, scalarLaplacian_weighted_one hB, scalarLaplacian_lift hU] |
| 303 | ext i |
| 304 | fin_cases i <;> simp [pack, coordinateVector] <;> ring |
| 305 | |
| 306 | theorem pressureGradient_pressure {P : Profile} {t : ℝ} {x : Space} |
| 307 | (hP : DifferentiableAt ℝ P (profilePoint t x)) : |
| 308 | pressureGradient (pressure P) t x = |
| 309 | pack (x 0 * partialS P (profilePoint t x)) (x 1 * partialS P (profilePoint t x)) |
| 310 | (partialZ P (profilePoint t x)) := by |
| 311 | change (∑ i : Fin 3, fderiv ℝ (lift P t) x (coordinateVector i) • coordinateVector i) = _ |
| 312 | simp_rw [fderiv_lift_apply hP] |
| 313 | rw [Fin.sum_univ_three] |
| 314 | simp [pack, coordinateVector] |
| 315 | |
| 316 | /-- Joint profile differentiability provides the time derivative at the |
| 317 | point, with no hypothesis about any other point of the spatial slice. -/ |
| 318 | theorem hasFDerivAt_time_lift {G : Profile} {t : ℝ} {x : Space} |
| 319 | (hG : DifferentiableAt ℝ G (profilePoint t x)) : |
| 320 | HasFDerivAt (fun s => lift G s x) (timeProfileDerivative G (profilePoint t x)) t := by |
| 321 | have hp : HasFDerivAt (fun s => profilePoint s x) timeProfileJacobian t := |
| 322 | (hasFDerivAt_id t).prodMk (hasFDerivAt_const (radialEnergy x, x 2) t) |
| 323 | exact hG.hasFDerivAt.comp t hp |
| 324 | |
| 325 | theorem temporalDerivative_velocity {B F U : Profile} {t : ℝ} {x : Space} |
| 326 | (hB : DifferentiableAt ℝ B (profilePoint t x)) |
| 327 | (hF : DifferentiableAt ℝ F (profilePoint t x)) |
| 328 | (hU : DifferentiableAt ℝ U (profilePoint t x)) : |
| 329 | temporalDerivative (velocity B F U) t x = |
| 330 | pack (-x 0 * partialT B (profilePoint t x) - x 1 * partialT F (profilePoint t x)) |
| 331 | (-x 1 * partialT B (profilePoint t x) + x 0 * partialT F (profilePoint t x)) |
| 332 | (partialT U (profilePoint t x)) := by |
| 333 | have hb := hasFDerivAt_time_lift hB |
| 334 | have hf := hasFDerivAt_time_lift hF |
| 335 | have hu := hasFDerivAt_time_lift hU |
| 336 | have hv := hasFDerivAt_pack (((hb.const_mul (x 0)).fun_add (hf.const_mul (x 1))).fun_neg) |
| 337 | ((hf.const_mul (x 0)).fun_sub (hb.const_mul (x 1))) hu |
| 338 | change (fderiv ℝ (fun s => pack (-(x 0 * lift B s x + x 1 * lift F s x)) |
| 339 | (x 0 * lift F s x - x 1 * lift B s x) (lift U s x)) t) 1 = _ |
| 340 | rw [hv.fderiv] |
| 341 | simp |
| 342 | ext i |
| 343 | fin_cases i <;> simp [pack, coordinateVector] <;> ring |
| 344 | |
| 345 | /-- The exact physical residual at viscosity one, from regularity only at |
| 346 | the evaluated joint profile point. No `SliceC2` or `SliceDifferentiable` |
| 347 | hypothesis occurs. This does not assert that a radial quotient is smooth |
| 348 | at a point where its denominator vanishes. -/ |
| 349 | theorem navierStokesResidual_velocity {B F U P : Profile} {t : ℝ} {x : Space} |
| 350 | (hB : ContDiffAt ℝ 2 B (profilePoint t x)) |
| 351 | (hF : ContDiffAt ℝ 2 F (profilePoint t x)) |
| 352 | (hU : ContDiffAt ℝ 2 U (profilePoint t x)) |
| 353 | (hP : DifferentiableAt ℝ P (profilePoint t x)) : |
| 354 | navierStokesResidual (velocity B F U) (pressure P) t x = |
| 355 | pack (x 0 * residualRadial B F U P (profilePoint t x) + |
| 356 | x 1 * residualAngular B F U (profilePoint t x)) |
| 357 | (x 1 * residualRadial B F U P (profilePoint t x) - |
| 358 | x 0 * residualAngular B F U (profilePoint t x)) |
| 359 | (residualAxial B U P (profilePoint t x)) := by |
| 360 | have hb := hB.differentiableAt (by norm_num) |
| 361 | have hf := hF.differentiableAt (by norm_num) |
| 362 | have hu := hU.differentiableAt (by norm_num) |
| 363 | unfold navierStokesResidual |
| 364 | rw [temporalDerivative_velocity hb hf hu, advection_velocity hb hf hu, |
| 365 | spatialLaplacian_velocity hB hF hU, pressureGradient_pressure hP] |
| 366 | ext i |
| 367 | fin_cases i <;> simp [pack, coordinateVector, |
| 368 | residualRadial, residualAngular, residualAxial] <;> ring |
| 369 | |
| 370 | /-- The three local coefficient equations imply the actual Cartesian PDE. -/ |
| 371 | theorem navierStokesResidual_eq_zero {B F U P : Profile} {t : ℝ} {x : Space} |
| 372 | (hB : ContDiffAt ℝ 2 B (profilePoint t x)) |
| 373 | (hF : ContDiffAt ℝ 2 F (profilePoint t x)) |
| 374 | (hU : ContDiffAt ℝ 2 U (profilePoint t x)) |
| 375 | (hP : DifferentiableAt ℝ P (profilePoint t x)) |
| 376 | (hr : residualRadial B F U P (profilePoint t x) = 0) |
| 377 | (ha : residualAngular B F U (profilePoint t x) = 0) |
| 378 | (hz : residualAxial B U P (profilePoint t x) = 0) : |
| 379 | navierStokesResidual (velocity B F U) (pressure P) t x = 0 := by |
| 380 | rw [navierStokesResidual_velocity hB hF hU hP] |
| 381 | simp [hr, ha, hz, pack] |
| 382 | |
| 383 | end NavierStokes.LocalAxisymmetricResidual |