File size: 3,174 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import Mathlib
import OAI.Probability.SKBarriers.Locking.NarrowRetainedFactor

namespace OAI

section

noncomputable section
open scoped BigOperators
open MeasureTheory ProbabilityTheory Set
namespace SK.Analytic
section Scale
variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E]

theorem vectorIncrementChain_div_scale (l : List (ℝ × E)) (c : ℝ) (hc : c≠0) (f : E → ℝ) :
    vectorIncrementChain (l.map (fun p => (p.1/c,p.2))) (fun x => c*f x)=
      fun x => c*vectorIncrementChain l f x := by
  induction l with
  | nil => rfl
  | cons p l ih =>
    simp only [List.map_cons,vectorIncrementChain,ih,vectorStep_div_scale p.1 c hc]

theorem vectorIncrementAverage_div_scale (l : List (ℝ × E)) (c : ℝ) (hc : c≠0) (f g : E → ℝ) :
    vectorIncrementAverage (l.map (fun p => (p.1/c,p.2))) (fun x => c*f x) g=
      vectorIncrementAverage l f g := by
  induction l with
  | nil => rfl
  | cons p l ih =>
    simp only [List.map_cons,vectorIncrementAverage,ih,vectorIncrementChain_div_scale l c hc,
      vectorStepAverage_div_scale p.1 c hc]
end Scale

def narrowCommonEmbedding : (ℝ × ℝ) →L[ℝ] NarrowRetainedState :=
  ((ContinuousLinearMap.fst ℝ ℝ ℝ).prod 0).prod (ContinuousLinearMap.id ℝ (ℝ × ℝ))

@[simp] theorem narrowCommonEmbedding_apply (p : ℝ × ℝ) : narrowCommonEmbedding p=((p.1,0),p) := rfl

theorem narrowCommonBase_comp (f : ℝ → ℝ) :
    (fun p : NarrowRetainedState => f p.1.1+2*f p.2.1) ∘ narrowCommonEmbedding=
      fun p => 3*f p.1 := by
  funext p
  simp only [Function.comp_def,narrowCommonEmbedding_apply]
  ring

theorem narrowCommon_image (c : List (ℝ × (ℝ × ℝ))) :
    (c.map (fun p => (p.1/3,p.2))).map (fun p => (p.1,narrowCommonEmbedding p.2))=narrowRetainedCommon c := by
  simp only [List.map_map,narrowRetainedCommon,Function.comp_def,narrowCommonEmbedding_apply,Prod.mk.eta]

theorem narrowRetainedCommon_value (c : List (ℝ × (ℝ × ℝ))) (f : ℝ → ℝ) (p : ℝ × ℝ) :
    vectorIncrementChain (narrowRetainedCommon c) (fun p : NarrowRetainedState => f p.1.1+2*f p.2.1)
      (narrowCommonEmbedding p)=3*scalarIncrementChain (weightedUnderlying c) f p.1 := by
  have H := congrFun (vectorIncrementChain_pullback narrowCommonEmbedding
    (c.map (fun p => (p.1/3,p.2))) (fun p : NarrowRetainedState => f p.1.1+2*f p.2.1)) p
  rw [narrowCommonBase_comp,narrowCommon_image,vectorIncrementChain_div_scale c 3 (by norm_num),weightedBranch_value] at H
  exact H.symm

theorem narrowRetainedCommon_average (c : List (ℝ × (ℝ × ℝ))) (f : ℝ → ℝ)
    (g : NarrowRetainedState → ℝ) (p : ℝ × ℝ) :
    vectorIncrementAverage (narrowRetainedCommon c) (fun p : NarrowRetainedState => f p.1.1+2*f p.2.1) g
      (narrowCommonEmbedding p)=vectorIncrementAverage c (fun p : ℝ × ℝ => f p.1) (g ∘ narrowCommonEmbedding) p := by
  have H := congrFun (vectorIncrementAverage_pullback narrowCommonEmbedding
    (c.map (fun p => (p.1/3,p.2))) (fun p : NarrowRetainedState => f p.1.1+2*f p.2.1) g) p
  rw [narrowCommonBase_comp,narrowCommon_image,vectorIncrementAverage_div_scale c 3 (by norm_num)] at H
  exact H.symm

end SK.Analytic

end
end

end OAI