File size: 4,917 Bytes
4a56cd6 | 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 Mathlib
import OAI.Probability.SKBarriers.Dynamics.GreedyRecursion
namespace OAI
section
noncomputable section
open scoped BigOperators
open Classical
namespace SK.Analytic
theorem walkWeight_last {n : β} (Ξ² : β) (J : Disorder n) (m : β) (x : Config n) (f : Config n β β) :
(β s : Fin m β Config n,FiniteMarkov.walkWeight (heatBath Ξ² J) m x s*f ((Fin.cons x s : Fin (m+1) β Config n) (Fin.last m)))=
β y,discreteKernel Ξ² J m x y*f y := by
induction m generalizing x with
| zero => simp [FiniteMarkov.walkWeight,discreteKernel]
| succ m ih =>
rw [FiniteMarkov.sum_cons]
have hlast : Fin.last (m+1)=(Fin.last m).succ := rfl
simp only [FiniteMarkov.walkWeight_cons,hlast,Fin.cons_succ,mul_assoc,β Finset.mul_sum,ih,discreteKernel]
simp only [Finset.sum_mul,Finset.mul_sum]
rw [Finset.sum_comm]
apply Finset.sum_congr rfl
intro z _
apply Finset.sum_congr rfl
intro y _
ring
theorem pathFiniteLaw_joint {n : β} (hn : 0<n) (Ξ² : β) (J : Disorder n) (m : β) (f : Config n β Config n β β) :
(pathFiniteLaw hn Ξ² J m).expect (fun s => f (s 0) (s (Fin.last m)))=
β x,gibbs Ξ² J x*β y,discreteKernel Ξ² J m x y*f x y := by
unfold FiniteLaw.expect pathFiniteLaw stationaryPathWeight
rw [FiniteMarkov.sum_cons]
simp only [FiniteMarkov.pathWeight,Fin.cons_zero,Fin.tail_cons,mul_assoc,β Finset.mul_sum,walkWeight_last]
namespace FiniteLaw
variable {X : Type*} [Fintype X]
theorem prob_mono_on_support (P : FiniteLaw X) {E F : X β Prop}
(h : βx,0<P.weight x β E x β F x) : P.prob E β€ P.prob F := by
unfold prob expect
apply Finset.sum_le_sum
intro x _
by_cases hw : 0<P.weight x
Β· by_cases hE : E x
Β· simp only [ite_eq_left hE,ite_eq_left (h x hw hE),le_refl]
Β· simp only [ite_eq_right hE,mul_zero]
split_ifs <;> positivity
Β· have he : P.weight x=0 := le_antisymm (le_of_not_gt hw) (P.nonneg x)
simp only [he,zero_mul,le_refl]
end FiniteLaw
def extendPath {n m : β} (s : Fin (m+1) β Config n) (k : β) : Config n :=
if h : k β€ m then s β¨k,by omegaβ© else s 0
@[simp] theorem extendPath_at {n m : β} (s : Fin (m+1) β Config n) (k : Fin (m+1)) :
extendPath s k.val=s k := by simp only [extendPath,dite_eq_left (show k.val β€ m by omega)]
theorem extendPath_jump {n m : β} (hn : 0<n) (Ξ² : β) (J : Disorder n)
(s : Fin (m+1) β Config n) (hs : 0<(pathFiniteLaw hn Ξ² J m).weight s) :
β v k, k < m β |overlap v (extendPath s (k+1))-overlap v (extendPath s k)| β€ 2/(n:β) := by
intro v k hk
simp only [extendPath,dite_eq_left (show k+1 β€ m by omega),dite_eq_left (show k β€ m by omega)]
exact stationaryPathWeight_pos_jump hn Ξ² J m s hs v β¨k,hkβ©
theorem pathFiniteLaw_visit {n : β} (hn : 0<n) (Ξ² : β) (J : Disorder n) (m : β) (V : Config n β Prop) :
(pathFiniteLaw hn Ξ² J m).prob (fun s => βk : Fin (m+1),V (s k)) β€ (m+1)*(gibbsFiniteLaw Ξ² J).prob V := by
refine (FiniteLaw.prob_exists _ _).trans ?_
have he (k : Fin (m+1)) : (pathFiniteLaw hn Ξ² J m).prob (fun s => V (s k))=(gibbsFiniteLaw Ξ² J).prob V :=
pathFiniteLaw_marginal hn Ξ² J m k (fun x => if V x then 1 else 0)
simp only [he,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul,Nat.cast_add,Nat.cast_one,le_refl]
def initialBankReference {n : β} (pool : β β Finset (Config n)) (fallback : β β Config n)
(B : β) (t q : β) (x : Config n) : Config n :=
bankPick pool fallback B (fun _ => x) t q 0 fallback 0
@[simp] theorem initialBankReference_path {n : β} (pool : β β Finset (Config n)) (fallback : β β Config n)
(B : β) (t q : β) (x : β β Config n) :
initialBankReference pool fallback B t q (x 0)=bankPick pool fallback B x t q 0 fallback 0 := rfl
theorem stationary_sign_crossing_bound {n : β} (hn : 0<n) (Ξ² : β) (J : Disorder n)
(m : β) (v : Config n β Config n) (V : Config n β Prop)
(hpath : βs : Fin (m+1) β Config n,0<(pathFiniteLaw hn Ξ² J m).weight s β
(βk : Fin (m+1),Β¬V (s k)) β 0<overlap (v (s 0)) (s (Fin.last m))) :
(β x,gibbs Ξ² J x*β y,if overlap (v x) y β€ 0 then discreteKernel Ξ² J m x y else 0) β€
(m+1)*(gibbsFiniteLaw Ξ² J).prob V := by
have HE : (β x,gibbs Ξ² J x*β y,if overlap (v x) y β€ 0 then discreteKernel Ξ² J m x y else 0)=
(pathFiniteLaw hn Ξ² J m).prob (fun s => overlap (v (s 0)) (s (Fin.last m)) β€ 0) := by
rw [FiniteLaw.prob,pathFiniteLaw_joint hn Ξ² J m (fun x y => if overlap (v x) y β€ 0 then 1 else 0)]
simp only [mul_ite,mul_one,mul_zero]
rw [HE]
refine (FiniteLaw.prob_mono_on_support _ (fun s hs hpass => ?_)).trans (pathFiniteLaw_visit hn Ξ² J m V)
by_contra H
have hgood : βk : Fin (m+1),Β¬V (s k) := by simpa only [not_exists] using H
exact (not_lt_of_ge hpass) (hpath s hs hgood)
end SK.Analytic
end
end
end OAI
|