File size: 14,273 Bytes
f61e547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
import OAI.Probability.FreeIsing.Brownian.EntropyEnergy
import OAI.Probability.FreeIsing.Energy.NormalizedResponseEnergy
import OAI.Probability.FreeIsing.Energy.NormalizedResponseTime

namespace OAI

noncomputable section

open MeasureTheory ProbabilityTheory Filter Set
open scoped NNReal ENNReal Topology

namespace Problem367.NormalizedInfiniteTimeEnergy

open GaussianTreeResponse

variable {d : ℕ} {Ω : Type*} [MeasurableSpace Ω]

def observation (B : TreeVertex d → ℝ≥0 → Ω → ℝ) (t : ℝ)
    (p : (TreeVertex d → IsingSpin) × (TreeVertex d → Ω)) : TreeVertex d → ℝ :=
  fun i => t * spinSign (p.1 i) + B i t.toNNReal (p.2 i)

def finiteRow (beta : ℝ) (D : Finset (TreeVertex d)) (v : TreeVertex d)
    (B : TreeVertex d → ℝ≥0 → Ω → ℝ) (w : TreeVertex d)
    (q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω))) : ℝ :=
  observedRow beta D v q.1 w (q.2.1, fun i => B i q.1.toNNReal (q.2.2 i))

def infiniteRow (beta : ℝ) (v : TreeVertex d)
    (B : TreeVertex d → ℝ≥0 → Ω → ℝ) (w : TreeVertex d)
    (q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω))) : ℝ :=
  infiniteGibbsResponse beta v w
    (fun i => q.1 * spinSign (q.2.1 i) + B i q.1.toNNReal (q.2.2 i))

lemma measurable_observation
    {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2)) :
    Measurable (fun q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω)) =>
      observation B q.1 q.2) := by
  apply Measurable.of_eval
  intro i
  exact (measurable_fst.mul ((measurable_of_finite spinSign).comp
    ((measurable_pi_apply i).comp (measurable_fst.comp measurable_snd)))).add
    ((hjoint i).comp ((measurable_real_toNNReal.comp measurable_fst).prodMk
      ((measurable_pi_apply i).comp (measurable_snd.comp measurable_snd))))

lemma measurable_finiteRow (beta : ℝ) (D : Finset (TreeVertex d))
    (v : TreeVertex d) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (w : TreeVertex d) : Measurable (finiteRow beta D v B w) := by
  classical
  by_cases hw : w ∈ D
  · unfold finiteRow
    simp only [observedRow, ite_eq_left hw]
    exact (measurable_response beta D v w).comp (measurable_observation hjoint)
  · unfold finiteRow
    simp only [observedRow, ite_eq_right hw]
    exact measurable_const

lemma measurable_infiniteRow (beta : ℝ) (v : TreeVertex d)
    {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (w : TreeVertex d) : Measurable (infiniteRow beta v B w) :=
  (measurable_infiniteGibbsResponse beta v w).comp (measurable_observation hjoint)

omit [MeasurableSpace Ω] in

lemma finiteRow_eq_normalizedCovariance (beta : ℝ) (D : Finset (TreeVertex d))
    (v w : D) (B : TreeVertex d → ℝ≥0 → Ω → ℝ) (t : ℝ)
    (p : (TreeVertex d → IsingSpin) × (TreeVertex d → Ω)) :
    finiteRow beta D v B w (t, p) =
      finiteIsingBrownianNormalizedCovariance beta D v w B t p := by
  classical
  simp only [finiteRow, observedRow, ite_eq_left w.property]
  unfold response TreePathResponse.response TreePathResponse.covariance
    LeafGibbs.covariance TreePathResponse.mean
    finiteIsingBrownianNormalizedCovariance FinitePosterior.normalizedFieldCovariance
    FinitePosterior.fieldCovariance
  simp only [extendFiniteSpin_apply D _ v, extendFiniteSpin_apply D _ w,
    GibbsLeaf.expectation_eq_fieldMean]
  rfl

omit [MeasurableSpace Ω] in
lemma finiteRow_eq_zero (beta : ℝ) (D : Finset (TreeVertex d)) (v w : TreeVertex d)
    (B : TreeVertex d → ℝ≥0 → Ω → ℝ) (hw : w ∉ D)
    (q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω))) :
    finiteRow beta D v B w q = 0 := by
  simp [finiteRow, observedRow, hw]

