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.CorrectionState |
| 2 | import NavierStokes.IntegratedMeanBalances |
| 3 | import NavierStokes.MeanMomentBounds |
| 4 | import NavierStokes.DefectIncrementBounds |
| 5 | import NavierStokes.SignedStressPrimitive |
| 6 | |
| 7 | /-! |
| 8 | # Actual state moment balances |
| 9 | |
| 10 | Auxiliary torus averaging, radial integration, and the pressure constructor |
| 11 | connect the literal state residual to its actual slow debt derivatives. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | namespace NavierStokes.StateMomentBalances |
| 17 | |
| 18 | open Set Filter MeasureTheory CorrectionState |
| 19 | open scoped BigOperators ContDiff Topology |
| 20 | |
| 21 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 22 | |
| 23 | noncomputable def meanBar (f : ScalarField (Lift S)) : ScalarField (Lift S) := |
| 24 | fun n => MeanMomentBounds.liftedTorusAverage (f n) |
| 25 | |
| 26 | namespace AuxiliaryAverage |
| 27 | |
| 28 | |
| 29 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 30 | |
| 31 | /-- Coordinates ordered to match the two actual interval integrals. -/ |
| 32 | noncomputable def unshuffle : (((ℝ × S) × ℝ) × ℝ) →L[ℝ] Lift S where |
| 33 | toFun x := (x.1.1.1, (x.1.1.2, (x.2, x.1.2))) |
| 34 | map_add' _ _ := rfl |
| 35 | map_smul' _ _ := rfl |
| 36 | cont := continuous_fst.fst.fst.prodMk |
| 37 | (continuous_fst.fst.snd.prodMk (continuous_snd.prodMk continuous_fst.snd)) |
| 38 | |
| 39 | noncomputable def slowProjection : Lift S →L[ℝ] (ℝ × S) where |
| 40 | toFun x := (x.1, x.2.1) |
| 41 | map_add' _ _ := rfl |
| 42 | map_smul' _ _ := rfl |
| 43 | cont := continuous_fst.prodMk continuous_snd.fst |
| 44 | |
| 45 | theorem pullback_derivative {f : Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 46 | (x v : ((ℝ × S) × ℝ) × ℝ) : |
| 47 | fderiv ℝ (f ∘ unshuffle) x v = fderiv ℝ f (unshuffle x) (unshuffle v) := by |
| 48 | rw [((hf.differentiable (by simp) _).hasFDerivAt.comp x unshuffle.hasFDerivAt).fderiv] |
| 49 | rfl |
| 50 | |
| 51 | theorem pullback_periodic {f : Lift S → ℝ} (hp : PressureStream.TorusPeriodicLift f) : |
| 52 | IntegratedMeanBalances.TorusPeriodic (f ∘ unshuffle) := by |
| 53 | constructor |
| 54 | · intro x |
| 55 | simpa [unshuffle, Function.comp_def] using |
| 56 | hp x.1.1.1 x.1.1.2 (x.2, x.1.2) (1, 0) |
| 57 | · intro x |
| 58 | simpa [unshuffle, Function.comp_def] using |
| 59 | hp x.1.1.1 x.1.1.2 (x.2, x.1.2) (0, 1) |
| 60 | |
| 61 | theorem average_slowDerivative {f : Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 62 | (v x : ℝ × S) : |
| 63 | PressureStream.torusAverage (fun y => fderiv ℝ f y (v.1, (v.2, 0))) x = |
| 64 | fderiv ℝ (PressureStream.torusAverage f) x v := by |
| 65 | have hF : ContDiff ℝ ∞ (f ∘ unshuffle) := hf.comp (unshuffle (S := S)).contDiff |
| 66 | have h := IntegratedMeanBalances.torusAverage_fderiv hF x v |
| 67 | have he : IntegratedMeanBalances.slowPartial v (f ∘ unshuffle) = |
| 68 | (fun y => fderiv ℝ f (unshuffle y) (v.1, (v.2, 0))) := by |
| 69 | funext y |
| 70 | exact pullback_derivative hf y ((v, 0), 0) |
| 71 | rw [he] at h |
| 72 | exact h.symm |
| 73 | |
| 74 | theorem average_torusDerivative {f : Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 75 | (hp : PressureStream.TorusPeriodicLift f) (v : PressureStream.Plane) (x : ℝ × S) : |
| 76 | PressureStream.torusAverage (fun y => fderiv ℝ f y (0, (0, v))) x = 0 := by |
| 77 | have hF : ContDiff ℝ ∞ (f ∘ unshuffle) := hf.comp (unshuffle (S := S)).contDiff |
| 78 | have h := IntegratedMeanBalances.torusAverage_torusPartial_zero v hF (pullback_periodic hp) x |
| 79 | have he : IntegratedMeanBalances.torusPartial v (f ∘ unshuffle) = |
| 80 | (fun y => fderiv ℝ f (unshuffle y) (0, (0, v))) := by |
| 81 | funext y |
| 82 | exact pullback_derivative hf y ((0, v.2), v.1) |
| 83 | rw [he] at h |
| 84 | exact h |
| 85 | |
| 86 | omit [NormedSpace ℝ S] in |
| 87 | theorem average_add {f g : Lift S → ℝ} (hf : Continuous f) (hg : Continuous g) |
| 88 | (x : ℝ × S) : |
| 89 | PressureStream.torusAverage (fun y => f y + g y) x = |
| 90 | PressureStream.torusAverage f x + PressureStream.torusAverage g x := by |
| 91 | change FourierAlias.torusMean (fun Y => f (x.1, (x.2, Y)) + g (x.1, (x.2, Y))) = |
| 92 | FourierAlias.torusMean (fun Y => f (x.1, (x.2, Y))) + |
| 93 | FourierAlias.torusMean (fun Y => g (x.1, (x.2, Y))) |
| 94 | exact FourierAlias.torusMean_add |
| 95 | (hf.comp (continuous_const.prodMk (continuous_const.prodMk continuous_id))) |
| 96 | (hg.comp (continuous_const.prodMk (continuous_const.prodMk continuous_id))) |
| 97 | |
| 98 | /-- The actual torus mean commutes with fixed slow derivatives and removes |
| 99 | the periodic directions. This does not assume a commuting inverse. -/ |
| 100 | theorem average_derivative {f : Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 101 | (hp : PressureStream.TorusPeriodicLift f) (v x : Lift S) : |
| 102 | PressureStream.torusAverage (fun y => fderiv ℝ f y v) (x.1, x.2.1) = |
| 103 | fderiv ℝ (MeanMomentBounds.liftedTorusAverage f) x v := by |
| 104 | have hv : v = (v.1, (v.2.1, (0 : PressureStream.Plane))) + (0, (0, v.2.2)) := by simp |
| 105 | have he : (fun y => fderiv ℝ f y v) = |
| 106 | (fun y => fderiv ℝ f y (v.1, (v.2.1, (0 : PressureStream.Plane))) + |
| 107 | fderiv ℝ f y (0, (0, v.2.2))) := by |
| 108 | funext y |
| 109 | conv_lhs => rw [hv, map_add] |
| 110 | rw [he, average_add |
| 111 | ((hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous |
| 112 | ((hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous, |
| 113 | average_slowDerivative hf (v.1, v.2.1) (x.1, x.2.1), |
| 114 | average_torusDerivative hf hp v.2.2 (x.1, x.2.1), add_zero] |
| 115 | have hbar : MeanMomentBounds.liftedTorusAverage f = |
| 116 | PressureStream.torusAverage f ∘ slowProjection := rfl |
| 117 | rw [hbar, (((PressureStream.torusAverage_contDiff hf).differentiable (by simp) _).hasFDerivAt.comp |
| 118 | x slowProjection.hasFDerivAt).fderiv] |
| 119 | rfl |
| 120 | |
| 121 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 122 | theorem average_const_mul (c : ℝ) (f : Lift S → ℝ) (x : ℝ × S) : |
| 123 | PressureStream.torusAverage (fun y => c * f y) x = c * PressureStream.torusAverage f x := by |
| 124 | simp [PressureStream.torusAverage, PressureStream.torusInner, |
| 125 | intervalIntegral.integral_const_mul] |
| 126 | |
| 127 | theorem average_linear {f : Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 128 | (hp : PressureStream.TorusPeriodicLift f) (v w : Lift S) |
| 129 | (a b : ℝ × S → ℝ) (x : Lift S) : |
| 130 | PressureStream.torusAverage (fun y => fderiv ℝ f y v + |
| 131 | a (y.1, y.2.1) * fderiv ℝ f y w + b (y.1, y.2.1) * f y) (x.1, x.2.1) = |
| 132 | fderiv ℝ (MeanMomentBounds.liftedTorusAverage f) x v + |
| 133 | a (x.1, x.2.1) * fderiv ℝ (MeanMomentBounds.liftedTorusAverage f) x w + |
| 134 | b (x.1, x.2.1) * MeanMomentBounds.liftedTorusAverage f x := by |
| 135 | have hv : Continuous (fun y => fderiv ℝ f y v) := |
| 136 | ((hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous |
| 137 | have hw : Continuous (fun y => fderiv ℝ f y w) := |
| 138 | ((hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous |
| 139 | have he : PressureStream.torusAverage (fun y => fderiv ℝ f y v + |
| 140 | a (y.1, y.2.1) * fderiv ℝ f y w + b (y.1, y.2.1) * f y) (x.1, x.2.1) = |
| 141 | PressureStream.torusAverage (fun y => fderiv ℝ f y v + |
| 142 | a (x.1, x.2.1) * fderiv ℝ f y w + b (x.1, x.2.1) * f y) (x.1, x.2.1) := |
| 143 | PressureStream.torusAverage_congr_slice _ (fun _ => rfl) |
| 144 | rw [he, average_add (hv.fun_add (continuous_const.fun_mul hw)) (continuous_const.fun_mul hf.continuous), |
| 145 | average_add hv (continuous_const.fun_mul hw), average_const_mul, average_const_mul, |
| 146 | average_derivative hf hp, average_derivative hf hp] |
| 147 | rfl |
| 148 | |
| 149 | theorem meanBar_dz (o : MeanIncrementBounds.Operators (Lift S)) |
| 150 | (f : ScalarField (Lift S)) (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 151 | (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) : |
| 152 | meanBar (o.dz f) = o.dz (meanBar f) := by |
| 153 | funext n x |
| 154 | change PressureStream.torusAverage (fun y => o.epsilon n * fderiv ℝ (f n) y o.eZ) |
| 155 | (x.1, x.2.1) = _ |
| 156 | rw [average_const_mul, average_derivative (hf n) (hp n)] |
| 157 | rfl |
| 158 | |
| 159 | theorem meanBar_radialDiv (o : MeanIncrementBounds.Operators (Lift S)) |
| 160 | (hradius : o.radius = Prod.fst) |
| 161 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 162 | (f : ScalarField (Lift S)) (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 163 | (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) (c : ℝ) : |
| 164 | meanBar (o.radialDiv c f) = o.radialDiv c (meanBar f) := by |
| 165 | funext n x |
| 166 | have he : o.radialDiv c f n = fun y => fderiv ℝ (f n) y o.eR + |
| 167 | (o.radialFrequency n * o.radialProfile (y.1, (y.2.1, 0))) * fderiv ℝ (f n) y o.vR + |
| 168 | (c * y.1⁻¹) * f n y := by |
| 169 | funext y |
| 170 | simp only [MeanIncrementBounds.Operators.radialDiv, MeanIncrementBounds.Operators.dr, |
| 171 | WeightedClasses.graphDerivative, MeanIncrementBounds.Operators.invRadius, |
| 172 | hradius, Pi.add_apply, Pi.mul_apply, Pi.smul_apply, smul_eq_mul] |
| 173 | rw [hprofile y.1 y.2.1 y.2.2] |
| 174 | ring |
| 175 | change PressureStream.torusAverage (o.radialDiv c f n) (x.1, x.2.1) = _ |
| 176 | rw [he, average_linear (hf n) (hp n) o.eR o.vR |
| 177 | (fun z => o.radialFrequency n * o.radialProfile (z.1, (z.2, 0))) (fun z => c * z.1⁻¹) x] |
| 178 | simp only [MeanIncrementBounds.Operators.radialDiv, MeanIncrementBounds.Operators.dr, |
| 179 | WeightedClasses.graphDerivative, MeanIncrementBounds.Operators.invRadius, |
| 180 | hradius, Pi.add_apply, Pi.mul_apply, Pi.smul_apply, smul_eq_mul] |
| 181 | rw [hprofile x.1 x.2.1 x.2.2] |
| 182 | have hb : MeanMomentBounds.liftedTorusAverage (f n) = meanBar f n := rfl |
| 183 | rw [hb] |
| 184 | ring_nf |
| 185 | |
| 186 | theorem meanBar_add (f g : ScalarField (Lift S)) |
| 187 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) (hg : ∀ n, ContDiff ℝ ∞ (g n)) : |
| 188 | meanBar (f + g) = meanBar f + meanBar g := by |
| 189 | funext n x |
| 190 | exact average_add (hf n).continuous (hg n).continuous _ |
| 191 | |
| 192 | theorem meanBar_sub (f g : ScalarField (Lift S)) |
| 193 | (hf : ∀ n, ContDiff ℝ ∞ (f n)) (hg : ∀ n, ContDiff ℝ ∞ (g n)) : |
| 194 | meanBar (f - g) = meanBar f - meanBar g := by |
| 195 | funext n x |
| 196 | exact PressureStream.torusAverage_sub (hf n).continuous (hg n).continuous _ |
| 197 | |
| 198 | |
| 199 | end AuxiliaryAverage |
| 200 | |
| 201 | namespace AuxiliaryAverage |
| 202 | |
| 203 | theorem periodic_directional {f : Lift S → ℝ} |
| 204 | (hp : PressureStream.TorusPeriodicLift f) (v : Lift S) : |
| 205 | PressureStream.TorusPeriodicLift (fun x => fderiv ℝ f x v) := by |
| 206 | intro R s Y k |
| 207 | let a : Lift S := (0, (0, ((k.1 : ℝ), (k.2 : ℝ)))) |
| 208 | have he : (fun x : Lift S => f (x + a)) = f := by |
| 209 | funext x |
| 210 | simpa [a, Prod.add_def] using hp x.1 x.2.1 x.2.2 k |
| 211 | have hd := congrArg (fun g : Lift S → ℝ => fderiv ℝ g (R, (s, Y))) he |
| 212 | rw [fderiv_comp_add_right] at hd |
| 213 | simpa [a, Prod.add_def] using congrArg (fun L : Lift S →L[ℝ] ℝ => L v) hd |
| 214 | |
| 215 | theorem periodic_dr (o : MeanIncrementBounds.Operators (Lift S)) |
| 216 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 217 | {f : ScalarField (Lift S)} (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) : |
| 218 | ∀ n, PressureStream.TorusPeriodicLift (o.dr f n) := by |
| 219 | intro n R s Y k |
| 220 | simp only [MeanIncrementBounds.Operators.dr, WeightedClasses.graphDerivative, |
| 221 | periodic_directional (hp n) o.eR R s Y k, |
| 222 | periodic_directional (hp n) o.vR R s Y k] |
| 223 | rw [hprofile R s _, hprofile R s Y] |
| 224 | |
| 225 | theorem periodic_dz (o : MeanIncrementBounds.Operators (Lift S)) |
| 226 | {f : ScalarField (Lift S)} (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) : |
| 227 | ∀ n, PressureStream.TorusPeriodicLift (o.dz f n) := by |
| 228 | intro n R s Y k |
| 229 | simp only [MeanIncrementBounds.Operators.dz, periodic_directional (hp n) o.eZ R s Y k] |
| 230 | |
| 231 | theorem meanBar_dr (o : MeanIncrementBounds.Operators (Lift S)) |
| 232 | (hradius : o.radius = Prod.fst) |
| 233 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 234 | (f : ScalarField (Lift S)) (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 235 | (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) : |
| 236 | meanBar (o.dr f) = o.dr (meanBar f) := by |
| 237 | simpa only [MeanIncrementBounds.Operators.radialDiv, zero_smul, add_zero] using |
| 238 | meanBar_radialDiv o hradius hprofile f hf hp 0 |
| 239 | |
| 240 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 241 | theorem average_radial_mul (c : ℝ → ℝ) (f : Lift S → ℝ) (x : ℝ × S) : |
| 242 | PressureStream.torusAverage (fun y => c y.1 * f y) x = |
| 243 | c x.1 * PressureStream.torusAverage f x := by |
| 244 | simp only [PressureStream.torusAverage, PressureStream.torusInner, |
| 245 | intervalIntegral.integral_const_mul] |
| 246 | |
| 247 | theorem meanBar_time (o : MeanIncrementBounds.Operators (Lift S)) |
| 248 | (f : ScalarField (Lift S)) (hf : ∀ n, ContDiff ℝ ∞ (f n)) |
| 249 | (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) : |
| 250 | meanBar (o.time f) = o.time (meanBar f) := by |
| 251 | funext n x |
| 252 | have ht : Continuous (fun y => -(o.epsilon n * fderiv ℝ (f n) y o.eT)) := |
| 253 | (continuous_const.mul (((hf n).fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous).neg |
| 254 | have hv : Continuous (fun y => o.fastCoefficient n * fderiv ℝ (f n) y o.vT) := |
| 255 | continuous_const.mul (((hf n).fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous |
| 256 | change PressureStream.torusAverage (fun y => -(o.epsilon n * fderiv ℝ (f n) y o.eT) + |
| 257 | o.fastCoefficient n * fderiv ℝ (f n) y o.vT) (x.1, x.2.1) = _ |
| 258 | rw [average_add ht hv] |
| 259 | simp_rw [← neg_mul] |
| 260 | rw [average_const_mul, average_const_mul, average_derivative (hf n) (hp n), |
| 261 | average_derivative (hf n) (hp n)] |
| 262 | simp only [MeanIncrementBounds.Operators.time, MeanIncrementBounds.Operators.slowTime, |
| 263 | MeanIncrementBounds.Operators.fastTime, meanBar, Pi.add_apply, neg_mul] |
| 264 | |
| 265 | theorem meanBar_viscosity {a b : ℝ} (ha : 0 < a) |
| 266 | (o : MeanIncrementBounds.Operators (Lift S)) (ho : DefectIncrementBounds.PositiveOperators o) |
| 267 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 268 | (f : ScalarField (Lift S)) (hf : DefectIncrementBounds.Shell a b f) |
| 269 | (hp : ∀ n, PressureStream.TorusPeriodicLift (f n)) (c : ℝ) : |
| 270 | meanBar (o.viscosity c f) = o.viscosity c (meanBar f) := by |
| 271 | have hrd := hf.dr ha ho |
| 272 | have hrr := hrd.dr ha ho |
| 273 | have hri := hrd.inv_mul ha ho |
| 274 | have hzz := (hf.dz o).dz o |
| 275 | have hii := ((hf.inv_mul ha ho).inv_mul ha ho).smul c |
| 276 | have hd := meanBar_dr o ho.radius_eq hprofile f hf.smooth hp |
| 277 | have hdd := meanBar_dr o ho.radius_eq hprofile (o.dr f) hrd.smooth |
| 278 | (periodic_dr o hprofile hp) |
| 279 | rw [hd] at hdd |
| 280 | have hz := meanBar_dz o f hf.smooth hp |
| 281 | have hzzbar := meanBar_dz o (o.dz f) (hf.dz o).smooth (periodic_dz o hp) |
| 282 | rw [hz] at hzzbar |
| 283 | funext n x |
| 284 | have hric : Continuous (fun y => o.invRadius n y * o.dr f n y) := (hri.smooth n).continuous |
| 285 | have hiic : Continuous (fun y => c * (o.invRadius n y * (o.invRadius n y * f n y))) := |
| 286 | (hii.smooth n).continuous |
| 287 | change PressureStream.torusAverage (fun y => o.epsilon n * |
| 288 | (o.dr (o.dr f) n y + o.invRadius n y * o.dr f n y + |
| 289 | o.dz (o.dz f) n y - c * (o.invRadius n y * (o.invRadius n y * f n y)))) |
| 290 | (x.1, x.2.1) = _ |
| 291 | rw [average_const_mul, |
| 292 | PressureStream.torusAverage_sub (((hrr.smooth n).continuous.fun_add hric).fun_add (hzz.smooth n).continuous) |
| 293 | hiic, |
| 294 | average_add ((hrr.smooth n).continuous.fun_add hric) (hzz.smooth n).continuous, |
| 295 | average_add (hrr.smooth n).continuous hric] |
| 296 | simp only [MeanIncrementBounds.Operators.invRadius, ho.radius_eq] |
| 297 | rw [average_radial_mul, average_const_mul, average_radial_mul, average_radial_mul] |
| 298 | change o.epsilon n * (meanBar (o.dr (o.dr f)) n x + x.1⁻¹ * meanBar (o.dr f) n x + |
| 299 | meanBar (o.dz (o.dz f)) n x - c * (x.1⁻¹ * (x.1⁻¹ * meanBar f n x))) = _ |
| 300 | rw [hdd, hd, hzzbar] |
| 301 | simp only [MeanIncrementBounds.Operators.viscosity, MeanIncrementBounds.Operators.invRadius, |
| 302 | ho.radius_eq] |
| 303 | |
| 304 | end AuxiliaryAverage |
| 305 | |
| 306 | /-! ## Explicit graph operators acting on the actual torus means -/ |
| 307 | |
| 308 | noncomputable def averaged (f : ScalarField (Lift S)) : ℕ → ℝ × S → ℝ := |
| 309 | fun n => PressureStream.torusAverage (f n) |
| 310 | |
| 311 | noncomputable def liftSlow (f : ℕ → ℝ × S → ℝ) : ScalarField (Lift S) := |
| 312 | fun n x => f n (x.1, x.2.1) |
| 313 | |
| 314 | noncomputable def nativeOperators (r : ReconstructionData) (ε fast : ℕ → ℝ) |
| 315 | (z t : S) (v : PressureStream.Plane) : MeanIncrementBounds.Operators (Lift S) := |
| 316 | graphOperators r ε fast (z, 0) (t, 0) v |
| 317 | |
| 318 | theorem nativeOperators_positive (r : ReconstructionData) (ε fast : ℕ → ℝ) |
| 319 | (z t : S) (v : PressureStream.Plane) : |
| 320 | DefectIncrementBounds.PositiveOperators (nativeOperators r ε fast z t v) := by |
| 321 | refine ⟨rfl, ?_⟩ |
| 322 | change ContDiffOn ℝ ∞ (fun x : Lift S => r.exponent * x.1 ^ (r.exponent - 1)) |
| 323 | DefectIncrementBounds.positiveDomain |
| 324 | exact contDiffOn_const.mul (contDiffOn_fst.rpow_const_of_ne (fun _ hx => (ne_of_gt hx))) |
| 325 | |
| 326 | omit [NormedSpace ℝ S] in |
| 327 | theorem nativeOperators_profile (r : ReconstructionData) (ε fast : ℕ → ℝ) |
| 328 | (z t : S) (v : PressureStream.Plane) (R : ℝ) (s : S) (Y : PressureStream.Plane) : |
| 329 | (nativeOperators r ε fast z t v).radialProfile (R, (s, Y)) = |
| 330 | (nativeOperators r ε fast z t v).radialProfile (R, (s, 0)) := rfl |
| 331 | |
| 332 | noncomputable def radialPartial (F : ℝ × S → ℝ) (x : ℝ × S) : ℝ := |
| 333 | fderiv ℝ F x (1, 0) |
| 334 | |
| 335 | theorem radialPartial_smooth {F : ℝ × S → ℝ} (hF : ContDiff ℝ ∞ F) : |
| 336 | ContDiff ℝ ∞ (radialPartial F) := |
| 337 | (hF.fderiv_right (by simp)).clm_apply contDiff_const |
| 338 | |
| 339 | theorem radialPartial_eq_deriv {F : ℝ × S → ℝ} (hF : ContDiff ℝ ∞ F) (R : ℝ) (s : S) : |
| 340 | radialPartial F (R, s) = deriv (fun q => F (q, s)) R := by |
| 341 | have hd := ((hF.differentiable (by simp)) (R, s)).hasFDerivAt.comp_hasDerivAt R |
| 342 | ((hasDerivAt_id R).prodMk (hasDerivAt_const R s)) |
| 343 | exact hd.deriv.symm |
| 344 | |
| 345 | theorem radialPartial_twice_eq_deriv {F : ℝ × S → ℝ} (hF : ContDiff ℝ ∞ F) (R : ℝ) (s : S) : |
| 346 | radialPartial (radialPartial F) (R, s) = deriv (deriv (fun q => F (q, s))) R := by |
| 347 | rw [radialPartial_eq_deriv (radialPartial_smooth hF)] |
| 348 | congr 1 |
| 349 | funext q |
| 350 | exact radialPartial_eq_deriv hF q s |
| 351 | |
| 352 | theorem fderiv_liftSlow {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) |
| 353 | (n : ℕ) (x v : Lift S) : |
| 354 | fderiv ℝ (liftSlow F n) x v = fderiv ℝ (F n) (x.1, x.2.1) (v.1, v.2.1) := by |
| 355 | have hd := (((hF n).differentiable (by simp)) (x.1, x.2.1)).hasFDerivAt.comp x |
| 356 | AuxiliaryAverage.slowProjection.hasFDerivAt |
| 357 | rw [show liftSlow F n = F n ∘ AuxiliaryAverage.slowProjection from rfl, hd.fderiv] |
| 358 | rfl |
| 359 | |
| 360 | theorem native_dr_lift (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) |
| 361 | (v : PressureStream.Plane) {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) : |
| 362 | (nativeOperators r ε fast z t v).dr (liftSlow F) = liftSlow (fun n => radialPartial (F n)) := by |
| 363 | funext n x |
| 364 | simp only [MeanIncrementBounds.Operators.dr, WeightedClasses.graphDerivative, |
| 365 | nativeOperators, graphOperators, fderiv_liftSlow hF] |
| 366 | simp [liftSlow, radialPartial, show ((0 : ℝ), (0 : S)) = (0 : ℝ × S) from rfl] |
| 367 | |
| 368 | theorem native_dz_lift (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) |
| 369 | (v : PressureStream.Plane) {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) : |
| 370 | (nativeOperators r ε fast z t v).dz (liftSlow F) = |
| 371 | liftSlow (fun n x => ε n * IntegratedMeanBalances.parameterPartial z (F n) x) := by |
| 372 | funext n x |
| 373 | simp only [MeanIncrementBounds.Operators.dz, nativeOperators, graphOperators, fderiv_liftSlow hF] |
| 374 | rfl |
| 375 | |
| 376 | theorem native_time_lift (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) |
| 377 | (v : PressureStream.Plane) {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) : |
| 378 | (nativeOperators r ε fast z t v).time (liftSlow F) = |
| 379 | liftSlow (fun n x => -ε n * IntegratedMeanBalances.parameterPartial t (F n) x) := by |
| 380 | funext n x |
| 381 | simp only [MeanIncrementBounds.Operators.time, MeanIncrementBounds.Operators.slowTime, |
| 382 | MeanIncrementBounds.Operators.fastTime, Pi.add_apply, nativeOperators, graphOperators, |
| 383 | fderiv_liftSlow hF] |
| 384 | simp [liftSlow, IntegratedMeanBalances.parameterPartial, neg_mul, show ((0 : ℝ), (0 : S)) = (0 : ℝ × S) from rfl] |
| 385 | |
| 386 | theorem parameterPartial_const_mul {F : ℝ × S → ℝ} (hF : ContDiff ℝ ∞ F) |
| 387 | (c : ℝ) (v : S) : |
| 388 | IntegratedMeanBalances.parameterPartial v (fun x => c * F x) = |
| 389 | fun x => c * IntegratedMeanBalances.parameterPartial v F x := by |
| 390 | funext x |
| 391 | unfold IntegratedMeanBalances.parameterPartial |
| 392 | rw [(((hF.differentiable (by simp)) x).hasFDerivAt.const_mul c).fderiv] |
| 393 | rfl |
| 394 | |
| 395 | theorem native_radialDiv_lift (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) |
| 396 | (v : PressureStream.Plane) {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) |
| 397 | (c : ℝ) (n : ℕ) (x : Lift S) : |
| 398 | (nativeOperators r ε fast z t v).radialDiv c (liftSlow F) n x = |
| 399 | IntegratedMeanBalances.radialDivergence c (fun q => F n (q, x.2.1)) x.1 := by |
| 400 | simp only [MeanIncrementBounds.Operators.radialDiv, |
| 401 | Pi.add_apply, Pi.smul_apply, Pi.mul_apply, smul_eq_mul] |
| 402 | rw [native_dr_lift r ε fast z t v hF] |
| 403 | simp only [ liftSlow, |
| 404 | MeanIncrementBounds.Operators.invRadius, nativeOperators, graphOperators] |
| 405 | rw [radialPartial_eq_deriv (hF n)] |
| 406 | simp only [IntegratedMeanBalances.radialDivergence, div_eq_mul_inv, mul_assoc] |
| 407 | |
| 408 | theorem native_viscosity_lift (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) |
| 409 | (v : PressureStream.Plane) {F : ℕ → ℝ × S → ℝ} (hF : ∀ n, ContDiff ℝ ∞ (F n)) |
| 410 | (c : ℝ) (n : ℕ) (x : Lift S) : |
| 411 | (nativeOperators r ε fast z t v).viscosity c (liftSlow F) n x = |
| 412 | ε n * (deriv (deriv (fun q => F n (q, x.2.1))) x.1 + |
| 413 | deriv (fun q => F n (q, x.2.1)) x.1 / x.1 + |
| 414 | ε n ^ 2 * IntegratedMeanBalances.parameterPartial z |
| 415 | (IntegratedMeanBalances.parameterPartial z (F n)) (x.1, x.2.1) - |
| 416 | c * F n (x.1, x.2.1) / x.1 ^ 2) := by |
| 417 | have hr := native_dr_lift r ε fast z t v hF |
| 418 | have hrr := native_dr_lift r ε fast z t v (fun n => radialPartial_smooth (hF n)) |
| 419 | have hz := native_dz_lift r ε fast z t v hF |
| 420 | have hzz := native_dz_lift r ε fast z t v |
| 421 | (F := fun n x => ε n * IntegratedMeanBalances.parameterPartial z (F n) x) |
| 422 | (fun n => contDiff_const.mul |
| 423 | (IntegratedMeanBalances.parameterPartial_smooth z (hF n))) |
| 424 | simp only [MeanIncrementBounds.Operators.viscosity, hr, hrr, hz, hzz] |
| 425 | simp only [liftSlow, |
| 426 | parameterPartial_const_mul (IntegratedMeanBalances.parameterPartial_smooth z (hF n)), |
| 427 | radialPartial_eq_deriv (hF n), radialPartial_twice_eq_deriv (hF n), |
| 428 | MeanIncrementBounds.Operators.invRadius, nativeOperators, graphOperators] |
| 429 | simp only [div_eq_mul_inv] |
| 430 | ring |
| 431 | |
| 432 | noncomputable def fluxResidual (o : MeanIncrementBounds.Operators (Lift S)) (d k : ℝ) |
| 433 | (u R Z T : ScalarField (Lift S)) : ScalarField (Lift S) := |
| 434 | o.time u + o.radialDiv d R + o.dz Z - o.viscosity k u - o.radialDiv d T |
| 435 | |
| 436 | theorem meanBar_fluxResidual {a b : ℝ} (ha : 0 < a) |
| 437 | (o : MeanIncrementBounds.Operators (Lift S)) (ho : DefectIncrementBounds.PositiveOperators o) |
| 438 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 439 | (d k : ℝ) {u R Z T : ScalarField (Lift S)} |
| 440 | (hu : DefectIncrementBounds.Shell a b u) (hR : DefectIncrementBounds.Shell a b R) |
| 441 | (hZ : DefectIncrementBounds.Shell a b Z) (hT : DefectIncrementBounds.Shell a b T) |
| 442 | (pu : ∀ n, PressureStream.TorusPeriodicLift (u n)) |
| 443 | (pR : ∀ n, PressureStream.TorusPeriodicLift (R n)) |
| 444 | (pZ : ∀ n, PressureStream.TorusPeriodicLift (Z n)) |
| 445 | (pT : ∀ n, PressureStream.TorusPeriodicLift (T n)) : |
| 446 | meanBar (fluxResidual o d k u R Z T) = |
| 447 | fluxResidual o d k (meanBar u) (meanBar R) (meanBar Z) (meanBar T) := by |
| 448 | have hut := hu.time o |
| 449 | have hRd := hR.radialDiv ha ho d |
| 450 | have hZd := hZ.dz o |
| 451 | have huv := hu.viscosity ha ho k |
| 452 | have hTd := hT.radialDiv ha ho d |
| 453 | simp only [fluxResidual] |
| 454 | rw [AuxiliaryAverage.meanBar_sub _ _ (((hut.add hRd).add hZd).sub huv).smooth hTd.smooth, |
| 455 | AuxiliaryAverage.meanBar_sub _ _ ((hut.add hRd).add hZd).smooth huv.smooth, |
| 456 | AuxiliaryAverage.meanBar_add _ _ (hut.add hRd).smooth hZd.smooth, |
| 457 | AuxiliaryAverage.meanBar_add _ _ hut.smooth hRd.smooth, |
| 458 | AuxiliaryAverage.meanBar_time o u hu.smooth pu, |
| 459 | AuxiliaryAverage.meanBar_radialDiv o ho.radius_eq hprofile R hR.smooth pR, |
| 460 | AuxiliaryAverage.meanBar_dz o Z hZ.smooth pZ, |
| 461 | AuxiliaryAverage.meanBar_viscosity ha o ho hprofile u hu pu, |
| 462 | AuxiliaryAverage.meanBar_radialDiv o ho.radius_eq hprofile T hT.smooth pT] |
| 463 | |
| 464 | noncomputable def balance (ε : ℝ) (z t : S) (d k : ℝ) |
| 465 | (u R Z T : ℝ × S → ℝ) (x : ℝ × S) : ℝ := |
| 466 | -ε * IntegratedMeanBalances.parameterPartial t u x + |
| 467 | IntegratedMeanBalances.radialDivergence d (fun q => R (q, x.2)) x.1 + |
| 468 | ε * IntegratedMeanBalances.parameterPartial z Z x - |
| 469 | ε * (deriv (deriv (fun q => u (q, x.2))) x.1 + |
| 470 | deriv (fun q => u (q, x.2)) x.1 / x.1 + |
| 471 | ε ^ 2 * IntegratedMeanBalances.parameterPartial z |
| 472 | (IntegratedMeanBalances.parameterPartial z u) x - k * u x / x.1 ^ 2) - |
| 473 | IntegratedMeanBalances.radialDivergence d (fun q => T (q, x.2)) x.1 |
| 474 | |
| 475 | theorem averaged_fluxResidual {a b : ℝ} (ha : 0 < a) |
| 476 | (r : ReconstructionData) (ε fast : ℕ → ℝ) (z t : S) (v : PressureStream.Plane) |
| 477 | (d k : ℝ) {u R Z T : ScalarField (Lift S)} |
| 478 | (hu : DefectIncrementBounds.Shell a b u) (hR : DefectIncrementBounds.Shell a b R) |
| 479 | (hZ : DefectIncrementBounds.Shell a b Z) (hT : DefectIncrementBounds.Shell a b T) |
| 480 | (pu : ∀ n, PressureStream.TorusPeriodicLift (u n)) |
| 481 | (pR : ∀ n, PressureStream.TorusPeriodicLift (R n)) |
| 482 | (pZ : ∀ n, PressureStream.TorusPeriodicLift (Z n)) |
| 483 | (pT : ∀ n, PressureStream.TorusPeriodicLift (T n)) (n : ℕ) (x : ℝ × S) : |
| 484 | averaged (fluxResidual (nativeOperators r ε fast z t v) d k u R Z T) n x = |
| 485 | balance (ε n) z t d k (averaged u n) (averaged R n) (averaged Z n) (averaged T n) x := by |
| 486 | have hh := congrFun (congrFun (meanBar_fluxResidual ha _ |
| 487 | (nativeOperators_positive r ε fast z t v) (nativeOperators_profile r ε fast z t v) |
| 488 | d k hu hR hZ hT pu pR pZ pT) n) (x.1, (x.2, 0)) |
| 489 | have hb (f : ScalarField (Lift S)) : meanBar f = liftSlow (averaged f) := rfl |
| 490 | simp only [hb, fluxResidual, Pi.add_apply, Pi.sub_apply] at hh |
| 491 | rw [native_time_lift r ε fast z t v (F := averaged u) |
| 492 | (fun n => PressureStream.torusAverage_contDiff (hu.smooth n)), |
| 493 | native_radialDiv_lift r ε fast z t v (F := averaged R) |
| 494 | (fun n => PressureStream.torusAverage_contDiff (hR.smooth n)), |
| 495 | native_dz_lift r ε fast z t v (F := averaged Z) |
| 496 | (fun n => PressureStream.torusAverage_contDiff (hZ.smooth n)), |
| 497 | native_viscosity_lift r ε fast z t v (F := averaged u) |
| 498 | (fun n => PressureStream.torusAverage_contDiff (hu.smooth n)), |
| 499 | native_radialDiv_lift r ε fast z t v (F := averaged T) |
| 500 | (fun n => PressureStream.torusAverage_contDiff (hT.smooth n))] at hh |
| 501 | exact hh |
| 502 | |
| 503 | noncomputable def angularBalanceAlong (ε : ℝ) (z t : S) (u R Z T : ℝ × S → ℝ) |
| 504 | (x : ℝ × S) : ℝ := |
| 505 | -ε * IntegratedMeanBalances.parameterPartial t u x + |
| 506 | IntegratedMeanBalances.radialDivergence 2 (fun q => R (q, x.2)) x.1 + |
| 507 | ε * IntegratedMeanBalances.parameterPartial z Z x - |
| 508 | ε * (IntegratedMeanBalances.angularRadialViscosity (fun q => u (q, x.2)) x.1 + |
| 509 | ε ^ 2 * IntegratedMeanBalances.parameterPartial z |
| 510 | (IntegratedMeanBalances.parameterPartial z u) x) - |
| 511 | IntegratedMeanBalances.radialDivergence 2 (fun q => T (q, x.2)) x.1 |
| 512 | |
| 513 | noncomputable def axialBalanceAlong (ε : ℝ) (z t : S) (u R Z T : ℝ × S → ℝ) |
| 514 | (x : ℝ × S) : ℝ := |
| 515 | -ε * IntegratedMeanBalances.parameterPartial t u x + |
| 516 | IntegratedMeanBalances.radialDivergence 1 (fun q => R (q, x.2)) x.1 + |
| 517 | ε * IntegratedMeanBalances.parameterPartial z Z x - |
| 518 | ε * (IntegratedMeanBalances.axialRadialViscosity (fun q => u (q, x.2)) x.1 + |
| 519 | ε ^ 2 * IntegratedMeanBalances.parameterPartial z |
| 520 | (IntegratedMeanBalances.parameterPartial z u) x) - |
| 521 | IntegratedMeanBalances.radialDivergence 1 (fun q => T (q, x.2)) x.1 |
| 522 | |
| 523 | theorem balance_angular (ε : ℝ) (z t : S) (u R Z T : ℝ × S → ℝ) : |
| 524 | balance ε z t 2 1 u R Z T = angularBalanceAlong ε z t u R Z T := by |
| 525 | funext x |
| 526 | simp only [balance, angularBalanceAlong, IntegratedMeanBalances.angularRadialViscosity] |
| 527 | ring |
| 528 | |
| 529 | theorem balance_axial (ε : ℝ) (z t : S) (u R Z T : ℝ × S → ℝ) : |
| 530 | balance ε z t 1 0 u R Z T = axialBalanceAlong ε z t u R Z T := by |
| 531 | funext x |
| 532 | simp [balance, axialBalanceAlong, IntegratedMeanBalances.axialRadialViscosity] |
| 533 | |
| 534 | section MomentIntegration |
| 535 | |
| 536 | open IntegratedMeanBalances |
| 537 | |
| 538 | structure RadialShell (a b : ℝ) (F : (ℝ × S → ℝ)) : Prop where |
| 539 | smooth : ContDiff ℝ ∞ F |
| 540 | supported : RadialAlias.RadiallySupported a b F |
| 541 | |
| 542 | theorem RadialShell.partial {a b : ℝ} {F : (ℝ × S → ℝ)} (hF : RadialShell a b F) |
| 543 | (v : S) : RadialShell a b (parameterPartial v F) := |
| 544 | ⟨parameterPartial_smooth v hF.smooth, parameterPartial_supported v hF.supported⟩ |
| 545 | |
| 546 | theorem RadialShell.add {a b : ℝ} {F G : (ℝ × S → ℝ)} |
| 547 | (hF : RadialShell a b F) (hG : RadialShell a b G) : |
| 548 | RadialShell a b (fun x => F x + G x) := by |
| 549 | refine ⟨hF.smooth.add hG.smooth, ?_⟩ |
| 550 | intro x hx |
| 551 | by_contra hn |
| 552 | have hFx : F x = 0 := by |
| 553 | by_contra h |
| 554 | exact hn (hF.supported h) |
| 555 | have hGx : G x = 0 := by |
| 556 | by_contra h |
| 557 | exact hn (hG.supported h) |
| 558 | exact hx (by simp [hFx, hGx]) |
| 559 | |
| 560 | theorem RadialShell.slice_smooth {a b : ℝ} {F : (ℝ × S → ℝ)} (hF : RadialShell a b F) |
| 561 | (p : S) : ContDiff ℝ ∞ (fun r => F (r, p)) := |
| 562 | radial_slice_smooth hF.smooth p |
| 563 | |
| 564 | theorem RadialShell.slice_compact {a b : ℝ} {F : (ℝ × S → ℝ)} (hF : RadialShell a b F) |
| 565 | (p : S) : HasCompactSupport (fun r => F (r, p)) := |
| 566 | radial_slice_compact hF.supported p |
| 567 | |
| 568 | theorem RadialShell.weighted_integrable {a b : ℝ} {F : (ℝ × S → ℝ)} (hF : RadialShell a b F) |
| 569 | (n : ℕ) (p : S) : Integrable (fun r => r ^ n * F (r, p)) := |
| 570 | IntegratedMeanBalances.weighted_integrable (hF.slice_smooth p).continuous (hF.slice_compact p) n |
| 571 | |
| 572 | |
| 573 | theorem integrated_angular_along {a b : ℝ} (ε : ℝ) (z t : S) |
| 574 | {v radialFlux axialFlux virtualFlux : (ℝ × S → ℝ)} |
| 575 | (hv : RadialShell a b v) (hr : RadialShell a b radialFlux) |
| 576 | (hz : RadialShell a b axialFlux) (hT : RadialShell a b virtualFlux) |
| 577 | (hmass : radialMoment 2 v = 0) (p : S) : |
| 578 | radialMoment 2 (angularBalanceAlong ε z t v radialFlux axialFlux virtualFlux) p = |
| 579 | ε * fderiv ℝ (radialMoment 2 axialFlux) p z := by |
| 580 | have halg := moment_balance_algebra 2 (-ε) ε (ε ^ 2) |
| 581 | (fun r => parameterPartial t v (r, p)) |
| 582 | (radialDivergence 2 (fun r => radialFlux (r, p))) |
| 583 | (fun r => parameterPartial z axialFlux (r, p)) |
| 584 | (angularRadialViscosity (fun r => v (r, p))) |
| 585 | (fun r => parameterPartial z (parameterPartial z v) (r, p)) |
| 586 | (radialDivergence 2 (fun r => virtualFlux (r, p))) |
| 587 | ((hv.partial t).weighted_integrable 2 p) |
| 588 | (angular_divergence_integrable (hr.slice_smooth p) (hr.slice_compact p)) |
| 589 | ((hz.partial z).weighted_integrable 2 p) |
| 590 | (angular_viscosity_integrable (hv.slice_smooth p) (hv.slice_compact p)) |
| 591 | (((hv.partial z).partial z).weighted_integrable 2 p) |
| 592 | (angular_divergence_integrable (hT.slice_smooth p) (hT.slice_compact p)) |
| 593 | have ht := zero_mass_parameterPartial hv.smooth hv.supported 2 hmass p t |
| 594 | have hzz := zero_mass_parameterPartial_twice hv.smooth hv.supported 2 hmass p z z |
| 595 | have hd := radialMoment_parameterPartial hz.smooth hz.supported 2 p z |
| 596 | change moment 2 _ = _ |
| 597 | simp only [angularBalanceAlong] |
| 598 | rw [halg, moment_angular_divergence (hr.slice_smooth p) (hr.slice_compact p), |
| 599 | moment_angular_divergence (hT.slice_smooth p) (hT.slice_compact p), |
| 600 | moment_angular_viscosity (hv.slice_smooth p) (hv.slice_compact p)] |
| 601 | change (-ε) * radialMoment 2 (parameterPartial t v) p + 0 + |
| 602 | ε * radialMoment 2 (parameterPartial z axialFlux) p - |
| 603 | ε * (0 + ε ^ 2 * radialMoment 2 (parameterPartial z (parameterPartial z v)) p) - 0 = _ |
| 604 | rw [ht, hzz, ← hd] |
| 605 | ring |
| 606 | |
| 607 | |
| 608 | theorem integrated_axial_along {a b : ℝ} (ε : ℝ) (z t : S) |
| 609 | {γ radialFlux axialFlux virtualFlux : (ℝ × S → ℝ)} |
| 610 | (hγ : RadialShell a b γ) (hr : RadialShell a b radialFlux) |
| 611 | (hz : RadialShell a b axialFlux) |
| 612 | (hT : RadialShell a b virtualFlux) |
| 613 | (hmass : radialMoment 1 γ = 0) (p : S) : |
| 614 | radialMoment 1 (axialBalanceAlong ε z t γ radialFlux axialFlux virtualFlux) p = |
| 615 | ε * fderiv ℝ (radialMoment 1 axialFlux) p z := by |
| 616 | have halg := moment_balance_algebra 1 (-ε) ε (ε ^ 2) |
| 617 | (fun r => parameterPartial t γ (r, p)) |
| 618 | (radialDivergence 1 (fun r => radialFlux (r, p))) |
| 619 | (fun r => parameterPartial z axialFlux (r, p)) |
| 620 | (axialRadialViscosity (fun r => γ (r, p))) |
| 621 | (fun r => parameterPartial z (parameterPartial z γ) (r, p)) |
| 622 | (radialDivergence 1 (fun r => virtualFlux (r, p))) |
| 623 | ((hγ.partial t).weighted_integrable 1 p) |
| 624 | (by simpa only [pow_one] using axial_divergence_integrable (hr.slice_smooth p) (hr.slice_compact p)) |
| 625 | ((hz.partial z).weighted_integrable 1 p) |
| 626 | (by simpa only [pow_one] using axial_viscosity_integrable (hγ.slice_smooth p) (hγ.slice_compact p)) |
| 627 | (((hγ.partial z).partial z).weighted_integrable 1 p) |
| 628 | (by simpa only [pow_one] using axial_divergence_integrable (hT.slice_smooth p) (hT.slice_compact p)) |
| 629 | have ht := zero_mass_parameterPartial hγ.smooth hγ.supported 1 hmass p t |
| 630 | have hzz := zero_mass_parameterPartial_twice hγ.smooth hγ.supported 1 hmass p z z |
| 631 | have hd := radialMoment_parameterPartial hz.smooth hz.supported 1 p z |
| 632 | change moment 1 _ = _ |
| 633 | simp only [axialBalanceAlong] |
| 634 | rw [halg, moment_axial_divergence (hr.slice_smooth p) (hr.slice_compact p), |
| 635 | moment_axial_divergence (hT.slice_smooth p) (hT.slice_compact p), |
| 636 | moment_axial_viscosity (hγ.slice_smooth p) (hγ.slice_compact p)] |
| 637 | change (-ε) * radialMoment 1 (parameterPartial t γ) p + 0 + |
| 638 | ε * radialMoment 1 (parameterPartial z axialFlux) p - |
| 639 | ε * (0 + ε ^ 2 * radialMoment 1 (parameterPartial z (parameterPartial z γ)) p) - 0 = _ |
| 640 | rw [ht, hzz, ← hd] |
| 641 | ring |
| 642 | |
| 643 | |
| 644 | theorem averaged_radialShell {a b : ℝ} {f : ScalarField (Lift S)} |
| 645 | (hf : DefectIncrementBounds.Shell a b f) (n : ℕ) : |
| 646 | RadialShell a b (averaged f n) := |
| 647 | ⟨PressureStream.torusAverage_contDiff (hf.smooth n), |
| 648 | PressureStream.torusAverage_supported (hf.supported n)⟩ |
| 649 | |
| 650 | end MomentIntegration |
| 651 | |
| 652 | /-! ## Literal state fluxes and actual debt identities -/ |
| 653 | |
| 654 | noncomputable def thetaRadialFlux (c : Context (Lift S)) (u : State (Lift S)) : ScalarField (Lift S) := |
| 655 | MeanIncrementBounds.thetaRadial c.base u.mean + u.covariance 0 1 |
| 656 | |
| 657 | noncomputable def thetaAxialFlux (c : Context (Lift S)) (u : State (Lift S)) : ScalarField (Lift S) := |
| 658 | MeanIncrementBounds.thetaAxial c.base u.mean + u.covariance 2 1 |
| 659 | |
| 660 | noncomputable def axialRadialFlux (c : Context (Lift S)) (u : State (Lift S)) : ScalarField (Lift S) := |
| 661 | MeanIncrementBounds.axialRadial c.base u.mean + u.covariance 0 2 |
| 662 | |
| 663 | noncomputable def axialAxialFlux (c : Context (Lift S)) (u : State (Lift S)) : ScalarField (Lift S) := |
| 664 | MeanIncrementBounds.axialAxial c.base u.mean + u.covariance 2 2 |
| 665 | |
| 666 | /-- Regularity of the actual pointwise fields; no averaged equation or moment |
| 667 | identity is included among the premises. -/ |
| 668 | structure FluxInputs (a b : ℝ) (u R Z T : ScalarField (Lift S)) : Prop where |
| 669 | velocity : DefectIncrementBounds.Shell a b u |
| 670 | radial : DefectIncrementBounds.Shell a b R |
| 671 | axial : DefectIncrementBounds.Shell a b Z |
| 672 | stress : DefectIncrementBounds.Shell a b T |
| 673 | velocity_periodic : ∀ n, PressureStream.TorusPeriodicLift (u n) |
| 674 | radial_periodic : ∀ n, PressureStream.TorusPeriodicLift (R n) |
| 675 | axial_periodic : ∀ n, PressureStream.TorusPeriodicLift (Z n) |
| 676 | stress_periodic : ∀ n, PressureStream.TorusPeriodicLift (T n) |
| 677 | |
| 678 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 679 | theorem state_radialMoment_eq (k : ℕ) (f : ScalarField (Lift S)) (n : ℕ) (s : S) : |
| 680 | CorrectionState.radialMoment k f n s = |
| 681 | IntegratedMeanBalances.radialMoment k (averaged f n) s := |
| 682 | MeanMomentBounds.pressureMass_radialWeighted k (f n) s |
| 683 | |
| 684 | /-! ## Actual all-jet debt bounds yield the improved signed bump order -/ |
| 685 | |
| 686 | section ClassBounds |
| 687 | |
| 688 | open WeightedClasses MeanMomentBounds SignedStressPrimitive |
| 689 | |
| 690 | noncomputable def slowProjection : Lift S →L[ℝ] S := |
| 691 | (ContinuousLinearMap.fst ℝ S PressureStream.Plane).comp |
| 692 | (ContinuousLinearMap.snd ℝ ℝ (S × PressureStream.Plane)) |
| 693 | |
| 694 | theorem norm_slowProjection_le : ‖slowProjection (S := S)‖ ≤ 1 := by |
| 695 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 696 | intro x |
| 697 | change ‖x.2.1‖ ≤ 1 * ‖x‖ |
| 698 | simp only [one_mul, Prod.norm_def] |
| 699 | exact (le_max_left _ _).trans (le_max_right _ _) |
| 700 | |
| 701 | end ClassBounds |
| 702 | |
| 703 | end NavierStokes.StateMomentBalances |