File size: 3,403 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | import Mathlib
import OAI.Probability.SKBarriers.Scalar.ScalarTiltedExpectation
namespace OAI
section
noncomputable section
open scoped Topology NNReal ContDiff
open MeasureTheory ProbabilityTheory Filter Set
namespace SK.Analytic
theorem boundedDerivs_of_derivatives {f g dg : β β β}
(hg : β x, HasDerivAt f (g x) x) (hdg : β x, HasDerivAt g (dg x) x)
(hcont : Continuous dg) {B C : ββ₯0}
(hB : β x, |g x| β€ B) (hC : β x, |dg x| β€ C) : BoundedDerivs f := by
have he : deriv f=g := funext (fun x => (hg x).deriv)
have he' : deriv g=dg := funext (fun x => (hdg x).deriv)
have hgc : ContDiff β 1 g := contDiff_one_iff_deriv.mpr
β¨fun x => (hdg x).differentiableAt,he' βΈ hcontβ©
have hfc : ContDiff β 2 f := by
rw [show (2:ββΟ)=1+1 by norm_num,contDiff_succ_iff_deriv]
exact β¨fun x => (hg x).differentiableAt,by norm_num,he βΈ hgcβ©
have hfe : fderiv β f=fun x => g x β’ (ContinuousLinearMap.id β β) := by
funext x
apply ContinuousLinearMap.ext
intro y
simp only [smul_apply,ContinuousLinearMap.id_apply,smul_eq_mul,
fderiv_eq_deriv_mul,he]
refine β¨hfc,B,C,B.coe_nonneg,C.coe_nonneg,?_,?_β©
Β· intro x
rw [β norm_deriv_eq_norm_fderiv,he,Real.norm_eq_abs]
exact hB x
Β· intro x
rw [hfe,β norm_deriv_eq_norm_fderiv,((hdg x).smul_const (ContinuousLinearMap.id β β)).deriv,
norm_smul,ContinuousLinearMap.norm_id,Real.norm_eq_abs,mul_one]
exact hC x
def boundedPrimitive (g : β β β) (x : β) : β := β« y in 0..x, g y
theorem boundedPrimitive_hasDerivAt {g : β β β} (hg : Continuous g) (x : β) :
HasDerivAt (boundedPrimitive g) (g x) x :=
intervalIntegral.integral_hasDerivAt_right (hg.intervalIntegrable 0 x)
hg.stronglyMeasurable.stronglyMeasurableAtFilter hg.continuousAt
theorem boundedPrimitive_regular {g dg : β β β}
(hg : β x, HasDerivAt g (dg x) x) (hdg : Continuous dg)
{B C : ββ₯0} (hB : β x, |g x| β€ B) (hC : β x, |dg x| β€ C) :
BoundedDerivs (boundedPrimitive g) :=
boundedDerivs_of_derivatives
(boundedPrimitive_hasDerivAt (continuous_iff_continuousAt.mpr (fun x => (hg x).continuousAt))) hg hdg hB hC
theorem boundedPrimitive_lipschitz {g : β β β} (hg : Continuous g) {B : ββ₯0}
(hB : β x, |g x| β€ B) : LipschitzWith B (boundedPrimitive g) := by
apply lipschitzWith_of_nnnorm_deriv_le (fun x => (boundedPrimitive_hasDerivAt hg x).differentiableAt)
intro x
rw [(boundedPrimitive_hasDerivAt hg x).deriv]
exact_mod_cast hB x
theorem dyadicScalarAverage_tendsto_C1 (Ξ² : β) {Ξ± : β β β}
(hΞ± : β z, Ξ± z β Icc (0:β) 1) (hmono : Monotone Ξ±)
{f g dg : β β β} (hf : BoundedDerivs f)
(hg : β y, HasDerivAt g (dg y) y) (hdg : Continuous dg)
{K B C : ββ₯0} (hfK : LipschitzWith K f)
(hB : β y, |g y| β€ B) (hC : β y, |dg y| β€ C)
(s : β) (t : ββ₯0) (ht : t β€ 1) (x : β) :
Tendsto (fun n => dyadicScalarAverage Ξ² Ξ± n s t f g x) atTop
(π (scalarCDFAverage Ξ² Ξ± s t f g x)) := by
have hc : Continuous g := continuous_iff_continuousAt.mpr (fun y => (hg y).continuousAt)
exact dyadicScalarAverage_tendsto Ξ² hΞ± hmono hf (boundedPrimitive_regular hg hdg hB hC)
(boundedPrimitive_hasDerivAt hc) hg hfK (boundedPrimitive_lipschitz hc hB) hB hC s t ht x
end SK.Analytic
end
end
end OAI
|