A weighted prime-counting error term and its poles at zeros of L-functions
New.Reduction.Zeros.PrimeError.lean
Reading
Upstream documentation written by Claude
Let
dbe a prime andχ_K = (·/d)the Legendre symbol. We study the remainderR_qof a weighted sum over the prime powersn ≡ 1moduloqwithχ_K(n) ≠ 1. Its Laplace transform sees the zeros of the DirichletL-functions moduloqand of their twists byχ_K.
New.lambdaKResidueClass: the weightλ(n) = Λ(n) (1 - χ_K(n))onn ≡ 1moduloq; it is nonnegative.
Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.
Rest of upstream introduction
New.logDerivMean: the meanG_qover the charactersψmoduloqof the differences of the logarithmic derivatives ofNew.entireL (New.quadTwist ψ d)andNew.entireL ψ, less1 / φ(q).New.primeRemainder:R_q(x) = ∑_{n ≤ x} λ(n) (1/n - 1/x) - log x / φ(q) - re G_q(1).New.LSeries_lambdaKResidueClass_eq_add_logDerivMean: for odddprime toq, the Dirichlet series ofλiss / (φ(q) (s - 1)) + G_q(s)inre s > 1.New.isPolar_primeRemainder: ford ≡ 7modulo8prime toq, the transform ofv ↦ R_q(e ^ v)has at most simple poles inre s > 0, none at1, and ats ≠ 1with the residue(n(s) - n'(s)) / (φ(q) s (1 - s)), wheren(s)andn'(s)are the sums of the orders atsof theseL-functions and of their twists.
Here New.entireL ψ is L(s, ψ), times s - 1 if ψ is principal, New.quadTwist ψ d is the
character ψ χ_K, and New.chowlaSelbergConst d is, for odd d, γ - re L'/L(1, χ_K), with γ
Euler's constant.
Relation to the literature
The transform of a weighted prime sum in a residue class is computed by orthogonality of characters and partial summation. Source: Davenport, Multiplicative Number Theory.
Declarations
lemma isPolar_primeRemainder (hd : d % 8 = 7) (h_cop : q.Coprime d) : IsPolar (fun v : ℝ ↦ primeRemainder d q (Real.exp v)) fun s : ℂ ↦ (∑ ψ : DirichletCharacter ℂ q, (analyticOrderNatAt (entireL ψ) s - analyticOrderNatAt (entireL (quadTwist ψ d)) s : ℂ)) / φ q / (s * (1 - s))
Import route to Main
New.Reduction.Zeros.PrimeError → New.Reduction.Zeros.Criterion (pinned import) → New.Reduction.OneSidedBound (pinned import) → New.Main (pinned import) → Main (pinned import)