File size: 2,206 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 | import Mathlib
import OAI.Probability.SKBarriers.Gaussian.BoundedPrimitive
import OAI.Probability.SKBarriers.Hierarchy.TimeChainRepresentation
namespace OAI
section
noncomputable section
open scoped NNReal Topology
open MeasureTheory ProbabilityTheory Filter Set
namespace SK.Analytic
def scalarTimeChainAverage (Ξ² : β) (l : List (β Γ ββ₯0)) (f g : β β β) (x : β) : β :=
scalarHierarchyAverage l.length (fun i => (l.get i).1)
(fun i => Ξ²*Real.sqrt ((l.get i).2:β)) f g x
theorem scalarCDFAverage_eq_chainAverage {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)
(Ξ² : β) {Ξ± : β β β} (hΞ± : β z, Ξ± zβIcc (0:β) 1) (hmono : Monotone Ξ±)
(l : List (β Γ ββ₯0)) (hm : β pβl, p.1βIcc (0:β) 1)
(s : β) (t : ββ₯0) (ht : tβ€1) (hdur : chainDuration l=t)
(hmodel : TimeChainModels Ξ± s l) (x : β) :
scalarCDFAverage Ξ² Ξ± s t f g x=scalarTimeChainAverage Ξ² l f g x := by
let G := boundedPrimitive g
have hc : Continuous g := continuous_iff_continuousAt.mpr (fun y => (hg y).continuousAt)
have hG : BoundedDerivs G := boundedPrimitive_regular hg hdg hB hC
have hGd : β y, HasDerivAt G (g y) y := boundedPrimitive_hasDerivAt hc
have hGB : LipschitzWith B G := boundedPrimitive_lipschitz hc hB
have he : (fun a => scalarCDFOperator Ξ² Ξ± s t (primitivePerturbation f G a) x)=
fun a => scalarTimeChain Ξ² l (primitivePerturbation f G a) x := by
funext a
exact scalarCDFOperator_eq_chain (primitivePerturbation_regular hf hG a)
(primitivePerturbation_lipschitz hfK hGB a) Ξ² hΞ± hmono l hm s t ht hdur hmodel x
rw [scalarCDFAverage_eq_terminalDerivative Ξ² Ξ± s t hf hG hGd]
have hd := (scalarCDFOperator_terminal_hasDerivAt Ξ² hΞ± hmono hf hG hGd hg hfK hGB hB hC s t ht x 0).deriv
rw [he] at hd
rw [β hd]
simp only [scalarTimeChain_eq_hierarchy]
rw [scalarHierarchy_primitive_derivative _ _ _ hf hG hGd,
primitivePerturbation_zero]
simp only [add_zero,scalarTimeChainAverage]
end SK.Analytic
end
end
end OAI
|