math / data /lean /OAI /Probability /CriticalPercolation /Modular /HeavyDiscrepancy.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.69 kB
import Mathlib
import OAI.Probability.CriticalPercolation.Modular.NormalizedDiscrepancy
import OAI.Probability.CriticalPercolation.Modular.DiscrepancyTail
import OAI.Probability.CriticalPercolation.Modular.HeavyThinning
import OAI.Probability.CriticalPercolation.ProductMeasure.MonotoneBernoulli
namespace OAI
section
noncomputable section
open Set MeasureTheory Filter
open scoped Classical ENNReal Topology BigOperators
namespace CriticalPercolation
lemma ennreal_tendsto_zero_of_uniform_tail (f g : β„• β†’ ℝβ‰₯0∞) (c b : β„• β†’ ℝβ‰₯0∞)
(hc : βˆ€ N, c Nβ‰ βˆž) (hg : Tendsto g atTop (𝓝 0)) (hb : Tendsto b atTop (𝓝 0))
(hle : βˆ€ N n, f n≀c N*g n+b N) : Tendsto f atTop (𝓝 0) := by
apply ENNReal.tendsto_nhds_zero.mpr
intro Ξ΅ hΞ΅
have hh := ENNReal.half_pos hΞ΅.ne'
obtain ⟨N,hN⟩ := (ENNReal.tendsto_nhds_zero.mp hb (Ρ/2) hh).exists
have ht : Tendsto (fun n => c N*g n) atTop (𝓝 0) := by
simpa only [mul_zero] using ENNReal.Tendsto.const_mul hg (Or.inr (hc N))
filter_upwards [ENNReal.tendsto_nhds_zero.mp ht (Ξ΅/2) hh] with n hn
exact (hle N n).trans ((add_le_add hn hN).trans_eq (ENNReal.add_halves Ξ΅))
namespace BondGraph
open BernoulliProduct
variable {V E : Type*} (G : BondGraph V E) [Countable V] [Countable E]
omit [Countable V] [Countable E] in
lemma clusterPeakRatio_ne_zero_of_mass_ne_top (hc : G.fullGraph.Connected) (hl : G.LocallyFinite)
(Ο‰ : Set E) (x : V) (hm : G.modularMass x (G.cluster Ο‰ x)β‰ βˆž) :
G.clusterPeakRatio ω x≠0 := by
obtain ⟨y,hy⟩ := G.clusterPeaks_nonempty_of_mass_ne_top hc hl Ο‰ x hm
rw [G.clusterPeakRatio_eq_inv_mass hc hl Ο‰ x y hm hy]
exact ENNReal.inv_ne_zero.mpr (fun he => hm ((G.modularMass_eq_top_change_base hc hl x y _).mpr he))
omit [Countable V] [Countable E] in
lemma normalizedDiscrepancy_le_ratio_add_tail (hc : G.fullGraph.Connected) (hl : G.LocallyFinite)
(D K : β„•) (hD : βˆ€ v, (G.incidentEdges {v}).ncard≀D)
(hK : βˆ€ v, (G.vertexBall v 1).ncard≀K) (p : unitInterval) (T : ℝβ‰₯0∞)
(Ο‰ : Set E) (x : V) :
G.normalizedAbsoluteDiscrepancy p Ο‰ x ≀
(D*(2*K) : β„•)*T*G.clusterPeakRatio Ο‰ x + G.discrepancyVolumeTail p T Ο‰ x := by
by_cases ht : T≀G.normalizedClusterVolume Ο‰ x
Β· rw [discrepancyVolumeTail,ite_eq_left ht]
exact le_add_left le_rfl
Β· by_cases hm : G.modularMass x (G.cluster Ο‰ x)=∞
Β· simp only [normalizedAbsoluteDiscrepancy,hm,ENNReal.div_top,zero_le]
Β· have hr := G.clusterPeakRatio_ne_zero_of_mass_ne_top hc hl Ο‰ x hm
have hr' := ne_top_of_le_ne_top ENNReal.one_ne_top (G.clusterPeakRatio_le_one hc hl Ο‰ x)
have hv : G.normalizedClusterVolume Ο‰ x*G.clusterPeakRatio Ο‰ x=1 := by
rw [normalizedClusterVolume,ite_eq_right hr,ENNReal.inv_mul_cancel hr hr']
have hone : 1≀T*G.clusterPeakRatio Ο‰ x := by
rw [←hv]
exact mul_le_mul_left (le_of_not_ge ht) _
calc _ ≀ ((D*(2*K) : β„•) : ℝβ‰₯0∞) := G.normalizedAbsoluteDiscrepancy_le hc hl D K hD hK p p.property Ο‰ x
_ ≀ (D*(2*K) : β„•)*T*G.clusterPeakRatio Ο‰ x := by
simpa only [mul_one,mul_assoc] using mul_le_mul_right hone ((D*(2*K) : β„•) : ℝβ‰₯0∞)
_ ≀ _ := le_add_right le_rfl
lemma expected_heavy_normalizedDiscrepancy_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 q : unitInterval) (N : β„•)
(x : V) (hx : x∈(G.orbitRepresentatives hq).roots) :
(∫⁻ u, if G.heavyFlag p u x then G.normalizedAbsoluteDiscrepancy q (atParameter q u) x else 0 βˆ‚markLaw) ≀
((D*(2*K) : β„•)*ENNReal.ofReal ((16:ℝ)^N)) *
(∫⁻ u, if G.heavyFlag p u x then G.clusterPeakRatio (atParameter q u) x else 0 βˆ‚markLaw) +
(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 C : ℝβ‰₯0∞ := (D*(2*K) : β„•)*ENNReal.ofReal ((16:ℝ)^N)
let r := fun u => if G.heavyFlag p u x then G.clusterPeakRatio (atParameter q u) x else 0
have hm : Measurable r := ((G.measurable_clusterPeakRatio x).comp (measurable_atParameter q)).ite
(G.measurable_heavyFlag p x).setOf measurable_const
calc
_ ≀ ∫⁻ u, C*r u+G.discrepancyVolumeTail q (ENNReal.ofReal ((16:ℝ)^N)) (atParameter q u) x βˆ‚markLaw := by
apply lintegral_mono
intro u
by_cases h : G.heavyFlag p u x
Β· simpa only [h,ite_true,r,C] using G.normalizedDiscrepancy_le_ratio_add_tail hc hl D K hD hK q
(ENNReal.ofReal ((16:ℝ)^N)) (atParameter q u) x
Β· simp only [h,ite_false,zero_le]
_ = C*(∫⁻ u, r u βˆ‚markLaw) + (∫⁻ Ο‰, G.discrepancyVolumeTail q (ENNReal.ofReal ((16:ℝ)^N)) Ο‰ x βˆ‚G.law q) := by
rw [lintegral_add_left (show Measurable (fun u => C*r u) from measurable_const.mul hm),
lintegral_const_mul'' C hm.aemeasurable]
congr 1
rw [show G.law q=(markLaw (E := E)).map (atParameter q) from by simpa only [BondGraph.law, BernoulliProduct.law_const] using (markLaw_map_atParameter (E := E) q).symm,
lintegral_map (G.measurable_discrepancyVolumeTail q _ x) (measurable_atParameter q)]
_ ≀ _ := add_le_add le_rfl (G.expected_discrepancyTail_bound hc hl hq D K hD hK q N x hx)
theorem tendsto_expected_heavy_normalizedDiscrepancy
(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) (q : β„• β†’ unitInterval) (hmono : Monotone q)
(hqp : βˆ€ n, q n≀p) (hlim : Tendsto q atTop (𝓝 p))
(x : V) (hx : x∈(G.orbitRepresentatives hq).roots) :
Tendsto (fun n => ∫⁻ u, if G.heavyFlag p u x then
G.normalizedAbsoluteDiscrepancy (q n) (atParameter (q n) u) x else 0 βˆ‚markLaw) atTop (𝓝 0) := by
let r := fun n => ∫⁻ u, if G.heavyFlag p u x then G.clusterPeakRatio (atParameter (q n) u) x else 0 βˆ‚markLaw
have hr : Tendsto r atTop (𝓝 0) := by
apply tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds
(G.tendsto_sum_expected_heavy_clusterPeakRatio hc hl hq p q hmono hqp hlim)
Β· exact fun _ => zero_le
Β· intro n
exact Finset.single_le_sum (f := fun y => ∫⁻ u,
if G.heavyFlag p u y then G.clusterPeakRatio (atParameter (q n) u) y else 0 βˆ‚markLaw)
(fun _ _ => zero_le) hx
apply ennreal_tendsto_zero_of_uniform_tail _ r
(fun N => (D*(2*K) : β„•)*ENNReal.ofReal ((16:ℝ)^N))
(fun N => (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)
Β· intro N
exact ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) ENNReal.ofReal_ne_top
Β· exact hr
Β· let A : ℝβ‰₯0∞ := (G.orbitRepresentatives hq).roots.card *
ENNReal.ofReal (5*((D*(2*K)^2 : β„•)*16)^2*((G.orbitRepresentatives hq).roots.card : ℝ)^3+1)
have hA : Aβ‰ βˆž := ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) ENNReal.ofReal_ne_top
have ht := ENNReal.Tendsto.const_mul (a := A) (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one
(show ENNReal.ofReal (1/2:ℝ)<1 by norm_num)) (Or.inr hA)
simpa only [mul_zero,zero_mul] using ENNReal.Tendsto.mul_const ht (Or.inr (by norm_num : (2:ℝβ‰₯0∞)β‰ βˆž))
Β· intro N n
exact G.expected_heavy_normalizedDiscrepancy_bound hc hl hq D K hD hK p (q n) N x hx
end BondGraph
end CriticalPercolation
end
end
end OAI