Download data/lean/OAI/Probability/CriticalPercolation/Modular/DiscrepancyTail.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.03 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/DiscrepancyTail.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Modular/DiscrepancyTail.lean
-
curl -L -o DiscrepancyTail.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Modular/DiscrepancyTail.lean
5.03 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Modular.WeightedPeakTransport | |
| import OAI.Probability.CriticalPercolation.Modular.GeometricPeakBand | |
| import OAI.Probability.CriticalPercolation.Modular.NormalizedDiscrepancy | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open Set MeasureTheory Filter | |
| open scoped Classical ENNReal BigOperators Topology | |
| namespace CriticalPercolation | |
| lemma ennreal_geometric_band (v : ββ₯0β) (hv : vβ β) (N : β) | |
| (hN : ENNReal.ofReal ((16:β)^N)β€v) : | |
| β m : β, ENNReal.ofReal ((16:β)^(N+m))β€v β§ v<ENNReal.ofReal ((16:β)^(N+m+1)) := by | |
| have hNr : (16:β)^Nβ€v.toReal := (ENNReal.ofReal_le_iff_le_toReal hv).mp hN | |
| have hone : 1β€v.toReal := (one_le_powβ (by norm_num : (1:β)β€16)).trans hNr | |
| obtain β¨k,hk,hk'β© := exists_nat_pow_near hone (by norm_num : (1:β)<16) | |
| have hNk : Nβ€k := by | |
| by_contra h | |
| have hkle : k+1β€N := by omega | |
| have hp : (16:β)^(k+1)β€16^N := pow_le_pow_rightβ (by norm_num) hkle | |
| exact (not_lt_of_ge hNr) (hk'.trans_le hp) | |
| obtain β¨m,rflβ© := Nat.exists_eq_add_of_le hNk | |
| exact β¨m,ENNReal.ofReal_le_of_le_toReal hk,(ENNReal.lt_ofReal_iff_toReal_lt hv).mpr hk'β© | |
| namespace BondGraph | |
| variable {V E : Type*} (G : BondGraph V E) [Countable V] [Countable E] | |
| omit [Countable V] [Countable E] in | |
| lemma normalizedClusterVolume_ne_top (Ο : Set E) (x : V) : G.normalizedClusterVolume Ο xβ β := by | |
| unfold normalizedClusterVolume | |
| split_ifs with h | |
| Β· exact ENNReal.zero_ne_top | |
| Β· exact ENNReal.inv_ne_top.mpr h | |
| def discrepancyVolumeTail (p : β) (T : ββ₯0β) (Ο : Set E) (x : V) : ββ₯0β := | |
| if Tβ€G.normalizedClusterVolume Ο x then G.normalizedAbsoluteDiscrepancy p Ο x else 0 | |
| lemma measurable_discrepancyVolumeTail (p : β) (T : ββ₯0β) (x : V) : | |
| Measurable (fun Ο : Set E => G.discrepancyVolumeTail p T Ο x) := | |
| (G.measurable_normalizedAbsoluteDiscrepancy p x).ite | |
| (measurableSet_le measurable_const (G.measurable_normalizedClusterVolume x)) measurable_const | |
| omit [Countable V] [Countable E] in | |
| lemma discrepancyVolumeTail_le_bands (p : β) (N : β) (Ο : Set E) (x : V) : | |
| G.discrepancyVolumeTail p (ENNReal.ofReal ((16:β)^N)) Ο x β€ | |
| β' m : β, G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+m))) | |
| (ENNReal.ofReal ((16:β)^(N+m+1))) Ο x := by | |
| unfold discrepancyVolumeTail | |
| split_ifs with h | |
| Β· obtain β¨m,hmβ© := ennreal_geometric_band _ (G.normalizedClusterVolume_ne_top Ο x) N h | |
| calc | |
| _ = G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+m))) | |
| (ENNReal.ofReal ((16:β)^(N+m+1))) Ο x := (ite_eq_left hm).symm | |
| _ β€ _ := ENNReal.le_tsum (f := fun index : β => | |
| G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+index))) | |
| (ENNReal.ofReal ((16:β)^(N+index+1))) Ο x) m | |
| Β· exact zero_le | |
| lemma expected_discrepancyTail_bound (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) (N : β) | |
| (x : V) (hx : xβ(G.orbitRepresentatives hq).roots) : | |
| (β«β» Ο, G.discrepancyVolumeTail p (ENNReal.ofReal ((16:β)^N)) Ο x βG.law p) β€ | |
| (G.orbitRepresentatives hq).roots.card * | |
| ENNReal.ofReal (5*((D*(2*K)^2 : β)*16)^2*((G.orbitRepresentatives hq).roots.card : β)^3+1)* | |
| (ENNReal.ofReal (1/2:β))^N*2 := by | |
| let A : β := 5*((D*(2*K)^2 : β)*16)^2*((G.orbitRepresentatives hq).roots.card : β)^3+1 | |
| let R : ββ₯0β := (G.orbitRepresentatives hq).roots.card | |
| calc | |
| _ β€ β«β» Ο, β' m : β, G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+m))) | |
| (ENNReal.ofReal ((16:β)^(N+m+1))) Ο x βG.law p := | |
| lintegral_mono (fun Ο => G.discrepancyVolumeTail_le_bands p N Ο x) | |
| _ = β' m : β, β«β» Ο, G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+m))) | |
| (ENNReal.ofReal ((16:β)^(N+m+1))) Ο x βG.law p := | |
| lintegral_tsum (fun m => (G.measurable_discrepancyVolumeBand p _ _ x).aemeasurable) | |
| _ β€ β' m : β, R * ENNReal.ofReal (A*(1/2:β)^(N+m)) := by | |
| apply ENNReal.tsum_le_tsum | |
| intro m | |
| exact (Finset.single_le_sum (f := fun y => β«β» Ο, | |
| G.discrepancyVolumeBand p (ENNReal.ofReal ((16:β)^(N+m))) | |
| (ENNReal.ofReal ((16:β)^(N+m+1))) Ο y βG.law p) (fun _ _ => zero_le) hx).trans | |
| (G.expected_discrepancyBand_geometric hc hl hq D K hD hK p (N+m)) | |
| _ = _ := by | |
| have he (m : β) : ENNReal.ofReal (A*(1/2:β)^(N+m)) = | |
| ENNReal.ofReal A * (ENNReal.ofReal (1/2:β))^N * (ENNReal.ofReal (1/2:β))^m := by | |
| rw [ENNReal.ofReal_mul (show 0β€A by dsimp [A]; positivity), | |
| ENNReal.ofReal_pow (by norm_num : (0:β)β€1/2),pow_add,mul_assoc] | |
| simp_rw [he,βmul_assoc] | |
| rw [ENNReal.tsum_mul_left,ENNReal.tsum_geometric] | |
| norm_num [R,A,ENNReal.ofReal_div_of_pos] | |
| end BondGraph | |
| end CriticalPercolation | |
| end | |
| end | |
| end OAI | |