Download data/lean/OAI/Probability/SKBarriers/Dynamics/KernelEvents.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.49 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKBarriers/Dynamics/KernelEvents.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/SKBarriers/Dynamics/KernelEvents.lean
-
curl -L -o KernelEvents.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKBarriers/Dynamics/KernelEvents.lean
4.49 kB
| import Mathlib | |
| import OAI.Probability.SKBarriers.Dynamics.HeatBathStationary | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open scoped BigOperators | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| namespace SK.Analytic | |
| def kernelEvent {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : β := β y : Config n, if A y then discreteKernel Ξ² J k x y else 0 | |
| theorem kernelEvent_nonneg {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : 0 β€ kernelEvent Ξ² J A k x := by | |
| apply Finset.sum_nonneg | |
| intro y _ | |
| split_ifs | |
| Β· exact discreteKernel_nonneg Ξ² J k x y | |
| Β· exact le_rfl | |
| theorem kernelEvent_le_one {n : β} (hn : 0 < n) (Ξ² : β) (J : Disorder n) | |
| (A : Config n β Prop) [DecidablePred A] (k : β) (x : Config n) : kernelEvent Ξ² J A k x β€ 1 := by | |
| rw [β discreteKernel_sum hn Ξ² J k x] | |
| apply Finset.sum_le_sum | |
| intro y _ | |
| split_ifs | |
| Β· exact le_rfl | |
| Β· exact discreteKernel_nonneg Ξ² J k x y | |
| theorem kernelEvent_zero {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (x : Config n) : kernelEvent Ξ² J A 0 x = if A x then 1 else 0 := by | |
| classical | |
| unfold kernelEvent | |
| simp only [discreteKernel] | |
| by_cases h : A x | |
| Β· rw [ite_eq_left h] | |
| have he (y : Config n) : (if A y then if x=y then (1:β) else 0 else 0) = if x=y then 1 else 0 := by | |
| by_cases hxy : x=y | |
| Β· subst y; simp only [h,ite_true] | |
| Β· simp only [ite_eq_right hxy,ite_self] | |
| simp_rw [he] | |
| simp only [Finset.sum_ite_eq,Finset.mem_univ,ite_true] | |
| Β· rw [ite_eq_right h] | |
| apply Finset.sum_eq_zero | |
| intro y _ | |
| by_cases hxy : x=y | |
| Β· subst y; simp only [ite_eq_right h] | |
| Β· simp only [ite_eq_right hxy,ite_self] | |
| theorem kernelEvent_succ {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : kernelEvent Ξ² J A (k+1) x = | |
| β z : Config n, heatBath Ξ² J x z*kernelEvent Ξ² J A k z := by | |
| unfold kernelEvent | |
| simp only [discreteKernel,Finset.mul_sum,mul_ite,mul_zero] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro y _ | |
| split_ifs <;> simp only [Finset.sum_const_zero] | |
| theorem kernelEvent_stationary {n : β} (hn : 0 < n) (Ξ² : β) (J : Disorder n) | |
| (A : Config n β Prop) [DecidablePred A] (k : β) : | |
| (β x : Config n, gibbs Ξ² J x*kernelEvent Ξ² J A k x) = | |
| β y : Config n, if A y then gibbs Ξ² J y else 0 := by | |
| unfold kernelEvent | |
| simp only [Finset.mul_sum,mul_ite,mul_zero] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro y _ | |
| split_ifs | |
| Β· exact discreteKernel_stationary hn Ξ² J k y | |
| Β· exact Finset.sum_const_zero | |
| def occupation {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : β := β i β Finset.range (k+1), kernelEvent Ξ² J A i x | |
| theorem occupation_nonneg {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : 0 β€ occupation Ξ² J A k x := | |
| Finset.sum_nonneg (fun i _ => kernelEvent_nonneg Ξ² J A i x) | |
| theorem one_le_occupation {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) (hx : A x) : 1 β€ occupation Ξ² J A k x := by | |
| have H := Finset.single_le_sum (f := fun i => kernelEvent Ξ² J A i x) | |
| (fun i (_ : i β Finset.range (k+1)) => kernelEvent_nonneg Ξ² J A i x) | |
| (show 0 β Finset.range (k+1) by simp) | |
| simpa only [kernelEvent_zero,ite_eq_left hx,occupation] using H | |
| theorem occupation_recursion {n : β} (Ξ² : β) (J : Disorder n) (A : Config n β Prop) [DecidablePred A] | |
| (k : β) (x : Config n) : occupation Ξ² J A (k+1) x = | |
| kernelEvent Ξ² J A 0 x+β z : Config n, heatBath Ξ² J x z*occupation Ξ² J A k z := by | |
| unfold occupation | |
| rw [Finset.sum_range_succ'] | |
| simp_rw [kernelEvent_succ,Finset.mul_sum] | |
| rw [Finset.sum_comm] | |
| ring | |
| theorem occupation_stationary {n : β} (hn : 0 < n) (Ξ² : β) (J : Disorder n) | |
| (A : Config n β Prop) [DecidablePred A] (k : β) : | |
| (β x : Config n, gibbs Ξ² J x*occupation Ξ² J A k x) = | |
| ((k+1:β):β)*(β y : Config n, if A y then gibbs Ξ² J y else 0) := by | |
| unfold occupation | |
| simp only [Finset.mul_sum] | |
| rw [Finset.sum_comm] | |
| simp_rw [kernelEvent_stationary hn] | |
| simp only [Finset.sum_const,Finset.card_range,nsmul_eq_mul] | |
| rw [Finset.mul_sum] | |
| end SK.Analytic | |
| end | |
| end | |
| end | |
| end OAI | |