cfahlgren1/math / lean /OAI /Geometry /TranslativeCovering /GeometryDimension.lean
cfahlgren1's picture
download
raw
4.63 kB
import OAI.Geometry.TranslativeCovering.RadiusLens
namespace OAI
open Set Filter MeasureTheory
open scoped ENNReal
open Set Filter MeasureTheory
open scoped ENNReal
open Set MeasureTheory ProbabilityTheory
open scoped Classical BigOperators ENNReal
open Set Filter MeasureTheory
open scoped ENNReal
open Set MeasureTheory ProbabilityTheory
open scoped Classical BigOperators ENNReal
open Set Filter MeasureTheory
open scoped ENNReal
open Set MeasureTheory ProbabilityTheory
open scoped Classical BigOperators ENNReal
open Set Filter MeasureTheory
open scoped ENNReal Topology
namespace GeometryDimension
open Filter
open scoped Topology
lemma log_div_nat : Tendsto (fun n : β„• => Real.log n/(n:ℝ)) atTop (𝓝 0) := by
have h : Tendsto (fun x : ℝ => Real.log x/x) atTop (𝓝 0) := by
simpa using Real.tendsto_pow_log_div_mul_add_atTop 1 0 1 one_ne_zero
exact h.comp tendsto_natCast_atTop_atTop
lemma lens_threshold {l uβ‚€ u B : ℝ} (hl : 0 < l) (huβ‚€ : 0 ≀ uβ‚€)
(hu : uβ‚€ < u) (_hB : 0 < B) :
βˆƒ nβ‚€ : β„•, βˆ€ n : β„•,nβ‚€ ≀ n β†’ 2 ≀ n ∧
2*(1/l+1/(1-u^2)) ≀ (n:ℝ)*l ∧
B*Real.log n/(n:ℝ) < 2 ∧
(uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)))^2+(12/l)*(Real.log n/(n:ℝ)) ≀ u^2 := by
have hsq : uβ‚€^2 < u^2 := by nlinarith
have ht : Tendsto (fun n : β„• => (uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)))^2+
(12/l)*(Real.log n/(n:ℝ))) atTop (𝓝 (uβ‚€^2)) := by
convert ((tendsto_const_nhds.add (log_div_nat.const_mul (B+6/l))).pow 2).add
(log_div_nat.const_mul (12/l)) using 1; simp
have hsmall : βˆ€αΆ  n : β„• in atTop,B*Real.log n/(n:ℝ) < 2 := by
have htB : Tendsto (fun n : β„• => B*(Real.log n/(n:ℝ))) atTop (𝓝 0) := by
simpa only [mul_zero] using log_div_nat.const_mul B
have h := htB.eventually_lt_const (by norm_num : (0:ℝ) < 2)
simpa only [mul_zero,mul_div_assoc] using h
have hd : βˆ€αΆ  n : β„• in atTop,2*(1/l+1/(1-u^2)) ≀ (n:ℝ)*l := by
have h := (tendsto_natCast_atTop_atTop (R := ℝ)).eventually
(eventually_ge_atTop (2*(1/l+1/(1-u^2))/l))
filter_upwards [h] with n hn
exact (div_le_iffβ‚€ hl).mp hn
have he : βˆ€αΆ  n : β„• in atTop,2 ≀ n ∧ 2*(1/l+1/(1-u^2)) ≀ (n:ℝ)*l ∧
B*Real.log n/(n:ℝ) < 2 ∧
(uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)))^2+(12/l)*(Real.log n/(n:ℝ)) ≀ u^2 := by
filter_upwards [eventually_ge_atTop 2,hd,hsmall,ht.eventually_le_const hsq] with n hn hd hs he
exact ⟨hn,hd,hs,he⟩
exact eventually_atTop.mp he
lemma logarithm_card {n m : β„•} (hn : 2 ≀ n) (hm : 1 ≀ m) (hmn : m ≀ n^2) :
Real.log (2*(m:ℝ)) ≀ 3*Real.log n := by
have hnpos : 0 < (n:ℝ) := by exact_mod_cast (show 0 < n by omega)
have hmpos : 0 < (m:ℝ) := by exact_mod_cast (show 0 < m by omega)
have h2 : Real.log 2 ≀ Real.log n := Real.log_le_log (by norm_num) (by exact_mod_cast hn)
have hm' : (m:ℝ) ≀ (n:ℝ)^2 := by exact_mod_cast hmn
have h3 := Real.log_le_log hmpos hm'
rw [Real.log_pow] at h3
rw [Real.log_mul (by norm_num) hmpos.ne']
norm_num only [Nat.cast_ofNat] at h3
linarith
lemma small_family {n m : β„•} {l uβ‚€ u B r : ℝ}
(hn : 2 ≀ n) (hl : 0 < l) (huβ‚€ : 0 ≀ uβ‚€) (_hB : 0 ≀ B)
(hm : 1 ≀ m) (hmn : m ≀ n^2) (hr : 0 ≀ r) (hrB : r ≀ B*Real.log n)
(hsmall : (uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)))^2+
(12/l)*(Real.log n/(n:ℝ)) ≀ u^2) :
(uβ‚€+r/(n:ℝ)+2*Real.log (2*(m:ℝ))/((n:ℝ)*l))^2+
4*Real.log (2*(m:ℝ))/((n:ℝ)*l) ≀ u^2 := by
have hnp : 0 < (n:ℝ) := by exact_mod_cast (show 0 < n by omega)
have hmn' : Real.log (2*(m:ℝ)) ≀ 3*Real.log n := logarithm_card hn hm hmn
have hlog : 0 ≀ Real.log (2*(m:ℝ)) := Real.log_nonneg (by exact_mod_cast (show 1 ≀ 2*m by omega))
have hr' := div_le_div_of_nonneg_right hrB hnp.le
have hlog' := div_le_div_of_nonneg_right hmn' (mul_pos hnp hl).le
have h1 : 0 ≀ uβ‚€+r/(n:ℝ)+2*Real.log (2*(m:ℝ))/((n:ℝ)*l) := by positivity
have h2 : uβ‚€+r/(n:ℝ)+2*Real.log (2*(m:ℝ))/((n:ℝ)*l) ≀
uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)) := by
have he : uβ‚€+(B+6/l)*(Real.log n/(n:ℝ)) = uβ‚€+B*Real.log n/(n:ℝ)+
2*(3*Real.log n/((n:ℝ)*l)) := by ring
rw [he]
simp only [mul_div_assoc] at *
linarith only [hr',hlog']
have hs := (sq_le_sqβ‚€ h1 (h1.trans h2)).mpr h2
have h3 : 4*Real.log (2*(m:ℝ))/((n:ℝ)*l) ≀ (12/l)*(Real.log n/(n:ℝ)) := by
have he : (12/l)*(Real.log n/(n:ℝ)) = 4*(3*Real.log n/((n:ℝ)*l)) := by ring
rw [he]
simp only [mul_div_assoc] at *
linarith only [hlog']
linarith only [hs,h3,hsmall]
end GeometryDimension
end OAI

Xet Storage Details

Size:
4.63 kB
Β·
Xet hash:
964c349e8346441d1e693cd4cc50f2729b54ebcfedbae39ce6738b2ec92e03fb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.