omit [MeasurableSpace Ω] in
lemma tsum_finiteRow_sq (beta : ℝ) (D : Finset (TreeVertex d)) (v : D)
    (B : TreeVertex d → ℝ≥0 → Ω → ℝ)
    (q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω))) :
    (∑' w, ENNReal.ofReal (finiteRow beta D v B w q ^ 2)) =
      ENNReal.ofReal (∑ w : D,
        finiteIsingBrownianNormalizedCovariance beta D v w B q.1 q.2 ^ 2) := by
  classical
  rcases q with ⟨t, p⟩
  rw [tsum_eq_sum (s := D)]
  · rw [← Finset.sum_coe_sort D]
    simp_rw [finiteRow_eq_normalizedCovariance]
    exact (ENNReal.ofReal_sum_of_nonneg (fun _ _ => sq_nonneg _)).symm
  · intro w hw
    simp [finiteRow_eq_zero beta D v w B hw]

theorem finiteRow_tendsto_ae
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (D : ℕ → Finset (TreeVertex d)) (hD : Monotone D)
    (hconn : ∀ n, ConnectedFinset (D n)) (hex : ∀ u, ∃ n, u ∈ D n)
    (v : TreeVertex d) (hv : ∀ n, v ∈ D n) (w : TreeVertex d) (T : ℝ) :
    ∀ᵐ q ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν)),
      Tendsto (fun n => finiteRow beta (D n) v B w q) atTop
        (𝓝 (infiniteRow beta v B w q)) := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have (vertex : TreeVertex d) : IsProbabilityMeasure (ν vertex) :=
    (hB vertex).isGaussianProcess.isProbabilityMeasure
  apply (Measure.ae_prod_iff_ae_ae (measurableSet_tendsto_fun
    (fun n => measurable_finiteRow beta (D n) v hjoint w)
    (measurable_infiniteRow beta v hjoint w))).mpr
  filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht
  have h := NormalizedResponseTime.observedRow_tendsto_ae_brownian
    hμ hbeta ν hB hmB D hD hconn hex v hv w t.toNNReal
  simpa only [finiteRow, infiniteRow, Real.coe_toNNReal t ht.1.le] using h

theorem lintegral_infiniteRow_le_of_finite
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (D : ℕ → Finset (TreeVertex d)) (hD : Monotone D)
    (hconn : ∀ n, ConnectedFinset (D n)) (hex : ∀ u, ∃ n, u ∈ D n)
    (v : TreeVertex d) (hv : ∀ n, v ∈ D n) (T : ℝ) {K : ℝ≥0∞}
    (henergy : ∀ n,
      (∫⁻ q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω)),
        ∑ u : D n, ENNReal.ofReal
          (finiteIsingBrownianNormalizedCovariance beta (D n) ⟨v, hv n⟩ u B q.1 q.2 ^ 2)
        ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))) ≤ K) :
    (∫⁻ q, ∑' w, ENNReal.ofReal (infiniteRow beta v B w q ^ 2)
      ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))) ≤ K := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have (vertex : TreeVertex d) : IsProbabilityMeasure (ν vertex) :=
    (hB vertex).isGaussianProcess.isProbabilityMeasure
  let P := (volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))
  rw [lintegral_tsum (fun w =>
    ((measurable_infiniteRow beta v hjoint w).pow_const 2).ennreal_ofReal.aemeasurable)]
  apply tsum_lintegral_sq_le_of_ae_tendsto P
    (fun n w => (measurable_finiteRow beta (D n) v hjoint w).aestronglyMeasurable)
    (fun w => finiteRow_tendsto_ae hμ hbeta ν hB hmB hjoint D hD hconn hex v hv w T)
  intro n
  rw [← lintegral_tsum (fun w =>
    ((measurable_finiteRow beta (D n) v hjoint w).pow_const 2).ennreal_ofReal.aemeasurable)]
  calc
    _ = ∫⁻ q : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω)),
        ∑ u : D n, ENNReal.ofReal
          (finiteIsingBrownianNormalizedCovariance beta (D n) ⟨v, hv n⟩ u B q.1 q.2 ^ 2)
        ∂P := by
      apply lintegral_congr
      intro q
      rw [tsum_finiteRow_sq beta (D n) ⟨v, hv n⟩ B q]
      exact ENNReal.ofReal_sum_of_nonneg (fun _ _ => sq_nonneg _)
    _ ≤ K := henergy n

theorem lintegral_infiniteRow_le
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (v : TreeVertex d) {T : ℝ} (hT : 0 ≤ T) :
    (∫⁻ q, ∑' w, ENNReal.ofReal (infiniteRow beta v B w q ^ 2)
      ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))) ≤
      ENNReal.ofReal (2 * ((d : ℝ) * beta + T + Real.sqrt T)) := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have (vertex : TreeVertex d) : IsProbabilityMeasure (ν vertex) :=
    (hB vertex).isGaussianProcess.isProbabilityMeasure
  apply lintegral_infiniteRow_le_of_finite hμ hbeta ν hB hmB hjoint
    (connectedExhaustion v) (connectedExhaustion_monotone v)
    (connectedExhaustion_connected v)
    (fun u => (eventually_mem_connectedExhaustion v u).exists)
    v (mem_connectedExhaustion v) T
  intro n
  let D := connectedExhaustion v n
  let r : D := ⟨v, mem_connectedExhaustion v n⟩
  let R : ℝ × ((TreeVertex d → IsingSpin) × (TreeVertex d → Ω)) → ℝ≥0∞ :=
    fun q => ENNReal.ofReal (∑ u : D,
      finiteIsingBrownianNormalizedCovariance beta D r u B q.1 q.2 ^ 2)
  have hR : Measurable R := by
    have heq : R = fun q => ∑' w, ENNReal.ofReal (finiteRow beta D v B w q ^ 2) := by
      funext q
      exact (tsum_finiteRow_sq beta D r B q).symm
    rw [heq]
    exact Measurable.tsum (fun w =>
      ((measurable_finiteRow beta D v hjoint w).pow_const 2).ennreal_ofReal)
  calc
    _ = ∫⁻ q, R q
        ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν)) := by
      apply lintegral_congr
      intro q
      exact (ENNReal.ofReal_sum_of_nonneg (fun _ _ => sq_nonneg _)).symm
    _ = ∫⁻ t in Ioc 0 T, ∫⁻ p, R (t, p) ∂μ.prod (Measure.infinitePi ν) :=
      lintegral_prod R hR.aemeasurable
    _ ≤ _ := hμ.lintegral_finiteIsingBrownianNormalizedEnergy_le hbeta ν hB hmB
      D (connectedExhaustion_connected v n) r hT

