Download data/lean/OAI/Probability/FreeIsing/Spins/Kernel.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.06 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Spins/Kernel.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Spins/Kernel.lean
-
curl -L -o Kernel.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Spins/Kernel.lean
5.06 kB
| import OAI.Probability.FreeIsing.Model | |
| namespace OAI | |
| noncomputable section | |
| namespace Problem367 | |
| @[simp] theorem isingSpin_neg_ne_pos : IsingSpin.neg β IsingSpin.pos := by decide | |
| @[simp] theorem isingSpin_pos_ne_neg : IsingSpin.pos β IsingSpin.neg := by decide | |
| private theorem spinKernel_univ : (Finset.univ : Finset IsingSpin) = {.neg, .pos} := by decide | |
| theorem sum_isingSpin {Ξ± : Type*} [AddCommMonoid Ξ±] (f : IsingSpin β Ξ±) : | |
| β a : IsingSpin, f a = f .neg + f .pos := by | |
| simp [spinKernel_univ] | |
| def spinSign : IsingSpin β β | |
| | .neg => -1 | |
| | .pos => 1 | |
| @[simp] theorem spinSign_neg : spinSign .neg = -1 := rfl | |
| @[simp] theorem spinSign_pos : spinSign .pos = 1 := rfl | |
| @[simp] theorem spinSign_sq (a : IsingSpin) : spinSign a ^ 2 = 1 := by | |
| cases a <;> norm_num [spinSign] | |
| @[simp] theorem spinSign_mul_self (a : IsingSpin) : spinSign a * spinSign a = 1 := by | |
| simpa only [pow_two] using spinSign_sq a | |
| theorem spinSign_mul (a b : IsingSpin) : | |
| spinSign a * spinSign b = if a = b then 1 else -1 := by | |
| cases a <;> cases b <;> norm_num [spinSign] | |
| def transitionKernel (theta : β) (a b : IsingSpin) : β := | |
| (1 + theta * spinSign a * spinSign b) / 2 | |
| theorem transitionKernel_eq (theta : β) (a b : IsingSpin) : | |
| transitionKernel theta a b = (1 + (if a = b then theta else -theta)) / 2 := by | |
| cases a <;> cases b <;> simp [transitionKernel, spinSign] | |
| theorem transitionKernel_symm (theta : β) (a b : IsingSpin) : | |
| transitionKernel theta a b = transitionKernel theta b a := by | |
| unfold transitionKernel | |
| ring | |
| @[simp] theorem transitionKernel_zero (a b : IsingSpin) : | |
| transitionKernel 0 a b = (1 / 2 : β) := by | |
| simp [transitionKernel] | |
| @[simp] theorem transitionKernel_one (a b : IsingSpin) : | |
| transitionKernel 1 a b = if a = b then 1 else 0 := by | |
| cases a <;> cases b <;> norm_num [transitionKernel, spinSign] | |
| @[simp] theorem sum_spinSign : β a : IsingSpin, spinSign a = 0 := by | |
| simp [sum_isingSpin, spinSign] | |
| @[simp] theorem transitionKernel_sum (theta : β) (a : IsingSpin) : | |
| β b : IsingSpin, transitionKernel theta a b = 1 := by | |
| rw [sum_isingSpin] | |
| simp only [transitionKernel, spinSign_neg, spinSign_pos] | |
| ring | |
| @[simp] theorem transitionKernel_spinSum (theta : β) (a : IsingSpin) : | |
| β b : IsingSpin, transitionKernel theta a b * spinSign b = theta * spinSign a := by | |
| rw [sum_isingSpin] | |
| simp only [transitionKernel, spinSign_neg, spinSign_pos] | |
| ring | |
| theorem transitionKernel_comp (s t : β) (a c : IsingSpin) : | |
| β b : IsingSpin, transitionKernel s a b * transitionKernel t b c = | |
| transitionKernel (s * t) a c := by | |
| rw [sum_isingSpin] | |
| simp only [transitionKernel, spinSign_neg, spinSign_pos] | |
| ring | |
| theorem transitionKernel_nonneg {theta : β} (hlo : -1 β€ theta) (hhi : theta β€ 1) | |
| (a b : IsingSpin) : 0 β€ transitionKernel theta a b := by | |
| rw [transitionKernel_eq] | |
| split_ifs <;> linarith | |
| theorem transitionKernel_le_one {theta : β} (hlo : -1 β€ theta) (hhi : theta β€ 1) | |
| (a b : IsingSpin) : transitionKernel theta a b β€ 1 := by | |
| rw [transitionKernel_eq] | |
| split_ifs <;> linarith | |
| def transitionKernelIter (theta : β) : β β IsingSpin β IsingSpin β β | |
| | 0, a, b => if a = b then 1 else 0 | |
| | n + 1, a, c => β b : IsingSpin, | |
| transitionKernelIter theta n a b * transitionKernel theta b c | |
| theorem transitionKernelIter_eq (theta : β) (n : β) (a b : IsingSpin) : | |
| transitionKernelIter theta n a b = transitionKernel (theta ^ n) a b := by | |
| induction n generalizing a b with | |
| | zero => simp [transitionKernelIter] | |
| | succ n ih => | |
| simp only [transitionKernelIter, ih, transitionKernel_comp, pow_succ] | |
| @[simp] theorem transitionKernelIter_sum (theta : β) (n : β) (a : IsingSpin) : | |
| β b : IsingSpin, transitionKernelIter theta n a b = 1 := by | |
| simp only [transitionKernelIter_eq, transitionKernel_sum] | |
| theorem transitionKernelIter_spinSum (theta : β) (n : β) (a : IsingSpin) : | |
| β b : IsingSpin, transitionKernelIter theta n a b * spinSign b = | |
| theta ^ n * spinSign a := by | |
| simp only [transitionKernelIter_eq, transitionKernel_spinSum] | |
| theorem transitionKernel_stationary (theta : β) (b : IsingSpin) : | |
| β a : IsingSpin, (1 / 2 : β) * transitionKernel theta a b = 1 / 2 := by | |
| rw [sum_isingSpin] | |
| simp only [transitionKernel, spinSign_neg, spinSign_pos] | |
| ring | |
| theorem transitionKernelIter_correlation (theta : β) (n : β) : | |
| β a : IsingSpin, β b : IsingSpin, | |
| (1 / 2 : β) * transitionKernelIter theta n a b * spinSign a * spinSign b = | |
| theta ^ n := by | |
| simp only [transitionKernelIter_eq, sum_isingSpin, transitionKernel, | |
| spinSign_neg, spinSign_pos] | |
| ring | |
| theorem freeCylinderWeight_eq_transitionKernel {d : β} (theta : β) | |
| (D : Finset (TreeVertex d)) (eta : TreeVertex d β IsingSpin) : | |
| freeCylinderWeight theta D eta = ENNReal.ofReal | |
| ((1 / 2 : β) * β e β inducedEdges D, transitionKernel theta (eta e.1) (eta e.2)) := by | |
| simp only [freeCylinderWeight, transitionKernel_eq] | |
| end Problem367 | |
| end | |
| end OAI | |