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.CommonCoverSolve |
| 2 | import NavierStokes.PhysicalGraphBounds |
| 3 | import NavierStokes.WeightedClasses |
| 4 | import NavierStokes.SimilarityHomogeneity |
| 5 | |
| 6 | /-! |
| 7 | # Uniform stripped jets on a common cover |
| 8 | |
| 9 | The input of the copy solve is evaluated on the common torus. The two actual |
| 10 | argument maps below include the integration time as a variable. Their affine |
| 11 | derivatives, the native time scale, and adjacent-band changes give estimates |
| 12 | whose constants precede the band, copy, and source. No native periodicity of |
| 13 | the source is used. |
| 14 | -/ |
| 15 | |
| 16 | namespace NavierStokes.CommonCoverClass |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | open Set Function |
| 21 | open scoped ContDiff BigOperators Topology |
| 22 | open TorusInverse |
| 23 | |
| 24 | abbrev CCS := CommonCoverSolve.Geometry |
| 25 | |
| 26 | private theorem nat_le_infty (m : ℕ) : (m : WithTop ℕ∞) ≤ ∞ := |
| 27 | ENat.natCast_le_of_coe_top_le_withTop le_rfl m |
| 28 | |
| 29 | section Envelopes |
| 30 | |
| 31 | variable {X Y V W : Type} |
| 32 | [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 33 | [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 34 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 35 | [NormedAddCommGroup W] [NormedSpace ℝ W] |
| 36 | |
| 37 | /-- A point-dependent bound on a finite prefix of actual Fréchet jets. -/ |
| 38 | def EnvelopeJets (m : ℕ) (f : X → V) (envelope : X → ℝ) : Prop := |
| 39 | ∀ j ≤ m, ∀ x, ‖iteratedFDeriv ℝ j f x‖ ≤ envelope x |
| 40 | |
| 41 | theorem EnvelopeJets.nonneg {m : ℕ} {f : X → V} {e : X → ℝ} |
| 42 | (hf : EnvelopeJets m f e) (x : X) : 0 ≤ e x := |
| 43 | (norm_nonneg _).trans (hf 0 (Nat.zero_le _) x) |
| 44 | |
| 45 | theorem EnvelopeJets.mono {m : ℕ} {f : X → V} {e e' : X → ℝ} |
| 46 | (hf : EnvelopeJets m f e) (he : ∀ x, e x ≤ e' x) : EnvelopeJets m f e' := |
| 47 | fun j hj x => (hf j hj x).trans (he x) |
| 48 | |
| 49 | theorem affine_jet_bound {f : Y → V} (hf : ContDiff ℝ ∞ f) |
| 50 | (L : X →L[ℝ] Y) (c : Y) {K : ℝ} (hK : 1 ≤ K) (hL : ‖L‖ ≤ K) |
| 51 | (m : ℕ) (x : X) {A : ℝ} |
| 52 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (c + L x)‖ ≤ A) : |
| 53 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun z => f (c + L z)) x‖ ≤ A * K ^ m := by |
| 54 | have hA : 0 ≤ A := (norm_nonneg _).trans (hb 0 (Nat.zero_le _)) |
| 55 | intro j hj |
| 56 | refine (CommonCoverSolve.norm_iteratedFDeriv_affine_le hf L c x j).trans ?_ |
| 57 | exact mul_le_mul (hb j hj) |
| 58 | ((pow_le_pow_left₀ (norm_nonneg _) hL j).trans (pow_le_pow_right₀ hK hj)) |
| 59 | (pow_nonneg (norm_nonneg _) _) hA |
| 60 | |
| 61 | theorem EnvelopeJets.affine {m : ℕ} {f : Y → V} {e : Y → ℝ} |
| 62 | (hb : EnvelopeJets m f e) (hf : ContDiff ℝ ∞ f) |
| 63 | (L : X →L[ℝ] Y) (c : Y) {K : ℝ} (hK : 1 ≤ K) (hL : ‖L‖ ≤ K) : |
| 64 | EnvelopeJets m (fun x => f (c + L x)) (fun x => e (c + L x) * K ^ m) := by |
| 65 | intro j hj x |
| 66 | exact affine_jet_bound hf L c hK hL m x (fun i hi => hb i hi _) j hj |
| 67 | |
| 68 | /-- The weight is evaluated at the same point in both factors; it need not |
| 69 | be differentiated in this bound. -/ |
| 70 | theorem clm_apply_jet_bound {f : X → V →L[ℝ] W} {g : X → V} |
| 71 | (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (m : ℕ) (x : X) |
| 72 | {A B : ℝ} (hA : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f x‖ ≤ A) |
| 73 | (hB : ∀ j ≤ m, ‖iteratedFDeriv ℝ j g x‖ ≤ B) : |
| 74 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun y => f y (g y)) x‖ ≤ 2 ^ m * A * B := by |
| 75 | have hA0 : 0 ≤ A := (norm_nonneg _).trans (hA 0 (Nat.zero_le _)) |
| 76 | have hB0 : 0 ≤ B := (norm_nonneg _).trans (hB 0 (Nat.zero_le _)) |
| 77 | intro j hj |
| 78 | refine (norm_iteratedFDeriv_clm_apply hf hg x (nat_le_infty j)).trans ?_ |
| 79 | calc |
| 80 | _ ≤ ∑ i ∈ Finset.range (j + 1), (j.choose i : ℝ) * A * B := by |
| 81 | apply Finset.sum_le_sum |
| 82 | intro i hi |
| 83 | have hij : i ≤ j := Nat.le_of_lt_succ (Finset.mem_range.mp hi) |
| 84 | exact mul_le_mul (mul_le_mul_of_nonneg_left (hA i (hij.trans hj)) (by positivity)) |
| 85 | (hB (j - i) ((Nat.sub_le _ _).trans hj)) (norm_nonneg _) (mul_nonneg (by positivity) hA0) |
| 86 | _ = 2 ^ j * A * B := by |
| 87 | rw [← Finset.sum_mul, ← Finset.sum_mul] |
| 88 | congr 2 |
| 89 | exact_mod_cast Nat.sum_range_choose j |
| 90 | _ ≤ 2 ^ m * A * B := |
| 91 | mul_le_mul_of_nonneg_right |
| 92 | (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hj) hA0) hB0 |
| 93 | |
| 94 | theorem EnvelopeJets.clm_apply {m : ℕ} {f : X → V →L[ℝ] W} {g : X → V} |
| 95 | {A B : X → ℝ} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) |
| 96 | (hA : EnvelopeJets m f A) (hB : EnvelopeJets m g B) : |
| 97 | EnvelopeJets m (fun x => f x (g x)) (fun x => 2 ^ m * A x * B x) := |
| 98 | fun j hj x => clm_apply_jet_bound hf hg m x (fun i hi => hA i hi x) |
| 99 | (fun i hi => hB i hi x) j hj |
| 100 | |
| 101 | end Envelopes |
| 102 | |
| 103 | section Arguments |
| 104 | |
| 105 | variable {P V : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 106 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 107 | |
| 108 | /-- Joint slow/common-coordinate/integration-time space. -/ |
| 109 | abbrev Joint (P : Type) := (P × Plane) × ℝ |
| 110 | |
| 111 | noncomputable def nativeArgument (g : CCS) (k : Frequency) (w : Joint P) : P × Plane := |
| 112 | (w.1.1, ((g.coordinates k w.1.2).1, w.2)) |
| 113 | |
| 114 | noncomputable def sourceArgument (g : CCS) (k : Frequency) (w : Joint P) : P × Plane := |
| 115 | (w.1.1, g.path k w.1.2 w.2) |
| 116 | |
| 117 | noncomputable def nativeLinear (P : Type) [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 118 | (g : CCS) : Joint P →L[ℝ] P × Plane := |
| 119 | ((ContinuousLinearMap.fst ℝ P Plane).comp (ContinuousLinearMap.fst ℝ (P × Plane) ℝ)).prod |
| 120 | (((ContinuousLinearMap.fst ℝ ℝ ℝ).comp |
| 121 | (g.coordinateLinear.comp ((ContinuousLinearMap.snd ℝ P Plane).comp |
| 122 | (ContinuousLinearMap.fst ℝ (P × Plane) ℝ)))).prod |
| 123 | (ContinuousLinearMap.snd ℝ (P × Plane) ℝ)) |
| 124 | |
| 125 | noncomputable def sourceLinear (P : Type) [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 126 | (g : CCS) : Joint P →L[ℝ] P × Plane := |
| 127 | ((ContinuousLinearMap.fst ℝ P Plane).comp (ContinuousLinearMap.fst ℝ (P × Plane) ℝ)).prod |
| 128 | (g.pointLinear.comp ((ContinuousLinearMap.snd ℝ P Plane).comp (nativeLinear P g))) |
| 129 | |
| 130 | @[simp] theorem nativeLinear_apply (g : CCS) (w : Joint P) : |
| 131 | nativeLinear P g w = (w.1.1, ((g.coordinateLinear w.1.2).1, w.2)) := rfl |
| 132 | |
| 133 | @[simp] theorem sourceLinear_apply (g : CCS) (w : Joint P) : |
| 134 | sourceLinear P g w = |
| 135 | (w.1.1, g.pointLinear ((g.coordinateLinear w.1.2).1, w.2)) := rfl |
| 136 | |
| 137 | theorem nativeArgument_affine (g : CCS) (k : Frequency) (w : Joint P) : |
| 138 | nativeArgument g k w = nativeArgument g k 0 + nativeLinear P g w := by |
| 139 | simp only [nativeArgument, g.coordinates_eq_affine k w.1.2, nativeLinear_apply] |
| 140 | ext <;> simp |
| 141 | |
| 142 | theorem sourceArgument_affine (g : CCS) (k : Frequency) (w : Joint P) : |
| 143 | sourceArgument g k w = sourceArgument g k 0 + sourceLinear P g w := by |
| 144 | have ha : ((g.coordinates k w.1.2).1, w.2) = |
| 145 | ((g.coordinates k 0).1, 0) + ((g.coordinateLinear w.1.2).1, w.2) := by |
| 146 | rw [g.coordinates_eq_affine k w.1.2] |
| 147 | ext <;> simp |
| 148 | simp only [sourceArgument, CommonCoverSolve.Geometry.path, ha, g.point_add, |
| 149 | sourceLinear_apply, CommonCoverSolve.Geometry.pointLinear, |
| 150 | ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe] |
| 151 | ext <;> simp |
| 152 | |
| 153 | theorem nativeArgument_smooth (g : CCS) (k : Frequency) : |
| 154 | ContDiff ℝ ∞ (nativeArgument (P := P) g k) := by |
| 155 | have he : nativeArgument (P := P) g k = |
| 156 | fun w => nativeArgument g k 0 + nativeLinear P g w := |
| 157 | funext (nativeArgument_affine g k) |
| 158 | rw [he] |
| 159 | exact contDiff_const.add (nativeLinear P g).contDiff |
| 160 | |
| 161 | theorem sourceArgument_smooth (g : CCS) (k : Frequency) : |
| 162 | ContDiff ℝ ∞ (sourceArgument (P := P) g k) := by |
| 163 | have he : sourceArgument (P := P) g k = |
| 164 | fun w => sourceArgument g k 0 + sourceLinear P g w := |
| 165 | funext (sourceArgument_affine g k) |
| 166 | rw [he] |
| 167 | exact contDiff_const.add (sourceLinear P g).contDiff |
| 168 | |
| 169 | /-- One common affine cost for both maps. Its value is independent of the |
| 170 | copy index and of the slow parameter space. -/ |
| 171 | noncomputable def argumentCost (g : CCS) : ℝ := |
| 172 | 1 + ‖g.coordinateLinear‖ + ‖g.pointLinear‖ * (1 + ‖g.coordinateLinear‖) |
| 173 | |
| 174 | theorem one_le_argumentCost (g : CCS) : 1 ≤ argumentCost g := by |
| 175 | unfold argumentCost |
| 176 | have h : 0 ≤ ‖g.pointLinear‖ * (1 + ‖g.coordinateLinear‖) := by positivity |
| 177 | linarith [norm_nonneg g.coordinateLinear] |
| 178 | |
| 179 | theorem norm_nativeLinear_le (g : CCS) : ‖nativeLinear P g‖ ≤ argumentCost g := by |
| 180 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (one_le_argumentCost g)) |
| 181 | intro w |
| 182 | rw [nativeLinear_apply, Prod.norm_def, Prod.norm_def] |
| 183 | have hcoord : ‖(g.coordinateLinear w.1.2).1‖ ≤ ‖g.coordinateLinear‖ * ‖w‖ := |
| 184 | (norm_fst_le _).trans ((g.coordinateLinear.le_opNorm _).trans |
| 185 | (mul_le_mul_of_nonneg_left ((norm_snd_le w.1).trans (norm_fst_le w)) (norm_nonneg _))) |
| 186 | have hc : ‖g.coordinateLinear‖ ≤ argumentCost g := by |
| 187 | unfold argumentCost |
| 188 | have h : 0 ≤ ‖g.pointLinear‖ * (1 + ‖g.coordinateLinear‖) := by positivity |
| 189 | linarith |
| 190 | have h1 : ‖w‖ ≤ argumentCost g * ‖w‖ := |
| 191 | le_mul_of_one_le_left (norm_nonneg _) (one_le_argumentCost g) |
| 192 | exact max_le ((norm_fst_le w.1).trans ((norm_fst_le w).trans h1)) |
| 193 | (max_le (hcoord.trans (mul_le_mul_of_nonneg_right hc (norm_nonneg _))) |
| 194 | ((norm_snd_le w).trans h1)) |
| 195 | |
| 196 | theorem norm_sourceLinear_le (g : CCS) : ‖sourceLinear P g‖ ≤ argumentCost g := by |
| 197 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (one_le_argumentCost g)) |
| 198 | intro w |
| 199 | rw [sourceLinear_apply, Prod.norm_def] |
| 200 | have hcoord : ‖(g.coordinateLinear w.1.2).1‖ ≤ ‖g.coordinateLinear‖ * ‖w‖ := |
| 201 | (norm_fst_le _).trans ((g.coordinateLinear.le_opNorm _).trans |
| 202 | (mul_le_mul_of_nonneg_left ((norm_snd_le w.1).trans (norm_fst_le w)) (norm_nonneg _))) |
| 203 | have hpair : ‖((g.coordinateLinear w.1.2).1, w.2)‖ ≤ |
| 204 | (1 + ‖g.coordinateLinear‖) * ‖w‖ := by |
| 205 | rw [Prod.norm_def] |
| 206 | apply max_le |
| 207 | · exact hcoord.trans (mul_le_mul_of_nonneg_right (by linarith [norm_nonneg g.coordinateLinear]) |
| 208 | (norm_nonneg _)) |
| 209 | · exact (norm_snd_le w).trans |
| 210 | (le_mul_of_one_le_left (norm_nonneg _) (by linarith [norm_nonneg g.coordinateLinear])) |
| 211 | have h1 : ‖w‖ ≤ argumentCost g * ‖w‖ := |
| 212 | le_mul_of_one_le_left (norm_nonneg _) (one_le_argumentCost g) |
| 213 | apply max_le ((norm_fst_le w.1).trans ((norm_fst_le w).trans h1)) |
| 214 | calc |
| 215 | _ ≤ ‖g.pointLinear‖ * ‖((g.coordinateLinear w.1.2).1, w.2)‖ := g.pointLinear.le_opNorm _ |
| 216 | _ ≤ ‖g.pointLinear‖ * ((1 + ‖g.coordinateLinear‖) * ‖w‖) := |
| 217 | mul_le_mul_of_nonneg_left hpair (norm_nonneg _) |
| 218 | _ ≤ argumentCost g * ‖w‖ := by |
| 219 | rw [← mul_assoc] |
| 220 | apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) |
| 221 | unfold argumentCost |
| 222 | linarith [norm_nonneg g.coordinateLinear] |
| 223 | |
| 224 | theorem nativeArgument_jet_bound (g : CCS) (k : Frequency) {f : P × Plane → V} |
| 225 | (hf : ContDiff ℝ ∞ f) (m : ℕ) (w : Joint P) {A : ℝ} |
| 226 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (nativeArgument g k w)‖ ≤ A) : |
| 227 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun z => f (nativeArgument g k z)) w‖ ≤ |
| 228 | A * argumentCost g ^ m := by |
| 229 | have he : (fun z => f (nativeArgument g k z)) = |
| 230 | fun z => f (nativeArgument g k 0 + nativeLinear P g z) := by |
| 231 | funext z; rw [nativeArgument_affine] |
| 232 | rw [he] |
| 233 | apply affine_jet_bound hf _ _ (one_le_argumentCost g) (norm_nativeLinear_le g) m w |
| 234 | simpa only [← nativeArgument_affine] using hb |
| 235 | |
| 236 | theorem sourceArgument_jet_bound (g : CCS) (k : Frequency) {f : P × Plane → V} |
| 237 | (hf : ContDiff ℝ ∞ f) (m : ℕ) (w : Joint P) {A : ℝ} |
| 238 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (sourceArgument g k w)‖ ≤ A) : |
| 239 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun z => f (sourceArgument g k z)) w‖ ≤ |
| 240 | A * argumentCost g ^ m := by |
| 241 | have he : (fun z => f (sourceArgument g k z)) = |
| 242 | fun z => f (sourceArgument g k 0 + sourceLinear P g z) := by |
| 243 | funext z; rw [sourceArgument_affine] |
| 244 | rw [he] |
| 245 | apply affine_jet_bound hf _ _ (one_le_argumentCost g) (norm_sourceLinear_le g) m w |
| 246 | simpa only [← sourceArgument_affine] using hb |
| 247 | |
| 248 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 249 | @[simp] theorem sourceArgument_slow (g : CCS) (k : Frequency) (w : Joint P) : |
| 250 | (sourceArgument g k w).1 = w.1.1 := rfl |
| 251 | |
| 252 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 253 | @[simp] theorem nativeArgument_slow (g : CCS) (k : Frequency) (w : Joint P) : |
| 254 | (nativeArgument g k w).1 = w.1.1 := rfl |
| 255 | |
| 256 | end Arguments |
| 257 | |
| 258 | section BandGeometry |
| 259 | |
| 260 | /-- The fixed native basis has columns `v_r,v_t`; only the second column is |
| 261 | multiplied by the actual time coefficient. -/ |
| 262 | noncomputable def scaledBasis (B : Plane ≃L[ℝ] Plane) (ci : ℝ) (hci : ci ≠ 0) : |
| 263 | Plane ≃L[ℝ] Plane := (TorusAverages.transverseChart ci hci).trans B |
| 264 | |
| 265 | theorem scaledBasis_apply (B : Plane ≃L[ℝ] Plane) (ci : ℝ) (hci : ci ≠ 0) (z : Plane) : |
| 266 | scaledBasis B ci hci z = B (z.1, ci * z.2) := by |
| 267 | change B (TorusAverages.transverseChart ci hci z) = _ |
| 268 | rw [TorusAverages.transverseChart_apply] |
| 269 | |
| 270 | theorem scaledBasis_transverse (B : Plane ≃L[ℝ] Plane) (ci : ℝ) (hci : ci ≠ 0) : |
| 271 | scaledBasis B ci hci (0, 1) = ci • B (0, 1) := by |
| 272 | rw [scaledBasis_apply, ← map_smul] |
| 273 | congr 1 |
| 274 | ext <;> simp |
| 275 | |
| 276 | theorem norm_transverseChart_le {ci : ℝ} (hci : ci ≠ 0) (habs : |ci| ≤ 1) : |
| 277 | ‖(TorusAverages.transverseChart ci hci : Plane →L[ℝ] Plane)‖ ≤ 1 := by |
| 278 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 279 | intro z |
| 280 | rw [ContinuousLinearEquiv.coe_coe, TorusAverages.transverseChart_apply, one_mul, Prod.norm_def] |
| 281 | apply max_le (norm_fst_le z) |
| 282 | rw [norm_mul, Real.norm_eq_abs] |
| 283 | exact (mul_le_mul_of_nonneg_right habs (norm_nonneg z.2)).trans (by simpa using norm_snd_le z) |
| 284 | |
| 285 | theorem norm_inverse_transverseChart_le (ci : ℝ) (hci : ci ≠ 0) : |
| 286 | ‖((TorusAverages.transverseChart ci hci).symm : Plane →L[ℝ] Plane)‖ ≤ 1 + |ci⁻¹| := by |
| 287 | apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) |
| 288 | intro z |
| 289 | rw [ContinuousLinearEquiv.coe_coe, TorusAverages.transverseChart_symm_apply, Prod.norm_def] |
| 290 | apply max_le |
| 291 | · exact (norm_fst_le z).trans |
| 292 | (le_mul_of_one_le_left (norm_nonneg _) (by linarith [abs_nonneg (ci⁻¹)])) |
| 293 | · rw [div_eq_mul_inv, norm_mul, Real.norm_eq_abs (ci⁻¹), mul_comm] |
| 294 | exact (mul_le_mul_of_nonneg_left (norm_snd_le z) (abs_nonneg _)).trans |
| 295 | (mul_le_mul_of_nonneg_right (by linarith : |ci⁻¹| ≤ 1 + |ci⁻¹|) (norm_nonneg _)) |
| 296 | |
| 297 | theorem norm_scaledBasis_le (B : Plane ≃L[ℝ] Plane) {ci : ℝ} |
| 298 | (hci : ci ≠ 0) (habs : |ci| ≤ 1) : |
| 299 | ‖(scaledBasis B ci hci : Plane →L[ℝ] Plane)‖ ≤ ‖(B : Plane →L[ℝ] Plane)‖ := by |
| 300 | change ‖(B : Plane →L[ℝ] Plane).comp |
| 301 | (TorusAverages.transverseChart ci hci : Plane →L[ℝ] Plane)‖ ≤ _ |
| 302 | exact (ContinuousLinearMap.opNorm_comp_le _ _).trans (by |
| 303 | simpa using mul_le_mul_of_nonneg_left (norm_transverseChart_le hci habs) (norm_nonneg B.toContinuousLinearMap)) |
| 304 | |
| 305 | theorem norm_inverse_scaledBasis_le (B : Plane ≃L[ℝ] Plane) (ci : ℝ) (hci : ci ≠ 0) : |
| 306 | ‖((scaledBasis B ci hci).symm : Plane →L[ℝ] Plane)‖ ≤ |
| 307 | (1 + |ci⁻¹|) * ‖(B.symm : Plane →L[ℝ] Plane)‖ := by |
| 308 | change ‖((TorusAverages.transverseChart ci hci).symm : Plane →L[ℝ] Plane).comp |
| 309 | (B.symm : Plane →L[ℝ] Plane)‖ ≤ _ |
| 310 | exact (ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 311 | (mul_le_mul_of_nonneg_right (norm_inverse_transverseChart_le ci hci) (norm_nonneg _)) |
| 312 | |
| 313 | noncomputable def bandGeometry (B : Plane ≃L[ℝ] Plane) (h : ℝ) (n gap : ℕ) |
| 314 | (center : Plane) : CCS where |
| 315 | gap := gap |
| 316 | basis := scaledBasis B (ChartScales.timeCoefficient h n) (ChartScales.timeCoefficient_pos h n).ne' |
| 317 | center := center |
| 318 | |
| 319 | theorem bandGeometry_path (B : Plane ≃L[ℝ] Plane) (h : ℝ) (n gap : ℕ) |
| 320 | (center : Plane) (k : Frequency) (Y : Plane) (s : ℝ) : |
| 321 | (bandGeometry B h n gap center).path k Y s = |
| 322 | Y + (CommonCoverSolve.coverPower gap).symm |
| 323 | ((ChartScales.timeCoefficient h n * |
| 324 | (s - ((bandGeometry B h n gap center).coordinates k Y).2)) • B (0, 1)) := by |
| 325 | rw [CommonCoverSolve.Geometry.path_eq_shift] |
| 326 | change Y + (CommonCoverSolve.coverPower gap).symm |
| 327 | ((s - _) • scaledBasis B _ _ (0, 1)) = _ |
| 328 | rw [scaledBasis_transverse, smul_smul, mul_comm] |
| 329 | |
| 330 | noncomputable def geometryCost (B : Plane ≃L[ℝ] Plane) (D : ℕ) : ℝ := |
| 331 | 1 + CommonCoverSolve.coveringBound D * ‖(B : Plane →L[ℝ] Plane)‖ + |
| 332 | (1 + ChartScales.Tg) * ‖(B.symm : Plane →L[ℝ] Plane)‖ * CommonCoverSolve.coveringBound D |
| 333 | |
| 334 | theorem geometryCost_one_le (B : Plane ≃L[ℝ] Plane) (D : ℕ) : 1 ≤ geometryCost B D := by |
| 335 | have h1 : 0 ≤ CommonCoverSolve.coveringBound D * ‖(B : Plane →L[ℝ] Plane)‖ := |
| 336 | mul_nonneg (CommonCoverSolve.coveringBound_pos D).le (norm_nonneg _) |
| 337 | have h2 : 0 ≤ (1 + ChartScales.Tg) * ‖(B.symm : Plane →L[ℝ] Plane)‖ * |
| 338 | CommonCoverSolve.coveringBound D := by |
| 339 | exact mul_nonneg (mul_nonneg (by linarith [ChartScales.Tg_pos]) (norm_nonneg _)) |
| 340 | (CommonCoverSolve.coveringBound_pos D).le |
| 341 | unfold geometryCost |
| 342 | linarith |
| 343 | |
| 344 | /-- This constant depends on the fixed native basis and the covering-gap |
| 345 | budget, and is chosen before the band, center, copy, or source. -/ |
| 346 | noncomputable def bandArgumentCost (B : Plane ≃L[ℝ] Plane) (D : ℕ) : ℝ := |
| 347 | (1 + geometryCost B D) ^ 2 |
| 348 | |
| 349 | theorem bandArgumentCost_one_le (B : Plane ≃L[ℝ] Plane) (D : ℕ) : 1 ≤ bandArgumentCost B D := by |
| 350 | have h := geometryCost_one_le B D |
| 351 | unfold bandArgumentCost |
| 352 | nlinarith |
| 353 | |
| 354 | theorem bandGeometry_argumentCost_le (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 355 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) : |
| 356 | argumentCost (bandGeometry B h n gap center) ≤ bandArgumentCost B D * ChartScales.S n := by |
| 357 | let g := bandGeometry B h n gap center |
| 358 | have hS : 1 ≤ ChartScales.S n := PhysicalGraphBounds.S_ge_one (by omega) |
| 359 | have hS0 : 0 < ChartScales.S n := zero_lt_one.trans_le hS |
| 360 | have hci : |ChartScales.timeCoefficient h n| ≤ 1 := by |
| 361 | rw [abs_of_pos (ChartScales.timeCoefficient_pos h n)] |
| 362 | exact (ChartScales.timeCoefficient_bounds h hh hn).2.trans |
| 363 | ((div_le_one hS0).mpr hS) |
| 364 | have hinv : 1 + |(ChartScales.timeCoefficient h n)⁻¹| ≤ |
| 365 | (1 + ChartScales.Tg) * ChartScales.S n := by |
| 366 | rw [abs_of_pos (inv_pos.mpr (ChartScales.timeCoefficient_pos h n))] |
| 367 | have hb := ChartScales.timeCoefficient_inv_upper h hh hn |
| 368 | nlinarith |
| 369 | have hb : ‖(g.basis : Plane →L[ℝ] Plane)‖ ≤ ‖(B : Plane →L[ℝ] Plane)‖ := |
| 370 | norm_scaledBasis_le B _ hci |
| 371 | have hbi : ‖(g.basis.symm : Plane →L[ℝ] Plane)‖ ≤ |
| 372 | ((1 + ChartScales.Tg) * ChartScales.S n) * ‖(B.symm : Plane →L[ℝ] Plane)‖ := |
| 373 | (norm_inverse_scaledBasis_le B _ _).trans (mul_le_mul_of_nonneg_right hinv (norm_nonneg _)) |
| 374 | have hC0 : 0 ≤ CommonCoverSolve.coveringBound D := (CommonCoverSolve.coveringBound_pos D).le |
| 375 | have hK : 1 ≤ geometryCost B D := geometryCost_one_le B D |
| 376 | have hK0 : 0 ≤ geometryCost B D := zero_le_one.trans hK |
| 377 | have hcoeff : (1 + ChartScales.Tg) * ‖(B.symm : Plane →L[ℝ] Plane)‖ * |
| 378 | CommonCoverSolve.coveringBound D ≤ geometryCost B D := by |
| 379 | unfold geometryCost |
| 380 | linarith [mul_nonneg hC0 (norm_nonneg (B : Plane →L[ℝ] Plane))] |
| 381 | have hpoint : ‖g.pointLinear‖ ≤ geometryCost B D := by |
| 382 | refine (g.norm_pointLinear_le hd).trans ?_ |
| 383 | refine (mul_le_mul_of_nonneg_left hb hC0).trans ?_ |
| 384 | unfold geometryCost |
| 385 | have ht : 0 ≤ (1 + ChartScales.Tg) * ‖(B.symm : Plane →L[ℝ] Plane)‖ * |
| 386 | CommonCoverSolve.coveringBound D := by |
| 387 | exact mul_nonneg (mul_nonneg (by linarith [ChartScales.Tg_pos]) (norm_nonneg _)) hC0 |
| 388 | linarith |
| 389 | have hcoord : ‖g.coordinateLinear‖ ≤ geometryCost B D * ChartScales.S n := by |
| 390 | refine (g.norm_coordinateLinear_le hd).trans ?_ |
| 391 | calc |
| 392 | _ ≤ (((1 + ChartScales.Tg) * ChartScales.S n) * ‖(B.symm : Plane →L[ℝ] Plane)‖) * |
| 393 | CommonCoverSolve.coveringBound D := mul_le_mul_of_nonneg_right hbi hC0 |
| 394 | _ = ((1 + ChartScales.Tg) * ‖(B.symm : Plane →L[ℝ] Plane)‖ * |
| 395 | CommonCoverSolve.coveringBound D) * ChartScales.S n := by ring |
| 396 | _ ≤ geometryCost B D * ChartScales.S n := mul_le_mul_of_nonneg_right hcoeff hS0.le |
| 397 | change 1 + ‖g.coordinateLinear‖ + ‖g.pointLinear‖ * (1 + ‖g.coordinateLinear‖) ≤ _ |
| 398 | calc |
| 399 | _ ≤ 1 + geometryCost B D * ChartScales.S n + |
| 400 | geometryCost B D * (1 + geometryCost B D * ChartScales.S n) := by |
| 401 | exact add_le_add (add_le_add_right hcoord _) (mul_le_mul hpoint (add_le_add_right hcoord _) |
| 402 | (by positivity) hK0) |
| 403 | _ ≤ bandArgumentCost B D * ChartScales.S n := by |
| 404 | unfold bandArgumentCost |
| 405 | nlinarith [mul_nonneg hK0 (sub_nonneg.mpr hS)] |
| 406 | |
| 407 | end BandGeometry |
| 408 | |
| 409 | section CurrentEvaluation |
| 410 | |
| 411 | variable {P V : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 412 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 413 | |
| 414 | /-- Reinsert the actual current slot time after solving the joint equation. -/ |
| 415 | noncomputable def currentArgument (g : CCS) (k : Frequency) (p : P × Plane) : Joint P := |
| 416 | (p, (g.coordinates k p.2).2) |
| 417 | |
| 418 | noncomputable def currentLinear (P : Type) [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 419 | (g : CCS) : P × Plane →L[ℝ] Joint P := |
| 420 | (ContinuousLinearMap.id ℝ (P × Plane)).prod |
| 421 | ((ContinuousLinearMap.snd ℝ ℝ ℝ).comp |
| 422 | (g.coordinateLinear.comp (ContinuousLinearMap.snd ℝ P Plane))) |
| 423 | |
| 424 | @[simp] theorem currentLinear_apply (g : CCS) (p : P × Plane) : |
| 425 | currentLinear P g p = (p, (g.coordinateLinear p.2).2) := rfl |
| 426 | |
| 427 | theorem currentArgument_affine (g : CCS) (k : Frequency) (p : P × Plane) : |
| 428 | currentArgument g k p = currentArgument g k 0 + currentLinear P g p := by |
| 429 | simp only [currentArgument, g.coordinates_eq_affine k p.2, currentLinear_apply] |
| 430 | ext <;> simp |
| 431 | |
| 432 | theorem currentArgument_smooth (g : CCS) (k : Frequency) : |
| 433 | ContDiff ℝ ∞ (currentArgument (P := P) g k) := by |
| 434 | have he : currentArgument (P := P) g k = |
| 435 | fun p => currentArgument g k 0 + currentLinear P g p := |
| 436 | funext (currentArgument_affine g k) |
| 437 | rw [he] |
| 438 | exact contDiff_const.add (currentLinear P g).contDiff |
| 439 | |
| 440 | theorem norm_currentLinear_le (g : CCS) : ‖currentLinear P g‖ ≤ argumentCost g := by |
| 441 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (one_le_argumentCost g)) |
| 442 | intro p |
| 443 | rw [currentLinear_apply, Prod.norm_def] |
| 444 | refine max_le (le_mul_of_one_le_left (norm_nonneg _) (one_le_argumentCost g)) ?_ |
| 445 | have hc : ‖g.coordinateLinear‖ ≤ argumentCost g := by |
| 446 | unfold argumentCost |
| 447 | have hp : 0 ≤ ‖g.pointLinear‖ * (1 + ‖g.coordinateLinear‖) := by positivity |
| 448 | linarith |
| 449 | exact (norm_snd_le (g.coordinateLinear p.2)).trans ((g.coordinateLinear.le_opNorm _).trans |
| 450 | ((mul_le_mul_of_nonneg_left (norm_snd_le p) (norm_nonneg _)).trans |
| 451 | (mul_le_mul_of_nonneg_right hc (norm_nonneg _)))) |
| 452 | |
| 453 | theorem currentArgument_jet_bound (g : CCS) (k : Frequency) {f : Joint P → V} |
| 454 | (hf : ContDiff ℝ ∞ f) (m : ℕ) (p : P × Plane) {A : ℝ} |
| 455 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (currentArgument g k p)‖ ≤ A) : |
| 456 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun q => f (currentArgument g k q)) p‖ ≤ |
| 457 | A * argumentCost g ^ m := by |
| 458 | have he : (fun q => f (currentArgument g k q)) = |
| 459 | fun q => f (currentArgument g k 0 + currentLinear P g q) := by |
| 460 | funext q; rw [currentArgument_affine] |
| 461 | rw [he] |
| 462 | apply affine_jet_bound hf _ _ (one_le_argumentCost g) (norm_currentLinear_le g) m p |
| 463 | simpa only [← currentArgument_affine] using hb |
| 464 | |
| 465 | end CurrentEvaluation |
| 466 | |
| 467 | section BandInputs |
| 468 | |
| 469 | variable {P V E : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 470 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 471 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 472 | |
| 473 | theorem nativeArgument_band_jet_bound (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 474 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 475 | {f : P × Plane → V} (hf : ContDiff ℝ ∞ f) (m : ℕ) (w : Joint P) {A : ℝ} |
| 476 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (nativeArgument (bandGeometry B h n gap center) k w)‖ ≤ A) : |
| 477 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j |
| 478 | (fun z => f (nativeArgument (bandGeometry B h n gap center) k z)) w‖ ≤ |
| 479 | A * (bandArgumentCost B D * ChartScales.S n) ^ m := by |
| 480 | intro j hj |
| 481 | have hA : 0 ≤ A := (norm_nonneg _).trans (hb 0 (Nat.zero_le _)) |
| 482 | exact (nativeArgument_jet_bound _ k hf m w hb j hj).trans |
| 483 | (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ |
| 484 | (zero_le_one.trans (one_le_argumentCost _)) |
| 485 | (bandGeometry_argumentCost_le B hh hn hd center) m) hA) |
| 486 | |
| 487 | theorem sourceArgument_band_jet_bound (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 488 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 489 | {f : P × Plane → V} (hf : ContDiff ℝ ∞ f) (m : ℕ) (w : Joint P) {A : ℝ} |
| 490 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (sourceArgument (bandGeometry B h n gap center) k w)‖ ≤ A) : |
| 491 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j |
| 492 | (fun z => f (sourceArgument (bandGeometry B h n gap center) k z)) w‖ ≤ |
| 493 | A * (bandArgumentCost B D * ChartScales.S n) ^ m := by |
| 494 | intro j hj |
| 495 | have hA : 0 ≤ A := (norm_nonneg _).trans (hb 0 (Nat.zero_le _)) |
| 496 | exact (sourceArgument_jet_bound _ k hf m w hb j hj).trans |
| 497 | (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ |
| 498 | (zero_le_one.trans (one_le_argumentCost _)) |
| 499 | (bandGeometry_argumentCost_le B hh hn hd center) m) hA) |
| 500 | |
| 501 | theorem currentArgument_band_jet_bound (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 502 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 503 | {f : Joint P → V} (hf : ContDiff ℝ ∞ f) (m : ℕ) (p : P × Plane) {A : ℝ} |
| 504 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (currentArgument (bandGeometry B h n gap center) k p)‖ ≤ A) : |
| 505 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j |
| 506 | (fun q => f (currentArgument (bandGeometry B h n gap center) k q)) p‖ ≤ |
| 507 | A * (bandArgumentCost B D * ChartScales.S n) ^ m := by |
| 508 | intro j hj |
| 509 | have hA : 0 ≤ A := (norm_nonneg _).trans (hb 0 (Nat.zero_le _)) |
| 510 | exact (currentArgument_jet_bound _ k hf m p hb j hj).trans |
| 511 | (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ |
| 512 | (zero_le_one.trans (one_le_argumentCost _)) |
| 513 | (bandGeometry_argumentCost_le B hh hn hd center) m) hA) |
| 514 | |
| 515 | theorem sourceArgument_envelope (g : CCS) (k : Frequency) {f : P × Plane → V} |
| 516 | (hf : ContDiff ℝ ∞ f) {m : ℕ} {e : P × Plane → ℝ} (hb : EnvelopeJets m f e) : |
| 517 | EnvelopeJets m (fun z => f (sourceArgument g k z)) |
| 518 | (fun z => e (sourceArgument g k z) * argumentCost g ^ m) := |
| 519 | fun j hj z => sourceArgument_jet_bound g k hf m z (fun i hi => hb i hi _) j hj |
| 520 | |
| 521 | theorem nativeArgument_envelope (g : CCS) (k : Frequency) {f : P × Plane → V} |
| 522 | (hf : ContDiff ℝ ∞ f) {m : ℕ} {e : P × Plane → ℝ} (hb : EnvelopeJets m f e) : |
| 523 | EnvelopeJets m (fun z => f (nativeArgument g k z)) |
| 524 | (fun z => e (nativeArgument g k z) * argumentCost g ^ m) := |
| 525 | fun j hj z => nativeArgument_jet_bound g k hf m z (fun i hi => hb i hi _) j hj |
| 526 | |
| 527 | /-- This is a bound on all joint input jets of the actual ODE coefficient. -/ |
| 528 | theorem coefficientAlong_band_jet_bound (d : CommonCoverSolve.LinearData P V E) |
| 529 | (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 530 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 531 | (hf : ContDiff ℝ ∞ d.coefficient) (m : ℕ) (w : Joint P) {A : ℝ} |
| 532 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j d.coefficient |
| 533 | (nativeArgument (bandGeometry B h n gap center) k w)‖ ≤ A) : |
| 534 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j |
| 535 | (d.coefficientAlong (bandGeometry B h n gap center) k) w‖ ≤ |
| 536 | A * (bandArgumentCost B D * ChartScales.S n) ^ m := |
| 537 | nativeArgument_band_jet_bound B hh hn hd center k hf m w hb |
| 538 | |
| 539 | /-- Both factors are evaluated at their correct, generally different, |
| 540 | arguments. In particular the source is not replaced by a native-periodic one. -/ |
| 541 | theorem forcingAlong_band_jet_bound (d : CommonCoverSolve.LinearData P V E) |
| 542 | (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 543 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 544 | (hB : ContDiff ℝ ∞ d.forcingMap) (hf : ContDiff ℝ ∞ d.source) |
| 545 | (m : ℕ) (w : Joint P) {A C : ℝ} |
| 546 | (hA : ∀ j ≤ m, ‖iteratedFDeriv ℝ j d.forcingMap |
| 547 | (nativeArgument (bandGeometry B h n gap center) k w)‖ ≤ A) |
| 548 | (hC : ∀ j ≤ m, ‖iteratedFDeriv ℝ j d.source |
| 549 | (sourceArgument (bandGeometry B h n gap center) k w)‖ ≤ C) : |
| 550 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j |
| 551 | (d.forcingAlong (bandGeometry B h n gap center) k) w‖ ≤ |
| 552 | 2 ^ m * A * C * bandArgumentCost B D ^ (2 * m) * ChartScales.S n ^ (2 * m) := by |
| 553 | intro j hj |
| 554 | have hb := clm_apply_jet_bound |
| 555 | (hB.comp (nativeArgument_smooth (bandGeometry B h n gap center) k)) |
| 556 | (hf.comp (sourceArgument_smooth (bandGeometry B h n gap center) k)) m w |
| 557 | (nativeArgument_band_jet_bound B hh hn hd center k hB m w hA) |
| 558 | (sourceArgument_band_jet_bound B hh hn hd center k hf m w hC) j hj |
| 559 | convert! hb using 1 |
| 560 | simp only [mul_pow, two_mul, pow_add] |
| 561 | ring |
| 562 | |
| 563 | /-- Every radial and slow weight is unchanged by the source path. For each |
| 564 | requested jet prefix the only change is a fixed additional power of `S`. |
| 565 | This also applies with `weight = sqrt(zeta) * P` whenever `P` depends only |
| 566 | on the retained slow parameters. -/ |
| 567 | theorem sourceArgument_band_stripped_bound (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) |
| 568 | {n gap D : ℕ} (hn : 4 ≤ n) (hd : gap ≤ D) (center : Plane) (k : Frequency) |
| 569 | {f : P × Plane → V} (hf : ContDiff ℝ ∞ f) (m p q : ℕ) |
| 570 | (A α : ℝ) (edge weight : P → ℝ) |
| 571 | (hb : ∀ j ≤ m, ∀ z, ‖iteratedFDeriv ℝ j f z‖ ≤ |
| 572 | A * ChartScales.epsilon h n ^ α * ChartScales.S n ^ p * edge z.1 ^ q * weight z.1) : |
| 573 | ∀ j ≤ m, ∀ w : Joint P, ‖iteratedFDeriv ℝ j |
| 574 | (fun z => f (sourceArgument (bandGeometry B h n gap center) k z)) w‖ ≤ |
| 575 | (A * bandArgumentCost B D ^ m) * ChartScales.epsilon h n ^ α * |
| 576 | ChartScales.S n ^ (p + m) * edge w.1.1 ^ q * weight w.1.1 := by |
| 577 | intro j hj w |
| 578 | have ha := sourceArgument_band_jet_bound B hh hn hd center k hf m w |
| 579 | (fun i hi => hb i hi (sourceArgument (bandGeometry B h n gap center) k w)) j hj |
| 580 | convert! ha using 1 |
| 581 | simp only [sourceArgument_slow, mul_pow, pow_add] |
| 582 | ring |
| 583 | |
| 584 | end BandInputs |
| 585 | |
| 586 | section DyadicChanges |
| 587 | |
| 588 | /-- The exact ratio `(Q_n / Q_m)^a`, written without a division. -/ |
| 589 | noncomputable def bandRatio (a : ℝ) (n m : ℕ) : ℝ := |
| 590 | (2 : ℝ) ^ (((m : ℝ) - (n : ℝ)) * a) |
| 591 | |
| 592 | theorem bandRatio_pos (a : ℝ) (n m : ℕ) : 0 < bandRatio a n m := |
| 593 | Real.rpow_pos_of_pos (by norm_num) _ |
| 594 | |
| 595 | theorem bandRatio_eq_rpow (a : ℝ) (n m : ℕ) : |
| 596 | bandRatio a n m = (ChartScales.Q n / ChartScales.Q m) ^ a := by |
| 597 | rw [Real.div_rpow (ChartScales.Q_pos n).le (ChartScales.Q_pos m).le] |
| 598 | unfold bandRatio ChartScales.Q SlotColoring.dyadicQ |
| 599 | rw [← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2), |
| 600 | ← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 2), |
| 601 | ← Real.rpow_sub (by norm_num : (0 : ℝ) < 2)] |
| 602 | congr 1 |
| 603 | ring |
| 604 | |
| 605 | theorem bandRatio_mul_scale (a : ℝ) (n m : ℕ) : |
| 606 | bandRatio a n m * ChartScales.Q n ^ (-a) = ChartScales.Q m ^ (-a) := by |
| 607 | rw [bandRatio_eq_rpow, Real.div_rpow (ChartScales.Q_pos n).le (ChartScales.Q_pos m).le] |
| 608 | calc |
| 609 | _ = (ChartScales.Q n ^ a * ChartScales.Q n ^ (-a)) / ChartScales.Q m ^ a := by ring |
| 610 | _ = (ChartScales.Q m ^ a)⁻¹ := by |
| 611 | rw [← Real.rpow_add (ChartScales.Q_pos n)] |
| 612 | simp |
| 613 | _ = ChartScales.Q m ^ (-a) := (Real.rpow_neg (ChartScales.Q_pos m).le a).symm |
| 614 | |
| 615 | theorem bandRatio_mul_power (a : ℝ) (n m : ℕ) : |
| 616 | bandRatio a n m * ChartScales.Q m ^ a = ChartScales.Q n ^ a := by |
| 617 | rw [bandRatio_eq_rpow, Real.div_rpow (ChartScales.Q_pos n).le (ChartScales.Q_pos m).le] |
| 618 | exact div_mul_cancel₀ _ (Real.rpow_pos_of_pos (ChartScales.Q_pos m) a).ne' |
| 619 | |
| 620 | theorem bandRatio_le (a : ℝ) {n m : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 621 | bandRatio a n m ≤ (2 : ℝ) ^ (4 * |a|) := by |
| 622 | have hdiff : |(m : ℝ) - (n : ℝ)| ≤ 4 := by |
| 623 | have h1 : (n : ℝ) ≤ (m : ℝ) + 4 := by exact_mod_cast hnm |
| 624 | have h2 : (m : ℝ) ≤ (n : ℝ) + 4 := by exact_mod_cast hmn |
| 625 | rw [abs_le] |
| 626 | constructor <;> linarith |
| 627 | apply Real.rpow_le_rpow_of_exponent_le (by norm_num) |
| 628 | calc |
| 629 | ((m : ℝ) - (n : ℝ)) * a ≤ |((m : ℝ) - (n : ℝ)) * a| := le_abs_self _ |
| 630 | _ = |(m : ℝ) - (n : ℝ)| * |a| := abs_mul _ _ |
| 631 | _ ≤ 4 * |a| := mul_le_mul_of_nonneg_right hdiff (abs_nonneg _) |
| 632 | |
| 633 | /-- Transfer of the actual small-scale factor across overlapping bands. |
| 634 | The exponent is identical on both sides. -/ |
| 635 | theorem epsilon_power_transfer (h α : ℝ) {n m : ℕ} |
| 636 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 637 | ChartScales.epsilon h n ^ α ≤ |
| 638 | (2 : ℝ) ^ (4 * |h * α|) * ChartScales.epsilon h m ^ α := by |
| 639 | unfold ChartScales.epsilon |
| 640 | rw [← Real.rpow_mul (ChartScales.Q_pos n).le, ← Real.rpow_mul (ChartScales.Q_pos m).le] |
| 641 | rw [← bandRatio_mul_power (h * α) n m] |
| 642 | exact mul_le_mul_of_nonneg_right (bandRatio_le (h * α) hnm hmn) |
| 643 | (Real.rpow_pos_of_pos (ChartScales.Q_pos m) (h * α)).le |
| 644 | |
| 645 | theorem slow_scale_transfer {n m : ℕ} (hm : 1 ≤ m) (hnm : n ≤ m + 4) : |
| 646 | ChartScales.S n ≤ 25 * ChartScales.S m := by |
| 647 | have h : (n : ℝ) ≤ 5 * (m : ℝ) := by exact_mod_cast (show n ≤ 5 * m by omega) |
| 648 | have hs := mul_self_le_mul_self (Nat.cast_nonneg n) h |
| 649 | unfold ChartScales.S |
| 650 | nlinarith |
| 651 | |
| 652 | theorem slow_power_transfer {n m : ℕ} (hm : 1 ≤ m) (hnm : n ≤ m + 4) (p : ℕ) : |
| 653 | ChartScales.S n ^ p ≤ 25 ^ p * ChartScales.S m ^ p := by |
| 654 | simpa only [mul_pow, ChartScales.S] using pow_le_pow_left₀ (sq_nonneg (n : ℝ)) (slow_scale_transfer hm hnm) p |
| 655 | |
| 656 | abbrev SlowPoint := ℝ × (ℝ × ℝ) |
| 657 | |
| 658 | /-- Actual `(R,Z,T)` chart change from band `n` to band `m`. -/ |
| 659 | noncomputable def bandChart (D : ℝ) (n m : ℕ) : SlowPoint →L[ℝ] SlowPoint := |
| 660 | (bandRatio (1 / 2) n m • ContinuousLinearMap.fst ℝ ℝ (ℝ × ℝ)).prod |
| 661 | ((bandRatio D n m • ((ContinuousLinearMap.fst ℝ ℝ ℝ).comp |
| 662 | (ContinuousLinearMap.snd ℝ ℝ (ℝ × ℝ)))).prod |
| 663 | (bandRatio 1 n m • ((ContinuousLinearMap.snd ℝ ℝ ℝ).comp |
| 664 | (ContinuousLinearMap.snd ℝ ℝ (ℝ × ℝ))))) |
| 665 | |
| 666 | @[simp] theorem bandChart_apply (D : ℝ) (n m : ℕ) (x : SlowPoint) : |
| 667 | bandChart D n m x = (bandRatio (1 / 2) n m * x.1, |
| 668 | (bandRatio D n m * x.2.1, bandRatio 1 n m * x.2.2)) := rfl |
| 669 | |
| 670 | theorem bandChart_formula (D : ℝ) (n m : ℕ) (x : SlowPoint) : |
| 671 | bandChart D n m x = ((ChartScales.Q n / ChartScales.Q m) ^ (1 / 2 : ℝ) * x.1, |
| 672 | ((ChartScales.Q n / ChartScales.Q m) ^ D * x.2.1, |
| 673 | (ChartScales.Q n / ChartScales.Q m) * x.2.2)) := by |
| 674 | simp only [bandChart_apply, bandRatio_eq_rpow, Real.rpow_one] |
| 675 | |
| 676 | noncomputable def normalizedSlowChart (D : ℝ) (n : ℕ) (x : SlowPoint) : SlowPoint := |
| 677 | (ChartScales.Q n ^ (-(1 / 2 : ℝ)) * x.1, |
| 678 | (ChartScales.Q n ^ (-D) * x.2.1, ChartScales.Q n ^ (-1 : ℝ) * x.2.2)) |
| 679 | |
| 680 | theorem bandChart_normalizedSlowChart (D : ℝ) (n m : ℕ) (x : SlowPoint) : |
| 681 | bandChart D n m (normalizedSlowChart D n x) = normalizedSlowChart D m x := by |
| 682 | simp only [bandChart_apply, normalizedSlowChart, ← mul_assoc, bandRatio_mul_scale] |
| 683 | |
| 684 | noncomputable def chartCost (D : ℝ) : ℝ := 1 + (2 : ℝ) ^ (4 * (1 + |D|)) |
| 685 | |
| 686 | theorem chartCost_one_le (D : ℝ) : 1 ≤ chartCost D := by |
| 687 | unfold chartCost |
| 688 | linarith [Real.rpow_pos_of_pos (by norm_num : (0 : ℝ) < 2) (4 * (1 + |D|))] |
| 689 | |
| 690 | theorem bandRatio_le_chartCost {D a : ℝ} (ha : |a| ≤ 1 + |D|) {n m : ℕ} |
| 691 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : bandRatio a n m ≤ chartCost D := by |
| 692 | refine (bandRatio_le a hnm hmn).trans ?_ |
| 693 | refine (Real.rpow_le_rpow_of_exponent_le (by norm_num) (mul_le_mul_of_nonneg_left ha (by norm_num))).trans ?_ |
| 694 | unfold chartCost |
| 695 | linarith |
| 696 | |
| 697 | theorem norm_bandChart_le (D : ℝ) {n m : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 698 | ‖bandChart D n m‖ ≤ chartCost D := by |
| 699 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (chartCost_one_le D)) |
| 700 | intro x |
| 701 | have hb (a y : ℝ) (ha : |a| ≤ 1 + |D|) (hy : ‖y‖ ≤ ‖x‖) : |
| 702 | ‖bandRatio a n m * y‖ ≤ chartCost D * ‖x‖ := by |
| 703 | rw [norm_mul, Real.norm_eq_abs, abs_of_pos (bandRatio_pos _ _ _)] |
| 704 | exact mul_le_mul (bandRatio_le_chartCost ha hnm hmn) hy (norm_nonneg _) |
| 705 | (zero_le_one.trans (chartCost_one_le D)) |
| 706 | rw [bandChart_apply, Prod.norm_def, Prod.norm_def] |
| 707 | apply max_le |
| 708 | · exact hb (1 / 2) x.1 (by rw [abs_of_pos (by norm_num : (0 : ℝ) < 1 / 2)]; linarith [abs_nonneg D]) |
| 709 | (norm_fst_le x) |
| 710 | · apply max_le |
| 711 | · exact hb D x.2.1 (by linarith) ((norm_fst_le x.2).trans (norm_snd_le x)) |
| 712 | · exact hb 1 x.2.2 (by rw [abs_one]; linarith [abs_nonneg D]) |
| 713 | ((norm_snd_le x.2).trans (norm_snd_le x)) |
| 714 | |
| 715 | theorem bandChart_jet_bound {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 716 | {f : SlowPoint → V} (hf : ContDiff ℝ ∞ f) (D : ℝ) {n m : ℕ} |
| 717 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) (r : ℕ) (x : SlowPoint) {A : ℝ} |
| 718 | (hb : ∀ j ≤ r, ‖iteratedFDeriv ℝ j f (bandChart D n m x)‖ ≤ A) : |
| 719 | ∀ j ≤ r, ‖iteratedFDeriv ℝ j (fun y => f (bandChart D n m y)) x‖ ≤ A * chartCost D ^ r := by |
| 720 | simpa only [zero_add] using affine_jet_bound hf (bandChart D n m) 0 |
| 721 | (chartCost_one_le D) (norm_bandChart_le D hnm hmn) r x (by simpa only [zero_add] using hb) |
| 722 | |
| 723 | /-- Coarsest of a pair of simultaneously active levels. -/ |
| 724 | noncomputable def commonIndex (h : ℝ) (n m : ℕ) : ℕ := min (ChartScales.nativeIndex h n) (ChartScales.nativeIndex h m) |
| 725 | |
| 726 | theorem commonIndex_gap_le (h : ℝ) (hh : 0 ≤ h) {n m : ℕ} |
| 727 | (hn : 1 ≤ n) (hm : 1 ≤ m) (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) : |
| 728 | ChartScales.nativeIndex h n - commonIndex h n m ≤ SlotColoring.nativeGap h ∧ |
| 729 | ChartScales.nativeIndex h m - commonIndex h n m ≤ SlotColoring.nativeGap h := by |
| 730 | have hg := SlotColoring.nativeIndex_gap h hh hn hm hnm hmn |
| 731 | simp only [commonIndex, ChartScales.nativeIndex] |
| 732 | omega |
| 733 | |
| 734 | theorem adjacent_commonIndex_gap_le (h : ℝ) (hh : 0 ≤ h) {D : ℝ} |
| 735 | {L M : SlotColoring.Label} (hadj : SlotColoring.Adj D L M) : |
| 736 | ChartScales.nativeIndex h L.1 - commonIndex h L.1 M.1 ≤ SlotColoring.nativeGap h ∧ |
| 737 | ChartScales.nativeIndex h M.1 - commonIndex h L.1 M.1 ≤ SlotColoring.nativeGap h := |
| 738 | commonIndex_gap_le h hh hadj.left_positive hadj.right_positive hadj.left_level_le hadj.right_level_le |
| 739 | |
| 740 | end DyadicChanges |
| 741 | |
| 742 | section ClassTransport |
| 743 | |
| 744 | variable {X Y V : Type} [NormedAddCommGroup X] [NormedSpace ℝ X] |
| 745 | [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 746 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 747 | |
| 748 | theorem norm_affine_jet_le_on {f : Y → V} {U : Set Y} (hU : IsOpen U) |
| 749 | (hf : ContDiffOn ℝ ∞ f U) (L : X →L[ℝ] Y) (c : Y) {x : X} |
| 750 | (hx : c + L x ∈ U) (j : ℕ) : |
| 751 | ‖iteratedFDeriv ℝ j (fun z => f (c + L z)) x‖ ≤ |
| 752 | ‖iteratedFDeriv ℝ j f (c + L x)‖ * ‖L‖ ^ j := by |
| 753 | have hU' : IsOpen ((fun y : Y => c + y) ⁻¹' U) := |
| 754 | hU.preimage (continuous_const.add continuous_id) |
| 755 | have hf' : ContDiffOn ℝ ∞ (fun y => f (c + y)) ((fun y : Y => c + y) ⁻¹' U) := |
| 756 | hf.comp (contDiff_const.add contDiff_id).contDiffOn (fun _ hy => hy) |
| 757 | have hb := PhysicalGraphBounds.norm_jet_comp_linear hU' hf' L hx j |
| 758 | simpa only [Function.comp_def, iteratedFDeriv_comp_add_left] using hb |
| 759 | |
| 760 | /-- All hypotheses other than the source class concern the actual affine |
| 761 | maps and the prescribed weights/scales. No derivative bound on the |
| 762 | pulled-back source is a premise. Polynomial map and edge costs do not change |
| 763 | the small-scale exponent. -/ |
| 764 | theorem memClass_affine_transport |
| 765 | (s : WeightedClasses.StripData Y) (t : WeightedClasses.StripData X) |
| 766 | {w : ℕ → Y → ℝ} {v : ℕ → X → ℝ} {α : ℝ} {f : ℕ → Y → V} |
| 767 | (hf : WeightedClasses.MemClass s w α f) |
| 768 | (index : ℕ → ℕ) (L : ℕ → X →L[ℝ] Y) (c : ℕ → Y) |
| 769 | (hmap : ∀ n x, x ∈ t.domain → c n + L n x ∈ s.domain) |
| 770 | (hweight : ∀ n x, x ∈ t.domain → w (index n) (c n + L n x) = v n x) |
| 771 | {Ce Cg CL : ℝ} (hCe : 0 ≤ Ce) (hCg : 1 ≤ Cg) (hCL : 1 ≤ CL) (r l : ℕ) |
| 772 | (heps : ∀ n, s.epsilon (index n) ^ α ≤ Ce * t.epsilon n ^ α) |
| 773 | (hgrowth : ∀ n x, x ∈ t.domain → |
| 774 | s.growth (index n) (c n + L n x) ≤ Cg * t.growth n x ^ r) |
| 775 | (hlinear : ∀ n x, x ∈ t.domain → ‖L n‖ ≤ CL * t.growth n x ^ l) : |
| 776 | WeightedClasses.MemClass t v α (fun n x => f (index n) (c n + L n x)) := by |
| 777 | have hv : ∀ n x, x ∈ t.domain → 0 ≤ v n x := by |
| 778 | intro n x hx |
| 779 | rw [← hweight n x hx] |
| 780 | exact hf.weight_nonneg _ _ (hmap n x hx) |
| 781 | refine ⟨hv, ?_, ?_⟩ |
| 782 | · intro n |
| 783 | exact (hf.smooth (index n)).comp |
| 784 | (contDiff_const.add (L n).contDiff).contDiffOn (hmap n) |
| 785 | · intro m |
| 786 | obtain ⟨A, hA, p, hb⟩ := hf.bounds m |
| 787 | refine ⟨A * Ce * Cg ^ p * CL ^ m, by positivity, r * p + l * m, ?_⟩ |
| 788 | intro n x hx j hj |
| 789 | have htarget := t.growth_nonneg n x |
| 790 | have hsource := s.growth_nonneg (index n) (c n + L n x) |
| 791 | have hCL0 : 0 ≤ CL := zero_le_one.trans hCL |
| 792 | have hCg0 : 0 ≤ Cg := zero_le_one.trans hCg |
| 793 | have hpow : ‖L n‖ ^ j ≤ CL ^ m * t.growth n x ^ (l * m) := by |
| 794 | calc |
| 795 | _ ≤ (CL * t.growth n x ^ l) ^ j := pow_le_pow_left₀ (norm_nonneg _) (hlinear n x hx) j |
| 796 | _ ≤ (CL * t.growth n x ^ l) ^ m := |
| 797 | pow_le_pow_right₀ (one_le_mul_of_one_le_of_one_le hCL |
| 798 | (one_le_pow₀ (t.one_le_growth n x))) hj |
| 799 | _ = _ := by rw [mul_pow, ← pow_mul] |
| 800 | have hgpow : s.growth (index n) (c n + L n x) ^ p ≤ |
| 801 | Cg ^ p * t.growth n x ^ (r * p) := by |
| 802 | simpa only [mul_pow, ← pow_mul] using |
| 803 | pow_le_pow_left₀ hsource (hgrowth n x hx) p |
| 804 | have hstart := norm_affine_jet_le_on s.isOpen_domain (hf.smooth (index n)) |
| 805 | (L n) (c n) (hmap n x hx) j |
| 806 | refine hstart.trans ?_ |
| 807 | calc |
| 808 | _ ≤ WeightedClasses.majorant s w α A p (index n) (c n + L n x) * ‖L n‖ ^ j := |
| 809 | mul_le_mul_of_nonneg_right (hb _ _ (hmap n x hx) j hj) (pow_nonneg (norm_nonneg _) _) |
| 810 | _ = (A * s.epsilon (index n) ^ α * s.growth (index n) (c n + L n x) ^ p * v n x) * |
| 811 | ‖L n‖ ^ j := by rw [WeightedClasses.majorant, hweight n x hx] |
| 812 | _ ≤ (A * (Ce * t.epsilon n ^ α) * (Cg ^ p * t.growth n x ^ (r * p)) * v n x) * |
| 813 | (CL ^ m * t.growth n x ^ (l * m)) := by |
| 814 | have hv0 := hv n x hx |
| 815 | have htε : 0 ≤ t.epsilon n ^ α := (Real.rpow_pos_of_pos (t.epsilon_pos n) α).le |
| 816 | gcongr |
| 817 | exact heps n |
| 818 | _ = WeightedClasses.majorant t v α (A * Ce * Cg ^ p * CL ^ m) |
| 819 | (r * p + l * m) n x := by |
| 820 | unfold WeightedClasses.majorant |
| 821 | rw [pow_add] |
| 822 | ring |
| 823 | |
| 824 | /-- A strip over a linear parameter projection. Its weights are the actual |
| 825 | base weights, so retaining the parameter preserves them exactly. -/ |
| 826 | noncomputable def parameterStrip (s : WeightedClasses.StripData Y) (L : X →L[ℝ] Y) : |
| 827 | WeightedClasses.StripData X where |
| 828 | domain := L ⁻¹' s.domain |
| 829 | isOpen_domain := s.isOpen_domain.preimage L.continuous |
| 830 | epsilon := s.epsilon |
| 831 | epsilon_pos := s.epsilon_pos |
| 832 | epsilon_le_one := s.epsilon_le_one |
| 833 | slow := s.slow |
| 834 | one_le_slow := s.one_le_slow |
| 835 | delta x := s.delta (L x) |
| 836 | delta_pos _ hx := s.delta_pos _ hx |
| 837 | zeta x := s.zeta (L x) |
| 838 | zeta_smooth := s.zeta_smooth.comp L.contDiff.contDiffOn (fun _ hx => hx) |
| 839 | zeta_nonneg _ hx := s.zeta_nonneg _ hx |
| 840 | |
| 841 | @[simp] theorem parameterStrip_growth (s : WeightedClasses.StripData Y) (L : X →L[ℝ] Y) |
| 842 | (n : ℕ) (x : X) : (parameterStrip s L).growth n x = s.growth n (L x) := rfl |
| 843 | |
| 844 | end ClassTransport |
| 845 | |
| 846 | section SourceClasses |
| 847 | |
| 848 | variable {P V : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 849 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 850 | |
| 851 | noncomputable def sourceStrip (s : WeightedClasses.StripData P) : WeightedClasses.StripData (P × Plane) := |
| 852 | parameterStrip s (ContinuousLinearMap.fst ℝ P Plane) |
| 853 | |
| 854 | noncomputable def jointStrip (s : WeightedClasses.StripData P) : WeightedClasses.StripData (Joint P) := |
| 855 | parameterStrip s ((ContinuousLinearMap.fst ℝ P Plane).comp (ContinuousLinearMap.fst ℝ (P × Plane) ℝ)) |
| 856 | |
| 857 | /-- Actual all-order class transport along the common-cover path. The |
| 858 | indexed band map allows a tail such as `band n = n+4`. Constants are uniform |
| 859 | in all choices of centers and lifted copies. -/ |
| 860 | theorem memClass_sourceArgument (s : WeightedClasses.StripData P) |
| 861 | {w : ℕ → P → ℝ} {α : ℝ} {f : ℕ → P × Plane → V} |
| 862 | (hf : WeightedClasses.MemClass (sourceStrip s) (fun n z => w n z.1) α f) |
| 863 | (B : Plane ≃L[ℝ] Plane) {h : ℝ} (hh : 0 ≤ h) (D : ℕ) |
| 864 | (band gap : ℕ → ℕ) (center : ℕ → Plane) (copy : ℕ → Frequency) |
| 865 | (hband : ∀ n, 4 ≤ band n) (hgap : ∀ n, gap n ≤ D) |
| 866 | (hslow : ∀ n, s.slow n = ChartScales.S (band n)) : |
| 867 | WeightedClasses.MemClass (jointStrip s) (fun n z => w n z.1.1) α |
| 868 | (fun n z => f n (sourceArgument (bandGeometry B h (band n) (gap n) (center n)) (copy n) z)) := by |
| 869 | let g n := bandGeometry B h (band n) (gap n) (center n) |
| 870 | have hpres (n : ℕ) (x : Joint P) : |
| 871 | sourceArgument (g n) (copy n) 0 + sourceLinear P (g n) x = sourceArgument (g n) (copy n) x := |
| 872 | (sourceArgument_affine (g n) (copy n) x).symm |
| 873 | have hmaps (n : ℕ) (x : Joint P) (hx : x ∈ (jointStrip s).domain) : |
| 874 | sourceArgument (g n) (copy n) 0 + sourceLinear P (g n) x ∈ (sourceStrip s).domain := by |
| 875 | rw [hpres] |
| 876 | exact hx |
| 877 | have hweights (n : ℕ) (x : Joint P) (_hx : x ∈ (jointStrip s).domain) : |
| 878 | w n (sourceArgument (g n) (copy n) 0 + sourceLinear P (g n) x).1 = w n x.1.1 := by |
| 879 | rw [hpres] |
| 880 | rfl |
| 881 | have heps (n : ℕ) : (sourceStrip s).epsilon n ^ α ≤ 1 * (jointStrip s).epsilon n ^ α := by |
| 882 | simp [sourceStrip, jointStrip, parameterStrip] |
| 883 | have hgrowth (n : ℕ) (x : Joint P) (_hx : x ∈ (jointStrip s).domain) : |
| 884 | (sourceStrip s).growth n (sourceArgument (g n) (copy n) 0 + sourceLinear P (g n) x) ≤ |
| 885 | 1 * (jointStrip s).growth n x ^ 1 := by |
| 886 | rw [hpres] |
| 887 | simp [sourceStrip, jointStrip, parameterStrip, WeightedClasses.StripData.growth, sourceArgument] |
| 888 | have hlinear (n : ℕ) (x : Joint P) (_hx : x ∈ (jointStrip s).domain) : |
| 889 | ‖sourceLinear P (g n)‖ ≤ bandArgumentCost B D * (jointStrip s).growth n x ^ 1 := by |
| 890 | rw [pow_one] |
| 891 | refine (norm_sourceLinear_le (g n)).trans ?_ |
| 892 | refine (bandGeometry_argumentCost_le B hh (hband n) (hgap n) (center n)).trans ?_ |
| 893 | rw [← hslow n] |
| 894 | exact mul_le_mul_of_nonneg_left (s.slow_le_growth n x.1.1) |
| 895 | (zero_le_one.trans (bandArgumentCost_one_le B D)) |
| 896 | have hout := memClass_affine_transport (sourceStrip s) (jointStrip s) hf id |
| 897 | (fun n => sourceLinear P (g n)) (fun n => sourceArgument (g n) (copy n) 0) |
| 898 | hmaps hweights (by norm_num : (0 : ℝ) ≤ 1) (by norm_num : (1 : ℝ) ≤ 1) |
| 899 | (bandArgumentCost_one_le B D) 1 1 heps hgrowth hlinear |
| 900 | simpa only [id_eq, hpres] using hout |
| 901 | |
| 902 | end SourceClasses |
| 903 | |
| 904 | section CommonBandChanges |
| 905 | |
| 906 | /-- Either direction of a bounded covering change. The inverse is a map on |
| 907 | the universal cover; no extra periodicity is imposed on its input. -/ |
| 908 | noncomputable def coverChange (forward : Bool) (d : ℕ) : Plane →L[ℝ] Plane := |
| 909 | if forward then (CommonCoverSolve.coverPower d : Plane →L[ℝ] Plane) |
| 910 | else ((CommonCoverSolve.coverPower d).symm : Plane →L[ℝ] Plane) |
| 911 | |
| 912 | theorem norm_coverChange_le (forward : Bool) {d D : ℕ} (hd : d ≤ D) : |
| 913 | ‖coverChange forward d‖ ≤ CommonCoverSolve.coveringBound D := by |
| 914 | cases forward |
| 915 | · exact CommonCoverSolve.inverseCoveringNorm_le_bound hd |
| 916 | · exact CommonCoverSolve.coveringNorm_le_bound hd |
| 917 | |
| 918 | noncomputable def bandCommonChart (D : ℝ) (n m : ℕ) (forward : Bool) (gap : ℕ) : |
| 919 | SlowPoint × Plane →L[ℝ] SlowPoint × Plane := |
| 920 | (bandChart D n m).prodMap (coverChange forward gap) |
| 921 | |
| 922 | @[simp] theorem bandCommonChart_apply (D : ℝ) (n m : ℕ) (forward : Bool) (gap : ℕ) |
| 923 | (x : SlowPoint × Plane) : |
| 924 | bandCommonChart D n m forward gap x = (bandChart D n m x.1, coverChange forward gap x.2) := rfl |
| 925 | |
| 926 | noncomputable def commonChartCost (D : ℝ) (gapBound : ℕ) : ℝ := |
| 927 | chartCost D + CommonCoverSolve.coveringBound gapBound |
| 928 | |
| 929 | theorem commonChartCost_one_le (D : ℝ) (gapBound : ℕ) : 1 ≤ commonChartCost D gapBound := by |
| 930 | unfold commonChartCost |
| 931 | linarith [chartCost_one_le D, CommonCoverSolve.coveringBound_pos gapBound] |
| 932 | |
| 933 | theorem norm_bandCommonChart_le (D : ℝ) {n m gap gapBound : ℕ} |
| 934 | (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) (forward : Bool) (hgap : gap ≤ gapBound) : |
| 935 | ‖bandCommonChart D n m forward gap‖ ≤ commonChartCost D gapBound := by |
| 936 | apply ContinuousLinearMap.opNorm_le_bound _ (zero_le_one.trans (commonChartCost_one_le _ _)) |
| 937 | intro x |
| 938 | rw [bandCommonChart_apply, Prod.norm_def] |
| 939 | have hC : 0 ≤ CommonCoverSolve.coveringBound gapBound := (CommonCoverSolve.coveringBound_pos _).le |
| 940 | have hD : 0 ≤ chartCost D := zero_le_one.trans (chartCost_one_le D) |
| 941 | apply max_le |
| 942 | · calc |
| 943 | _ ≤ ‖bandChart D n m‖ * ‖x.1‖ := (bandChart D n m).le_opNorm _ |
| 944 | _ ≤ chartCost D * ‖x‖ := mul_le_mul (norm_bandChart_le D hnm hmn) |
| 945 | (norm_fst_le x) (norm_nonneg _) hD |
| 946 | _ ≤ commonChartCost D gapBound * ‖x‖ := by |
| 947 | apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) |
| 948 | unfold commonChartCost |
| 949 | linarith |
| 950 | · calc |
| 951 | _ ≤ ‖coverChange forward gap‖ * ‖x.2‖ := (coverChange forward gap).le_opNorm _ |
| 952 | _ ≤ CommonCoverSolve.coveringBound gapBound * ‖x‖ := |
| 953 | mul_le_mul (norm_coverChange_le forward hgap) (norm_snd_le x) (norm_nonneg _) hC |
| 954 | _ ≤ commonChartCost D gapBound * ‖x‖ := by |
| 955 | apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) |
| 956 | unfold commonChartCost |
| 957 | linarith |
| 958 | |
| 959 | theorem bandCommonChart_envelope {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 960 | (D : ℝ) {n m gap gapBound r : ℕ} (hnm : n ≤ m + 4) (hmn : m ≤ n + 4) |
| 961 | (forward : Bool) (hgap : gap ≤ gapBound) {f : SlowPoint × Plane → V} |
| 962 | (hf : ContDiff ℝ ∞ f) {e : SlowPoint × Plane → ℝ} (he : EnvelopeJets r f e) : |
| 963 | EnvelopeJets r (fun x => f (bandCommonChart D n m forward gap x)) |
| 964 | (fun x => e (bandCommonChart D n m forward gap x) * commonChartCost D gapBound ^ r) := by |
| 965 | simpa only [zero_add] using he.affine hf (bandCommonChart D n m forward gap) 0 |
| 966 | (commonChartCost_one_le D gapBound) (norm_bandCommonChart_le D hnm hmn forward hgap) |
| 967 | |
| 968 | /-- Class transport under the actual simultaneous slow-chart and bounded |
| 969 | covering change. The weight/edge identities express the same physical |
| 970 | profile in the two charts; they are geometric identities, not jet bounds. -/ |
| 971 | theorem memClass_bandCommonChart {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 972 | (s : WeightedClasses.StripData (SlowPoint × Plane)) |
| 973 | {w v : ℕ → SlowPoint × Plane → ℝ} {α h : ℝ} {f : ℕ → SlowPoint × Plane → V} |
| 974 | (hf : WeightedClasses.MemClass s w α f) (D : ℝ) (gapBound : ℕ) |
| 975 | (band index gap : ℕ → ℕ) (forward : ℕ → Bool) |
| 976 | (hband : ∀ n, 1 ≤ band n) |
| 977 | (hoverlap : ∀ n, band n ≤ band (index n) + 4 ∧ band (index n) ≤ band n + 4) |
| 978 | (hgap : ∀ n, gap n ≤ gapBound) |
| 979 | (hepsilon : ∀ n, s.epsilon n = ChartScales.epsilon h (band n)) |
| 980 | (hslow : ∀ n, s.slow n = ChartScales.S (band n)) |
| 981 | (hmap : ∀ n x, x ∈ s.domain → |
| 982 | bandCommonChart D (band n) (band (index n)) (forward n) (gap n) x ∈ s.domain) |
| 983 | (hdelta : ∀ n x, x ∈ s.domain → |
| 984 | s.delta (bandCommonChart D (band n) (band (index n)) (forward n) (gap n) x) = s.delta x) |
| 985 | (hweight : ∀ n x, x ∈ s.domain → |
| 986 | w (index n) (bandCommonChart D (band n) (band (index n)) (forward n) (gap n) x) = v n x) : |
| 987 | WeightedClasses.MemClass s v α |
| 988 | (fun n x => f (index n) (bandCommonChart D (band n) (band (index n)) (forward n) (gap n) x)) := by |
| 989 | let L n := bandCommonChart D (band n) (band (index n)) (forward n) (gap n) |
| 990 | have heps (n : ℕ) : s.epsilon (index n) ^ α ≤ |
| 991 | (2 : ℝ) ^ (4 * |h * α|) * s.epsilon n ^ α := by |
| 992 | rw [hepsilon, hepsilon] |
| 993 | exact epsilon_power_transfer h α (hoverlap n).2 (hoverlap n).1 |
| 994 | have hgrowth (n : ℕ) (x : SlowPoint × Plane) (hx : x ∈ s.domain) : |
| 995 | s.growth (index n) (0 + L n x) ≤ 25 * s.growth n x ^ 1 := by |
| 996 | simp only [zero_add, pow_one, WeightedClasses.StripData.growth] |
| 997 | rw [hdelta n x hx, hslow, hslow] |
| 998 | simpa only [mul_assoc] using mul_le_mul_of_nonneg_right |
| 999 | (slow_scale_transfer (hband n) (hoverlap n).2) |
| 1000 | (show 0 ≤ max 1 (s.delta x)⁻¹ from zero_le_one.trans (le_max_left _ _)) |
| 1001 | have hlin (n : ℕ) (x : SlowPoint × Plane) (_hx : x ∈ s.domain) : |
| 1002 | ‖L n‖ ≤ commonChartCost D gapBound * s.growth n x ^ 0 := by |
| 1003 | simpa only [pow_zero, mul_one] using norm_bandCommonChart_le D |
| 1004 | (hoverlap n).1 (hoverlap n).2 (forward n) (hgap n) |
| 1005 | have ht := memClass_affine_transport s s hf index L (fun _ => 0) |
| 1006 | (by simpa only [zero_add] using hmap) |
| 1007 | (by simpa only [zero_add] using hweight) |
| 1008 | (Real.rpow_pos_of_pos (by norm_num : (0 : ℝ) < 2) _).le |
| 1009 | (by norm_num : (1 : ℝ) ≤ 25) (commonChartCost_one_le D gapBound) 1 0 heps hgrowth hlin |
| 1010 | simpa only [zero_add] using ht |
| 1011 | |
| 1012 | end CommonBandChanges |
| 1013 | |
| 1014 | section PhysicalProfileWeights |
| 1015 | |
| 1016 | theorem bandChart_eq_transition (h : ℝ) (n m : ℕ) (x : SlowPoint) : |
| 1017 | bandChart (CoordinateAlgebra.D h) n m x = |
| 1018 | SimilarityHomogeneity.chartTransition h (ChartScales.Q n) (ChartScales.Q m) x := |
| 1019 | bandChart_formula _ _ _ _ |
| 1020 | |
| 1021 | theorem profileX_bandChart {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 1022 | (n m : ℕ) {x : SlowPoint} (hx : 0 < x.2.2) : |
| 1023 | SimilarityHomogeneity.chartX h (bandChart (CoordinateAlgebra.D h) n m x) = |
| 1024 | SimilarityHomogeneity.chartX h x := by |
| 1025 | rw [bandChart_eq_transition] |
| 1026 | exact SimilarityHomogeneity.chartX_transition hh hh1 (ChartScales.Q_pos n) (ChartScales.Q_pos m) hx |
| 1027 | |
| 1028 | theorem profileEta_bandChart {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 1029 | (n m : ℕ) {x : SlowPoint} (hx : 0 < x.2.2) : |
| 1030 | SimilarityHomogeneity.chartEta h (bandChart (CoordinateAlgebra.D h) n m x) = |
| 1031 | SimilarityHomogeneity.chartEta h x := by |
| 1032 | rw [bandChart_eq_transition] |
| 1033 | exact SimilarityHomogeneity.chartEta_transition hh hh1 (ChartScales.Q_pos n) (ChartScales.Q_pos m) hx |
| 1034 | |
| 1035 | noncomputable def profileDomain (h a b : ℝ) : Set SlowPoint := |
| 1036 | {x | x ∈ SimilarityHomogeneity.chartDomain ∧ SimilarityHomogeneity.chartX h x ∈ Ioo a b} |
| 1037 | |
| 1038 | theorem profileX_smoothAt {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 1039 | {x : SlowPoint} (hx : 0 < x.2.2) : ContDiffAt ℝ ∞ (SimilarityHomogeneity.chartX h) x := |
| 1040 | (SimilarityHomogeneity.chartInner_smoothAt hh hh1 hx).fst |
| 1041 | |
| 1042 | theorem isOpen_profileDomain {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) (a b : ℝ) : |
| 1043 | IsOpen (profileDomain h a b) := by |
| 1044 | apply isOpen_iff_mem_nhds.mpr |
| 1045 | intro x hx |
| 1046 | exact Filter.inter_mem (SimilarityHomogeneity.isOpen_chartDomain.mem_nhds hx.1) |
| 1047 | ((profileX_smoothAt hh hh1 hx.1.2).continuousAt (isOpen_Ioo.mem_nhds hx.2)) |
| 1048 | |
| 1049 | theorem profileDomain_bandChart {h a b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 1050 | (n m : ℕ) {x : SlowPoint} (hx : x ∈ profileDomain h a b) : |
| 1051 | bandChart (CoordinateAlgebra.D h) n m x ∈ profileDomain h a b := by |
| 1052 | constructor |
| 1053 | · rw [bandChart_eq_transition] |
| 1054 | exact (SimilarityHomogeneity.chartTransition_mem_iff (ChartScales.Q_pos n) (ChartScales.Q_pos m) x).mpr hx.1 |
| 1055 | · rw [profileX_bandChart hh hh1 n m hx.1.2] |
| 1056 | exact hx.2 |
| 1057 | |
| 1058 | /-- A concrete strip with the physical profile weight and logarithmic |
| 1059 | distance. The independent index chooses the actual dyadic band. -/ |
| 1060 | noncomputable def profileSlowStrip {h a b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 1061 | (ha : 0 < a) (band : ℕ → ℕ) (hband : ∀ n, 1 ≤ band n) |
| 1062 | (ζ : ℝ → ℝ) (hζ : ContDiff ℝ ∞ ζ) (hζ0 : ∀ X ∈ Ioo a b, 0 ≤ ζ X) : |
| 1063 | WeightedClasses.StripData SlowPoint where |
| 1064 | domain := profileDomain h a b |
| 1065 | isOpen_domain := isOpen_profileDomain hh hh1 a b |
| 1066 | epsilon n := ChartScales.epsilon h (band n) |
| 1067 | epsilon_pos n := ChartScales.epsilon_pos h (band n) |
| 1068 | epsilon_le_one n := ChartScales.epsilon_le_one h hh.le (band n) |
| 1069 | slow n := ChartScales.S (band n) |
| 1070 | one_le_slow n := PhysicalGraphBounds.S_ge_one (hband n) |
| 1071 | delta := SimilarityHomogeneity.chartLogDistance h a b |
| 1072 | delta_pos _ hx := SimilarityHomogeneity.profileLogDistance_pos ha hx.2.1 hx.2.2 |
| 1073 | zeta x := ζ (SimilarityHomogeneity.chartX h x) |
| 1074 | zeta_smooth x hx := (hζ.contDiffAt.comp x (profileX_smoothAt hh hh1 hx.1.2)).contDiffWithinAt |
| 1075 | zeta_nonneg _ hx := hζ0 _ hx.2 |
| 1076 | |
| 1077 | /-- Here the domain and the edge identity are proved from actual profile |
| 1078 | homogeneity. Only the prescribed additional weight is transported. -/ |
| 1079 | theorem memClass_profile_bandCommonChart |
| 1080 | {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 1081 | {h a b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) (ha : 0 < a) |
| 1082 | (band : ℕ → ℕ) (hband : ∀ n, 1 ≤ band n) |
| 1083 | (ζ : ℝ → ℝ) (hζ : ContDiff ℝ ∞ ζ) (hζ0 : ∀ X ∈ Ioo a b, 0 ≤ ζ X) |
| 1084 | {w v : ℕ → SlowPoint × Plane → ℝ} {α : ℝ} {f : ℕ → SlowPoint × Plane → V} |
| 1085 | (hf : WeightedClasses.MemClass |
| 1086 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) w α f) |
| 1087 | (gapBound : ℕ) (index gap : ℕ → ℕ) (forward : ℕ → Bool) |
| 1088 | (hoverlap : ∀ n, band n ≤ band (index n) + 4 ∧ band (index n) ≤ band n + 4) |
| 1089 | (hgap : ∀ n, gap n ≤ gapBound) |
| 1090 | (hweight : ∀ n x, x.1 ∈ profileDomain h a b → |
| 1091 | w (index n) (bandCommonChart (CoordinateAlgebra.D h) (band n) (band (index n)) |
| 1092 | (forward n) (gap n) x) = v n x) : |
| 1093 | WeightedClasses.MemClass |
| 1094 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) v α |
| 1095 | (fun n x => f (index n) (bandCommonChart (CoordinateAlgebra.D h) |
| 1096 | (band n) (band (index n)) (forward n) (gap n) x)) := by |
| 1097 | apply memClass_bandCommonChart _ hf (CoordinateAlgebra.D h) gapBound band index gap forward |
| 1098 | hband hoverlap hgap (fun _ => rfl) (fun _ => rfl) |
| 1099 | · intro n x hx |
| 1100 | exact profileDomain_bandChart hh hh1 (band n) (band (index n)) hx |
| 1101 | · intro n x hx |
| 1102 | change SimilarityHomogeneity.chartLogDistance h a b |
| 1103 | (bandChart (CoordinateAlgebra.D h) (band n) (band (index n)) x.1) = |
| 1104 | SimilarityHomogeneity.chartLogDistance h a b x.1 |
| 1105 | rw [SimilarityHomogeneity.chartLogDistance, SimilarityHomogeneity.chartLogDistance, |
| 1106 | profileX_bandChart hh hh1 (band n) (band (index n)) (x := x.1) hx.1.2] |
| 1107 | · exact hweight |
| 1108 | |
| 1109 | /-- The actual mean class is preserved, with exactly the same small-scale |
| 1110 | exponent, under all overlapping band/common-cover changes. -/ |
| 1111 | theorem meanClass_profile_bandCommonChart |
| 1112 | {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 1113 | {h a b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) (ha : 0 < a) |
| 1114 | (band : ℕ → ℕ) (hband : ∀ n, 1 ≤ band n) |
| 1115 | (ζ : ℝ → ℝ) (hζ : ContDiff ℝ ∞ ζ) (hζ0 : ∀ X ∈ Ioo a b, 0 ≤ ζ X) |
| 1116 | {α : ℝ} {f : ℕ → SlowPoint × Plane → V} |
| 1117 | (hf : WeightedClasses.MeanClass |
| 1118 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) α f) |
| 1119 | (gapBound : ℕ) (index gap : ℕ → ℕ) (forward : ℕ → Bool) |
| 1120 | (hoverlap : ∀ n, band n ≤ band (index n) + 4 ∧ band (index n) ≤ band n + 4) |
| 1121 | (hgap : ∀ n, gap n ≤ gapBound) : |
| 1122 | WeightedClasses.MeanClass |
| 1123 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) α |
| 1124 | (fun n x => f (index n) (bandCommonChart (CoordinateAlgebra.D h) |
| 1125 | (band n) (band (index n)) (forward n) (gap n) x)) := by |
| 1126 | apply memClass_profile_bandCommonChart hh hh1 ha band hband ζ hζ hζ0 hf |
| 1127 | gapBound index gap forward hoverlap hgap |
| 1128 | intro n x hx |
| 1129 | change ζ (SimilarityHomogeneity.chartX h |
| 1130 | (bandChart (CoordinateAlgebra.D h) (band n) (band (index n)) x.1)) = |
| 1131 | ζ (SimilarityHomogeneity.chartX h x.1) |
| 1132 | rw [profileX_bandChart hh hh1 _ _ hx.1.2] |
| 1133 | |
| 1134 | /-- The wave envelope is transported at its actual point. The radial |
| 1135 | factor and edge distance are invariant; the slot profile is pulled back |
| 1136 | exactly and is not replaced by another label's profile. -/ |
| 1137 | theorem waveClass_profile_bandCommonChart |
| 1138 | {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 1139 | {h a b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) (ha : 0 < a) |
| 1140 | (band : ℕ → ℕ) (hband : ∀ n, 1 ≤ band n) |
| 1141 | (ζ : ℝ → ℝ) (hζ : ContDiff ℝ ∞ ζ) (hζ0 : ∀ X ∈ Ioo a b, 0 ≤ ζ X) |
| 1142 | (P : ℕ → SlowPoint × Plane → ℝ) {α : ℝ} {f : ℕ → SlowPoint × Plane → V} |
| 1143 | (hf : WeightedClasses.WaveClass |
| 1144 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) P α f) |
| 1145 | (gapBound : ℕ) (index gap : ℕ → ℕ) (forward : ℕ → Bool) |
| 1146 | (hoverlap : ∀ n, band n ≤ band (index n) + 4 ∧ band (index n) ≤ band n + 4) |
| 1147 | (hgap : ∀ n, gap n ≤ gapBound) : |
| 1148 | WeightedClasses.WaveClass |
| 1149 | (sourceStrip (profileSlowStrip hh hh1 ha band hband ζ hζ hζ0)) |
| 1150 | (fun n x => P (index n) (bandCommonChart (CoordinateAlgebra.D h) |
| 1151 | (band n) (band (index n)) (forward n) (gap n) x)) α |
| 1152 | (fun n x => f (index n) (bandCommonChart (CoordinateAlgebra.D h) |
| 1153 | (band n) (band (index n)) (forward n) (gap n) x)) := by |
| 1154 | apply memClass_profile_bandCommonChart hh hh1 ha band hband ζ hζ hζ0 hf |
| 1155 | gapBound index gap forward hoverlap hgap |
| 1156 | intro n x hx |
| 1157 | change Real.sqrt (ζ (SimilarityHomogeneity.chartX h |
| 1158 | (bandChart (CoordinateAlgebra.D h) (band n) (band (index n)) x.1))) * _ = |
| 1159 | Real.sqrt (ζ (SimilarityHomogeneity.chartX h x.1)) * _ |
| 1160 | rw [profileX_bandChart hh hh1 _ _ hx.1.2] |
| 1161 | |
| 1162 | end PhysicalProfileWeights |
| 1163 | |
| 1164 | section MeshChanges |
| 1165 | |
| 1166 | /-- Normalized small slow-box coordinates, using the actual widths from |
| 1167 | the coloring construction. -/ |
| 1168 | noncomputable def meshCoordinate (D : ℝ) (L : SlotColoring.Label) |
| 1169 | (x : SlotColoring.Position) : SlotColoring.Position := |
| 1170 | fun j => (x j - SlotColoring.width D j L.1 * (L.2.1 j : ℝ)) / SlotColoring.width D j L.1 |
| 1171 | |
| 1172 | noncomputable def meshPoint (D : ℝ) (L : SlotColoring.Label) |
| 1173 | (x : SlotColoring.Position) : SlotColoring.Position := |
| 1174 | fun j => SlotColoring.width D j L.1 * x j + SlotColoring.width D j L.1 * (L.2.1 j : ℝ) |
| 1175 | |
| 1176 | noncomputable def meshLinear (D : ℝ) (L M : SlotColoring.Label) : |
| 1177 | SlotColoring.Position →L[ℝ] SlotColoring.Position := |
| 1178 | ContinuousLinearMap.pi (fun j : Fin 3 => |
| 1179 | (SlotColoring.width D j L.1 / SlotColoring.width D j M.1) • |
| 1180 | (ContinuousLinearMap.proj j : SlotColoring.Position →L[ℝ] ℝ)) |
| 1181 | |
| 1182 | noncomputable def meshOffset (D : ℝ) (L M : SlotColoring.Label) : SlotColoring.Position := |
| 1183 | fun j => (SlotColoring.width D j L.1 * (L.2.1 j : ℝ) - |
| 1184 | SlotColoring.width D j M.1 * (M.2.1 j : ℝ)) / SlotColoring.width D j M.1 |
| 1185 | |
| 1186 | noncomputable def meshTransition (D : ℝ) (L M : SlotColoring.Label) |
| 1187 | (x : SlotColoring.Position) : SlotColoring.Position := meshOffset D L M + meshLinear D L M x |
| 1188 | |
| 1189 | @[simp] theorem meshLinear_apply (D : ℝ) (L M : SlotColoring.Label) |
| 1190 | (x : SlotColoring.Position) (j : Fin 3) : |
| 1191 | meshLinear D L M x j = (SlotColoring.width D j L.1 / SlotColoring.width D j M.1) * x j := rfl |
| 1192 | |
| 1193 | theorem meshTransition_eq_coordinate (D : ℝ) (L M : SlotColoring.Label) |
| 1194 | (x : SlotColoring.Position) : meshTransition D L M x = meshCoordinate D M (meshPoint D L x) := by |
| 1195 | ext j |
| 1196 | simp only [meshTransition, Pi.add_apply, meshOffset, meshLinear_apply, meshCoordinate, meshPoint] |
| 1197 | ring |
| 1198 | |
| 1199 | theorem mesh_ratioBound_pos (D : ℝ) : 0 < SlotColoring.ratioBound D := by |
| 1200 | unfold SlotColoring.ratioBound |
| 1201 | positivity |
| 1202 | |
| 1203 | /-- Only physical-box adjacency is assumed; the normalized coordinate |
| 1204 | change is bounded uniformly over all box indices and levels. -/ |
| 1205 | theorem norm_meshLinear_le {D : ℝ} {L M : SlotColoring.Label} (h : SlotColoring.Adj D L M) : |
| 1206 | ‖meshLinear D L M‖ ≤ SlotColoring.ratioBound D := by |
| 1207 | apply ContinuousLinearMap.opNorm_le_bound _ (mesh_ratioBound_pos D).le |
| 1208 | intro x |
| 1209 | apply (pi_norm_le_iff_of_nonneg (mul_nonneg (mesh_ratioBound_pos D).le (norm_nonneg x))).mpr |
| 1210 | intro j |
| 1211 | rw [meshLinear_apply, norm_mul, Real.norm_eq_abs, |
| 1212 | abs_of_pos (div_pos (SlotColoring.width_pos D j h.left_positive) |
| 1213 | (SlotColoring.width_pos D j h.right_positive))] |
| 1214 | exact mul_le_mul |
| 1215 | (SlotColoring.width_ratio_le D j h.left_positive h.right_positive h.left_level_le h.right_level_le) |
| 1216 | (norm_le_pi_norm x j) (norm_nonneg _) (mesh_ratioBound_pos D).le |
| 1217 | |
| 1218 | /-- The translation is controlled by genuine support overlap. It is not |
| 1219 | bounded by assuming the lattice copy indices themselves are bounded. -/ |
| 1220 | theorem norm_meshOffset_le {D : ℝ} {L M : SlotColoring.Label} (h : SlotColoring.Adj D L M) : |
| 1221 | ‖meshOffset D L M‖ ≤ 2 * (SlotColoring.ratioBound D + 1) := by |
| 1222 | apply (pi_norm_le_iff_of_nonneg (by linarith [mesh_ratioBound_pos D] : |
| 1223 | 0 ≤ 2 * (SlotColoring.ratioBound D + 1))).mpr |
| 1224 | intro j |
| 1225 | have hM := SlotColoring.width_pos D j h.right_positive |
| 1226 | rw [Real.norm_eq_abs, meshOffset, abs_div, abs_of_pos hM] |
| 1227 | calc |
| 1228 | _ ≤ (2 * (SlotColoring.width D j L.1 + SlotColoring.width D j M.1)) / |
| 1229 | SlotColoring.width D j M.1 := |
| 1230 | div_le_div_of_nonneg_right (SlotColoring.overlapping_centers D L M h.overlap j) hM.le |
| 1231 | _ = 2 * (SlotColoring.width D j L.1 / SlotColoring.width D j M.1 + 1) := by |
| 1232 | field_simp |
| 1233 | _ ≤ 2 * (SlotColoring.ratioBound D + 1) := by |
| 1234 | linarith [SlotColoring.width_ratio_le D j h.left_positive h.right_positive |
| 1235 | h.left_level_le h.right_level_le] |
| 1236 | |
| 1237 | theorem meshTransition_smooth (D : ℝ) (L M : SlotColoring.Label) : |
| 1238 | ContDiff ℝ ∞ (meshTransition D L M) := contDiff_const.add (meshLinear D L M).contDiff |
| 1239 | |
| 1240 | theorem meshTransition_jet_bound {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 1241 | {D : ℝ} {L M : SlotColoring.Label} (h : SlotColoring.Adj D L M) |
| 1242 | {f : SlotColoring.Position → V} (hf : ContDiff ℝ ∞ f) (m : ℕ) |
| 1243 | (x : SlotColoring.Position) {A : ℝ} |
| 1244 | (hb : ∀ j ≤ m, ‖iteratedFDeriv ℝ j f (meshTransition D L M x)‖ ≤ A) : |
| 1245 | ∀ j ≤ m, ‖iteratedFDeriv ℝ j (fun y => f (meshTransition D L M y)) x‖ ≤ |
| 1246 | A * (1 + SlotColoring.ratioBound D) ^ m := by |
| 1247 | apply affine_jet_bound hf (meshLinear D L M) (meshOffset D L M) |
| 1248 | (by linarith [mesh_ratioBound_pos D]) |
| 1249 | ((norm_meshLinear_le h).trans (by linarith)) m x hb |
| 1250 | |
| 1251 | theorem meshTransition_norm_le {D : ℝ} {L M : SlotColoring.Label} (h : SlotColoring.Adj D L M) |
| 1252 | {x : SlotColoring.Position} (hx : ‖x‖ ≤ 2) : |
| 1253 | ‖meshTransition D L M x‖ ≤ 4 * SlotColoring.ratioBound D + 2 := by |
| 1254 | have hlin : ‖meshLinear D L M x‖ ≤ SlotColoring.ratioBound D * 2 := |
| 1255 | ((meshLinear D L M).le_opNorm x).trans |
| 1256 | (mul_le_mul (norm_meshLinear_le h) hx (norm_nonneg _) (mesh_ratioBound_pos D).le) |
| 1257 | exact (norm_add_le _ _).trans (by linarith [norm_meshOffset_le h]) |
| 1258 | |
| 1259 | /-- The covering budget used in the path estimate is now instantiated |
| 1260 | from the actual adjacent labels and their coarsest common native index. -/ |
| 1261 | theorem adjacent_argumentCost_le (B : Plane ≃L[ℝ] Plane) {h D : ℝ} (hh : 0 ≤ h) |
| 1262 | {L M : SlotColoring.Label} (hadj : SlotColoring.Adj D L M) (hL : 4 ≤ L.1) |
| 1263 | (center : Plane) : |
| 1264 | argumentCost (bandGeometry B h L.1 |
| 1265 | (ChartScales.nativeIndex h L.1 - commonIndex h L.1 M.1) center) ≤ |
| 1266 | bandArgumentCost B (SlotColoring.nativeGap h) * ChartScales.S L.1 := |
| 1267 | bandGeometry_argumentCost_le B hh hL (adjacent_commonIndex_gap_le h hh hadj).1 center |
| 1268 | |
| 1269 | end MeshChanges |
| 1270 | |
| 1271 | section NativeInstantiation |
| 1272 | |
| 1273 | /-- The actual radial/time eigenvector basis, not an abstract invertible |
| 1274 | basis supplied as an assumption. -/ |
| 1275 | noncomputable def nativeBasis : Plane ≃L[ℝ] Plane := |
| 1276 | TorusAverages.slotChart PhysicalGraphBounds.radialDirection PhysicalGraphBounds.timeDirection |
| 1277 | (by |
| 1278 | unfold PhysicalGraphBounds.radialDirection PhysicalGraphBounds.timeDirection |
| 1279 | dsimp only |
| 1280 | nlinarith [sq_nonneg (Real.sqrt 2 - 1)]) |
| 1281 | |
| 1282 | theorem nativeBasis_radial : nativeBasis (1, 0) = PhysicalGraphBounds.radialDirection := by |
| 1283 | rw [nativeBasis, TorusAverages.slotChart_apply] |
| 1284 | simp |
| 1285 | |
| 1286 | theorem nativeBasis_temporal : nativeBasis (0, 1) = PhysicalGraphBounds.timeDirection := by |
| 1287 | rw [nativeBasis, TorusAverages.slotChart_apply] |
| 1288 | simp |
| 1289 | |
| 1290 | /-- The exact manuscript path, with the actual `c_i` and `v_t`. -/ |
| 1291 | theorem native_band_path (h : ℝ) (n gap : ℕ) (center : Plane) (k : Frequency) |
| 1292 | (Y : Plane) (s : ℝ) : |
| 1293 | (bandGeometry nativeBasis h n gap center).path k Y s = |
| 1294 | Y + (CommonCoverSolve.coverPower gap).symm |
| 1295 | ((ChartScales.timeCoefficient h n * |
| 1296 | (s - ((bandGeometry nativeBasis h n gap center).coordinates k Y).2)) • |
| 1297 | PhysicalGraphBounds.timeDirection) := by |
| 1298 | rw [bandGeometry_path, nativeBasis_temporal] |
| 1299 | |
| 1300 | /-- Any finite collection of active levels with the geometric level-span |
| 1301 | bound has a genuine coarsest member and a uniform covering budget to it. -/ |
| 1302 | theorem exists_coarsest_band (h : ℝ) (hh : 0 ≤ h) (levels : Finset ℕ) |
| 1303 | (hne : levels.Nonempty) (hpos : ∀ n ∈ levels, 1 ≤ n) |
| 1304 | (hspan : ∀ n ∈ levels, ∀ m ∈ levels, n ≤ m + 4) : |
| 1305 | ∃ c ∈ levels, ∀ n ∈ levels, |
| 1306 | ChartScales.nativeIndex h c ≤ ChartScales.nativeIndex h n ∧ |
| 1307 | ChartScales.nativeIndex h n - ChartScales.nativeIndex h c ≤ SlotColoring.nativeGap h := by |
| 1308 | obtain ⟨c, hc, hmin⟩ := levels.exists_min_image (ChartScales.nativeIndex h) hne |
| 1309 | refine ⟨c, hc, ?_⟩ |
| 1310 | intro n hn |
| 1311 | refine ⟨hmin n hn, ?_⟩ |
| 1312 | have hg := SlotColoring.nativeIndex_gap h hh (hpos n hn) (hpos c hc) |
| 1313 | (hspan n hn c hc) (hspan c hc n hn) |
| 1314 | change SlotColoring.nativeIndex h n - SlotColoring.nativeIndex h c ≤ _ |
| 1315 | omega |
| 1316 | |
| 1317 | end NativeInstantiation |
| 1318 | |
| 1319 | end |
| 1320 | |
| 1321 | end NavierStokes.CommonCoverClass |