Download data/lean/OAI/Probability/CriticalPercolation/GraphGeometry/Connects.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.61 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/GraphGeometry/Connects.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/GraphGeometry/Connects.lean
-
curl -L -o Connects.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/GraphGeometry/Connects.lean
4.61 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.GraphGeometry.EraseBond | |
| import OAI.Probability.CriticalPercolation.GraphGeometry.WiredEvent | |
| namespace OAI | |
| section | |
| section | |
| open Set MeasureTheory ProbabilityTheory | |
| open Set | |
| open scoped BigOperators | |
| open scoped Classical | |
| namespace CriticalPercolation.BondGraph | |
| open scoped Classical | |
| open FiniteProduct | |
| variable {V E : Type*} (G : BondGraph V E) | |
| def connects (a t : V) (Ο : Set E) : Prop := (G.openGraph Ο).Reachable a t | |
| lemma connects_mono (a t : V) : β (Ο Ο' : Set E), Ο β Ο' β G.connects a t Ο β G.connects a t Ο' := | |
| fun _ _ h => fun hr => hr.mono (G.openGraph_mono h) | |
| lemma eraseBond_force (f : E) (a : V) (Ο : Set E) (b : Prop) : | |
| (G.eraseBond f a).openGraph (Function.update Ο f b) = (G.eraseBond f a).openGraph Ο := by | |
| erw [G.eraseBond_openGraph,G.eraseBond_openGraph] | |
| congr 1 | |
| ext e | |
| change (e β f β§ Function.update Ο f b e) β (e β f β§ e β Ο) | |
| by_cases h : e = f | |
| Β· subst e; simp | |
| Β· erw [Function.update_of_ne h] | |
| rfl | |
| lemma connects_eq_wired_deleted (f : E) (a v z t : V) (Ο : Set E) | |
| (hf : f β Ο) (he : G.ends f = s(v,z)) | |
| (hv : ((G.eraseBond f a).openGraph Ο).Reachable a v) : | |
| G.connects a t Ο β (G.eraseBond f a).wiredEvent a z t Ο := by | |
| dsimp only [connects,wiredEvent] | |
| rw [G.openGraph_eq_eraseBond_sup f a v z Ο hf he] | |
| exact Wiring.reachable_replace_tail _ a v z a t hv | |
| lemma pivot_eq_deleted_joined (f : E) (a v z t : V) (Ο : Set E) | |
| (hf : f β Ο) (he : G.ends f = s(v,z)) | |
| (hv : ((G.eraseBond f a).openGraph Ο).Reachable a v) : | |
| openPivot (G.connects a t) f Ο β (G.eraseBond f a).joinedPair a z t Ο := by | |
| unfold openPivot | |
| rw [G.connects_eq_wired_deleted f a v z t Ο hf he hv] | |
| have hclose : G.connects a t (Function.update Ο f False) β | |
| ((G.eraseBond f a).openGraph Ο).Reachable a t := by | |
| dsimp only [connects] | |
| erw [β G.eraseBond_openGraph_force_false] | |
| erw [hclose] | |
| exact (and_iff_right hf).trans ((G.eraseBond f a).earlier_pivot_iff a z t Ο) | |
| variable [Fintype E] | |
| lemma deleted_joined_pin_eq (w : E β Prop β β) (hw : β e, β b, w e b = 1) | |
| (f : E) (h0 : w f False β 0) (h1 : w f True β 0) (a z t : V) : | |
| prob (pin w f True) ((G.eraseBond f a).joinedPair a z t) = | |
| prob (pin w f False) ((G.eraseBond f a).joinedPair a z t) := by | |
| rw [prob_pin_transport w hw f False True h0 h1] | |
| apply prob_congr | |
| intro Ο | |
| dsimp [joinedPair,isolateThree] | |
| erw [G.eraseBond_force] | |
| lemma delta_eq_deleted_joined (w : E β Prop β β) (hw : β e, β b, w e b = 1) | |
| (f : E) (h0 : w f False β 0) (h1 : w f True β 0) (a v z t : V) | |
| (he : G.ends f = s(v,z)) | |
| (hv : β Ο, density (pin w f False) Ο β 0 β ((G.eraseBond f a).openGraph Ο).Reachable a v) : | |
| delta w (G.connects a t) f = prob (pin w f True) ((G.eraseBond f a).joinedPair a z t) := by | |
| rw [G.deleted_joined_pin_eq w hw f h0 h1 a z t, | |
| delta_eq_pivotal w hw f h0 h1 _ (G.connects_mono a t)] | |
| apply prob_congr_support | |
| intro Ο hΟ | |
| have hf0 := density_pin_support w f False Ο hΟ | |
| have hf1 : Function.update Ο f True f := by | |
| erw [Function.update_self] | |
| trivial | |
| have hv' : ((G.eraseBond f a).openGraph (Function.update Ο f True)).Reachable a v := by | |
| erw [G.eraseBond_force] | |
| exact hv Ο hΟ | |
| have hopen := G.connects_eq_wired_deleted f a v z t (Function.update Ο f True) hf1 he hv' | |
| have hgraph : G.openGraph Ο = (G.eraseBond f a).openGraph Ο := by | |
| erw [G.eraseBond_openGraph_force_false] | |
| have hu : Function.update Ο f False = Ο := by | |
| erw [β hf0,Function.update_eq_self] | |
| erw [hu] | |
| erw [hopen] | |
| dsimp only [wiredEvent,connects] | |
| erw [G.eraseBond_force,hgraph] | |
| exact (G.eraseBond f a).earlier_pivot_iff a z t Ο | |
| end CriticalPercolation.BondGraph | |
| namespace CriticalPercolation.Wiring | |
| variable {V : Type*} | |
| lemma pivot_component_avoids (H : SimpleGraph V) (A B : Set V) (w a z : V) | |
| (ha : a β A) (hA : β u β A, H.Reachable w u) | |
| (hopen : β t β B, (H β SimpleGraph.edge a z).Reachable w t) | |
| (hclosed : Β¬β t β B, H.Reachable w t) : | |
| (β t β B, H.Reachable z t) β§ β u β A, Β¬H.Reachable z u := by | |
| obtain β¨t,ht,hwtβ© := hopen | |
| have hzt : H.Reachable z t := by | |
| rcases (reachable_sup_edge H a z w t).mp hwt with h | β¨_,hβ© | β¨_,hβ© | |
| Β· exact (hclosed β¨t,ht,hβ©).elim | |
| Β· exact h | |
| Β· exact (hclosed β¨t,ht,(hA a ha).trans hβ©).elim | |
| refine β¨β¨t,ht,hztβ©,?_β© | |
| intro u hu hzu | |
| exact hclosed β¨t,ht,(hA u hu).trans (hzu.symm.trans hzt)β© | |
| end CriticalPercolation.Wiring | |
| end | |
| end | |
| end OAI | |