Download data/lean/OAI/Probability/CriticalPercolation/Exploration/LayerExposure.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Exploration/LayerExposure.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Exploration/LayerExposure.lean
-
curl -L -o LayerExposure.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Exploration/LayerExposure.lean
9.4 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Criticality.BlockIndependence | |
| import OAI.Probability.CriticalPercolation.ProductMeasure.LevelContactMeasurability | |
| import OAI.Probability.CriticalPercolation.Criticality.NestedLayerBlock | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open Set MeasureTheory ProbabilityTheory | |
| open scoped Classical ENNReal | |
| namespace CriticalPercolation.BernoulliProduct | |
| variable {E : Type*} | |
| lemma measurableSet_block_of_dependsOn (A : Set (Set E)) (L : Set E) | |
| (hA : MeasurableSet A) (hdep : DependsOn (fun Ο : Set E => ΟβA) L) : | |
| MeasurableSet[blockSigma L] A := by | |
| have he : A=(fun Ο : Set E => Οβ©L) β»ΒΉ' A := by | |
| ext Ο | |
| exact (hdep (x := Ο) (y := (show Set E from Οβ©L)) | |
| (fun e he => propext (show eβΟ β eβΟβ©L from by simp [he]))).to_iff | |
| rw [he] | |
| exact hA.preimage (measurable_inter_block L) | |
| end CriticalPercolation.BernoulliProduct | |
| namespace CriticalPercolation.BondGraph | |
| open BernoulliProduct | |
| variable {V E : Type*} (G : BondGraph V E) | |
| def entrySeeds (D : Set V) (o : V) (Ο : Set E) : Set V := | |
| G.cluster (Οβ©(G.inducedEdges D)αΆ) o β© D | |
| lemma entrySeeds_subset_cluster (D : Set V) (o : V) (Ο : Set E) : | |
| G.entrySeeds D o ΟβG.cluster Ο o := | |
| fun _ h => G.cluster_mono Set.inter_subset_left o h.1 | |
| lemma measurable_entrySeeds [Countable V] [Countable E] (D : Set V) (o : V) : | |
| @Measurable (Set E) (Set V) (blockSigma (G.inducedEdges D)αΆ) inferInstance | |
| (G.entrySeeds D o) := by | |
| let : MeasurableSpace (Set E) := blockSigma (G.inducedEdges D)αΆ | |
| change Measurable (G.entrySeeds D o) | |
| apply Measurable.of_eval | |
| intro x | |
| exact (((measurable_pi_apply x).comp ((G.measurable_cluster o).comp | |
| (measurable_inter_block (G.inducedEdges D)αΆ))).and measurable_const) | |
| lemma measurableSet_entrySeed [Countable V] [Countable E] (D : Set V) (o x : V) : | |
| MeasurableSet[blockSigma (G.inducedEdges D)αΆ] {Ο | xβG.entrySeeds D o Ο} := by | |
| let : MeasurableSpace (Set E) := blockSigma (G.inducedEdges D)αΆ | |
| exact ((measurable_pi_apply x).comp (G.measurable_entrySeeds D o)).setOf | |
| lemma entrySeed_eq_or_adj_exterior {D : Set V} {o x : V} {Ο : Set E} | |
| (hx : xβG.entrySeeds D o Ο) : | |
| x=o β¨ β y, yβD β§ G.fullGraph.Adj x y := by | |
| by_cases he : x=o | |
| Β· exact Or.inl he | |
| right | |
| obtain β¨wβ© := hx.1.symm | |
| obtain β¨y,hxy,w',hwβ© := SimpleGraph.Walk.exists_eq_cons_of_ne he w | |
| obtain β¨β¨e,heΟ,hexyβ©,hneβ© := (SimpleGraph.fromEdgeSet_adj _).mp hxy | |
| refine β¨y,?_,G.openGraph_mono (Set.subset_univ _) hxyβ© | |
| intro hy | |
| apply heΟ.2 | |
| intro z hz | |
| rw [hexy] at hz | |
| exact (Sym2.mem_iff.mp hz).elim (fun h => h βΈ hx.2) (fun h => h βΈ hy) | |
| lemma entrySeeds_weight_band (hc : G.fullGraph.Connected) (hl : G.LocallyFinite) | |
| (hq : G.QuasiTransitive) (R : β) : | |
| β a : β, 0<a β§ aβ€1 β§ β o T, a*Tβ€1 β β Ο x, | |
| xβG.entrySeeds (G.safeBallDomain o T R) o Ο β | |
| a*Tβ€G.modularRatio x o β§ G.modularRatio x oβ€T := by | |
| obtain β¨C,hC,hlowβ© := G.safeBallDomain_low_inclusion hc hl hq R | |
| obtain β¨B,hB,hballβ© := G.modularRatio_ball_weight hc hl hq 1 | |
| have hC0 : 0<C := lt_of_lt_of_le zero_lt_one hC | |
| have hB0 : 0<B := lt_of_lt_of_le zero_lt_one hB | |
| refine β¨1/(C*B),by positivity,?_,fun o T hroot Ο x hx => β¨?_,G.safeBallDomain_subset o T R hx.2β©β© | |
| Β· exact (div_le_one (by positivity)).mpr (by nlinarith : (1:β)β€C*B) | |
| rcases G.entrySeed_eq_or_adj_exterior hx with rfl|β¨y,hy,hxyβ© | |
| Β· simpa only [G.modularRatio_self] using hroot | |
| have hlower : T/C<G.modularRatio y o := lt_of_not_ge (fun hh => hy (hlow o T hh)) | |
| have hbound : G.modularRatio y oβ€B*G.modularRatio x o := | |
| hball o y x (G.vertexBall_comm.mp (G.vertexBall_step (G.mem_vertexBall_self x 0) hxy)) | |
| have : T<(G.modularRatio x o)*(C*B) := by | |
| have hh := (div_lt_iffβ hC0).mp (hlower.trans_le hbound) | |
| nlinarith | |
| have hh := (div_lt_iffβ (mul_pos hC0 hB0)).mpr this | |
| simpa only [one_div,inv_mul_eq_div] using hh.le | |
| lemma entrySeeds_weight_band_start (hc : G.fullGraph.Connected) (hl : G.LocallyFinite) | |
| (hq : G.QuasiTransitive) (R : β) : | |
| β a U : β, 0<a β§ 0<U β§ a*Uβ€1 β§ (β o, oβG.safeBallDomain o U R) β§ | |
| β o T, a*Tβ€1 β β Ο x, | |
| xβG.entrySeeds (G.safeBallDomain o T R) o Ο β | |
| a*Tβ€G.modularRatio x o β§ G.modularRatio x oβ€T := by | |
| obtain β¨C,hC,hlowβ© := G.safeBallDomain_low_inclusion hc hl hq R | |
| obtain β¨B,hB,hballβ© := G.modularRatio_ball_weight hc hl hq 1 | |
| have hC0 : 0<C := lt_of_lt_of_le zero_lt_one hC | |
| have hB0 : 0<B := lt_of_lt_of_le zero_lt_one hB | |
| refine β¨1/(C*B),C,by positivity,hC0,?_,?_,fun o T hroot Ο x hx => β¨?_,G.safeBallDomain_subset o T R hx.2β©β© | |
| Β· have he : (1/(C*B))*C=1/B := by field_simp | |
| rw [he] | |
| exact (div_le_one hB0).mpr hB | |
| Β· intro o | |
| apply hlow o C | |
| change G.modularRatio o oβ€C/C | |
| rw [G.modularRatio_self,div_self hC0.ne'] | |
| rcases G.entrySeed_eq_or_adj_exterior hx with rfl|β¨y,hy,hxyβ© | |
| Β· simpa only [G.modularRatio_self] using hroot | |
| have hlower : T/C<G.modularRatio y o := lt_of_not_ge (fun hh => hy (hlow o T hh)) | |
| have hbound : G.modularRatio y oβ€B*G.modularRatio x o := | |
| hball o y x (G.vertexBall_comm.mp (G.vertexBall_step (G.mem_vertexBall_self x 0) hxy)) | |
| have : T<(G.modularRatio x o)*(C*B) := by | |
| have hh := (div_lt_iffβ hC0).mp (hlower.trans_le hbound) | |
| nlinarith | |
| have hh := (div_lt_iffβ (mul_pos hC0 hB0)).mpr this | |
| simpa only [one_div,inv_mul_eq_div] using hh.le | |
| lemma layerStopped_eq (D H : Set V) (Ο : Set E) : | |
| ((Οβ©(G.inducedEdges D\G.inducedEdges H))β©G.inducedEdges D)β©G.inducedEdges HαΆ = | |
| (Οβ©G.inducedEdges D)β©G.inducedEdges HαΆ := by | |
| ext e | |
| constructor | |
| Β· exact fun h => β¨β¨h.1.1.1,h.1.2β©,h.2β© | |
| Β· intro h | |
| refine β¨β¨β¨h.1.1,h.1.2,?_β©,h.1.2β©,h.2β© | |
| intro he | |
| obtain β¨x,y,hxyβ© : β x y, G.ends e=s(x,y) := Sym2.exists.mp β¨G.ends e,rflβ© | |
| have hx : xβG.ends e := by rw [hxy]; simp | |
| exact h.2 x hx (he x hx) | |
| lemma domainLayer_restrict (D H : Set V) (x : V) (hx : xβH) (N : β) | |
| (Ο : Set E) : | |
| Οβ©(G.inducedEdges D\G.inducedEdges H)βG.domainFreshExitEvent D HαΆ x N β | |
| ΟβG.domainFreshExitEvent D HαΆ x N := by | |
| constructor | |
| Β· exact G.domainFreshExitEvent_upper hx N Set.inter_subset_left | |
| Β· rintro β¨F,hF,hFeβ© | |
| refine β¨F,hF,?_β© | |
| intro e he | |
| obtain β¨β¨β¨u,v,hev,hu,hvβ©,heHβ©,heΟ,heDβ© := hFe he | |
| have hvH := G.cluster_induced_subset (Οβ©G.inducedEdges D) HαΆ hx hv | |
| have hn : eβG.inducedEdges H := by | |
| intro hh | |
| exact hvH (hh v (by rw [hev]; simp)) | |
| have hu' : uβG.cluster (((Οβ©(G.inducedEdges D\G.inducedEdges H))β©G.inducedEdges D)β© | |
| G.inducedEdges HαΆ) x := by | |
| rw [G.layerStopped_eq] | |
| exact hu | |
| have hv' : vβG.cluster (((Οβ©(G.inducedEdges D\G.inducedEdges H))β©G.inducedEdges D)β© | |
| G.inducedEdges HαΆ) x := by | |
| rw [G.layerStopped_eq] | |
| exact hv | |
| exact β¨β¨β¨u,v,hev,hu',hv'β©,heHβ©,β¨heΟ,heD,hnβ©,heDβ© | |
| lemma boundedLayer_restrict (D H : Set V) (x : V) (hx : xβH) (N : β) (M : ββ₯0β) | |
| (Ο : Set E) : | |
| Οβ©(G.inducedEdges D\G.inducedEdges H)βG.boundedDomainFreshExitEvent D HαΆ x N M β | |
| ΟβG.boundedDomainFreshExitEvent D HαΆ x N M := by | |
| simp only [boundedDomainFreshExitEvent,Set.mem_inter_iff,Set.mem_ofPred_eq, | |
| G.layerStopped_eq,G.domainLayer_restrict D H x hx N Ο] | |
| lemma measurableSet_boundedDomainFreshExit [Countable V] [Countable E] | |
| (D S : Set V) (x : V) (hx : xβS) (N : β) (M : ββ₯0β) : | |
| MeasurableSet (G.boundedDomainFreshExitEvent D S x N M) := by | |
| apply (G.measurableSet_domainFreshExitEvent hx N).inter | |
| apply measurableSet_le _ measurable_const | |
| exact (G.measurable_modularClusterMass x x).comp | |
| (((measurable_inter_block (G.inducedEdges S)).mono (blockSigma_le _) le_rfl).comp | |
| ((measurable_inter_block (G.inducedEdges D)).mono (blockSigma_le _) le_rfl)) | |
| lemma measurableSet_boundedLayer [Countable V] [Countable E] | |
| (D H : Set V) (x : V) (hx : xβH) (N : β) (M : ββ₯0β) : | |
| MeasurableSet[blockSigma (G.inducedEdges D\G.inducedEdges H)] | |
| (G.boundedDomainFreshExitEvent D HαΆ x N M) := by | |
| have he : G.boundedDomainFreshExitEvent D HαΆ x N M= | |
| (fun Ο : Set E => Οβ©(G.inducedEdges D\G.inducedEdges H)) β»ΒΉ' | |
| G.boundedDomainFreshExitEvent D HαΆ x N M := by | |
| ext Ο | |
| exact (G.boundedLayer_restrict D H x hx N M Ο).symm | |
| rw [he] | |
| exact (G.measurableSet_boundedDomainFreshExit D HαΆ x hx N M).preimage (measurable_inter_block _) | |
| lemma entry_good_independent [Countable V] [Countable E] | |
| (q : unitInterval) (D H : Set V) (o x : V) (hx : xβH) (N : β) (M : ββ₯0β) : | |
| (G.law q) ({Ο | xβG.entrySeeds D o Ο}β©G.boundedDomainFreshExitEvent D HαΆ x N M)= | |
| (G.law q) {Ο | xβG.entrySeeds D o Ο}* | |
| (G.law q) (G.boundedDomainFreshExitEvent D HαΆ x N M) := by | |
| have hdis : Disjoint (G.inducedEdges D)αΆ (G.inducedEdges D\G.inducedEdges H) := | |
| Set.disjoint_left.mpr (fun e he hf => he hf.1) | |
| simpa only [law,βlaw_const] using ((independent_disjoint_blocks (fun _ : E => q) _ _ hdis).indepSet_of_measurableSet | |
| (G.measurableSet_entrySeed D o x) (G.measurableSet_boundedLayer D H x hx N M)).measure_inter_eq_mul | |
| end CriticalPercolation.BondGraph | |
| end | |
| end | |
| end OAI | |