File size: 2,206 Bytes
135052a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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