| @@ -43,18 +43,12 @@ noncomputable def coefficient (f : Source) (p : ℝ) (k : Frequency) : ℂ := |
| 43 | 43 | |
| 44 | 44 | noncomputable def mean (f : Source) (p : ℝ) : ℂ := coefficient f p 0 |
| 45 | 45 | |
| 46 | | -def ZeroMean (f : Source) : Prop := ∀ p, mean f p = 0 |
| 47 | | - |
| 48 | 46 | noncomputable def inverse (d : Direction) (f : Source) (z : Point) : ℂ := |
| 49 | 47 | directionalInverse d (coefficient f z.1) z.2 |
| 50 | 48 | |
| 51 | 49 | noncomputable def iterateInverse (d : Direction) (n : ℕ) (f : Source) : Source := |
| 52 | 50 | (inverse d)^[n] f |
| 53 | 51 | |
| 54 | | -theorem mean_eq_integral (f : Source) (p : ℝ) : |
| 55 | | - mean f p = ∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (p, (x, y)) := |
| 56 | | - SmoothFourierData.coefficient_zero_eq_integral _ |
| 57 | | - |
| 58 | 52 | theorem slice_smooth {f : Source} (hf : ContDiff ℝ ∞ f) (p : ℝ) : |
| 59 | 53 | ContDiff ℝ ∞ (slice f p) := |
| 60 | 54 | hf.comp (contDiff_const.prodMk contDiff_id) |
| @@ -81,31 +75,12 @@ theorem fixedPartial_periodic {f : Source} (hp : Periodic f) (v : Point) : |
| 81 | 75 | simpa only [slice, Prod.mk_add_mk, add_zero] using |
| 82 | 76 | congrArg (fun L : Point →L[ℝ] ℂ => L v) hd |
| 83 | 77 | |
| 84 | | -theorem parameterPartial_periodic {f : Source} (hp : Periodic f) : |
| 85 | | - Periodic (parameterPartial f) := fixedPartial_periodic hp (1, 0) |
| 86 | | - |
| 87 | 78 | theorem torusXJet_smooth {f : Source} (hf : ContDiff ℝ ∞ f) (n : ℕ) : |
| 88 | 79 | ContDiff ℝ ∞ (torusXJet n f) := by |
| 89 | 80 | induction n with |
| 90 | 81 | | zero => exact hf |
| 91 | 82 | | succ n ih => exact torusXPartial_smooth ih |
| 92 | 83 | |
| 93 | | -theorem parameterJet_smooth {f : Source} (hf : ContDiff ℝ ∞ f) (n : ℕ) : |
| 94 | | - ContDiff ℝ ∞ (parameterJet n f) := by |
| 95 | | - induction n with |
| 96 | | - | zero => exact hf |
| 97 | | - | succ n ih => |
| 98 | | - rw [parameterJet, Function.iterate_succ_apply'] |
| 99 | | - exact parameterPartial_smooth ih |
| 100 | | - |
| 101 | | -theorem parameterJet_periodic {f : Source} (hp : Periodic f) (n : ℕ) : |
| 102 | | - Periodic (parameterJet n f) := by |
| 103 | | - induction n with |
| 104 | | - | zero => exact hp |
| 105 | | - | succ n ih => |
| 106 | | - rw [parameterJet, Function.iterate_succ_apply'] |
| 107 | | - exact parameterPartial_periodic ih |
| 108 | | - |
| 109 | 84 | theorem swapTorus_smooth {f : Source} (hf : ContDiff ℝ ∞ f) : |
| 110 | 85 | ContDiff ℝ ∞ (swapTorus f) := |
| 111 | 86 | hf.comp (contDiff_fst.prodMk (contDiff_snd.snd.prodMk contDiff_snd.fst)) |
| @@ -171,14 +146,6 @@ theorem weightedSource_smooth {f : Source} (hf : ContDiff ℝ ∞ f) (k : Freque |
| 171 | 146 | ((kernel_smooth k).comp (contDiff_snd.prodMk contDiff_fst.snd)).mul |
| 172 | 147 | (hf.comp (contDiff_fst.fst.prodMk (contDiff_snd.prodMk contDiff_fst.snd))) |
| 173 | 148 | |
| 174 | | -theorem coefficient_smooth {f : Source} (hf : ContDiff ℝ ∞ f) (k : Frequency) : |
| 175 | | - ContDiff ℝ ∞ (fun p => coefficient f p k) := by |
| 176 | | - have hi := TransportPrimitive.parameterIntegral_contDiff (weightedSource_smooth hf k) |
| 177 | | - (0 : ℝ) 1 |
| 178 | | - have ho := TransportPrimitive.parameterIntegral_contDiff hi (0 : ℝ) 1 |
| 179 | | - simpa only [coefficient, SmoothFourierData.coefficient_eq_doubleIntegral, weightedSource, |
| 180 | | - slice] using ho |
| 181 | | - |
| 182 | 149 | theorem coefficient_hasDerivAt {f : Source} (hf : ContDiff ℝ ∞ f) |
| 183 | 150 | (k : Frequency) (p : ℝ) : |
| 184 | 151 | HasDerivAt (fun q => coefficient f q k) (coefficient (parameterPartial f) p k) p := by |
| @@ -202,14 +169,6 @@ theorem coefficient_hasDerivAt {f : Source} (hf : ContDiff ℝ ∞ f) |
| 202 | 169 | simpa only [coefficient, SmoothFourierData.coefficient_eq_doubleIntegral, slice, |
| 203 | 170 | inner, innerD, weightedSource] using ho |
| 204 | 171 | |
| 205 | | -theorem parameterPartial_zeroMean {f : Source} (hf : ContDiff ℝ ∞ f) |
| 206 | | - (hm : ZeroMean f) : ZeroMean (parameterPartial f) := by |
| 207 | | - intro p |
| 208 | | - have he : (fun q => coefficient f q 0) = fun _ => (0 : ℂ) := funext hm |
| 209 | | - have hd := (coefficient_hasDerivAt hf 0 p).deriv |
| 210 | | - rw [he, deriv_const] at hd |
| 211 | | - exact hd.symm |
| 212 | | - |
| 213 | 172 | /-- Uniform polynomial decay on any fixed compact parameter interval, |
| 214 | 173 | derived from bounds for actual torus derivatives. -/ |
| 215 | 174 | theorem exists_uniform_coefficient_bound {f : Source} (hf : ContDiff ℝ ∞ f) |
| @@ -305,22 +264,6 @@ theorem multiplied_coeff_bound {m a : Frequency → ℂ} {s : ℕ} {C B : ℝ} |
| 305 | 264 | _ = C * (weight k ^ (s + 4) * ‖a k‖) := by rw [pow_add]; ring |
| 306 | 265 | _ ≤ C * B := mul_le_mul_of_nonneg_left (ha k) hC |
| 307 | 266 | |
| 308 | | -theorem uniform_multiplied_coeff_bound {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 309 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) (a b : ℝ) : |
| 310 | | - ∃ C : ℝ, 0 ≤ C ∧ ∀ p ∈ Icc a b, ∀ k, |
| 311 | | - ‖m k * coefficient f p k‖ ≤ C * (weight k ^ 4)⁻¹ := by |
| 312 | | - obtain ⟨s, M, hM, hm⟩ := hm |
| 313 | | - obtain ⟨B, hB, hbound⟩ := exists_uniform_coefficient_bound hf hp (s + 4) a b |
| 314 | | - exact ⟨M * B, mul_nonneg hM hB, fun p hp k => multiplied_coeff_bound hM hm (hbound p hp) k⟩ |
| 315 | | - |
| 316 | | -noncomputable def applyMultiplier (m : Frequency → ℂ) (f : Source) (z : Point) : ℂ := |
| 317 | | - series (fun k => m k * coefficient f z.1 k) z.2 |
| 318 | | - |
| 319 | | -theorem multiplied_coeff_rapid {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 320 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) (p : ℝ) : |
| 321 | | - Rapid (fun k => m k * coefficient f p k) := |
| 322 | | - hm.rapid_mul (SmoothFourierData.rapid_coefficient (slice_smooth hf p) (hp p)) |
| 323 | | - |
| 324 | 267 | noncomputable def jointDP : Point →L[ℝ] ℝ := ContinuousLinearMap.fst ℝ ℝ Plane |
| 325 | 268 | noncomputable def jointDX : Point →L[ℝ] ℝ := |
| 326 | 269 | TorusInverse.dx.comp (ContinuousLinearMap.snd ℝ ℝ Plane) |
| @@ -338,288 +281,9 @@ noncomputable def jointLiftY : ℂ →L[ℝ] (Point →L[ℝ] ℂ) := |
| 338 | 281 | @[simp] theorem jointLiftX_apply (c : ℂ) (v : Point) : jointLiftX c v = v.2.1 • c := rfl |
| 339 | 282 | @[simp] theorem jointLiftY_apply (c : ℂ) (v : Point) : jointLiftY c v = v.2.2 • c := rfl |
| 340 | 283 | |
| 341 | | -noncomputable def multiplierTermDerivative (m : Frequency → ℂ) (f : Source) |
| 342 | | - (k : Frequency) (z : Point) : Point →L[ℝ] ℂ := |
| 343 | | - jointLiftP (m k * coefficient (parameterPartial f) z.1 k * mode k z.2) + |
| 344 | | - jointLiftX (multiplierX m k * coefficient f z.1 k * mode k z.2) + |
| 345 | | - jointLiftY (multiplierY m k * coefficient f z.1 k * mode k z.2) |
| 346 | | - |
| 347 | | -theorem hasFDerivAt_multiplierTerm {f : Source} (hf : ContDiff ℝ ∞ f) |
| 348 | | - (m : Frequency → ℂ) (k : Frequency) (z : Point) : |
| 349 | | - HasFDerivAt (fun w : Point => m k * coefficient f w.1 k * mode k w.2) |
| 350 | | - (multiplierTermDerivative m f k z) z := by |
| 351 | | - have hc : HasFDerivAt (fun w : Point => coefficient f w.1 k) |
| 352 | | - (jointLiftP (coefficient (parameterPartial f) z.1 k)) z := by |
| 353 | | - convert! (coefficient_hasDerivAt hf k z.1).hasFDerivAt.comp z |
| 354 | | - (hasFDerivAt_fst) using 1 |
| 355 | | - have he : HasFDerivAt (fun w : Point => mode k w.2) |
| 356 | | - (mode k z.2 • ((phase k).comp (ContinuousLinearMap.snd ℝ ℝ Plane))) z := |
| 357 | | - ((phase k).hasFDerivAt.comp z (hasFDerivAt_snd)).cexp |
| 358 | | - have hd : multiplierTermDerivative m f k z = |
| 359 | | - (m k * coefficient f z.1 k) • |
| 360 | | - (mode k z.2 • ((phase k).comp (ContinuousLinearMap.snd ℝ ℝ Plane))) + |
| 361 | | - mode k z.2 • (m k • jointLiftP (coefficient (parameterPartial f) z.1 k)) := by |
| 362 | | - apply ContinuousLinearMap.ext |
| 363 | | - intro v |
| 364 | | - change v.1 • (m k * coefficient (parameterPartial f) z.1 k * mode k z.2) + |
| 365 | | - v.2.1 • (freqX k * m k * coefficient f z.1 k * mode k z.2) + |
| 366 | | - v.2.2 • (freqY k * m k * coefficient f z.1 k * mode k z.2) = |
| 367 | | - (m k * coefficient f z.1 k) • |
| 368 | | - (mode k z.2 • (v.2.1 • freqX k + v.2.2 • freqY k)) + |
| 369 | | - mode k z.2 • (m k • (v.1 • coefficient (parameterPartial f) z.1 k)) |
| 370 | | - simp only [Complex.real_smul, smul_eq_mul] |
| 371 | | - ring |
| 372 | | - rw [hd] |
| 373 | | - exact (hc.const_mul (m k)).mul he |
| 374 | | - |
| 375 | | -theorem norm_multiplierTermDerivative_le (m : Frequency → ℂ) (f : Source) |
| 376 | | - (k : Frequency) (z : Point) : |
| 377 | | - ‖multiplierTermDerivative m f k z‖ ≤ |
| 378 | | - ‖jointLiftP‖ * ‖m k * coefficient (parameterPartial f) z.1 k‖ + |
| 379 | | - ‖jointLiftX‖ * ‖multiplierX m k * coefficient f z.1 k‖ + |
| 380 | | - ‖jointLiftY‖ * ‖multiplierY m k * coefficient f z.1 k‖ := by |
| 381 | | - unfold multiplierTermDerivative |
| 382 | | - apply (norm_add_le _ _).trans |
| 383 | | - apply add_le_add |
| 384 | | - · apply (norm_add_le _ _).trans |
| 385 | | - apply add_le_add |
| 386 | | - · simpa only [norm_mul, norm_mode, mul_one] using |
| 387 | | - jointLiftP.le_opNorm (m k * coefficient (parameterPartial f) z.1 k * mode k z.2) |
| 388 | | - · simpa only [norm_mul, norm_mode, mul_one] using |
| 389 | | - jointLiftX.le_opNorm (multiplierX m k * coefficient f z.1 k * mode k z.2) |
| 390 | | - · simpa only [norm_mul, norm_mode, mul_one] using |
| 391 | | - jointLiftY.le_opNorm (multiplierY m k * coefficient f z.1 k * mode k z.2) |
| 392 | | - |
| 393 | | -theorem uniform_multiplierDerivative_bound {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 394 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) (a b : ℝ) : |
| 395 | | - ∃ C : ℝ, 0 ≤ C ∧ ∀ z : Point, z.1 ∈ Icc a b → ∀ k, |
| 396 | | - ‖multiplierTermDerivative m f k z‖ ≤ C * (weight k ^ 4)⁻¹ := by |
| 397 | | - obtain ⟨CP, hCP, hP⟩ := uniform_multiplied_coeff_bound hm |
| 398 | | - (parameterPartial_smooth hf) (parameterPartial_periodic hp) a b |
| 399 | | - obtain ⟨CX, hCX, hX⟩ := uniform_multiplied_coeff_bound hm.mulX hf hp a b |
| 400 | | - obtain ⟨CY, hCY, hY⟩ := uniform_multiplied_coeff_bound hm.mulY hf hp a b |
| 401 | | - refine ⟨‖jointLiftP‖ * CP + ‖jointLiftX‖ * CX + ‖jointLiftY‖ * CY, by positivity, ?_⟩ |
| 402 | | - intro z hz k |
| 403 | | - apply (norm_multiplierTermDerivative_le m f k z).trans |
| 404 | | - calc |
| 405 | | - _ ≤ ‖jointLiftP‖ * (CP * (weight k ^ 4)⁻¹) + |
| 406 | | - ‖jointLiftX‖ * (CX * (weight k ^ 4)⁻¹) + |
| 407 | | - ‖jointLiftY‖ * (CY * (weight k ^ 4)⁻¹) := by |
| 408 | | - gcongr |
| 409 | | - · exact hP z.1 hz k |
| 410 | | - · exact hX z.1 hz k |
| 411 | | - · exact hY z.1 hz k |
| 412 | | - _ = _ := by ring |
| 413 | | - |
| 414 | | -theorem hasFDerivAt_applyMultiplier {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 415 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) (z : Point) : |
| 416 | | - HasFDerivAt (applyMultiplier m f) (∑' k, multiplierTermDerivative m f k z) z := by |
| 417 | | - obtain ⟨C, hC, hbound⟩ := uniform_multiplierDerivative_bound hm hf hp (z.1 - 1) (z.1 + 1) |
| 418 | | - have hs : Summable (fun k : Frequency => C * (weight k ^ 4)⁻¹) := |
| 419 | | - SmoothFourierData.summable_weight_inv_four.mul_left C |
| 420 | | - have hbox : ∀ w ∈ Metric.ball z 1, w.1 ∈ Icc (z.1 - 1) (z.1 + 1) := by |
| 421 | | - intro w hw |
| 422 | | - have hd : dist w.1 z.1 < 1 := by |
| 423 | | - simpa only [dist_eq_norm, Prod.fst_sub] using |
| 424 | | - (norm_fst_le (w - z)).trans_lt (show ‖w - z‖ < 1 by |
| 425 | | - simpa only [dist_eq_norm] using Metric.mem_ball.mp hw) |
| 426 | | - rw [Real.dist_eq] at hd |
| 427 | | - constructor <;> linarith [(abs_lt.mp hd).1, (abs_lt.mp hd).2] |
| 428 | | - exact hasFDerivAt_tsum_of_isPreconnected hs Metric.isOpen_ball |
| 429 | | - (convex_ball z (1 : ℝ)).isPreconnected |
| 430 | | - (fun k w _ => hasFDerivAt_multiplierTerm hf m k w) |
| 431 | | - (fun k w hw => hbound w (hbox w hw) k) |
| 432 | | - (Metric.mem_ball_self (by norm_num : (0 : ℝ) < 1)) |
| 433 | | - (summable_terms (multiplied_coeff_rapid hm hf hp z.1) z.2) |
| 434 | | - (Metric.mem_ball_self (by norm_num : (0 : ℝ) < 1)) |
| 435 | | - |
| 436 | | -theorem fderiv_applyMultiplier {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 437 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) (z : Point) : |
| 438 | | - fderiv ℝ (applyMultiplier m f) z = |
| 439 | | - jointLiftP (applyMultiplier m (parameterPartial f) z) + |
| 440 | | - jointLiftX (applyMultiplier (multiplierX m) f z) + |
| 441 | | - jointLiftY (applyMultiplier (multiplierY m) f z) := by |
| 442 | | - have hP := summable_terms (multiplied_coeff_rapid hm |
| 443 | | - (parameterPartial_smooth hf) (parameterPartial_periodic hp) z.1) z.2 |
| 444 | | - have hX := summable_terms (multiplied_coeff_rapid hm.mulX hf hp z.1) z.2 |
| 445 | | - have hY := summable_terms (multiplied_coeff_rapid hm.mulY hf hp z.1) z.2 |
| 446 | | - rw [(hasFDerivAt_applyMultiplier hm hf hp z).fderiv] |
| 447 | | - simp only [multiplierTermDerivative] |
| 448 | | - rw [Summable.tsum_add ((jointLiftP.summable hP).add (jointLiftX.summable hX)) |
| 449 | | - (jointLiftY.summable hY), |
| 450 | | - Summable.tsum_add (jointLiftP.summable hP) (jointLiftX.summable hX), |
| 451 | | - ← jointLiftP.map_tsum hP, ← jointLiftX.map_tsum hX, ← jointLiftY.map_tsum hY] |
| 452 | | - rfl |
| 453 | | - |
| 454 | | -/-- Joint smoothness is derived from actual locally uniform Fourier |
| 455 | | -differentiation, allowing arbitrary polynomially growing multipliers. -/ |
| 456 | | -theorem applyMultiplier_smooth_nat (n : ℕ) {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 457 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) : |
| 458 | | - ContDiff ℝ n (applyMultiplier m f) := by |
| 459 | | - induction n generalizing m f with |
| 460 | | - | zero => |
| 461 | | - exact contDiff_zero.mpr (show Differentiable ℝ (applyMultiplier m f) from |
| 462 | | - fun z => (hasFDerivAt_applyMultiplier hm hf hp z).differentiableAt).continuous |
| 463 | | - | succ n ih => |
| 464 | | - rw [show ((n + 1 : ℕ) : WithTop ℕ∞) = (n : WithTop ℕ∞) + 1 by simp, |
| 465 | | - contDiff_succ_iff_fderiv] |
| 466 | | - refine ⟨fun z => (hasFDerivAt_applyMultiplier hm hf hp z).differentiableAt, by simp, ?_⟩ |
| 467 | | - have he : fderiv ℝ (applyMultiplier m f) = fun z => |
| 468 | | - jointLiftP (applyMultiplier m (parameterPartial f) z) + |
| 469 | | - jointLiftX (applyMultiplier (multiplierX m) f z) + |
| 470 | | - jointLiftY (applyMultiplier (multiplierY m) f z) := |
| 471 | | - funext (fderiv_applyMultiplier hm hf hp) |
| 472 | | - rw [he] |
| 473 | | - exact ((jointLiftP.contDiff.comp |
| 474 | | - (ih hm (parameterPartial_smooth hf) (parameterPartial_periodic hp))).add |
| 475 | | - (jointLiftX.contDiff.comp (ih hm.mulX hf hp))).add |
| 476 | | - (jointLiftY.contDiff.comp (ih hm.mulY hf hp)) |
| 477 | | - |
| 478 | | -theorem applyMultiplier_smooth {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 479 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) : |
| 480 | | - ContDiff ℝ ∞ (applyMultiplier m f) := |
| 481 | | - contDiff_infty.mpr (fun n => applyMultiplier_smooth_nat n hm hf hp) |
| 482 | | - |
| 483 | | -theorem inverse_smooth (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 484 | | - (hp : Periodic f) : ContDiff ℝ ∞ (inverse d f) := |
| 485 | | - applyMultiplier_smooth (inverseMultiplier_growth d) hf hp |
| 486 | | - |
| 487 | | -theorem parameterPartial_applyMultiplier {m : Frequency → ℂ} (hm : PolynomialGrowth m) |
| 488 | | - {f : Source} (hf : ContDiff ℝ ∞ f) (hp : Periodic f) : |
| 489 | | - parameterPartial (applyMultiplier m f) = applyMultiplier m (parameterPartial f) := by |
| 490 | | - funext z |
| 491 | | - simp [parameterPartial, fderiv_applyMultiplier hm hf hp, jointLiftP_apply, |
| 492 | | - jointLiftX_apply, jointLiftY_apply] |
| 493 | | - |
| 494 | | -theorem parameterPartial_inverse (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 495 | | - (hp : Periodic f) : parameterPartial (inverse d f) = inverse d (parameterPartial f) := |
| 496 | | - parameterPartial_applyMultiplier (inverseMultiplier_growth d) hf hp |
| 497 | | - |
| 498 | | -theorem inverse_periodic (d : Direction) (f : Source) : Periodic (inverse d f) := by |
| 499 | | - intro p Y k |
| 500 | | - exact directionalInverse_periodic d (coefficient f p) Y k.1 k.2 |
| 501 | | - |
| 502 | | -/-- The inverse has zero mean even if the input has a nonzero constant mode. -/ |
| 503 | | -theorem inverse_zeroMean (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 504 | | - (hp : Periodic f) : ZeroMean (inverse d f) := by |
| 505 | | - intro p |
| 506 | | - have ha := SmoothFourierData.rapid_coefficient (slice_smooth hf p) (hp p) |
| 507 | | - let g : C(Torus, ℂ) := |
| 508 | | - ⟨torusSeries (inverseCoeff d (coefficient f p)), |
| 509 | | - continuous_torusSeries (ha.inverseCoeff d)⟩ |
| 510 | | - have hg : SmoothFourierData.torusLift g = slice (inverse d f) p := by |
| 511 | | - funext Y |
| 512 | | - exact (series_eq_torusSeries (inverseCoeff d (coefficient f p)) Y).symm |
| 513 | | - change SmoothFourierData.coefficient (slice (inverse d f) p) 0 = 0 |
| 514 | | - rw [← hg, SmoothFourierData.coefficient_zero_eq_mean] |
| 515 | | - exact TorusInverse.inverse_zero_mean d ha |
| 516 | | - |
| 517 | | -noncomputable def directionalPartial (d : Direction) (f : Source) (z : Point) : ℂ := |
| 518 | | - fderiv ℝ f z (0, vector d) |
| 519 | | - |
| 520 | | -/-- Exact inversion for the given function, with the derivative taken in the |
| 521 | | -joint parameter--torus space. -/ |
| 522 | | -theorem inverse_solves (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 523 | | - (hp : Periodic f) (hm : ZeroMean f) : directionalPartial d (inverse d f) = f := by |
| 524 | | - funext z |
| 525 | | - have hz := SmoothFourierData.inverse_solves_smooth_periodic d |
| 526 | | - (slice_smooth hf z.1) (hp z.1) (by |
| 527 | | - change (∫ y in (0 : ℝ)..1, ∫ x in (0 : ℝ)..1, f (z.1, (x, y))) = 0 |
| 528 | | - rw [← mean_eq_integral] |
| 529 | | - exact hm z.1) z.2 |
| 530 | | - have hd := congrArg (fun L : Plane →L[ℝ] ℂ => L (vector d)) |
| 531 | | - (slice_hasFDerivAt (inverse_smooth d hf hp) z.1 z.2).fderiv |
| 532 | | - exact hd.symm.trans hz |
| 533 | | - |
| 534 | | -theorem inverse_preserves_parameter_support (d : Direction) (f : Source) (S : Set ℝ) |
| 535 | | - (hs : ∀ p, p ∉ S → ∀ Y, f (p, Y) = 0) : |
| 536 | | - ∀ p, p ∉ S → ∀ Y, inverse d f (p, Y) = 0 := by |
| 537 | | - apply TorusInverse.inverse_preserves_parameter_support d (coefficient f) S |
| 538 | | - intro p hp k |
| 539 | | - simp only [coefficient, SmoothFourierData.coefficient_eq_doubleIntegral, slice, |
| 540 | | - hs p hp, mul_zero, intervalIntegral.integral_zero] |
| 541 | | - |
| 542 | 284 | @[simp] theorem parameterJet_zero (f : Source) : parameterJet 0 f = f := rfl |
| 543 | 285 | |
| 544 | | -theorem parameterJet_succ (n : ℕ) (f : Source) : |
| 545 | | - parameterJet (n + 1) f = parameterPartial (parameterJet n f) := |
| 546 | | - Function.iterate_succ_apply' _ _ _ |
| 547 | | - |
| 548 | | -/-- All actual derivatives in the external parameter commute with inversion. -/ |
| 549 | | -theorem parameterJet_inverse (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 550 | | - (hp : Periodic f) (n : ℕ) : |
| 551 | | - parameterJet n (inverse d f) = inverse d (parameterJet n f) := by |
| 552 | | - induction n with |
| 553 | | - | zero => rfl |
| 554 | | - | succ n ih => |
| 555 | | - rw [parameterJet_succ, ih, parameterPartial_inverse d (parameterJet_smooth hf n) |
| 556 | | - (parameterJet_periodic hp n), parameterJet_succ] |
| 557 | | - |
| 558 | 286 | @[simp] theorem iterateInverse_zero (d : Direction) (f : Source) : |
| 559 | 287 | iterateInverse d 0 f = f := rfl |
| 560 | 288 | |
| 561 | | -theorem iterateInverse_succ (d : Direction) (n : ℕ) (f : Source) : |
| 562 | | - iterateInverse d (n + 1) f = inverse d (iterateInverse d n f) := |
| 563 | | - Function.iterate_succ_apply' _ _ _ |
| 564 | | - |
| 565 | | -theorem iterateInverse_periodic (d : Direction) {f : Source} (hp : Periodic f) |
| 566 | | - (n : ℕ) : Periodic (iterateInverse d n f) := by |
| 567 | | - induction n with |
| 568 | | - | zero => exact hp |
| 569 | | - | succ n ih => |
| 570 | | - rw [iterateInverse_succ] |
| 571 | | - exact inverse_periodic d _ |
| 572 | | - |
| 573 | | -theorem iterateInverse_smooth (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 574 | | - (hp : Periodic f) (n : ℕ) : ContDiff ℝ ∞ (iterateInverse d n f) := by |
| 575 | | - induction n with |
| 576 | | - | zero => exact hf |
| 577 | | - | succ n ih => |
| 578 | | - rw [iterateInverse_succ] |
| 579 | | - exact inverse_smooth d ih (iterateInverse_periodic d hp n) |
| 580 | | - |
| 581 | | -/-- A genuine mixed coordinate jet: first actual parameter derivatives, then |
| 582 | | -the indicated word of actual torus-coordinate derivatives. -/ |
| 583 | | -noncomputable def mixedJet (q : ℕ) (w : List Bool) (f : Source) (z : Point) : ℂ := |
| 584 | | - derivativeWord w (slice (parameterJet q f) z.1) z.2 |
| 585 | | - |
| 586 | | -noncomputable def mixedLossConstant (r : ℕ) : ℝ := |
| 587 | | - ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ r) * 3 ^ (r + 5) * |
| 588 | | - ∑' k : Frequency, (weight k ^ 4)⁻¹ |
| 589 | | - |
| 590 | | -theorem mixedLossConstant_nonneg (r : ℕ) : 0 ≤ mixedLossConstant r := by |
| 591 | | - unfold mixedLossConstant |
| 592 | | - positivity |
| 593 | | - |
| 594 | | -/-- Uniform finite loss: a mixed output jet with r torus derivatives requires |
| 595 | | -only r+5 pure torus derivatives of the same parameter jet of the input. |
| 596 | | -The constant is independent of the parameter set and the function. -/ |
| 597 | | -theorem mixedJet_inverse_bound (d : Direction) {f : Source} (hf : ContDiff ℝ ∞ f) |
| 598 | | - (hp : Periodic f) (q : ℕ) (w : List Bool) (S : Set ℝ) {C : ℝ} |
| 599 | | - (hzero : ∀ p ∈ S, ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 600 | | - ‖parameterJet q f (p, (x, y))‖ ≤ C) |
| 601 | | - (hfirst : ∀ p ∈ S, ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 602 | | - ‖SmoothFourierData.xJet (w.length + 5) (slice (parameterJet q f) p) (x, y)‖ ≤ C) |
| 603 | | - (hsecond : ∀ p ∈ S, ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |
| 604 | | - ‖SmoothFourierData.xJet (w.length + 5) |
| 605 | | - (SmoothFourierData.swapFunction (slice (parameterJet q f) p)) (x, y)‖ ≤ C) |
| 606 | | - (p : ℝ) (hps : p ∈ S) (Y : Plane) : |
| 607 | | - ‖mixedJet q w (inverse d f) (p, Y)‖ ≤ mixedLossConstant w.length * C := by |
| 608 | | - rw [mixedJet, parameterJet_inverse d hf hp] |
| 609 | | - have hq := slice_smooth (parameterJet_smooth hf q) p |
| 610 | | - have hpq := parameterJet_periodic hp q p |
| 611 | | - have hbound := SmoothFourierData.coefficient_seminorm_bound hq hpq (w.length + 1) |
| 612 | | - (hzero p hps) (by simpa only [Nat.add_assoc] using hfirst p hps) |
| 613 | | - (by simpa only [Nat.add_assoc] using hsecond p hps) |
| 614 | | - calc |
| 615 | | - _ ≤ ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ w.length) * |
| 616 | | - coeffSeminorm (w.length + 1) (coefficient (parameterJet q f) p) := |
| 617 | | - inverse_derivativeWord_bound d (SmoothFourierData.rapid_coefficient hq hpq) w Y |
| 618 | | - _ ≤ ((6 * ‖omega⁻¹‖) * ‖omega‖ ^ w.length) * |
| 619 | | - ((3 ^ ((w.length + 1) + 4) * C) * ∑' k : Frequency, (weight k ^ 4)⁻¹) := |
| 620 | | - mul_le_mul_of_nonneg_left hbound (by positivity) |
| 621 | | - _ = mixedLossConstant w.length * C := by |
| 622 | | - simp only [mixedLossConstant, Nat.add_assoc] |
| 623 | | - ring |
| 624 | | - |
| 625 | 289 | end NavierStokes.ParametricTorusInverse |