Download data/lean/OAI/NumberTheory/TwoPoint/Halasz/HalaszDoubleConvolution.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Halasz/HalaszDoubleConvolution.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Halasz/HalaszDoubleConvolution.lean
-
curl -L -o HalaszDoubleConvolution.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Halasz/HalaszDoubleConvolution.lean
3.07 kB
| import OAI.NumberTheory.TwoPoint.Halasz.HalaszPrimeTruncation | |
| import OAI.NumberTheory.TwoPoint.Halasz.HalaszInnerApproximation | |
| namespace OAI | |
| /-! Apply the prime convolution a second time, retaining the varying | |
| denominator log(N/p). This is the adaptive triple sum in the short proof of | |
| Halasz's theorem. -/ | |
| namespace TwoPointCorrelations | |
| open Finset | |
| open scoped Classical | |
| noncomputable def halaszDoubleConvolution (f : β β β) (N : β) (L : β) : β := | |
| β p β mrtPrimeBand L ((N : β) / 2), | |
| (Real.log (p : β) : β) * f p * | |
| (halaszPrimeConvolution f (N / p) / (Real.log ((N : β) / p) : β)) | |
| lemma halasz_divisor_cutoff {N p : β} (hp : 0 < p) (hpN : 2 * p β€ N) : | |
| 1 β€ N / p β§ ((N / p : β) : β) β€ (N : β) / p β§ | |
| (N : β) / p β€ 2 * ((N / p : β) : β) := by | |
| have hp0 : (0 : β) < p := by exact_mod_cast hp | |
| have hM : 1 β€ N / p := (Nat.le_div_iff_mul_le hp).mpr (by omega) | |
| refine β¨hM, ?_, ?_β© | |
| Β· apply (le_div_iffβ hp0).mpr | |
| exact_mod_cast Nat.div_mul_le_self N p | |
| Β· have hmod : ((N % p : β) : β) < p := by exact_mod_cast Nat.mod_lt N hp | |
| have hid : ((N % p : β) : β) + (p : β) * ((N / p : β) : β) = N := by | |
| exact_mod_cast Nat.mod_add_div N p | |
| have hM1 : (1 : β) β€ ((N / p : β) : β) := by exact_mod_cast hM | |
| apply (div_le_iffβ hp0).mpr | |
| nlinarith | |
| theorem halasz_double_convolution_error (f : β β β) (hf : OneBounded f) | |
| (hmul : β m n : β, 0 < m β 0 < n β f (m * n) = f m * f n) | |
| (N : β) {L : β} (hL : 1 β€ L) : | |
| βhalaszPrimeBandConvolution f N L ((N : β) / 2) - | |
| halaszDoubleConvolution f N Lβ β€ | |
| halaszInnerErrorConstant * (N : β) * | |
| β p β mrtPrimeBand L ((N : β) / 2), | |
| Real.log (p : β) / ((p : β) * Real.log ((N : β) / p)) := by | |
| have hN : (0 : β) β€ N := Nat.cast_nonneg _ | |
| have hL0 : 0 β€ L := by linarith | |
| unfold halaszPrimeBandConvolution halaszDoubleConvolution halaszPrimeTerm | |
| rw [β sum_sub_distrib, mul_sum] | |
| apply (norm_sum_le _ _).trans | |
| apply sum_le_sum | |
| intro p hp | |
| have hprime := mrtPrimeBand_prime hp | |
| have hb := mrtPrimeBand_bounds hL0 (by positivity : (0 : β) β€ (N : β) / 2) hp | |
| have hpN : 2 * p β€ N := by exact_mod_cast (show 2 * (p : β) β€ N by linarith) | |
| obtain β¨hM, hMx, hxMβ© := halasz_divisor_cutoff hprime.pos hpN | |
| have hp0 : (0 : β) < p := by exact_mod_cast hprime.pos | |
| have hx : 1 < (N : β) / p := by | |
| have hh : (2 : β) β€ (N : β) / p := (le_div_iffβ hp0).mpr (by linarith) | |
| linarith | |
| have hlog : 0 β€ Real.log (p : β) := Real.log_nonneg (by exact_mod_cast hprime.one_le) | |
| rw [β mul_sub, norm_mul, norm_mul, Complex.norm_real, Real.norm_eq_abs, | |
| abs_of_nonneg hlog] | |
| calc | |
| _ β€ Real.log (p : β) * 1 * | |
| (halaszInnerErrorConstant * ((N : β) / p) / Real.log ((N : β) / p)) := by | |
| gcongr | |
| Β· exact hf p hprime.pos | |
| Β· exact halasz_real_inner_approximation f hf hmul (N / p) hM hx hMx hxM | |
| _ = _ := by ring | |
| end TwoPointCorrelations | |
| end OAI | |