File size: 5,586 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
119
120
121
122
123
124
import Mathlib
import OAI.Probability.CriticalPercolation.ProductMeasure.ProductConditioning

namespace OAI

section
section
noncomputable section
open Set MeasureTheory ProbabilityTheory
open scoped Classical ENNReal

namespace CriticalPercolation.BernoulliProduct
variable {E : Type*}

def allOpen (F : Set E) : Set (Set E) := {Ο‰ | FβŠ†Ο‰}

lemma measurable_allOpen_block [Countable E] (F : Set E) :
    MeasurableSet[blockSigma F] (allOpen F) := by
  have he : allOpen F=β‹‚ e : F, {Ο‰ : Set E | (e:E)βˆˆΟ‰} := by
    ext Ο‰
    simp only [allOpen,Set.mem_ofPred_eq,Set.mem_iInter]
    exact ⟨fun h e => h e.property,fun h e he => h ⟨e,he⟩⟩
  rw [he]
  apply MeasurableSet.iInter
  intro e
  have hm : MeasurableSet[coordinateSigma (e:E)] {Ο‰ : Set E | (e:E)βˆˆΟ‰} :=
    ⟨{True},MeasurableSet.singleton _,by ext Ο‰; simp⟩
  exact (le_iSup_of_le (e:E) (le_iSup_of_le e.property le_rfl) :
    coordinateSigma (e:E)≀blockSigma F) _ hm

lemma allOpen_inter_lower_le [Countable E] (q : E β†’ unitInterval) (F : Set E)
    (B : Set (Set E)) (hB : MeasurableSet B) (hBl : IsLowerSet B) :
    (law q).real (allOpen F∩B)≀(law q).real (allOpen F)*(law q).real B := by
  let C := forceOn F Set.univ ⁻¹' B
  have hmC : MeasurableSet[blockSigma Fᢜ] C := hB.preimage (measurable_forceOn_block F _)
  have hi := ((independent_blocks q F).indepSet_of_measurableSet
    (measurable_allOpen_block F) hmC).measure_inter_eq_mul
  have he : allOpen F∩B=allOpen F∩C := by
    ext Ο‰
    by_cases hΟ‰ : FβŠ†Ο‰
    Β· have hf : forceOn F Set.univ Ο‰=Ο‰ := by
        ext e
        by_cases he : e∈F
        Β· simp only [mem_forceOn,ite_eq_left he,Set.mem_univ,true_iff]
          exact hω he
        Β· simp only [mem_forceOn,ite_eq_right he]
      simp only [Set.mem_inter_iff,allOpen,Set.mem_ofPred_eq,hω,true_and,C,Set.mem_preimage,hf]
    · simp only [Set.mem_inter_iff,allOpen,Set.mem_ofPred_eq,hω,false_and]
  have hsub : CβŠ†B := by
    intro ω hω
    apply hBl _ hω
    intro e he
    by_cases heF : e∈F <;> simp [heF,he]
  have hr : (law q).real (allOpen F∩B)=(law q).real (allOpen F)*(law q).real C := by
    simp only [measureReal_def,he,hi,ENNReal.toReal_mul]
  rw [hr]
  exact mul_le_mul_of_nonneg_left (measureReal_mono hsub) measureReal_nonneg

lemma integrable_blockProbability_real (q : E β†’ unitInterval) (S : Set E)
    (A : Set (Set E)) (hA : MeasurableSet A) :
    Integrable (fun Οƒ => (blockProbability q S A Οƒ).toReal) (law q) := by
  have hm := (measurable_blockProbability q S A hA).mono (blockSigma_le S) le_rfl
  apply (integrable_const (1:ℝ)).mono' hm.ennreal_toReal.aestronglyMeasurable
  filter_upwards [] with Οƒ
  rw [Real.norm_eq_abs,abs_of_nonneg ENNReal.toReal_nonneg]
  exact ENNReal.toReal_mono (by simp) (blockProbability_le_one q S A Οƒ)

