Download data/lean/OAI/Probability/CriticalPercolation/Modular/ExpectedIncidenceTransport.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.93 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/ExpectedIncidenceTransport.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Modular/ExpectedIncidenceTransport.lean
-
curl -L -o ExpectedIncidenceTransport.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/ExpectedIncidenceTransport.lean
4.93 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Model | |
| import OAI.Probability.CriticalPercolation.Modular.NormalizedIncidenceTransport | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open Set MeasureTheory Filter | |
| open scoped Classical ENNReal BigOperators | |
| namespace CriticalPercolation | |
| lemma lintegral_ne_top_of_uniform_bound {Ξ± : Type*} [MeasurableSpace Ξ±] | |
| (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (f : Ξ± β ββ₯0β) (C : ββ₯0β) (hC : Cβ β) | |
| (hb : β a, f aβ€C) : (β«β» a, f a βΞΌ)β β := by | |
| apply ne_top_of_le_ne_top (ENNReal.mul_ne_top hC (measure_ne_top ΞΌ Set.univ)) | |
| simpa only [lintegral_const] using lintegral_mono hb | |
| lemma sum_integral_toReal {Ξ± ΞΉ : Type*} [MeasurableSpace Ξ±] (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] | |
| (S : Finset ΞΉ) (F : ΞΉ β Ξ± β ββ₯0β) (hm : β iβS, Measurable (F i)) | |
| (C : ΞΉ β ββ₯0β) (hC : β iβS, C iβ β) (hb : β iβS, β a, F i aβ€C i) : | |
| (β iβS, β« a, (F i a).toReal βΞΌ)=(β iβS, β«β» a, F i a βΞΌ).toReal := by | |
| rw [ENNReal.toReal_sum] | |
| Β· apply Finset.sum_congr rfl | |
| intro i hi | |
| exact integral_toReal (hm i hi).aemeasurable (Eventually.of_forall (fun a => | |
| lt_top_iff_ne_top.mpr (ne_top_of_le_ne_top (hC i hi) (hb i hi a)))) | |
| Β· intro i hi | |
| exact lintegral_ne_top_of_uniform_bound ΞΌ (F i) (C i) (hC i hi) (hb i hi) | |
| namespace BondGraph | |
| variable {V E : Type*} (G : BondGraph V E) | |
| def selectedIncidenceReturn (hl : G.LocallyFinite) (H : Set E β E β ββ₯0β) | |
| (Ο : Set E) (y : V) : ββ₯0β := | |
| β eβ(hl y).toFinset, H Ο e*G.incidentClusterCount Ο e | |
| lemma selectedIncidenceReturn_eq_tsum (hl : G.LocallyFinite) (H : Set E β E β ββ₯0β) | |
| (Ο : Set E) (y : V) : G.selectedIncidenceReturn hl H Ο y = | |
| β' e, if yβG.ends e then H Ο e*G.incidentClusterCount Ο e else 0 := by | |
| rw [tsum_eq_sum (s := (hl y).toFinset) (fun e he => ite_eq_right (by simpa using he))] | |
| apply Finset.sum_congr rfl | |
| intro e he | |
| exact (ite_eq_left ((hl y).mem_toFinset.mp he)).symm | |
| lemma measurable_selectedIncidenceReturn [Countable V] [Countable E] | |
| (hl : G.LocallyFinite) (H : Set E β E β ββ₯0β) (hm : β e, Measurable (fun Ο => H Ο e)) (y : V) : | |
| Measurable (fun Ο => G.selectedIncidenceReturn hl H Ο y) := | |
| Finset.measurable_sum _ (fun e _ => (hm e).mul (G.measurable_incidentClusterCount e)) | |
| lemma selectedIncidenceReturn_le (hc : G.fullGraph.Connected) (hl : G.LocallyFinite) | |
| (H : Set E β E β ββ₯0β) (hH : β Ο e, H Ο eβ€1) (Ο : Set E) (y : V) : | |
| G.selectedIncidenceReturn hl H Ο yβ€(hl y).toFinset.card*2 := by | |
| unfold selectedIncidenceReturn | |
| calc _ β€ β _eβ(hl y).toFinset, (2:ββ₯0β) := by | |
| apply Finset.sum_le_sum | |
| intro e _ | |
| exact (mul_le_mul' (hH Ο e) (G.incidentClusterCount_le_two hc hl Ο e)).trans_eq (one_mul 2) | |
| _ = _ := by simp | |
| lemma selectedIncidenceReturn_toReal (hc : G.fullGraph.Connected) (hl : G.LocallyFinite) | |
| (H : Set E β E β ββ₯0β) (hH : β Ο e, H Ο eβ€1) (Ο : Set E) (y : V) : | |
| (G.selectedIncidenceReturn hl H Ο y).toReal= | |
| β eβ(hl y).toFinset, (H Ο e).toReal*(G.incidentClusterCount Ο e).toReal := by | |
| unfold selectedIncidenceReturn | |
| rw [ENNReal.toReal_sum] | |
| Β· simp only [ENNReal.toReal_mul] | |
| Β· intro e _ | |
| exact ENNReal.mul_ne_top (ne_top_of_le_ne_top ENNReal.one_ne_top (hH Ο e)) | |
| (ne_top_of_le_ne_top (by norm_num : (2:ββ₯0β)β β) (G.incidentClusterCount_le_two hc hl Ο e)) | |
| lemma expected_selectedIncidence_real [Countable V] [Countable E] | |
| (hc : G.fullGraph.Connected) (hl : G.LocallyFinite) (hq : G.QuasiTransitive) | |
| (D K : β) (hD : β v, (G.incidentEdges {v}).ncardβ€D) | |
| (hK : β v, (G.vertexBall v 1).ncardβ€K) | |
| (p : unitInterval) (H : Set E β E β ββ₯0β) | |
| (hm : β e, Measurable (fun Ο => H Ο e)) (hH : β Ο e, H Ο eβ€1) | |
| (ha : β (Ο : G.Aut) Ο e, H (Ο.edge '' Ο) (Ο.edge e)=H Ο e) : | |
| (β xβ(G.orbitRepresentatives hq).roots, β« Ο, (G.normalizedSelectedIncidence H Ο x).toReal βG.law p)= | |
| β yβ(G.orbitRepresentatives hq).roots, β« Ο, (G.selectedIncidenceReturn hl H Ο y).toReal βG.law p := by | |
| rw [sum_integral_toReal (G.law p) _ _ (fun x _ => G.measurable_normalizedSelectedIncidence H hm x) | |
| (fun _ => (D*(2*K) : β)) (fun _ _ => ENNReal.natCast_ne_top _) | |
| (fun x _ Ο => G.normalizedSelectedIncidence_le hc hl D K hD hK H hH Ο x), | |
| sum_integral_toReal (G.law p) _ _ (fun y _ => G.measurable_selectedIncidenceReturn hl H hm y) | |
| (fun y => (hl y).toFinset.card*2) (fun _ _ => ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) (by norm_num)) | |
| (fun y _ Ο => G.selectedIncidenceReturn_le hc hl H hH Ο y)] | |
| congr 1 | |
| simp_rw [G.selectedIncidenceReturn_eq_tsum] | |
| exact G.expected_normalizedSelectedIncidence hc hl hq p H hm ha | |
| end BondGraph | |
| end CriticalPercolation | |
| end | |
| end | |
| end OAI | |