math / data /lean /OAI /Probability /CriticalPercolation /Gluing /FreshContactTransfer.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.74 kB
import Mathlib
import OAI.Probability.CriticalPercolation.Model
import OAI.Probability.CriticalPercolation.Gluing.SelectedTrials
import OAI.Probability.CriticalPercolation.Gluing.ConditionalGluing
namespace OAI
section
section
noncomputable section
open Set Function MeasureTheory ProbabilityTheory
open scoped Classical BigOperators ENNReal
namespace CriticalPercolation.BondGraph
open BernoulliProduct
variable {E V : Type*} [Countable E] [Countable V] (G : BondGraph V E)
theorem fresh_contact_transfer (q : E β†’ unitInterval) (X Y : Set E)
(hXY : Disjoint X Y) (d : Set E β†’ Finset V) (F : V β†’ Set E)
(B : V β†’ Set V) (L T Input : Set V) (o : V)
(hd : βˆ€ U, MeasurableSet[blockSigma X] {Ο‰ | d Ο‰=U})
(hF : βˆ€ v, F v βŠ† Y)
(hconnect : βˆ€ v∈L, βˆ€ b∈B v, (G.openGraph (F v)).Reachable v b)
(C Small : Set (Set E)) (hC : MeasurableSet[blockSigma X] C)
(hinput : G.hitEvent o Input βŠ† SmallβˆͺC)
(hcontact : βˆ€ Ο‰βˆˆC, βˆ€ v∈d Ο‰, v∈L ∧ (G.openGraph Ο‰).Reachable o v)
(K Ξ· lam : ℝ) (hK : 0 ≀ K+1) (hΞ· : 0 ≀ Ξ·) (hlam : 0 < lam)
(hmean : βˆ€ v∈L, 1-Ξ· ≀ (BernoulliProduct.law q).real (G.seedHitEvent (B v) T))
(hdis : βˆ€ ΟƒβˆˆC, (d Οƒ : Set V).Pairwise (fun v w => Disjoint (F v) (F w)))
(hs : βˆ€ ΟƒβˆˆC, K ≀ βˆ‘ v∈d Οƒ, (BernoulliProduct.law q).real (allOpen (F v)))
(hs' : βˆ€ ΟƒβˆˆC, (βˆ‘ v∈d Οƒ, (BernoulliProduct.law q).real (allOpen (F v))) ≀ K+1) :
(BernoulliProduct.law q).real (G.hitEvent o Input\G.hitEvent o T) ≀
(BernoulliProduct.law q).real Small+Real.exp (-K)+(K+1)*Ξ·/lam+lam := by
let No := C∩{Ο‰ | βˆ€ v∈d Ο‰, Ο‰βˆ‰allOpen (F v)}
let Bad := C∩{Ο‰ | βˆƒ v∈d Ο‰, Ο‰βˆˆallOpen (F v) ∧
(blockProbability q Y (G.seedHitEvent (B v) T) Ο‰).toReal<1-lam}
let Glue := {Ο‰ : Set E | Ο‰βˆˆG.hitEvent o (G.goodRelay q Y L F B T lam Ο‰) ∧
Ο‰βˆ‰G.hitEvent o T}
have hcover : G.hitEvent o Input\G.hitEvent o T βŠ† ((SmallβˆͺNo)βˆͺBad)βˆͺGlue := by
intro ω hω
obtain hSmall|hCω := hinput hω.1
Β· exact Or.inl (Or.inl (Or.inl hSmall))
Β· by_cases hno : βˆ€ v∈d Ο‰, Ο‰βˆ‰allOpen (F v)
Β· exact Or.inl (Or.inl (Or.inr ⟨hCΟ‰,hno⟩))
Β· push Not at hno
obtain ⟨v,hv,hopen⟩ := hno
by_cases hbad : (blockProbability q Y (G.seedHitEvent (B v) T) Ο‰).toReal<1-lam
Β· exact Or.inl (Or.inr ⟨hCΟ‰,v,hv,hopen,hbad⟩)
Β· exact Or.inr ⟨⟨v,(hcontact Ο‰ hCΟ‰ v hv).2,
(hcontact Ο‰ hCΟ‰ v hv).1,hopen,le_of_not_gt hbad⟩,hΟ‰.2⟩
have hno := selected_no_success_bound q X Y hXY d F hd hF C hC K hdis hs
have hbad := selected_bad_trial_bound q X Y hXY d F (fun v => G.seedHitEvent (B v) T)
(fun v => G.measurableSet_seedHitEvent (B v) T) (fun v => G.seedHitEvent_upper (B v) T)
hd hF C hC K Ξ· lam hK hΞ· hlam
(fun σ hσ v hv => hmean v (hcontact σ hσ v hv).1) hs'
have hglue := G.goodRelay_gluing q Y L F B T hF hconnect o lam hlam.le
have hno' : (BernoulliProduct.law q).real No ≀ Real.exp (-K) :=
hno.trans (mul_le_of_le_one_right (Real.exp_nonneg _) measureReal_le_one)
have hbad' : (BernoulliProduct.law q).real Bad ≀ (K+1)*Ξ·/lam :=
hbad.trans (mul_le_of_le_one_right (div_nonneg (mul_nonneg hK hΞ·) hlam.le)
measureReal_le_one)
have hu := measureReal_union_le ((SmallβˆͺNo)βˆͺBad) Glue (ΞΌ := BernoulliProduct.law q)
have hu' := measureReal_union_le (SmallβˆͺNo) Bad (ΞΌ := BernoulliProduct.law q)
have hu'' := measureReal_union_le Small No (ΞΌ := BernoulliProduct.law q)
have hmono := measureReal_mono (ΞΌ := BernoulliProduct.law q) hcover
change (BernoulliProduct.law q).real Glue ≀ lam at hglue
linarith
end CriticalPercolation.BondGraph
end
end
end
end OAI