Download data/lean/OAI/Analysis/BiholderTransport/Calculus/FullSet.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/BiholderTransport/Calculus/FullSet.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/BiholderTransport/Calculus/FullSet.lean
-
curl -L -o FullSet.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/BiholderTransport/Calculus/FullSet.lean
5.6 kB
| import Mathlib | |
| import OAI.Analysis.BiholderTransport.Calculus.TaylorBound | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter Asymptotics | |
| open scoped Topology ContDiff | |
| namespace WeakMTWTransport | |
| variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedAddCommGroup F] [NormedSpace β F] | |
| [NormedAddCommGroup G] [NormedSpace β G] | |
| def HasSecondTaylor (f : E β β) (l : E βL[β] β) | |
| (B : E βL[β] E βL[β] β) : Prop := | |
| (fun h => f h-f 0-l h-B h h/2) =o[π 0] (fun h : E => βhβ^2) | |
| lemma HasSecondTaylor.eventually {f : E β β} {l : E βL[β] β} | |
| {B : E βL[β] E βL[β] β} (hf : HasSecondTaylor f l B) {Ξ΅ : β} (hΞ΅ : 0<Ξ΅) : | |
| βαΆ h in π (0:E), |f h-f 0-l h-B h h/2|β€Ξ΅*βhβ^2 := by | |
| simpa only [Real.norm_eq_abs,abs_pow,abs_norm] using hf.def hΞ΅ | |
| lemma hasSecondTaylor_of_contDiffAt {f : E β β} (hf : ContDiffAt β 2 f 0) : | |
| HasSecondTaylor f (fderiv β f 0) (fderiv β (fderiv β f) 0) := by | |
| apply Asymptotics.IsLittleO.of_bound | |
| intro Ξ΅ hΞ΅ | |
| have hn := hf.eventually (by norm_num) | |
| have hD := ((hf.fderiv_right (m := 1) (by norm_num)).fderiv_right | |
| (m := 0) (by norm_num)).continuousAt | |
| have he : βαΆ z : E in π 0, | |
| βfderiv β (fderiv β f) z-fderiv β (fderiv β f) 0β<Ξ΅ := by | |
| exact Metric.tendsto_nhds.mp hD Ξ΅ hΞ΅ |>.mono (fun _ h => by simpa only [dist_eq_norm] using h) | |
| obtain β¨r,hr,hballβ© := Metric.eventually_nhds_iff.mp (hn.and he) | |
| filter_upwards [Metric.ball_mem_nhds (0:E) hr] with h hh | |
| have H := second_order_remainder_bound_on_ball hr hΞ΅.le | |
| (fun z hz => (hball hz).1) (fun z hz => (hball hz).2.le) hh | |
| simpa only [Real.norm_eq_abs,abs_pow,abs_norm] using H | |
| lemma bilinear_isBigO_norm_mul {Ξ± : Type*} (L : Filter Ξ±) | |
| (B : E βL[β] F βL[β] G) (u : Ξ± β E) (v : Ξ± β F) : | |
| (fun x => B (u x) (v x)) =O[L] (fun x => βu xβ*βv xβ) := by | |
| apply Asymptotics.IsBigO.of_bound βBβ | |
| exact Filter.Eventually.of_forall (fun x => by | |
| simpa only [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (norm_nonneg _) (norm_nonneg _)), | |
| mul_assoc] using B.le_opNormβ (u x) (v x)) | |
| lemma bilinear_remainder_of_hasFDerivAt {a : E β F} {A : E βL[β] F} | |
| (ha : HasFDerivAt a A 0) (ha0 : a 0=0) (B : F βL[β] F βL[β] β) : | |
| (fun h => B (a h) (a h)-B (A h) (A h)) =o[π 0] (fun h : E => βhβ^2) := by | |
| have hR : (fun h => a h-A h) =o[π 0] (fun h : E => h) := by | |
| simpa only [zero_add,ha0,sub_zero] using hasFDerivAt_iff_isLittleO_nhds_zero.mp ha | |
| have hO : a =O[π 0] (fun h : E => h) := by | |
| simpa only [ha0,sub_zero] using ha.isBigO_sub | |
| have hA : (fun h : E => A h) =O[π 0] (fun h => h) := A.isBigO_id _ | |
| have h1 := (bilinear_isBigO_norm_mul (π (0:E)) B (fun h => a h-A h) a).trans_isLittleO | |
| (hR.norm_left.norm_right.mul_isBigO hO.norm_left.norm_right) | |
| have h2 := (bilinear_isBigO_norm_mul (π (0:E)) B (fun h => A h) (fun h => a h-A h)).trans_isLittleO | |
| (hA.norm_left.norm_right.mul_isLittleO hR.norm_left.norm_right) | |
| have he : (fun h => B (a h) (a h)-B (A h) (A h)) = | |
| (fun h => B (a h-A h) (a h)+B (A h) (a h-A h)) := by | |
| funext h | |
| simp only [map_sub,_root_.sub_apply] | |
| ring | |
| rw [he] | |
| simpa only [pow_two] using h1.add h2 | |
| lemma HasSecondTaylor.comp_stationary {f : F β β} | |
| {B : F βL[β] F βL[β] β} (hf : HasSecondTaylor f 0 B) | |
| {a : E β F} {A : E βL[β] F} (ha : HasFDerivAt a A 0) (ha0 : a 0=0) : | |
| HasSecondTaylor (fun h => f (a h)) 0 | |
| (((ContinuousLinearMap.compL β E F β).flip A).comp (B.comp A)) := by | |
| have hO : (fun h : E => βa hβ) =O[π 0] (fun h => βhβ) := by | |
| simpa only [ha0,sub_zero] using ha.isBigO_sub.norm_left.norm_right | |
| have ht : Tendsto a (π 0) (π 0) := ha0 βΈ ha.continuousAt | |
| have h1 := (hf.comp_tendsto ht).trans_isBigO (hO.pow 2) | |
| have h2 : (fun h => (B (a h) (a h)-B (A h) (A h))/2) =o[π 0] | |
| (fun h : E => βhβ^2) := by | |
| simpa only [div_eq_mul_inv,mul_comm] using | |
| (bilinear_remainder_of_hasFDerivAt ha ha0 B).const_mul_left (2:β)β»ΒΉ | |
| unfold HasSecondTaylor | |
| have he : (fun h => f (a h)-f (a 0)-(0 : E βL[β] β) h- | |
| (((ContinuousLinearMap.compL β E F β).flip A).comp (B.comp A)) h h/2) = | |
| (fun h => (f (a h)-f 0-(0 : F βL[β] β) (a h)-B (a h) (a h)/2)+ | |
| (B (a h) (a h)-B (A h) (A h))/2) := by | |
| funext h | |
| simp only [ha0,_root_.zero_apply,sub_zero,ContinuousLinearMap.comp_apply, | |
| ContinuousLinearMap.compL_apply,ContinuousLinearMap.flip_apply] | |
| ring | |
| rw [he] | |
| exact h1.add h2 | |
| lemma HasSecondTaylor.sub {f g : E β β} {l k : E βL[β] β} | |
| {B C : E βL[β] E βL[β] β} (hf : HasSecondTaylor f l B) | |
| (hg : HasSecondTaylor g k C) : HasSecondTaylor (fun h => f h-g h) (l-k) (B-C) := by | |
| unfold HasSecondTaylor at * | |
| have he : (fun h => (f h-g h)-(f 0-g 0)-(l-k) h-(B-C) h h/2) = | |
| (fun h => (f h-f 0-l h-B h h/2)-(g h-g 0-k h-C h h/2)) := by | |
| funext h | |
| simp only [_root_.sub_apply] | |
| ring | |
| rw [he] | |
| exact Asymptotics.IsLittleO.sub hf hg | |
| lemma HasSecondTaylor.add {f g : E β β} {l k : E βL[β] β} | |
| {B C : E βL[β] E βL[β] β} (hf : HasSecondTaylor f l B) | |
| (hg : HasSecondTaylor g k C) : HasSecondTaylor (fun h => f h+g h) (l+k) (B+C) := by | |
| unfold HasSecondTaylor at * | |
| have he : (fun h => (f h+g h)-(f 0+g 0)-(l+k) h-(B+C) h h/2) = | |
| (fun h => (f h-f 0-l h-B h h/2)+(g h-g 0-k h-C h h/2)) := by | |
| funext h | |
| simp only [_root_.add_apply] | |
| ring | |
| rw [he] | |
| exact Asymptotics.IsLittleO.add hf hg | |
| end WeakMTWTransport | |
| end | |
| end OAI | |