lemma integral_blockProbability_real (q : E β†’ unitInterval) (S : Set E)
    (A : Set (Set E)) (hA : MeasurableSet A) :
    (∫ Οƒ, (blockProbability q S A Οƒ).toReal βˆ‚law q)=(law q).real A := by
  have hm := (measurable_blockProbability q S A hA).mono (blockSigma_le S) le_rfl
  rw [integral_toReal hm.aemeasurable (ae_of_all _ (fun Οƒ =>
    (blockProbability_le_one q S A Οƒ).trans_lt ENNReal.one_lt_top)),
    lintegral_blockProbability q S A hA]
  rfl

theorem good_trial_bound [Countable E] (q : E β†’ unitInterval) (S F : Set E)
    (A : Set (Set E)) (hA : MeasurableSet A) (hAu : IsUpperSet A)
    (Ξ· lam : ℝ) (hlam : 0<lam) (hmean : 1-η≀(law q).real A) :
    (law q).real (allOpen F∩{Οƒ | (blockProbability q S A Οƒ).toReal<1-lam})≀
      (law q).real (allOpen F)*Ξ·/lam := by
  let g : Set E β†’ ℝ := fun Οƒ => (blockProbability q S A Οƒ).toReal
  let B : Set (Set E) := {Οƒ | g Οƒ<1-lam}
  have hg : Measurable g :=
    ((measurable_blockProbability q S A hA).mono (blockSigma_le S) le_rfl).ennreal_toReal
  have hgi : Integrable g (law q) := integrable_blockProbability_real q S A hA
  have hg1 : βˆ€ Οƒ, g σ≀1 := fun Οƒ =>
    ENNReal.toReal_mono (by simp) (blockProbability_le_one q S A Οƒ)
  have hgm : Monotone g := by
    intro Οƒ Ο„ h
    exact ENNReal.toReal_mono (ne_of_lt ((blockProbability_le_one q S A Ο„).trans_lt
      ENNReal.one_lt_top)) (blockProbability_monotone q S A hAu h)
  have hBm : MeasurableSet B := measurableSet_lt hg measurable_const
  have hBl : IsLowerSet B := fun _ _ h hB => (hgm h).trans_lt hB
  have hmark : lam*(law q).real B≀η := by
    have hcomp : Integrable (fun Οƒ => lam*B.indicator (1 : Set E β†’ ℝ) Οƒ) (law q) :=
      ((integrable_const (1:ℝ)).indicator hBm).const_mul lam
    have hd : Integrable (fun Οƒ => 1-g Οƒ) (law q) := (integrable_const 1).sub hgi
    have hi := integral_mono hcomp hd (fun Οƒ => by
      by_cases hΟƒ : ΟƒβˆˆB
      · rw [Set.indicator_of_mem hσ]
        have hh : g σ<1-lam := hσ
        dsimp only [Pi.one_apply]
        linarith
      · rw [Set.indicator_of_notMem hσ,mul_zero]
        exact sub_nonneg.mpr (hg1 Οƒ))
    rw [integral_const_mul,integral_indicator_one hBm,integral_sub (integrable_const 1) hgi,
      integral_const,probReal_univ,smul_eq_mul,one_mul] at hi
    have he := integral_blockProbability_real q S A hA
    change (∫ Οƒ, g Οƒ βˆ‚law q)=(law q).real A at he
    rw [he] at hi
    linarith
  have hh := allOpen_inter_lower_le q F B hBm hBl
  have hb : (law q).real B≀η/lam := (le_div_iffβ‚€ hlam).mpr (by nlinarith [hmark])
  exact hh.trans (by simpa only [mul_div_assoc] using
    mul_le_mul_of_nonneg_left hb (show 0≀(law q).real (allOpen F) from measureReal_nonneg))

end CriticalPercolation.BernoulliProduct
end
end
end

end OAI