File size: 3,849 Bytes
b317718 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | import OAI.Probability.FreeIsing.Estimates.FiniteChain
import OAI.Probability.FreeIsing.Spins.Kernel
namespace OAI
noncomputable section
namespace Problem367
def spinPathWeight (theta : ℝ) (n : ℕ) (x : Fin (n+1) → IsingSpin) : ℝ :=
∏ i : Fin n, transitionKernel theta (x i.castSucc) (x i.succ)
theorem spinPathWeight_cons (theta : ℝ) (n : ℕ) (a : IsingSpin)
(x : Fin n → IsingSpin) :
spinPathWeight theta n (Fin.cons a x) =
FiniteChain.weight (transitionKernel theta) n a x := by
rw [FiniteChain.weight_eq_prod]
simp [spinPathWeight]
theorem spinChain_expectation (theta : ℝ) (n : ℕ) (a : IsingSpin) :
∑ x : Fin n → IsingSpin,
FiniteChain.weight (transitionKernel theta) n a x *
spinSign (FiniteChain.endpoint n a x) = theta^n * spinSign a :=
FiniteChain.expectation_eigenfunction (transitionKernel theta) spinSign theta
(transitionKernel_spinSum theta) n a
theorem spinChain_endpoint_distribution (theta : ℝ) (n : ℕ) (a b : IsingSpin) :
FiniteChain.expectation (transitionKernel theta) n
(fun c => if c = b then 1 else 0) a = transitionKernel (theta^n) a b := by
induction n generalizing a with
| zero => simp
| succ n ih =>
rw [FiniteChain.expectation_succ]
simp_rw [ih]
rw [transitionKernel_comp, pow_succ']
theorem spinPathWeight_endpoints (theta : ℝ) (n : ℕ) (a b : IsingSpin) :
∑ x : Fin (n+1) → IsingSpin,
(1/2 : ℝ) * spinPathWeight theta n x *
(if x 0 = a ∧ x (Fin.last n) = b then 1 else 0) =
(1/2 : ℝ) * transitionKernel (theta^n) a b := by
rw [FiniteChain.sum_cons]
simp only [spinPathWeight_cons, Fin.cons_zero, ← FiniteChain.endpoint_eq_last]
calc
_ = (1/2 : ℝ) * FiniteChain.expectation (transitionKernel theta) n
(fun c => if c = b then 1 else 0) a := by
rw [FiniteChain.expectation, Finset.mul_sum]
rw [Finset.sum_eq_single a]
· apply Finset.sum_congr rfl
intro x hx
simp only [true_and, mul_assoc]
· intro c hc hca
simp [hca]
· simp
_ = _ := by rw [spinChain_endpoint_distribution]
theorem spinPathWeight_correlation (theta : ℝ) (n : ℕ) :
∑ x : Fin (n+1) → IsingSpin,
(1/2 : ℝ) * spinPathWeight theta n x * spinSign (x 0) *
spinSign (x (Fin.last n)) = theta^n := by
rw [FiniteChain.sum_cons]
simp only [spinPathWeight_cons, Fin.cons_zero,
← FiniteChain.endpoint_eq_last]
have hinner (a : IsingSpin) :
(∑ x : Fin n → IsingSpin,
(1/2 : ℝ) * FiniteChain.weight (transitionKernel theta) n a x * spinSign a *
spinSign (FiniteChain.endpoint n a x)) = (1/2 : ℝ) * theta^n := by
calc
_ = (1/2 : ℝ) * spinSign a *
∑ x : Fin n → IsingSpin,
FiniteChain.weight (transitionKernel theta) n a x *
spinSign (FiniteChain.endpoint n a x) := by
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro x hx
ring
_ = (1/2 : ℝ) * theta^n := by
rw [spinChain_expectation]
calc
_ = (1/2 : ℝ) * theta^n * (spinSign a * spinSign a) := by ring
_ = _ := by rw [spinSign_mul_self, mul_one]
simp_rw [hinner]
rw [sum_isingSpin]
ring
theorem spinPathWeight_sum (theta : ℝ) (n : ℕ) :
∑ x : Fin (n+1) → IsingSpin, (1/2 : ℝ) * spinPathWeight theta n x = 1 := by
rw [FiniteChain.sum_cons]
simp only [spinPathWeight_cons, ← Finset.mul_sum]
simp only [FiniteChain.sum_weight _ (transitionKernel_sum theta)]
rw [sum_isingSpin]
norm_num
theorem spinPathWeight_nonneg {theta : ℝ} (hlo : -1 ≤ theta) (hhi : theta ≤ 1)
(n : ℕ) (x : Fin (n+1) → IsingSpin) : 0 ≤ spinPathWeight theta n x := by
exact Finset.prod_nonneg fun _ _ => transitionKernel_nonneg hlo hhi _ _
end Problem367
end
end OAI
|