Download data/lean/OAI/Analysis/FourierExtension/LocalizedFourier.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 14.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FourierExtension/LocalizedFourier.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/FourierExtension/LocalizedFourier.lean
-
curl -L -o LocalizedFourier.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FourierExtension/LocalizedFourier.lean
14.4 kB
| import Mathlib | |
| namespace OAI | |
| /-! Uniform Fourier decay and localized Taylor amplitudes. -/ | |
| open MeasureTheory | |
| open scoped NNReal ENNReal ContDiff | |
| noncomputable section | |
| open Filter | |
| open scoped Topology ContDiff | |
| open MeasureTheory Set | |
| open scoped ContDiff FourierTransform InnerProductSpace ENNReal | |
| namespace DiagonalExtension.UniformFourierDecay | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| [FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] | |
| theorem weighted_fourier_bound {f : E β β} (hf : ContDiff β β f) | |
| (hfc : HasCompactSupport f) (n : β) {M : β} (_hM : 0 β€ M) | |
| (hderiv : β j β€ n, β« y, βiteratedFDeriv β j f yβ β€ M) (x : E) : | |
| (1 + βxβ) ^ n * βπ f xβ β€ (2 : β) ^ n * (1 + 2 ^ n * (n + 1)) * M := by | |
| have hint (k j : β) : Integrable (fun y : E => βyβ ^ k * βiteratedFDeriv β j f yβ) := | |
| (((continuous_norm.pow k).mul (hf.continuous_iteratedFDeriv (by exact WithTop.coe_le_coe.mpr le_top)).norm)).integrable_of_hasCompactSupport | |
| (((hfc.iteratedFDeriv j).norm).mul_left) | |
| have h0 : βπ f xβ β€ M := by | |
| exact (VectorFourier.norm_fourierIntegral_le_integral_norm Real.fourierChar volume (innerβ E) f x).trans | |
| (by simpa only [norm_iteratedFDeriv_zero] using hderiv 0 (Nat.zero_le n)) | |
| have hw := Real.pow_mul_norm_iteratedFDeriv_fourier_le (K := (0 : ββ)) (N := β€) | |
| hf (fun k j _ _ => hint k j) (k := 0) (n := n) (by simp) (by simp) x | |
| have hw' : βxβ ^ n * βπ f xβ β€ 2 ^ n * ((n + 1) * M) := by | |
| simp only [pow_zero, zero_add, one_mul, norm_iteratedFDeriv_zero, | |
| Nat.cast_zero, Finset.range_one, Finset.singleton_product, Finset.sum_map, Function.Embedding.sectR_apply, | |
| mul_zero] at hw | |
| refine hw.trans ?_ | |
| apply mul_le_mul_of_nonneg_left _ (by positivity) | |
| calc | |
| _ β€ β j β Finset.range (n + 1), M := by | |
| apply Finset.sum_le_sum | |
| intro j hj | |
| exact hderiv j (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)) | |
| _ = _ := by simp | |
| have hp : (1 + βxβ) ^ n β€ 2 ^ n * (1 + βxβ ^ n) := by | |
| refine (add_pow_le (a := (1:β)) (b := βxβ) (by positivity) (norm_nonneg _) n).trans ?_ | |
| simp only [one_pow] | |
| gcongr | |
| Β· norm_num | |
| Β· omega | |
| calc | |
| _ β€ 2 ^ n * (1 + βxβ ^ n) * βπ f xβ := mul_le_mul_of_nonneg_right hp (norm_nonneg _) | |
| _ = 2 ^ n * (βπ f xβ + βxβ ^ n * βπ f xβ) := by ring | |
| _ β€ 2 ^ n * (M + 2 ^ n * ((n + 1) * M)) := by gcongr | |
| _ = _ := by ring | |
| end DiagonalExtension.UniformFourierDecay | |
| namespace DiagonalExtension.UniformFourierDecay | |
| variable {P : Type*} [NormedAddCommGroup P] [NormedSpace β P] | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| lemma iteratedFDeriv_section {F : P Γ E β β} (hF : ContDiff β β F) | |
| (p : P) (z : E) (j : β) : | |
| iteratedFDeriv β j (fun y => F (p,y)) z = | |
| (iteratedFDeriv β j F (p,z)).compContinuousLinearMap | |
| (fun _ => ContinuousLinearMap.inr β P E) := by | |
| let g : P Γ E β β := fun q => F ((p,0) + q) | |
| have hg : ContDiff β β g := hF.comp (contDiff_const.add contDiff_id) | |
| have heq := (ContinuousLinearMap.inr β P E).iteratedFDeriv_comp_right hg z | |
| (i := j) (by exact WithTop.coe_le_coe.mpr le_top) | |
| have ht := iteratedFDerivWithin_comp_add_left (π := β) (f := F) (s := Set.univ) | |
| j (p, (0:E)) ((0:P),z) | |
| simp only [Set.vadd_set_univ, iteratedFDerivWithin_univ, Prod.mk_add_mk, | |
| add_zero, zero_add] at ht | |
| simp only [Function.comp_def, g, ContinuousLinearMap.inr_apply, | |
| Prod.mk_add_mk, add_zero, zero_add] at heq | |
| rw [show iteratedFDeriv β j (fun q : P Γ E => F ((p,0) + q)) (0,z) = | |
| iteratedFDeriv β j F (p,z) from ht] at heq | |
| exact heq | |
| lemma continuous_section_derivative {F : P Γ E β β} (hF : ContDiff β β F) (j : β) : | |
| Continuous (fun q : P Γ E => iteratedFDeriv β j (fun y => F (q.1,y)) q.2) := by | |
| simp_rw [iteratedFDeriv_section hF] | |
| exact (ContinuousMultilinearMap.compContinuousLinearMapL | |
| (fun _ : Fin j => ContinuousLinearMap.inr β P E)).continuous.comp | |
| (hF.continuous_iteratedFDeriv (by exact WithTop.coe_le_coe.mpr le_top)) | |
| variable [FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] | |
| theorem compact_uniform_decay {F : P Γ E β β} (hF : ContDiff β β F) | |
| {K : Set P} (hK : IsCompact K) {S : Set E} (hS : IsCompact S) | |
| (hsupp : β p β K, tsupport (fun z => F (p,z)) β S) (n : β) : | |
| β C : β, 0 β€ C β§ β p β K, β x : E, | |
| (1 + βxβ) ^ n * βπ (fun z => F (p,z)) xβ β€ C := by | |
| have hb (j : β) : β C : β, 0 β€ C β§ β p β K, | |
| β« z, βiteratedFDeriv β j (fun y => F (p,y)) zβ β€ C := by | |
| obtain β¨B,hBβ© := (hK.prod hS).exists_bound_of_continuousOn | |
| (continuous_section_derivative hF j).continuousOn | |
| refine β¨max B 0 * (volume S).toReal, by positivity, ?_β© | |
| intro p hp | |
| have hf : ContDiff β β (fun z => F (p,z)) := | |
| hF.comp (contDiff_const.prodMk contDiff_id) | |
| have hfc : HasCompactSupport (fun z => F (p,z)) := | |
| hS.of_isClosed_subset isClosed_closure (hsupp p hp) | |
| have hc : Continuous (fun z => βiteratedFDeriv β j (fun y => F (p,y)) zβ) := | |
| (hf.continuous_iteratedFDeriv (by exact WithTop.coe_le_coe.mpr le_top)).norm | |
| rw [β setIntegral_eq_integral_of_forall_compl_eq_zero (s := S) (fun z hz => ?_)] | |
| Β· calc | |
| _ β€ β« _ in S, max B 0 := by | |
| apply setIntegral_mono_on (hc.continuousOn.integrableOn_compact hS) | |
| (integrableOn_const hS.measure_lt_top.ne) hS.measurableSet | |
| intro z hz | |
| exact (hB (p,z) β¨hp,hzβ©).trans (le_max_left _ _) | |
| _ = _ := by simp [mul_comm, Measure.real_def] | |
| Β· exact norm_eq_zero.mpr (Function.notMem_support.mp fun h => hz | |
| (hsupp p hp (support_iteratedFDeriv_subset j h))) | |
| choose B hB hbound using hb | |
| let M := β j β Finset.range (n+1), B j | |
| have hM : 0 β€ M := Finset.sum_nonneg fun j _ => hB j | |
| refine β¨2 ^ n * (1 + 2 ^ n * (n+1)) * M, by positivity, ?_β© | |
| intro p hp x | |
| apply weighted_fourier_bound (hF.comp (contDiff_const.prodMk contDiff_id)) | |
| (hS.of_isClosed_subset isClosed_closure (hsupp p hp)) n hM _ x | |
| intro j hj | |
| exact (hbound j p hp).trans (Finset.single_le_sum (fun i _ => hB i) | |
| (Finset.mem_range.mpr (Nat.lt_succ_of_le hj))) | |
| end DiagonalExtension.UniformFourierDecay | |
| open MeasureTheory Set Filter Metric | |
| open scoped ContDiff Topology | |
| namespace DiagonalExtension.SmoothCompactIntegral | |
| universe u | |
| variable {P A B : Type u} | |
| [NormedAddCommGroup P] [NormedSpace β P] | |
| [NormedAddCommGroup A] [NormedSpace β A] | |
| [NormedAddCommGroup B] [NormedSpace β B] | |
| def paramDeriv (F : P Γ A β B) (q : P Γ A) : P βL[β] B := | |
| (fderiv β F q).comp (ContinuousLinearMap.inl β P A) | |
| lemma smooth_partial {F : P Γ A β B} (hF : ContDiff β β F) : | |
| ContDiff β β (paramDeriv F) := | |
| (hF.fderiv_right (by simp)).clm_comp contDiff_const | |
| lemma partial_hasFDerivAt {F : P Γ A β B} (hF : ContDiff β β F) (p : P) (a : A) : | |
| HasFDerivAt (fun q => F (q,a)) (paramDeriv F (p,a)) p := by | |
| convert ((hF.differentiable (by simp)) (p,a)).hasFDerivAt.comp p | |
| ((hasFDerivAt_id (π := β) p).prodMk (hasFDerivAt_const (π := β) a p)) using 1 <;> rfl | |
| variable [FiniteDimensional β P] [FiniteDimensional β A] | |
| [MeasurableSpace A] [BorelSpace A] | |
| variable {ΞΌ : Measure A} [IsFiniteMeasureOnCompacts ΞΌ] | |
| lemma hasFDerivAt_integral {K : Set A} (hK : IsCompact K) {F : P Γ A β B} | |
| (hF : ContDiff β β F) (p : P) : | |
| HasFDerivAt (fun q => β« a in K, F (q,a) βΞΌ) | |
| (β« a in K, paramDeriv F (p,a) βΞΌ) p := by | |
| have : IsFiniteMeasure (ΞΌ.restrict K) := β¨by simpa using (hK.measure_lt_top (ΞΌ := ΞΌ))β© | |
| obtain β¨C,hCβ© := ((isCompact_closedBall p 1).prod hK).exists_bound_of_continuousOn | |
| (smooth_partial hF).continuous.continuousOn | |
| refine hasFDerivAt_integral_of_dominated_of_fderiv_le | |
| (s := closedBall p 1) (F' := fun q a => paramDeriv F (q,a)) (bound := fun _ => C) | |
| (closedBall_mem_nhds p (by norm_num)) ?_ ?_ ?_ ?_ (integrable_const C) ?_ | |
| Β· exact Filter.Eventually.of_forall fun q => | |
| (hF.continuous.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable | |
| Β· exact (hF.continuous.comp (continuous_const.prodMk continuous_id)).continuousOn.integrableOn_compact hK | |
| Β· exact ((smooth_partial hF).continuous.comp | |
| (continuous_const.prodMk continuous_id)).aestronglyMeasurable | |
| Β· filter_upwards [ae_restrict_mem hK.measurableSet] with a ha | |
| intro q hq | |
| exact hC (q,a) β¨hq,haβ© | |
| Β· exact Filter.Eventually.of_forall fun a q _ => partial_hasFDerivAt hF q a | |
| private lemma smooth_integral_nat (n : β) {K : Set A} (hK : IsCompact K) | |
| {F : P Γ A β B} (hF : ContDiff β β F) : | |
| ContDiff β n (fun q => β« a in K, F (q,a) βΞΌ) := by | |
| induction n generalizing B with | |
| | zero => | |
| exact contDiff_zero.mpr (Differentiable.continuous | |
| (fun p => (hasFDerivAt_integral hK hF p).differentiableAt)) | |
| | succ n ih => | |
| rw [Nat.cast_add, Nat.cast_one, contDiff_succ_iff_fderiv] | |
| refine β¨fun p => (hasFDerivAt_integral hK hF p).differentiableAt, by simp, ?_β© | |
| have heq : fderiv β (fun q => β« a in K, F (q,a) βΞΌ) = | |
| (fun q => β« a in K, paramDeriv F (q,a) βΞΌ) := | |
| funext fun p => (hasFDerivAt_integral hK hF p).fderiv | |
| rw [heq] | |
| exact ih (smooth_partial hF) | |
| theorem contDiff_integral {K : Set A} (hK : IsCompact K) {F : P Γ A β B} | |
| (hF : ContDiff β β F) : ContDiff β β (fun q => β« a in K, F (q,a) βΞΌ) := | |
| contDiff_infty.mpr fun n => smooth_integral_nat n hK hF | |
| end DiagonalExtension.SmoothCompactIntegral | |
| namespace DiagonalExtension.PacketTaylor | |
| open MeasureTheory Set | |
| open scoped ContDiff FourierTransform InnerProductSpace | |
| variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| [FiniteDimensional β E] | |
| def remainder (Ο : E β β) (q : (E Γ β) Γ E) : β := | |
| β« s in Set.Icc (0:β) 1, (1-s) * | |
| (fderiv β (fderiv β Ο) (q.1.1 + (s*q.1.2) β’ q.2) q.2) q.2 | |
| lemma smooth_remainder {Ο : E β β} (hΟ : ContDiff β β Ο) : | |
| ContDiff β β (remainder Ο) := by | |
| unfold remainder | |
| apply SmoothCompactIntegral.contDiff_integral (ΞΌ := (volume : Measure β)) | |
| (F := fun q : ((E Γ β) Γ E) Γ β => (1-q.2) * | |
| (fderiv β (fderiv β Ο) (q.1.1.1 + (q.2*q.1.1.2) β’ q.1.2) q.1.2) q.1.2) | |
| isCompact_Icc | |
| have hH : ContDiff β β (fderiv β (fderiv β Ο)) := | |
| (hΟ.fderiv_right (m := β) (by simp)).fderiv_right (by simp) | |
| have hloc : ContDiff β β (fun q : ((E Γ β) Γ E) Γ β => | |
| q.1.1.1 + (q.2*q.1.1.2) β’ q.1.2) := by fun_prop | |
| exact (contDiff_const.sub contDiff_snd).mul | |
| (((hH.comp hloc).clm_apply (contDiff_snd.comp contDiff_fst)).clm_apply | |
| (contDiff_snd.comp contDiff_fst)) | |
| omit [FiniteDimensional β E] in | |
| lemma taylor_identity {Ο : E β β} (hΟ : ContDiff β β Ο) | |
| (Ξ½ z : E) (Ξ΄ : β) : | |
| Ο (Ξ½ + Ξ΄ β’ z) = Ο Ξ½ + Ξ΄ * (fderiv β Ο Ξ½ z) + Ξ΄^2 * remainder Ο ((Ξ½,Ξ΄),z) := by | |
| have ht := map_add_eq_sum_add_integral_iteratedFDeriv (f := Ο) (x := Ξ½) (y := Ξ΄ β’ z) | |
| (n := 1) (fun _ _ => (hΟ.of_le (by exact WithTop.coe_le_coe.mpr le_top)).contDiffAt) | |
| simp only [Nat.reduceAdd, Finset.sum_range_succ, Finset.sum_range_zero, zero_add, | |
| Nat.factorial_zero, Nat.factorial_one, Nat.cast_one, inv_one, one_smul, | |
| iteratedFDeriv_zero_apply, iteratedFDeriv_one_apply, pow_one, | |
| iteratedFDeriv_two_apply] at ht | |
| rw [intervalIntegral.integral_of_le (by norm_num : (0:β) β€ 1), | |
| β integral_Icc_eq_integral_Ioc] at ht | |
| simp only [smul_smul, map_smul, smul_apply, smul_eq_mul] at ht | |
| rw [ht, remainder, β integral_const_mul] | |
| congr 1 | |
| apply setIntegral_congr_fun measurableSet_Icc | |
| intro s hs | |
| ring | |
| abbrev Param (E : Type) := (E Γ β) Γ (β Γ (E Γ β)) | |
| def amplitude (Ο Ο : E β β) (q : Param E Γ E) : β := | |
| (Ο q.2 : β) * (Ο (q.1.2.2.1 + q.1.2.2.2 β’ q.2) : β) * | |
| Complex.exp ((2 * Real.pi * (q.1.2.1 * remainder Ο (q.1.1,q.2)) : β) * Complex.I) | |
| lemma smooth_amplitude {Ο Ο : E β β} (hΟ : ContDiff β β Ο) (hΟ : ContDiff β β Ο) : | |
| ContDiff β β (amplitude Ο Ο) := by | |
| have hr : ContDiff β β (fun q : Param E Γ E => remainder Ο (q.1.1,q.2)) := | |
| (smooth_remainder hΟ).comp (by fun_prop) | |
| have h1 : ContDiff β β (fun q : Param E Γ E => (Ο q.2 : β)) := | |
| Complex.ofRealCLM.contDiff.comp (hΟ.comp contDiff_snd) | |
| have h2 : ContDiff β β (fun q : Param E Γ E => (Ο (q.1.2.2.1 + q.1.2.2.2 β’ q.2) : β)) := | |
| Complex.ofRealCLM.contDiff.comp (hΟ.comp (by fun_prop)) | |
| have ht : ContDiff β β (fun q : Param E Γ E => q.1.2.1) := by fun_prop | |
| have h3 : ContDiff β β (fun q : Param E Γ E => ((2 * Real.pi * (q.1.2.1 * remainder Ο (q.1.1,q.2)) : β) : β)) := | |
| Complex.ofRealCLM.contDiff.comp (contDiff_const.mul (ht.mul hr)) | |
| exact (h1.mul h2).mul (((Complex.contDiff_exp : ContDiff β β Complex.exp).restrict_scalars β).comp (h3.mul contDiff_const)) | |
| variable [MeasurableSpace E] [BorelSpace E] | |
| theorem normalized_locality {Ο Ο : E β β} (hΟ : ContDiff β β Ο) | |
| (hΟ : ContDiff β β Ο) (hΟc : HasCompactSupport Ο) (R A : β) (L : β) : | |
| β C : β, 0 β€ C β§ β Ξ½ Ξ΄ Ο a Ο, | |
| βΞ½β β€ R β Ξ΄ β Icc (0:β) 1 β Ο β Icc (0:β) 1 β | |
| βaβ β€ A β Ο β Icc (0:β) 1 β β x : E, | |
| (1 + βxβ)^L * βπ (fun z => amplitude Ο Ο (((Ξ½,Ξ΄),(Ο,(a,Ο))),z)) xβ β€ C := by | |
| let K : Set (Param E) := (Metric.closedBall 0 R ΓΛ’ Icc 0 1) ΓΛ’ | |
| (Icc 0 1 ΓΛ’ (Metric.closedBall 0 A ΓΛ’ Icc 0 1)) | |
| have hK : IsCompact K := ((isCompact_closedBall 0 R).prod isCompact_Icc).prod | |
| (isCompact_Icc.prod ((isCompact_closedBall 0 A).prod isCompact_Icc)) | |
| have hsupp : β p β K, tsupport (fun z => amplitude Ο Ο (p,z)) β tsupport Ο := by | |
| intro p hp | |
| apply closure_mono | |
| intro z hz | |
| simp only [Function.mem_support] at * | |
| intro h | |
| apply hz | |
| simp [amplitude,h] | |
| obtain β¨C,hC,hβ© := UniformFourierDecay.compact_uniform_decay (smooth_amplitude hΟ hΟ) | |
| hK hΟc hsupp L | |
| refine β¨C,hC,?_β© | |
| intro Ξ½ Ξ΄ Ο a Ο hΞ½ hΞ΄ hΟ ha hΟ x | |
| apply h ((Ξ½,Ξ΄),(Ο,(a,Ο))) _ x | |
| exact β¨β¨by simpa using hΞ½,hΞ΄β©,hΟ,by simpa using ha,hΟβ© | |
| end DiagonalExtension.PacketTaylor | |
| end | |
| end OAI | |