Download data/lean/OAI/Probability/LogConcave/Numerics/ParametricFDeriv.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LogConcave/Numerics/ParametricFDeriv.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LogConcave/Numerics/ParametricFDeriv.lean
-
curl -L -o ParametricFDeriv.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LogConcave/Numerics/ParametricFDeriv.lean
3.07 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| namespace LogConcaveSampling.CompactIntegral | |
| open Set Function Filter MeasureTheory Metric | |
| open scoped Topology | |
| variable {E F : Type} [NormedAddCommGroup E] [NormedSpace β E] | |
| [FiniteDimensional β E] [NormedAddCommGroup F] [NormedSpace β F] [CompleteSpace F] | |
| omit [CompleteSpace F] in | |
| lemma parametric_hasFDerivAt {f : E Γ β β F} (hf : ContDiff β 1 f) | |
| {s : Set β} (hs : IsCompact s) (x : E) : | |
| HasFDerivAt (fun x => β«t in s,f (x,t)) | |
| (β«t in s,(fderiv β f (x,t)).comp (ContinuousLinearMap.inl β E β)) x := by | |
| let D := fun p : E Γ β => (fderiv β f p).comp (ContinuousLinearMap.inl β E β) | |
| have hD : Continuous D := (hf.continuous_fderiv (by norm_num)).clm_comp continuous_const | |
| obtain β¨C,hCβ© := ((isCompact_closedBall x 1).prod hs).exists_bound_of_continuousOn hD.continuousOn | |
| apply hasFDerivAt_integral_of_dominated_of_fderiv_le | |
| (F':=fun y t => D (y,t)) (bound:=fun _ => C) (ball_mem_nhds x zero_lt_one) | |
| Β· exact Eventually.of_forall fun y => (hf.continuous.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable | |
| Β· exact (hf.continuous.comp (continuous_const.prodMk continuous_id)).continuousOn.integrableOn_compact hs | |
| Β· exact (hD.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable | |
| Β· filter_upwards [ae_restrict_mem hs.measurableSet] with t ht y hy | |
| exact hC (y,t) β¨ball_subset_closedBall hy,htβ© | |
| Β· exact integrableOn_const hs.measure_ne_top | |
| Β· filter_upwards [] with t y _hy | |
| exact ((hf.differentiable (by norm_num) (y,t)).hasFDerivAt).comp y | |
| ((hasFDerivAt_id (π:=β) y).prodMk (hasFDerivAt_const (π:=β) t y)) | |
| theorem contDiff_parametric {f : E Γ β β F} (n : β) | |
| (hf : ContDiff β (n:WithTop ββ) f) {s : Set β} (hs : IsCompact s) : | |
| ContDiff β (n:WithTop ββ) (fun x => β«t in s,f (x,t)) := by | |
| induction n generalizing F with | |
| | zero => exact contDiff_zero.mpr (continuous_parametric_integral_of_continuous (f:=fun x t => f (x,t)) hf.continuous hs) | |
| | succ n ih => | |
| let D := fun p : E Γ β => (fderiv β f p).comp (ContinuousLinearMap.inl β E β) | |
| have hD : ContDiff β (n:WithTop ββ) D := (hf.fderiv_right (by simp)).clm_comp contDiff_const | |
| have hd (x : E) := parametric_hasFDerivAt (hf.of_le (by exact_mod_cast Nat.succ_pos n)) hs x | |
| rw [show ((n+1:β):WithTop ββ)=(n:WithTop ββ)+1 by simp,contDiff_succ_iff_fderiv] | |
| refine β¨fun x => (hd x).differentiableAt,?_β© | |
| refine β¨by simp,?_β© | |
| have he : fderiv β (fun x => β«t in s,f (x,t))=fun x => β«t in s,D (x,t) := funext fun x => (hd x).fderiv | |
| rw [he] | |
| exact ih hD | |
| theorem smooth_parametric {f : E Γ β β F} (hf : ContDiff β (β€:ββ) f) | |
| {s : Set β} (hs : IsCompact s) : | |
| ContDiff β (β€:ββ) (fun x => β«t in s,f (x,t)) := by | |
| apply contDiff_infty.mpr | |
| intro n | |
| exact contDiff_parametric n (hf.of_le (WithTop.coe_le_coe.mpr le_top)) hs | |
| end LogConcaveSampling.CompactIntegral | |
| end | |
| end | |
| end | |
| end OAI | |