math / data /lean /OAI /Probability /CriticalPercolation /Gluing /SelectedTrials.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.62 kB
import Mathlib
import OAI.Probability.CriticalPercolation.ProductMeasure.TrialProbability
import OAI.Probability.CriticalPercolation.Gluing.SelectedFresh
namespace OAI
section
section
noncomputable section
open Set Function MeasureTheory ProbabilityTheory
open scoped Classical BigOperators ENNReal
namespace CriticalPercolation.BernoulliProduct
variable {E V : Type*} [Countable E] [Countable V]
lemma selected_no_success_bound (q : E β†’ unitInterval) (X Y : Set E)
(hXY : Disjoint X Y) (d : Set E β†’ Finset V) (F : V β†’ Set E)
(hd : βˆ€ U, MeasurableSet[blockSigma X] {Ο‰ | d Ο‰=U})
(hF : βˆ€ v, F v βŠ† Y) (C : Set (Set E)) (hC : MeasurableSet[blockSigma X] C)
(K : ℝ)
(hdis : βˆ€ ΟƒβˆˆC, (d Οƒ : Set V).Pairwise (fun v w => Disjoint (F v) (F w)))
(hs : βˆ€ ΟƒβˆˆC, K ≀ βˆ‘ v∈d Οƒ, (law q).real (allOpen (F v))) :
(law q).real (C∩{Ο‰ | βˆ€ v∈d Ο‰, Ο‰βˆ‰allOpen (F v)}) ≀ Real.exp (-K)*(law q).real C := by
have hA (U : Finset V) : MeasurableSet[blockSigma Y] (β‹‚ v∈U, (allOpen (F v))ᢜ) :=
MeasurableSet.biInter U.countable_toSet (fun v _ =>
((blockSigma_mono (hF v)) _ (measurable_allOpen_block (F v))).compl)
have hh := selected_fresh_bound q X Y hXY d (fun U => β‹‚ v∈U, (allOpen (F v))ᢜ)
hd hA C hC (Real.exp (-K)) (Real.exp_nonneg _)
(fun σ hσ => disjoint_trials_no_success_le q F (d σ) (hdis σ hσ) K (hs σ hσ))
simpa only [selectedEvent,Set.mem_iInter,Set.mem_compl_iff] using hh
lemma selected_bad_trial_bound (q : E β†’ unitInterval) (X Y : Set E)
(hXY : Disjoint X Y) (d : Set E β†’ Finset V) (F : V β†’ Set E)
(A : V β†’ Set (Set E)) (hA : βˆ€ v, MeasurableSet (A v))
(hAu : βˆ€ v, IsUpperSet (A v))
(hd : βˆ€ U, MeasurableSet[blockSigma X] {Ο‰ | d Ο‰=U})
(hF : βˆ€ v, F v βŠ† Y) (C : Set (Set E)) (hC : MeasurableSet[blockSigma X] C)
(K Ξ· lam : ℝ) (hK : 0 ≀ K+1) (hΞ· : 0 ≀ Ξ·) (hlam : 0 < lam)
(hmean : βˆ€ ΟƒβˆˆC, βˆ€ v∈d Οƒ, 1-Ξ· ≀ (law q).real (A v))
(hs : βˆ€ ΟƒβˆˆC, (βˆ‘ v∈d Οƒ, (law q).real (allOpen (F v))) ≀ K+1) :
(law q).real (C∩{Ο‰ | βˆƒ v∈d Ο‰, Ο‰βˆˆallOpen (F v) ∧
(blockProbability q Y (A v) Ο‰).toReal<1-lam}) ≀
((K+1)*Ξ·/lam)*(law q).real C := by
let Bad := fun v => allOpen (F v)∩{Οƒ | (blockProbability q Y (A v) Οƒ).toReal<1-lam}
have hmB (v : V) : MeasurableSet[blockSigma Y] (Bad v) :=
((blockSigma_mono (hF v)) _ (measurable_allOpen_block (F v))).inter
(measurableSet_lt (measurable_blockProbability q Y (A v) (hA v)).ennreal_toReal
measurable_const)
have hb (Οƒ : Set E) (hΟƒ : ΟƒβˆˆC) (v : V) (hv : v∈d Οƒ) : (law q).real (Bad v) ≀ (law q).real (allOpen (F v))*(Ξ·/lam) := by
simpa only [mul_div_assoc] using good_trial_bound q Y (F v) (A v) (hA v) (hAu v)
η lam hlam (hmean σ hσ v hv)
have hh := selected_fresh_bound q X Y hXY d (fun U => ⋃ v∈U, Bad v) hd
(fun U => MeasurableSet.biUnion U.countable_toSet (fun v _ => hmB v))
C hC ((K+1)*(Ξ·/lam)) (mul_nonneg hK (div_nonneg hΞ· hlam.le))
(fun σ hσ => bad_trial_union_bound q (d σ) Bad (fun v => (law q).real (allOpen (F v)))
K (η/lam) (div_nonneg hη hlam.le) (fun v hv => hb σ hσ v hv) (hs σ hσ))
have he : selectedEvent d (fun U => ⋃ v∈U, Bad v)=
{Ο‰ | βˆƒ v∈d Ο‰, Ο‰βˆˆallOpen (F v) ∧
(blockProbability q Y (A v) Ο‰).toReal<1-lam} := by
ext Ο‰
simp only [selectedEvent, Set.mem_iUnion, Set.mem_inter_iff, Set.mem_ofPred_eq, Bad]
aesop
rw [he] at hh
simpa only [mul_div_assoc] using hh
end CriticalPercolation.BernoulliProduct
end
end
end
end OAI