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.CommonCoverClass |
| 3 | |
| 4 | /-! |
| 5 | # Naturality of the actual mean operators |
| 6 | |
| 7 | Radial endpoints, the normalized density, the compactification cutoff, |
| 8 | frequencies, and amplitudes are transported together. The identities below |
| 9 | are identities of the defined integral/Fourier/rank operators, not an |
| 10 | assumption that separately chosen chart outputs coincide. |
| 11 | -/ |
| 12 | |
| 13 | namespace NavierStokes.MeanChartCompatibility |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Function Filter MeasureTheory |
| 18 | open scoped Topology ContDiff BigOperators Interval |
| 19 | |
| 20 | section RadialScale |
| 21 | |
| 22 | theorem cutoff_scale {l : ℝ} (hl : l ≠ 0) (a b x : ℝ) : |
| 23 | TransportPrimitive.cutoff (l * a) (l * b) (l * x) = TransportPrimitive.cutoff a b x := by |
| 24 | unfold TransportPrimitive.cutoff |
| 25 | congr 1 |
| 26 | rw [← mul_sub, ← mul_sub, mul_div_mul_left _ _ hl] |
| 27 | |
| 28 | theorem interiorCutoff_scale {l : ℝ} (hl : l ≠ 0) (a b x : ℝ) : |
| 29 | TransportPrimitive.interiorCutoff (l * a) (l * b) (l * x) = |
| 30 | TransportPrimitive.interiorCutoff a b x := by |
| 31 | unfold TransportPrimitive.interiorCutoff |
| 32 | rw [show (2 * (l * a) + l * b) / 3 = l * ((2 * a + b) / 3) by ring, |
| 33 | show (l * a + 2 * (l * b)) / 3 = l * ((a + 2 * b) / 3) by ring] |
| 34 | exact cutoff_scale hl _ _ _ |
| 35 | |
| 36 | theorem interiorCutoff_power_scale {l a b x : ℝ} (hl : 0 < l) |
| 37 | (ha : 0 ≤ a) (hb : 0 ≤ b) (hx : 0 ≤ x) (d : ℝ) : |
| 38 | TransportPrimitive.interiorCutoff ((l * a) ^ d) ((l * b) ^ d) ((l * x) ^ d) = |
| 39 | TransportPrimitive.interiorCutoff (a ^ d) (b ^ d) (x ^ d) := by |
| 40 | rw [Real.mul_rpow hl.le ha, Real.mul_rpow hl.le hb, Real.mul_rpow hl.le hx] |
| 41 | exact interiorCutoff_scale (Real.rpow_pos_of_pos hl d).ne' _ _ _ |
| 42 | |
| 43 | theorem meanBump_scale {l a b : ℝ} (hl : 0 < l) (hab : a < b) (x : ℝ) : |
| 44 | PressureStream.meanBump (l * a) (l * b) (mul_lt_mul_of_pos_left hab hl) (l * x) = |
| 45 | PressureStream.meanBump a b hab x := by |
| 46 | rw [ContDiffBump.apply, ContDiffBump.apply] |
| 47 | dsimp only [PressureStream.meanBump] |
| 48 | rw [show l * b - l * a = l * (b - a) by ring, |
| 49 | show (l * a + l * b) / 2 = l * ((a + b) / 2) by ring] |
| 50 | have hba : b - a ≠ 0 := (sub_pos.mpr hab).ne' |
| 51 | congr 1 |
| 52 | · field_simp [hl.ne', hba] |
| 53 | · simp only [smul_eq_mul] |
| 54 | rw [← mul_sub] |
| 55 | field_simp [hl.ne', hba] |
| 56 | |
| 57 | theorem meanBump_integral_scale {l a b : ℝ} (hl : 0 < l) (hab : a < b) : |
| 58 | (∫ x, PressureStream.meanBump (l * a) (l * b) (mul_lt_mul_of_pos_left hab hl) x) = |
| 59 | l * ∫ x, PressureStream.meanBump a b hab x := by |
| 60 | have he (x : ℝ) : |
| 61 | PressureStream.meanBump (l * a) (l * b) (mul_lt_mul_of_pos_left hab hl) x = |
| 62 | PressureStream.meanBump a b hab (x / l) := by |
| 63 | simpa only [mul_div_cancel₀ _ hl.ne'] using meanBump_scale hl hab (x / l) |
| 64 | simp_rw [he] |
| 65 | simpa using MeanRankUpdate.integral_scaled hl 1 (PressureStream.meanBump a b hab) |
| 66 | |
| 67 | /-- The density transforms with the inverse radial length. -/ |
| 68 | theorem rho_scale {l a b : ℝ} (hl : 0 < l) (hab : a < b) (x : ℝ) : |
| 69 | PressureStream.rho (l * a) (l * b) (mul_lt_mul_of_pos_left hab hl) (l * x) = |
| 70 | l⁻¹ * PressureStream.rho a b hab x := by |
| 71 | unfold PressureStream.rho |
| 72 | rw [ContDiffBump.normed_def, ContDiffBump.normed_def, meanBump_scale hl hab, |
| 73 | meanBump_integral_scale hl hab] |
| 74 | simp only [div_eq_mul_inv, mul_inv_rev] |
| 75 | ring |
| 76 | |
| 77 | end RadialScale |
| 78 | |
| 79 | section Pullback |
| 80 | |
| 81 | variable {E F : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 82 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 83 | |
| 84 | noncomputable def chartLinear (l : ℝ) (C : E →L[ℝ] F) : ℝ × E →L[ℝ] ℝ × F := |
| 85 | (l • ContinuousLinearMap.id ℝ ℝ).prodMap C |
| 86 | |
| 87 | @[simp] theorem chartLinear_apply (l : ℝ) (C : E →L[ℝ] F) (z : ℝ × E) : |
| 88 | chartLinear l C z = (l * z.1, C z.2) := rfl |
| 89 | |
| 90 | noncomputable def pull (l : ℝ) (C : E →L[ℝ] F) (u : ℝ) (f : ℝ × F → ℝ) (z : ℝ × E) : ℝ := |
| 91 | u * f (chartLinear l C z) |
| 92 | |
| 93 | theorem pull_smooth (l : ℝ) (C : E →L[ℝ] F) (u : ℝ) {f : ℝ × F → ℝ} |
| 94 | (hf : ContDiff ℝ ∞ f) : ContDiff ℝ ∞ (pull l C u f) := |
| 95 | contDiff_const.mul (hf.comp (chartLinear l C).contDiff) |
| 96 | |
| 97 | theorem pull_supported {l a b : ℝ} (hl : 0 < l) (C : E →L[ℝ] F) (u : ℝ) |
| 98 | {f : ℝ × F → ℝ} (hs : RadialAlias.RadiallySupported (l * a) (l * b) f) : |
| 99 | RadialAlias.RadiallySupported a b (pull l C u f) := by |
| 100 | intro z hz |
| 101 | have hne : f (chartLinear l C z) ≠ 0 := by |
| 102 | intro he |
| 103 | apply hz |
| 104 | change u * f (chartLinear l C z) = 0 |
| 105 | rw [he, mul_zero] |
| 106 | have hp := hs hne |
| 107 | change l * a ≤ l * z.1 ∧ l * z.1 ≤ l * b at hp |
| 108 | exact ⟨(mul_le_mul_iff_right₀ hl).mp hp.1, (mul_le_mul_iff_right₀ hl).mp hp.2⟩ |
| 109 | |
| 110 | theorem shifted_chart {l : ℝ} (hl : 0 < l) (C : E →L[ℝ] F) |
| 111 | (d M N : ℝ) (v : E) (w : F) |
| 112 | (hshift : M • C v = (N * l ^ d) • w) |
| 113 | {r s : ℝ} (hr : 0 ≤ r) (hs : 0 ≤ s) (Y : E) : |
| 114 | C (Y + (M * (s ^ d - r ^ d)) • v) = |
| 115 | C Y + (N * ((l * s) ^ d - (l * r) ^ d)) • w := by |
| 116 | rw [map_add, map_smul] |
| 117 | calc |
| 118 | _ = C Y + (s ^ d - r ^ d) • (M • C v) := by |
| 119 | rw [smul_smul] |
| 120 | congr 2 |
| 121 | ring |
| 122 | _ = _ := by |
| 123 | rw [hshift, smul_smul, Real.mul_rpow hl.le hs, Real.mul_rpow hl.le hr] |
| 124 | congr 2 |
| 125 | ring |
| 126 | |
| 127 | theorem shifted_integral_scale {l a t r : ℝ} (hl : 0 < l) (ha : 0 ≤ a) |
| 128 | (hat : a ≤ t) (hr : 0 ≤ r) (C : E →L[ℝ] F) |
| 129 | (d M N u : ℝ) (v : E) (w : F) (f : ℝ × F → ℝ) (Y : E) |
| 130 | (hshift : M • C v = (N * l ^ d) • w) : |
| 131 | (∫ s in a..t, pull l C u f (s, Y + (M * (s ^ d - r ^ d)) • v)) = |
| 132 | (u / l) * ∫ x in (l * a)..(l * t), |
| 133 | f (x, C Y + (N * (x ^ d - (l * r) ^ d)) • w) := by |
| 134 | have he : (∫ s in a..t, pull l C u f (s, Y + (M * (s ^ d - r ^ d)) • v)) = |
| 135 | ∫ s in a..t, u * f (l * s, C Y + (N * ((l * s) ^ d - (l * r) ^ d)) • w) := by |
| 136 | apply intervalIntegral.integral_congr |
| 137 | intro s hs |
| 138 | have hsa : a ≤ s := (show s ∈ Icc a t by simpa only [uIcc_of_le hat] using hs).1 |
| 139 | simp only [pull, chartLinear_apply] |
| 140 | rw [shifted_chart hl C d M N v w hshift hr (ha.trans hsa) Y] |
| 141 | rw [he, intervalIntegral.integral_const_mul, |
| 142 | intervalIntegral.integral_comp_mul_left |
| 143 | (fun x => f (x, C Y + (N * (x ^ d - (l * r) ^ d)) • w)) hl.ne'] |
| 144 | simp only [smul_eq_mul, div_eq_mul_inv, mul_assoc] |
| 145 | |
| 146 | /-- Scaling of the actual compact radial integral, with transformed |
| 147 | endpoints and the exact transformed transport direction. -/ |
| 148 | theorem physicalCompact_pull {l a b d : ℝ} (hl : 0 < l) (ha : 0 < a) |
| 149 | (hab : a < b) (hd : 0 < d) (C : E →L[ℝ] F) (M N u : ℝ) (v : E) (w : F) |
| 150 | (hshift : M • C v = (N * l ^ d) • w) {f : ℝ × F → ℝ} |
| 151 | (hf : ContDiff ℝ ∞ f) (hs : RadialAlias.RadiallySupported (l * a) (l * b) f) |
| 152 | (z : ℝ × E) : |
| 153 | RadialPullback.physicalCompact d a b M v (pull l C u f) z = |
| 154 | (u / l) * RadialPullback.physicalCompact d (l * a) (l * b) N w f (chartLinear l C z) := by |
| 155 | have hp := pull_smooth l C u hf |
| 156 | have hsp := pull_supported hl C u hs |
| 157 | have hla : 0 < l * a := mul_pos hl ha |
| 158 | have hlab : l * a < l * b := mul_lt_mul_of_pos_left hab hl |
| 159 | by_cases hz : a ≤ z.1 |
| 160 | · rw [RadialPullback.physicalCompact_eq_radialIntegral ha hab hd hp hsp M v z hz, |
| 161 | RadialPullback.physicalCompact_eq_radialIntegral hla hlab hd hf hs N w |
| 162 | (chartLinear l C z) (mul_le_mul_of_nonneg_left hz hl.le)] |
| 163 | simp only [chartLinear_apply] |
| 164 | rw [shifted_integral_scale hl ha.le hz (ha.le.trans hz) C d M N u v w f z.2 hshift, |
| 165 | shifted_integral_scale hl ha.le hab.le (ha.le.trans hz) C d M N u v w f z.2 hshift, |
| 166 | interiorCutoff_power_scale hl ha.le (ha.le.trans hab.le) (ha.le.trans hz) d] |
| 167 | simp only [smul_eq_mul] |
| 168 | ring |
| 169 | · have hz' : z.1 < a := lt_of_not_ge hz |
| 170 | have hleft : RadialPullback.physicalCompact d a b M v (pull l C u f) z = 0 := by |
| 171 | by_contra hn |
| 172 | exact hz (RadialPullback.physicalCompact_supported ha hab hd hp hsp M v hn).1 |
| 173 | have hright : RadialPullback.physicalCompact d (l * a) (l * b) N w f (chartLinear l C z) = 0 := by |
| 174 | by_contra hn |
| 175 | have ht := (RadialPullback.physicalCompact_supported hla hlab hd hf hs N w hn).1 |
| 176 | exact (not_le_of_gt (mul_lt_mul_of_pos_left hz' hl)) ht |
| 177 | rw [hleft, hright, mul_zero] |
| 178 | |
| 179 | theorem weightedSource_pull {l : ℝ} (hl : l ≠ 0) (C : E →L[ℝ] F) |
| 180 | (u : ℝ) (f : ℝ × F → ℝ) : |
| 181 | PressureStream.weightedSource (pull l C u f) = |
| 182 | pull l C (u / l) (PressureStream.weightedSource f) := by |
| 183 | funext z |
| 184 | change z.1 * (u * f (chartLinear l C z)) = |
| 185 | (u / l) * ((l * z.1) * f (chartLinear l C z)) |
| 186 | field_simp |
| 187 | |
| 188 | /-- The stream potential has one less velocity length factor. -/ |
| 189 | theorem streamPotential_pull {l a b d : ℝ} (hl : 0 < l) (ha : 0 < a) |
| 190 | (hab : a < b) (hd : 0 < d) (C : E →L[ℝ] F) (M N u : ℝ) (v : E) (w : F) |
| 191 | (hshift : M • C v = (N * l ^ d) • w) {f : ℝ × F → ℝ} |
| 192 | (hf : ContDiff ℝ ∞ f) (hs : RadialAlias.RadiallySupported (l * a) (l * b) f) : |
| 193 | PressureStream.streamPotential d a b M v (pull l C u f) = |
| 194 | pull l C (u / l) (PressureStream.streamPotential d (l * a) (l * b) N w f) := by |
| 195 | funext z |
| 196 | change RadialPullback.physicalCompact d a b M v |
| 197 | (PressureStream.weightedSource (pull l C u f)) z / z.1 = _ |
| 198 | rw [weightedSource_pull hl.ne', physicalCompact_pull hl ha hab hd C M N (u / l) v w hshift |
| 199 | (PressureStream.weightedSource_contDiff hf) (PressureStream.weightedSource_supported hs)] |
| 200 | change (u / l / l * RadialPullback.physicalCompact d (l * a) (l * b) N w |
| 201 | (PressureStream.weightedSource f) (chartLinear l C z)) / z.1 = |
| 202 | (u / l) * (RadialPullback.physicalCompact d (l * a) (l * b) N w |
| 203 | (PressureStream.weightedSource f) (chartLinear l C z) / (l * z.1)) |
| 204 | simp only [div_eq_mul_inv, mul_inv_rev] |
| 205 | ring |
| 206 | |
| 207 | theorem fderiv_pull_apply (l : ℝ) (C : E →L[ℝ] F) (u : ℝ) {f : ℝ × F → ℝ} |
| 208 | {z : ℝ × E} (hf : DifferentiableAt ℝ f (chartLinear l C z)) (v : ℝ × E) : |
| 209 | fderiv ℝ (pull l C u f) z v = u * fderiv ℝ f (chartLinear l C z) (chartLinear l C v) := by |
| 210 | have hd := (hf.hasFDerivAt.comp z (chartLinear l C).hasFDerivAt).const_mul u |
| 211 | simp only [Function.comp_def] at hd |
| 212 | rw [show pull l C u f = fun x => u * f (chartLinear l C x) from rfl, hd.fderiv] |
| 213 | rfl |
| 214 | |
| 215 | theorem graphDr_pull (l : ℝ) (C : E →L[ℝ] F) (u : ℝ) |
| 216 | (knew kold : ℝ → ℝ) (v : E) (w : F) {f : ℝ × F → ℝ} {z : ℝ × E} |
| 217 | (hf : DifferentiableAt ℝ f (chartLinear l C z)) |
| 218 | (hvector : C (knew z.1 • v) = l • (kold (l * z.1) • w)) : |
| 219 | PressureStream.graphDr knew v (pull l C u f) z = |
| 220 | (u * l) * PressureStream.graphDr kold w f (chartLinear l C z) := by |
| 221 | rw [PressureStream.graphDr, fderiv_pull_apply l C u hf] |
| 222 | have he : chartLinear l C (PressureStream.radialVector knew v z) = |
| 223 | l • PressureStream.radialVector kold w (chartLinear l C z) := by |
| 224 | apply Prod.ext |
| 225 | · simp [chartLinear_apply, PressureStream.radialVector] |
| 226 | · exact hvector |
| 227 | rw [he, map_smul] |
| 228 | simp only [smul_eq_mul, PressureStream.graphDr] |
| 229 | ring |
| 230 | |
| 231 | theorem physicalSpeed_vector {l R : ℝ} (hl : 0 < l) (hR : 0 ≤ R) |
| 232 | (C : E →L[ℝ] F) (d M N : ℝ) (v : E) (w : F) |
| 233 | (hshift : M • C v = (N * l ^ d) • w) : |
| 234 | C (PressureStream.physicalSpeed d M R • v) = |
| 235 | l • (PressureStream.physicalSpeed d N (l * R) • w) := by |
| 236 | have hpow : l * l ^ (d - 1) = l ^ d := by |
| 237 | conv_lhs => lhs; rw [← Real.rpow_one l] |
| 238 | rw [← Real.rpow_add hl] |
| 239 | congr 1 |
| 240 | ring |
| 241 | calc |
| 242 | _ = (d * R ^ (d - 1)) • (M • C v) := by |
| 243 | simp only [PressureStream.physicalSpeed, RadialPullback.radialJacobian, map_smul, smul_smul] |
| 244 | _ = (d * R ^ (d - 1)) • ((N * l ^ d) • w) := by rw [hshift] |
| 245 | _ = _ := by |
| 246 | simp only [PressureStream.physicalSpeed, RadialPullback.radialJacobian, smul_smul, |
| 247 | Real.mul_rpow hl.le hR] |
| 248 | congr 1 |
| 249 | rw [show l * (d * (l ^ (d - 1) * R ^ (d - 1)) * N) = |
| 250 | d * R ^ (d - 1) * N * (l * l ^ (d - 1)) by ring, hpow] |
| 251 | ring |
| 252 | |
| 253 | end Pullback |
| 254 | |
| 255 | section TorusPullback |
| 256 | |
| 257 | open TorusInverse |
| 258 | |
| 259 | variable {S T : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 260 | [NormedAddCommGroup T] [NormedSpace ℝ T] |
| 261 | |
| 262 | noncomputable def parameterPull (l : ℝ) (P : S →L[ℝ] T) (u : ℝ) |
| 263 | (f : PressureStream.Lift T → ℝ) : PressureStream.Lift S → ℝ := |
| 264 | pull l (P.prodMap (ContinuousLinearMap.id ℝ Plane)) u f |
| 265 | |
| 266 | noncomputable def coverPull (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 267 | (f : PressureStream.Lift T → ℝ) : PressureStream.Lift S → ℝ := |
| 268 | pull l (P.prodMap (TemporalMeanUpdate.coverMap k)) u f |
| 269 | |
| 270 | theorem coverPull_eq (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 271 | (f : PressureStream.Lift T → ℝ) : |
| 272 | coverPull l P k u f = TemporalMeanUpdate.pullbackCover k (parameterPull l P u f) := rfl |
| 273 | |
| 274 | theorem parameterPull_smooth (l : ℝ) (P : S →L[ℝ] T) (u : ℝ) |
| 275 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) : |
| 276 | ContDiff ℝ ∞ (parameterPull l P u f) := pull_smooth _ _ _ hf |
| 277 | |
| 278 | theorem parameterPull_periodic (l : ℝ) (P : S →L[ℝ] T) (u : ℝ) |
| 279 | {f : PressureStream.Lift T → ℝ} (hp : PressureStream.TorusPeriodicLift f) : |
| 280 | PressureStream.TorusPeriodicLift (parameterPull l P u f) := by |
| 281 | intro r s Y k |
| 282 | change u * f (l * r, (P s, Y + ((k.1 : ℝ), (k.2 : ℝ)))) = u * f (l * r, (P s, Y)) |
| 283 | exact congrArg (fun q : ℝ => u * q) (hp (l * r) (P s) Y k) |
| 284 | |
| 285 | theorem coverPull_smooth (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 286 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) : |
| 287 | ContDiff ℝ ∞ (coverPull l P k u f) := pull_smooth _ _ _ hf |
| 288 | |
| 289 | theorem torusAverage_parameterPull (l : ℝ) (P : S →L[ℝ] T) (u : ℝ) |
| 290 | (f : PressureStream.Lift T → ℝ) (p : ℝ × S) : |
| 291 | PressureStream.torusAverage (parameterPull l P u f) p = |
| 292 | u * PressureStream.torusAverage f (l * p.1, P p.2) := by |
| 293 | change (∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, u * f (l * p.1, (P p.2, (x, y)))) = |
| 294 | u * (∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (l * p.1, (P p.2, (x, y)))) |
| 295 | simp only [intervalIntegral.integral_const_mul] |
| 296 | |
| 297 | theorem torusAverage_coverPull (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 298 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 299 | (hp : PressureStream.TorusPeriodicLift f) (p : ℝ × S) : |
| 300 | PressureStream.torusAverage (coverPull l P k u f) p = |
| 301 | u * PressureStream.torusAverage f (l * p.1, P p.2) := by |
| 302 | rw [coverPull_eq, TemporalMeanUpdate.torusAverage_pullbackCover k |
| 303 | (parameterPull_smooth l P u hf) (parameterPull_periodic l P u hp), torusAverage_parameterPull] |
| 304 | |
| 305 | theorem pressureMass_coverPull {l : ℝ} (hl : 0 < l) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 306 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 307 | (hp : PressureStream.TorusPeriodicLift f) (s : S) : |
| 308 | PressureStream.pressureMass (coverPull l P k u f) s = |
| 309 | (u / l) * PressureStream.pressureMass f (P s) := by |
| 310 | unfold PressureStream.pressureMass |
| 311 | simp_rw [torusAverage_coverPull l P k u hf hp] |
| 312 | rw [integral_const_mul, Measure.integral_comp_mul_left |
| 313 | (fun r => PressureStream.torusAverage f (r, P s)) l, |
| 314 | abs_of_pos (inv_pos.mpr hl)] |
| 315 | simp only [smul_eq_mul, div_eq_mul_inv, mul_assoc] |
| 316 | |
| 317 | theorem pressureSource_coverPull {l a b : ℝ} (hl : 0 < l) (hab : a < b) |
| 318 | (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) {f : PressureStream.Lift T → ℝ} |
| 319 | (hf : ContDiff ℝ ∞ f) (hp : PressureStream.TorusPeriodicLift f) : |
| 320 | PressureStream.pressureSource a b hab (coverPull l P k u f) = |
| 321 | coverPull l P k u (PressureStream.pressureSource (l * a) (l * b) |
| 322 | (mul_lt_mul_of_pos_left hab hl) f) := by |
| 323 | funext z |
| 324 | change u * f (l * z.1, (P z.2.1, TemporalMeanUpdate.coverMap k z.2.2)) - |
| 325 | PressureStream.rho a b hab z.1 * PressureStream.pressureMass (coverPull l P k u f) z.2.1 = |
| 326 | u * (f (l * z.1, (P z.2.1, TemporalMeanUpdate.coverMap k z.2.2)) - |
| 327 | PressureStream.rho (l * a) (l * b) (mul_lt_mul_of_pos_left hab hl) (l * z.1) * |
| 328 | PressureStream.pressureMass f (P z.2.1)) |
| 329 | rw [pressureMass_coverPull hl P k u hf hp, rho_scale hl hab] |
| 330 | simp only [div_eq_mul_inv] |
| 331 | ring |
| 332 | |
| 333 | theorem centered_coverPull (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 334 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 335 | (hp : PressureStream.TorusPeriodicLift f) : |
| 336 | TemporalMeanUpdate.centered (coverPull l P k u f) = |
| 337 | coverPull l P k u (TemporalMeanUpdate.centered f) := by |
| 338 | funext z |
| 339 | change u * f (l * z.1, (P z.2.1, TemporalMeanUpdate.coverMap k z.2.2)) - |
| 340 | PressureStream.torusAverage (coverPull l P k u f) (z.1, z.2.1) = |
| 341 | u * (f (l * z.1, (P z.2.1, TemporalMeanUpdate.coverMap k z.2.2)) - |
| 342 | PressureStream.torusAverage f (l * z.1, P z.2.1)) |
| 343 | rw [torusAverage_coverPull l P k u hf hp] |
| 344 | ring |
| 345 | |
| 346 | /-- Naturality of the actual pressure formula, including its normalized |
| 347 | mass correction and compactification, on a common covering. -/ |
| 348 | theorem meanPressure_coverPull {l a b d : ℝ} (hl : 0 < l) (ha : 0 < a) |
| 349 | (hab : a < b) (hd : 0 < d) (P : S →L[ℝ] T) (k : ℕ) (M N u : ℝ) |
| 350 | (v w : Plane) (hshift : M • TemporalMeanUpdate.coverMap k v = (N * l ^ d) • w) |
| 351 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 352 | (hp : PressureStream.TorusPeriodicLift f) |
| 353 | (hs : RadialAlias.RadiallySupported (l * a) (l * b) f) (z : PressureStream.Lift S) : |
| 354 | PressureStream.meanPressure d a b M hab v (coverPull l P k u f) z = |
| 355 | coverPull l P k (u / l) |
| 356 | (PressureStream.meanPressure d (l * a) (l * b) N (mul_lt_mul_of_pos_left hab hl) w f) z := by |
| 357 | have hvector : M • (P.prodMap (TemporalMeanUpdate.coverMap k)) ((0 : S), v) = |
| 358 | (N * l ^ d) • ((0 : T), w) := by |
| 359 | apply Prod.ext |
| 360 | · simp |
| 361 | · exact hshift |
| 362 | unfold PressureStream.meanPressure |
| 363 | rw [pressureSource_coverPull hl hab P k u hf hp] |
| 364 | exact physicalCompact_pull hl ha hab hd _ M N u _ _ hvector |
| 365 | (PressureStream.pressureSource_contDiff (mul_lt_mul_of_pos_left hab hl) hf hs) |
| 366 | (PressureStream.pressureSource_supported (mul_lt_mul_of_pos_left hab hl) hs) z |
| 367 | |
| 368 | theorem absoluteInverse_const_mul (c : ℂ) (f : Plane → ℂ) (Y : Plane) : |
| 369 | TemporalMeanUpdate.absoluteInverse (fun z => c * f z) Y = |
| 370 | c * TemporalMeanUpdate.absoluteInverse f Y := by |
| 371 | unfold TemporalMeanUpdate.absoluteInverse TorusInverse.directionalInverse TorusInverse.series |
| 372 | simp only [TorusInverse.inverseCoeff, TemporalMeanUpdate.coefficient_const_mul] |
| 373 | rw [← tsum_mul_left] |
| 374 | apply tsum_congr |
| 375 | intro k |
| 376 | ring |
| 377 | |
| 378 | theorem temporalInverse_parameterPull (l : ℝ) (P : S →L[ℝ] T) (u : ℝ) |
| 379 | (f : PressureStream.Lift T → ℝ) (z : PressureStream.Lift S) : |
| 380 | TemporalMeanUpdate.temporalInverse (parameterPull l P u f) z = |
| 381 | parameterPull l P u (TemporalMeanUpdate.temporalInverse f) z := by |
| 382 | change (TemporalMeanUpdate.absoluteInverse |
| 383 | (fun Y => Complex.ofReal (u * f (l * z.1, (P z.2.1, Y)))) z.2.2).re = |
| 384 | u * (TemporalMeanUpdate.absoluteInverse |
| 385 | (fun Y => (f (l * z.1, (P z.2.1, Y)) : ℂ)) z.2.2).re |
| 386 | simp_rw [Complex.ofReal_mul] |
| 387 | rw [absoluteInverse_const_mul] |
| 388 | simp only [Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] |
| 389 | |
| 390 | theorem temporalInverse_coverPull (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 391 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 392 | (hp : PressureStream.TorusPeriodicLift f) |
| 393 | (hm : ∀ p, PressureStream.torusAverage f p = 0) (z : PressureStream.Lift S) : |
| 394 | TemporalMeanUpdate.temporalInverse (coverPull l P k u f) z = |
| 395 | (ChartScales.Tg ^ k)⁻¹ * coverPull l P k u (TemporalMeanUpdate.temporalInverse f) z := by |
| 396 | have hmean : ∀ p, PressureStream.torusAverage (parameterPull l P u f) p = 0 := by |
| 397 | intro p |
| 398 | rw [torusAverage_parameterPull, hm, mul_zero] |
| 399 | have he := TemporalMeanUpdate.temporalInverse_coverMap |
| 400 | (parameterPull_smooth l P u hf) (parameterPull_periodic l P u hp) hmean k z |
| 401 | rw [temporalInverse_parameterPull] at he |
| 402 | exact he |
| 403 | |
| 404 | theorem temporalInverse_centered_coverPull (l : ℝ) (P : S →L[ℝ] T) (k : ℕ) (u : ℝ) |
| 405 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 406 | (hp : PressureStream.TorusPeriodicLift f) (z : PressureStream.Lift S) : |
| 407 | TemporalMeanUpdate.temporalInverse (TemporalMeanUpdate.centered (coverPull l P k u f)) z = |
| 408 | (ChartScales.Tg ^ k)⁻¹ * coverPull l P k u |
| 409 | (TemporalMeanUpdate.temporalInverse (TemporalMeanUpdate.centered f)) z := by |
| 410 | rw [centered_coverPull l P k u hf hp] |
| 411 | exact temporalInverse_coverPull l P k u (TemporalMeanUpdate.centered_smooth hf) |
| 412 | (TemporalMeanUpdate.centered_periodic hp) (TemporalMeanUpdate.centered_zeroMean hf) z |
| 413 | |
| 414 | /-- The common-index form of the actual temporal update. A common index |
| 415 | is independent of the dyadic band; the native recipe is its specialization. -/ |
| 416 | noncomputable def temporalAtIndex (h : ℝ) (n i : ℕ) |
| 417 | (f : PressureStream.Lift S → ℝ) (z : PressureStream.Lift S) : ℝ := |
| 418 | -((ChartScales.Tg ^ i * ChartScales.Q n ^ (1 + h))⁻¹) * |
| 419 | TemporalMeanUpdate.temporalInverse (TemporalMeanUpdate.centered f) z |
| 420 | |
| 421 | end TorusPullback |
| 422 | |
| 423 | section RankScaling |
| 424 | |
| 425 | theorem normalizeDebt_scale {l u ell U : ℝ} (hl : l ≠ 0) (hu : u ≠ 0) |
| 426 | (hell : ell ≠ 0) (hU : U ≠ 0) (d : MeanRankUpdate.Debt) : |
| 427 | MeanRankUpdate.normalizeDebt (l * ell) (u * U) (MeanRankUpdate.scaleDebt l u d) = |
| 428 | MeanRankUpdate.normalizeDebt ell U d := by |
| 429 | ext i |
| 430 | fin_cases i <;> simp [MeanRankUpdate.normalizeDebt, MeanRankUpdate.scaleDebt] <;> |
| 431 | field_simp [hl, hu, hell, hU] |
| 432 | |
| 433 | /-- Naturality of the constructed five-row inverse, not just of its rows. -/ |
| 434 | theorem rankAngular_scale {l u ell U : ℝ} (hl : l ≠ 0) (hu : u ≠ 0) |
| 435 | (hell : ell ≠ 0) (hU : U ≠ 0) (lam C a b : ℝ) (d : MeanRankUpdate.Debt) (r : ℝ) : |
| 436 | MeanRankUpdate.angularIncrement lam C a b (l * ell) (u * U) |
| 437 | (MeanRankUpdate.scaleDebt l u d) (l * r) = |
| 438 | u * MeanRankUpdate.angularIncrement lam C a b ell U d r := by |
| 439 | unfold MeanRankUpdate.angularIncrement |
| 440 | rw [normalizeDebt_scale hl hu hell hU] |
| 441 | simp only [MeanRankUpdate.scaleField, mul_div_mul_left _ _ hl] |
| 442 | ring |
| 443 | |
| 444 | theorem rankDesiredAxial_scale {l u ell U : ℝ} (hl : l ≠ 0) (hu : u ≠ 0) |
| 445 | (hell : ell ≠ 0) (hU : U ≠ 0) (lam C a b : ℝ) (d : MeanRankUpdate.Debt) (r : ℝ) : |
| 446 | MeanRankUpdate.desiredAxialIncrement lam C a b (l * ell) (u * U) |
| 447 | (MeanRankUpdate.scaleDebt l u d) (l * r) = |
| 448 | u * MeanRankUpdate.desiredAxialIncrement lam C a b ell U d r := by |
| 449 | unfold MeanRankUpdate.desiredAxialIncrement |
| 450 | rw [normalizeDebt_scale hl hu hell hU] |
| 451 | simp only [MeanRankUpdate.scaleField, mul_div_mul_left _ _ hl] |
| 452 | ring |
| 453 | |
| 454 | end RankScaling |
| 455 | |
| 456 | section CommonTemporalBounds |
| 457 | |
| 458 | open TorusInverse |
| 459 | |
| 460 | noncomputable def commonRatio (h : ℝ) (n i : ℕ) : ℝ := |
| 461 | ChartScales.Tg ^ ChartScales.nativeIndex h n / ChartScales.Tg ^ i |
| 462 | |
| 463 | theorem commonRatio_pos (h : ℝ) (n i : ℕ) : 0 < commonRatio h n i := |
| 464 | div_pos (pow_pos ChartScales.Tg_pos _) (pow_pos ChartScales.Tg_pos _) |
| 465 | |
| 466 | theorem commonRatio_le {h : ℝ} {n i D : ℕ} |
| 467 | (hgap : ChartScales.nativeIndex h n ≤ i + D) : commonRatio h n i ≤ ChartScales.Tg ^ D := by |
| 468 | apply (div_le_iff₀ (pow_pos ChartScales.Tg_pos i)).mpr |
| 469 | simpa only [pow_add, mul_comm] using pow_le_pow_right₀ ChartScales.Tg_one_lt.le hgap |
| 470 | |
| 471 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 472 | |
| 473 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 474 | theorem temporalAtIndex_eq_native (h : ℝ) (n i : ℕ) (f : PressureStream.Lift S → ℝ) : |
| 475 | temporalAtIndex h n i f = fun z => commonRatio h n i * TemporalMeanUpdate.desiredIncrement h n f z := by |
| 476 | funext z |
| 477 | unfold temporalAtIndex commonRatio TemporalMeanUpdate.desiredIncrement |
| 478 | TemporalMeanUpdate.chartPrefactor ChartScales.timeCoefficient |
| 479 | field_simp [pow_ne_zero _ ChartScales.Tg_pos.ne', |
| 480 | (Real.rpow_pos_of_pos (ChartScales.Q_pos n) (1 + h)).ne'] |
| 481 | |
| 482 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 483 | theorem temporalAtIndex_periodic (h : ℝ) (n i : ℕ) (f : PressureStream.Lift S → ℝ) : |
| 484 | PressureStream.TorusPeriodicLift (temporalAtIndex h n i f) := by |
| 485 | intro r s Y k |
| 486 | exact congrArg (-((ChartScales.Tg ^ i * ChartScales.Q n ^ (1 + h))⁻¹) * ·) |
| 487 | (TemporalMeanUpdate.temporalInverse_periodic (TemporalMeanUpdate.centered f) r s Y k) |
| 488 | |
| 489 | omit [NormedAddCommGroup S] [NormedSpace ℝ S] in |
| 490 | theorem temporalAtIndex_supported (h : ℝ) (n i : ℕ) {a b : ℝ} |
| 491 | {f : PressureStream.Lift S → ℝ} (hs : RadialAlias.RadiallySupported a b f) : |
| 492 | RadialAlias.RadiallySupported a b (temporalAtIndex h n i f) := by |
| 493 | intro z hz |
| 494 | apply TemporalMeanUpdate.temporalInverse_supported (TemporalMeanUpdate.centered_supported hs) |
| 495 | intro hi |
| 496 | exact hz (by simp only [temporalAtIndex, hi, mul_zero]) |
| 497 | |
| 498 | theorem meanClass_temporalAtIndex_of_native (s : WeightedClasses.StripData (PressureStream.Lift S)) |
| 499 | {h α : ℝ} {f : ℕ → PressureStream.Lift S → ℝ} (index : ℕ → ℕ) (D : ℕ) |
| 500 | (hgap : ∀ n, ChartScales.nativeIndex h n ≤ index n + D) |
| 501 | (hf : WeightedClasses.MeanClass s α (fun n => TemporalMeanUpdate.desiredIncrement h n (f n))) : |
| 502 | WeightedClasses.MeanClass s α (fun n => temporalAtIndex h n (index n) (f n)) := by |
| 503 | have hb : WeightedClasses.BandBound s 0 (fun n => commonRatio h n (index n)) := by |
| 504 | refine ⟨ChartScales.Tg ^ D, (pow_pos ChartScales.Tg_pos D).le, 0, ?_⟩ |
| 505 | intro n |
| 506 | simp only [Real.norm_eq_abs, abs_of_pos (commonRatio_pos h n (index n)), Real.rpow_zero, |
| 507 | pow_zero, mul_one] |
| 508 | exact commonRatio_le (hgap n) |
| 509 | have hout := hf.band_smul hb |
| 510 | simpa only [add_zero, temporalAtIndex_eq_native, smul_eq_mul] using hout |
| 511 | |
| 512 | noncomputable def fastAtIndex (h : ℝ) (n i : ℕ) (f : PressureStream.Lift S → ℝ) |
| 513 | (z : PressureStream.Lift S) : ℝ := |
| 514 | (ChartScales.Tg ^ i * ChartScales.Q n ^ (1 + h)) * |
| 515 | PressureStream.graphDz ((0 : S), vector .temporal) f z |
| 516 | |
| 517 | variable [FiniteDimensional ℝ S] |
| 518 | |
| 519 | theorem temporalAtIndex_smooth (h : ℝ) (n i : ℕ) {f : PressureStream.Lift S → ℝ} |
| 520 | (hf : ContDiff ℝ ∞ f) (hp : PressureStream.TorusPeriodicLift f) : |
| 521 | ContDiff ℝ ∞ (temporalAtIndex h n i f) := |
| 522 | contDiff_const.mul (TemporalMeanUpdate.temporalInverse_smooth |
| 523 | (TemporalMeanUpdate.centered_smooth hf) (TemporalMeanUpdate.centered_periodic hp)) |
| 524 | |
| 525 | theorem temporalAtIndex_fast_cancellation (h : ℝ) (n i : ℕ) {f : PressureStream.Lift S → ℝ} |
| 526 | (hf : ContDiff ℝ ∞ f) (hp : PressureStream.TorusPeriodicLift f) (z : PressureStream.Lift S) : |
| 527 | fastAtIndex h n i (temporalAtIndex h n i f) z = -TemporalMeanUpdate.centered f z := by |
| 528 | let c := ChartScales.Tg ^ i * ChartScales.Q n ^ (1 + h) |
| 529 | have hc : c ≠ 0 := (mul_pos (pow_pos ChartScales.Tg_pos _) |
| 530 | (Real.rpow_pos_of_pos (ChartScales.Q_pos n) _)).ne' |
| 531 | have hi := TemporalMeanUpdate.temporalInverse_smooth |
| 532 | (TemporalMeanUpdate.centered_smooth hf) (TemporalMeanUpdate.centered_periodic hp) |
| 533 | have hd := (((hi.differentiable (by simp)) z).hasFDerivAt).const_smul (-c⁻¹) |
| 534 | change HasFDerivAt (temporalAtIndex h n i f) _ z at hd |
| 535 | rw [fastAtIndex, PressureStream.graphDz, hd.fderiv] |
| 536 | change c * (-c⁻¹ * PressureStream.graphDz ((0 : S), vector .temporal) |
| 537 | (TemporalMeanUpdate.temporalInverse (TemporalMeanUpdate.centered f)) z) = _ |
| 538 | rw [TemporalMeanUpdate.temporalInverse_solves (TemporalMeanUpdate.centered_smooth hf) |
| 539 | (TemporalMeanUpdate.centered_periodic hp) (TemporalMeanUpdate.centered_zeroMean hf)] |
| 540 | field_simp |
| 541 | |
| 542 | end CommonTemporalBounds |
| 543 | |
| 544 | section PhysicalFamilies |
| 545 | |
| 546 | open TorusInverse |
| 547 | |
| 548 | theorem coverMap_eq_coverPower (i : ℕ) (Y : Plane) : |
| 549 | TemporalMeanUpdate.coverMap i Y = CommonCoverSolve.coverPower i Y := by |
| 550 | induction i with |
| 551 | | zero => rfl |
| 552 | | succ i hi => |
| 553 | change TemporalMeanUpdate.coverLinear (TemporalMeanUpdate.coverMap i Y) = |
| 554 | CommonCoverSolve.coverEquiv (CommonCoverSolve.coverPower i Y) |
| 555 | rw [hi, TemporalMeanUpdate.coverLinear_apply, CommonCoverSolve.coverEquiv_apply, |
| 556 | SlotGeometry.cover_apply] |
| 557 | rfl |
| 558 | |
| 559 | theorem coverMap_radial (i : ℕ) : |
| 560 | TemporalMeanUpdate.coverMap i (vector .radial) = ChartScales.Lambda ^ i • vector .radial := by |
| 561 | rw [coverMap_eq_coverPower, CommonCoverSolve.coverPower_apply] |
| 562 | exact PhysicalGraphBounds.cover_pow_radialDirection i |
| 563 | |
| 564 | noncomputable def chartScale (n : ℕ) : ℝ := ChartScales.Q n ^ (-(1 / 2 : ℝ)) |
| 565 | |
| 566 | theorem chartScale_pos (n : ℕ) : 0 < chartScale n := |
| 567 | Real.rpow_pos_of_pos (ChartScales.Q_pos n) _ |
| 568 | |
| 569 | noncomputable def radialFrequency (_h : ℝ) (n i : ℕ) (d M : ℝ) : ℝ := |
| 570 | M * ChartScales.Lambda ^ i * ChartScales.Q n ^ (d / 2) |
| 571 | |
| 572 | theorem radialFrequency_scale (h : ℝ) (n i : ℕ) (d M : ℝ) : |
| 573 | radialFrequency h n i d M * chartScale n ^ d = M * ChartScales.Lambda ^ i := by |
| 574 | have hs : chartScale n ^ d = ChartScales.Q n ^ (-(d / 2)) := by |
| 575 | unfold chartScale |
| 576 | rw [← Real.rpow_mul (ChartScales.Q_pos n).le] |
| 577 | congr 1 |
| 578 | ring |
| 579 | rw [hs, radialFrequency, mul_assoc, ← Real.rpow_add (ChartScales.Q_pos n)] |
| 580 | simp |
| 581 | |
| 582 | theorem radialFrequency_shift (h : ℝ) (n i : ℕ) (d M : ℝ) : |
| 583 | M • TemporalMeanUpdate.coverMap i (vector .radial) = |
| 584 | (radialFrequency h n i d M * chartScale n ^ d) • vector .radial := by |
| 585 | rw [coverMap_radial, smul_smul, radialFrequency_scale] |
| 586 | |
| 587 | /-- The physical slow variables are `(z,τ)` with `τ=1-t`. -/ |
| 588 | noncomputable def slowToChart (h : ℝ) (n : ℕ) : Plane →L[ℝ] Plane := |
| 589 | (ChartScales.Q n ^ (-CoordinateAlgebra.D h) • ContinuousLinearMap.fst ℝ ℝ ℝ).prod |
| 590 | (ChartScales.Q n ^ (-1 : ℝ) • ContinuousLinearMap.snd ℝ ℝ ℝ) |
| 591 | |
| 592 | noncomputable def physicalToChart (h : ℝ) (n i : ℕ) : |
| 593 | PressureStream.Lift Plane →L[ℝ] PressureStream.Lift Plane := |
| 594 | chartLinear (chartScale n) ((slowToChart h n).prodMap (TemporalMeanUpdate.coverMap i)) |
| 595 | |
| 596 | @[simp] theorem physicalToChart_apply (h : ℝ) (n i : ℕ) (z : PressureStream.Lift Plane) : |
| 597 | physicalToChart h n i z = (chartScale n * z.1, |
| 598 | ((ChartScales.Q n ^ (-CoordinateAlgebra.D h) * z.2.1.1, |
| 599 | ChartScales.Q n ^ (-1 : ℝ) * z.2.1.2), TemporalMeanUpdate.coverMap i z.2.2)) := rfl |
| 600 | |
| 601 | theorem pressure_unit_factor (h : ℝ) (n : ℕ) : |
| 602 | ChartScales.Q n ^ (-(2 * CoordinateAlgebra.A h + 1 / 2)) / chartScale n = |
| 603 | ChartScales.Q n ^ (-(2 * CoordinateAlgebra.A h)) := by |
| 604 | unfold chartScale |
| 605 | rw [← Real.rpow_sub (ChartScales.Q_pos n)] |
| 606 | congr 1 |
| 607 | ring |
| 608 | |
| 609 | noncomputable def reconstructPressureFamily (r : ℕ → CorrectionState.ReconstructionData) |
| 610 | (c : CorrectionState.Context (PressureStream.Lift Plane)) |
| 611 | (u : CorrectionState.State (PressureStream.Lift Plane)) : |
| 612 | CorrectionState.State (PressureStream.Lift Plane) := |
| 613 | { u with pressure := fun n => (CorrectionState.reconstructPressure (r n) c u).pressure n } |
| 614 | |
| 615 | end PhysicalFamilies |
| 616 | |
| 617 | section ReconstructedStream |
| 618 | |
| 619 | variable {E F : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 620 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 621 | |
| 622 | end ReconstructedStream |
| 623 | |
| 624 | section PressureAlias |
| 625 | |
| 626 | open TorusInverse |
| 627 | |
| 628 | variable {S T : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 629 | [NormedAddCommGroup T] [NormedSpace ℝ T] |
| 630 | |
| 631 | theorem pressureAlias_eq_source_sub_derivative {d a b M : ℝ} |
| 632 | (ha : 0 < a) (hab : a < b) (hd : 0 < d) (v : Plane) |
| 633 | {f : PressureStream.Lift S → ℝ} (hf : ContDiff ℝ ∞ f) |
| 634 | (hs : RadialAlias.RadiallySupported a b f) (z : PressureStream.Lift S) : |
| 635 | PressureStream.pressureAlias d a b M hab v f z = |
| 636 | PressureStream.pressureSource a b hab f z - |
| 637 | PressureStream.graphDr (PressureStream.physicalSpeed d M) ((0 : S), v) |
| 638 | (PressureStream.meanPressure d a b M hab v f) z := by |
| 639 | have he := PressureStream.meanPressure_radial_residual_global (M := M) ha hab hd v hf hs z |
| 640 | unfold PressureStream.pressureSource |
| 641 | linarith |
| 642 | |
| 643 | theorem pressureAlias_coverPull {l a b d : ℝ} (hl : 0 < l) (ha : 0 < a) |
| 644 | (hab : a < b) (hd : 0 < d) (P : S →L[ℝ] T) (k : ℕ) (M N u : ℝ) |
| 645 | (v w : Plane) (hshift : M • TemporalMeanUpdate.coverMap k v = (N * l ^ d) • w) |
| 646 | {f : PressureStream.Lift T → ℝ} (hf : ContDiff ℝ ∞ f) |
| 647 | (hp : PressureStream.TorusPeriodicLift f) |
| 648 | (hs : RadialAlias.RadiallySupported (l * a) (l * b) f) |
| 649 | (z : PressureStream.Lift S) (hz : 0 ≤ z.1) : |
| 650 | PressureStream.pressureAlias d a b M hab v (coverPull l P k u f) z = |
| 651 | coverPull l P k u |
| 652 | (PressureStream.pressureAlias d (l * a) (l * b) N (mul_lt_mul_of_pos_left hab hl) w f) z := by |
| 653 | let C := P.prodMap (TemporalMeanUpdate.coverMap k) |
| 654 | have hvector : M • C ((0 : S), v) = (N * l ^ d) • ((0 : T), w) := by |
| 655 | apply Prod.ext |
| 656 | · simp [C] |
| 657 | · exact hshift |
| 658 | have hpressure : PressureStream.meanPressure d a b M hab v (coverPull l P k u f) = |
| 659 | pull l C (u / l) (PressureStream.meanPressure d (l * a) (l * b) N |
| 660 | (mul_lt_mul_of_pos_left hab hl) w f) := by |
| 661 | funext x |
| 662 | exact meanPressure_coverPull hl ha hab hd P k M N u v w hshift hf hp hs x |
| 663 | have hps := PressureStream.meanPressure_contDiff (M := N) (mul_pos hl ha) |
| 664 | (mul_lt_mul_of_pos_left hab hl) hd w hf hs |
| 665 | rw [pressureAlias_eq_source_sub_derivative ha hab hd v (coverPull_smooth l P k u hf) |
| 666 | (pull_supported hl C u hs), pressureSource_coverPull hl hab P k u hf hp, hpressure, |
| 667 | graphDr_pull l C (u / l) _ _ ((0 : S), v) ((0 : T), w) |
| 668 | ((hps.differentiable (by simp)) _) |
| 669 | (physicalSpeed_vector hl hz C d M N ((0 : S), v) ((0 : T), w) hvector), |
| 670 | div_mul_cancel₀ _ hl.ne'] |
| 671 | change u * PressureStream.pressureSource (l * a) (l * b) _ f (chartLinear l C z) - |
| 672 | u * PressureStream.graphDr _ _ _ (chartLinear l C z) = |
| 673 | u * PressureStream.pressureAlias d (l * a) (l * b) N _ w f (chartLinear l C z) |
| 674 | rw [pressureAlias_eq_source_sub_derivative (mul_pos hl ha) (mul_lt_mul_of_pos_left hab hl) hd w hf hs] |
| 675 | ring |
| 676 | |
| 677 | end PressureAlias |
| 678 | |
| 679 | section CommonTemporalReconstruction |
| 680 | |
| 681 | open TorusInverse |
| 682 | |
| 683 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 684 | |
| 685 | /-- The potential uses the explicitly chosen common torus index. -/ |
| 686 | noncomputable def commonTemporalPotential (r : ℕ → CorrectionState.ReconstructionData) |
| 687 | (h : ℝ) (index : ℕ → ℕ) (f : ℕ → PressureStream.Lift S → ℝ) (n : ℕ) : |
| 688 | PressureStream.Lift S → ℝ := |
| 689 | PressureStream.streamPotential (r n).exponent (r n).inner (r n).outer ((r n).frequency n) |
| 690 | ((0 : S), (r n).radialDirection) (temporalAtIndex h n (index n) (f n)) |
| 691 | |
| 692 | noncomputable def commonTemporalFields (r : ℕ → CorrectionState.ReconstructionData) |
| 693 | (h : ℝ) (index : ℕ → ℕ) (epsilon : ℕ → ℝ) (axial : S × Plane) |
| 694 | (fθ fz : ℕ → PressureStream.Lift S → ℝ) : MeanIncrementBounds.Triple (PressureStream.Lift S) where |
| 695 | radial := fun n => PressureStream.streamBeta (epsilon n • axial) |
| 696 | (commonTemporalPotential r h index fz n) |
| 697 | angular := fun n => temporalAtIndex h n (index n) (fθ n) |
| 698 | axial := fun n => PressureStream.streamGamma |
| 699 | (PressureStream.physicalSpeed (r n).exponent ((r n).frequency n)) |
| 700 | ((0 : S), (r n).radialDirection) (commonTemporalPotential r h index fz n) |
| 701 | |
| 702 | noncomputable def commonTemporalIncrement (r : ℕ → CorrectionState.ReconstructionData) |
| 703 | (h : ℝ) (index : ℕ → ℕ) (axial : S × Plane) |
| 704 | (c : CorrectionState.Context (PressureStream.Lift S)) |
| 705 | (u : CorrectionState.State (PressureStream.Lift S)) : |
| 706 | MeanIncrementBounds.Triple (PressureStream.Lift S) := |
| 707 | commonTemporalFields r h index c.operators.epsilon axial (u.thetaResidual c) (u.axialResidual c) |
| 708 | |
| 709 | variable [FiniteDimensional ℝ S] |
| 710 | |
| 711 | end CommonTemporalReconstruction |
| 712 | |
| 713 | section PhysicalTemporalFields |
| 714 | |
| 715 | open TorusInverse |
| 716 | |
| 717 | end PhysicalTemporalFields |
| 718 | |
| 719 | section DebtTransport |
| 720 | |
| 721 | open TorusInverse |
| 722 | |
| 723 | variable {S T : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 724 | [NormedAddCommGroup T] [NormedSpace ℝ T] |
| 725 | |
| 726 | noncomputable def sourceMoment (m : ℕ) (f : PressureStream.Lift S → ℝ) (s : S) : ℝ := |
| 727 | PressureStream.pressureMass (fun z => z.1 ^ m * f z) s |
| 728 | |
| 729 | noncomputable def sourceDebt (g qθ qz : PressureStream.Lift S → ℝ) (s : S) : MeanRankUpdate.Debt := |
| 730 | ![sourceMoment 0 g s, sourceMoment 2 qθ s, sourceMoment 1 qz s - (1 / 2 : ℝ) * sourceMoment 2 g s] |
| 731 | |
| 732 | theorem sourceMoment_coverPull {l : ℝ} (hl : 0 < l) (P : S →L[ℝ] T) |
| 733 | (k m : ℕ) (u : ℝ) {f : PressureStream.Lift T → ℝ} |
| 734 | (hf : ContDiff ℝ ∞ f) (hp : PressureStream.TorusPeriodicLift f) (s : S) : |
| 735 | sourceMoment m (coverPull l P k u f) s = |
| 736 | (u / l ^ (m + 1)) * sourceMoment m f (P s) := by |
| 737 | have he : (fun z : PressureStream.Lift S => z.1 ^ m * coverPull l P k u f z) = |
| 738 | coverPull l P k (u / l ^ m) (fun z => z.1 ^ m * f z) := by |
| 739 | funext z |
| 740 | change z.1 ^ m * (u * f (chartLinear l (P.prodMap (TemporalMeanUpdate.coverMap k)) z)) = |
| 741 | (u / l ^ m) * ((l * z.1) ^ m * f (chartLinear l (P.prodMap (TemporalMeanUpdate.coverMap k)) z)) |
| 742 | rw [mul_pow] |
| 743 | field_simp |
| 744 | have hfp : PressureStream.TorusPeriodicLift (fun z : PressureStream.Lift T => z.1 ^ m * f z) := by |
| 745 | intro r t Y j |
| 746 | exact congrArg (r ^ m * ·) (hp r t Y j) |
| 747 | unfold sourceMoment |
| 748 | rw [he, pressureMass_coverPull hl P k (u / l ^ m) ((contDiff_fst.pow m).mul hf) hfp] |
| 749 | rw [pow_succ] |
| 750 | field_simp |
| 751 | |
| 752 | omit [NormedAddCommGroup T] [NormedSpace ℝ T] in |
| 753 | theorem stateDebt_eq_sourceDebt (c : CorrectionState.Context (PressureStream.Lift S)) |
| 754 | (u : CorrectionState.State (PressureStream.Lift S)) (n : ℕ) (s : S) : |
| 755 | CorrectionState.debt c u n s = |
| 756 | sourceDebt (u.gr c n) |
| 757 | ((MeanIncrementBounds.thetaAxial c.base u.mean + u.covariance 2 1) n) |
| 758 | ((MeanIncrementBounds.axialAxial c.base u.mean + u.covariance 2 2) n) s := rfl |
| 759 | |
| 760 | end DebtTransport |
| 761 | |
| 762 | section RankFamilies |
| 763 | |
| 764 | variable {S T : Type} |
| 765 | |
| 766 | end RankFamilies |
| 767 | |
| 768 | section PhysicalProfile |
| 769 | |
| 770 | open TorusInverse |
| 771 | |
| 772 | end PhysicalProfile |
| 773 | |
| 774 | end |
| 775 | |
| 776 | end NavierStokes.MeanChartCompatibility |