Download data/lean/OAI/Analysis/FreeGroupFactor/Taylor.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.39 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeGroupFactor/Taylor.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/FreeGroupFactor/Taylor.lean
-
curl -L -o Taylor.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/FreeGroupFactor/Taylor.lean
6.39 kB
| import OAI.Analysis.FreeGroupFactor.UnitaryEvaluation | |
| namespace OAI | |
| noncomputable section | |
| universe uA uΞΉ | |
| open Set Metric Filter | |
| open scoped NNReal Topology BigOperators ContDiff | |
| open scoped Topology ContDiff | |
| open Set Filter | |
| namespace FreeGroupFactorMain | |
| theorem flat_local_of_factorial_bound (f : β β β) (hf : ContDiff β β f) | |
| (B c : β) (_hB : 0 β€ B) (hc : 0 < c) | |
| (hbound : β r t, |iteratedDeriv r f t| β€ B * c ^ r * (r.factorial : β)) | |
| (a : β) (ha : β r, iteratedDeriv (r + 1) f a = 0) | |
| (x : β) (hx : c * |x - a| < 1) : f x = f a := by | |
| by_cases hax : a = x | |
| Β· simp [hax] | |
| have htaylor (n : β) : taylorWithinEval f n (uIcc a x) a x = f a := by | |
| induction n with | |
| | zero => simp | |
| | succ n ih => | |
| rw [taylorWithinEval_succ, ih, | |
| iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_uIcc hax) | |
| ((hf.of_le (by exact_mod_cast (le_top : ((n + 1 : β) : ββ) β€ β€))).contDiffAt) | |
| (left_mem_uIcc), ha n] | |
| simp | |
| have hest (n : β) : |f x - f a| β€ B * (c * |x - a|) ^ (n + 1) := by | |
| obtain β¨y, _, hyβ© := taylor_mean_remainder_lagrange_iteratedDeriv hax | |
| ((hf.of_le (by exact_mod_cast (le_top : ((n + 1 : β) : ββ) β€ β€))).contDiffOn) | |
| rw [htaylor] at hy | |
| have hfpos : (0 : β) < ((n + 1).factorial : β) := by positivity | |
| calc | |
| |f x - f a| = |iteratedDeriv (n + 1) f y| * |x - a| ^ (n + 1) / | |
| ((n + 1).factorial : β) := by rw [hy, abs_div, abs_mul, abs_pow, abs_of_pos hfpos] | |
| _ β€ (B * c ^ (n + 1) * ((n + 1).factorial : β)) * |x - a| ^ (n + 1) / | |
| ((n + 1).factorial : β) := by gcongr; exact hbound _ _ | |
| _ = B * (c * |x - a|) ^ (n + 1) := by rw [mul_pow]; field_simp | |
| have hlim : Tendsto (fun n : β => B * (c * |x - a|) ^ (n + 1)) atTop (nhds 0) := by | |
| have hp := (tendsto_pow_atTop_nhds_zero_of_lt_one (mul_nonneg hc.le (abs_nonneg _)) hx) | |
| simpa using (hp.comp (tendsto_add_atTop_nat 1)).const_mul B | |
| have hz : |f x - f a| β€ 0 := ge_of_tendsto hlim (Eventually.of_forall hest) | |
| exact sub_eq_zero.mp (abs_nonpos_iff.mp hz) | |
| theorem flat_global_of_factorial_bound (f : β β β) (hf : ContDiff β β f) | |
| (B c : β) (hB : 0 β€ B) (hc : 0 < c) | |
| (hbound : β r t, |iteratedDeriv r f t| β€ B * c ^ r * (r.factorial : β)) | |
| (ha : β r, iteratedDeriv (r + 1) f 0 = 0) (x : β) : f x = f 0 := by | |
| let Z : Set β := {a | β r, iteratedDeriv (r + 1) f a = 0} | |
| have hclosed : IsClosed Z := by | |
| change IsClosed {a | β r, iteratedDeriv (r + 1) f a = 0} | |
| simp only [ofPred_forall] | |
| apply isClosed_iInter | |
| intro r | |
| exact isClosed_eq (hf.continuous_iteratedDeriv (r + 1) (by exact_mod_cast (le_top : ((r + 1 : β) : ββ) β€ β€))) continuous_const | |
| have hopen : IsOpen Z := by | |
| apply isOpen_iff_mem_nhds.mpr | |
| intro a ha | |
| have hΞ΄ : 0 < cβ»ΒΉ := inv_pos.mpr hc | |
| apply Filter.mem_of_superset (Metric.ball_mem_nhds a hΞ΄) | |
| intro y hy | |
| have heq : f =αΆ [nhds y] (fun _ => f a) := by | |
| filter_upwards [Metric.isOpen_ball.mem_nhds hy] with z hz | |
| apply flat_local_of_factorial_bound f hf B c hB hc hbound a ha z | |
| rw [Metric.mem_ball, Real.dist_eq] at hz | |
| have := mul_lt_mul_of_pos_left hz hc | |
| simpa [ne_of_gt hc] using this | |
| intro r | |
| rw [heq.iteratedDeriv_eq (r + 1)] | |
| simp [iteratedDeriv_const] | |
| have hall : Z = univ := (show IsClopen Z from β¨hclosed, hopenβ©).eq_univ β¨0, haβ© | |
| have hderiv (a : β) : deriv f a = 0 := by | |
| have hz : a β Z := hall βΈ mem_univ a | |
| simpa using hz 0 | |
| exact isOpen_univ.is_const_of_deriv_eq_zero isPreconnected_univ | |
| (fun a _ => ((hf.of_le (by simp : (1 : ββΟ) β€ β)).differentiable (by simp)).differentiableOn a (mem_univ a)) | |
| (fun a _ => hderiv a) (mem_univ x) (mem_univ 0) | |
| namespace NCPolynomial | |
| theorem iteratedDeriv_moment {ΞΉ : Type uΞΉ} {A : Type uA} [NormedRing A] [NormedAlgebra β A] | |
| (X : β β ΞΉ β A) (V : ΞΉ β Expr ΞΉ) (L : A βL[β] β) | |
| (hX : β t i, HasDerivAt (fun s => X s i) (eval (X t) (V i)) t) | |
| (p : Expr ΞΉ) (r : β) : | |
| iteratedDeriv r (fun t => L (eval (X t) p)) = | |
| fun t => L (eval (X t) ((delta V)^[r] p)) := by | |
| induction r with | |
| | zero => rfl | |
| | succ r ih => | |
| rw [iteratedDeriv_succ, ih] | |
| funext t | |
| rw [Function.iterate_succ_apply'] | |
| convert! (L.hasFDerivAt.comp_hasDerivAt t (hasDerivAt_eval X V t (hX t) ((delta V)^[r] p))).deriv using 1 | |
| theorem polynomial_moments {ΞΉ : Type uΞΉ} {A : Type uA} [NormedRing A] [NormedAlgebra β A] | |
| [NormOneClass A] (X : β β ΞΉ β A) (V : ΞΉ β Expr ΞΉ) (L : A βL[β] β) | |
| (hsmooth : β i, ContDiff β β (fun t => X t i)) | |
| (hX : β t i, HasDerivAt (fun s => X s i) (eval (X t) (V i)) t) | |
| (R : β) (hR : 1 β€ R) (hbounded : β t i, βX t iβ β€ R) | |
| (J : β) (B : β) (hB : 0 β€ B) | |
| (hdeg : β i, degree (V i) β€ J + 1) (hmass : β i, mass (V i) β€ B) | |
| (htrace : β p, L (eval (X 0) (delta V p)) = 0) | |
| (p : Expr ΞΉ) (t : β) : L (eval (X t) p) = L (eval (X 0) p) := by | |
| let b := βLβ * (mass p * R ^ degree p) | |
| let c := B * ((degree p : β) + J) * R ^ J + 1 | |
| have hR0 : 0 β€ R := le_trans zero_le_one hR | |
| have hbase : 0 β€ B * ((degree p : β) + J) * R ^ J := by positivity | |
| have hb : 0 β€ b := mul_nonneg (norm_nonneg _) (mul_nonneg (mass_nonneg _) (pow_nonneg hR0 _)) | |
| have hc : 0 < c := by dsimp [c]; linarith | |
| apply flat_global_of_factorial_bound (fun t => L (eval (X t) p)) (L.contDiff.comp (smooth_eval X hsmooth p)) b c hb hc | |
| Β· intro r u | |
| rw [iteratedDeriv_moment X V L hX] | |
| calc | |
| |L (eval (X u) ((delta V)^[r] p))| β€ βLβ * βeval (X u) ((delta V)^[r] p)β := | |
| L.le_opNorm _ | |
| _ β€ βLβ * ((mass p * R ^ degree p) * | |
| (B * ((degree p : β) + J) * R ^ J) ^ r * (r.factorial : β)) := by | |
| gcongr | |
| exact norm_eval_iterate (X u) R hR (hbounded u) V J B hB hdeg hmass p r | |
| _ β€ b * c ^ r * (r.factorial : β) := by | |
| dsimp [b] | |
| calc | |
| _ = (βLβ * (mass p * R ^ degree p)) * | |
| (B * ((degree p : β) + J) * R ^ J) ^ r * (r.factorial : β) := by ring | |
| _ β€ _ := by | |
| gcongr | |
| dsimp [c]; linarith | |
| Β· intro r | |
| rw [iteratedDeriv_moment X V L hX, Function.iterate_succ_apply'] | |
| exact htrace _ | |
| end NCPolynomial | |
| end FreeGroupFactorMain | |
| end | |
| end OAI | |