File size: 3,065 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 | 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
|