Download data/lean/OAI/Probability/CriticalPercolation/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.88 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Model.lean
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 | |