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.ActualSignedControl |
| 2 | import NavierStokes.BaseContextAssembly |
| 3 | import NavierStokes.CommonBaseContext |
| 4 | import NavierStokes.PeriodicPhaseAssembly |
| 5 | |
| 6 | /-! |
| 7 | # Geometry of the actual prepared primary charts |
| 8 | |
| 9 | The native variables are `(p,(u,v))`, with `p=(R,(Z,T))`. |
| 10 | The pulse coordinate is exactly `v/L`, and the common-cover chart uses |
| 11 | the chosen slot basis and the actual difference of covering indices. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | namespace NavierStokes.ActualSignedGeometry |
| 17 | |
| 18 | open Set Function Filter WeightedClasses PhaseJetBounds PrimaryCopyBounds |
| 19 | open scoped ContDiff Topology BigOperators |
| 20 | |
| 21 | abbrev Slow := PhaseCalculus.Slow |
| 22 | abbrev Plane := TorusInverse.Plane |
| 23 | abbrev Native := Slow × Plane |
| 24 | |
| 25 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 26 | ENat.natCast_le_of_coe_top_le_withTop le_rfl n |
| 27 | |
| 28 | /-! ## The positive native annulus and the actual pulse coordinate -/ |
| 29 | |
| 30 | noncomputable def standardSlowRegion {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) : |
| 31 | LocalSignedRequest.SlowRegion (2 * h) where |
| 32 | carrier := {z | 0 < z.1 ∧ SimilarityCoordinates.coordinateQ (2 * h) z ∈ Ioo (1 / 2 : ℝ) 2} |
| 33 | isOpen := by |
| 34 | rw [isOpen_iff_mem_nhds] |
| 35 | intro z hz |
| 36 | have hq := (SimilarityCoordinates.coordinateQ_smooth |
| 37 | (by linarith : 0 < 2 * h) (by linarith : 2 * h < 1) hz.1).continuousAt |
| 38 | exact inter_mem (isOpen_lt continuous_const continuous_fst |>.mem_nhds hz.1) |
| 39 | (hq.preimage_mem_nhds (isOpen_Ioo.mem_nhds hz.2)) |
| 40 | coord_pos := by linarith |
| 41 | coord_lt_one := by linarith |
| 42 | qlo := 1 / 2 |
| 43 | qhi := 2 |
| 44 | qlo_pos := by norm_num |
| 45 | time_pos := fun _ hz => hz.1 |
| 46 | q_mem := fun _ hz => ⟨hz.2.1.le, hz.2.2.le⟩ |
| 47 | |
| 48 | section Prepared |
| 49 | |
| 50 | variable {F : OutgoingProfile.Profile} {W : NominalProfile.Witness F} |
| 51 | (H : NominalConeAssembly.Certificate W) {ld : ModulatedProfileAssembly.LoopData W} |
| 52 | (v : ModulatedProfileAssembly.Witness ld) |
| 53 | {upper : ℝ} {B : ℕ} {r0 : ℝ} {N0 : ℕ} |
| 54 | (a : PrimaryGeometryAssembly.Prepared H v upper B r0 N0) |
| 55 | |
| 56 | abbrev Label := PrimaryGeometryAssembly.Index W a.N |
| 57 | |
| 58 | noncomputable def nativeSlow : PrimaryCopyBounds.JetDomain (Label H v a) Slow where |
| 59 | scale L := ChartScales.S (BaseChartJets.cellBand L) |
| 60 | carrier L := (PrimaryGeometryAssembly.domain W a.N).carrier L ∩ |
| 61 | BaseContextAssembly.slowCarrier W (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 62 | isOpen L := ((PrimaryGeometryAssembly.domain W a.N).isOpen L).inter |
| 63 | (BaseContextAssembly.slowCarrier_open W _) |
| 64 | one_le_scale L := (PrimaryGeometryAssembly.domain W a.N).one_le_scale L |
| 65 | growth L p := (BaseContextAssembly.nativeStrip W |
| 66 | (standardSlowRegion F.data.h_pos F.data.h_lt_half)).growth (BaseChartJets.cellBand L) |
| 67 | (BaseContextAssembly.insertSlow p) |
| 68 | scale_le_growth L p _ := by |
| 69 | exact (le_max_right 1 (ChartScales.S (BaseChartJets.cellBand L))).trans |
| 70 | ((BaseContextAssembly.nativeStrip W _).slow_le_growth _ _) |
| 71 | |
| 72 | noncomputable def nativeDomain : PrimaryCopyBounds.JetDomain (Label H v a) Native where |
| 73 | scale L := ChartScales.S (BaseChartJets.cellBand L) |
| 74 | carrier L := (nativeSlow H v a).carrier L ×ˢ |
| 75 | (Ioo (-r0) r0 ×ˢ Ioo 0 (ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L))) |
| 76 | isOpen L := ((nativeSlow H v a).isOpen L).prod (isOpen_Ioo.prod isOpen_Ioo) |
| 77 | one_le_scale L := (nativeSlow H v a).one_le_scale L |
| 78 | growth L x := (nativeSlow H v a).growth L x.1 |
| 79 | scale_le_growth L x hx := (nativeSlow H v a).scale_le_growth L x.1 hx.1 |
| 80 | |
| 81 | noncomputable def pulseCoordinates (L : Label H v a) (x : Native) : Slow × ℝ := |
| 82 | (x.1, x.2.2 / ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L)) |
| 83 | |
| 84 | theorem nativeSlow_positive (L : Label H v a) {p : Slow} |
| 85 | (hp : p ∈ (nativeSlow H v a).carrier L) : |
| 86 | p ∈ PositiveRepresentatives.positivePart (PrimaryGeometryAssembly.referenceSet W) := by |
| 87 | have hs := (BaseContextAssembly.nativeStrip_mem W _ _).mp hp.2 |
| 88 | have ht : 0 < p.2.2 := hs.1.1 |
| 89 | have hq : SimilarityHomogeneity.chartQ F.data.h p ∈ Icc (1 / 2 : ℝ) 2 := |
| 90 | ⟨hs.1.2.1.le, hs.1.2.2.le⟩ |
| 91 | have hspec := SimilarityCoordinates.coordinateQ_spec |
| 92 | (by linarith [F.data.h_pos] : 0 < 2 * F.data.h) |
| 93 | (by linarith [F.data.h_lt_half] : 2 * F.data.h < 1) (p := (p.2.2, p.2.1)) ht |
| 94 | have hactive := (BaseContextAssembly.nativeStrip_active W _ hp.2).1 |
| 95 | refine ⟨subset_closure ?_, ht⟩ |
| 96 | refine ⟨(BaseContextAssembly.nativeStrip_radius W _ hp.2).le, ht.le, |
| 97 | SimilarityHomogeneity.chartQ F.data.h p, hq, hspec.2, ?_⟩ |
| 98 | have he := And.intro hactive.1.le hactive.2.le |
| 99 | simp only [BaseChartJets.normalizedCoordinates_eq, SimilarityHomogeneity.chartX, |
| 100 | SimilarityCoordinates.coordinateX, BaseContextAssembly.slowCoordinates_insert, |
| 101 | div_div] at he |
| 102 | exact he |
| 103 | |
| 104 | theorem pulseCoordinates_jets (hr0 : 0 < r0) : |
| 105 | PolynomialJets (nativeDomain H v a).toDomain (pulseCoordinates H v a) := by |
| 106 | have hslow : PolynomialJets (nativeDomain H v a).toDomain (fun _ (x : Native) => x.1) := by |
| 107 | have hp := PolynomialJets.affine (D := (nativeDomain H v a).toDomain) |
| 108 | (ContinuousLinearMap.fst ℝ Slow Plane) (fun _ => 0) |
| 109 | (BaseContextAssembly.one_le_geometryBound W |
| 110 | (standardSlowRegion F.data.h_pos F.data.h_lt_half)) (m := 0) ?_ |
| 111 | · simp only [add_zero] at hp |
| 112 | exact hp |
| 113 | intro L x hx |
| 114 | simpa only [pow_zero, mul_one, add_zero, ContinuousLinearMap.coe_fst'] using |
| 115 | (BaseContextAssembly.native_geometry W |
| 116 | (standardSlowRegion F.data.h_pos F.data.h_lt_half) (Label H v a)).bounded L x.1 hx.1.2 |
| 117 | have hv : PolynomialJets (nativeDomain H v a).toDomain (fun _ (x : Native) => x.2.2) := by |
| 118 | have hp := PolynomialJets.affine (D := (nativeDomain H v a).toDomain) |
| 119 | ((ContinuousLinearMap.snd ℝ ℝ ℝ).comp (ContinuousLinearMap.snd ℝ Slow Plane)) |
| 120 | (fun _ => 0) (C := max 1 (2 * r0 * ChartScales.Tg)) (m := 1) (le_max_left _ _) ?_ |
| 121 | · simpa only [add_zero, ContinuousLinearMap.comp_apply, ContinuousLinearMap.coe_snd'] using hp |
| 122 | intro L x hx |
| 123 | have hn := (a.large (BaseChartJets.cellBand L) L.property).four_le |
| 124 | have hL := (ChartScales.slotLength_bounds r0 F.data.h hr0.le F.data.h_pos.le hn).2 |
| 125 | have hxv : |x.2.2| ≤ ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) := by |
| 126 | rw [abs_of_pos hx.2.2.1] |
| 127 | exact hx.2.2.2.le |
| 128 | simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.coe_snd', |
| 129 | add_zero, Real.norm_eq_abs, pow_one] |
| 130 | exact hxv.trans |
| 131 | (hL.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) |
| 132 | (zero_le_one.trans ((nativeDomain H v a).one_le_scale L)))) |
| 133 | have hi : PolynomialJets (nativeDomain H v a).toDomain |
| 134 | (fun L _ => (ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L))⁻¹) := by |
| 135 | apply PolynomialJets.const_uniform _ a.one_le_M |
| 136 | intro L |
| 137 | have hn := (a.large (BaseChartJets.cellBand L) L.property).four_le |
| 138 | have hL := (ChartScales.slotLength_bounds r0 F.data.h hr0.le F.data.h_pos.le hn).1 |
| 139 | have hS := (nativeDomain H v a).one_le_scale L |
| 140 | have hlow : 2 * r0 ≤ ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) := by |
| 141 | exact (le_mul_of_one_le_right (by positivity) hS).trans hL |
| 142 | rw [Real.norm_eq_abs, abs_of_pos (inv_pos.mpr (lt_of_lt_of_le (by positivity) hlow))] |
| 143 | simpa only [one_div] using (one_div_le_one_div_of_le (by positivity) hlow).trans a.length_bound |
| 144 | unfold pulseCoordinates |
| 145 | simp only [div_eq_mul_inv] |
| 146 | exact hslow.pair (hv.mul hi) |
| 147 | |
| 148 | theorem radialDelta_le_edge {r : ℝ} |
| 149 | (hr : r ∈ Ioo (PrimaryTargetBounds.leftRadius W) (PrimaryTargetBounds.rightRadius W)) |
| 150 | (eta : ℝ) : |
| 151 | WeightedRadialPrimitive.delta |
| 152 | (WeightedRadialPrimitive.logLength (PrimaryTargetBounds.leftRadius W) (PrimaryTargetBounds.rightRadius W)) |
| 153 | (WeightedRadialPrimitive.logPosition (PrimaryTargetBounds.leftRadius W) r) ≤ |
| 154 | FinalSlowBase.edgeDistance W (r ^ 2 / 2, eta) := by |
| 155 | have ha := PrimaryTargetBounds.leftRadius_pos W |
| 156 | have hb := PrimaryTargetBounds.rightRadius_pos W |
| 157 | have hr0 := ha.trans hr.1 |
| 158 | have hasq : (PrimaryTargetBounds.leftRadius W) ^ 2 / 2 = NominalConeAssembly.activeLeft W := by |
| 159 | rw [PrimaryTargetBounds.leftRadius, Real.sq_sqrt |
| 160 | (mul_nonneg (by norm_num) (NominalConeAssembly.activeLeft_pos W).le)] |
| 161 | ring |
| 162 | have hbsq : (PrimaryTargetBounds.rightRadius W) ^ 2 / 2 = NominalConeAssembly.activeRight W := by |
| 163 | rw [PrimaryTargetBounds.rightRadius, Real.sq_sqrt |
| 164 | (mul_nonneg (by norm_num) (LeadingStressWeights.activeRight_pos W).le)] |
| 165 | ring |
| 166 | have halog := PrimaryTargetBounds.log_square_half ha |
| 167 | have hblog := PrimaryTargetBounds.log_square_half hb |
| 168 | rw [hasq] at halog |
| 169 | rw [hbsq] at hblog |
| 170 | have hl : Real.log (r ^ 2 / 2) - FinalSlowBase.logLeft W = |
| 171 | 2 * WeightedRadialPrimitive.logPosition (PrimaryTargetBounds.leftRadius W) r := by |
| 172 | rw [FinalSlowBase.logLeft, WeightedRadialPrimitive.logPosition, |
| 173 | Real.log_div hr0.ne' ha.ne', PrimaryTargetBounds.log_square_half hr0, halog] |
| 174 | ring |
| 175 | have hu : FinalSlowBase.logRight W - Real.log (r ^ 2 / 2) = |
| 176 | 2 * (WeightedRadialPrimitive.logLength (PrimaryTargetBounds.leftRadius W) (PrimaryTargetBounds.rightRadius W) - |
| 177 | WeightedRadialPrimitive.logPosition (PrimaryTargetBounds.leftRadius W) r) := by |
| 178 | rw [FinalSlowBase.logRight, WeightedRadialPrimitive.logLength, |
| 179 | WeightedRadialPrimitive.logPosition, Real.log_div hb.ne' ha.ne', |
| 180 | Real.log_div hr0.ne' ha.ne', PrimaryTargetBounds.log_square_half hr0, hblog] |
| 181 | ring |
| 182 | have hp := WeightedRadialPrimitive.logPosition_mem ha hr |
| 183 | change min 1 (min _ _) ≤ min 1 (min _ _) |
| 184 | rw [hl, hu] |
| 185 | exact min_le_min le_rfl (min_le_min (by linarith [hp.1]) (by linarith [hp.2])) |
| 186 | |
| 187 | theorem nativeSlow_inverse_edge (L : Label H v a) {p : Slow} |
| 188 | (hp : p ∈ (nativeSlow H v a).carrier L) : |
| 189 | (FinalSlowBase.edgeDistance W (BaseChartJets.normalizedCoordinates F.data.h p).2)⁻¹ ≤ |
| 190 | (nativeSlow H v a).growth L p := by |
| 191 | let st := BaseContextAssembly.nativeStrip W (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 192 | have hm := (BaseContextAssembly.nativeStrip_mem W _ _).mp hp.2 |
| 193 | have ht : 0 < p.2.2 := hm.1.1 |
| 194 | have hδ := st.delta_pos _ hp.2 |
| 195 | have hle := radialDelta_le_edge (W := W) hm.2 |
| 196 | (BaseChartJets.normalizedCoordinates F.data.h p).2.2 |
| 197 | simp only [BaseContextAssembly.slowCoordinates_insert] at hle |
| 198 | rw [PrimaryTargetBounds.profileRadius_sq (F := F) ht] at hle |
| 199 | have heq : PrimaryTargetBounds.profileRadius F.data.h p = |
| 200 | (LocalSignedRequest.profileMap (2 * F.data.h) (BaseContextAssembly.insertSlow p)).1 := by |
| 201 | unfold PrimaryTargetBounds.profileRadius |
| 202 | rw [BaseChartJets.normalizedCoordinates_eq] |
| 203 | rfl |
| 204 | rw [heq] at hle |
| 205 | have hi : (FinalSlowBase.edgeDistance W (BaseChartJets.normalizedCoordinates F.data.h p).2)⁻¹ ≤ |
| 206 | (st.delta (BaseContextAssembly.insertSlow p))⁻¹ := by |
| 207 | simpa only [one_div] using one_div_le_one_div_of_le hδ hle |
| 208 | exact hi.trans ((le_max_right 1 _).trans |
| 209 | (le_mul_of_one_le_left (le_trans zero_le_one (le_max_left 1 _)) (st.one_le_slow _))) |
| 210 | |
| 211 | /-- This is the native chart of the supplied prepared family. All its |
| 212 | coordinate, growth, annular and positive-reference fields are proved. -/ |
| 213 | noncomputable def preparedChart (hr0 : 0 < r0) : |
| 214 | ActualSignedControl.PreparedChart H v a Native where |
| 215 | native := nativeDomain H v a |
| 216 | slow := nativeSlow H v a |
| 217 | coordinate := pulseCoordinates H v a |
| 218 | scale _ := rfl |
| 219 | coordinate_jets := pulseCoordinates_jets H v a hr0 |
| 220 | maps L x hx := by |
| 221 | have hL : 0 < ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) := |
| 222 | div_pos (mul_pos (by norm_num) hr0) (ChartScales.timeCoefficient_pos _ _) |
| 223 | exact ⟨hx.1.1, div_pos hx.2.2.1 hL, (div_lt_one hL).mpr hx.2.2.2⟩ |
| 224 | positive L x hx := nativeSlow_positive H v a L hx.1 |
| 225 | slow_maps _ _ hx := hx.1 |
| 226 | slow_growth _ _ _ := le_rfl |
| 227 | radiusLower := BaseContextAssembly.geometryRadius W (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 228 | normUpper := BaseContextAssembly.geometryBound W (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 229 | qLower := (1 / 2) / 2 |
| 230 | qUpper := BaseContextAssembly.geometryUpper (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 231 | radius_pos := BaseContextAssembly.geometryRadius_pos W _ |
| 232 | q_pos := by norm_num |
| 233 | geometry := by |
| 234 | have g := BaseContextAssembly.native_geometry W (standardSlowRegion F.data.h_pos F.data.h_lt_half) |
| 235 | (Label H v a) |
| 236 | exact ⟨fun L p hp => g.time L p hp.2, fun L p hp => g.radius L p hp.2, |
| 237 | fun L p hp => g.bounded L p hp.2, fun L p hp => g.q_range L p hp.2, |
| 238 | fun L p hp => g.x_range L p hp.2⟩ |
| 239 | inverse_edge L p hp := nativeSlow_inverse_edge H v a L hp |
| 240 | |
| 241 | @[simp] theorem preparedChart_coordinate (hr0 : 0 < r0) (L : Label H v a) (x : Native) : |
| 242 | (preparedChart H v a hr0).coordinate L x = |
| 243 | (x.1, x.2.2 / (PrimaryGeometryAssembly.construction H v a hr0 0).L L) := rfl |
| 244 | |
| 245 | end Prepared |
| 246 | |
| 247 | /-! ## Uniform comparisons on the actual four-level window -/ |
| 248 | |
| 249 | noncomputable def powerBound (exponent : ℝ) : ℝ := (2 : ℝ) ^ (4 * |exponent|) |
| 250 | |
| 251 | theorem powerBound_one (exponent : ℝ) : 1 ≤ powerBound exponent := |
| 252 | Real.one_le_rpow (by norm_num) (mul_nonneg (by norm_num) (abs_nonneg _)) |
| 253 | |
| 254 | theorem dyadic_ratioPower (n m : ℕ) (exponent : ℝ) : |
| 255 | PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent = |
| 256 | (2 : ℝ) ^ (((m : ℝ) - (n : ℝ)) * exponent) := by |
| 257 | unfold PhysicalParticularWave.ratioPower ChartScales.Q SlotColoring.dyadicQ |
| 258 | rw [← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2), |
| 259 | ← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2), ← Real.rpow_sub (by norm_num : (0 : ℝ) < 2)] |
| 260 | congr 1 |
| 261 | ring |
| 262 | |
| 263 | theorem dyadic_ratioPower_le {n m : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) |
| 264 | (exponent : ℝ) : |
| 265 | PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent ≤ |
| 266 | powerBound exponent := by |
| 267 | rw [dyadic_ratioPower] |
| 268 | apply Real.rpow_le_rpow_of_exponent_le (by norm_num) |
| 269 | have hd : |(m : ℝ) - (n : ℝ)| ≤ 4 := by |
| 270 | have h1 : (n : ℝ) ≤ (m : ℝ) + 4 := by exact_mod_cast hnm |
| 271 | have h2 : (m : ℝ) ≤ (n : ℝ) + 4 := by exact_mod_cast hmn |
| 272 | rw [abs_le] |
| 273 | constructor <;> linarith |
| 274 | calc |
| 275 | _ ≤ |((m : ℝ) - (n : ℝ)) * exponent| := le_abs_self _ |
| 276 | _ = |(m : ℝ) - (n : ℝ)| * |exponent| := abs_mul _ _ |
| 277 | _ ≤ _ := mul_le_mul_of_nonneg_right hd (abs_nonneg _) |
| 278 | |
| 279 | theorem dyadic_ratioPower_lower {n m : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) |
| 280 | (exponent : ℝ) : |
| 281 | 1 / powerBound exponent ≤ |
| 282 | PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent := by |
| 283 | have h := dyadic_ratioPower_le hmn hnm exponent |
| 284 | have hp := PhysicalParticularWave.ratioPower_pos (ChartScales.Q_pos m) (ChartScales.Q_pos n) exponent |
| 285 | have hb : 0 < powerBound exponent := zero_lt_one.trans_le (powerBound_one _) |
| 286 | have he : PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent * |
| 287 | PhysicalParticularWave.ratioPower (ChartScales.Q m) (ChartScales.Q n) exponent = 1 := by |
| 288 | unfold PhysicalParticularWave.ratioPower |
| 289 | field_simp [(Real.rpow_pos_of_pos (ChartScales.Q_pos n) exponent).ne', |
| 290 | (Real.rpow_pos_of_pos (ChartScales.Q_pos m) exponent).ne'] |
| 291 | apply (div_le_iff₀ hb).mpr |
| 292 | calc |
| 293 | 1 = PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent * |
| 294 | PhysicalParticularWave.ratioPower (ChartScales.Q m) (ChartScales.Q n) exponent := he.symm |
| 295 | _ ≤ _ := mul_le_mul_of_nonneg_left h |
| 296 | (PhysicalParticularWave.ratioPower_pos (ChartScales.Q_pos n) (ChartScales.Q_pos m) exponent).le |
| 297 | |
| 298 | theorem S_window_le {n m : ℕ} (hn : 1 ≤ n) (hmn : m ≤ n + 4) : |
| 299 | ChartScales.S m ≤ 25 * ChartScales.S n := by |
| 300 | have hm : (m : ℝ) ≤ 5 * (n : ℝ) := by exact_mod_cast (show m ≤ 5 * n by omega) |
| 301 | have h0 : (0 : ℝ) ≤ m := Nat.cast_nonneg _ |
| 302 | have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg _ |
| 303 | unfold ChartScales.S |
| 304 | nlinarith [sq_nonneg (5 * (n : ℝ) - m)] |
| 305 | |
| 306 | theorem sqrt_S_window {n m : ℕ} (hn : 1 ≤ n) (hm : 1 ≤ m) |
| 307 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 308 | 1 / 5 ≤ Real.sqrt (ChartScales.S n) / Real.sqrt (ChartScales.S m) ∧ |
| 309 | Real.sqrt (ChartScales.S n) / Real.sqrt (ChartScales.S m) ≤ 5 := by |
| 310 | have hn0 : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) |
| 311 | have hm0 : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) |
| 312 | have hn5 : (n : ℝ) ≤ 5 * (m : ℝ) := by exact_mod_cast (show n ≤ 5 * m by omega) |
| 313 | have hm5 : (m : ℝ) ≤ 5 * (n : ℝ) := by exact_mod_cast (show m ≤ 5 * n by omega) |
| 314 | simp only [ChartScales.S, Real.sqrt_sq (le_of_lt hn0), Real.sqrt_sq (le_of_lt hm0)] |
| 315 | exact ⟨(le_div_iff₀ hm0).mpr (by linarith), (div_le_iff₀ hm0).mpr hn5⟩ |
| 316 | |
| 317 | theorem common_native_gap {h : ℝ} (hh : 0 ≤ h) {index : ℕ → ℕ} {budget : ℕ} |
| 318 | (hi : CommonBaseContext.IndexBounds h index budget) {n m : ℕ} |
| 319 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 320 | ChartScales.nativeIndex h m - index n ≤ budget + SlotColoring.nativeGap h := by |
| 321 | have hg := (SlotColoring.nativeIndex_gap h hh hn hm hnm hmn).2 |
| 322 | have hb := hi.gap_le n |
| 323 | have he := hi.le_native n |
| 324 | dsimp only [ChartScales.nativeIndex] at * |
| 325 | omega |
| 326 | |
| 327 | section Scales |
| 328 | |
| 329 | variable {Λ : Type} (chart : ℕ → ℕ) (reference : Λ → ℕ → ℕ) |
| 330 | (hnear : ∀ l n, chart n ≤ reference l n + 4 ∧ reference l n ≤ chart n + 4) |
| 331 | |
| 332 | noncomputable def bandPowerScale (exponent : ℝ) : ActualSignedControl.PositiveScale Λ where |
| 333 | value l n := PhysicalParticularWave.ratioPower (ChartScales.Q (chart n)) |
| 334 | (ChartScales.Q (reference l n)) exponent |
| 335 | lower := 1 / powerBound exponent |
| 336 | upper := powerBound exponent |
| 337 | lower_pos := div_pos zero_lt_one (zero_lt_one.trans_le (powerBound_one _)) |
| 338 | upper_one := powerBound_one _ |
| 339 | bounds l n := ⟨dyadic_ratioPower_lower (hnear l n).1 (hnear l n).2 _, |
| 340 | dyadic_ratioPower_le (hnear l n).1 (hnear l n).2 _⟩ |
| 341 | |
| 342 | noncomputable def velocityScale (h : ℝ) : ActualSignedControl.PositiveScale Λ := |
| 343 | bandPowerScale chart reference hnear (CoordinateAlgebra.A h) |
| 344 | |
| 345 | noncomputable def clockScale (h : ℝ) : ActualSignedControl.PositiveScale Λ := |
| 346 | bandPowerScale chart reference hnear (CoordinateAlgebra.A h + 1 / 2) |
| 347 | |
| 348 | @[simp] theorem velocityScale_value (h : ℝ) (l : Λ) (n : ℕ) : |
| 349 | (velocityScale chart reference hnear h).value l n = |
| 350 | PhysicalParticularWave.velocityWeight h (ChartScales.Q (chart n)) |
| 351 | (ChartScales.Q (reference l n)) := rfl |
| 352 | |
| 353 | @[simp] theorem clockScale_value (h : ℝ) (l : Λ) (n : ℕ) : |
| 354 | (clockScale chart reference hnear h).value l n = |
| 355 | PhysicalParticularWave.clockWeight h (ChartScales.Q (chart n)) |
| 356 | (ChartScales.Q (reference l n)) := rfl |
| 357 | |
| 358 | end Scales |
| 359 | |
| 360 | /-! ## The selected slot, including the periodic clock's padding -/ |
| 361 | |
| 362 | section Slots |
| 363 | |
| 364 | variable {D h : ℝ} {vr vt : Plane} |
| 365 | (sys : PartitionedCovariance.SlotSystem D h vr vt) |
| 366 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 367 | |
| 368 | noncomputable def slotGeometry (l : SlotColoring.Label) (gap : ℕ) : CommonCoverSolve.Geometry := |
| 369 | CommonCoverClass.bandGeometry (TorusAverages.slotChart vr vt hdet) h l.1 gap |
| 370 | (PartitionedCovariance.slotCenter h l - sys.radius • vt) |
| 371 | |
| 372 | noncomputable def clockWindow (m : ℕ) : PeriodicPhaseAssembly.ClockWindow where |
| 373 | lower := (-sys.radius, 0) |
| 374 | upper := (sys.radius, ChartScales.slotLength sys.radius h m) |
| 375 | padding := min sys.radius (ChartScales.slotLength sys.radius h m) / 16 |
| 376 | padding_pos := div_pos (lt_min sys.radius_pos |
| 377 | (div_pos (mul_pos (by norm_num) sys.radius_pos) (ChartScales.timeCoefficient_pos h m))) (by norm_num) |
| 378 | |
| 379 | theorem slotGeometry_basis (l : SlotColoring.Label) (gap : ℕ) (z : Plane) : |
| 380 | (slotGeometry sys hdet l gap).basis z = |
| 381 | z.1 • vr + (ChartScales.timeCoefficient h l.1 * z.2) • vt := by |
| 382 | rw [slotGeometry, CommonCoverClass.bandGeometry, CommonCoverClass.scaledBasis_apply, |
| 383 | TorusAverages.slotChart_apply] |
| 384 | |
| 385 | theorem clock_outer_in_slot (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) (gap : ℕ) : |
| 386 | (fun z => (slotGeometry sys hdet l gap).center + (slotGeometry sys hdet l gap).basis z) '' |
| 387 | (clockWindow sys l.1).outer ⊆ PartitionedCovariance.slotSet h sys.radius vr vt l := by |
| 388 | rintro _ ⟨z, hz, rfl⟩ |
| 389 | have hr := sys.radius_pos |
| 390 | have hci := ChartScales.timeCoefficient_pos h l.1 |
| 391 | have hci1 : ChartScales.timeCoefficient h l.1 ≤ 1 := |
| 392 | ((ChartScales.timeCoefficient_bounds h hh hl).2).trans |
| 393 | ((div_le_one (ChartScales.S_pos (by omega))).mpr (PhysicalGraphBounds.S_ge_one (by omega))) |
| 394 | have hpad0 := (clockWindow sys l.1).padding_pos |
| 395 | have hpad : (clockWindow sys l.1).padding ≤ sys.radius / 16 := |
| 396 | div_le_div_of_nonneg_right (min_le_left _ _) (by norm_num) |
| 397 | have hz1 : |z.1| ≤ 2 * sys.radius := by |
| 398 | have he : -sys.radius - 2 * (clockWindow sys l.1).padding ≤ z.1 ∧ |
| 399 | z.1 ≤ sys.radius + 2 * (clockWindow sys l.1).padding := hz.1 |
| 400 | exact abs_le.mpr ⟨by linarith [he.1], by linarith [he.2]⟩ |
| 401 | have hprodpad : ChartScales.timeCoefficient h l.1 * (clockWindow sys l.1).padding ≤ sys.radius / 16 := |
| 402 | (mul_le_of_le_one_left hpad0.le hci1).trans hpad |
| 403 | have htime : ChartScales.timeCoefficient h l.1 * ChartScales.slotLength sys.radius h l.1 = |
| 404 | 2 * sys.radius := by |
| 405 | unfold ChartScales.slotLength |
| 406 | field_simp |
| 407 | have hz2 : |ChartScales.timeCoefficient h l.1 * z.2 - sys.radius| ≤ 2 * sys.radius := by |
| 408 | have he : -(2 * (clockWindow sys l.1).padding) ≤ z.2 ∧ |
| 409 | z.2 ≤ ChartScales.slotLength sys.radius h l.1 + 2 * (clockWindow sys l.1).padding := by |
| 410 | have he := hz.2 |
| 411 | simp only [clockWindow, zero_sub] at he |
| 412 | exact he |
| 413 | have hlo := mul_le_mul_of_nonneg_left he.1 hci.le |
| 414 | have hhi := mul_le_mul_of_nonneg_left he.2 hci.le |
| 415 | exact abs_le.mpr ⟨by nlinarith, by nlinarith⟩ |
| 416 | refine ⟨z.1, ChartScales.timeCoefficient h l.1 * z.2 - sys.radius, hz1, hz2, ?_⟩ |
| 417 | dsimp only |
| 418 | rw [slotGeometry_basis] |
| 419 | change PartitionedCovariance.slotCenter h l - sys.radius • vt + |
| 420 | (z.1 • vr + (ChartScales.timeCoefficient h l.1 * z.2) • vt) = _ |
| 421 | rw [sub_smul] |
| 422 | abel |
| 423 | |
| 424 | theorem clockWindow_injective (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) (gap : ℕ) : |
| 425 | InjOn TorusAverages.quotientPoint |
| 426 | ((fun z => (slotGeometry sys hdet l gap).center + (slotGeometry sys hdet l gap).basis z) '' |
| 427 | (clockWindow sys l.1).outer) := |
| 428 | (sys.injective l).mono (clock_outer_in_slot sys hdet hh hl gap) |
| 429 | |
| 430 | theorem slotGeometry_separated (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) (gap : ℕ) : |
| 431 | WaveEnvelopeTransport.Separated (slotGeometry sys hdet l gap) |
| 432 | sys.radius (ChartScales.slotLength sys.radius h l.1) := by |
| 433 | apply (clockWindow_injective sys hdet hh hl gap).mono |
| 434 | rintro _ ⟨z, hz, rfl⟩ |
| 435 | exact ⟨z, (clockWindow sys l.1).core_subset_outer hz, rfl⟩ |
| 436 | |
| 437 | theorem slotGeometry_argumentCost (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) |
| 438 | {gap budget : ℕ} (hg : gap ≤ budget) : |
| 439 | CommonCoverClass.argumentCost (slotGeometry sys hdet l gap) ≤ |
| 440 | CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) budget * ChartScales.S l.1 := |
| 441 | CommonCoverClass.bandGeometry_argumentCost_le _ hh hl hg _ |
| 442 | |
| 443 | theorem slotGeometry_common_cost (hh : 0 ≤ h) {index : ℕ → ℕ} {budget : ℕ} |
| 444 | (hi : CommonBaseContext.IndexBounds h index budget) {n : ℕ} {l : SlotColoring.Label} |
| 445 | (hn : 1 ≤ n) (hl : 4 ≤ l.1) (hnl : n ≤ l.1 + 4) (hln : l.1 ≤ n + 4) : |
| 446 | CommonCoverClass.argumentCost |
| 447 | (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)) ≤ |
| 448 | (25 * CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) |
| 449 | (budget + SlotColoring.nativeGap h)) * ChartScales.S n := by |
| 450 | refine (slotGeometry_argumentCost sys hdet hh hl |
| 451 | (common_native_gap hh hi hn (by omega) hnl hln)).trans ?_ |
| 452 | have hc := CommonCoverClass.bandArgumentCost_one_le (TorusAverages.slotChart vr vt hdet) |
| 453 | (budget + SlotColoring.nativeGap h) |
| 454 | have he := mul_le_mul_of_nonneg_left (S_window_le hn hln) (zero_le_one.trans hc) |
| 455 | nlinarith |
| 456 | |
| 457 | end Slots |
| 458 | |
| 459 | /-! ## The exact physical change of slow variables and the copy affine map -/ |
| 460 | |
| 461 | noncomputable def slowChange (h Q Qr : ℝ) : Slow →L[ℝ] Slow := |
| 462 | (PhysicalParticularWave.ratioPower Q Qr (1 / 2) • ContinuousLinearMap.fst ℝ ℝ Plane).prod |
| 463 | (((PhysicalParticularWave.ratioPower Q Qr (CoordinateAlgebra.D h) • |
| 464 | ContinuousLinearMap.fst ℝ ℝ ℝ).prod |
| 465 | (PhysicalParticularWave.ratioPower Q Qr 1 • ContinuousLinearMap.snd ℝ ℝ ℝ)).comp |
| 466 | (ContinuousLinearMap.snd ℝ ℝ Plane)) |
| 467 | |
| 468 | @[simp] theorem slowChange_apply (h Q Qr : ℝ) (p : Slow) : |
| 469 | slowChange h Q Qr p = |
| 470 | (PhysicalParticularWave.ratioPower Q Qr (1 / 2) * p.1, |
| 471 | (PhysicalParticularWave.ratioPower Q Qr (CoordinateAlgebra.D h) * p.2.1, |
| 472 | PhysicalParticularWave.ratioPower Q Qr 1 * p.2.2)) := rfl |
| 473 | |
| 474 | theorem slowChange_eq_transition {Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) (h : ℝ) : |
| 475 | ⇑(slowChange h Q Qr) = SimilarityHomogeneity.chartTransition h Q Qr := by |
| 476 | funext p |
| 477 | simp only [slowChange_apply, SimilarityHomogeneity.chartTransition, |
| 478 | PhysicalParticularWave.ratioPower, Real.div_rpow hQ.le hQr.le, Real.rpow_one] |
| 479 | |
| 480 | theorem slowChange_time {h Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) {p : Slow} |
| 481 | (ht : 0 < p.2.2) : 0 < (slowChange h Q Qr p).2.2 := |
| 482 | mul_pos (PhysicalParticularWave.ratioPower_pos hQ hQr _) ht |
| 483 | |
| 484 | theorem slowChange_radius {h Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) {p : Slow} |
| 485 | (hr : 0 < p.1) : 0 < (slowChange h Q Qr p).1 := |
| 486 | mul_pos (PhysicalParticularWave.ratioPower_pos hQ hQr _) hr |
| 487 | |
| 488 | theorem normalized_inner_slowChange {F : OutgoingProfile.Profile} |
| 489 | {Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) {p : Slow} (ht : 0 < p.2.2) : |
| 490 | (BaseChartJets.normalizedCoordinates F.data.h (slowChange F.data.h Q Qr p)).2 = |
| 491 | (BaseChartJets.normalizedCoordinates F.data.h p).2 := by |
| 492 | rw [slowChange_eq_transition hQ hQr, BaseChartJets.normalizedCoordinates_eq, |
| 493 | BaseChartJets.normalizedCoordinates_eq] |
| 494 | exact SimilarityHomogeneity.chartInner_transition F.data.h_pos F.data.h_lt_half hQ hQr ht |
| 495 | |
| 496 | theorem profileRadius_slowChange {F : OutgoingProfile.Profile} |
| 497 | {Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) {p : Slow} (ht : 0 < p.2.2) (hr : 0 < p.1) : |
| 498 | PrimaryTargetBounds.profileRadius F.data.h (slowChange F.data.h Q Qr p) = |
| 499 | PrimaryTargetBounds.profileRadius F.data.h p := by |
| 500 | have htp := slowChange_time (h := F.data.h) hQ hQr ht |
| 501 | have hrp := slowChange_radius (h := F.data.h) hQ hQr hr |
| 502 | have hp := PrimaryTargetBounds.profileRadius_pos (F := F) ht hr |
| 503 | have hp' := PrimaryTargetBounds.profileRadius_pos (F := F) htp hrp |
| 504 | have he := congrArg Prod.fst (normalized_inner_slowChange (F := F) hQ hQr ht) |
| 505 | rw [← PrimaryTargetBounds.profileRadius_sq (F := F) htp, |
| 506 | ← PrimaryTargetBounds.profileRadius_sq (F := F) ht] at he |
| 507 | nlinarith |
| 508 | |
| 509 | theorem movingWeight_slowChange {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 510 | {Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) {p : Slow} (ht : 0 < p.2.2) (hr : 0 < p.1) : |
| 511 | PrimaryTargetBounds.movingWeight W (slowChange F.data.h Q Qr p) = |
| 512 | PrimaryTargetBounds.movingWeight W p := by |
| 513 | unfold PrimaryTargetBounds.movingWeight |
| 514 | rw [profileRadius_slowChange hQ hQr ht hr] |
| 515 | |
| 516 | noncomputable def slowChangeCost (h : ℝ) : ℝ := |
| 517 | 1 + powerBound (1 / 2) + powerBound (CoordinateAlgebra.D h) + powerBound 1 |
| 518 | |
| 519 | theorem slowChangeCost_one (h : ℝ) : 1 ≤ slowChangeCost h := by |
| 520 | unfold slowChangeCost |
| 521 | linarith [powerBound_one (1 / 2), powerBound_one (CoordinateAlgebra.D h), powerBound_one 1] |
| 522 | |
| 523 | theorem norm_slowChange_le (h : ℝ) {n m : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 524 | ‖slowChange h (ChartScales.Q n) (ChartScales.Q m)‖ ≤ slowChangeCost h := by |
| 525 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (slowChangeCost_one _)) |
| 526 | intro p |
| 527 | have hc (exponent : ℝ) : |
| 528 | |PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent| ≤ |
| 529 | powerBound exponent := by |
| 530 | rw [abs_of_pos (PhysicalParticularWave.ratioPower_pos (ChartScales.Q_pos _) (ChartScales.Q_pos _) _)] |
| 531 | exact dyadic_ratioPower_le hnm hmn _ |
| 532 | have hb (exponent : ℝ) (hcost : powerBound exponent ≤ slowChangeCost h) |
| 533 | (y : ℝ) (hy : ‖y‖ ≤ ‖p‖) : |
| 534 | ‖PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) exponent * y‖ ≤ |
| 535 | slowChangeCost h * ‖p‖ := by |
| 536 | rw [norm_mul, Real.norm_eq_abs] |
| 537 | exact mul_le_mul ((hc exponent).trans hcost) hy (norm_nonneg _) (zero_le_one.trans (slowChangeCost_one _)) |
| 538 | change max ‖_‖ (max ‖_‖ ‖_‖) ≤ _ |
| 539 | have h1 := powerBound_one (1 / 2) |
| 540 | have h2 := powerBound_one (CoordinateAlgebra.D h) |
| 541 | have h3 := powerBound_one 1 |
| 542 | refine max_le (hb (1 / 2) (by unfold slowChangeCost; linarith) p.1 (norm_fst_le p)) ?_ |
| 543 | exact max_le |
| 544 | (hb (CoordinateAlgebra.D h) (by unfold slowChangeCost; linarith) p.2.1 ((norm_fst_le p.2).trans (norm_snd_le p))) |
| 545 | (hb 1 (by unfold slowChangeCost; linarith) p.2.2 ((norm_snd_le p.2).trans (norm_snd_le p))) |
| 546 | |
| 547 | noncomputable def meanEquiv : Native ≃ₗᵢ[ℝ] LocalSignedRequest.Point := |
| 548 | (ParticularWaveBounds.liftAssoc Plane).symm.trans PhysicalResidualTZ.swapSlow |
| 549 | |
| 550 | @[simp] theorem meanEquiv_apply (x : Native) : meanEquiv x = (x.1.1, ((x.1.2.2, x.1.2.1), x.2)) := rfl |
| 551 | |
| 552 | noncomputable def viewStrip {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 553 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) (chart : ℕ → ℕ) : StripData Native := |
| 554 | ParticularWaveBounds.reindexStrip meanEquiv |
| 555 | (UniformPrimaryWeights.reindexedStrip (BaseContextAssembly.nativeStrip W U) |
| 556 | (fun n => (chart n, ()))) |
| 557 | |
| 558 | theorem viewStrip_slow {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 559 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) (chart : ℕ → ℕ) (n : ℕ) : |
| 560 | (viewStrip W U chart).slow n = max 1 (ChartScales.S (chart n)) := rfl |
| 561 | |
| 562 | theorem viewStrip_mem {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 563 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) (chart : ℕ → ℕ) (x : Native) : |
| 564 | x ∈ (viewStrip W U chart).domain ↔ x.1 ∈ BaseContextAssembly.slowCarrier W U := Iff.rfl |
| 565 | |
| 566 | theorem viewStrip_zeta {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 567 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) (chart : ℕ → ℕ) (x : Native) : |
| 568 | (viewStrip W U chart).zeta x = PrimaryTargetBounds.movingWeight W x.1 := by |
| 569 | change (BaseContextAssembly.nativeStrip W U).zeta (meanEquiv x) = _ |
| 570 | exact PrimaryTargetBounds.movingStripData_zeta W U _ _ _ _ _ _ |
| 571 | |
| 572 | theorem viewStrip_delta {F : OutgoingProfile.Profile} (W : NominalProfile.Witness F) |
| 573 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) (chart : ℕ → ℕ) (x : Native) : |
| 574 | (viewStrip W U chart).delta x = WeightedRadialPrimitive.delta |
| 575 | (WeightedRadialPrimitive.logLength (PrimaryTargetBounds.leftRadius W) (PrimaryTargetBounds.rightRadius W)) |
| 576 | (WeightedRadialPrimitive.logPosition (PrimaryTargetBounds.leftRadius W) |
| 577 | (PrimaryTargetBounds.profileRadius F.data.h x.1)) := by |
| 578 | unfold PrimaryTargetBounds.profileRadius |
| 579 | rw [BaseChartJets.normalizedCoordinates_eq] |
| 580 | rfl |
| 581 | |
| 582 | section CopyMap |
| 583 | |
| 584 | variable {D h : ℝ} {vr vt : Plane} |
| 585 | (sys : PartitionedCovariance.SlotSystem D h vr vt) |
| 586 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 587 | |
| 588 | noncomputable def copyPoint (l : SlotColoring.Label) (chart common : ℕ) |
| 589 | (k : TorusInverse.Frequency) (x : Native) : Native := |
| 590 | (slowChange h (ChartScales.Q chart) (ChartScales.Q l.1) x.1, |
| 591 | (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - common)).coordinates k x.2) |
| 592 | |
| 593 | noncomputable def copyLinear (l : SlotColoring.Label) (chart common : ℕ) : Native →L[ℝ] Native := |
| 594 | (slowChange h (ChartScales.Q chart) (ChartScales.Q l.1)).prodMap |
| 595 | (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - common)).coordinateLinear |
| 596 | |
| 597 | theorem copyPoint_affine (l : SlotColoring.Label) (chart common : ℕ) |
| 598 | (k : TorusInverse.Frequency) (x : Native) : |
| 599 | copyPoint sys hdet l chart common k x = |
| 600 | copyLinear sys hdet l chart common x + copyPoint sys hdet l chart common k 0 := by |
| 601 | apply Prod.ext |
| 602 | · simp [copyPoint, copyLinear] |
| 603 | · change (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - common)).coordinates k x.2 = |
| 604 | (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - common)).coordinateLinear x.2 + |
| 605 | (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - common)).coordinates k 0 |
| 606 | rw [CommonCoverSolve.Geometry.coordinates_eq_affine, add_comm] |
| 607 | |
| 608 | theorem norm_copyLinear_le (hh : 0 ≤ h) {index : ℕ → ℕ} {budget : ℕ} |
| 609 | (hi : CommonBaseContext.IndexBounds h index budget) {n : ℕ} {l : SlotColoring.Label} |
| 610 | (hn : 1 ≤ n) (hl : 4 ≤ l.1) (hnl : n ≤ l.1 + 4) (hln : l.1 ≤ n + 4) : |
| 611 | ‖copyLinear sys hdet l n (index n)‖ ≤ |
| 612 | (slowChangeCost h + 25 * CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) |
| 613 | (budget + SlotColoring.nativeGap h)) * BaseContextAssembly.slowScale n := by |
| 614 | have hc := norm_slowChange_le h hnl hln |
| 615 | have hg := slotGeometry_common_cost sys hdet hh hi hn hl hnl hln |
| 616 | have hd : ‖(slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)).coordinateLinear‖ ≤ |
| 617 | CommonCoverClass.argumentCost (slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)) := by |
| 618 | unfold CommonCoverClass.argumentCost |
| 619 | have hp : 0 ≤ ‖(slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)).pointLinear‖ * |
| 620 | (1 + ‖(slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)).coordinateLinear‖) := by positivity |
| 621 | linarith |
| 622 | have hS : 1 ≤ BaseContextAssembly.slowScale n := BaseContextAssembly.one_le_slowScale _ |
| 623 | have hSs : ChartScales.S n ≤ BaseContextAssembly.slowScale n := le_max_right _ _ |
| 624 | have hC := CommonCoverClass.bandArgumentCost_one_le (TorusAverages.slotChart vr vt hdet) |
| 625 | (budget + SlotColoring.nativeGap h) |
| 626 | have hA := slowChangeCost_one h |
| 627 | have hSn : 0 ≤ ChartScales.S n := sq_nonneg _ |
| 628 | apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) |
| 629 | intro x |
| 630 | change max ‖slowChange h (ChartScales.Q n) (ChartScales.Q l.1) x.1‖ |
| 631 | ‖(slotGeometry sys hdet l (ChartScales.nativeIndex h l.1 - index n)).coordinateLinear x.2‖ ≤ _ |
| 632 | apply max_le |
| 633 | · calc |
| 634 | _ ≤ slowChangeCost h * ‖x‖ := |
| 635 | ((slowChange h _ _).le_opNorm _).trans (mul_le_mul hc (norm_fst_le x) (norm_nonneg _) (by linarith)) |
| 636 | _ ≤ _ := mul_le_mul_of_nonneg_right (by nlinarith) (norm_nonneg _) |
| 637 | · calc |
| 638 | _ ≤ (25 * CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) |
| 639 | (budget + SlotColoring.nativeGap h) * ChartScales.S n) * ‖x‖ := |
| 640 | ((slotGeometry sys hdet l _).coordinateLinear.le_opNorm _).trans |
| 641 | (mul_le_mul (hd.trans hg) (norm_snd_le x) (norm_nonneg _) (by positivity)) |
| 642 | _ ≤ _ := mul_le_mul_of_nonneg_right (by nlinarith) (norm_nonneg _) |
| 643 | |
| 644 | end CopyMap |
| 645 | |
| 646 | /-! ## The exact coefficient and phase-normal scale factors -/ |
| 647 | |
| 648 | theorem sqrt_epsilon (h : ℝ) (n : ℕ) : |
| 649 | Real.sqrt (ChartScales.epsilon h n) = ChartScales.Q n ^ (h / 2) := by |
| 650 | rw [Real.sqrt_eq_rpow, ChartScales.epsilon, ← Real.rpow_mul (ChartScales.Q_pos n).le] |
| 651 | congr 1 |
| 652 | ring |
| 653 | |
| 654 | theorem sqrt_epsilon_ratio (h : ℝ) (n m : ℕ) : |
| 655 | Real.sqrt (ChartScales.epsilon h m) / Real.sqrt (ChartScales.epsilon h n) = |
| 656 | PhysicalParticularWave.ratioPower (ChartScales.Q n) (ChartScales.Q m) (-(h / 2)) := by |
| 657 | rw [sqrt_epsilon, sqrt_epsilon] |
| 658 | simpa only [neg_neg] using PhysicalParticularWave.ratioPower_neg_div |
| 659 | (ChartScales.Q_pos n) (ChartScales.Q_pos m) (-(h / 2)) |
| 660 | |
| 661 | noncomputable def roundedCarrier (h : ℝ) (n : ℕ) : ℝ := |
| 662 | (ChartScales.carrier h n : ℝ) * Real.sqrt (ChartScales.epsilon h n) |
| 663 | |
| 664 | theorem roundedCarrier_bounds {h : ℝ} (hh : 0 ≤ h) (n : ℕ) : |
| 665 | 1 ≤ roundedCarrier h n ∧ roundedCarrier h n ≤ 2 := by |
| 666 | obtain ⟨hl, hu⟩ := Scaling.carrier_frequency_sqrt_bounds (ChartScales.epsilon_pos h n) |
| 667 | have hs : Real.sqrt (ChartScales.epsilon h n) ≤ 1 := by |
| 668 | simpa only [Real.sqrt_one] using Real.sqrt_le_sqrt (ChartScales.epsilon_le_one h hh n) |
| 669 | exact ⟨hl, hu.trans (by linarith)⟩ |
| 670 | |
| 671 | section PhysicalScales |
| 672 | |
| 673 | variable {Λ : Type} (chart : ℕ → ℕ) (reference : Λ → ℕ → ℕ) |
| 674 | (hnear : ∀ l n, chart n ≤ reference l n + 4 ∧ reference l n ≤ chart n + 4) |
| 675 | |
| 676 | noncomputable def coefficientScale (h : ℝ) : ActualSignedControl.PositiveScale Λ := |
| 677 | (velocityScale chart reference hnear h).mul (bandPowerScale chart reference hnear (-(h / 2))) |
| 678 | |
| 679 | theorem coefficientScale_value (h : ℝ) (l : Λ) (n : ℕ) : |
| 680 | (coefficientScale chart reference hnear h).value l n = |
| 681 | PhysicalSignedWave.coefficientScale (ChartScales.epsilon h (chart n)) |
| 682 | (ChartScales.epsilon h (reference l n)) |
| 683 | (PhysicalParticularWave.velocityWeight h (ChartScales.Q (chart n)) |
| 684 | (ChartScales.Q (reference l n))) := by |
| 685 | change PhysicalParticularWave.velocityWeight h _ _ * |
| 686 | PhysicalParticularWave.ratioPower _ _ (-(h / 2)) = _ |
| 687 | rw [← sqrt_epsilon_ratio] |
| 688 | unfold PhysicalSignedWave.coefficientScale |
| 689 | ring |
| 690 | |
| 691 | noncomputable def carrierRatioScale {h : ℝ} (hh : 0 ≤ h) : ActualSignedControl.PositiveScale Λ where |
| 692 | value l n := roundedCarrier h (reference l n) / roundedCarrier h (chart n) |
| 693 | lower := 1 / 2 |
| 694 | upper := 2 |
| 695 | lower_pos := by norm_num |
| 696 | upper_one := by norm_num |
| 697 | bounds l n := by |
| 698 | have h1 := roundedCarrier_bounds hh (reference l n) |
| 699 | have h2 := roundedCarrier_bounds hh (chart n) |
| 700 | have hpos : 0 < roundedCarrier h (chart n) := zero_lt_one.trans_le h2.1 |
| 701 | exact ⟨(le_div_iff₀ hpos).mpr (by linarith), (div_le_iff₀ hpos).mpr (by linarith)⟩ |
| 702 | |
| 703 | noncomputable def normalScale {h : ℝ} (hh : 0 ≤ h) : ActualSignedControl.PositiveScale Λ := |
| 704 | (carrierRatioScale chart reference hh).mul (bandPowerScale chart reference hnear (h / 2 + 1 / 2)) |
| 705 | |
| 706 | theorem normalScale_value {h : ℝ} (hh : 0 ≤ h) (l : Λ) (n : ℕ) : |
| 707 | (normalScale chart reference hnear hh).value l n = |
| 708 | PhysicalParticularWave.normalWeight (ChartScales.Q (chart n)) (ChartScales.Q (reference l n)) |
| 709 | (ChartScales.carrier h (chart n)) (ChartScales.carrier h (reference l n)) := by |
| 710 | change (roundedCarrier h (reference l n) / roundedCarrier h (chart n)) * |
| 711 | PhysicalParticularWave.ratioPower _ _ (h / 2 + 1 / 2) = _ |
| 712 | rw [← PhysicalParticularWave.ratioPower_mul (ChartScales.Q_pos _) (ChartScales.Q_pos _)] |
| 713 | unfold roundedCarrier PhysicalParticularWave.normalWeight PhysicalParticularWave.ratioPower |
| 714 | rw [sqrt_epsilon, sqrt_epsilon] |
| 715 | have hn := Scaling.carrier_frequency_pos (ChartScales.epsilon_pos h (chart n)) |
| 716 | have hm := Scaling.carrier_frequency_pos (ChartScales.epsilon_pos h (reference l n)) |
| 717 | field_simp [(Real.rpow_pos_of_pos (ChartScales.Q_pos (chart n)) (h / 2)).ne', |
| 718 | (Real.rpow_pos_of_pos (ChartScales.Q_pos (reference l n)) (h / 2)).ne', |
| 719 | (Real.rpow_pos_of_pos (ChartScales.Q_pos (reference l n)) (1 / 2)).ne', |
| 720 | (show (ChartScales.carrier h (chart n) : ℝ) ≠ 0 from hn.ne')] |
| 721 | |
| 722 | end PhysicalScales |
| 723 | |
| 724 | /-! ## The concrete prepared-copy chart -/ |
| 725 | |
| 726 | section PreparedCopies |
| 727 | |
| 728 | variable {F : OutgoingProfile.Profile} {W : NominalProfile.Witness F} |
| 729 | (H : NominalConeAssembly.Certificate W) {ld : ModulatedProfileAssembly.LoopData W} |
| 730 | (v : ModulatedProfileAssembly.Witness ld) |
| 731 | {upper : ℝ} {B : ℕ} {r0 : ℝ} {N0 : ℕ} |
| 732 | (a : PrimaryGeometryAssembly.Prepared H v upper B r0 N0) |
| 733 | {vr vt : Plane} |
| 734 | (sys : PartitionedCovariance.SlotSystem (CoordinateAlgebra.D F.data.h) F.data.h vr vt) |
| 735 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 736 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) |
| 737 | {Λ : Type} (reference : Λ → ℕ → Label H v a) |
| 738 | (chart index : ℕ → ℕ) (sign : Λ → ℕ → Fin 2) |
| 739 | |
| 740 | noncomputable def copyLabel (l : Λ) (n : ℕ) : SlotColoring.Label := |
| 741 | PartitionedCovariance.signedLabel (PrimaryGeometryAssembly.label W (reference l n)) (sign l n) |
| 742 | |
| 743 | noncomputable def phaseCell (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) : Set Native := |
| 744 | copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k ⁻¹' |
| 745 | (nativeDomain H v a).carrier (reference l n) |
| 746 | |
| 747 | theorem phaseCell_open (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) : |
| 748 | IsOpen (phaseCell H v a sys hdet reference chart index sign l n k) := by |
| 749 | apply ((nativeDomain H v a).isOpen (reference l n)).preimage |
| 750 | exact ((slowChange F.data.h _ _).continuous.comp continuous_fst).prodMk |
| 751 | (((slotGeometry sys hdet _ _).coordinates_contDiff k).continuous.comp continuous_snd) |
| 752 | |
| 753 | theorem copy_weight_eq (hr0 : 0 < r0) (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) |
| 754 | {x : Native} (hx : x ∈ (viewStrip W U chart).domain) : |
| 755 | (preparedChart H v a hr0).weight (reference l n) |
| 756 | (copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k x) = |
| 757 | (viewStrip W U chart).zeta x := by |
| 758 | have hp := (viewStrip_mem W U chart x).mp hx |
| 759 | have ht := BaseContextAssembly.nativeStrip_time W U hp |
| 760 | have hr := BaseContextAssembly.nativeStrip_radius W U hp |
| 761 | change PrimaryTargetBounds.movingWeight W (slowChange F.data.h _ _ x.1) = _ |
| 762 | rw [movingWeight_slowChange W (ChartScales.Q_pos _) (ChartScales.Q_pos _) ht hr, |
| 763 | viewStrip_zeta] |
| 764 | |
| 765 | theorem copy_growth_le |
| 766 | (hchart : ∀ n, 1 ≤ chart n) |
| 767 | (hnear : ∀ l n, chart n ≤ BaseChartJets.cellBand (reference l n) + 4 ∧ |
| 768 | BaseChartJets.cellBand (reference l n) ≤ chart n + 4) |
| 769 | (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) |
| 770 | {x : Native} (hx : x ∈ (viewStrip W U chart).domain) : |
| 771 | (nativeDomain H v a).growth (reference l n) |
| 772 | (copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k x) ≤ |
| 773 | 25 * (viewStrip W U chart).growth n x := by |
| 774 | have hp := (viewStrip_mem W U chart x).mp hx |
| 775 | have ht := BaseContextAssembly.nativeStrip_time W U hp |
| 776 | have hr := BaseContextAssembly.nativeStrip_radius W U hp |
| 777 | have he : (BaseContextAssembly.nativeStrip W (standardSlowRegion F.data.h_pos F.data.h_lt_half)).delta |
| 778 | (BaseContextAssembly.insertSlow (slowChange F.data.h (ChartScales.Q (chart n)) |
| 779 | (ChartScales.Q (BaseChartJets.cellBand (reference l n))) x.1)) = |
| 780 | (viewStrip W U chart).delta x := by |
| 781 | change (viewStrip W (standardSlowRegion F.data.h_pos F.data.h_lt_half) id).delta |
| 782 | (slowChange F.data.h (ChartScales.Q (chart n)) |
| 783 | (ChartScales.Q (BaseChartJets.cellBand (reference l n))) x.1, 0) = _ |
| 784 | rw [viewStrip_delta, viewStrip_delta, |
| 785 | profileRadius_slowChange (ChartScales.Q_pos _) (ChartScales.Q_pos _) ht hr] |
| 786 | have hSn := PhysicalGraphBounds.S_ge_one (hchart n) |
| 787 | have hSm := S_window_le (hchart n) (hnear l n).2 |
| 788 | have hmax : BaseContextAssembly.slowScale (BaseChartJets.cellBand (reference l n)) ≤ |
| 789 | 25 * BaseContextAssembly.slowScale (chart n) := by |
| 790 | unfold BaseContextAssembly.slowScale |
| 791 | rw [max_eq_right hSn] |
| 792 | exact max_le (by linarith) hSm |
| 793 | change BaseContextAssembly.slowScale (BaseChartJets.cellBand (reference l n)) * |
| 794 | max 1 ((BaseContextAssembly.nativeStrip W _).delta |
| 795 | (BaseContextAssembly.insertSlow (slowChange F.data.h (ChartScales.Q (chart n)) |
| 796 | (ChartScales.Q (BaseChartJets.cellBand (reference l n))) x.1)))⁻¹ ≤ _ |
| 797 | rw [he] |
| 798 | exact (mul_le_mul_of_nonneg_right hmax (zero_le_one.trans (le_max_left 1 _))).trans_eq (by |
| 799 | change (25 * BaseContextAssembly.slowScale (chart n)) * max 1 ((viewStrip W U chart).delta x)⁻¹ = |
| 800 | 25 * (BaseContextAssembly.slowScale (chart n) * max 1 ((viewStrip W U chart).delta x)⁻¹) |
| 801 | ring) |
| 802 | |
| 803 | /-- The copy chart is assembled from the actual dyadic and slot maps. |
| 804 | The only indexing restrictions are the active four-level window and |
| 805 | the chosen common-cover budget; all analytic comparisons are derived. -/ |
| 806 | noncomputable def copyChart (hr0 : 0 < r0) |
| 807 | (hchart : ∀ n, 1 ≤ chart n) |
| 808 | (hnear : ∀ l n, chart n ≤ BaseChartJets.cellBand (reference l n) + 4 ∧ |
| 809 | BaseChartJets.cellBand (reference l n) ≤ chart n + 4) |
| 810 | {budget : ℕ} (hi : CommonBaseContext.IndexBounds F.data.h index budget) : |
| 811 | ActualSignedControl.CopyChart (viewStrip W U chart) (nativeDomain H v a) |
| 812 | (preparedChart H v a hr0).weight |
| 813 | (phaseCell H v a sys hdet reference chart index sign) where |
| 814 | index := reference |
| 815 | linear l n _ := copyLinear sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) |
| 816 | shift l n k := copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k 0 |
| 817 | maps l n k x hx hi := by |
| 818 | rw [← copyPoint_affine] |
| 819 | exact hi |
| 820 | growthConstant := 25 |
| 821 | linearConstant := slowChangeCost F.data.h + |
| 822 | 25 * CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) |
| 823 | (budget + SlotColoring.nativeGap F.data.h) |
| 824 | growth_one := by norm_num |
| 825 | linear_one := by |
| 826 | have h1 := slowChangeCost_one F.data.h |
| 827 | have h2 := CommonCoverClass.bandArgumentCost_one_le (TorusAverages.slotChart vr vt hdet) |
| 828 | (budget + SlotColoring.nativeGap F.data.h) |
| 829 | linarith |
| 830 | growthDegree := 1 |
| 831 | linearDegree := 1 |
| 832 | growth_bound l n k x hx _ := by |
| 833 | rw [← copyPoint_affine, pow_one] |
| 834 | exact copy_growth_le H v a sys hdet U reference chart index sign hchart hnear l n k hx |
| 835 | linear_bound l n _ := by |
| 836 | rw [pow_one] |
| 837 | exact norm_copyLinear_le sys hdet F.data.h_pos.le hi (hchart n) |
| 838 | (a.large _ (reference l n).property).four_le (hnear l n).1 (hnear l n).2 |
| 839 | weight_eq l n k x hx _ := by |
| 840 | rw [← copyPoint_affine] |
| 841 | exact copy_weight_eq H v a sys hdet U reference chart index sign hr0 l n k hx |
| 842 | ratioLower := 1 / 5 |
| 843 | ratioUpper := 5 |
| 844 | ratio_pos := by norm_num |
| 845 | ratio_one := by norm_num |
| 846 | scale_ratio l n := by |
| 847 | change 1 / 5 ≤ Real.sqrt (max 1 (ChartScales.S (chart n))) / |
| 848 | Real.sqrt (ChartScales.S (BaseChartJets.cellBand (reference l n))) ∧ |
| 849 | Real.sqrt (max 1 (ChartScales.S (chart n))) / |
| 850 | Real.sqrt (ChartScales.S (BaseChartJets.cellBand (reference l n))) ≤ 5 |
| 851 | rw [max_eq_right (PhysicalGraphBounds.S_ge_one (hchart n))] |
| 852 | exact sqrt_S_window (hchart n) (reference l n).val.property.1 (hnear l n).1 (hnear l n).2 |
| 853 | |
| 854 | theorem copyChart_pull (hr0 : 0 < r0) (hchart : ∀ n, 1 ≤ chart n) |
| 855 | (hnear : ∀ l n, chart n ≤ BaseChartJets.cellBand (reference l n) + 4 ∧ |
| 856 | BaseChartJets.cellBand (reference l n) ≤ chart n + 4) |
| 857 | {budget : ℕ} (hi : CommonBaseContext.IndexBounds F.data.h index budget) |
| 858 | {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 859 | (f : Label H v a → Native → E) (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) (x : Native) : |
| 860 | (copyChart H v a sys hdet U reference chart index sign hr0 hchart hnear hi).pull f l n k x = |
| 861 | f (reference l n) (copyPoint sys hdet (copyLabel H v a reference sign l n) |
| 862 | (chart n) (index (chart n)) k x) := by |
| 863 | change f (reference l n) |
| 864 | (copyLinear sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) x + |
| 865 | copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k 0) = _ |
| 866 | rw [← copyPoint_affine] |
| 867 | |
| 868 | end PreparedCopies |
| 869 | |
| 870 | /-! ## Actual periodic phase normals on the native cores -/ |
| 871 | |
| 872 | abbrev Cylinder := PhysicalResidualBridge.Cylinder |
| 873 | |
| 874 | noncomputable def radialVector : Plane := TorusInverse.vector .radial |
| 875 | noncomputable def temporalVector : Plane := TorusInverse.vector .temporal |
| 876 | |
| 877 | theorem vectors_det : radialVector.1 * temporalVector.2 - radialVector.2 * temporalVector.1 ≠ 0 := by |
| 878 | dsimp [radialVector, temporalVector, TorusInverse.vector] |
| 879 | nlinarith [sq_nonneg (Real.sqrt 2 - 1)] |
| 880 | |
| 881 | noncomputable def slotLinear (g : CommonCoverSolve.Geometry) : Cylinder →L[ℝ] PhaseCalculus.Slot where |
| 882 | toFun x := ((x.1.1, x.1.2.1), (x.2, (g.coordinateLinear x.1.2.2).2)) |
| 883 | map_add' x y := by ext <;> simp |
| 884 | map_smul' c x := by ext <;> simp |
| 885 | cont := (continuous_fst.fst.prodMk continuous_fst.snd.fst).prodMk |
| 886 | (continuous_snd.prodMk ((g.coordinateLinear.continuous.comp continuous_fst.snd.snd).snd)) |
| 887 | |
| 888 | noncomputable def slotCoordinates (g : CommonCoverSolve.Geometry) (k : TorusInverse.Frequency) |
| 889 | (x : Cylinder) : PhaseCalculus.Slot := |
| 890 | ((x.1.1, x.1.2.1), (x.2, (g.coordinates k x.1.2.2).2)) |
| 891 | |
| 892 | theorem slotCoordinates_affine (g : CommonCoverSolve.Geometry) (k : TorusInverse.Frequency) : |
| 893 | slotCoordinates g k = fun x => slotLinear g x + ((0, 0), (0, (g.coordinates k 0).2)) := by |
| 894 | funext x |
| 895 | apply Prod.ext |
| 896 | · simp [slotCoordinates, slotLinear] |
| 897 | · apply Prod.ext |
| 898 | · simp [slotCoordinates, slotLinear] |
| 899 | · change (g.coordinates k x.1.2.2).2 = |
| 900 | (g.coordinateLinear x.1.2.2).2 + (g.coordinates k 0).2 |
| 901 | rw [g.coordinates_eq_affine] |
| 902 | exact add_comm _ _ |
| 903 | |
| 904 | theorem slotCoordinates_hasFDerivAt (g : CommonCoverSolve.Geometry) (k : TorusInverse.Frequency) (x : Cylinder) : |
| 905 | HasFDerivAt (slotCoordinates g k) (slotLinear g) x := by |
| 906 | rw [slotCoordinates_affine] |
| 907 | exact (slotLinear g).hasFDerivAt.add_const _ |
| 908 | |
| 909 | section ActualPhase |
| 910 | |
| 911 | variable {D h : ℝ} |
| 912 | (sys : PartitionedCovariance.SlotSystem D h radialVector temporalVector) |
| 913 | |
| 914 | theorem slot_coordinate_radial (l : SlotColoring.Label) (gap : ℕ) : |
| 915 | (slotGeometry sys vectors_det l gap).coordinateLinear radialVector = |
| 916 | (ChartScales.Lambda ^ gap, 0) := by |
| 917 | let g := slotGeometry sys vectors_det l gap |
| 918 | have hb : g.basis (1, 0) = radialVector := by |
| 919 | rw [slotGeometry_basis] |
| 920 | simp |
| 921 | have he : g.basis.symm radialVector = (1, 0) := (g.basis.symm_apply_eq).mpr hb.symm |
| 922 | change g.basis.symm (CommonCoverSolve.coverPower gap radialVector) = _ |
| 923 | rw [show CommonCoverSolve.coverPower gap radialVector = ChartScales.Lambda ^ gap • radialVector from |
| 924 | CommonBaseContext.coverPower_radial gap, map_smul, he] |
| 925 | simp |
| 926 | |
| 927 | theorem slot_coordinates_radial (l : SlotColoring.Label) (gap i : ℕ) (Q : ℝ) (x : Cylinder) : |
| 928 | slotLinear (slotGeometry sys vectors_det l gap) |
| 929 | ((PhysicalResidualBridge.commonGraph Q h i).radial x) = PhaseCalculus.eR := by |
| 930 | change ((1, (0, 0)), (0, ((slotGeometry sys vectors_det l gap).coordinateLinear |
| 931 | ((_ * _) • radialVector)).2)) = _ |
| 932 | rw [map_smul, slot_coordinate_radial] |
| 933 | simp [PhaseCalculus.eR] |
| 934 | |
| 935 | theorem slot_coordinates_angular (g : CommonCoverSolve.Geometry) (x : Cylinder) : |
| 936 | slotLinear g (PhysicalResidualBridge.ScaledGraph.angular x) = PhaseCalculus.eTheta := by |
| 937 | change ((0, (0, 0)), (1, (g.coordinateLinear 0).2)) = _ |
| 938 | simp [PhaseCalculus.eTheta] |
| 939 | |
| 940 | theorem slot_coordinates_axial (g : CommonCoverSolve.Geometry) (Q h : ℝ) (i : ℕ) (x : Cylinder) : |
| 941 | slotLinear g ((PhysicalResidualBridge.commonGraph Q h i).axial x) = |
| 942 | Q ^ h • PhaseCalculus.eZ := by |
| 943 | change ((0, (Q ^ h, 0)), (0, (g.coordinateLinear 0).2)) = _ |
| 944 | simp [PhaseCalculus.eZ] |
| 945 | |
| 946 | noncomputable def periodicPhase (l : SlotColoring.Label) (gap : ℕ) |
| 947 | (epsilon p pz x0 : ℝ) (F G : Slow → ℝ) (x : Cylinder) : ℝ := |
| 948 | PhaseCalculus.phase epsilon p pz x0 F G |
| 949 | ((x.1.1, x.1.2.1), (x.2, |
| 950 | PeriodicPhaseAssembly.periodicClock (slotGeometry sys vectors_det l gap) |
| 951 | (clockWindow sys l.1).cutoff x.1.2.2)) |
| 952 | |
| 953 | theorem periodicPhase_germ (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) (gap : ℕ) |
| 954 | (epsilon p pz x0 : ℝ) (F G : Slow → ℝ) (k : TorusInverse.Frequency) |
| 955 | {x : Cylinder} |
| 956 | (hx : (slotGeometry sys vectors_det l gap).coordinates k x.1.2.2 ∈ (clockWindow sys l.1).core) : |
| 957 | periodicPhase sys l gap epsilon p pz x0 F G =ᶠ[𝓝 x] |
| 958 | PhaseCalculus.phase epsilon p pz x0 F G ∘ slotCoordinates (slotGeometry sys vectors_det l gap) k := by |
| 959 | have he := PeriodicPhaseAssembly.periodicClock_germ |
| 960 | (slotGeometry sys vectors_det l gap) (clockWindow sys l.1) |
| 961 | (clockWindow_injective sys vectors_det hh hl gap) k |
| 962 | (z := ((x.1.1, x.1.2.1), x.1.2.2)) hx |
| 963 | have ht : Tendsto (fun y : Cylinder => ((y.1.1, y.1.2.1), y.1.2.2)) (𝓝 x) |
| 964 | (𝓝 ((x.1.1, x.1.2.1), x.1.2.2)) := |
| 965 | ((continuous_fst.fst.prodMk continuous_fst.snd.fst).prodMk continuous_fst.snd.snd).continuousAt |
| 966 | filter_upwards [ht.eventually he] with y hy |
| 967 | simp only [periodicPhase, Function.comp_apply, slotCoordinates, hy] |
| 968 | |
| 969 | private theorem normal_pullback {X : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 970 | (chi : X → PhaseCalculus.Slot) (epsilon p pz x0 : ℝ) (F G : Slow → ℝ) |
| 971 | (Vr Vtheta Vz : X → X) {x : X} (hchi : DifferentiableAt ℝ chi x) |
| 972 | (hF : DifferentiableAt ℝ F (chi x).1) (hG : DifferentiableAt ℝ G (chi x).1) |
| 973 | (hr : fderiv ℝ chi x (Vr x) = PhaseCalculus.eR) |
| 974 | (ht : fderiv ℝ chi x (Vtheta x) = PhaseCalculus.eTheta) |
| 975 | (hz : fderiv ℝ chi x (Vz x) = epsilon • PhaseCalculus.eZ) : |
| 976 | HarmonicCalculus.phaseNormal (fun y => (chi y).1.1) Vr Vtheta Vz |
| 977 | (PhaseCalculus.phase epsilon p pz x0 F G ∘ chi) x = |
| 978 | PhaseCalculus.phaseNormal epsilon p pz x0 F G (chi x) := by |
| 979 | have hd := fderiv_comp x |
| 980 | (PrimaryMaterialDefect.differentiableAt_phase epsilon p pz x0 F G (chi x) hF hG) hchi |
| 981 | ext i |
| 982 | fin_cases i <;> simp [HarmonicCalculus.phaseNormal, PhaseCalculus.phaseNormal, |
| 983 | HarmonicCalculus.along, hd, hr, ht, hz] |
| 984 | |
| 985 | theorem nativePhase_normal (l : SlotColoring.Label) (gap i : ℕ) {Q : ℝ} (hQ : 0 < Q) |
| 986 | (p pz x0 : ℝ) (F G : Slow → ℝ) (k : TorusInverse.Frequency) (theta : ℝ) |
| 987 | {x : Cylinder} (hF : DifferentiableAt ℝ F (x.1.1, x.1.2.1)) |
| 988 | (hG : DifferentiableAt ℝ G (x.1.1, x.1.2.1)) : |
| 989 | HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 990 | (PhysicalResidualBridge.commonGraph Q h i).radial PhysicalResidualBridge.ScaledGraph.angular |
| 991 | (PhysicalResidualBridge.commonGraph Q h i).axial |
| 992 | (PhaseCalculus.phase (Q ^ h) p pz x0 F G ∘ slotCoordinates (slotGeometry sys vectors_det l gap) k) x = |
| 993 | PhaseCalculus.phaseNormal (Q ^ h) p pz x0 F G |
| 994 | ((x.1.1, x.1.2.1), (theta, ((slotGeometry sys vectors_det l gap).coordinates k x.1.2.2).2)) := by |
| 995 | have hc := slotCoordinates_hasFDerivAt (slotGeometry sys vectors_det l gap) k x |
| 996 | have he := normal_pullback (slotCoordinates (slotGeometry sys vectors_det l gap) k) |
| 997 | (Q ^ h) p pz x0 F G (PhysicalResidualBridge.commonGraph Q h i).radial |
| 998 | PhysicalResidualBridge.ScaledGraph.angular (PhysicalResidualBridge.commonGraph Q h i).axial |
| 999 | hc.differentiableAt hF hG |
| 1000 | (by rw [hc.fderiv]; exact slot_coordinates_radial sys l gap i Q x) |
| 1001 | (by rw [hc.fderiv]; exact slot_coordinates_angular _ _) |
| 1002 | (by rw [hc.fderiv]; exact slot_coordinates_axial _ _ _ _ _) |
| 1003 | change HarmonicCalculus.phaseNormal (fun y => (slotCoordinates (slotGeometry sys vectors_det l gap) k y).1.1) |
| 1004 | _ _ _ _ _ = _ |
| 1005 | rw [he] |
| 1006 | rw [PhaseCalculus.phaseNormal_formula _ _ _ _ _ _ _ (Real.rpow_pos_of_pos hQ _).ne' hF hG, |
| 1007 | PhaseCalculus.phaseNormal_formula _ _ _ _ _ _ _ (Real.rpow_pos_of_pos hQ _).ne' hF hG] |
| 1008 | rfl |
| 1009 | |
| 1010 | theorem periodicPhase_differentiableAt (l : SlotColoring.Label) (gap : ℕ) |
| 1011 | (epsilon p pz x0 : ℝ) (F G : Slow → ℝ) {x : Cylinder} |
| 1012 | (hF : DifferentiableAt ℝ F (x.1.1, x.1.2.1)) |
| 1013 | (hG : DifferentiableAt ℝ G (x.1.1, x.1.2.1)) : |
| 1014 | DifferentiableAt ℝ (periodicPhase sys l gap epsilon p pz x0 F G) x := by |
| 1015 | have hc := (PeriodicPhaseAssembly.periodicClock_contDiff |
| 1016 | (slotGeometry sys vectors_det l gap) (clockWindow sys l.1)).differentiable (by simp) |
| 1017 | have hchi : DifferentiableAt ℝ (fun y : Cylinder => |
| 1018 | ((y.1.1, y.1.2.1), (y.2, PeriodicPhaseAssembly.periodicClock |
| 1019 | (slotGeometry sys vectors_det l gap) (clockWindow sys l.1).cutoff y.1.2.2))) x := |
| 1020 | (differentiableAt_fst.fst.prodMk differentiableAt_fst.snd.fst).prodMk |
| 1021 | (differentiableAt_snd.prodMk (hc.differentiableAt.comp x differentiableAt_fst.snd.snd)) |
| 1022 | exact (PrimaryMaterialDefect.differentiableAt_phase epsilon p pz x0 F G _ hF hG).comp x hchi |
| 1023 | |
| 1024 | theorem periodicPhase_normal_germ (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) |
| 1025 | (gap i : ℕ) {Q : ℝ} (hQ : 0 < Q) (p pz x0 : ℝ) (F G : Slow → ℝ) |
| 1026 | {S : Set Slow} (hS : IsOpen S) (hF : ContDiffOn ℝ ∞ F S) (hG : ContDiffOn ℝ ∞ G S) |
| 1027 | (k : TorusInverse.Frequency) (theta : ℝ) {x : Cylinder} |
| 1028 | (hx : (x.1.1, x.1.2.1) ∈ S) |
| 1029 | (hc : (slotGeometry sys vectors_det l gap).coordinates k x.1.2.2 ∈ (clockWindow sys l.1).core) : |
| 1030 | (fun y => HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 1031 | (PhysicalResidualBridge.commonGraph Q h i).radial PhysicalResidualBridge.ScaledGraph.angular |
| 1032 | (PhysicalResidualBridge.commonGraph Q h i).axial |
| 1033 | (periodicPhase sys l gap (Q ^ h) p pz x0 F G) y) =ᶠ[𝓝 x] |
| 1034 | fun y => PhaseCalculus.phaseNormal (Q ^ h) p pz x0 F G |
| 1035 | ((y.1.1, y.1.2.1), (theta, ((slotGeometry sys vectors_det l gap).coordinates k y.1.2.2).2)) := by |
| 1036 | have hp := periodicPhase_germ sys hh hl gap (Q ^ h) p pz x0 F G k hc |
| 1037 | have hr := ParticularWaveAssembly.along_germ hp (PhysicalResidualBridge.commonGraph Q h i).radial |
| 1038 | have ht := ParticularWaveAssembly.along_germ hp PhysicalResidualBridge.ScaledGraph.angular |
| 1039 | have hz := ParticularWaveAssembly.along_germ hp (PhysicalResidualBridge.commonGraph Q h i).axial |
| 1040 | have hm : ∀ᶠ y : Cylinder in 𝓝 x, (y.1.1, y.1.2.1) ∈ S := |
| 1041 | (hS.preimage (continuous_fst.fst.prodMk continuous_fst.snd.fst)).mem_nhds hx |
| 1042 | filter_upwards [hr, ht, hz, hm] with y hyr hyt hyz hy |
| 1043 | have he : HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 1044 | (PhysicalResidualBridge.commonGraph Q h i).radial PhysicalResidualBridge.ScaledGraph.angular |
| 1045 | (PhysicalResidualBridge.commonGraph Q h i).axial |
| 1046 | (periodicPhase sys l gap (Q ^ h) p pz x0 F G) y = |
| 1047 | HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 1048 | (PhysicalResidualBridge.commonGraph Q h i).radial PhysicalResidualBridge.ScaledGraph.angular |
| 1049 | (PhysicalResidualBridge.commonGraph Q h i).axial |
| 1050 | (PhaseCalculus.phase (Q ^ h) p pz x0 F G ∘ slotCoordinates (slotGeometry sys vectors_det l gap) k) y := by |
| 1051 | simp only [HarmonicCalculus.phaseNormal, hyr, hyt, hyz] |
| 1052 | exact he.trans (nativePhase_normal sys l gap i hQ p pz x0 F G k theta |
| 1053 | ((hF.contDiffAt (hS.mem_nhds hy)).differentiableAt (by simp)) |
| 1054 | ((hG.contDiffAt (hS.mem_nhds hy)).differentiableAt (by simp))) |
| 1055 | |
| 1056 | theorem phase_normal_view_germ (hh : 0 ≤ h) {l : SlotColoring.Label} (hl : 4 ≤ l.1) |
| 1057 | (i gap : ℕ) {Q Qr : ℝ} (hQ : 0 < Q) (hQr : 0 < Qr) |
| 1058 | (K Kr p pz x0 : ℝ) (F G : Slow → ℝ) |
| 1059 | {S : Set Slow} (hS : IsOpen S) (hF : ContDiffOn ℝ ∞ F S) (hG : ContDiffOn ℝ ∞ G S) |
| 1060 | (k : TorusInverse.Frequency) (theta : ℝ) {x : Cylinder} (hxR : 0 < x.1.1) |
| 1061 | (hxS : (slowChange h Q Qr (x.1.1, x.1.2.1)) ∈ S) |
| 1062 | (hc : (slotGeometry sys vectors_det l 0).coordinates k |
| 1063 | (CommonCoverSolve.coverPower gap x.1.2.2) ∈ (clockWindow sys l.1).core) : |
| 1064 | (fun y => HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 1065 | (PhysicalResidualBridge.commonGraph Q h i).radial PhysicalResidualBridge.ScaledGraph.angular |
| 1066 | (PhysicalResidualBridge.commonGraph Q h i).axial |
| 1067 | (fun z => (Kr / K) * periodicPhase sys l 0 (Qr ^ h) p pz x0 F G |
| 1068 | (PhysicalParticularWave.cylinderChange h Q Qr gap z)) y) =ᶠ[𝓝 x] |
| 1069 | fun y => PhysicalParticularWave.normalWeight Q Qr K Kr • |
| 1070 | PhaseCalculus.phaseNormal (Qr ^ h) p pz x0 F G |
| 1071 | (slowChange h Q Qr (y.1.1, y.1.2.1), |
| 1072 | (theta, ((slotGeometry sys vectors_det l 0).coordinates k |
| 1073 | (CommonCoverSolve.coverPower gap y.1.2.2)).2)) := by |
| 1074 | let changeMap := PhysicalParticularWave.cylinderChange h Q Qr gap |
| 1075 | have hn := periodicPhase_normal_germ sys hh hl 0 (i + gap) hQr p pz x0 F G hS hF hG k theta |
| 1076 | (x := changeMap x) hxS hc |
| 1077 | have hp : Tendsto changeMap (𝓝 x) (𝓝 (changeMap x)) := changeMap.continuous.continuousAt |
| 1078 | have hR : ∀ᶠ y : Cylinder in 𝓝 x, 0 < y.1.1 := |
| 1079 | (isOpen_lt continuous_const continuous_fst.fst).mem_nhds hxR |
| 1080 | have hslow : ∀ᶠ y : Cylinder in 𝓝 x, slowChange h Q Qr (y.1.1, y.1.2.1) ∈ S := |
| 1081 | (hS.preimage ((slowChange h Q Qr).continuous.comp |
| 1082 | (continuous_fst.fst.prodMk continuous_fst.snd.fst))).mem_nhds hxS |
| 1083 | filter_upwards [hp.eventually hn, hR, hslow] with y hyN hyR hyS |
| 1084 | have hFd := (hF.contDiffAt (hS.mem_nhds hyS)).differentiableAt (by simp) |
| 1085 | have hGd := (hG.contDiffAt (hS.mem_nhds hyS)).differentiableAt (by simp) |
| 1086 | have hd := periodicPhase_differentiableAt sys l 0 (Qr ^ h) p pz x0 F G |
| 1087 | (x := changeMap y) hFd hGd |
| 1088 | exact (PhysicalParticularWave.phaseNormal_chartChange hQ hQr h i gap K Kr hyR hd).trans |
| 1089 | (congrArg (fun N => PhysicalParticularWave.normalWeight Q Qr K Kr • N) hyN) |
| 1090 | |
| 1091 | end ActualPhase |
| 1092 | |
| 1093 | section ReferenceViews |
| 1094 | |
| 1095 | variable {D h : ℝ} {vr vt : Plane} |
| 1096 | (sys : PartitionedCovariance.SlotSystem D h vr vt) |
| 1097 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1098 | |
| 1099 | theorem slotGeometry_refine (l : SlotColoring.Label) (gap : ℕ) : |
| 1100 | CopySolveCompatibility.refineGeometry (slotGeometry sys hdet l 0) gap = |
| 1101 | slotGeometry sys hdet l gap := by |
| 1102 | simp [CopySolveCompatibility.refineGeometry, slotGeometry, CommonCoverClass.bandGeometry] |
| 1103 | |
| 1104 | theorem slot_coordinates_from_zero (l : SlotColoring.Label) (gap : ℕ) |
| 1105 | (k : TorusInverse.Frequency) (Y : Plane) : |
| 1106 | (slotGeometry sys hdet l 0).coordinates k (CommonCoverSolve.coverPower gap Y) = |
| 1107 | (slotGeometry sys hdet l gap).coordinates k Y := by |
| 1108 | rw [← slotGeometry_refine sys hdet l gap] |
| 1109 | exact (CopySolveCompatibility.coordinates_refine _ _ _ _).symm |
| 1110 | |
| 1111 | noncomputable def cylinderNative (x : Cylinder) : Native := ((x.1.1, x.1.2.1), x.1.2.2) |
| 1112 | |
| 1113 | theorem copyPoint_eq_reference_view (l : SlotColoring.Label) (n common : ℕ) |
| 1114 | (k : TorusInverse.Frequency) (x : Cylinder) : |
| 1115 | copyPoint sys hdet l n common k (cylinderNative x) = |
| 1116 | ParticularWaveBounds.nativePoint (slotGeometry sys hdet l 0) k |
| 1117 | (cylinderNative (PhysicalParticularWave.cylinderChange h (ChartScales.Q n) |
| 1118 | (ChartScales.Q l.1) (ChartScales.nativeIndex h l.1 - common) x)) := by |
| 1119 | apply Prod.ext rfl |
| 1120 | exact (slot_coordinates_from_zero sys hdet l _ k _).symm |
| 1121 | |
| 1122 | theorem reference_view_graph (l : SlotColoring.Label) (n common : ℕ) |
| 1123 | (hi : common ≤ ChartScales.nativeIndex h l.1) |
| 1124 | {z : ProblemStatement.SpaceTime} (hz : 0 < z.2 0) : |
| 1125 | PhysicalParticularWave.cylinderChange h (ChartScales.Q n) (ChartScales.Q l.1) |
| 1126 | (ChartScales.nativeIndex h l.1 - common) |
| 1127 | ((PhysicalResidualBridge.commonGraph (ChartScales.Q n) h common).map z) = |
| 1128 | (PhysicalResidualBridge.commonGraph (ChartScales.Q l.1) h (ChartScales.nativeIndex h l.1)).map z := by |
| 1129 | rw [PhysicalParticularWave.cylinderChange_graph (ChartScales.Q_pos _) (ChartScales.Q_pos _) h common _ hz, |
| 1130 | Nat.add_sub_of_le hi] |
| 1131 | |
| 1132 | end ReferenceViews |
| 1133 | |
| 1134 | section PreparedNormals |
| 1135 | |
| 1136 | variable {F : OutgoingProfile.Profile} {W : NominalProfile.Witness F} |
| 1137 | (H : NominalConeAssembly.Certificate W) {ld : ModulatedProfileAssembly.LoopData W} |
| 1138 | (v : ModulatedProfileAssembly.Witness ld) |
| 1139 | {upper : ℝ} {B N0 : ℕ} |
| 1140 | (sys : PartitionedCovariance.SlotSystem (CoordinateAlgebra.D F.data.h) F.data.h radialVector temporalVector) |
| 1141 | (a : PrimaryGeometryAssembly.Prepared H v upper B sys.radius N0) |
| 1142 | |
| 1143 | noncomputable def preparedPhase (j : Fin 2) (L : Label H v a) : Cylinder → ℝ := |
| 1144 | let P := PrimaryGeometryAssembly.construction H v a sys.radius_pos j |
| 1145 | periodicPhase sys (PartitionedCovariance.signedLabel (PrimaryGeometryAssembly.label W L) j) 0 |
| 1146 | (ChartScales.epsilon F.data.h (BaseChartJets.cellBand L)) |
| 1147 | (P.phase.p L) (P.phase.pz L) (P.phase.x0 L) (P.phase.F L) (P.phase.G L) |
| 1148 | |
| 1149 | noncomputable def preparedViewPhase (j : Fin 2) (L : Label H v a) (n common : ℕ) : Cylinder → ℝ := |
| 1150 | fun x => ((ChartScales.carrier F.data.h (BaseChartJets.cellBand L) : ℝ) / |
| 1151 | (ChartScales.carrier F.data.h n : ℝ)) * preparedPhase H v sys a j L |
| 1152 | (PhysicalParticularWave.cylinderChange F.data.h (ChartScales.Q n) |
| 1153 | (ChartScales.Q (BaseChartJets.cellBand L)) (ChartScales.nativeIndex F.data.h (BaseChartJets.cellBand L) - common) x) |
| 1154 | |
| 1155 | theorem phaseNormal_pulseCoordinates (j : Fin 2) (L : Label H v a) (x : Native) : |
| 1156 | ActualSignedControl.phaseNormal (PrimaryGeometryAssembly.construction H v a sys.radius_pos j) |
| 1157 | (pulseCoordinates H v a) L x = |
| 1158 | (PrimaryGeometryAssembly.construction H v a sys.radius_pos j).phase.normal L (x.1, x.2.2) := by |
| 1159 | unfold ActualSignedControl.phaseNormal PrimaryCopyBounds.phasePoint pulseCoordinates |
| 1160 | have hL := (PrimaryGeometryAssembly.construction H v a sys.radius_pos j).L_pos L |
| 1161 | change (PrimaryGeometryAssembly.construction H v a sys.radius_pos j).phase.normal L |
| 1162 | (x.1, (PrimaryGeometryAssembly.construction H v a sys.radius_pos j).L L * |
| 1163 | (x.2.2 / (PrimaryGeometryAssembly.construction H v a sys.radius_pos j).L L)) = _ |
| 1164 | rw [mul_div_cancel₀ _ hL.ne'] |
| 1165 | |
| 1166 | /-- The normal germ required by the signed-copy control theorem is an |
| 1167 | output for the actual shared prepared phase and physical chart. -/ |
| 1168 | theorem preparedView_normal_germ (j : Fin 2) (L : Label H v a) (n common : ℕ) |
| 1169 | (k : TorusInverse.Frequency) {x : Cylinder} |
| 1170 | (hcell : copyPoint sys vectors_det |
| 1171 | (PartitionedCovariance.signedLabel (PrimaryGeometryAssembly.label W L) j) n common k |
| 1172 | (cylinderNative x) ∈ (nativeDomain H v a).carrier L) : |
| 1173 | (fun y => HarmonicCalculus.phaseNormal PhysicalResidualBridge.ScaledGraph.radius |
| 1174 | (PhysicalResidualBridge.commonGraph (ChartScales.Q n) F.data.h common).radial |
| 1175 | PhysicalResidualBridge.ScaledGraph.angular |
| 1176 | (PhysicalResidualBridge.commonGraph (ChartScales.Q n) F.data.h common).axial |
| 1177 | (preparedViewPhase H v sys a j L n common) y) =ᶠ[𝓝 x] |
| 1178 | fun y => PhysicalParticularWave.normalWeight (ChartScales.Q n) |
| 1179 | (ChartScales.Q (BaseChartJets.cellBand L)) (ChartScales.carrier F.data.h n) |
| 1180 | (ChartScales.carrier F.data.h (BaseChartJets.cellBand L)) • |
| 1181 | ActualSignedControl.phaseNormal (PrimaryGeometryAssembly.construction H v a sys.radius_pos j) |
| 1182 | (pulseCoordinates H v a) L |
| 1183 | (copyPoint sys vectors_det (PartitionedCovariance.signedLabel (PrimaryGeometryAssembly.label W L) j) |
| 1184 | n common k (cylinderNative y)) := by |
| 1185 | let P := PrimaryGeometryAssembly.construction H v a sys.radius_pos j |
| 1186 | let l := PartitionedCovariance.signedLabel (PrimaryGeometryAssembly.label W L) j |
| 1187 | let gap := ChartScales.nativeIndex F.data.h (BaseChartJets.cellBand L) - common |
| 1188 | have hl : 4 ≤ l.1 := (a.large _ L.property).four_le |
| 1189 | have hm : slowChange F.data.h (ChartScales.Q n) (ChartScales.Q (BaseChartJets.cellBand L)) |
| 1190 | (x.1.1, x.1.2.1) ∈ (PrimaryGeometryAssembly.domain W a.N).carrier L := hcell.1.1 |
| 1191 | have hr : 0 < x.1.1 := by |
| 1192 | have hp := a.radius_pos L _ hm |
| 1193 | change 0 < PhysicalParticularWave.ratioPower _ _ (1 / 2) * x.1.1 at hp |
| 1194 | exact (mul_pos_iff_of_pos_left (PhysicalParticularWave.ratioPower_pos |
| 1195 | (ChartScales.Q_pos _) (ChartScales.Q_pos _) _)).mp hp |
| 1196 | have hc : (slotGeometry sys vectors_det l 0).coordinates k |
| 1197 | (CommonCoverSolve.coverPower gap x.1.2.2) ∈ (clockWindow sys l.1).core := by |
| 1198 | rw [slot_coordinates_from_zero] |
| 1199 | exact ⟨⟨hcell.2.1.1.le, hcell.2.1.2.le⟩, ⟨hcell.2.2.1.le, hcell.2.2.2.le⟩⟩ |
| 1200 | have he := phase_normal_view_germ sys F.data.h_pos.le hl common gap |
| 1201 | (ChartScales.Q_pos n) (ChartScales.Q_pos (BaseChartJets.cellBand L)) |
| 1202 | (ChartScales.carrier F.data.h n) (ChartScales.carrier F.data.h (BaseChartJets.cellBand L)) |
| 1203 | (P.phase.p L) (P.phase.pz L) (P.phase.x0 L) (P.phase.F L) (P.phase.G L) |
| 1204 | ((PrimaryGeometryAssembly.domain W a.N).isOpen L) (P.baseF.smooth L) (P.baseG.smooth L) |
| 1205 | k (P.phase.theta L) hr hm hc |
| 1206 | filter_upwards [he] with y hy |
| 1207 | apply hy.trans |
| 1208 | congr 1 |
| 1209 | rw [phaseNormal_pulseCoordinates] |
| 1210 | change PhaseCalculus.phaseNormal _ _ _ _ _ _ _ = PhaseCalculus.phaseNormal _ _ _ _ _ _ _ |
| 1211 | rw [slot_coordinates_from_zero] |
| 1212 | rfl |
| 1213 | |
| 1214 | end PreparedNormals |
| 1215 | |
| 1216 | /-! ## Active-pair indexing retains the true fields on inactive labels -/ |
| 1217 | |
| 1218 | section SelectedPairs |
| 1219 | |
| 1220 | variable {Λ I E X : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 1221 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1222 | |
| 1223 | /-- Restricting the index set does not change a field or any of its jets. |
| 1224 | This transfers a single uniform estimate back to the original labels on |
| 1225 | their actual active cells. No values or scales are substituted there. -/ |
| 1226 | theorem uniformLocalJets_of_selected_pairs (s : StripData X) (P : Λ → ℕ → Prop) |
| 1227 | (e : ℕ → {q : Λ × ℕ // P q.1 q.2}) (he : Surjective e) |
| 1228 | {w : Λ → ℕ → X → ℝ} {f : Λ → ℕ → I → X → E} {K : Λ → ℕ → I → Set X} {alpha : ℝ} |
| 1229 | (hactive : ∀ l n i x, x ∈ s.domain → x ∈ K l n i → P l n) |
| 1230 | (hj : PeriodizedWaveBounds.UniformLocalJets |
| 1231 | (UniformPrimaryWeights.reindexedStrip s (fun q => ((e q).val.2, ()))) |
| 1232 | (fun (_ : Unit) q x => w (e q).val.1 (e q).val.2 x) alpha |
| 1233 | (fun (_ : Unit) q i => K (e q).val.1 (e q).val.2 i) |
| 1234 | (fun (_ : Unit) q i => f (e q).val.1 (e q).val.2 i)) : |
| 1235 | PeriodizedWaveBounds.UniformLocalJets s w alpha K f := by |
| 1236 | constructor |
| 1237 | · intro l n i x hx hk |
| 1238 | obtain ⟨q, hq⟩ := he ⟨(l, n), hactive l n i x hx hk⟩ |
| 1239 | have h := hj.smooth () q i x hx |
| 1240 | simpa only [hq] using h (by simpa only [hq] using hk) |
| 1241 | · intro m |
| 1242 | obtain ⟨C, hC, p, hb⟩ := hj.bounds m |
| 1243 | refine ⟨C, hC, p, ?_⟩ |
| 1244 | intro l n i x hx hk j hjm |
| 1245 | obtain ⟨q, hq⟩ := he ⟨(l, n), hactive l n i x hx hk⟩ |
| 1246 | simpa only [majorant, StripData.growth, UniformPrimaryWeights.reindexedStrip, hq] using |
| 1247 | hb () q i x hx (by simpa only [hq] using hk) j hjm |
| 1248 | |
| 1249 | end SelectedPairs |
| 1250 | |
| 1251 | section ActiveCopies |
| 1252 | |
| 1253 | variable {F : OutgoingProfile.Profile} {W : NominalProfile.Witness F} |
| 1254 | (H : NominalConeAssembly.Certificate W) {ld : ModulatedProfileAssembly.LoopData W} |
| 1255 | (v : ModulatedProfileAssembly.Witness ld) |
| 1256 | {upper : ℝ} {B : ℕ} {r0 : ℝ} {N0 : ℕ} |
| 1257 | (a : PrimaryGeometryAssembly.Prepared H v upper B r0 N0) |
| 1258 | {vr vt : Plane} |
| 1259 | (sys : PartitionedCovariance.SlotSystem (CoordinateAlgebra.D F.data.h) F.data.h vr vt) |
| 1260 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1261 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) |
| 1262 | {Λ : Type} (reference : Λ → ℕ → Label H v a) (chart index : ℕ → ℕ) |
| 1263 | (sign : Λ → ℕ → Fin 2) |
| 1264 | |
| 1265 | noncomputable def ActivePairCondition (l : Λ) (n : ℕ) : Prop := |
| 1266 | 1 ≤ chart n ∧ chart n ≤ BaseChartJets.cellBand (reference l n) + 4 ∧ |
| 1267 | BaseChartJets.cellBand (reference l n) ≤ chart n + 4 |
| 1268 | |
| 1269 | abbrev ActivePair := {q : Λ × ℕ // ActivePairCondition H v a reference chart q.1 q.2} |
| 1270 | |
| 1271 | noncomputable def activePhaseCell (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) : Set Native := |
| 1272 | {x | ActivePairCondition H v a reference chart l n ∧ |
| 1273 | x ∈ phaseCell H v a sys hdet reference chart index sign l n k} |
| 1274 | |
| 1275 | variable [Countable Λ] [Nonempty (ActivePair H v a reference chart)] |
| 1276 | |
| 1277 | noncomputable def activeEnumeration : ℕ → ActivePair H v a reference chart := |
| 1278 | Classical.choose (exists_surjective_nat (ActivePair H v a reference chart)) |
| 1279 | |
| 1280 | theorem activeEnumeration_surjective : Surjective (activeEnumeration H v a reference chart) := |
| 1281 | Classical.choose_spec (exists_surjective_nat (ActivePair H v a reference chart)) |
| 1282 | |
| 1283 | noncomputable def activeReference (_ : Unit) (q : ℕ) : Label H v a := |
| 1284 | reference (activeEnumeration H v a reference chart q).val.1 |
| 1285 | (activeEnumeration H v a reference chart q).val.2 |
| 1286 | |
| 1287 | noncomputable def activeChart (q : ℕ) : ℕ := |
| 1288 | chart (activeEnumeration H v a reference chart q).val.2 |
| 1289 | |
| 1290 | noncomputable def activeSign (_ : Unit) (q : ℕ) : Fin 2 := |
| 1291 | sign (activeEnumeration H v a reference chart q).val.1 |
| 1292 | (activeEnumeration H v a reference chart q).val.2 |
| 1293 | |
| 1294 | theorem active_near (q : ℕ) : |
| 1295 | activeChart H v a reference chart q ≤ BaseChartJets.cellBand (activeReference H v a reference chart () q) + 4 ∧ |
| 1296 | BaseChartJets.cellBand (activeReference H v a reference chart () q) ≤ activeChart H v a reference chart q + 4 := |
| 1297 | (activeEnumeration H v a reference chart q).property.2 |
| 1298 | |
| 1299 | /-- Every input of this chart is the original active pair. Its uniform |
| 1300 | bounds are valid without any comparison for inactive label-band pairs. -/ |
| 1301 | noncomputable def activeCopyChart (hr0 : 0 < r0) {budget : ℕ} |
| 1302 | (hi : CommonBaseContext.IndexBounds F.data.h index budget) := |
| 1303 | copyChart H v a sys hdet U (activeReference H v a reference chart) |
| 1304 | (activeChart H v a reference chart) index (activeSign H v a reference chart sign) hr0 |
| 1305 | (fun q => (activeEnumeration H v a reference chart q).property.1) |
| 1306 | (fun _ q => active_near H v a reference chart q) hi |
| 1307 | |
| 1308 | theorem active_reindexed_strip : |
| 1309 | viewStrip W U (activeChart H v a reference chart) = |
| 1310 | UniformPrimaryWeights.reindexedStrip (viewStrip W U chart) |
| 1311 | (fun q => ((activeEnumeration H v a reference chart q).val.2, ())) := rfl |
| 1312 | |
| 1313 | end ActiveCopies |
| 1314 | |
| 1315 | /-! ## The angle coordinate is retained when making harmonic blocks -/ |
| 1316 | |
| 1317 | noncomputable def cylinderNativeLinear : Cylinder →L[ℝ] Native := |
| 1318 | (ParticularWaveBounds.liftAssoc Plane).toContinuousLinearEquiv.toContinuousLinearMap.comp |
| 1319 | (ContinuousLinearMap.fst ℝ PhysicalResidualBridge.Lift ℝ) |
| 1320 | |
| 1321 | @[simp] theorem cylinderNativeLinear_apply (x : Cylinder) : |
| 1322 | cylinderNativeLinear x = cylinderNative x := rfl |
| 1323 | |
| 1324 | theorem norm_cylinderNativeLinear : ‖cylinderNativeLinear‖ ≤ 1 := by |
| 1325 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 1326 | intro x |
| 1327 | change ‖(ParticularWaveBounds.liftAssoc Plane) x.1‖ ≤ 1 * ‖x‖ |
| 1328 | rw [LinearIsometryEquiv.norm_map, one_mul] |
| 1329 | exact norm_fst_le x |
| 1330 | |
| 1331 | noncomputable def cylinderStrip (s : StripData Native) : StripData Cylinder := |
| 1332 | ParticularWaveBounds.reindexStrip (StateReindex.cylinder (ParticularWaveBounds.liftAssoc Plane)) |
| 1333 | (HarmonicWaveInteraction.productStrip s) |
| 1334 | |
| 1335 | noncomputable def cylinderCopyChart {Λ I i : Type} {s : StripData Native} |
| 1336 | {V : JetDomain i Native} {weight : i → Native → ℝ} {K : Λ → ℕ → I → Set Native} |
| 1337 | (c : ActualSignedControl.CopyChart s V weight K) : |
| 1338 | ActualSignedControl.CopyChart (cylinderStrip s) V weight |
| 1339 | (fun l n k => cylinderNative ⁻¹' K l n k) where |
| 1340 | index := c.index |
| 1341 | linear l n k := (c.linear l n k).comp cylinderNativeLinear |
| 1342 | shift := c.shift |
| 1343 | maps l n k x hx hk := c.maps l n k (cylinderNative x) hx hk |
| 1344 | growthConstant := c.growthConstant |
| 1345 | linearConstant := c.linearConstant |
| 1346 | growth_one := c.growth_one |
| 1347 | linear_one := c.linear_one |
| 1348 | growthDegree := c.growthDegree |
| 1349 | linearDegree := c.linearDegree |
| 1350 | growth_bound l n k x hx hk := c.growth_bound l n k (cylinderNative x) hx hk |
| 1351 | linear_bound l n k := by |
| 1352 | exact (ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 1353 | ((mul_le_of_le_one_right (norm_nonneg _) norm_cylinderNativeLinear).trans (c.linear_bound l n k)) |
| 1354 | weight_eq l n k x hx hk := c.weight_eq l n k (cylinderNative x) hx hk |
| 1355 | ratioLower := c.ratioLower |
| 1356 | ratioUpper := c.ratioUpper |
| 1357 | ratio_pos := c.ratio_pos |
| 1358 | ratio_one := c.ratio_one |
| 1359 | scale_ratio := c.scale_ratio |
| 1360 | |
| 1361 | theorem cylinderCopyChart_pull {Λ I i E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1362 | {s : StripData Native} {V : JetDomain i Native} {weight : i → Native → ℝ} |
| 1363 | {K : Λ → ℕ → I → Set Native} (c : ActualSignedControl.CopyChart s V weight K) |
| 1364 | (f : i → Native → E) (l : Λ) (n : ℕ) (k : I) (x : Cylinder) : |
| 1365 | (cylinderCopyChart c).pull f l n k x = c.pull f l n k (cylinderNative x) := rfl |
| 1366 | |
| 1367 | /-! ## The actual cutoffs locate every nonzero native contribution -/ |
| 1368 | |
| 1369 | section CutoffSupport |
| 1370 | |
| 1371 | variable {F : OutgoingProfile.Profile} {W : NominalProfile.Witness F} |
| 1372 | (H : NominalConeAssembly.Certificate W) {ld : ModulatedProfileAssembly.LoopData W} |
| 1373 | (v : ModulatedProfileAssembly.Witness ld) |
| 1374 | {upper : ℝ} {B : ℕ} {r0 : ℝ} {N0 : ℕ} |
| 1375 | (a : PrimaryGeometryAssembly.Prepared H v upper B r0 N0) |
| 1376 | |
| 1377 | noncomputable def nativeCutoff (L : Label H v a) (x : Native) : ℝ := |
| 1378 | SquaredPartition.dyadicProfile (SimilarityHomogeneity.chartQ F.data.h x.1) * |
| 1379 | PrimaryRepresentatives.nativeMask (BaseChartJets.cellBand L) (PrimaryGeometryAssembly.label W L).2 x.1 * |
| 1380 | PartitionedCovariance.cutoff r0 x.2.1 * |
| 1381 | GaussianTailFlat.profile (pulseCoordinates H v a L x).2 |
| 1382 | |
| 1383 | theorem nativeCutoff_nonzero_mem (hr0 : 0 < r0) (L : Label H v a) {x : Native} |
| 1384 | (ht : 0 < x.1.2.2) |
| 1385 | (hactive : PrimaryTargetBounds.profileRadius F.data.h x.1 ∈ |
| 1386 | Ioo (PrimaryTargetBounds.leftRadius W) (PrimaryTargetBounds.rightRadius W)) |
| 1387 | (hx : nativeCutoff H v a L x ≠ 0) : x ∈ (nativeDomain H v a).carrier L := by |
| 1388 | simp only [nativeCutoff, mul_ne_zero_iff] at hx |
| 1389 | have hq : SimilarityHomogeneity.chartQ F.data.h x.1 ∈ Ioo (1 / 2 : ℝ) 2 := by |
| 1390 | rw [← SquaredPartition.dyadicProfile_support] |
| 1391 | exact hx.1.1.1 |
| 1392 | have hs : x.1 ∈ (PrimaryGeometryAssembly.domain W a.N).carrier L := |
| 1393 | PrimaryGeometryAssembly.native_support_in_carrier W L ⟨subset_closure hx.1.1.2, ht⟩ |
| 1394 | have hu : x.2.1 ∈ Ioo (-r0) r0 := by |
| 1395 | rw [← PartitionedCovariance.cutoff_support hr0] |
| 1396 | exact hx.1.2 |
| 1397 | have hgauss : |(pulseCoordinates H v a L x).2 - 1 / 2| < 1 / 3 := by |
| 1398 | by_contra hn |
| 1399 | exact hx.2 (GaussianTailFlat.profile_zero (le_of_not_gt hn)) |
| 1400 | have hdiv : 0 < x.2.2 / ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) ∧ |
| 1401 | x.2.2 / ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) < 1 := by |
| 1402 | dsimp only [pulseCoordinates] at hgauss |
| 1403 | constructor <;> linarith [(abs_lt.mp hgauss).1, (abs_lt.mp hgauss).2] |
| 1404 | have hL : 0 < ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L) := |
| 1405 | div_pos (mul_pos (by norm_num) hr0) (ChartScales.timeCoefficient_pos _ _) |
| 1406 | have hv : x.2.2 ∈ Ioo 0 (ChartScales.slotLength r0 F.data.h (BaseChartJets.cellBand L)) := by |
| 1407 | exact ⟨by simpa only [zero_mul] using (lt_div_iff₀ hL).mp hdiv.1, |
| 1408 | (div_lt_one hL).mp hdiv.2⟩ |
| 1409 | refine ⟨⟨hs, ?_⟩, hu, hv⟩ |
| 1410 | apply (BaseContextAssembly.nativeStrip_mem W _ _).mpr |
| 1411 | exact ⟨⟨ht, hq⟩, hactive⟩ |
| 1412 | |
| 1413 | theorem nativeCutoff_zero_germ_outside_q (L : Label H v a) {x : Native} |
| 1414 | (ht : 0 < x.1.2.2) |
| 1415 | (hq : SimilarityHomogeneity.chartQ F.data.h x.1 ∉ Icc (1 / 2 : ℝ) 2) : |
| 1416 | nativeCutoff H v a L =ᶠ[𝓝 x] fun _ => 0 := by |
| 1417 | have he : SquaredPartition.dyadicProfile =ᶠ[𝓝 (SimilarityHomogeneity.chartQ F.data.h x.1)] fun _ => 0 := |
| 1418 | notMem_tsupport_iff_eventuallyEq.mp (by simpa only [SquaredPartition.dyadicProfile_tsupport] using hq) |
| 1419 | have hc : ContinuousAt (fun y : Native => SimilarityHomogeneity.chartQ F.data.h y.1) x := by |
| 1420 | exact ((SimilarityCoordinates.coordinateQ_smooth |
| 1421 | (by linarith [F.data.h_pos]) (by linarith [F.data.h_lt_half]) ht).continuousAt).comp |
| 1422 | (continuousAt_fst.snd.snd.prodMk continuousAt_fst.snd.fst) |
| 1423 | filter_upwards [hc.eventually he] with y hy |
| 1424 | simp only [nativeCutoff, hy, zero_mul] |
| 1425 | |
| 1426 | theorem nativeCutoff_zero_germ_outside_cell (L : Label H v a) {x : Native} |
| 1427 | (ht : 0 < x.1.2.2) (hx : x.1 ∉ (PrimaryGeometryAssembly.domain W a.N).carrier L) : |
| 1428 | nativeCutoff H v a L =ᶠ[𝓝 x] fun _ => 0 := by |
| 1429 | have hs : x.1 ∉ tsupport (PrimaryRepresentatives.nativeMask |
| 1430 | (BaseChartJets.cellBand L) (PrimaryGeometryAssembly.label W L).2) := by |
| 1431 | intro hs |
| 1432 | exact hx (PrimaryGeometryAssembly.native_support_in_carrier W L ⟨hs, ht⟩) |
| 1433 | have he := notMem_tsupport_iff_eventuallyEq.mp hs |
| 1434 | filter_upwards [continuousAt_fst.eventually he] with y hy |
| 1435 | simp only [nativeCutoff, hy, Pi.zero_apply, mul_zero, zero_mul] |
| 1436 | |
| 1437 | theorem copy_cutoff_mem_phaseCell (hr0 : 0 < r0) |
| 1438 | {vr vt : Plane} |
| 1439 | (sys : PartitionedCovariance.SlotSystem (CoordinateAlgebra.D F.data.h) F.data.h vr vt) |
| 1440 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) |
| 1441 | (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) |
| 1442 | {Λ : Type} (reference : Λ → ℕ → Label H v a) (chart index : ℕ → ℕ) |
| 1443 | (sign : Λ → ℕ → Fin 2) (l : Λ) (n : ℕ) (k : TorusInverse.Frequency) |
| 1444 | {x : Native} (hx : x ∈ (viewStrip W U chart).domain) |
| 1445 | (hn : nativeCutoff H v a (reference l n) |
| 1446 | (copyPoint sys hdet (copyLabel H v a reference sign l n) (chart n) (index (chart n)) k x) ≠ 0) : |
| 1447 | x ∈ phaseCell H v a sys hdet reference chart index sign l n k := by |
| 1448 | have hp := (viewStrip_mem W U chart x).mp hx |
| 1449 | have ht := BaseContextAssembly.nativeStrip_time W U hp |
| 1450 | have hr := BaseContextAssembly.nativeStrip_radius W U hp |
| 1451 | have ha := ((BaseContextAssembly.nativeStrip_mem W U _).mp hp).2 |
| 1452 | apply nativeCutoff_nonzero_mem H v a hr0 (reference l n) _ _ hn |
| 1453 | · exact slowChange_time (ChartScales.Q_pos _) (ChartScales.Q_pos _) ht |
| 1454 | · change PrimaryTargetBounds.profileRadius F.data.h (slowChange F.data.h _ _ x.1) ∈ _ |
| 1455 | rw [profileRadius_slowChange (ChartScales.Q_pos _) (ChartScales.Q_pos _) ht hr] |
| 1456 | exact ha |
| 1457 | |
| 1458 | end CutoffSupport |
| 1459 | |
| 1460 | /-! ## The solver's `(R,(T,Z))` parameter ordering -/ |
| 1461 | |
| 1462 | noncomputable def swapParameter : Slow ≃ₗᵢ[ℝ] Slow where |
| 1463 | toFun x := (x.1, (x.2.2, x.2.1)) |
| 1464 | invFun x := (x.1, (x.2.2, x.2.1)) |
| 1465 | left_inv _ := rfl |
| 1466 | right_inv _ := rfl |
| 1467 | map_add' _ _ := rfl |
| 1468 | map_smul' _ _ := rfl |
| 1469 | norm_map' x := by |
| 1470 | change ‖(x.1, (x.2.2, x.2.1))‖ = ‖x‖ |
| 1471 | simp only [Prod.norm_def, max_comm ‖x.2.1‖ ‖x.2.2‖] |
| 1472 | |
| 1473 | noncomputable def parameterLinear (h Q Qr : ℝ) : Slow →L[ℝ] Slow := |
| 1474 | swapParameter.toContinuousLinearEquiv.toContinuousLinearMap.comp |
| 1475 | ((slowChange h Q Qr).comp swapParameter.toContinuousLinearEquiv.toContinuousLinearMap) |
| 1476 | |
| 1477 | @[simp] theorem parameterLinear_apply (h Q Qr : ℝ) (x : Slow) : |
| 1478 | parameterLinear h Q Qr x = PhysicalParticularWave.parameterChange h Q Qr x := rfl |
| 1479 | |
| 1480 | theorem norm_parameterLinear_le (h : ℝ) {n m : ℕ} |
| 1481 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 1482 | ‖parameterLinear h (ChartScales.Q n) (ChartScales.Q m)‖ ≤ slowChangeCost h := by |
| 1483 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (slowChangeCost_one h)) |
| 1484 | intro x |
| 1485 | change ‖swapParameter (slowChange h (ChartScales.Q n) (ChartScales.Q m) (swapParameter x))‖ ≤ _ |
| 1486 | rw [LinearIsometryEquiv.norm_map] |
| 1487 | calc |
| 1488 | _ ≤ ‖slowChange h (ChartScales.Q n) (ChartScales.Q m)‖ * ‖swapParameter x‖ := |
| 1489 | (slowChange h _ _).le_opNorm _ |
| 1490 | _ ≤ slowChangeCost h * ‖x‖ := by |
| 1491 | rw [LinearIsometryEquiv.norm_map] |
| 1492 | exact mul_le_mul_of_nonneg_right (norm_slowChange_le h hnm hmn) (norm_nonneg _) |
| 1493 | |
| 1494 | end NavierStokes.ActualSignedGeometry |