import Mathlib import OAI.Probability.CriticalPercolation.GraphGeometry.FiniteInduced import OAI.Probability.CriticalPercolation.GraphGeometry.HitEvent import OAI.Probability.CriticalPercolation.GraphGeometry.VertexBall namespace OAI section section noncomputable section open Set Function MeasureTheory ProbabilityTheory open scoped Classical BigOperators ENNReal namespace CriticalPercolation.BondGraph open BernoulliProduct variable {V E : Type*} (G : BondGraph V E) def exteriorCluster (π : V → ℤ) (j : ℤ) (o : V) (ω : Set E) : Set V := G.cluster (ω∩G.inducedEdges {v | j ≤ π v}) o def levelContacts (π : V → ℤ) (j : ℤ) (o : V) (ω : Set E) : Set V := G.exteriorCluster π j o ω∩{v | π v=j} def contactDrop (π : V → ℤ) (j : ℤ) (o : V) (ω : Set E) : Set E := {e | ∃ v∈G.levelContacts π j o ω, ∃ w, π w Disjoint (G.minimumLevel π o i) (G.minimumLevel π o j)) := by intro i j hij apply Set.disjoint_left.mpr rintro ω ⟨⟨v,hv,hvi⟩,hnoti⟩ ⟨⟨w,hw,hwj⟩,hnotj⟩ rcases lt_or_gt_of_ne hij with hlt|hgt · exact hnotj ⟨v,hv,by change π v < j; rw [hvi]; exact hlt⟩ · exact hnoti ⟨w,hw,by change π w < i; rw [hwj]; exact hgt⟩ lemma measurableSet_minimumLevel [Countable V] [Countable E] (π : V → ℤ) (o : V) (j : ℤ) : MeasurableSet (G.minimumLevel π o j) := (G.measurableSet_hitEvent o _).diff (G.measurableSet_hitEvent o _) end CriticalPercolation.BondGraph end end end end OAI