Download data/lean/OAI/Geometry/LatticeCovering/GaussianRates.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 20.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/LatticeCovering/GaussianRates.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/LatticeCovering/GaussianRates.lean
-
curl -L -o GaussianRates.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/LatticeCovering/GaussianRates.lean
20.4 kB
| import OAI.Geometry.LatticeCovering.Desmoothing | |
| namespace OAI | |
| section | |
| namespace SingleLatticeCovering.GaussianNumerics | |
| open MeasureTheory Filter GaussianDensity GaussianProjection Asymptotics | |
| open scoped Topology | |
| noncomputable def A : β := 1000+|Real.log (8*Real.pi)|+|Real.log Real.pi| | |
| noncomputable def B : β := 2*A+100 | |
| lemma A_pos : 0 < A := by unfold A; positivity | |
| lemma A_large : 1000 β€ A := by unfold A; linarith [abs_nonneg (Real.log (8*Real.pi)),abs_nonneg (Real.log Real.pi)] | |
| lemma B_pos : 0 < B := by unfold B; linarith [A_pos] | |
| lemma normalizer_log (D : β) {b : β} (hb : 0 < b) : | |
| normalizer D b=Real.exp ((D:β)/2*Real.log (Real.pi/b)) := by | |
| rw [normalizer,Real.rpow_def_of_pos (by positivity),mul_comm] | |
| lemma floor_inv_bound {l : β} (hl : 1 β€ l) : | |
| (densityFloor (l^4) (6*(l:β)^2))β»ΒΉ β€ Real.exp (A*(l:β)^4) := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have ht2 : 1 β€ (l:β)^2 := one_le_powβ ht | |
| have hlog : Real.log (8*Real.pi) β€ 2*(A-392) := by | |
| have := le_abs_self (Real.log (8*Real.pi)) | |
| unfold A | |
| linarith [abs_nonneg (Real.log (8*Real.pi)),abs_nonneg (Real.log Real.pi)] | |
| have hN := normalizer_pos (l^4) (by norm_num : (0:β) < 1/8) | |
| rw [densityFloor,mul_inv_rev,inv_inv,βReal.exp_neg,normalizer_log _ (by norm_num),βReal.exp_add] | |
| push_cast | |
| apply Real.exp_le_exp.mpr | |
| have hR : (6*(l:β)^2+1)^2 β€ 49*(l:β)^4 := by nlinarith [sq_nonneg ((l:β)^2-1)] | |
| have hm := mul_le_mul_of_nonneg_left hlog (show 0 β€ (l:β)^4/2 by positivity) | |
| rw [show Real.pi/(1/8:β)=8*Real.pi by ring] | |
| nlinarith | |
| lemma floor_le_one (D : β) (R : β) : densityFloor D R β€ 1 := by | |
| have hN : 1 β€ normalizer D (1/8) := by | |
| unfold normalizer | |
| apply Real.one_le_rpow (by have := Real.pi_gt_three; linarith) (by positivity) | |
| unfold densityFloor | |
| exact (mul_le_of_le_one_left (Real.exp_pos _).le | |
| ((inv_le_oneβ (normalizer_pos D (by norm_num))).mpr hN)).trans | |
| (Real.exp_le_one_iff.mpr (by nlinarith [sq_nonneg (R+1)])) | |
| lemma polynomial_exp_decay {p q : β} (hpq : p < q) {a b : β} (hb : 0 < b) : | |
| Tendsto (fun t : β => Real.exp (a*t^p-b*t^q)) atTop (π 0) := by | |
| have H := (isLittleO_pow_pow_atTop_of_lt (π := β) hpq).const_mul_left a | |
| have ht : Tendsto (fun t : β => Real.exp (-(b/2)*t^q)) atTop (π 0) := by | |
| apply Real.tendsto_exp_atBot.comp | |
| have hh := (tendsto_pow_atTop (by omega : q β 0) : Tendsto (fun t : β => t^q) atTop atTop).const_mul_atTop (half_pos hb) | |
| simpa only [neg_mul,Function.comp_def] using tendsto_neg_atTop_atBot.comp hh | |
| apply squeeze_zero' (Filter.Eventually.of_forall (fun t => (Real.exp_pos _).le)) ?_ ht | |
| filter_upwards [H.bound (half_pos hb),eventually_ge_atTop (0:β)] with t h ht | |
| rw [Real.norm_eq_abs,Real.norm_eq_abs,abs_of_nonneg (pow_nonneg ht q)] at h | |
| apply Real.exp_le_exp.mpr | |
| linarith [le_abs_self (a*t^p)] | |
| noncomputable def errBound (t : β) := Real.exp (B*t^20-t^30) | |
| noncomputable def tailBound (t : β) := Real.exp ((A+10)*t^6-t^16/980000) | |
| lemma errBound_tendsto : Tendsto errBound atTop (π 0) := by | |
| change Tendsto (fun t : β => Real.exp (B*t^20-t^30)) atTop (π 0) | |
| simpa only [one_mul] using (polynomial_exp_decay (a := B) (p := 20) (q := 30) (by omega) (b := 1) (by norm_num)) | |
| lemma tailBound_tendsto : Tendsto tailBound atTop (π 0) := by | |
| change Tendsto (fun t : β => Real.exp ((A+10)*t^6-t^16/980000)) atTop (π 0) | |
| convert (polynomial_exp_decay (a := A+10) (p := 6) (q := 16) (by omega) (b := 1/980000) (by norm_num)) using 1 | |
| ext t | |
| congr 1 | |
| ring | |
| lemma gaussian_prefactor_bound {l D : β} (hl : 1 β€ l) (hD : D β€ l^4) : | |
| (normalizer D (((l:β)^10)^2/2))β»ΒΉ*(l:β)^10*Real.sqrt (D:β) β€ Real.exp (22*(l:β)^5) := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have ht0 : (0:β) < l := lt_of_lt_of_le zero_lt_one ht | |
| have hr : 1 β€ (l:β)^10 := one_le_powβ ht | |
| have hp := normalizer_inv_bound D (pow_pos ht0 10) | |
| have hpd : ((l:β)^10)^D β€ ((l:β)^10)^(l^4) := pow_le_pow_rightβ hr hD | |
| have hs : Real.sqrt (D:β) β€ (l:β)^2 := (Real.sqrt_le_iff).mpr β¨by positivity,by simpa only [βpow_mul,Nat.reduceMul] using (show (D:β) β€ (l:β)^4 by exact_mod_cast hD)β© | |
| calc | |
| _ β€ (((l:β)^10)^(l^4))*(l:β)^10*(l:β)^2 := by | |
| exact mul_le_mul (mul_le_mul_of_nonneg_right (hp.trans hpd) (by positivity)) hs (Real.sqrt_nonneg _) (by positivity) | |
| _ = Real.exp (((l:β)^4*10+12)*Real.log (l:β)) := by | |
| rw [show (((l:β)^4*10+12)*Real.log (l:β))= | |
| (l^4:β)*(10*Real.log (l:β))+10*Real.log (l:β)+2*Real.log (l:β) by push_cast; ring, | |
| Real.exp_add,Real.exp_add,Real.exp_nat_mul] | |
| rw [show Real.exp (10*Real.log (l:β))=(l:β)^10 by simpa only [Nat.cast_ofNat,Real.exp_log ht0] using Real.exp_nat_mul (Real.log (l:β)) 10, | |
| show Real.exp (2*Real.log (l:β))=(l:β)^2 by simpa only [Nat.cast_ofNat,Real.exp_log ht0] using Real.exp_nat_mul (Real.log (l:β)) 2] | |
| _ β€ _ := by | |
| apply Real.exp_le_exp.mpr | |
| have ht4 : 1 β€ (l:β)^4 := one_le_powβ ht | |
| have hlog := Real.log_le_sub_one_of_pos ht0 | |
| have hh := mul_le_mul_of_nonneg_left (show Real.log (l:β) β€ l by linarith) (show 0 β€ (l:β)^4*10+12 by positivity) | |
| nlinarith [mul_le_mul_of_nonneg_right ht4 ht0.le] | |
| lemma volume_parameter_bound {l : β} (hl : 1 β€ l) : | |
| volume.real (Metric.closedBall (0:Isotropization.E (l^4)) ((l:β)^10)) β€ | |
| Real.exp ((l:β)^20+A*(l:β)^4) := by | |
| have hlog : Real.log Real.pi β€ 2*A := by | |
| unfold A | |
| linarith [le_abs_self (Real.log Real.pi),abs_nonneg (Real.log (8*Real.pi)),abs_nonneg (Real.log Real.pi)] | |
| apply (volume_closedBall_bound (l^4) (by positivity : 0 β€ (l:β)^10)).trans | |
| rw [normalizer_log _ (by norm_num),βReal.exp_add] | |
| push_cast | |
| apply Real.exp_le_exp.mpr | |
| simp only [div_one] | |
| have := mul_le_mul_of_nonneg_left hlog (show 0 β€ (l:β)^4/2 by positivity) | |
| nlinarith [show ((l:β)^10)^2=(l:β)^20 by ring] | |
| end SingleLatticeCovering.GaussianNumerics | |
| end | |
| section | |
| namespace SingleLatticeCovering.GaussianNumerics | |
| open MeasureTheory Filter GaussianDensity GaussianProjection | |
| open scoped Topology | |
| lemma powerCoeff_bound {l : β} (hl : 1 β€ l) : | |
| 22*(l:β)^5+A*(l:β)^4+(l:β)^20 β€ B*(l:β)^20 := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have h5 : (l:β)^5 β€ (l:β)^20 := pow_le_pow_rightβ ht (by omega) | |
| have h4 : (l:β)^4 β€ (l:β)^20 := pow_le_pow_rightβ ht (by omega) | |
| have hh := mul_le_mul_of_nonneg_left h4 A_pos.le | |
| dsimp [B] | |
| nlinarith [pow_nonneg (Nat.cast_nonneg l : (0:β) β€ l) 20,A_pos] | |
| lemma uniform_error_bound {n l D : β} (hn : 0 < n) (hl : 1 β€ l) (hD : D β€ l^4) | |
| (hroot : Real.exp ((l:β)^30) β€ Real.sqrt (Real.sqrt (n:β))) : | |
| projectionError n D (1/Real.sqrt (n:β)) ((l:β)^10) β€ | |
| densityFloor D (6*(l:β)^2)*errBound (l:β) := by | |
| have ht : (0:β) < l := by exact_mod_cast (show 0 < l by omega) | |
| have hq := Real.sqrt_pos.mpr (Real.sqrt_pos.mpr (show (0:β) < n by exact_mod_cast hn)) | |
| have hf := densityFloor_pos D (6*(l:β)^2) | |
| rw [mul_comm (densityFloor D (6*(l:β)^2))] | |
| apply (div_le_iffβ hf).mp | |
| have hinv : (densityFloor D (6*(l:β)^2))β»ΒΉ β€ Real.exp (A*(l:β)^4) := | |
| (inv_antiβ (densityFloor_pos (l^4) _) (densityFloor_dimension_mono hD _)).trans (floor_inv_bound hl) | |
| rw [root_error_identity hn (pow_nonneg ht.le 10),div_div,div_eq_mul_inv, mul_inv_rev] | |
| calc | |
| _ β€ Real.exp (22*(l:β)^5)* Real.exp (A*(l:β)^4)*(Real.exp ((l:β)^30))β»ΒΉ := by | |
| have hi := inv_antiβ (Real.exp_pos ((l:β)^30)) hroot | |
| have hp := gaussian_prefactor_bound hl hD | |
| rw [βmul_assoc] | |
| exact mul_le_mul (mul_le_mul hp hinv (inv_pos.mpr hf).le (Real.exp_pos _).le) hi (inv_pos.mpr hq).le (by positivity) | |
| _ = Real.exp (22*(l:β)^5+A*(l:β)^4-(l:β)^30) := by rw [βReal.exp_neg,βReal.exp_add,βReal.exp_add]; rfl | |
| _ β€ errBound (l:β) := by | |
| apply Real.exp_le_exp.mpr | |
| have hh := powerCoeff_bound hl | |
| linarith [pow_nonneg ht.le 20] | |
| lemma uniform_ball_error {n l : β} (hn : 0 < n) (hl : 1 β€ l) | |
| (hroot : Real.exp ((l:β)^30) β€ Real.sqrt (Real.sqrt (n:β))) : | |
| projectionError n (l^4) (1/Real.sqrt (n:β)) ((l:β)^10)* | |
| volume.real (Metric.closedBall (0:Isotropization.E (l^4)) ((l:β)^10)) β€ errBound (l:β) := by | |
| have ht : (0:β) < l := by exact_mod_cast (show 0 < l by omega) | |
| have hq := Real.sqrt_pos.mpr (Real.sqrt_pos.mpr (show (0:β) < n by exact_mod_cast hn)) | |
| rw [root_error_identity hn (pow_nonneg ht.le 10),div_mul_eq_mul_div] | |
| calc | |
| _ β€ (Real.exp (22*(l:β)^5)*Real.exp ((l:β)^20+A*(l:β)^4))/Real.exp ((l:β)^30) := by | |
| apply div_le_divβ (by positivity) (by gcongr; exact gaussian_prefactor_bound hl le_rfl; exact volume_parameter_bound hl) | |
| (Real.exp_pos _) hroot | |
| _ = Real.exp (22*(l:β)^5+A*(l:β)^4+(l:β)^20-(l:β)^30) := by | |
| rw [div_eq_mul_inv,βReal.exp_neg,βReal.exp_add,βReal.exp_add]; congr 1; ring | |
| _ β€ errBound (l:β) := Real.exp_le_exp.mpr (sub_le_sub_right (powerCoeff_bound hl) _) | |
| lemma kernel_normalizer_bound {l D : β} (hl : 1 β€ l) (hD : D β€ l^4) : | |
| (normalizer D (((l:β)^10)^2/2))β»ΒΉ β€ Real.exp (10*(l:β)^5) := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have ht0 : (0:β) < l := lt_of_lt_of_le zero_lt_one ht | |
| apply (normalizer_inv_bound D (pow_pos ht0 10)).trans | |
| apply (pow_le_pow_rightβ (one_le_powβ ht : 1 β€ (l:β)^10) hD).trans | |
| rw [βReal.exp_log (pow_pos (pow_pos ht0 10) (l^4)),Real.log_pow,Real.log_pow] | |
| apply Real.exp_le_exp.mpr | |
| push_cast | |
| have hh := mul_le_mul_of_nonneg_left (le_trans (Real.log_le_sub_one_of_pos ht0) (by linarith : (l:β)-1 β€ l)) | |
| (show 0 β€ 10*(l:β)^4 by positivity) | |
| nlinarith | |
| lemma tail_exponent_bound {l : β} (hl : 1 β€ l) : | |
| (l:β)^16/980000 β€ (((l:β)^10)^2/2)*(localStep (6*(l:β)^2))^2 := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have ht2 : 1 β€ (l:β)^2 := one_le_powβ ht | |
| have hR : (6*(l:β)^2+1)^2 β€ 49*(l:β)^4 := by nlinarith [sq_nonneg ((l:β)^2-1)] | |
| unfold localStep | |
| have hd : 0 < 6*(l:β)^2+1 := by positivity | |
| field_simp | |
| nlinarith [mul_le_mul_of_nonneg_left hR (show 0 β€ (l:β)^16 by positivity), | |
| show ((l:β)^10)^2=(l:β)^16*(l:β)^4 by ring] | |
| lemma uniform_tail_bound {l D : β} (hl : 1 β€ l) (hD : D β€ l^4) : | |
| tailError D ((l:β)^10) (6*(l:β)^2) β€ densityFloor D (6*(l:β)^2)*tailBound (l:β) := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have hf := densityFloor_pos D (6*(l:β)^2) | |
| rw [mul_comm (densityFloor D (6*(l:β)^2))] | |
| apply (div_le_iffβ hf).mp | |
| have hinv : (densityFloor D (6*(l:β)^2))β»ΒΉ β€ Real.exp (A*(l:β)^4) := | |
| (inv_antiβ (densityFloor_pos (l^4) _) (densityFloor_dimension_mono hD _)).trans (floor_inv_bound hl) | |
| unfold tailError | |
| rw [div_eq_mul_inv] | |
| calc | |
| _ β€ Real.exp (10*(l:β)^5)*Real.exp (-(l:β)^16/980000)*Real.exp (A*(l:β)^4) := by | |
| apply mul_le_mul (mul_le_mul (kernel_normalizer_bound hl hD) (Real.exp_le_exp.mpr (by linarith [tail_exponent_bound hl])) | |
| (Real.exp_pos _).le (Real.exp_pos _).le) hinv (inv_pos.mpr hf).le (by positivity) | |
| _ = Real.exp (10*(l:β)^5+A*(l:β)^4-(l:β)^16/980000) := by | |
| rw [βReal.exp_add,βReal.exp_add]; congr 1; ring | |
| _ β€ tailBound (l:β) := by | |
| apply Real.exp_le_exp.mpr | |
| have h5 : (l:β)^5 β€ (l:β)^6 := pow_le_pow_rightβ ht (by omega) | |
| have h4 : (l:β)^4 β€ (l:β)^6 := pow_le_pow_rightβ ht (by omega) | |
| nlinarith [mul_le_mul_of_nonneg_left h4 A_pos.le] | |
| end SingleLatticeCovering.GaussianNumerics | |
| end | |
| section | |
| namespace SingleLatticeCovering.GaussianNumerics | |
| open MeasureTheory Filter GaussianDensity GaussianProjection | |
| open scoped Topology | |
| noncomputable def shellRate (t : β) := 800*t*Real.exp (-t^2/180000) | |
| noncomputable def denRate (t : β) := Real.exp (-t^2/160000) | |
| noncomputable def shellBound (t : β) := 2*(shellRate t+2*(errBound t+2/t^16)) | |
| lemma shellRate_tendsto : Tendsto shellRate atTop (π 0) := by | |
| have H := tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero (1:β) (1/180000) (by norm_num) | |
| have H' : Tendsto (fun t : β => 800*(t*Real.exp (-(1/180000)*t))) atTop (π 0) := by | |
| simpa only [Real.rpow_one,mul_zero] using H.const_mul 800 | |
| change Tendsto (fun t : β => 800*t*Real.exp (-t^2/180000)) atTop (π 0) | |
| apply squeeze_zero' ?_ ?_ H' | |
| Β· filter_upwards [eventually_ge_atTop (0:β)] with t ht | |
| exact mul_nonneg (mul_nonneg (by norm_num) ht) (Real.exp_pos _).le | |
| Β· filter_upwards [eventually_ge_atTop (1:β)] with t ht | |
| have ht0 : 0 β€ t := by linarith | |
| rw [βmul_assoc] | |
| apply mul_le_mul_of_nonneg_left _ (by positivity) | |
| apply Real.exp_le_exp.mpr | |
| nlinarith | |
| lemma denRate_tendsto : Tendsto denRate atTop (π 0) := by | |
| have H : Tendsto (fun t : β => t^2/160000) atTop atTop := | |
| (tendsto_pow_atTop (by omega : (2:β) β 0)).atTop_div_const (by norm_num) | |
| change Tendsto (fun t : β => Real.exp (-t^2/160000)) atTop (π 0) | |
| simpa only [Function.comp_def,neg_div] using Real.tendsto_exp_atBot.comp (tendsto_neg_atTop_atBot.comp H) | |
| lemma shellBound_tendsto : Tendsto shellBound atTop (π 0) := by | |
| have HP : Tendsto (fun t : β => t^16) atTop atTop := tendsto_pow_atTop (by omega) | |
| have H : Tendsto (fun t : β => 2/t^16) atTop (π 0) := by | |
| simpa only [div_eq_mul_inv,mul_zero,Function.comp_def] using | |
| ((tendsto_inv_atTop_zero.comp HP).const_mul (2:β)) | |
| change Tendsto (fun t : β => 2*(shellRate t+2*(errBound t+2/t^16))) atTop (π 0) | |
| simpa only [zero_add,add_zero,mul_zero] using | |
| (shellRate_tendsto.add ((errBound_tendsto.add H).const_mul 2)).const_mul 2 | |
| lemma shell_term_bound {l : β} (hl : 2 β€ l) : | |
| (4*((l^4-1:β)+1:β)/((l^4-1:β)*(1/(100*(l:β))))* | |
| Real.exp (-((l^4-1:β):β)*(1/(100*(l:β)))^2/9)) β€ shellRate (l:β) := by | |
| have ht : (2:β) β€ l := by exact_mod_cast hl | |
| have ht0 : (0:β) < l := by linarith | |
| have h4 : (2:β) β€ (l:β)^4 := by nlinarith [sq_nonneg ((l:β)^2-2),sq_nonneg ((l:β)-2)] | |
| have hk : 1 β€ l^4 := by exact_mod_cast (show (1:β) β€ (l:β)^4 by linarith) | |
| have hm : ((l^4-1:β):β)=(l:β)^4-1 := by rw [Nat.cast_sub hk,Nat.cast_pow,Nat.cast_one] | |
| rw [hm] | |
| have hp : 4*((l:β)^4-1+1)/(((l:β)^4-1)*(1/(100*(l:β)))) β€ 800*(l:β) := by | |
| apply (div_le_iffβ (mul_pos (by linarith : 0 < (l:β)^4-1) (by positivity))).mpr | |
| have he : 800*(l:β)*(((l:β)^4-1)*(1/(100*(l:β))))=8*((l:β)^4-1) := by field_simp; ring | |
| rw [he] | |
| linarith | |
| have he : -((l:β)^4-1)*(1/(100*(l:β)))^2/9 β€ -(l:β)^2/180000 := by | |
| rw [show -((l:β)^4-1)*(1/(100*(l:β)))^2/9=-(((l:β)^4-1)/(90000*(l:β)^2)) by field_simp; ring, | |
| neg_div,neg_le_neg_iff] | |
| apply (le_div_iffβ (by positivity : 0 < 90000*(l:β)^2)).mpr | |
| nlinarith | |
| exact mul_le_mul hp (Real.exp_le_exp.mpr he) (Real.exp_pos _).le (by positivity) | |
| lemma denominator_identity {l : β} (hl : 1 β€ l) : | |
| Real.exp (-((l^4:β):β)*(1/(100*(l:β)))^2/16)=denRate (l:β) := by | |
| have ht0 : (0:β) < l := by exact_mod_cast (show 0 < l by omega) | |
| unfold denRate | |
| congr 1 | |
| push_cast | |
| field_simp | |
| ring | |
| lemma markov_term_bound {n l : β} (hn : 0 < n) (hl : 1 β€ l) : | |
| ((l^4:β):β)*((1/Real.sqrt (n:β))^2*(n:β)+1/((l:β)^10)^2)/((l:β)^10)^2 β€ 2/(l:β)^16 := by | |
| have ht : (1:β) β€ l := by exact_mod_cast hl | |
| have ht0 : (0:β) < l := lt_of_lt_of_le zero_lt_one ht | |
| rw [normalization_second hn,Nat.cast_pow] | |
| have h1 : 1/((l:β)^10)^2 β€ 1 := (div_le_one (by positivity)).mpr (one_le_powβ (one_le_powβ ht)) | |
| calc | |
| _ β€ (l:β)^4*2/((l:β)^10)^2 := by gcongr; linarith | |
| _ = _ := by field_simp | |
| lemma uniform_shell_bound {n l : β} (hn : 0 < n) (hl : 2 β€ l) | |
| (hroot : Real.exp ((l:β)^30) β€ Real.sqrt (Real.sqrt (n:β))) | |
| (hden : denRate (l:β) β€ 1/2) : | |
| shellLoss n (l^4) (1/Real.sqrt (n:β)) ((l:β)^10) ((l:β)^10) (1/(100*(l:β))) β€ shellBound (l:β) := by | |
| have hl1 : 1 β€ l := by omega | |
| have ht : (0:β) < l := by exact_mod_cast (show 0 < l by omega) | |
| unfold shellLoss shellError | |
| rw [denominator_identity hl1] | |
| have hd : 0 < 1-denRate (l:β) := by linarith | |
| apply (div_le_iffβ hd).mpr | |
| have H := shell_term_bound hl | |
| have HE := uniform_ball_error hn hl1 hroot | |
| have HM := markov_term_bound hn hl1 | |
| have hh : 0 β€ shellRate (l:β)+2*(errBound (l:β)+2/(l:β)^16) := by | |
| dsimp [shellRate,errBound]; positivity | |
| dsimp [shellBound] | |
| nlinarith | |
| lemma uniform_numeric_conditions : βαΆ l : β in atTop, | |
| 2 β€ l β§ denRate (l:β) β€ 1/2 β§ errBound (l:β) β€ 1/128 β§ tailBound (l:β) β€ 1/128 β§ | |
| shellBound (l:β) < 1/(4*Prekopa.fourthMomentConstant) β§ shellBound (l:β) β€ 1/8 := by | |
| have hfourth : 0 < Prekopa.fourthMomentConstant := Prekopa.fourthMomentConstant_pos | |
| have hnat : Tendsto (fun l : β => (l:β)) atTop atTop := tendsto_natCast_atTop_atTop | |
| filter_upwards [eventually_ge_atTop (2:β), | |
| (denRate_tendsto.comp hnat).eventually (eventually_le_nhds (by norm_num : (0:β) < 1/2)), | |
| (errBound_tendsto.comp hnat).eventually (eventually_le_nhds (by norm_num : (0:β) < 1/128)), | |
| (tailBound_tendsto.comp hnat).eventually (eventually_le_nhds (by norm_num : (0:β) < 1/128)), | |
| (shellBound_tendsto.comp hnat).eventually (eventually_lt_nhds (by positivity : (0:β) < 1/(4*Prekopa.fourthMomentConstant))), | |
| (shellBound_tendsto.comp hnat).eventually (eventually_le_nhds (by norm_num : (0:β) < 1/8))] | |
| with l h1 h2 h3 h4 h5 h6 | |
| exact β¨h1,h2,h3,h4,h5,h6β© | |
| end SingleLatticeCovering.GaussianNumerics | |
| end | |
| section | |
| namespace SingleLatticeCovering.GaussianNumerics | |
| open MeasureTheory Filter Set GaussianDensity GaussianProjection CanonicalDensity | |
| open scoped Topology ENNReal | |
| theorem eventually_local_position : βαΆ l : β in atTop, | |
| β m D : β, D β€ l β 0 < m+D β | |
| Real.exp ((l:β)^30) β€ Real.sqrt (Real.sqrt ((m+D : β):β)) β | |
| β K : Set (E (m+D)), IsCompact K β Convex β K β (interior K).Nonempty β | |
| β e : E (m+D) βα΅[β] ((Fin m β β) Γ E D), | |
| β y : E D, βyβ β€ 6*(l:β)^2 β density (1/2) y/2 β€ canonical (e '' K) y := by | |
| filter_upwards [uniform_numeric_conditions] with l hl | |
| obtain β¨hl2,hden,herr,htail,hloss,hloss8β© := hl | |
| have hl1 : 1 β€ l := by omega | |
| have ht : (1:β) β€ l := by exact_mod_cast hl1 | |
| have ht0 : (0:β) < l := lt_of_lt_of_le zero_lt_one ht | |
| have hl4 : l β€ l^4 := Nat.le_self_pow (by omega) l | |
| have hk : 2 β€ l^4 := hl2.trans hl4 | |
| intro m D hD hn hroot K hK hc hi | |
| have hDk : D β€ l^4 := hD.trans hl4 | |
| obtain β¨g,hJ,hJc,hJi,hprob,hmem,hiso,_,_,_β© := Isotropization.isotropic_logConcave_affine_body hK hc hi | |
| let := hprob | |
| have hΞ΅ : (0:β) < 1/(100*(l:β)) := by positivity | |
| have hΞ΅1 : (1:β)/(100*(l:β)) β€ 1/10 := by | |
| apply (div_le_iffβ (by positivity)).mpr | |
| linarith | |
| have hDΞ΅ : (D:β)*(1/(100*(l:β))) β€ 1/48 := by | |
| have hd : (D:β) β€ l := by exact_mod_cast hD | |
| rw [mul_one_div] | |
| apply (div_le_iffβ (by positivity)).mpr | |
| nlinarith | |
| have hShell := uniform_shell_bound hn hl2 hroot hden | |
| have hErr := uniform_error_bound hn hl1 hDk hroot | |
| have hTail := uniform_tail_bound hl1 hDk | |
| have hf := densityFloor_pos D (6*(l:β)^2) | |
| obtain β¨u,hu,hu4,e,heβ© := actual_canonical_lower hn hk hJ hJc hJi | |
| (Isotropization.uniformLaw (g '' K)) rfl hmem hiso (normalization_second hn) | |
| (one_le_powβ ht : 1 β€ (l:β)^10) (pow_pos ht0 10) hΞ΅ hΞ΅1 hDΞ΅ | |
| (show 0 β€ 6*(l:β)^2 by positivity) (hShell.trans_lt hloss) (hShell.trans hloss8) | |
| (hErr.trans (by nlinarith [mul_le_mul_of_nonneg_left herr hf.le])) | |
| (hTail.trans (by nlinarith [mul_le_mul_of_nonneg_left htail hf.le])) | |
| have hcomp : IsCompact (e '' (g '' K)) := hJ.image e.toContinuousLinearEquiv.continuous | |
| obtain β¨S,hSβ© := standardize_lower hcomp hu hu4 (show 0 β€ 6*(l:β)^2 by positivity) he | |
| refine β¨g.trans (e.trans S).toAffineEquiv,fun y hy => ?_β© | |
| have himage : (g.trans (e.trans S).toAffineEquiv) '' K=S '' (e '' (g '' K)) := by | |
| rw [Set.image_image,Set.image_image] | |
| rfl | |
| rw [himage] | |
| exact hS y hy | |
| end SingleLatticeCovering.GaussianNumerics | |
| end | |
| end OAI | |