File size: 3,032 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 | import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Algebra.Order.Archimedean.Basic
import Mathlib.Tactic
namespace OAI
/-! # Scalar dyadic selection for comparable positive displacements
The arithmetic is independent of dimension, angular energy and distance-set
estimates.
-/
namespace PlanarFalconer
open Set Metric
theorem exists_displacement_depth {d : β} (hd : 0 < d) :
β n : β€, (2:β)^(-(n:β)-1) < d β§ d β€ (2:β)^(-(n:β)) := by
obtain β¨m,hmβ© := exists_mem_Ioc_zpow hd (by norm_num : (1:β) < 2)
refine β¨-(m+1),?_,?_β©
Β· have he : -((-(m+1):β€):β)-1 = (m:β) := by push_cast; ring
rw [he,Real.rpow_intCast]
exact hm.1
Β· have he : -((-(m+1):β€):β) = ((m+1:β€):β) := by push_cast; ring
rw [he,Real.rpow_intCast]
exact hm.2
theorem comparable_displacement_depth {dβ dβ : β} {a h : β}
(hupper : max dβ dβ β€ 2*(2:β)^(-(a:β)))
(hfar : 16*(2:β)^(-(h:β)) < max dβ dβ)
(hcβ : max dβ dβ β€ 2*dβ) (hcβ : max dβ dβ β€ 2*dβ) :
β b : β, a+9 β€ b β§ b β€ h+5 β§
(256*(2:β)^(-(b:β)) < dβ β§ dβ β€ 1024*(2:β)^(-(b:β))) β§
(256*(2:β)^(-(b:β)) < dβ β§ dβ β€ 1024*(2:β)^(-(b:β))) := by
have hd : 0 < max dβ dβ := (by positivity : 0 < 16*(2:β)^(-(h:β))).trans hfar
obtain β¨n,hnlo,hnhiβ© := exists_displacement_depth hd
have haexp : (2:β)^(-(n:β)-1) < (2:β)^(1-(a:β)) := by
have he : (2:β)^(1-(a:β)) = 2*(2:β)^(-(a:β)) := by
rw [sub_eq_add_neg,Real.rpow_add (by norm_num : (0:β) < 2),Real.rpow_one]
rw [he]
exact hnlo.trans_le hupper
have haR := (Real.rpow_lt_rpow_left_iff (by norm_num : (1:β) < 2)).mp haexp
have hhExp : (2:β)^(4-(h:β)) < (2:β)^(-(n:β)) := by
have he : (2:β)^(4-(h:β)) = 16*(2:β)^(-(h:β)) := by
rw [sub_eq_add_neg,Real.rpow_add (by norm_num : (0:β) < 2)]
norm_num
rw [he]
exact hfar.trans_le hnhi
have hhR := (Real.rpow_lt_rpow_left_iff (by norm_num : (1:β) < 2)).mp hhExp
have haZ : (a:β€)-2 < n := by exact_mod_cast (show (a:β)-2 < (n:β) by linarith)
have hhZ : n < (h:β€)-4 := by exact_mod_cast (show (n:β) < (h:β)-4 by linarith)
have hb0 : 0 β€ n+10 := by omega
let b := (n+10).toNat
have hbZ : (b:β€) = n+10 := Int.toNat_of_nonneg hb0
have hbR : (b:β) = (n:β)+10 := by exact_mod_cast hbZ
have hpow : (2:β)^(-(n:β)) = 1024*(2:β)^(-(b:β)) := by
rw [hbR,show -(n:β) = 10+(-((n:β)+10)) by ring,
Real.rpow_add (by norm_num : (0:β) < 2)]
norm_num
have hhalf : (2:β)^(-(n:β)-1) = 512*(2:β)^(-(b:β)) := by
rw [hbR,show -(n:β)-1 = 9+(-((n:β)+10)) by ring,
Real.rpow_add (by norm_num : (0:β) < 2)]
norm_num
rw [hpow] at hnhi
rw [hhalf] at hnlo
refine β¨b,?_,?_,?_,?_β©
Β· omega
Β· omega
Β· exact β¨by linarith, (le_max_left _ _).trans hnhiβ©
Β· exact β¨by linarith, (le_max_right _ _).trans hnhiβ©
end PlanarFalconer
end OAI
|