Download data/lean/OAI/Analysis/Fourier/LocalSmoothing/Sharpness/LogPowers.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.51 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Fourier/LocalSmoothing/Sharpness/LogPowers.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Fourier/LocalSmoothing/Sharpness/LogPowers.lean
-
curl -L -o LogPowers.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Fourier/LocalSmoothing/Sharpness/LogPowers.lean
3.51 kB
| import Mathlib | |
| noncomputable section | |
| namespace OAI.Analysis.Fourier.LocalSmoothing.Sharpness | |
| open Filter | |
| open scoped Topology | |
| theorem rpow_add_one_upper {x : β} (hx : 1 β€ x) (b : β) : | |
| (1+x)^b β€ 2^(max b 0)*x^b := by | |
| have hx0 : 0 < x := lt_of_lt_of_le zero_lt_one hx | |
| by_cases hb : 0 β€ b | |
| Β· rw [max_eq_left hb] | |
| calc | |
| _ β€ (2*x)^b := Real.rpow_le_rpow (by positivity) (by linarith) hb | |
| _ = _ := Real.mul_rpow (by norm_num) hx0.le | |
| Β· rw [max_eq_right (le_of_not_ge hb),Real.rpow_zero,one_mul] | |
| exact Real.rpow_le_rpow_of_nonpos hx0 (by linarith) (le_of_not_ge hb) | |
| theorem shifted_rpow_necessary {c D a b r : β} (hc : 0 < c) (hD : 0 β€ D) | |
| (ha : 0 < a) | |
| (h : βαΆ x : β in atTop, c*(x+r)^a β€ D*(1+x)^b) : a β€ b := by | |
| by_contra hab | |
| have hba : b-a < 0 := by linarith | |
| have hl : βαΆ x : β in atTop, | |
| c*(1/2:β)^a β€ (D*2^(max b 0))*x^(b-a) := by | |
| filter_upwards [h,eventually_ge_atTop (max 1 (-2*r))] with x h hx | |
| have hx1 : 1 β€ x := (le_max_left _ _).trans hx | |
| have hxr : -2*r β€ x := (le_max_right _ _).trans hx | |
| have hx0 : 0 < x := lt_of_lt_of_le zero_lt_one hx1 | |
| have hlo : c*((1/2:β)*x)^a β€ c*(x+r)^a := | |
| mul_le_mul_of_nonneg_left (Real.rpow_le_rpow (by positivity) (by linarith) ha.le) hc.le | |
| have hhi := mul_le_mul_of_nonneg_left (rpow_add_one_upper hx1 b) hD | |
| have hall := hlo.trans (h.trans hhi) | |
| rw [Real.mul_rpow (by norm_num : (0:β) β€ 1/2) hx0.le] at hall | |
| have hm := mul_le_mul_of_nonneg_right hall (Real.rpow_nonneg hx0.le (-a)) | |
| have hcancel : x^a*x^(-a) = 1 := by rw [βReal.rpow_add hx0]; simp | |
| have hp : x^b*x^(-a) = x^(b-a) := by rw [βReal.rpow_add hx0]; rfl | |
| calc | |
| c*(1/2:β)^a = (c*((1/2:β)^a*x^a))*x^(-a) := by rw [mul_assoc, mul_assoc,hcancel,mul_one] | |
| _ β€ (D*(2^(max b 0)*x^b))*x^(-a) := hm | |
| _ = _ := by rw [mul_assoc,mul_assoc,hp]; ring | |
| have ht : Tendsto (fun x : β => (D*2^(max b 0))*x^(b-a)) atTop (π 0) := by | |
| have hh : Tendsto (fun x : β => x^(b-a)) atTop (π 0) := by | |
| simpa only [neg_sub] using tendsto_rpow_neg_atTop (show 0 < a-b by linarith) | |
| simpa only [mul_zero] using hh.const_mul (D*2^(max b 0)) | |
| have hz := ge_of_tendsto ht hl | |
| have hp : 0 < c*(1/2:β)^a := by positivity | |
| linarith | |
| theorem shifted_log_power_necessary {c D a b K : β} (hc : 0 < c) (hD : 0 β€ D) | |
| (ha : 0 < a) (hK : 0 < K) | |
| (h : βαΆ N : β in atTop, | |
| c*(Real.log (N/K))^a β€ D*(1+Real.log (N/4))^b) : a β€ b := by | |
| have ht : Tendsto (fun x : β => 4*Real.exp x) atTop atTop := | |
| Filter.Tendsto.const_mul_atTop (by norm_num) Real.tendsto_exp_atTop | |
| apply shifted_rpow_necessary (r := Real.log 4-Real.log K) hc hD ha | |
| filter_upwards [ht.eventually h] with x hx | |
| have hl : Real.log (4*Real.exp x/K) = x+(Real.log 4-Real.log K) := by | |
| rw [Real.log_div (by positivity) hK.ne',Real.log_mul (by norm_num) (Real.exp_ne_zero _),Real.log_exp] | |
| ring | |
| have hr : Real.log (4*Real.exp x/4) = x := by | |
| rw [show 4*Real.exp x/4 = Real.exp x by ring,Real.log_exp] | |
| simpa only [hl,hr] using hx | |
| theorem log_quotient_ge_half {K N : β} (hK : 1 β€ K) (hN : K^2 β€ N) : | |
| (1/2:β)*Real.log N β€ Real.log (N/K) := by | |
| have hK0 : 0 < K := lt_of_lt_of_le zero_lt_one hK | |
| have hN0 : 0 < N := (sq_pos_of_pos hK0).trans_le hN | |
| have hh := Real.log_le_log (sq_pos_of_pos hK0) hN | |
| rw [Real.log_pow] at hh | |
| rw [Real.log_div hN0.ne' hK0.ne'] | |
| norm_num at hh | |
| linarith | |
| end OAI.Analysis.Fourier.LocalSmoothing.Sharpness | |