Download data/lean/OAI/Probability/ClassicalON/CoarseExponential.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.23 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/ClassicalON/CoarseExponential.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/ClassicalON/CoarseExponential.lean
-
curl -L -o CoarseExponential.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/ClassicalON/CoarseExponential.lean
3.23 kB
| 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 | |