File size: 5,248 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | import Mathlib
import OAI.Probability.CriticalPercolation.Exploration.QueryBand
import OAI.Probability.CriticalPercolation.Exploration.IncidenceIdentity
import OAI.Probability.CriticalPercolation.Exploration.QueryNormalized
import OAI.Probability.CriticalPercolation.Modular.ClusterMassInfinite
namespace OAI
section
noncomputable section
open Set MeasureTheory
open scoped Classical BigOperators
namespace CriticalPercolation.FiniteClusters
open FiniteProduct
variable {V E : Type*} (G : BondGraph V E)
lemma size_pos {Ο : Set E} {v : V} (hC : (G.cluster Ο v).Finite) :
0 < size G Ο v := (Set.ncard_pos hC).mpr β¨v,SimpleGraph.Reachable.refl vβ©
lemma mass_eq_min (s : β) (hs : 0<s) (Ο : Set E) (v : V)
(hC : (G.cluster Ο v).Finite) :
mass G s Ο v = min (1/(s:β)) (1/(size G Ο v : β)) := by
have hm : (0:β)<size G Ο v := Nat.cast_pos.mpr (size_pos G hC)
have hs' : (0:β)<s := Nat.cast_pos.mpr hs
unfold mass cappedMass
by_cases hms : (size G Ο v : β)/s β€ 1
Β· rw [min_eq_left hms,min_eq_left]
Β· field_simp
Β· apply (div_le_div_iffβ hs' hm).mpr
have hh := (div_le_one hs').mp hms
simpa only [one_mul] using hh
Β· have hh : (s:β) β€ size G Ο v := (one_le_div hs').mp (le_of_lt (lt_of_not_ge hms))
rw [min_eq_right (le_of_lt (lt_of_not_ge hms)),min_eq_right]
apply (div_le_div_iffβ hm hs').mpr
simpa only [one_mul] using hh
lemma mass_le_normalized (s T D : β) (hs : 0<s) (hT : 0<T) (hD : 1β€D)
(Ο : Set E) (v : V) (hC : (G.cluster Ο v).Finite) (hTD : T β€ D*size G Ο v) :
mass G s Ο v β€ (D:β)*min (1/(s:β)) (1/(T:β)) := by
rw [mass_eq_min G s hs Ο v hC,mul_min_of_nonneg _ _ (Nat.cast_nonneg D)]
apply le_min
Β· exact (min_le_left _ _).trans
(le_mul_of_one_le_left (by positivity) (Nat.one_le_cast.mpr hD))
Β· apply (min_le_right _ _).trans
rw [mul_one_div]
apply (div_le_div_iffβ (Nat.cast_pos.mpr (size_pos G hC)) (Nat.cast_pos.mpr hT)).mpr
simpa only [one_mul,Nat.cast_mul] using (Nat.cast_le.mpr hTD : (T:β)β€(D*size G Ο v : β))
variable [Fintype E]
lemma rootSum_eq_centered (p : β) (hp : pβ 0) (Ο : Set E) (v : V) :
rootSum G p Ο v = -(IncidenceSearch.tree G v).centeredSum p Ο / p := by
rw [IncidenceSearch.tree_centered,rootSum,tsum_fintype,β Finset.sum_neg_distrib,Finset.sum_div]
apply Finset.sum_congr rfl
intro e _
by_cases he : eβG.incidentEdges (G.cluster Ο v)
Β· by_cases hΟ : eβΟ <;> simp [he,hΟ,hp,coefficient]
Β· simp [he]
lemma finite_rootAbsolute_expect (p : β) (hp : p β Ioo 0 1)
(w : E β Prop β β) (hw : β e, β b, w e b=1) (hn : β e b, 0β€w e b)
(hf : LazyDFS.Fresh w p β
) (D : β) (hDpos : 1β€D)
(hD : β v, (G.incidentEdges {v}).ncard β€ D) (K : β) (v : V) :
expect w (fun Ο => rootAbsolute G (4^K) p Ο v) β€ (D:β)/p*(6/(2:β)^K) := by
let t := IncidenceSearch.tree G v
have hwel (Ο : Set E) : rootAbsolute G (4^K) p Ο v β€
(D:β)/p * (|t.centeredSum p Ο| * min (1/(4:β)^K) (1/(t.queryCount Ο : β))) := by
rw [rootAbsolute,rootSum_eq_centered G p hp.1.ne' Ο v,abs_div,abs_neg,abs_of_pos hp.1]
by_cases hT : t.queryCount Ο = 0
Β· rw [t.centeredSum_eq_zero_of_count Ο hT p]
simp
Β· have hC := G.finite_cluster_of_finite_bonds (Set.toFinite Ο) v
have hTD : t.queryCount Ο β€ D*size G Ο v := by
rw [IncidenceSearch.tree_count,β Set.ncard_eq_toFinset_card']
simpa only [size,mul_comm] using G.incident_ncard_le _ hC D (fun w _ => hD w)
have hh := mass_le_normalized G (4^K) (t.queryCount Ο) D
(by positivity) (Nat.pos_of_ne_zero hT) hDpos Ο v hC hTD
have hh' : mass G (4^K) Ο v β€ (D:β)*min (1/(4:β)^K) (1/(t.queryCount Ο : β)) := by
simpa only [Nat.cast_pow,Nat.cast_ofNat] using hh
calc
_ β€ ((D:β)*min (1/(4:β)^K) (1/(t.queryCount Ο : β))) *
(|t.centeredSum p Ο|/p) := mul_le_mul_of_nonneg_right hh'
(div_nonneg (abs_nonneg _) hp.1.le)
_ = _ := by ring
calc
_ β€ expect w (fun Ο => (D:β)/p *
(|t.centeredSum p Ο| * min (1/(4:β)^K) (1/(t.queryCount Ο : β)))) := expect_mono hn hwel
_ = (D:β)/p * expect w (fun Ο =>
|t.centeredSum p Ο| * min (1/(4:β)^K) (1/(t.queryCount Ο : β))) := expect_const_mul _ _ _
_ β€ _ := mul_le_mul_of_nonneg_left
(t.normalized_centered_bound β
(IncidenceSearch.tree_valid G v) p
β¨hp.1.le,hp.2.leβ© w hw hn hf K) (div_nonneg (Nat.cast_nonneg D) hp.1.le)
lemma finite_rootAbsolute_integral (p : unitInterval) (hp : (p:β) β Ioo 0 1)
(D : β) (hDpos : 1β€D) (hD : β v, (G.incidentEdges {v}).ncard β€ D) (K : β) (v : V) :
(β« Ο, rootAbsolute G (4^K) p Ο v βG.law p) β€ (D:β)/p*(6/(2:β)^K) := by
rw [BondGraph.law,β BernoulliProduct.law_const,BernoulliProduct.integral_law_eq_expect]
exact finite_rootAbsolute_expect G p hp _
(fun _ => BernoulliProduct.bitWeight_sum p) (fun _ => BernoulliProduct.bitWeight_nonneg p)
(fun _ _ => β¨by simp [BernoulliProduct.bitWeight],by simp [BernoulliProduct.bitWeight]β©)
D hDpos hD K v
end CriticalPercolation.FiniteClusters
end
end
end OAI
|