Download data/lean/OAI/Probability/CriticalPercolation/Clusters/ExpectedCluster.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.53 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Clusters/ExpectedCluster.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Clusters/ExpectedCluster.lean
-
curl -L -o ExpectedCluster.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Clusters/ExpectedCluster.lean
3.53 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.GraphGeometry.VertexBall | |
| import OAI.Probability.CriticalPercolation.ProductMeasure.Density | |
| namespace OAI | |
| section | |
| section | |
| open Set MeasureTheory ProbabilityTheory | |
| open scoped BigOperators | |
| open Set | |
| namespace CriticalPercolation.BondGraph | |
| open CriticalPercolation.FiniteProduct CriticalPercolation.ClusterDeletion | |
| variable {V E : Type*} [Fintype V] [Fintype E] (G : BondGraph V E) | |
| lemma finite_spatialMarkov (w : E β Prop β β) (hw : β e, β b, w e b = 1) | |
| (S U : Set V) (F : Set V β SimpleGraph V β β) : | |
| expect w (fun Ο => | |
| F (roots (delete (G.openGraph Ο) U) S) | |
| (delete (G.openGraph Ο) (roots (delete (G.openGraph Ο) U) S))) = | |
| expect w (fun Ο => expect w (fun Ο' => | |
| F (roots (delete (G.openGraph Ο) U) S) | |
| (delete (G.openGraph Ο') (roots (delete (G.openGraph Ο) U) S)))) := by | |
| classical | |
| refine expect_exposure w hw | |
| (fun Ο => roots (delete (G.openGraph Ο) U) S) G.incidentEdges | |
| (G.dependsOn_exact_deleted_roots S U) | |
| (fun W Ο => F W (delete (G.openGraph Ο) W)) ?_ | |
| intro W Ο Ο' hΟ | |
| exact congrArg (F W) (G.delete_openGraph_dependsOn W hΟ) | |
| noncomputable def expectedCluster (w : E β Prop β β) (s : V) | |
| (F : Set V β β) (W : Set V) : β := | |
| expect w (fun Ο => F (component (delete (G.openGraph Ο) W) s)) | |
| noncomputable def expectedResidual (w : E β Prop β β) (S : Set V) (s : V) | |
| (F : Set V β β) (U : Set V) : β := by | |
| classical | |
| exact expect w (fun Ο => | |
| if s β roots (delete (G.openGraph Ο) U) S then | |
| G.expectedCluster w s F (roots (delete (G.openGraph Ο) U) S) - | |
| G.expectedCluster w s F (roots (delete (G.openGraph Ο) U) S βͺ U) | |
| else 0) | |
| lemma expectedResidual_eq (w : E β Prop β β) (hw : β e, β b, w e b = 1) | |
| (S : Set V) (s : V) (F : Set V β β) (U : Set V) : | |
| G.expectedResidual w S s F U = | |
| expect w (fun Ο => residual (G.openGraph Ο) S s F U) := by | |
| classical | |
| have h := G.finite_spatialMarkov w hw S U | |
| (fun W H => if s β W then F (component H s) - F (component (delete H U) s) else 0) | |
| have hu : β H W, delete (delete H W) U = delete H (W βͺ U) := by | |
| intro H W | |
| rw [delete_delete, Set.union_comm] | |
| simp_rw [hu] at h | |
| change _ = expect w (fun Ο => if s β roots (delete (G.openGraph Ο) U) S then | |
| F (component (delete (G.openGraph Ο) (roots (delete (G.openGraph Ο) U) S)) s) - | |
| F (component (delete (G.openGraph Ο) (roots (delete (G.openGraph Ο) U) S βͺ U)) s) | |
| else 0) | |
| rw [h] | |
| unfold expectedResidual | |
| congr 1 | |
| funext Ο | |
| split_ifs | |
| Β· rw [expect_const w hw] | |
| Β· rw [expect_sub] | |
| rfl | |
| lemma expectedResidual_nonneg (w : E β Prop β β) | |
| (hw : β e, β b, w e b = 1) (hpos : β e b, 0 β€ w e b) | |
| (S : Set V) (s : V) {F : Set V β β} (hF : Monotone F) (U : Set V) : | |
| 0 β€ G.expectedResidual w S s F U := by | |
| rw [expectedResidual_eq G w hw, β expect_const w hw 0] | |
| exact expect_mono hpos fun Ο => residual_nonneg (G.openGraph Ο) S s hF U | |
| lemma expectedResidual_monotone (w : E β Prop β β) | |
| (hw : β e, β b, w e b = 1) (hpos : β e b, 0 β€ w e b) | |
| (S : Set V) (s : V) {F : Set V β β} (hF : Monotone F) : | |
| Monotone (G.expectedResidual w S s F) := by | |
| intro U U' hUU' | |
| rw [expectedResidual_eq G w hw, expectedResidual_eq G w hw] | |
| exact expect_mono hpos fun Ο => residual_monotone (G.openGraph Ο) S s hF hUU' | |
| end CriticalPercolation.BondGraph | |
| open scoped BigOperators | |
| end | |
| end | |
| end OAI | |