File size: 5,178 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
import Mathlib
import OAI.Probability.SKGap.Stability.FieldTonelli
import OAI.Probability.SKGap.Localization.ConditionalIntegralRate

namespace OAI

section
noncomputable section
namespace SKGap
open Matrix Real Set MeasureTheory ProbabilityTheory GaussianDensity
open scoped BigOperators Matrix.Norms.Frobenius ENNReal

lemma measurable_fieldIntegral {n : β„•} (j t Οƒ : ℝ)
    (E : Set (((Fin nΓ—Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ))) (hE : MeasurableSet E) :
    Measurable (fun p : (MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)=>
      fieldIntegral j Οƒ (plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1))
        (fun i=>t+p.2 i) {y | ((fun q=>goeMatrix (j/(n:ℝ)) p.1 q.1 q.2),y)∈E}) := by
  let H : ((MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) Γ— (Fin n β†’ ℝ) β†’ ℝβ‰₯0∞ :=
    fun p=>ENNReal.ofReal (fieldMollifier j Οƒ (plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1.1))
      (fun i=>t+p.1.2 i) p.2)* E.indicator (fun _=>1) ((fun q=>goeMatrix (j/(n:ℝ)) p.1.1 q.1 q.2),p.2)
  have hsJ : Continuous (fun p : ((MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) Γ— (Fin n β†’ ℝ) =>
      plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1.1)) :=
    ((goeMatrix_pi_lipschitz (j/(n:ℝ))).continuous.comp (continuous_fst.comp continuous_fst)).add continuous_const
  have htime : Continuous (fun p : ((MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) Γ— (Fin n β†’ ℝ) =>
      (fun i=>t+p.1.2 i)) := by
    apply continuous_pi
    intro i
    exact continuous_const.add ((continuous_apply i).comp (continuous_snd.comp continuous_fst))
  have hmap : Continuous (fun p : ((MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) Γ— (Fin n β†’ ℝ) =>
      (plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1.1),((fun i=>t+p.1.2 i),p.2))) :=
    hsJ.prodMk (htime.prodMk continuous_snd)
  have hφ := ((continuous_fieldMollifier j σ).comp hmap).measurable.ennreal_ofReal
  have hI : Measurable (fun p : ((MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) Γ— (Fin n β†’ ℝ) =>
      E.indicator (fun _=>(1 : ℝβ‰₯0∞)) ((fun q=>goeMatrix (j/(n:ℝ)) p.1.1 q.1 q.2),p.2)) := by
    apply (measurable_const.indicator hE).comp
    unfold goeMatrix
    fun_prop
  have hH : Measurable H := hφ.mul hI
  have he (p : (MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)) :
      fieldIntegral j Οƒ (plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1))
        (fun i=>t+p.2 i) {y | ((fun q=>goeMatrix (j/(n:ℝ)) p.1 q.1 q.2),y)∈E}=
      ∫⁻ y,H (p,y) := by
    have hs : MeasurableSet {y : Fin n β†’ ℝ | ((fun q=>goeMatrix (j/(n:ℝ)) p.1 q.1 q.2),y)∈E} := hE.preimage (by fun_prop)
    erw [fieldIntegral_indicator _ _ _ _ _ hs]
    apply lintegral_congr
    intro y
    dsimp [H]
    by_cases hy : ((fun q=>goeMatrix (j/(n:ℝ)) p.1 q.1 q.2),y)∈E <;> simp [hy]
  simp_rw [he]
  exact hH.lintegral_prod_right'

lemma measurableSet_badField_section {n : β„•} (j A Ξ΅ m : ℝ)
    (W : Matrix (Fin n) (Fin n) ℝ) :
    MeasurableSet {y : Field n | (W,y)∈badFieldSet n j A Ρ m} := by
  have hm : Measurable (fun z : Fin n β†’ ℝ=>((fun q : Fin n Γ— Fin n=>W q.1 q.2),z)) :=
    measurable_const.prodMk measurable_id
  have hs := (measurableSet_badFieldFlat n j A Ξ΅ m).preimage hm
  convert hs using 1
  ext y
  rfl

lemma measurable_fieldIntegral_cylinder {n : β„•} (j t Οƒ : ℝ)
    (E : Set (Field n)) (hE : MeasurableSet E) :
    Measurable (fun p : (MatrixCoordinates (Fin n) β†’ ℝ) Γ— (Fin n β†’ ℝ)=>
      fieldIntegral j Οƒ (plantedInteraction j (goeMatrix (j/(n:ℝ)) p.1))
        (fun i=>t+p.2 i) E) := by
  simpa only [mem_prod,mem_univ,true_and,ofPred_mem_eq] using
    measurable_fieldIntegral j t Οƒ (Set.univ Γ—Λ’ E) (MeasurableSet.univ.prod hE)

lemma measureReal_union_detector {Ξ© : Type*} [MeasurableSpace Ξ©]
    (ΞΌ : Measure Ξ©) [IsFiniteMeasure ΞΌ] (E D : Set Ξ©) (F : Ξ© β†’ ℝβ‰₯0∞)
    (b p q : ℝ) (hbD : ΞΌ.real D ≀ p)
    (hbF : ΞΌ.real {x | ENNReal.ofReal b ≀ F x} ≀ q)
    (hdet : βˆ€ x ∈ E, xβˆ‰D β†’ ENNReal.ofReal b ≀ F x) : ΞΌ.real E ≀ p+q := by
  apply (measureReal_mono (sβ‚‚ := D βˆͺ {x | ENNReal.ofReal b ≀ F x}) ?_ (measure_ne_top _ _)).trans
  Β· exact (measureReal_union_le _ _).trans (add_le_add hbD hbF)
  Β· intro x hx
    by_cases hd : x∈D
    Β· exact Or.inl hd
    Β· exact Or.inr (hdet x hx hd)

lemma markov_exponential {Ξ© : Type*} [MeasurableSpace Ξ©] (ΞΌ : Measure Ξ©)
    {F : Ξ© β†’ ℝβ‰₯0∞} (hF : Measurable F) {a b d : ℝ}
    (hb : ∫⁻ x,F x βˆ‚ΞΌ ≀ ENNReal.ofReal (exp (-a*d))) :
    ΞΌ.real {x | ENNReal.ofReal (exp (-b*d)) ≀ F x} ≀ exp (-(a-b)*d) := by
  have hm := meas_ge_le_lintegral_div (ΞΌ := ΞΌ) (Ξ΅ := ENNReal.ofReal (exp (-b*d))) hF.aemeasurable
    (ENNReal.ofReal_pos.mpr (exp_pos _)).ne' ENNReal.ofReal_ne_top
  have he : ENNReal.ofReal (exp (-a*d))/ENNReal.ofReal (exp (-b*d))=
      ENNReal.ofReal (exp (-(a-b)*d)) := by
    rw [← ENNReal.ofReal_div_of_pos (exp_pos _),← exp_sub]
    congr 2
    ring
  have hx := hm.trans ((ENNReal.div_le_div_right hb _).trans_eq he)
  exact (ENNReal.toReal_mono ENNReal.ofReal_ne_top hx).trans_eq (ENNReal.toReal_ofReal (exp_pos _).le)
end SKGap
end
end

end OAI