Download data/lean/OAI/Probability/CriticalPercolation/Gluing/FreshContactTransfer.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.74 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Gluing/FreshContactTransfer.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Gluing/FreshContactTransfer.lean
-
curl -L -o FreshContactTransfer.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Gluing/FreshContactTransfer.lean
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 | |