File size: 3,227 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 | import OAI.Probability.ClassicalON.CoarseTail
namespace OAI
noncomputable section
open scoped Classical
namespace ClassicalON
theorem siteDistance_nonneg (x y : Site) : 0 β€ siteDistance x y := Real.sqrt_nonneg _
theorem siteDistance_le_radius_twice (x y : Site) : siteDistance x y β€ 2*(siteRadius x y:β) := by
have hi := siteRadius_nonneg x y
have h1 : |(y.1:β)-(x.1:β)| β€ (siteRadius x y:β) := by
exact_mod_cast (le_max_left |y.1-x.1| |y.2-x.2|)
have h2 : |(y.2:β)-(x.2:β)| β€ (siteRadius x y:β) := by
exact_mod_cast (le_max_right |y.1-x.1| |y.2-x.2|)
have hr : (0:β) β€ siteRadius x y := by exact_mod_cast hi
rw [abs_sub_comm] at h1 h2
have hs1 := mul_self_le_mul_self (abs_nonneg _) h1
have hs2 := mul_self_le_mul_self (abs_nonneg _) h2
have hab1 := sq_abs ((x.1:β)-(y.1:β))
have hab2 := sq_abs ((x.2:β)-(y.2:β))
unfold siteDistance
apply Real.sqrt_le_iff.mpr
constructor
Β· positivity
Β· nlinarith
theorem half_pow_exp (t : β) : (1/2:β)^t=Real.exp (-Real.log 2*(t:β)) := by
rw [mul_comm,Real.exp_nat_mul,Real.exp_neg,Real.exp_log (by norm_num : (0:β) < 2)]
norm_num
namespace LatticeGraph
theorem connection_exponential (Ξ² : β) (hΞ² : 0 β€ Ξ²) :
β m : β,0 < m β§ β (G : LatticeGraph) (b : G.edges β β),(β e,0 β€ b e β§ b e β€ Ξ²) β
β x y : G.vertices,G.connectionProbability b x y β€ 4*Real.exp (-m*siteDistance x.val y.val) := by
obtain β¨N,hN,htβ© := connection_geometric_tail Ξ² hΞ²
have hNr : (0:β) < N := by exact_mod_cast hN
have hlog : 0 < Real.log 2 := Real.log_pos (by norm_num)
let m := Real.log 2/(50*(N:β))
refine β¨m,by positivity,?_β©
intro G b hb x y
let f := siteDistance x.val y.val/(50*(N:β))
have hf : 0 β€ f := div_nonneg (siteDistance_nonneg _ _) (by positivity)
let t : β := Nat.floor f-1
have hft : f < (t:β)+2 := by
have h1 := Nat.lt_floor_add_one f
have h2 : Nat.floor f β€ t+1 := by dsimp [t]; omega
have h3 : (Nat.floor f:β) β€ (t:β)+1 := by exact_mod_cast h2
linarith
have hp : G.connectionProbability b x y β€ (1/2:β)^t := by
by_cases ht0 : t=0
Β· simpa only [ht0,pow_zero] using G.connectionProbability_le_one b (fun e => (hb e).1) x y
Β· apply ht G b hb x y t
have he : Nat.floor f=t+1 := by dsimp [t] at *; omega
have hfl := Nat.floor_le hf
rw [he,Nat.cast_add,Nat.cast_one] at hfl
have hmul := (le_div_iffβ (show (0:β) < 50*(N:β) by positivity)).mp hfl
have hd := siteDistance_le_radius_twice x.val y.val
have hr : (N:β)*((25*t:β)+4) β€ (siteRadius x.val y.val:β) := by
push_cast
nlinarith
exact_mod_cast hr
apply le_trans hp
rw [half_pow_exp]
calc
_ β€ Real.exp (Real.log 2*(2-f)) := Real.exp_le_exp.mpr (by nlinarith)
_=4*Real.exp (-m*siteDistance x.val y.val) := by
have he : Real.exp (Real.log 2*2)=(4:β) := by
rw [mul_comm,show (2:β)=(2:β) by norm_num,Real.exp_nat_mul]
norm_num [Real.exp_log]
rw [show Real.log 2*(2-f)=Real.log 2*2+(-Real.log 2*f) by ring,Real.exp_add,he]
congr 2
dsimp [f,m]
ring
end LatticeGraph
end ClassicalON
end
end OAI
|