Gauss sums and character-twisted von Mangoldt sums
DefinitionVino_dirichletanalytic-number-theorycircle-methoddirichlet-charactersnumber-theory
Two objects carry the major-arc analysis of the prime-side generating function.
The Gauss sum of a Dirichlet character modulo is
It is the coefficient that appears when the additive character at a reduced fraction is expanded in multiplicative characters.
The character-twisted von Mangoldt sum is
Because a Dirichlet character vanishes off the reduced residues, this sum automatically restricts to coprime to ; its size for non-principal is exactly what the prime number theorem in arithmetic progressions controls.
Together these turn the value of into a weighted average , which is the identity the major arcs run on.
Definition code
import Definitions.Def_CircleMethod_char
import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt
import Mathlib.NumberTheory.DirichletCharacter.Basic
namespace Vino
/-- The Gauss sum `τ(χ) = ∑_{m < q} χ(m) e(m/q)` attached to a Dirichlet
character `χ` modulo `q`. -/
noncomputable def gaussE (q : ℕ) (χ : DirichletCharacter ℂ q) : ℂ :=
∑ m ∈ Finset.range q, χ (m : ZMod q) * CircleMethod.e ((m : ℝ) / (q : ℝ))
/-- The von Mangoldt sum twisted by a Dirichlet character,
`ψ(N, χ) = ∑_{n < N} Λ(n) χ(n)`. -/
noncomputable def vmSumChar (q : ℕ) (χ : DirichletCharacter ℂ q) (N : ℕ) : ℂ :=
∑ n ∈ Finset.range N,
((ArithmeticFunction.vonMangoldt n : ℝ) : ℂ) * χ (n : ZMod q)
end Vino
Source
H. Davenport, Multiplicative Number Theory, 3rd ed., Springer GTM 74, 2000, Chapters 9 and 26; R. C. Vaughan, The Hardy-Littlewood Method, 2nd ed., Cambridge Tracts in Mathematics 125, Cambridge University Press, 1997, Chapter 3, Section 3.1.