math / data /lean /OAI /Probability /CriticalPercolation /ProductMeasure /LevelContactMeasurability.lean
Download data/lean/OAI/Probability/CriticalPercolation/ProductMeasure/LevelContactMeasurability.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/ProductMeasure/LevelContactMeasurability.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/ProductMeasure/LevelContactMeasurability.lean
-
curl -L -o LevelContactMeasurability.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/ProductMeasure/LevelContactMeasurability.lean
7 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.GraphGeometry.VertexBall | |
| import OAI.Probability.CriticalPercolation.Gluing.LevelContactGeometry | |
| import OAI.Probability.CriticalPercolation.ProductMeasure.TailProduct | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open Set Function MeasureTheory ProbabilityTheory | |
| open scoped Classical BigOperators ENNReal | |
| namespace CriticalPercolation | |
| def finiteSetChoice {E : Type*} (S : Set E) : Finset E := | |
| if h : S.Finite then h.toFinset else β | |
| lemma finiteSetChoice_coe {E : Type*} {S : Set E} (hS : S.Finite) : | |
| (finiteSetChoice S : Set E)=S := by simp [finiteSetChoice,hS] | |
| lemma finiteSetChoice_eq_iff {E : Type*} (S : Set E) (U : Finset E) : | |
| finiteSetChoice S=U β S=(U : Set E) β¨ (Β¬S.Finite β§ U=β ) := by | |
| by_cases hS : S.Finite | |
| Β· have hh : finiteSetChoice S=U β S=(U : Set E) := by | |
| calc | |
| finiteSetChoice S=U β (finiteSetChoice S : Set E)=(U : Set E) := Finset.coe_inj.symm | |
| _ β S=(U : Set E) := by rw [finiteSetChoice_coe hS] | |
| simpa [hS] using hh | |
| Β· have hne : Sβ (U : Set E) := fun h => hS (h βΈ U.finite_toSet) | |
| simp [finiteSetChoice,hS,hne,eq_comm] | |
| lemma measurableSet_set_eq_const {Ξ© E : Type*} {m : MeasurableSpace Ξ©} [Countable E] | |
| (S : Ξ© β Set E) (hS : @Measurable Ξ© (Set E) m inferInstance S) (U : Set E) : | |
| MeasurableSet[m] {Ο | S Ο=U} := by | |
| let : MeasurableSpace Ξ© := m | |
| have he : {Ο | S Ο=U}={Ο | β e, eβS Ο β eβU} := by | |
| ext Ο | |
| exact Set.ext_iff | |
| rw [he] | |
| exact (Measurable.forall (fun e => ((measurable_pi_apply e).comp hS).iff measurable_const)).setOf | |
| lemma measurableSet_finiteSetChoice {Ξ© E : Type*} [MeasurableSpace Ξ©] [Countable E] | |
| (S : Ξ© β Set E) (hS : Measurable S) (U : Finset E) : | |
| MeasurableSet {Ο | finiteSetChoice (S Ο)=U} := by | |
| have hmfinite : MeasurableSet {Ο | (S Ο).Finite} := by | |
| have he : {Ο | (S Ο).Finite}=β F : Finset E, {Ο | S Ο=(F : Set E)} := by | |
| ext Ο | |
| simp only [Set.mem_ofPred_eq,Set.mem_iUnion] | |
| exact β¨fun h => β¨h.toFinset,h.coe_toFinset.symmβ©, | |
| fun β¨F,hFβ© => hF βΈ F.finite_toSetβ© | |
| rw [he] | |
| exact MeasurableSet.iUnion (fun F => measurableSet_set_eq_const S hS _) | |
| simp_rw [finiteSetChoice_eq_iff] | |
| exact (measurableSet_set_eq_const S hS _).union | |
| (hmfinite.compl.inter (MeasurableSet.const _)) | |
| namespace BernoulliProduct | |
| variable {E : Type*} | |
| lemma measurable_inter_block (X : Set E) : | |
| @Measurable (Set E) (Set E) (blockSigma X) inferInstance (fun Ο => Οβ©X) := by | |
| have hh := measurable_forceOn_block XαΆ (β : Set E) | |
| rw [compl_compl] at hh | |
| have he : forceOn XαΆ (β : Set E)=(fun Ο : Set E => Οβ©X) := by | |
| unfold forceOn | |
| funext configuration | |
| apply Set.ext | |
| intro edge | |
| rw [Set.mem_inter_iff] | |
| simp only [Membership.mem, Set.Mem] | |
| split_ifs with hedge | |
| Β· exact β¨False.elim, fun hmem => hedge hmem.2β© | |
| Β· exact β¨fun hmem => β¨hmem, not_not.mp hedgeβ©, And.leftβ© | |
| rw [he] at hh | |
| exact hh | |
| end BernoulliProduct | |
| namespace BondGraph | |
| open BernoulliProduct | |
| variable {V E : Type*} (G : BondGraph V E) | |
| lemma incident_ncard_le (S : Set V) (hS : S.Finite) | |
| (D : β) (hD : β vβS, (G.incidentEdges {v}).ncard β€ D) : | |
| (G.incidentEdges S).ncard β€ S.ncard*D := by | |
| have he : G.incidentEdges S=β vβhS.toFinset, G.incidentEdges {v} := by | |
| ext e | |
| simp [incidentEdges] | |
| rw [he] | |
| calc | |
| _ β€ β vβhS.toFinset, (G.incidentEdges {v}).ncard := | |
| Finset.set_ncard_biUnion_le hS.toFinset _ | |
| _ β€ β _vβhS.toFinset, D := Finset.sum_le_sum (fun v hv => hD v (hS.mem_toFinset.mp hv)) | |
| _ = _ := by simp [Set.ncard_eq_toFinset_card S hS] | |
| lemma finite_contactDrop (hlocal : G.LocallyFinite) (Ο : V β β€) (j : β€) (o : V) (Ο : Set E) | |
| (hS : (G.levelContacts Ο j o Ο).Finite) : (G.contactDrop Ο j o Ο).Finite := | |
| (G.finite_incident hlocal hS).subset (G.contactDrop_subset_incident Ο j o Ο) | |
| lemma contactDrop_ncard_le (hlocal : G.LocallyFinite) (Ο : V β β€) (j : β€) (o : V) (Ο : Set E) | |
| (hS : (G.levelContacts Ο j o Ο).Finite) (D : β) | |
| (hD : β vβG.levelContacts Ο j o Ο, (G.incidentEdges {v}).ncard β€ D) : | |
| (G.contactDrop Ο j o Ο).ncard β€ (G.levelContacts Ο j o Ο).ncard*D := | |
| (Set.ncard_le_ncard (G.contactDrop_subset_incident Ο j o Ο) (G.finite_incident hlocal hS)).trans | |
| (G.incident_ncard_le _ hS D hD) | |
| variable [Countable V] [Countable E] | |
| lemma measurable_exteriorCluster (Ο : V β β€) (j : β€) (o : V) : | |
| @Measurable (Set E) (Set V) (blockSigma (G.inducedEdges {v | j β€ Ο v})) inferInstance | |
| (G.exteriorCluster Ο j o) := | |
| (G.measurable_cluster o).comp (measurable_inter_block _) | |
| lemma measurable_levelContacts (Ο : V β β€) (j : β€) (o : V) : | |
| @Measurable (Set E) (Set V) (blockSigma (G.inducedEdges {v | j β€ Ο v})) inferInstance | |
| (G.levelContacts Ο j o) := by | |
| refine @Measurable.of_eval (Set E) V (fun _ => Prop) | |
| (blockSigma (G.inducedEdges {v | j β€ Ο v})) (fun _ => inferInstance) _ ?_ | |
| intro v | |
| exact @Measurable.and (Set E) (blockSigma (G.inducedEdges {v | j β€ Ο v})) _ _ | |
| ((measurable_pi_apply v).comp (G.measurable_exteriorCluster Ο j o)) measurable_const | |
| lemma measurable_contactDrop (Ο : V β β€) (j : β€) (o : V) : | |
| @Measurable (Set E) (Set E) (blockSigma (G.inducedEdges {v | j β€ Ο v})) inferInstance | |
| (G.contactDrop Ο j o) := by | |
| refine @Measurable.of_eval (Set E) E (fun _ => Prop) | |
| (blockSigma (G.inducedEdges {v | j β€ Ο v})) (fun _ => inferInstance) _ ?_ | |
| intro e | |
| exact @Measurable.exists (Set E) V (blockSigma (G.inducedEdges {v | j β€ Ο v})) _ _ (fun v => | |
| @Measurable.and (Set E) (blockSigma (G.inducedEdges {v | j β€ Ο v})) _ _ | |
| ((measurable_pi_apply v).comp (G.measurable_levelContacts Ο j o)) measurable_const) | |
| def fewContacts (Ο : V β β€) (j : β€) (o : V) (k : β) : Set (Set E) := | |
| {Ο | β U : Finset V, G.levelContacts Ο j o Ο=(U : Set V) β§ U.Nonempty β§ U.card<k} | |
| lemma measurableSet_fewContacts (Ο : V β β€) (j : β€) (o : V) (k : β) : | |
| MeasurableSet[blockSigma (G.inducedEdges {v | j β€ Ο v})] (G.fewContacts Ο j o k) := by | |
| have he : G.fewContacts Ο j o k=β U : Finset V, | |
| ({Ο | G.levelContacts Ο j o Ο=(U : Set V)}β©{_Ο | U.Nonempty β§ U.card<k}) := by | |
| ext Ο | |
| simp [fewContacts] | |
| rw [he] | |
| exact MeasurableSet.iUnion (fun U => | |
| (measurableSet_set_eq_const _ (G.measurable_levelContacts Ο j o) (U : Set V)).inter | |
| (MeasurableSet.const _)) | |
| omit [Countable V] [Countable E] in | |
| lemma fewContacts_finite (Ο : V β β€) (j : β€) (o : V) (k : β) (Ο : Set E) | |
| (hΟ : ΟβG.fewContacts Ο j o k) : | |
| (G.levelContacts Ο j o Ο).Finite β§ (G.levelContacts Ο j o Ο).Nonempty β§ | |
| (G.levelContacts Ο j o Ο).ncard<k := by | |
| obtain β¨U,hU,hne,hcardβ© := hΟ | |
| rw [hU] | |
| exact β¨U.finite_toSet,hne,by simpa using hcardβ© | |
| end BondGraph | |
| end CriticalPercolation | |
| end | |
| end | |
| end | |
| end OAI | |