theorem row_energy_integrable
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (v : TreeVertex d) {T : ℝ} (hT : 0 ≤ T) :
    (∀ᵐ q ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν)),
      Summable (fun w => infiniteRow beta v B w q ^ 2)) ∧
    Integrable (fun q => ∑' w, infiniteRow beta v B w q ^ 2)
      ((volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))) ∧
    (∫ q, ∑' w, infiniteRow beta v B w q ^ 2
      ∂(volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))) ≤
      2 * ((d : ℝ) * beta + T + Real.sqrt T) := by
  let P := (volume.restrict (Ioc 0 T)).prod (μ.prod (Measure.infinitePi ν))
  have henergy := lintegral_infiniteRow_le hμ hbeta ν hB hmB hjoint v hT
  rw [lintegral_tsum (fun w =>
    ((measurable_infiniteRow beta v hjoint w).pow_const 2).ennreal_ofReal.aemeasurable)] at henergy
  have hm (w : TreeVertex d) : AEStronglyMeasurable (infiniteRow beta v B w) P :=
    (measurable_infiniteRow beta v hjoint w).aestronglyMeasurable
  exact ⟨ae_summable_sq_of_tsum_lintegral_sq_ne_top P hm
      (ne_top_of_le_ne_top ENNReal.ofReal_ne_top henergy),
    integral_tsum_sq_le_of_tsum_lintegral_sq_le P hm (by positivity) henergy⟩

theorem ae_path_row_energy_integrable
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (v : TreeVertex d) {T : ℝ} (hT : 0 ≤ T) :
    ∀ᵐ p ∂μ.prod (Measure.infinitePi ν),
      IntervalIntegrable (fun t => ∑' w, infiniteRow beta v B w (t, p) ^ 2)
        volume 0 T := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have (vertex : TreeVertex d) : IsProbabilityMeasure (ν vertex) :=
    (hB vertex).isGaussianProcess.isProbabilityMeasure
  filter_upwards [(row_energy_integrable hμ hbeta ν hB hmB hjoint v hT).2.1.prod_left_ae]
    with p hp
  exact (intervalIntegrable_iff_integrableOn_Ioc_of_le hT).mpr hp

theorem integral_mean_row_energy_le
    {beta : ℝ} {μ : Measure (TreeVertex d → IsingSpin)}
    (hμ : HasFreeIsingLaw (Real.tanh beta) μ) (hbeta : 0 ≤ beta)
    (ν : TreeVertex d → Measure Ω) {B : TreeVertex d → ℝ≥0 → Ω → ℝ}
    (hB : ∀ i, IsPreBrownianReal (B i) (ν i))
    (hmB : ∀ i t, Measurable (B i t))
    (hjoint : ∀ i, Measurable (fun z : ℝ≥0 × Ω => B i z.1 z.2))
    (v : TreeVertex d) {T : ℝ} (hT : 0 ≤ T) :
    IntervalIntegrable (fun t => ∫ p, ∑' w, infiniteRow beta v B w (t, p) ^ 2
      ∂μ.prod (Measure.infinitePi ν)) volume 0 T ∧
    (∫ t in 0..T, ∫ p, ∑' w, infiniteRow beta v B w (t, p) ^ 2
      ∂μ.prod (Measure.infinitePi ν)) ≤ 2 * ((d : ℝ) * beta + T + Real.sqrt T) := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have (vertex : TreeVertex d) : IsProbabilityMeasure (ν vertex) :=
    (hB vertex).isGaussianProcess.isProbabilityMeasure
  have h := row_energy_integrable hμ hbeta ν hB hmB hjoint v hT
  refine ⟨(intervalIntegrable_iff_integrableOn_Ioc_of_le hT).mpr
    h.2.1.integral_prod_left, ?_⟩
  rw [intervalIntegral.integral_of_le hT, ← integral_prod _ h.2.1]
  exact h.2.2

end Problem367.NormalizedInfiniteTimeEnergy

end

end OAI