Download data/lean/OAI/Probability/Ballisticity/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.86 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Ballisticity/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/Ballisticity/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Ballisticity/Model.lean
3.86 kB
| import Mathlib | |
| namespace OAI | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal BigOperators Topology | |
| namespace DirectionalTransience | |
| abbrev Lattice (d : β) := Fin d β β€ | |
| abbrev Direction (d : β) := Fin d Γ Bool | |
| abbrev Vector (d : β) := Fin d β β | |
| abbrev Row (d : β) := {p : Direction d β ββ₯0 // β e, p e = 1} | |
| abbrev Environment (d : β) := Lattice d β Row d | |
| abbrev State (d : β) := Environment d Γ Lattice d | |
| abbrev Path (d : β) := β β Lattice d | |
| def step {d : β} (e : Direction d) : Lattice d := | |
| fun i => if i = e.1 then (if e.2 then 1 else -1) else 0 | |
| noncomputable def environmentLaw {d : β} (Ξ½ : Measure (Row d)) : | |
| Measure (Environment d) := Measure.infinitePi (fun _ => Ξ½) | |
| def UniformElliptic {d : β} (Ξ½ : Measure (Row d)) : Prop := | |
| β ΞΊ : ββ₯0, 0 < ΞΊ β§ βα΅ p βΞ½, β e, ΞΊ β€ p.1 e | |
| lemma measurable_current_row {d : β} : | |
| Measurable (fun z : State d => z.1 z.2) := by | |
| apply measurable_from_prod_countable_left | |
| intro x | |
| exact measurable_pi_apply x | |
| noncomputable def transition {d : β} : Kernel (State d) (State d) where | |
| toFun z := β e : Direction d, | |
| ((z.1 z.2).1 e : ββ₯0β) β’ Measure.dirac (z.1, z.2 + step e) | |
| measurable' := by | |
| apply Measure.measurable_of_measurable_coe | |
| intro s hs | |
| simp only [Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] | |
| apply Finset.measurable_fun_sum | |
| intro e _ | |
| apply Measurable.mul | |
| Β· exact (measurable_pi_apply e |>.comp | |
| (measurable_subtype_coe.comp measurable_current_row)).coe_nnreal_ennreal | |
| Β· exact (Measure.measurable_coe hs).comp | |
| (Measure.measurable_dirac.comp (measurable_fst.prodMk | |
| (measurable_snd.add_const (step e)))) | |
| instance transition_markov {d : β} : IsMarkovKernel (transition (d := d)) where | |
| isProbabilityMeasure z := by | |
| constructor | |
| change (β e : Direction d, | |
| ((z.1 z.2).1 e : ββ₯0β) β’ Measure.dirac (z.1, z.2 + step e)) Set.univ = 1 | |
| simp only [Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem | |
| (Set.mem_univ _), smul_eq_mul, mul_one] | |
| rw [β ENNReal.ofNNReal_finsetSum, (z.1 z.2).2] | |
| rfl | |
| noncomputable def historyTransition {d : β} (n : β) : | |
| Kernel ((i : Finset.Iic n) β State d) (State d) where | |
| toFun z := transition (z β¨n, Finset.mem_Iic.mpr le_rflβ©) | |
| measurable' := transition.measurable.comp (measurable_pi_apply _) | |
| instance historyTransition_markov {d : β} (n : β) : | |
| IsMarkovKernel (historyTransition (d := d) n) where | |
| isProbabilityMeasure _ := transition_markov.isProbabilityMeasure _ | |
| noncomputable def initialLaw {d : β} (Ξ½ : Measure (Row d)) : Measure (State d) := | |
| (environmentLaw Ξ½).map (fun Ο => (Ο, (0 : Lattice d))) | |
| noncomputable def annealedLaw {d : β} (Ξ½ : Measure (Row d)) : Measure (Path d) := | |
| (@Kernel.trajMeasure (fun _ => State d) _ (initialLaw Ξ½) (historyTransition (d := d)) _).map | |
| (fun z n => (z n).2) | |
| def dot {d : β} (v β : Vector d) : β := β i, v i * β i | |
| def realPosition {d : β} (x : Lattice d) : Vector d := fun i => (x i : β) | |
| def DirectionallyTransient {d : β} (Ξ½ : Measure (Row d)) (β : Vector d) : Prop := | |
| βα΅ X βannealedLaw Ξ½, | |
| Tendsto (fun n => dot (realPosition (X n)) β) atTop atTop | |
| def HasVelocity {d : β} (Ξ½ : Measure (Row d)) (v : Vector d) : Prop := | |
| βα΅ X βannealedLaw Ξ½, | |
| Tendsto (fun n : β => (fun i => (X n i : β) / (n : β))) atTop (π v) | |
| open scoped ENNReal NNReal Classical Topology BigOperators | |
| def MainStatement : Prop := | |
| β (d : β), 2 β€ d β β (Ξ½ : Measure (Row d)), IsProbabilityMeasure Ξ½ β | |
| UniformElliptic Ξ½ β β (β : Vector d), dot β β = 1 β | |
| DirectionallyTransient Ξ½ β β | |
| β v : Vector d, 0 < dot v β β§ HasVelocity Ξ½ v | |
| end DirectionalTransience | |
| end OAI | |