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.FiveRowRank |
| 2 | import NavierStokes.FiveProfileMoments |
| 3 | import NavierStokes.PressureStream |
| 4 | import NavierStokes.WeightedClasses |
| 5 | import NavierStokes.PhysicalCoordinateBounds |
| 6 | import NavierStokes.ParametricFlatFactor |
| 7 | import NavierStokes.ReservedPatches |
| 8 | import Mathlib.MeasureTheory.Measure.Haar.NormedSpace |
| 9 | |
| 10 | /-! |
| 11 | # The physical five-row mean update |
| 12 | |
| 13 | The update is the constructed power-moment inverse, transported with the |
| 14 | physical length and velocity scales. Each moment carries its own scale. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | namespace NavierStokes.MeanRankUpdate |
| 20 | |
| 21 | open Set Function MeasureTheory Filter |
| 22 | open scoped BigOperators ContDiff Topology |
| 23 | |
| 24 | abbrev Debt := FiveRowRank.Debt |
| 25 | |
| 26 | noncomputable def scaleField (ell U : ℝ) (f : ℝ → ℝ) : ℝ → ℝ := |
| 27 | fun r => U * f (r / ell) |
| 28 | |
| 29 | /-- Pressure, angular moment, and axial moment have distinct length powers. -/ |
| 30 | noncomputable def scaleDebt (ell U : ℝ) (d : Debt) : Debt := |
| 31 | ![U ^ 2 * d 0, ell ^ 3 * U ^ 2 * d 1, ell ^ 2 * U ^ 2 * d 2] |
| 32 | |
| 33 | noncomputable def normalizeDebt (ell U : ℝ) (d : Debt) : Debt := |
| 34 | ![d 0 / U ^ 2, d 1 / (ell ^ 3 * U ^ 2), d 2 / (ell ^ 2 * U ^ 2)] |
| 35 | |
| 36 | theorem scale_normalizeDebt {ell U : ℝ} (hell : ell ≠ 0) (hU : U ≠ 0) (d : Debt) : |
| 37 | scaleDebt ell U (normalizeDebt ell U d) = d := by |
| 38 | ext i |
| 39 | fin_cases i <;> simp [scaleDebt, normalizeDebt] <;> field_simp |
| 40 | |
| 41 | theorem integral_scaled {ell : ℝ} (hell : 0 < ell) (c : ℝ) (f : ℝ → ℝ) : |
| 42 | (∫ r, c * f (r / ell)) = ell * c * ∫ x, f x := by |
| 43 | rw [integral_const_mul, MeasureTheory.Measure.integral_comp_div, abs_of_pos hell, smul_eq_mul] |
| 44 | ring |
| 45 | |
| 46 | theorem scaleField_smooth (ell U : ℝ) {f : ℝ → ℝ} (hf : ContDiff ℝ ∞ f) : |
| 47 | ContDiff ℝ ∞ (scaleField ell U f) := |
| 48 | contDiff_const.mul (hf.comp (contDiff_id.div_const ell)) |
| 49 | |
| 50 | theorem scaleField_tsupport {ell : ℝ} (hell : 0 < ell) (U a b : ℝ) {f : ℝ → ℝ} |
| 51 | (hs : tsupport f ⊆ Ioo a b) : tsupport (scaleField ell U f) ⊆ Ioo (ell * a) (ell * b) := by |
| 52 | have hclosed : IsClosed {r : ℝ | r / ell ∈ tsupport f} := |
| 53 | (isClosed_tsupport f).preimage (continuous_id.div_const ell) |
| 54 | have hsup : support (scaleField ell U f) ⊆ {r : ℝ | r / ell ∈ tsupport f} := by |
| 55 | intro r hr |
| 56 | apply subset_closure |
| 57 | intro hf |
| 58 | exact hr (by simp [scaleField, hf]) |
| 59 | intro r hr |
| 60 | have hx := hs (closure_minimal hsup hclosed hr) |
| 61 | exact ⟨by simpa only [mul_comm ell a] using (lt_div_iff₀ hell).1 hx.1, |
| 62 | by simpa only [mul_comm ell b] using (div_lt_iff₀ hell).1 hx.2⟩ |
| 63 | |
| 64 | theorem scaled_angular_mass {ell : ℝ} (hell : 0 < ell) (U : ℝ) (f : ℝ → ℝ) : |
| 65 | (∫ r, r ^ (2 : ℕ) * scaleField ell U f r) = |
| 66 | ell ^ 3 * U * ∫ x, x ^ (2 : ℕ) * f x := by |
| 67 | have he : (fun r => r ^ (2 : ℕ) * scaleField ell U f r) = |
| 68 | (fun r => (ell ^ 2 * U) * ((r / ell) ^ (2 : ℕ) * f (r / ell))) := by |
| 69 | funext r |
| 70 | unfold scaleField |
| 71 | field_simp [hell.ne'] |
| 72 | rw [he, integral_scaled hell (ell ^ 2 * U) (fun x => x ^ (2 : ℕ) * f x)] |
| 73 | ring |
| 74 | |
| 75 | theorem scaled_axial_mass {ell : ℝ} (hell : 0 < ell) (U : ℝ) (f : ℝ → ℝ) : |
| 76 | (∫ r, r * scaleField ell U f r) = ell ^ 2 * U * ∫ x, x * f x := by |
| 77 | have he : (fun r => r * scaleField ell U f r) = |
| 78 | (fun r => (ell * U) * ((r / ell) * f (r / ell))) := by |
| 79 | funext r |
| 80 | unfold scaleField |
| 81 | field_simp [hell.ne'] |
| 82 | rw [he, integral_scaled hell (ell * U) (fun x => x * f x)] |
| 83 | ring |
| 84 | |
| 85 | theorem scaled_pressure_row {ell : ℝ} (hell : 0 < ell) (U : ℝ) (V f : ℝ → ℝ) : |
| 86 | (∫ r, (2 * scaleField ell U V r / r) * scaleField ell U f r) = |
| 87 | U ^ 2 * ∫ x, (2 * V x / x) * f x := by |
| 88 | have he : (fun r => (2 * scaleField ell U V r / r) * scaleField ell U f r) = |
| 89 | (fun r => (U ^ 2 / ell) * ((2 * V (r / ell) / (r / ell)) * f (r / ell))) := by |
| 90 | funext r |
| 91 | by_cases hr : r = 0 |
| 92 | · simp [scaleField, hr] |
| 93 | · unfold scaleField |
| 94 | field_simp [hell.ne', hr] |
| 95 | rw [he, integral_scaled hell (U ^ 2 / ell) (fun x => (2 * V x / x) * f x)] |
| 96 | field_simp [hell.ne'] |
| 97 | |
| 98 | theorem scaled_angular_row {ell : ℝ} (hell : 0 < ell) (U : ℝ) (V G f g : ℝ → ℝ) : |
| 99 | (∫ r, r ^ (2 : ℕ) * |
| 100 | (scaleField ell U G r * scaleField ell U f r + scaleField ell U V r * scaleField ell U g r)) = |
| 101 | ell ^ 3 * U ^ 2 * ∫ x, x ^ (2 : ℕ) * (G x * f x + V x * g x) := by |
| 102 | have he : (fun r => r ^ (2 : ℕ) * |
| 103 | (scaleField ell U G r * scaleField ell U f r + scaleField ell U V r * scaleField ell U g r)) = |
| 104 | (fun r => (ell ^ 2 * U ^ 2) * |
| 105 | ((r / ell) ^ (2 : ℕ) * (G (r / ell) * f (r / ell) + V (r / ell) * g (r / ell)))) := by |
| 106 | funext r |
| 107 | unfold scaleField |
| 108 | field_simp [hell.ne'] |
| 109 | rw [he, integral_scaled hell (ell ^ 2 * U ^ 2) (fun x => x ^ (2 : ℕ) * (G x * f x + V x * g x))] |
| 110 | ring |
| 111 | |
| 112 | theorem scaled_axial_row {ell : ℝ} (hell : 0 < ell) (U : ℝ) (V G f g : ℝ → ℝ) : |
| 113 | (∫ r, 2 * r * scaleField ell U G r * scaleField ell U g r - |
| 114 | r * scaleField ell U V r * scaleField ell U f r) = |
| 115 | ell ^ 2 * U ^ 2 * ∫ x, 2 * x * G x * g x - x * V x * f x := by |
| 116 | have he : (fun r => 2 * r * scaleField ell U G r * scaleField ell U g r - |
| 117 | r * scaleField ell U V r * scaleField ell U f r) = |
| 118 | (fun r => (ell * U ^ 2) * |
| 119 | (2 * (r / ell) * G (r / ell) * g (r / ell) - (r / ell) * V (r / ell) * f (r / ell))) := by |
| 120 | funext r |
| 121 | unfold scaleField |
| 122 | field_simp [hell.ne'] |
| 123 | rw [he, integral_scaled hell (ell * U ^ 2) (fun x => 2 * x * G x * g x - x * V x * f x)] |
| 124 | ring |
| 125 | |
| 126 | theorem fiveRows_scaled {ell : ℝ} (hell : 0 < ell) (U : ℝ) {V G f g : ℝ → ℝ} |
| 127 | {d : Debt} (h : FiveRowRank.FiveRows V G d f g) : |
| 128 | FiveRowRank.FiveRows (scaleField ell U V) (scaleField ell U G) |
| 129 | (scaleDebt ell U d) (scaleField ell U f) (scaleField ell U g) := by |
| 130 | rcases h with ⟨h1, h2, h3, h4, h5⟩ |
| 131 | refine ⟨?_, ?_, ?_, ?_, ?_⟩ |
| 132 | · rw [scaled_angular_mass hell, h1, mul_zero] |
| 133 | · rw [scaled_axial_mass hell, h2, mul_zero] |
| 134 | · rw [scaled_pressure_row hell, h3] |
| 135 | simp only [scaleDebt, Matrix.cons_val_zero] |
| 136 | ring |
| 137 | · rw [scaled_angular_row hell, h4] |
| 138 | simp only [scaleDebt, Matrix.cons_val_one, Matrix.cons_val_zero] |
| 139 | ring |
| 140 | · rw [scaled_axial_row hell, h5] |
| 141 | simp [scaleDebt] |
| 142 | |
| 143 | noncomputable def angularIncrement (lam C a b ell U : ℝ) (d : Debt) : ℝ → ℝ := |
| 144 | scaleField ell U (FiveRowRank.deltaV lam C a b (normalizeDebt ell U d)) |
| 145 | |
| 146 | noncomputable def desiredAxialIncrement (lam C a b ell U : ℝ) (d : Debt) : ℝ → ℝ := |
| 147 | scaleField ell U (FiveRowRank.gamma lam C a b (normalizeDebt ell U d)) |
| 148 | |
| 149 | noncomputable def background (lam C ell U : ℝ) : ℝ → ℝ := |
| 150 | scaleField ell U (FiveRowRank.background lam C) |
| 151 | |
| 152 | /-- Equation (35) in physical units, with no assumed rank or inverse. -/ |
| 153 | theorem physical_five_rows {lam C a b ell U : ℝ} (hlam : 0 < lam) (hC : C ≠ 0) |
| 154 | (ha : 0 < a) (hab : a < b) (hell : 0 < ell) (hU : U ≠ 0) (d : Debt) : |
| 155 | FiveRowRank.FiveRows (background lam C ell U) (fun _ => 0) d |
| 156 | (angularIncrement lam C a b ell U d) (desiredAxialIncrement lam C a b ell U d) := by |
| 157 | have h := fiveRows_scaled hell U |
| 158 | (FiveRowRank.five_rows lam C a b (normalizeDebt ell U d) hlam hC ha hab) |
| 159 | rw [scale_normalizeDebt hell.ne' hU] at h |
| 160 | have hz : scaleField ell U (fun _ => 0) = (fun _ => 0) := by |
| 161 | funext r |
| 162 | simp [scaleField] |
| 163 | rw [hz] at h |
| 164 | exact h |
| 165 | |
| 166 | theorem desiredAxialIncrement_smooth (lam C a b ell U : ℝ) (d : Debt) : |
| 167 | ContDiff ℝ ∞ (desiredAxialIncrement lam C a b ell U d) := |
| 168 | scaleField_smooth ell U (FiveRowRank.gamma_contDiff _ _ _ _ _) |
| 169 | |
| 170 | theorem angularIncrement_tsupport (lam C a b U : ℝ) {ell : ℝ} (hell : 0 < ell) |
| 171 | (hab : a < b) (d : Debt) : |
| 172 | tsupport (angularIncrement lam C a b ell U d) ⊆ Ioo (ell * a) (ell * b) := |
| 173 | scaleField_tsupport hell U a b (FiveRowRank.deltaV_tsupport_subset _ _ _ _ _ hab) |
| 174 | |
| 175 | theorem desiredAxialIncrement_tsupport (lam C a b U : ℝ) {ell : ℝ} (hell : 0 < ell) |
| 176 | (hab : a < b) (d : Debt) : |
| 177 | tsupport (desiredAxialIncrement lam C a b ell U d) ⊆ Ioo (ell * a) (ell * b) := |
| 178 | scaleField_tsupport hell U a b (FiveRowRank.gamma_tsupport_subset _ _ _ _ _ hab) |
| 179 | |
| 180 | theorem physical_rows_on_patch {lam C a b ell U : ℝ} (hlam : 0 < lam) (hC : C ≠ 0) |
| 181 | (ha : 0 < a) (hab : a < b) (hell : 0 < ell) (hU : U ≠ 0) (d : Debt) |
| 182 | (V G : ℝ → ℝ) (hV : ∀ r ∈ Ioo (ell * a) (ell * b), V r = background lam C ell U r) |
| 183 | (hG : ∀ r ∈ Ioo (ell * a) (ell * b), G r = 0) : |
| 184 | FiveRowRank.FiveRows V G d (angularIncrement lam C a b ell U d) |
| 185 | (desiredAxialIncrement lam C a b ell U d) := by |
| 186 | have h := physical_five_rows hlam hC ha hab hell hU d |
| 187 | have hv0 : ∀ r, r ∉ Ioo (ell * a) (ell * b) → angularIncrement lam C a b ell U d r = 0 := by |
| 188 | intro r hr |
| 189 | by_contra hn |
| 190 | exact hr (angularIncrement_tsupport lam C a b U hell hab d (subset_closure hn)) |
| 191 | have hg0 : ∀ r, r ∉ Ioo (ell * a) (ell * b) → desiredAxialIncrement lam C a b ell U d r = 0 := by |
| 192 | intro r hr |
| 193 | by_contra hn |
| 194 | exact hr (desiredAxialIncrement_tsupport lam C a b U hell hab d (subset_closure hn)) |
| 195 | refine ⟨h.1, h.2.1, ?_, ?_, ?_⟩ |
| 196 | · rw [← h.2.2.1] |
| 197 | apply integral_congr_ae |
| 198 | exact Filter.Eventually.of_forall fun r => by |
| 199 | dsimp only |
| 200 | by_cases hr : r ∈ Ioo (ell * a) (ell * b) |
| 201 | · rw [hV r hr] |
| 202 | · rw [hv0 r hr] |
| 203 | simp |
| 204 | · rw [← h.2.2.2.1] |
| 205 | apply integral_congr_ae |
| 206 | exact Filter.Eventually.of_forall fun r => by |
| 207 | dsimp only |
| 208 | by_cases hr : r ∈ Ioo (ell * a) (ell * b) |
| 209 | · rw [hV r hr, hG r hr] |
| 210 | · rw [hv0 r hr, hg0 r hr] |
| 211 | simp |
| 212 | · rw [← h.2.2.2.2] |
| 213 | apply integral_congr_ae |
| 214 | exact Filter.Eventually.of_forall fun r => by |
| 215 | dsimp only |
| 216 | by_cases hr : r ∈ Ioo (ell * a) (ell * b) |
| 217 | · rw [hV r hr, hG r hr] |
| 218 | · rw [hv0 r hr, hg0 r hr] |
| 219 | simp |
| 220 | |
| 221 | section Families |
| 222 | |
| 223 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 224 | |
| 225 | noncomputable def scaleFamily (ell U : E → ℝ) (H : E × ℝ → ℝ) : ℝ × E → ℝ := |
| 226 | fun p => U p.2 * H (p.2, p.1 / ell p.2) |
| 227 | |
| 228 | theorem scaleFamily_contDiffOn {S : Set E} {ell U : E → ℝ} {H : E × ℝ → ℝ} |
| 229 | (hl : ContDiffOn ℝ ∞ ell S) (hU : ContDiffOn ℝ ∞ U S) |
| 230 | (hln : ∀ p ∈ S, ell p ≠ 0) (hH : ContDiffOn ℝ ∞ H (S ×ˢ univ)) : |
| 231 | ContDiffOn ℝ ∞ (scaleFamily ell U H) (univ ×ˢ S) := by |
| 232 | have hL : ContDiffOn ℝ ∞ (fun p : ℝ × E => ell p.2) (univ ×ˢ S) := |
| 233 | hl.comp contDiffOn_snd (fun _ hp => hp.2) |
| 234 | have hV : ContDiffOn ℝ ∞ (fun p : ℝ × E => U p.2) (univ ×ˢ S) := |
| 235 | hU.comp contDiffOn_snd (fun _ hp => hp.2) |
| 236 | have harg : ContDiffOn ℝ ∞ (fun p : ℝ × E => (p.2, p.1 / ell p.2)) (univ ×ˢ S) := |
| 237 | contDiffOn_snd.prodMk (contDiffOn_fst.div hL (fun _ hp => hln _ hp.2)) |
| 238 | exact hV.mul (hH.comp harg (fun p hp => ⟨hp.2, mem_univ _⟩)) |
| 239 | |
| 240 | noncomputable def angularFamily (lam a b : ℝ) (ell U C : E → ℝ) (d : E → Debt) : |
| 241 | ℝ × E → ℝ := |
| 242 | scaleFamily ell U (fun p => FiveRowRank.deltaV lam (C p.1) a b |
| 243 | (normalizeDebt (ell p.1) (U p.1) (d p.1)) p.2) |
| 244 | |
| 245 | noncomputable def desiredAxialFamily (lam a b : ℝ) (ell U C : E → ℝ) (d : E → Debt) : |
| 246 | ℝ × E → ℝ := |
| 247 | scaleFamily ell U (fun p => FiveRowRank.gamma lam (C p.1) a b |
| 248 | (normalizeDebt (ell p.1) (U p.1) (d p.1)) p.2) |
| 249 | |
| 250 | theorem normalizeDebt_contDiffOn {S : Set E} {ell U : E → ℝ} {d : E → Debt} |
| 251 | (hl : ContDiffOn ℝ ∞ ell S) (hU : ContDiffOn ℝ ∞ U S) |
| 252 | (hd : ContDiffOn ℝ ∞ d S) (hln : ∀ p ∈ S, ell p ≠ 0) (hUn : ∀ p ∈ S, U p ≠ 0) : |
| 253 | ContDiffOn ℝ ∞ (fun p => normalizeDebt (ell p) (U p) (d p)) S := by |
| 254 | apply contDiffOn_pi.mpr |
| 255 | intro i |
| 256 | fin_cases i |
| 257 | · exact (contDiffOn_pi.mp hd 0).div (hU.pow 2) (fun p hp => pow_ne_zero _ (hUn p hp)) |
| 258 | · exact (contDiffOn_pi.mp hd 1).div ((hl.pow 3).mul (hU.pow 2)) |
| 259 | (fun p hp => mul_ne_zero (pow_ne_zero _ (hln p hp)) (pow_ne_zero _ (hUn p hp))) |
| 260 | · exact (contDiffOn_pi.mp hd 2).div ((hl.pow 2).mul (hU.pow 2)) |
| 261 | (fun p hp => mul_ne_zero (pow_ne_zero _ (hln p hp)) (pow_ne_zero _ (hUn p hp))) |
| 262 | |
| 263 | theorem angularFamily_contDiffOn (lam a b : ℝ) {S : Set E} {ell U C : E → ℝ} |
| 264 | {d : E → Debt} (hl : ContDiffOn ℝ ∞ ell S) (hU : ContDiffOn ℝ ∞ U S) |
| 265 | (hC : ContDiffOn ℝ ∞ C S) (hd : ContDiffOn ℝ ∞ d S) |
| 266 | (hln : ∀ p ∈ S, ell p ≠ 0) (hUn : ∀ p ∈ S, U p ≠ 0) |
| 267 | (hCn : ∀ p ∈ S, C p ≠ 0) : |
| 268 | ContDiffOn ℝ ∞ (angularFamily lam a b ell U C d) (univ ×ˢ S) := by |
| 269 | have hN : ContDiffOn ℝ ∞ (fun p => normalizeDebt (ell p) (U p) (d p)) S := |
| 270 | normalizeDebt_contDiffOn hl hU hd hln hUn |
| 271 | have hR := FiveRowRank.deltaV_joint_contDiffOn lam a b (S := S) (C := C) |
| 272 | (d := fun p => normalizeDebt (ell p) (U p) (d p)) hC hN hCn |
| 273 | exact scaleFamily_contDiffOn (S := S) (ell := ell) (U := U) |
| 274 | (H := fun p => FiveRowRank.deltaV lam (C p.1) a b |
| 275 | (normalizeDebt (ell p.1) (U p.1) (d p.1)) p.2) hl hU hln hR |
| 276 | |
| 277 | theorem desiredAxialFamily_contDiffOn (lam a b : ℝ) {S : Set E} {ell U C : E → ℝ} |
| 278 | {d : E → Debt} (hl : ContDiffOn ℝ ∞ ell S) (hU : ContDiffOn ℝ ∞ U S) |
| 279 | (hC : ContDiffOn ℝ ∞ C S) (hd : ContDiffOn ℝ ∞ d S) |
| 280 | (hln : ∀ p ∈ S, ell p ≠ 0) (hUn : ∀ p ∈ S, U p ≠ 0) |
| 281 | (hCn : ∀ p ∈ S, C p ≠ 0) : |
| 282 | ContDiffOn ℝ ∞ (desiredAxialFamily lam a b ell U C d) (univ ×ˢ S) := by |
| 283 | have hN : ContDiffOn ℝ ∞ (fun p => normalizeDebt (ell p) (U p) (d p)) S := |
| 284 | normalizeDebt_contDiffOn hl hU hd hln hUn |
| 285 | have hR := FiveRowRank.gamma_joint_contDiffOn lam a b (S := S) (C := C) |
| 286 | (d := fun p => normalizeDebt (ell p) (U p) (d p)) hC hN hCn |
| 287 | exact scaleFamily_contDiffOn (S := S) (ell := ell) (U := U) |
| 288 | (H := fun p => FiveRowRank.gamma lam (C p.1) a b |
| 289 | (normalizeDebt (ell p.1) (U p.1) (d p.1)) p.2) hl hU hln hR |
| 290 | |
| 291 | theorem angularFamily_contDiff (lam a b : ℝ) {ell U C : E → ℝ} {d : E → Debt} |
| 292 | (hl : ContDiff ℝ ∞ ell) (hU : ContDiff ℝ ∞ U) |
| 293 | (hC : ContDiff ℝ ∞ C) (hd : ContDiff ℝ ∞ d) |
| 294 | (hln : ∀ p, ell p ≠ 0) (hUn : ∀ p, U p ≠ 0) (hCn : ∀ p, C p ≠ 0) : |
| 295 | ContDiff ℝ ∞ (angularFamily lam a b ell U C d) := by |
| 296 | simpa only [univ_prod_univ, contDiffOn_univ] using |
| 297 | angularFamily_contDiffOn lam a b (S := univ) hl.contDiffOn hU.contDiffOn hC.contDiffOn hd.contDiffOn |
| 298 | (fun p _ => hln p) (fun p _ => hUn p) (fun p _ => hCn p) |
| 299 | |
| 300 | theorem desiredAxialFamily_contDiff (lam a b : ℝ) {ell U C : E → ℝ} {d : E → Debt} |
| 301 | (hl : ContDiff ℝ ∞ ell) (hU : ContDiff ℝ ∞ U) |
| 302 | (hC : ContDiff ℝ ∞ C) (hd : ContDiff ℝ ∞ d) |
| 303 | (hln : ∀ p, ell p ≠ 0) (hUn : ∀ p, U p ≠ 0) (hCn : ∀ p, C p ≠ 0) : |
| 304 | ContDiff ℝ ∞ (desiredAxialFamily lam a b ell U C d) := by |
| 305 | simpa only [univ_prod_univ, contDiffOn_univ] using |
| 306 | desiredAxialFamily_contDiffOn lam a b (S := univ) hl.contDiffOn hU.contDiffOn hC.contDiffOn hd.contDiffOn |
| 307 | (fun p _ => hln p) (fun p _ => hUn p) (fun p _ => hCn p) |
| 308 | |
| 309 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 310 | /-- A common radial annulus follows from bounds on the physical length. -/ |
| 311 | theorem desiredAxialFamily_supported (lam a b : ℝ) {ell U C : E → ℝ} (d : E → Debt) |
| 312 | (hab : a < b) (hl : ∀ s, 0 < ell s) {lo hi : ℝ} |
| 313 | (hlo : ∀ s, lo ≤ ell s * a) (hhi : ∀ s, ell s * b ≤ hi) : |
| 314 | RadialAlias.RadiallySupported lo hi (desiredAxialFamily lam a b ell U C d) := by |
| 315 | intro p hp |
| 316 | have hs := desiredAxialIncrement_tsupport lam (C p.2) a b (U p.2) (hl p.2) hab (d p.2) |
| 317 | (subset_closure hp) |
| 318 | exact ⟨(hlo p.2).trans hs.1.le, hs.2.le.trans (hhi p.2)⟩ |
| 319 | |
| 320 | end Families |
| 321 | |
| 322 | section SlowStream |
| 323 | |
| 324 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 325 | |
| 326 | /-- The slow source is independent of both periodic phase variables. -/ |
| 327 | noncomputable def slowLift (f : ℝ × E → ℝ) : PressureStream.Lift E → ℝ := |
| 328 | fun p => f (p.1, p.2.1) |
| 329 | |
| 330 | theorem slowLift_contDiff {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) : |
| 331 | ContDiff ℝ ∞ (slowLift f) := |
| 332 | hf.comp (contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd)) |
| 333 | |
| 334 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 335 | theorem slowLift_supported {f : ℝ × E → ℝ} {a b : ℝ} |
| 336 | (hs : RadialAlias.RadiallySupported a b f) : |
| 337 | RadialAlias.RadiallySupported a b (slowLift f) := by |
| 338 | intro p hp |
| 339 | exact hs hp |
| 340 | |
| 341 | omit [NormedSpace ℝ E] in |
| 342 | theorem radial_integral_eq_interval {a b : ℝ} {f : ℝ × E → ℝ} |
| 343 | (hf : Continuous f) (hs : RadialAlias.RadiallySupported a b f) (s : E) : |
| 344 | (∫ r in a..b, f (r, s)) = ∫ r, f (r, s) := by |
| 345 | apply intervalIntegral.integral_eq_integral_of_support_subset |
| 346 | have hc : Continuous (fun r => f (r, s)) := hf.comp (continuous_id.prodMk continuous_const) |
| 347 | have ho : support (fun r => f (r, s)) ⊆ Ioo a b := by |
| 348 | simpa only [interior_Icc] using hc.isOpen_support.subset_interior_iff.mpr |
| 349 | (show support (fun r => f (r, s)) ⊆ Icc a b from fun r hr => hs hr) |
| 350 | exact ho.trans Ioo_subset_Ioc_self |
| 351 | |
| 352 | /-- With a slow source the transported total is the ordinary radial mass. -/ |
| 353 | theorem slow_physicalTotal {a b d M : ℝ} (ha : 0 < a) (hab : a < b) (hd : 0 < d) |
| 354 | (v : PressureStream.Plane) {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) |
| 355 | (hs : RadialAlias.RadiallySupported a b f) (p : PressureStream.Lift E) (hp : a ≤ p.1) : |
| 356 | PressureStream.physicalTotal d a M ((0 : E), v) (slowLift f) p = |
| 357 | ∫ r, f (r, p.2.1) := by |
| 358 | rw [PressureStream.physicalTotal_eq_integral ha hab hd ((0 : E), v) |
| 359 | (slowLift_contDiff hf) (slowLift_supported hs) p hp] |
| 360 | simpa [slowLift] using radial_integral_eq_interval hf.continuous hs p.2.1 |
| 361 | |
| 362 | /-- There is exactly zero compactification alias for a zero-mass slow source. -/ |
| 363 | theorem slow_physicalAlias_zero {a b d M : ℝ} (ha : 0 < a) (hab : a < b) (hd : 0 < d) |
| 364 | (v : PressureStream.Plane) {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) |
| 365 | (hs : RadialAlias.RadiallySupported a b f) (hm : ∀ s, (∫ r, f (r, s)) = 0) |
| 366 | (p : PressureStream.Lift E) : |
| 367 | RadialPullback.physicalAlias d a b M ((0 : E), v) (slowLift f) p = 0 := by |
| 368 | by_cases hp : a ≤ p.1 |
| 369 | · rw [RadialPullback.physicalAlias_eq_cutoff_derivative_global ha hab hd] |
| 370 | change deriv (RadialPullback.physicalCutoff d a b) p.1 • |
| 371 | PressureStream.physicalTotal d a M ((0 : E), v) (slowLift f) p = 0 |
| 372 | rw [slow_physicalTotal ha hab hd v hf hs p hp, hm, smul_zero] |
| 373 | · exact TransportPrimitive.radial_zero_of_lt |
| 374 | (RadialPullback.physicalAlias_supported ha hab hd M ((0 : E), v) (slowLift f)) |
| 375 | (lt_of_not_ge hp) |
| 376 | |
| 377 | /-- The actual stream realizes the desired slow axial field, pointwise, including the axis. -/ |
| 378 | theorem slow_streamGamma_eq_desired {a b d M : ℝ} (ha : 0 < a) (hab : a < b) (hd : 0 < d) |
| 379 | (v : PressureStream.Plane) {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) |
| 380 | (hs : RadialAlias.RadiallySupported a b f) (hm : ∀ s, (∫ r, r * f (r, s)) = 0) |
| 381 | (p : PressureStream.Lift E) : |
| 382 | PressureStream.streamGamma (PressureStream.physicalSpeed d M) ((0 : E), v) |
| 383 | (PressureStream.streamPotential d a b M ((0 : E), v) (slowLift f)) p = slowLift f p := by |
| 384 | rw [PressureStream.streamGamma_eq_desired_sub_alias_global ha hab hd ((0 : E), v) |
| 385 | (slowLift_contDiff hf) (slowLift_supported hs)] |
| 386 | have he : PressureStream.weightedSource (slowLift f) = |
| 387 | slowLift (PressureStream.weightedSource f) := rfl |
| 388 | rw [he, slow_physicalAlias_zero ha hab hd v (PressureStream.weightedSource_contDiff hf) |
| 389 | (PressureStream.weightedSource_supported hs) hm, zero_div, sub_zero] |
| 390 | |
| 391 | end SlowStream |
| 392 | |
| 393 | section LinearConstruction |
| 394 | |
| 395 | noncomputable def normalizeDebtLinearMap (ell U : ℝ) : Debt →ₗ[ℝ] Debt where |
| 396 | toFun := normalizeDebt ell U |
| 397 | map_add' d e := by |
| 398 | ext i |
| 399 | fin_cases i <;> simp [normalizeDebt, add_div] |
| 400 | map_smul' c d := by |
| 401 | ext i |
| 402 | fin_cases i <;> simp [normalizeDebt, mul_div_assoc] |
| 403 | |
| 404 | noncomputable def scaleFieldLinearMap (ell U : ℝ) : (ℝ → ℝ) →ₗ[ℝ] (ℝ → ℝ) where |
| 405 | toFun := scaleField ell U |
| 406 | map_add' f g := by ext r; simp [scaleField, mul_add] |
| 407 | map_smul' c f := by ext r; simp [scaleField]; ring |
| 408 | |
| 409 | noncomputable def angularLinearMap (lam C a b ell U : ℝ) : Debt →ₗ[ℝ] (ℝ → ℝ) := |
| 410 | (scaleFieldLinearMap ell U).comp |
| 411 | ((FiveRowRank.deltaVLinearMap lam C a b).comp (normalizeDebtLinearMap ell U)) |
| 412 | |
| 413 | noncomputable def axialLinearMap (lam C a b ell U : ℝ) : Debt →ₗ[ℝ] (ℝ → ℝ) := |
| 414 | (scaleFieldLinearMap ell U).comp |
| 415 | ((FiveRowRank.gammaLinearMap lam C a b).comp (normalizeDebtLinearMap ell U)) |
| 416 | |
| 417 | theorem debt_eq_sum (d : Debt) : d = ∑ i : Fin 3, d i • (Pi.single i (1 : ℝ) : Debt) := by |
| 418 | classical |
| 419 | ext j |
| 420 | simp [Pi.single_apply] |
| 421 | |
| 422 | theorem linearMap_eq_sum {F : Type*} [AddCommMonoid F] [Module ℝ F] |
| 423 | (L : Debt →ₗ[ℝ] F) (d : Debt) : L d = ∑ i : Fin 3, d i • L (Pi.single i 1) := by |
| 424 | simpa only [map_sum, map_smul] using congrArg L (debt_eq_sum d) |
| 425 | |
| 426 | /-- The update is a fixed finite linear combination of constructed profiles. -/ |
| 427 | theorem angularIncrement_eq_sum (lam C a b ell U : ℝ) (d : Debt) (r : ℝ) : |
| 428 | angularIncrement lam C a b ell U d r = |
| 429 | ∑ i : Fin 3, d i * angularIncrement lam C a b ell U (Pi.single i 1) r := by |
| 430 | have h := congrFun (linearMap_eq_sum (angularLinearMap lam C a b ell U) d) r |
| 431 | simpa only [angularLinearMap, LinearMap.comp_apply, scaleFieldLinearMap, |
| 432 | normalizeDebtLinearMap, LinearMap.coe_mk, AddHom.coe_mk, FiveRowRank.deltaVLinearMap_apply, |
| 433 | Finset.sum_apply, Pi.smul_apply, smul_eq_mul, angularIncrement] using h |
| 434 | |
| 435 | theorem desiredAxialIncrement_eq_sum (lam C a b ell U : ℝ) (d : Debt) (r : ℝ) : |
| 436 | desiredAxialIncrement lam C a b ell U d r = |
| 437 | ∑ i : Fin 3, d i * desiredAxialIncrement lam C a b ell U (Pi.single i 1) r := by |
| 438 | have h := congrFun (linearMap_eq_sum (axialLinearMap lam C a b ell U) d) r |
| 439 | simpa only [axialLinearMap, LinearMap.comp_apply, scaleFieldLinearMap, |
| 440 | normalizeDebtLinearMap, LinearMap.coe_mk, AddHom.coe_mk, FiveRowRank.gammaLinearMap_apply, |
| 441 | Finset.sum_apply, Pi.smul_apply, smul_eq_mul, desiredAxialIncrement] using h |
| 442 | |
| 443 | end LinearConstruction |
| 444 | |
| 445 | section NormalizedGeometry |
| 446 | |
| 447 | abbrev ModelPoint := PhysicalCoordinateBounds.Point |
| 448 | |
| 449 | /-- The fixed shaped amplitude on the untouched patch. -/ |
| 450 | noncomputable def shapedAmplitude (B η : ℝ) : ℝ := B / (1 + η ^ 2) |
| 451 | |
| 452 | theorem shapedAmplitude_contDiff (B : ℝ) : ContDiff ℝ ∞ (shapedAmplitude B) := |
| 453 | contDiff_const.div (contDiff_const.add (contDiff_id.pow 2)) (fun η => by positivity) |
| 454 | |
| 455 | theorem shapedAmplitude_ne_zero {B : ℝ} (hB : B ≠ 0) (η : ℝ) : |
| 456 | shapedAmplitude B η ≠ 0 := div_ne_zero hB (by positivity) |
| 457 | |
| 458 | noncomputable def modelLength (y : ModelPoint) : ℝ := Real.sqrt y.1 |
| 459 | noncomputable def modelVelocity (A : ℝ) (y : ModelPoint) : ℝ := y.1 ^ (-A) |
| 460 | noncomputable def modelAmplitude (coord B : ℝ) (y : ModelPoint) : ℝ := |
| 461 | shapedAmplitude B (y.2.2 / y.1 ^ PhysicalCoordinateBounds.D coord) |
| 462 | |
| 463 | theorem modelLength_contDiffOn : |
| 464 | ContDiffOn ℝ ∞ modelLength PhysicalCoordinateBounds.positiveTime := by |
| 465 | intro y hy |
| 466 | exact (contDiffAt_fst.sqrt (ne_of_gt hy)).contDiffWithinAt |
| 467 | |
| 468 | theorem modelVelocity_contDiffOn (A : ℝ) : |
| 469 | ContDiffOn ℝ ∞ (modelVelocity A) PhysicalCoordinateBounds.positiveTime := by |
| 470 | intro y hy |
| 471 | exact (contDiffAt_fst.rpow_const_of_ne (ne_of_gt hy)).contDiffWithinAt |
| 472 | |
| 473 | theorem modelAmplitude_contDiffOn (coord B : ℝ) : |
| 474 | ContDiffOn ℝ ∞ (modelAmplitude coord B) PhysicalCoordinateBounds.positiveTime := by |
| 475 | intro y hy |
| 476 | exact ((shapedAmplitude_contDiff B).contDiffAt.comp y |
| 477 | (contDiffAt_snd.snd.div (contDiffAt_fst.rpow_const_of_ne (ne_of_gt hy)) |
| 478 | (Real.rpow_pos_of_pos hy _).ne')).contDiffWithinAt |
| 479 | |
| 480 | noncomputable def angularModel (coord A B lam a b : ℝ) (d : Debt) (y : ModelPoint) : ℝ := |
| 481 | angularFamily lam a b modelLength (modelVelocity A) (modelAmplitude coord B) (fun _ => d) |
| 482 | (y.2.1, y) |
| 483 | |
| 484 | noncomputable def axialModel (coord A B lam a b : ℝ) (d : Debt) (y : ModelPoint) : ℝ := |
| 485 | desiredAxialFamily lam a b modelLength (modelVelocity A) (modelAmplitude coord B) (fun _ => d) |
| 486 | (y.2.1, y) |
| 487 | |
| 488 | theorem angularModel_contDiffOn (coord A B lam a b : ℝ) (hB : B ≠ 0) (d : Debt) : |
| 489 | ContDiffOn ℝ ∞ (angularModel coord A B lam a b d) PhysicalCoordinateBounds.positiveTime := by |
| 490 | have h := angularFamily_contDiffOn lam a b (S := PhysicalCoordinateBounds.positiveTime) |
| 491 | (ell := modelLength) (U := modelVelocity A) (C := modelAmplitude coord B) (d := fun _ => d) |
| 492 | modelLength_contDiffOn (modelVelocity_contDiffOn A) (modelAmplitude_contDiffOn coord B) |
| 493 | contDiffOn_const (fun y hy => (Real.sqrt_pos.mpr hy).ne') |
| 494 | (fun y hy => (Real.rpow_pos_of_pos hy _).ne') |
| 495 | (fun y _ => shapedAmplitude_ne_zero hB _) |
| 496 | exact h.comp (((contDiff_fst.comp contDiff_snd).prodMk contDiff_id).contDiffOn) |
| 497 | (fun y hy => ⟨mem_univ _, hy⟩) |
| 498 | |
| 499 | theorem axialModel_contDiffOn (coord A B lam a b : ℝ) (hB : B ≠ 0) (d : Debt) : |
| 500 | ContDiffOn ℝ ∞ (axialModel coord A B lam a b d) PhysicalCoordinateBounds.positiveTime := by |
| 501 | have h := desiredAxialFamily_contDiffOn lam a b (S := PhysicalCoordinateBounds.positiveTime) |
| 502 | (ell := modelLength) (U := modelVelocity A) (C := modelAmplitude coord B) (d := fun _ => d) |
| 503 | modelLength_contDiffOn (modelVelocity_contDiffOn A) (modelAmplitude_contDiffOn coord B) |
| 504 | contDiffOn_const (fun y hy => (Real.sqrt_pos.mpr hy).ne') |
| 505 | (fun y hy => (Real.rpow_pos_of_pos hy _).ne') |
| 506 | (fun y _ => shapedAmplitude_ne_zero hB _) |
| 507 | exact h.comp (((contDiff_fst.comp contDiff_snd).prodMk contDiff_id).contDiffOn) |
| 508 | (fun y hy => ⟨mem_univ _, hy⟩) |
| 509 | |
| 510 | noncomputable def modelBox (qlo qhi rlo rhi : ℝ) : Set ModelPoint := |
| 511 | Icc qlo qhi ×ˢ (Icc rlo rhi ×ˢ Icc (-1 : ℝ) 1) |
| 512 | |
| 513 | noncomputable def modelToInverse (coord : ℝ) (y : ModelPoint) : ModelPoint := |
| 514 | (y.1, (y.2.1, y.2.2 * y.1 ^ PhysicalCoordinateBounds.D coord)) |
| 515 | |
| 516 | theorem modelToInverse_contDiffOn (coord : ℝ) : |
| 517 | ContDiffOn ℝ ∞ (modelToInverse coord) PhysicalCoordinateBounds.positiveTime := by |
| 518 | intro y hy |
| 519 | exact (contDiffAt_fst.prodMk (contDiffAt_snd.fst.prodMk |
| 520 | (contDiffAt_snd.snd.mul (contDiffAt_fst.rpow_const_of_ne (ne_of_gt hy))))).contDiffWithinAt |
| 521 | |
| 522 | theorem modelToInverse_slope {q : ℝ} (hq : 0 < q) (coord R η : ℝ) : |
| 523 | SimilarityCoordinates.scalarSlope coord (modelToInverse coord (q, R, η)).2.2 |
| 524 | (modelToInverse coord (q, R, η)).1 = 1 - coord * η ^ 2 := by |
| 525 | have hp : (q ^ PhysicalCoordinateBounds.D coord) ^ (2 : ℕ) * q ^ (coord - 1) = 1 := by |
| 526 | rw [← Real.rpow_natCast, ← Real.rpow_mul hq.le, ← Real.rpow_add hq] |
| 527 | norm_num only [Nat.cast_ofNat] |
| 528 | have he : PhysicalCoordinateBounds.D coord * (2 : ℝ) + (coord - 1) = 0 := by |
| 529 | unfold PhysicalCoordinateBounds.D |
| 530 | ring |
| 531 | rw [he, Real.rpow_zero] |
| 532 | simp only [modelToInverse, SimilarityCoordinates.scalarSlope, mul_pow] |
| 533 | calc |
| 534 | 1 - η ^ 2 * (q ^ PhysicalCoordinateBounds.D coord) ^ 2 * coord * q ^ (coord - 1) = |
| 535 | 1 - coord * η ^ 2 * ((q ^ PhysicalCoordinateBounds.D coord) ^ 2 * q ^ (coord - 1)) := by ring |
| 536 | _ = 1 - coord * η ^ 2 := by rw [hp, mul_one] |
| 537 | |
| 538 | theorem modelBox_slope_pos {coord qlo qhi rlo rhi : ℝ} (hc : 0 < coord) (hc1 : coord < 1) |
| 539 | (hqlo : 0 < qlo) {y : ModelPoint} (hy : y ∈ modelBox qlo qhi rlo rhi) : |
| 540 | 0 < SimilarityCoordinates.scalarSlope coord (modelToInverse coord y).2.2 |
| 541 | (modelToInverse coord y).1 := by |
| 542 | rw [modelToInverse_slope (hqlo.trans_le hy.1.1)] |
| 543 | have hη : y.2.2 ^ 2 ≤ 1 := by nlinarith [hy.2.2.1, hy.2.2.2] |
| 544 | linarith [mul_le_mul_of_nonneg_left hη hc.le] |
| 545 | |
| 546 | theorem modelBox_image_isCompact {qlo qhi rlo rhi : ℝ} (hqlo : 0 < qlo) (coord : ℝ) : |
| 547 | IsCompact (modelToInverse coord '' modelBox qlo qhi rlo rhi) := |
| 548 | (isCompact_Icc.prod (isCompact_Icc.prod isCompact_Icc)).image_of_continuousOn |
| 549 | ((modelToInverse_contDiffOn coord).continuousOn.mono (fun _ hy => hqlo.trans_le hy.1.1)) |
| 550 | |
| 551 | theorem inverseCoordinates_mem_modelBox {coord qlo qhi rlo rhi : ℝ} |
| 552 | (hc : 0 < coord) (hc1 : coord < 1) {p : ModelPoint} |
| 553 | (hp : p ∈ PhysicalCoordinateBounds.positiveTime) |
| 554 | (hq : PhysicalCoordinateBounds.qCoord coord p ∈ Icc qlo qhi) (hR : p.2.1 ∈ Icc rlo rhi) : |
| 555 | PhysicalCoordinateBounds.inverseCoordinates coord p ∈ |
| 556 | modelToInverse coord '' modelBox qlo qhi rlo rhi := by |
| 557 | have hqpos := PhysicalCoordinateBounds.qCoord_pos hc hc1 hp |
| 558 | have hη := SimilarityCoordinates.coordinateEta_abs_lt_one hc hc1 |
| 559 | (p := (p.1, p.2.2)) hp |
| 560 | refine ⟨(PhysicalCoordinateBounds.qCoord coord p, p.2.1, |
| 561 | PhysicalCoordinateBounds.etaCoord coord p), ⟨hq, hR, ?_⟩, ?_⟩ |
| 562 | · exact ⟨(abs_lt.mp hη).1.le, (abs_lt.mp hη).2.le⟩ |
| 563 | · simp only [modelToInverse, PhysicalCoordinateBounds.inverseCoordinates, |
| 564 | PhysicalCoordinateBounds.etaCoord] |
| 565 | rw [div_mul_cancel₀ _ (Real.rpow_pos_of_pos hqpos _).ne'] |
| 566 | |
| 567 | /-- Actual inverse-coordinate jets remain bounded on a normalized closed |
| 568 | `q` interval, including both limiting values `η=±1`. -/ |
| 569 | theorem inverse_kernel_jet_bound {coord qlo qhi rlo rhi : ℝ} |
| 570 | (hc : 0 < coord) (hc1 : coord < 1) (hqlo : 0 < qlo) {g : ModelPoint → ℝ} |
| 571 | (hg : ContDiffOn ℝ ∞ g PhysicalCoordinateBounds.positiveTime) (j : ℕ) : |
| 572 | ∃ C : ℝ, 0 ≤ C ∧ ∀ p ∈ PhysicalCoordinateBounds.positiveTime, |
| 573 | PhysicalCoordinateBounds.qCoord coord p ∈ Icc qlo qhi → p.2.1 ∈ Icc rlo rhi → |
| 574 | ‖iteratedFDeriv ℝ j (g ∘ PhysicalCoordinateBounds.inverseCoordinates coord) p‖ ≤ C := by |
| 575 | have hK := modelBox_image_isCompact (qlo := qlo) (qhi := qhi) (rlo := rlo) (rhi := rhi) hqlo coord |
| 576 | have hcont : ContinuousOn (PhysicalCoordinateBounds.inverseJet coord g j) |
| 577 | (modelToInverse coord '' modelBox qlo qhi rlo rhi) := by |
| 578 | intro y hy |
| 579 | rcases hy with ⟨z, hz, rfl⟩ |
| 580 | have hq : 0 < (modelToInverse coord z).1 := hqlo.trans_le hz.1.1 |
| 581 | exact (PhysicalCoordinateBounds.inverseJet_contDiffAt hq |
| 582 | (modelBox_slope_pos hc hc1 hqlo hz).ne' |
| 583 | (hg.contDiffAt (PhysicalCoordinateBounds.positiveTime_isOpen.mem_nhds hq)) j).continuousAt.continuousWithinAt |
| 584 | obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn hcont |
| 585 | refine ⟨max C 0, le_max_right _ _, ?_⟩ |
| 586 | intro p hp hq hR |
| 587 | rw [PhysicalCoordinateBounds.iteratedFDeriv_comp_inverse hc hc1 hg j hp] |
| 588 | exact (hC _ (inverseCoordinates_mem_modelBox hc hc1 hp hq hR)).trans (le_max_left _ _) |
| 589 | |
| 590 | end NormalizedGeometry |
| 591 | |
| 592 | section ClassTools |
| 593 | |
| 594 | variable {D F : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 595 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 596 | |
| 597 | theorem finiteJetBounds_of_orderBounds (f : D → ℝ) (S : Set D) |
| 598 | (h : ∀ j : ℕ, ∃ C : ℝ, 0 ≤ C ∧ ∀ x ∈ S, ‖iteratedFDeriv ℝ j f x‖ ≤ C) : |
| 599 | ∀ m : ℕ, ∃ C : ℝ, 0 ≤ C ∧ JetBounds.FiniteJetBound m f S C := by |
| 600 | intro m |
| 601 | induction m with |
| 602 | | zero => |
| 603 | obtain ⟨C, hC, hb⟩ := h 0 |
| 604 | refine ⟨C, hC, ?_⟩ |
| 605 | intro j hj x hx |
| 606 | have hj0 : j = 0 := by omega |
| 607 | subst j |
| 608 | exact hb x hx |
| 609 | | succ m ih => |
| 610 | obtain ⟨A, hA, hAjet⟩ := ih |
| 611 | obtain ⟨B, hB, hBjet⟩ := h (m + 1) |
| 612 | refine ⟨max A B, hA.trans (le_max_left _ _), ?_⟩ |
| 613 | intro j hj x hx |
| 614 | by_cases hjm : j ≤ m |
| 615 | · exact (hAjet j hjm x hx).trans (le_max_left _ _) |
| 616 | · have hje : j = m + 1 := by omega |
| 617 | subst j |
| 618 | exact (hBjet x hx).trans (le_max_right _ _) |
| 619 | |
| 620 | theorem iteratedFDeriv_comp_linear {f : F → ℝ} {S : Set F} |
| 621 | (hS : IsOpen S) (hf : ContDiffOn ℝ ∞ f S) (L : D →L[ℝ] F) (j : ℕ) |
| 622 | {x : D} (hx : L x ∈ S) : |
| 623 | iteratedFDeriv ℝ j (f ∘ L) x = |
| 624 | (iteratedFDeriv ℝ j f (L x)).compContinuousLinearMap (fun _ => L) := by |
| 625 | have hpre := hS.preimage L.continuous |
| 626 | have hd := L.iteratedFDerivWithin_comp_right hf hS.uniqueDiffOn hpre.uniqueDiffOn hx |
| 627 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl j).le |
| 628 | rwa [iteratedFDerivWithin_of_isOpen j hpre hx, iteratedFDerivWithin_of_isOpen j hS hx] at hd |
| 629 | |
| 630 | theorem iteratedFDeriv_congr_germ {f g : D → ℝ} {x : D} |
| 631 | (he : f =ᶠ[𝓝 x] g) (j : ℕ) : iteratedFDeriv ℝ j f x = iteratedFDeriv ℝ j g x := by |
| 632 | have h : f =ᶠ[𝓝[univ] x] g := by simpa only [nhdsWithin_univ] using he |
| 633 | simpa only [iteratedFDerivWithin_univ] using h.iteratedFDerivWithin_eq he.self_of_nhds j |
| 634 | |
| 635 | /-- An interior support and genuine finite jet bounds convert! a fixed |
| 636 | coefficient to the weighted mean class. -/ |
| 637 | theorem meanClass_of_interior_support (s : WeightedClasses.StripData D) (f : D → ℝ) |
| 638 | (hf : ContDiffOn ℝ ∞ f s.domain) |
| 639 | (hb : ∀ m : ℕ, ∃ C : ℝ, 0 ≤ C ∧ JetBounds.FiniteJetBound m f s.domain C) |
| 640 | {K : Set D} (hK : IsClosed K) (hzero : ∀ x ∈ s.domain, x ∉ K → f x = 0) |
| 641 | (hz : ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ s.domain, x ∈ K → δ ≤ s.zeta x) : |
| 642 | WeightedClasses.MeanClass s 0 (fun _ => f) := by |
| 643 | obtain ⟨δ, hδ, hz⟩ := hz |
| 644 | refine ⟨fun _ x hx => s.zeta_nonneg x hx, fun _ => hf, ?_⟩ |
| 645 | intro m |
| 646 | obtain ⟨C, hC, hjet⟩ := hb m |
| 647 | refine ⟨C / δ, div_nonneg hC hδ.le, 0, ?_⟩ |
| 648 | intro n x hx j hj |
| 649 | simp only [WeightedClasses.majorant, Real.rpow_zero, pow_zero, mul_one] |
| 650 | by_cases hxK : x ∈ K |
| 651 | · calc |
| 652 | ‖iteratedFDeriv ℝ j f x‖ ≤ C := hjet j hj x hx |
| 653 | _ = (C / δ) * δ := by field_simp |
| 654 | _ ≤ (C / δ) * s.zeta x := |
| 655 | mul_le_mul_of_nonneg_left (hz x hx hxK) (div_nonneg hC hδ.le) |
| 656 | · have he : f =ᶠ[𝓝 x] (fun _ => 0) := by |
| 657 | filter_upwards [s.isOpen_domain.mem_nhds hx, hK.isOpen_compl.mem_nhds hxK] with y hy hyK |
| 658 | exact hzero y hy hyK |
| 659 | rw [iteratedFDeriv_congr_germ he j, iteratedFDeriv_fun_zero] |
| 660 | simp only [Pi.zero_apply, norm_zero] |
| 661 | exact mul_nonneg (div_nonneg hC hδ.le) (s.zeta_nonneg x hx) |
| 662 | |
| 663 | end ClassTools |
| 664 | |
| 665 | section ChartFields |
| 666 | |
| 667 | abbrev ChartPoint := PressureStream.Lift PressureStream.Plane |
| 668 | |
| 669 | /-- `(R,(T,Z),Y)` to the actual inverse-coordinate variables `(T,R,Z)`. -/ |
| 670 | noncomputable def chartInput : ChartPoint →L[ℝ] ModelPoint := |
| 671 | (((ContinuousLinearMap.fst ℝ ℝ ℝ).comp |
| 672 | ((ContinuousLinearMap.fst ℝ PressureStream.Plane PressureStream.Plane).comp |
| 673 | (ContinuousLinearMap.snd ℝ ℝ (PressureStream.Plane × PressureStream.Plane))))).prod |
| 674 | ((ContinuousLinearMap.fst ℝ ℝ (PressureStream.Plane × PressureStream.Plane)).prod |
| 675 | ((ContinuousLinearMap.snd ℝ ℝ ℝ).comp |
| 676 | ((ContinuousLinearMap.fst ℝ PressureStream.Plane PressureStream.Plane).comp |
| 677 | (ContinuousLinearMap.snd ℝ ℝ (PressureStream.Plane × PressureStream.Plane))))) |
| 678 | |
| 679 | @[simp] theorem chartInput_apply (p : ChartPoint) : chartInput p = (p.2.1.1, p.1, p.2.1.2) := rfl |
| 680 | |
| 681 | theorem chartInput_norm_le_one : ‖chartInput‖ ≤ 1 := by |
| 682 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 683 | intro p |
| 684 | simp only [one_mul, Prod.norm_def] |
| 685 | apply max_le |
| 686 | · exact (le_max_left _ _).trans ((le_max_left _ _).trans (le_max_right _ _)) |
| 687 | · exact max_le (le_max_left _ _) ((le_max_right _ _).trans ((le_max_left _ _).trans (le_max_right _ _))) |
| 688 | |
| 689 | noncomputable def chartQ (coord : ℝ) (p : ChartPoint) : ℝ := |
| 690 | PhysicalCoordinateBounds.qCoord coord (chartInput p) |
| 691 | |
| 692 | noncomputable def chartEta (coord : ℝ) (p : ChartPoint) : ℝ := |
| 693 | PhysicalCoordinateBounds.etaCoord coord (chartInput p) |
| 694 | |
| 695 | noncomputable def chartKernel (coord : ℝ) (g : ModelPoint → ℝ) : ChartPoint → ℝ := |
| 696 | (g ∘ PhysicalCoordinateBounds.inverseCoordinates coord) ∘ chartInput |
| 697 | |
| 698 | noncomputable def chartAngular (coord A B lam a b : ℝ) (d : ChartPoint → Debt) (p : ChartPoint) : ℝ := |
| 699 | angularIncrement lam (shapedAmplitude B (chartEta coord p)) a b |
| 700 | (Real.sqrt (chartQ coord p)) (chartQ coord p ^ (-A)) (d p) p.1 |
| 701 | |
| 702 | noncomputable def chartAxial (coord A B lam a b : ℝ) (d : ChartPoint → Debt) (p : ChartPoint) : ℝ := |
| 703 | desiredAxialIncrement lam (shapedAmplitude B (chartEta coord p)) a b |
| 704 | (Real.sqrt (chartQ coord p)) (chartQ coord p ^ (-A)) (d p) p.1 |
| 705 | |
| 706 | theorem chartAngular_eq_sum (coord A B lam a b : ℝ) (d : ChartPoint → Debt) (p : ChartPoint) : |
| 707 | chartAngular coord A B lam a b d p = ∑ i : Fin 3, d p i * |
| 708 | chartKernel coord (angularModel coord A B lam a b (Pi.single i 1)) p := |
| 709 | angularIncrement_eq_sum _ _ _ _ _ _ _ _ |
| 710 | |
| 711 | theorem chartAxial_eq_sum (coord A B lam a b : ℝ) (d : ChartPoint → Debt) (p : ChartPoint) : |
| 712 | chartAxial coord A B lam a b d p = ∑ i : Fin 3, d p i * |
| 713 | chartKernel coord (axialModel coord A B lam a b (Pi.single i 1)) p := |
| 714 | desiredAxialIncrement_eq_sum _ _ _ _ _ _ _ _ |
| 715 | |
| 716 | theorem chartKernel_contDiffOn {coord : ℝ} (hc : 0 < coord) (hc1 : coord < 1) |
| 717 | {S : Set ChartPoint} (hS : ∀ p ∈ S, chartInput p ∈ PhysicalCoordinateBounds.positiveTime) |
| 718 | {g : ModelPoint → ℝ} (hg : ContDiffOn ℝ ∞ g PhysicalCoordinateBounds.positiveTime) : |
| 719 | ContDiffOn ℝ ∞ (chartKernel coord g) S := |
| 720 | (PhysicalCoordinateBounds.pullback_contDiffOn hc hc1 hg).comp chartInput.contDiff.contDiffOn hS |
| 721 | |
| 722 | /-- All stripped jets of the actual inverse-coordinate pullback are uniformly |
| 723 | bounded, with no band in either the coefficient or the constant. -/ |
| 724 | theorem chartKernel_finiteJetBounds {coord qlo qhi rlo rhi : ℝ} |
| 725 | (hc : 0 < coord) (hc1 : coord < 1) (hqlo : 0 < qlo) {S : Set ChartPoint} |
| 726 | (hT : ∀ p ∈ S, chartInput p ∈ PhysicalCoordinateBounds.positiveTime) |
| 727 | (hq : ∀ p ∈ S, chartQ coord p ∈ Icc qlo qhi) (hR : ∀ p ∈ S, p.1 ∈ Icc rlo rhi) |
| 728 | {g : ModelPoint → ℝ} (hg : ContDiffOn ℝ ∞ g PhysicalCoordinateBounds.positiveTime) : |
| 729 | ∀ m : ℕ, ∃ C : ℝ, 0 ≤ C ∧ JetBounds.FiniteJetBound m (chartKernel coord g) S C := by |
| 730 | apply finiteJetBounds_of_orderBounds |
| 731 | intro j |
| 732 | obtain ⟨C, hC, hb⟩ := inverse_kernel_jet_bound (qhi := qhi) (rlo := rlo) (rhi := rhi) |
| 733 | hc hc1 hqlo hg j |
| 734 | refine ⟨C, hC, ?_⟩ |
| 735 | intro p hp |
| 736 | change ‖iteratedFDeriv ℝ j ((g ∘ PhysicalCoordinateBounds.inverseCoordinates coord) ∘ chartInput) p‖ ≤ C |
| 737 | rw [iteratedFDeriv_comp_linear PhysicalCoordinateBounds.positiveTime_isOpen |
| 738 | (PhysicalCoordinateBounds.pullback_contDiffOn hc hc1 hg) chartInput j (hT p hp)] |
| 739 | calc |
| 740 | _ ≤ ‖iteratedFDeriv ℝ j (g ∘ PhysicalCoordinateBounds.inverseCoordinates coord) (chartInput p)‖ * |
| 741 | ‖chartInput‖ ^ j := by |
| 742 | simpa using ContinuousMultilinearMap.norm_compContinuousLinearMap_le |
| 743 | (iteratedFDeriv ℝ j (g ∘ PhysicalCoordinateBounds.inverseCoordinates coord) (chartInput p)) |
| 744 | (fun _ => chartInput) |
| 745 | _ ≤ C * 1 := mul_le_mul (hb _ (hT p hp) (hq p hp) (hR p hp)) |
| 746 | (pow_le_one₀ (norm_nonneg _) chartInput_norm_le_one) (pow_nonneg (norm_nonneg _) _) hC |
| 747 | _ = C := mul_one _ |
| 748 | |
| 749 | end ChartFields |
| 750 | |
| 751 | section RankClass |
| 752 | |
| 753 | noncomputable def supportBand (a b qlo qhi : ℝ) : Set ChartPoint := |
| 754 | Prod.fst ⁻¹' Icc (Real.sqrt qlo * a) (Real.sqrt qhi * b) |
| 755 | |
| 756 | theorem supportBand_isClosed (a b qlo qhi : ℝ) : IsClosed (supportBand a b qlo qhi) := |
| 757 | isClosed_Icc.preimage continuous_fst |
| 758 | |
| 759 | theorem angular_kernel_zero {coord A B lam a b qlo qhi : ℝ} (ha : 0 < a) (hab : a < b) |
| 760 | (hqlo : 0 < qlo) (d : Debt) {p : ChartPoint} (hq : chartQ coord p ∈ Icc qlo qhi) |
| 761 | (hp : p ∉ supportBand a b qlo qhi) : |
| 762 | chartKernel coord (angularModel coord A B lam a b d) p = 0 := by |
| 763 | by_contra hn |
| 764 | have hpos : 0 < chartQ coord p := hqlo.trans_le hq.1 |
| 765 | change angularIncrement lam (shapedAmplitude B (chartEta coord p)) a b |
| 766 | (Real.sqrt (chartQ coord p)) (chartQ coord p ^ (-A)) d p.1 ≠ 0 at hn |
| 767 | have hs := angularIncrement_tsupport lam (shapedAmplitude B (chartEta coord p)) a b |
| 768 | (chartQ coord p ^ (-A)) (Real.sqrt_pos.mpr hpos) hab d (subset_closure hn) |
| 769 | apply hp |
| 770 | exact ⟨(mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt hq.1) ha.le).trans hs.1.le, |
| 771 | hs.2.le.trans (mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt hq.2) (ha.trans hab).le)⟩ |
| 772 | |
| 773 | theorem axial_kernel_zero {coord A B lam a b qlo qhi : ℝ} (ha : 0 < a) (hab : a < b) |
| 774 | (hqlo : 0 < qlo) (d : Debt) {p : ChartPoint} (hq : chartQ coord p ∈ Icc qlo qhi) |
| 775 | (hp : p ∉ supportBand a b qlo qhi) : |
| 776 | chartKernel coord (axialModel coord A B lam a b d) p = 0 := by |
| 777 | by_contra hn |
| 778 | have hpos : 0 < chartQ coord p := hqlo.trans_le hq.1 |
| 779 | change desiredAxialIncrement lam (shapedAmplitude B (chartEta coord p)) a b |
| 780 | (Real.sqrt (chartQ coord p)) (chartQ coord p ^ (-A)) d p.1 ≠ 0 at hn |
| 781 | have hs := desiredAxialIncrement_tsupport lam (shapedAmplitude B (chartEta coord p)) a b |
| 782 | (chartQ coord p ^ (-A)) (Real.sqrt_pos.mpr hpos) hab d (subset_closure hn) |
| 783 | apply hp |
| 784 | exact ⟨(mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt hq.1) ha.le).trans hs.1.le, |
| 785 | hs.2.le.trans (mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt hq.2) (ha.trans hab).le)⟩ |
| 786 | |
| 787 | /-- The scalar rank coefficients themselves are proved to lie in `M₀`. |
| 788 | All regularity and all finite jet bounds are derived from the constructed inverse. -/ |
| 789 | theorem rank_kernels_meanClass (s : WeightedClasses.StripData ChartPoint) |
| 790 | {coord A B lam a b qlo qhi rlo rhi : ℝ} (hc : 0 < coord) (hc1 : coord < 1) |
| 791 | (ha : 0 < a) (hab : a < b) (hB : B ≠ 0) (hqlo : 0 < qlo) |
| 792 | (hT : ∀ p ∈ s.domain, chartInput p ∈ PhysicalCoordinateBounds.positiveTime) |
| 793 | (hq : ∀ p ∈ s.domain, chartQ coord p ∈ Icc qlo qhi) |
| 794 | (hR : ∀ p ∈ s.domain, p.1 ∈ Icc rlo rhi) |
| 795 | (hz : ∃ δ : ℝ, 0 < δ ∧ ∀ p ∈ s.domain, p ∈ supportBand a b qlo qhi → δ ≤ s.zeta p) |
| 796 | (d : Debt) : |
| 797 | WeightedClasses.MeanClass s 0 (fun _ => chartKernel coord (angularModel coord A B lam a b d)) ∧ |
| 798 | WeightedClasses.MeanClass s 0 (fun _ => chartKernel coord (axialModel coord A B lam a b d)) := by |
| 799 | constructor |
| 800 | · exact meanClass_of_interior_support s _ |
| 801 | (chartKernel_contDiffOn hc hc1 hT (angularModel_contDiffOn _ _ _ _ _ _ hB d)) |
| 802 | (chartKernel_finiteJetBounds hc hc1 hqlo hT hq hR (angularModel_contDiffOn _ _ _ _ _ _ hB d)) |
| 803 | (supportBand_isClosed a b qlo qhi) |
| 804 | (fun p hp hnot => angular_kernel_zero ha hab hqlo d (hq p hp) hnot) hz |
| 805 | · exact meanClass_of_interior_support s _ |
| 806 | (chartKernel_contDiffOn hc hc1 hT (axialModel_contDiffOn _ _ _ _ _ _ hB d)) |
| 807 | (chartKernel_finiteJetBounds hc hc1 hqlo hT hq hR (axialModel_contDiffOn _ _ _ _ _ _ hB d)) |
| 808 | (supportBand_isClosed a b qlo qhi) |
| 809 | (fun p hp hnot => axial_kernel_zero ha hab hqlo d (hq p hp) hnot) hz |
| 810 | |
| 811 | /-- Equation (35) maps the slow defect class `S_α` to `M_α` in every finite |
| 812 | stripped jet, uniformly over the band index. -/ |
| 813 | theorem rank_update_meanClass (s : WeightedClasses.StripData ChartPoint) |
| 814 | {coord A B lam a b qlo qhi rlo rhi α : ℝ} (hc : 0 < coord) (hc1 : coord < 1) |
| 815 | (ha : 0 < a) (hab : a < b) (hB : B ≠ 0) (hqlo : 0 < qlo) |
| 816 | (hT : ∀ p ∈ s.domain, chartInput p ∈ PhysicalCoordinateBounds.positiveTime) |
| 817 | (hq : ∀ p ∈ s.domain, chartQ coord p ∈ Icc qlo qhi) |
| 818 | (hR : ∀ p ∈ s.domain, p.1 ∈ Icc rlo rhi) |
| 819 | (hz : ∃ δ : ℝ, 0 < δ ∧ ∀ p ∈ s.domain, p ∈ supportBand a b qlo qhi → δ ≤ s.zeta p) |
| 820 | {d : ℕ → ChartPoint → Debt} (hd : WeightedClasses.UnweightedClass s α d) : |
| 821 | WeightedClasses.MeanClass s α (fun n => chartAngular coord A B lam a b (d n)) ∧ |
| 822 | WeightedClasses.MeanClass s α (fun n => chartAxial coord A B lam a b (d n)) := by |
| 823 | have hk (i : Fin 3) := rank_kernels_meanClass (A := A) (B := B) (lam := lam) s |
| 824 | hc hc1 ha hab hB hqlo hT hq hR hz (Pi.single i 1) |
| 825 | have hcoord (i : Fin 3) : WeightedClasses.UnweightedClass s α (fun n p => d n p i) := |
| 826 | hd.map (ContinuousLinearMap.proj i) |
| 827 | constructor |
| 828 | · have ht (i : Fin 3) : WeightedClasses.MemClass s (fun _ p => s.zeta p) α |
| 829 | (fun n p => d n p i * chartKernel coord (angularModel coord A B lam a b (Pi.single i 1)) p) := by |
| 830 | simpa only [add_zero, one_mul] using (hcoord i).mul (hk i).1 |
| 831 | have hs := WeightedClasses.MemClass.sum Finset.univ _ |
| 832 | (fun _ p hp => s.zeta_nonneg p hp) (fun i _ => ht i) |
| 833 | have he : (fun n => chartAngular coord A B lam a b (d n)) = |
| 834 | (fun n p => ∑ i : Fin 3, d n p i * |
| 835 | chartKernel coord (angularModel coord A B lam a b (Pi.single i 1)) p) := by |
| 836 | funext n p |
| 837 | exact chartAngular_eq_sum _ _ _ _ _ _ _ _ |
| 838 | rw [he] |
| 839 | exact hs |
| 840 | · have ht (i : Fin 3) : WeightedClasses.MemClass s (fun _ p => s.zeta p) α |
| 841 | (fun n p => d n p i * chartKernel coord (axialModel coord A B lam a b (Pi.single i 1)) p) := by |
| 842 | simpa only [add_zero, one_mul] using (hcoord i).mul (hk i).2 |
| 843 | have hs := WeightedClasses.MemClass.sum Finset.univ _ |
| 844 | (fun _ p hp => s.zeta_nonneg p hp) (fun i _ => ht i) |
| 845 | have he : (fun n => chartAxial coord A B lam a b (d n)) = |
| 846 | (fun n p => ∑ i : Fin 3, d n p i * |
| 847 | chartKernel coord (axialModel coord A B lam a b (Pi.single i 1)) p) := by |
| 848 | funext n p |
| 849 | exact chartAxial_eq_sum _ _ _ _ _ _ _ _ |
| 850 | rw [he] |
| 851 | exact hs |
| 852 | |
| 853 | end RankClass |
| 854 | |
| 855 | section ConcreteStrip |
| 856 | |
| 857 | noncomputable def normalizedDomain (coord qlo qhi rlo rhi : ℝ) : Set ChartPoint := |
| 858 | {p | chartInput p ∈ PhysicalCoordinateBounds.positiveTime ∧ |
| 859 | chartQ coord p ∈ Ioo qlo qhi ∧ p.1 ∈ Ioo rlo rhi} |
| 860 | |
| 861 | theorem normalizedDomain_isOpen {coord : ℝ} (hc : 0 < coord) (hc1 : coord < 1) |
| 862 | (qlo qhi rlo rhi : ℝ) : IsOpen (normalizedDomain coord qlo qhi rlo rhi) := by |
| 863 | apply isOpen_iff_mem_nhds.mpr |
| 864 | intro p hp |
| 865 | have ht : chartInput ⁻¹' PhysicalCoordinateBounds.positiveTime ∈ 𝓝 p := |
| 866 | (PhysicalCoordinateBounds.positiveTime_isOpen.preimage chartInput.continuous).mem_nhds hp.1 |
| 867 | have hqcont : ContinuousAt (chartQ coord) p := |
| 868 | (PhysicalCoordinateBounds.qCoord_contDiffAt hc hc1 hp.1).continuousAt.comp |
| 869 | chartInput.continuous.continuousAt |
| 870 | have hq : (chartQ coord) ⁻¹' Ioo qlo qhi ∈ 𝓝 p := |
| 871 | hqcont.preimage_mem_nhds (isOpen_Ioo.mem_nhds hp.2.1) |
| 872 | have hr : Prod.fst ⁻¹' Ioo rlo rhi ∈ 𝓝 p := |
| 873 | (isOpen_Ioo.preimage continuous_fst).mem_nhds hp.2.2 |
| 874 | exact inter_mem ht (inter_mem hq hr) |
| 875 | |
| 876 | end ConcreteStrip |
| 877 | |
| 878 | section PhysicalChart |
| 879 | |
| 880 | end PhysicalChart |
| 881 | |
| 882 | section FinalClass |
| 883 | |
| 884 | variable {D : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 885 | |
| 886 | theorem meanClass_congr_on {s : WeightedClasses.StripData D} {α : ℝ} |
| 887 | {f g : ℕ → D → ℝ} (hf : WeightedClasses.MeanClass s α f) |
| 888 | (he : ∀ n x, x ∈ s.domain → g n x = f n x) : WeightedClasses.MeanClass s α g := by |
| 889 | refine ⟨hf.weight_nonneg, fun n => (hf.smooth n).congr (fun x hx => he n x hx), ?_⟩ |
| 890 | intro m |
| 891 | obtain ⟨C, hC, p, hb⟩ := hf.bounds m |
| 892 | refine ⟨C, hC, p, ?_⟩ |
| 893 | intro n x hx j hj |
| 894 | have hgerm : g n =ᶠ[𝓝 x] f n := by |
| 895 | filter_upwards [s.isOpen_domain.mem_nhds hx] with y hy |
| 896 | exact he n y hy |
| 897 | rw [iteratedFDeriv_congr_germ hgerm j] |
| 898 | exact hb n x hx j hj |
| 899 | |
| 900 | end FinalClass |
| 901 | |
| 902 | section ShapedPatch |
| 903 | |
| 904 | theorem square_half_power (lam R : ℝ) (hR : 0 < R) : |
| 905 | (R ^ 2 / 2) ^ (-(1 / 2 + lam)) = |
| 906 | (2 : ℝ) ^ (1 / 2 + lam) * R ^ (-1 - 2 * lam) := by |
| 907 | have hX : 0 < R ^ 2 / 2 := by positivity |
| 908 | rw [Real.rpow_def_of_pos hX, Real.rpow_def_of_pos (by norm_num : (0 : ℝ) < 2), |
| 909 | Real.rpow_def_of_pos hR, ← Real.exp_add, |
| 910 | Real.log_div (pow_ne_zero 2 hR.ne') (by norm_num), Real.log_pow] |
| 911 | congr 1 |
| 912 | ring |
| 913 | |
| 914 | /-- The physical radial profile is the manuscript's `X^(-1/2-λ)` profile, |
| 915 | where `X = r²/(2q)`, including the factor of two in its amplitude. -/ |
| 916 | theorem background_eq_shaped_profile {q r : ℝ} (hq : 0 < q) (hr : 0 < r) |
| 917 | (lam U B η : ℝ) : |
| 918 | background lam (shapedAmplitude B η * (2 : ℝ) ^ (1 / 2 + lam)) (Real.sqrt q) U r = |
| 919 | U * shapedAmplitude B η * (r ^ 2 / (2 * q)) ^ (-(1 / 2 + lam)) := by |
| 920 | have hX : r ^ 2 / (2 * q) = (r / Real.sqrt q) ^ 2 / 2 := by |
| 921 | rw [div_pow, Real.sq_sqrt hq.le] |
| 922 | ring |
| 923 | rw [hX, square_half_power lam _ (div_pos hr (Real.sqrt_pos.mpr hq))] |
| 924 | unfold background scaleField FiveRowRank.background |
| 925 | ring |
| 926 | |
| 927 | end ShapedPatch |
| 928 | |
| 929 | section ActualStream |
| 930 | |
| 931 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 932 | |
| 933 | /-- Only the input geometry and defect family occur in this record. -/ |
| 934 | structure SmoothFamily (E : Type) [NormedAddCommGroup E] [NormedSpace ℝ E] where |
| 935 | lam : ℝ |
| 936 | a : ℝ |
| 937 | b : ℝ |
| 938 | length : E → ℝ |
| 939 | velocity : E → ℝ |
| 940 | amplitude : E → ℝ |
| 941 | debt : E → Debt |
| 942 | lam_pos : 0 < lam |
| 943 | a_pos : 0 < a |
| 944 | ordered : a < b |
| 945 | length_pos : ∀ s, 0 < length s |
| 946 | velocity_ne : ∀ s, velocity s ≠ 0 |
| 947 | amplitude_ne : ∀ s, amplitude s ≠ 0 |
| 948 | length_smooth : ContDiff ℝ ∞ length |
| 949 | velocity_smooth : ContDiff ℝ ∞ velocity |
| 950 | amplitude_smooth : ContDiff ℝ ∞ amplitude |
| 951 | debt_smooth : ContDiff ℝ ∞ debt |
| 952 | |
| 953 | namespace SmoothFamily |
| 954 | |
| 955 | noncomputable def angular (F : SmoothFamily E) : ℝ × E → ℝ := |
| 956 | angularFamily F.lam F.a F.b F.length F.velocity F.amplitude F.debt |
| 957 | |
| 958 | noncomputable def desired (F : SmoothFamily E) : ℝ × E → ℝ := |
| 959 | desiredAxialFamily F.lam F.a F.b F.length F.velocity F.amplitude F.debt |
| 960 | |
| 961 | noncomputable def potential (F : SmoothFamily E) (power lo hi M : ℝ) |
| 962 | (v : PressureStream.Plane) : PressureStream.Lift E → ℝ := |
| 963 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift F.desired) |
| 964 | |
| 965 | noncomputable def radial (F : SmoothFamily E) (power lo hi M : ℝ) |
| 966 | (v : PressureStream.Plane) (w : E × PressureStream.Plane) : PressureStream.Lift E → ℝ := |
| 967 | PressureStream.streamBeta w (F.potential power lo hi M v) |
| 968 | |
| 969 | noncomputable def axial (F : SmoothFamily E) (power lo hi M : ℝ) |
| 970 | (v : PressureStream.Plane) : PressureStream.Lift E → ℝ := |
| 971 | PressureStream.streamGamma (PressureStream.physicalSpeed power M) ((0 : E), v) |
| 972 | (F.potential power lo hi M v) |
| 973 | |
| 974 | theorem angular_smooth (F : SmoothFamily E) : ContDiff ℝ ∞ F.angular := |
| 975 | angularFamily_contDiff _ _ _ F.length_smooth F.velocity_smooth F.amplitude_smooth F.debt_smooth |
| 976 | (fun s => (F.length_pos s).ne') F.velocity_ne F.amplitude_ne |
| 977 | |
| 978 | theorem desired_smooth (F : SmoothFamily E) : ContDiff ℝ ∞ F.desired := |
| 979 | desiredAxialFamily_contDiff _ _ _ F.length_smooth F.velocity_smooth F.amplitude_smooth F.debt_smooth |
| 980 | (fun s => (F.length_pos s).ne') F.velocity_ne F.amplitude_ne |
| 981 | |
| 982 | theorem prescribed_five_rows (F : SmoothFamily E) (s : E) : |
| 983 | FiveRowRank.FiveRows (background F.lam (F.amplitude s) (F.length s) (F.velocity s)) (fun _ => 0) |
| 984 | (F.debt s) (fun r => F.angular (r, s)) (fun r => F.desired (r, s)) := |
| 985 | physical_five_rows F.lam_pos (F.amplitude_ne s) F.a_pos F.ordered (F.length_pos s) (F.velocity_ne s) (F.debt s) |
| 986 | |
| 987 | theorem desired_supported (F : SmoothFamily E) {lo hi : ℝ} |
| 988 | (hlo : ∀ s, lo ≤ F.length s * F.a) (hhi : ∀ s, F.length s * F.b ≤ hi) : |
| 989 | RadialAlias.RadiallySupported lo hi F.desired := |
| 990 | desiredAxialFamily_supported _ _ _ _ F.ordered F.length_pos hlo hhi |
| 991 | |
| 992 | theorem desired_mass_zero (F : SmoothFamily E) (s : E) : (∫ r, r * F.desired (r, s)) = 0 := |
| 993 | (F.prescribed_five_rows s).2.1 |
| 994 | |
| 995 | theorem potential_smooth (F : SmoothFamily E) {power lo hi M : ℝ} |
| 996 | (hlo0 : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 997 | (hlo : ∀ s, lo ≤ F.length s * F.a) (hhi : ∀ s, F.length s * F.b ≤ hi) : |
| 998 | ContDiff ℝ ∞ (F.potential power lo hi M v) := |
| 999 | PressureStream.streamPotential_contDiff hlo0 horder hp ((0 : E), v) |
| 1000 | (slowLift_contDiff F.desired_smooth) (slowLift_supported (F.desired_supported hlo hhi)) |
| 1001 | |
| 1002 | theorem axial_exact (F : SmoothFamily E) {power lo hi M : ℝ} |
| 1003 | (hlo0 : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 1004 | (hlo : ∀ s, lo ≤ F.length s * F.a) (hhi : ∀ s, F.length s * F.b ≤ hi) |
| 1005 | (p : PressureStream.Lift E) : F.axial power lo hi M v p = F.desired (p.1, p.2.1) := |
| 1006 | slow_streamGamma_eq_desired hlo0 horder hp v F.desired_smooth (F.desired_supported hlo hhi) |
| 1007 | F.desired_mass_zero p |
| 1008 | |
| 1009 | end SmoothFamily |
| 1010 | |
| 1011 | theorem slow_streamPotential_eq_primitive {lo hi power M : ℝ} |
| 1012 | (hlo : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 1013 | {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) (hs : RadialAlias.RadiallySupported lo hi f) |
| 1014 | (hm : ∀ s, (∫ r, r * f (r, s)) = 0) (p : PressureStream.Lift E) (hr : lo ≤ p.1) : |
| 1015 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f) p = |
| 1016 | (∫ r in lo..p.1, r * f (r, p.2.1)) / p.1 := by |
| 1017 | unfold PressureStream.streamPotential PressureStream.divideRadius |
| 1018 | rw [RadialPullback.physicalCompact_eq_radialIntegral hlo horder hp |
| 1019 | (PressureStream.weightedSource_contDiff (slowLift_contDiff hf)) |
| 1020 | (PressureStream.weightedSource_supported (slowLift_supported hs)) M ((0 : E), v) p hr] |
| 1021 | have he : (∫ r in lo..hi, r * f (r, p.2.1)) = 0 := by |
| 1022 | change (∫ r in lo..hi, PressureStream.weightedSource f (r, p.2.1)) = 0 |
| 1023 | rw [radial_integral_eq_interval (PressureStream.weightedSource_contDiff hf).continuous |
| 1024 | (PressureStream.weightedSource_supported hs)] |
| 1025 | exact hm p.2.1 |
| 1026 | simp [PressureStream.weightedSource, slowLift, he] |
| 1027 | |
| 1028 | end ActualStream |
| 1029 | |
| 1030 | namespace SmoothFamily |
| 1031 | |
| 1032 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1033 | |
| 1034 | end SmoothFamily |
| 1035 | |
| 1036 | section ReservedMeanPatch |
| 1037 | |
| 1038 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1039 | |
| 1040 | end ReservedMeanPatch |
| 1041 | |
| 1042 | section PrimitiveKernels |
| 1043 | |
| 1044 | /-- A smooth formula for `r⁻¹∫₀ʳ s f(s) ds`, also defined at the axis. -/ |
| 1045 | noncomputable def scaledPrimitive (f : ℝ → ℝ) (r : ℝ) : ℝ := |
| 1046 | r * ∫ t in (0 : ℝ)..1, t * f (r * t) |
| 1047 | |
| 1048 | theorem scaledPrimitive_eq_integral (f : ℝ → ℝ) {r : ℝ} (hr : r ≠ 0) : |
| 1049 | scaledPrimitive f r = (∫ s in (0 : ℝ)..r, s * f s) / r := by |
| 1050 | have h := intervalIntegral.smul_integral_comp_mul_left (a := (0 : ℝ)) (b := 1) |
| 1051 | (fun s => s * f s) r |
| 1052 | simp only [smul_eq_mul, mul_zero, mul_one] at h |
| 1053 | have he : (fun t => r * t * f (r * t)) = (fun t => r * (t * f (r * t))) := by |
| 1054 | funext t |
| 1055 | ring |
| 1056 | rw [he, intervalIntegral.integral_const_mul] at h |
| 1057 | unfold scaledPrimitive |
| 1058 | rw [← h] |
| 1059 | field_simp |
| 1060 | |
| 1061 | theorem scaledPrimitive_zero_of_support {l u r : ℝ} (hl : 0 < l) (_ : l < u) |
| 1062 | {f : ℝ → ℝ} (hs : tsupport f ⊆ Ioo l u) (hm : (∫ s, s * f s) = 0) |
| 1063 | (hr : r ∉ Ioo l u) : scaledPrimitive f r = 0 := by |
| 1064 | by_cases hrl : r ≤ l |
| 1065 | · have hz (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : f (r * t) = 0 := by |
| 1066 | by_contra hn |
| 1067 | have hh := hs (subset_closure hn) |
| 1068 | have hle : r * t ≤ l := (mul_le_mul_of_nonneg_right hrl ht.1).trans |
| 1069 | (mul_le_of_le_one_right hl.le ht.2) |
| 1070 | exact (not_lt_of_ge hle) hh.1 |
| 1071 | unfold scaledPrimitive |
| 1072 | have he : (∫ t in (0 : ℝ)..1, t * f (r * t)) = 0 := by |
| 1073 | calc |
| 1074 | _ = ∫ _t in (0 : ℝ)..1, (0 : ℝ) := by |
| 1075 | apply intervalIntegral.integral_congr |
| 1076 | intro t ht |
| 1077 | dsimp only |
| 1078 | rw [hz t (by simpa using ht), mul_zero] |
| 1079 | _ = 0 := by simp |
| 1080 | rw [he, mul_zero] |
| 1081 | · have hru : u ≤ r := le_of_not_gt (fun hh => hr ⟨lt_of_not_ge hrl, hh⟩) |
| 1082 | have hrpos : 0 < r := hl.trans (lt_of_not_ge hrl) |
| 1083 | rw [scaledPrimitive_eq_integral f hrpos.ne'] |
| 1084 | have he : (∫ s in (0 : ℝ)..r, s * f s) = ∫ s, s * f s := by |
| 1085 | apply intervalIntegral.integral_eq_integral_of_support_subset |
| 1086 | intro s hs0 |
| 1087 | have hfs : f s ≠ 0 := by |
| 1088 | intro hz |
| 1089 | exact hs0 (by simp [hz]) |
| 1090 | have hsu := hs (subset_closure hfs) |
| 1091 | exact ⟨hl.trans hsu.1, hsu.2.le.trans hru⟩ |
| 1092 | rw [he, hm, zero_div] |
| 1093 | |
| 1094 | private theorem scaled_integrand_contDiffAt {g : ModelPoint → ℝ} (y : ModelPoint) (t : ℝ) |
| 1095 | (hg : ContDiffAt ℝ ∞ g (y.1, y.2.1 * t, y.2.2)) : |
| 1096 | ContDiffAt ℝ ∞ (fun z : ModelPoint × ℝ => z.2 * g (z.1.1, z.1.2.1 * z.2, z.1.2.2)) (y, t) := by |
| 1097 | have hmap : ContDiffAt ℝ ∞ |
| 1098 | (fun z : ModelPoint × ℝ => (z.1.1, z.1.2.1 * z.2, z.1.2.2)) (y, t) := |
| 1099 | contDiffAt_fst.fst.prodMk |
| 1100 | ((contDiffAt_fst.snd.fst.mul contDiffAt_snd).prodMk contDiffAt_fst.snd.snd) |
| 1101 | exact contDiffAt_snd.mul (hg.comp (y, t) hmap) |
| 1102 | |
| 1103 | end PrimitiveKernels |
| 1104 | |
| 1105 | section PrimitiveClass |
| 1106 | |
| 1107 | end PrimitiveClass |
| 1108 | |
| 1109 | section ExactPrimitive |
| 1110 | |
| 1111 | theorem scaledPrimitive_zero_below {l r : ℝ} (hl : 0 ≤ l) {f : ℝ → ℝ} |
| 1112 | (hf : ∀ x, x ≤ l → f x = 0) (hr : r ≤ l) : scaledPrimitive f r = 0 := by |
| 1113 | unfold scaledPrimitive |
| 1114 | have he : (∫ t in (0 : ℝ)..1, t * f (r * t)) = 0 := by |
| 1115 | calc |
| 1116 | _ = ∫ _t in (0 : ℝ)..1, (0 : ℝ) := by |
| 1117 | apply intervalIntegral.integral_congr |
| 1118 | intro t ht |
| 1119 | have ht' : t ∈ Icc (0 : ℝ) 1 := by simpa using ht |
| 1120 | have hrt : r * t ≤ l := (mul_le_mul_of_nonneg_right hr ht'.1).trans |
| 1121 | (mul_le_of_le_one_right hl ht'.2) |
| 1122 | dsimp only |
| 1123 | rw [hf _ hrt, mul_zero] |
| 1124 | _ = 0 := by simp |
| 1125 | rw [he, mul_zero] |
| 1126 | |
| 1127 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1128 | |
| 1129 | /-- The stream is the ordinary zero-axis primitive for a slow zero-mass |
| 1130 | source. Thus neither its cutoff nor its transport parameter changes it. -/ |
| 1131 | theorem slow_streamPotential_eq_scaledPrimitive {lo hi power M : ℝ} |
| 1132 | (hlo : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 1133 | {f : ℝ × E → ℝ} (hf : ContDiff ℝ ∞ f) (hs : RadialAlias.RadiallySupported lo hi f) |
| 1134 | (hm : ∀ s, (∫ r, r * f (r, s)) = 0) (p : PressureStream.Lift E) : |
| 1135 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f) p = |
| 1136 | scaledPrimitive (fun r => f (r, p.2.1)) p.1 := by |
| 1137 | have hc : Continuous (fun r => f (r, p.2.1)) := |
| 1138 | hf.continuous.comp (continuous_id.prodMk continuous_const) |
| 1139 | have hsup : support (fun r => f (r, p.2.1)) ⊆ Ioo lo hi := by |
| 1140 | simpa only [interior_Icc] using hc.isOpen_support.subset_interior_iff.mpr |
| 1141 | (show support (fun r => f (r, p.2.1)) ⊆ Icc lo hi from fun r hr => hs hr) |
| 1142 | have hzero (r : ℝ) (hr : r ≤ lo) : f (r, p.2.1) = 0 := by |
| 1143 | by_contra hn |
| 1144 | exact (not_lt_of_ge hr) (hsup hn).1 |
| 1145 | by_cases hr : lo ≤ p.1 |
| 1146 | · rw [slow_streamPotential_eq_primitive hlo horder hp v hf hs hm p hr, |
| 1147 | scaledPrimitive_eq_integral _ (hlo.trans_le hr).ne'] |
| 1148 | have hz : (∫ r in (0 : ℝ)..lo, r * f (r, p.2.1)) = 0 := by |
| 1149 | calc |
| 1150 | _ = ∫ _r in (0 : ℝ)..lo, (0 : ℝ) := by |
| 1151 | apply intervalIntegral.integral_congr |
| 1152 | intro r hri |
| 1153 | have hle : r ≤ lo := (by simpa only [uIcc_of_le hlo.le] using hri : r ∈ Icc 0 lo).2 |
| 1154 | dsimp only |
| 1155 | rw [hzero _ hle, mul_zero] |
| 1156 | _ = 0 := by simp |
| 1157 | have hi : (∫ r in (0 : ℝ)..lo, r * f (r, p.2.1)) + |
| 1158 | (∫ r in lo..p.1, r * f (r, p.2.1)) = (∫ r in (0 : ℝ)..p.1, r * f (r, p.2.1)) := |
| 1159 | intervalIntegral.integral_add_adjacent_intervals |
| 1160 | ((continuous_id.mul hc).intervalIntegrable 0 lo) |
| 1161 | ((continuous_id.mul hc).intervalIntegrable lo p.1) |
| 1162 | rw [hz, zero_add] at hi |
| 1163 | rw [hi] |
| 1164 | · rw [TransportPrimitive.radial_zero_of_lt |
| 1165 | (PressureStream.streamPotential_supported hlo horder hp ((0 : E), v) |
| 1166 | (slowLift_contDiff hf) (slowLift_supported hs)) (lt_of_not_ge hr), |
| 1167 | scaledPrimitive_zero_below hlo.le hzero (lt_of_not_ge hr).le] |
| 1168 | |
| 1169 | theorem slow_streamPotential_congr_slice (lo hi power M : ℝ) (v : PressureStream.Plane) |
| 1170 | {f g : ℝ × E → ℝ} (p : PressureStream.Lift E) (he : ∀ r, f (r, p.2.1) = g (r, p.2.1)) : |
| 1171 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f) p = |
| 1172 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift g) p := by |
| 1173 | simp [PressureStream.streamPotential, PressureStream.divideRadius, RadialPullback.physicalCompact, |
| 1174 | RadialPullback.pullback, TransportPrimitive.compactIntegral, TransportPrimitive.pastIntegral, |
| 1175 | TransportPrimitive.totalIntegral, TransportPrimitive.shift, RadialPullback.normalizeSource, |
| 1176 | RadialPullback.liftChart, PressureStream.weightedSource, slowLift, he] |
| 1177 | |
| 1178 | /-- Only the radial slice is needed for this identity; no extension of the |
| 1179 | slow data outside its open physical domain is assumed. -/ |
| 1180 | theorem slow_streamPotential_eq_scaledPrimitive_slice {lo hi power M : ℝ} |
| 1181 | (hlo : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 1182 | (f : ℝ × E → ℝ) (p : PressureStream.Lift E) |
| 1183 | (hf : ContDiff ℝ ∞ (fun r => f (r, p.2.1))) |
| 1184 | (hs : support (fun r => f (r, p.2.1)) ⊆ Icc lo hi) |
| 1185 | (hm : (∫ r, r * f (r, p.2.1)) = 0) : |
| 1186 | PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f) p = |
| 1187 | scaledPrimitive (fun r => f (r, p.2.1)) p.1 := by |
| 1188 | let g : ℝ × E → ℝ := fun z => f (z.1, p.2.1) |
| 1189 | have hg : ContDiff ℝ ∞ g := hf.comp contDiff_fst |
| 1190 | have hgs : RadialAlias.RadiallySupported lo hi g := fun z hz => hs hz |
| 1191 | rw [slow_streamPotential_congr_slice lo hi power M v (f := f) (g := g) p (fun _ => rfl)] |
| 1192 | exact slow_streamPotential_eq_scaledPrimitive hlo horder hp v hg hgs (fun _ => hm) p |
| 1193 | |
| 1194 | end ExactPrimitive |
| 1195 | |
| 1196 | section ActualChartStream |
| 1197 | |
| 1198 | end ActualChartStream |
| 1199 | |
| 1200 | section LocalSlowStream |
| 1201 | |
| 1202 | theorem fderiv_apply_eq_of_line_eq {D : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 1203 | {f g : D → ℝ} {x : D} (v : D) (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) |
| 1204 | (he : ∀ t : ℝ, f (x + t • v) = g (x + t • v)) : fderiv ℝ f x v = fderiv ℝ g x v := by |
| 1205 | have hc : HasDerivAt (fun t : ℝ => x + t • v) v 0 := by |
| 1206 | simpa only [one_smul, zero_add, id_eq] using |
| 1207 | (hasDerivAt_const (0 : ℝ) x).fun_add ((hasDerivAt_id (0 : ℝ)).smul_const v) |
| 1208 | have hfc := hf.hasFDerivAt.comp_hasDerivAt_of_eq 0 hc (by simp) |
| 1209 | have hgc := hg.hasFDerivAt.comp_hasDerivAt_of_eq 0 hc (by simp) |
| 1210 | have hfun : f ∘ (fun t : ℝ => x + t • v) = g ∘ (fun t : ℝ => x + t • v) := funext he |
| 1211 | rw [hfun] at hfc |
| 1212 | exact hfc.unique hgc |
| 1213 | |
| 1214 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1215 | |
| 1216 | /-- A local differentiability hypothesis suffices for the true slow axial |
| 1217 | identity; the source need only be smooth along its radial slice. -/ |
| 1218 | theorem slow_streamGamma_eq_desired_slice {lo hi power M : ℝ} |
| 1219 | (hlo : 0 < lo) (horder : lo < hi) (hp : 0 < power) (v : PressureStream.Plane) |
| 1220 | (f : ℝ × E → ℝ) (p : PressureStream.Lift E) |
| 1221 | (hf : ContDiff ℝ ∞ (fun r => f (r, p.2.1))) |
| 1222 | (hs : support (fun r => f (r, p.2.1)) ⊆ Icc lo hi) |
| 1223 | (hm : (∫ r, r * f (r, p.2.1)) = 0) |
| 1224 | (hΨ : DifferentiableAt ℝ (PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f)) p) : |
| 1225 | PressureStream.streamGamma (PressureStream.physicalSpeed power M) ((0 : E), v) |
| 1226 | (PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift f)) p = f (p.1, p.2.1) := by |
| 1227 | let g : ℝ × E → ℝ := fun z => f (z.1, p.2.1) |
| 1228 | have hg : ContDiff ℝ ∞ g := hf.comp contDiff_fst |
| 1229 | have hgs : RadialAlias.RadiallySupported lo hi g := fun z hz => hs hz |
| 1230 | have hΨg := PressureStream.streamPotential_contDiff (M := M) hlo horder hp ((0 : E), v) |
| 1231 | (slowLift_contDiff hg) (slowLift_supported hgs) |
| 1232 | let u := PressureStream.radialVector (PressureStream.physicalSpeed power M) ((0 : E), v) p |
| 1233 | have hDr := fderiv_apply_eq_of_line_eq u hΨ (hΨg.differentiable (by simp) p) (fun t => by |
| 1234 | apply slow_streamPotential_congr_slice lo hi power M v (f := f) (g := g) (p + t • u) |
| 1235 | intro r |
| 1236 | simp [g, u, PressureStream.radialVector]) |
| 1237 | have hval := slow_streamPotential_congr_slice lo hi power M v (f := f) (g := g) p (fun r => rfl) |
| 1238 | have hAx := slow_streamGamma_eq_desired (M := M) hlo horder hp v hg hgs (fun _ => hm) p |
| 1239 | calc |
| 1240 | _ = PressureStream.streamGamma (PressureStream.physicalSpeed power M) ((0 : E), v) |
| 1241 | (PressureStream.streamPotential power lo hi M ((0 : E), v) (slowLift g)) p := by |
| 1242 | unfold PressureStream.streamGamma PressureStream.graphDr PressureStream.divideRadius |
| 1243 | rw [hDr, hval] |
| 1244 | _ = f (p.1, p.2.1) := hAx |
| 1245 | |
| 1246 | end LocalSlowStream |
| 1247 | |
| 1248 | section ActualChartIdentities |
| 1249 | |
| 1250 | end ActualChartIdentities |
| 1251 | |
| 1252 | section AllVelocityClasses |
| 1253 | |
| 1254 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1255 | |
| 1256 | end AllVelocityClasses |
| 1257 | |
| 1258 | end NavierStokes.MeanRankUpdate |