introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.88 kB
import Mathlib
namespace OAI
open Set MeasureTheory ProbabilityTheory
namespace CriticalPercolation
/-- An undirected graph with labelled bonds, including loops and parallel bonds. -/
structure BondGraph (V E : Type*) where
ends : E β†’ Sym2 V
namespace BondGraph
variable {V E : Type*} (G : BondGraph V E)
/-- The graph of retained bonds. `fromEdgeSet` discards loops. -/
def openGraph (Ο‰ : Set E) : SimpleGraph V :=
SimpleGraph.fromEdgeSet (G.ends '' Ο‰)
/-- The underlying connectivity graph with every bond retained. -/
def fullGraph : SimpleGraph V := G.openGraph Set.univ
/-- Local finiteness counts bonds, not just distinct neighbors. -/
def LocallyFinite : Prop := βˆ€ v : V, {e : E | v ∈ G.ends e}.Finite
/-- Automorphisms preserve the vertex and bond structure, including multiplicities. -/
structure Aut where
vertex : V ≃ V
edge : E ≃ E
preserves : βˆ€ e, G.ends (edge e) = Sym2.map vertex (G.ends e)
/-- Finitely many vertex orbits under the full automorphism group. -/
def QuasiTransitive : Prop :=
βˆƒ S : Set V, S.Finite ∧ βˆ€ v : V, βˆƒ s ∈ S, βˆƒ Ο† : G.Aut, Ο†.vertex s = v
/-- Finite open paths, including the path of length zero, define the open cluster. -/
def cluster (Ο‰ : Set E) (v : V) : Set V := {w | (G.openGraph Ο‰).Reachable v w}
/-- The event that at least one open cluster is infinite. -/
def percolates : Set (Set E) := {Ο‰ | βˆƒ v : V, (G.cluster Ο‰ v).Infinite}
/-- Independent retention with parameter `p ∈ [0,1]` of each labelled bond. -/
noncomputable def law (_G : BondGraph V E) (p : unitInterval) : Measure (Set E) :=
ProbabilityTheory.setBernoulli Set.univ p
/-- The infimum of parameters with positive probability of an infinite cluster. -/
noncomputable def criticalProbability : unitInterval :=
sInf {p : unitInterval | 0 < G.law p G.percolates}
end BondGraph
end CriticalPercolation
end OAI