Download data/lean/OAI/Probability/CriticalPercolation/Exploration/ReachableMemPhaseClosed.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Exploration/ReachableMemPhaseClosed.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/CriticalPercolation/Exploration/ReachableMemPhaseClosed.lean
-
curl -L -o ReachableMemPhaseClosed.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/CriticalPercolation/Exploration/ReachableMemPhaseClosed.lean
3.34 kB
| import Mathlib | |
| import OAI.Probability.CriticalPercolation.Exploration.PhaseFrontier | |
| namespace OAI | |
| section | |
| section | |
| open Set MeasureTheory ProbabilityTheory | |
| open Set | |
| open scoped BigOperators | |
| open scoped Classical | |
| namespace CriticalPercolation.LazyDFS | |
| open scoped Classical | |
| variable {V E : Type*} [DecidableEq V] [DecidableEq E] | |
| omit [DecidableEq V] [DecidableEq E] in | |
| lemma reachable_mem_of_phase_closed (H : SimpleGraph V) (A : Set V) (S : Finset V) | |
| (hc : β v β S, v β A β β t, H.Adj v t β t β S) {z t : V} | |
| (ha : β a β A, Β¬H.Reachable z a) (ht : H.Reachable z t) (hz : z β S) : t β S := by | |
| have hh : β {u v : V}, H.Walk u v β H.Reachable z u β u β S β v β S := by | |
| intro u v path | |
| induction path with | |
| | nil => exact fun _ h => h | |
| | @cons u v y h path ih => | |
| intro hzu hu | |
| exact ih (hzu.trans h.reachable) (hc u hu (fun hA => ha u hA hzu) v h) | |
| exact ht.elim (fun path => hh path (.refl _) hz) | |
| lemma opened_phaseFrontier (G : BondGraph V E) (order : List (Dart V E)) | |
| (ho : Exhaustive G order) (st : State V E) (f : E) (z : V) : | |
| PhaseFrontier G (st.reached : Set V) (st.opened f z) (push G order z) := by | |
| intro v hv hvA e t het _ | |
| rcases Finset.mem_insert.mp hv with rfl | hv | |
| Β· exact Or.inr (List.mem_filter.mpr | |
| β¨ho v e t het,by simpa only [decide_eq_true_eq,true_and] using hetβ©) | |
| Β· exact (hvA hv).elim | |
| variable [Fintype V] | |
| theorem phase_hits_of_avoiding_connection (G : BondGraph V E) (A : Set V) | |
| (order : List (Dart V E)) (ho : Exhaustive G order) (B : Set V) | |
| (fuel : β) (st : State V E) (young : List (Dart V E)) (Ο : E β Bool) | |
| (hf : PhaseFrontier G A st young) (hc : ReadConsistent G st Ο) | |
| (hr : rank order st young β€ fuel) (H : SimpleGraph V) | |
| (hH : H β€ G.openGraph {e | Ο e = true}) (z : V) (hz : z β st.reached) | |
| (ha : β a β A, Β¬H.Reachable z a) (ht : β t β B, H.Reachable z t) : | |
| β t β ((compile G order B fuel st young).run Ο).reached, t β B := by | |
| rcases phase_success_or_closed G A order ho B fuel st young Ο hf hc hr with h | h | |
| Β· exact h | |
| Β· obtain β¨t,htB,hztβ© := ht | |
| have hclosed : β v β ((compile G order B fuel st young).run Ο).reached, | |
| v β A β β u, H.Adj v u β u β ((compile G order B fuel st young).run Ο).reached := by | |
| intro v hv hvA u hvu | |
| exact h v hv hvA u (hH hvu) | |
| exact β¨t,reachable_mem_of_phase_closed H A _ hclosed ha hzt | |
| ((compile_mono G order B fuel st young Ο).1 hz),htBβ© | |
| theorem phase_no_older_reads (G : BondGraph V E) (A : Set V) | |
| (order : List (Dart V E)) (ho : Exhaustive G order) (B : Set V) | |
| (fuel : β) (st : State V E) (young older : List (Dart V E)) (Ο : E β Bool) | |
| (hf : PhaseFrontier G A st young) (hc : ReadConsistent G st Ο) | |
| (hr : rank order st young β€ fuel) (H : SimpleGraph V) | |
| (hH : H β€ G.openGraph {e | Ο e = true}) (z : V) (hz : z β st.reached) | |
| (ha : β a β A, Β¬H.Reachable z a) (ht : β t β B, H.Reachable z t) : | |
| (compile G order B fuel st (young++older)).reads Ο = | |
| (compile G order B fuel st young).reads Ο := | |
| (compile_append_of_success G order B fuel st young older Ο | |
| (phase_hits_of_avoiding_connection G A order ho B fuel st young Ο hf hc hr H hH z hz ha ht)).2 | |
| end CriticalPercolation.LazyDFS | |
| end | |
| end | |
| end OAI | |