File size: 5,639 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import OAI.Probability.FreeIsing.Energy.ArtanhResponseCoefficients
import OAI.Probability.FreeIsing.Ising.CanonicalPosteriorStops
import OAI.Probability.FreeIsing.Ising.ContinuousRootResponse

namespace OAI

noncomputable section
open MeasureTheory
open scoped NNReal

namespace Problem367.IsingObservationFactor
open IsingObservationInnovation IsingCopyEnergy ArtanhMartingaleFormula

variable {d : β„•} {beta : ℝ}

theorem continuousPosterior_variance_pos (v : TreeVertex d)
    (t : ℝβ‰₯0) (x : Paths d) :
    0 < 1 - continuousPosterior beta v t x ^ 2 :=
  sub_pos.mpr (Real.tanh_sq_lt_one _)

theorem firstWeight_mul_continuousRootCovariance
    (hb : 0 ≀ beta) (v : TreeVertex d) (t : ℝβ‰₯0) (x : Paths d) :
    firstWeight (continuousPosterior beta (ConnectedHull.root d) t x) *
      continuousRootCovariance hb v t x = continuousRootResponse hb v t x := by
  change (1 / (1 - continuousPosterior beta (ConnectedHull.root d) t x ^ 2)) *
    ((1 - continuousPosterior beta (ConnectedHull.root d) t x ^ 2) *
      continuousRootResponse hb v t x) = _
  rw [one_div, ← mul_assoc,
    inv_mul_cancelβ‚€ (continuousPosterior_variance_pos (ConnectedHull.root d) t x).ne', one_mul]

theorem continuousRootCovariance_div_variance
    (hb : 0 ≀ beta) (v : TreeVertex d) (t : ℝβ‰₯0) (x : Paths d) :
    continuousRootCovariance hb v t x /
      (1 - continuousPosterior beta (ConnectedHull.root d) t x ^ 2) =
        continuousRootResponse hb v t x := by
  rw [← ArtanhResponseCoefficients.firstWeight_mul]
  exact firstWeight_mul_continuousRootCovariance hb v t x

theorem continuousRootCovariance_square_tsum
    (hb : 0 ≀ beta) (t : ℝβ‰₯0) (x : Paths d) :
    (βˆ‘' v, continuousRootCovariance hb v t x ^ 2) =
      (1 - continuousPosterior beta (ConnectedHull.root d) t x ^ 2) ^ 2 *
        (βˆ‘' v, continuousRootResponse hb v t x ^ 2) := by
  simp only [continuousRootCovariance, continuousPosterior, mul_pow, tsum_mul_left]

theorem secondWeight_mul_continuousRootCovariance_square_tsum
    (hb : 0 ≀ beta) (t : ℝβ‰₯0) (x : Paths d) :
    secondWeight (continuousPosterior beta (ConnectedHull.root d) t x) *
      (βˆ‘' v, continuousRootCovariance hb v t x ^ 2) =
        continuousPosterior beta (ConnectedHull.root d) t x *
          (βˆ‘' v, continuousRootResponse hb v t x ^ 2) := by
  rw [ArtanhResponseCoefficients.secondWeight_mul_tsum_sq]
  simp_rw [continuousRootCovariance_div_variance]

theorem continuousRootCovariance_square_tsum_le_response
    (hb : 0 ≀ beta) (t : ℝβ‰₯0) (x : Paths d) :
    (βˆ‘' v, continuousRootCovariance hb v t x ^ 2) ≀
      βˆ‘' v, continuousRootResponse hb v t x ^ 2 := by
  rw [continuousRootCovariance_square_tsum]
  have h0 := (continuousPosterior_variance_pos (beta := beta) (ConnectedHull.root d) t x).le
  have h1 : 1 - continuousPosterior beta (ConnectedHull.root d) t x ^ 2 ≀ 1 :=
    sub_le_self _ (sq_nonneg _)
  exact mul_le_of_le_one_left (tsum_nonneg (fun _ => sq_nonneg _))
    (pow_le_oneβ‚€ h0 h1)

theorem abs_continuousPosterior_mul_response_square_tsum_le
    (hb : 0 ≀ beta) (t : ℝβ‰₯0) (x : Paths d) :
    |continuousPosterior beta (ConnectedHull.root d) t x *
      (βˆ‘' v, continuousRootResponse hb v t x ^ 2)| ≀
        βˆ‘' v, continuousRootResponse hb v t x ^ 2 := by
  rw [abs_mul, abs_of_nonneg (show 0 ≀ βˆ‘' v, continuousRootResponse hb v t x ^ 2
    from tsum_nonneg (fun _ => sq_nonneg _))]
  exact mul_le_of_le_one_left (tsum_nonneg (fun _ => sq_nonneg _))
    (abs_lt.mpr (continuousPosterior_interior beta (ConnectedHull.root d) t x)).le

theorem firstWeight_mul_stopped_continuousRootCovariance
    (hb : 0 ≀ beta) (v : TreeVertex d) (Ο„ : Paths d β†’ WithTop ℝβ‰₯0)
    (t : ℝβ‰₯0) (x : Paths d) :
    firstWeight (stoppedProcess (continuousPosterior beta (ConnectedHull.root d)) Ο„ t x) *
      stoppedProcess (continuousRootCovariance hb v) Ο„ t x =
        stoppedProcess (continuousRootResponse hb v) Ο„ t x :=
  firstWeight_mul_continuousRootCovariance hb v _ x

theorem firstWeight_stopped_mul_continuousRootCovariance_of_le
    (hb : 0 ≀ beta) (v : TreeVertex d) (Ο„ : Paths d β†’ WithTop ℝβ‰₯0)
    (t : ℝβ‰₯0) (x : Paths d) (ht : (t : WithTop ℝβ‰₯0) ≀ Ο„ x) :
    firstWeight (stoppedProcess (continuousPosterior beta (ConnectedHull.root d)) Ο„ t x) *
      continuousRootCovariance hb v t x = continuousRootResponse hb v t x := by
  rw [stoppedProcess_eq_of_le ht]
  exact firstWeight_mul_continuousRootCovariance hb v t x

theorem firstWeight_stopped_pullback_mul_continuousRootCovariance_of_le
    {Ξ© : Type*} (hb : 0 ≀ beta) (v : TreeVertex d) (Ο† : Ξ© β†’ Paths d)
    (Ο„ : Ξ© β†’ WithTop ℝβ‰₯0) (t : ℝβ‰₯0) (Ο‰ : Ξ©)
    (ht : (t : WithTop ℝβ‰₯0) ≀ Ο„ Ο‰) :
    firstWeight (stoppedProcess
      (fun s Ο‰ => continuousPosterior beta (ConnectedHull.root d) s (Ο† Ο‰)) Ο„ t Ο‰) *
      continuousRootCovariance hb v t (Ο† Ο‰) = continuousRootResponse hb v t (Ο† Ο‰) := by
  rw [stoppedProcess_eq_of_le ht]
  exact firstWeight_mul_continuousRootCovariance hb v t (Ο† Ο‰)

theorem firstWeight_stopped_copy_mul_continuousRootCovariance_of_le
    (hb : 0 ≀ beta) (v : TreeVertex d) (j : Bool)
    (Ο„ : Joint d β†’ WithTop ℝβ‰₯0) (t : ℝβ‰₯0) (q : Joint d)
    (ht : (t : WithTop ℝβ‰₯0) ≀ Ο„ q) :
    firstWeight (stoppedProcess
      (copyContinuousPosterior beta (ConnectedHull.root d) j) Ο„ t q) *
      continuousRootCovariance hb v t (projection j q) =
        continuousRootResponse hb v t (projection j q) :=
  firstWeight_stopped_pullback_mul_continuousRootCovariance_of_le hb v
    (projection j) Ο„ t q ht

end Problem367.IsingObservationFactor

end

end OAI