Gauss sums of primitive characters and the Pólya–Vinogradov bound
Lib.Analytic.PolyaVinogradov.lean
Reading
Upstream documentation written by Claude
The Gauss sum of a primitive Dirichlet character mod
qhas absolute value√q. For a non-principal character modq, every partial sum of its values is at most2 √q (1 + log q)in absolute value.
New.norm_gaussSum_of_isPrimitive: the modulus of the Gauss sum.New.polya_vinogradov: the Pólya–Vinogradov inequality.Relation to the literature
Known result: the Pólya–Vinogradov inequality for sums of a non-principal Dirichlet character. It is proved here for initial intervals only, with the explicit bound
2 √q (1 + log q). The case of a general character is reduced to the primitive character that induces it by a Möbius sieve. Source: Pólya 1918, Vinogradov 1918; Davenport, Multiplicative Number Theory; Montgomery–Vaughan Thm 9.18.
Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.
Declarations
theorem polya_vinogradov (hχ : χ ≠ 1) (X : ℕ) : ‖∑ v ∈ Ioc 0 X, χ v‖ ≤ 2 * √q * (1 + Real.log q)
Import route to Main
Lib.Analytic.PolyaVinogradov → Lib.Analytic.DirichletTheta (pinned import) → Lib.Analytic.QuadraticTwist (pinned import) → New.Reduction.Zeros.Criterion (pinned import) → New.Reduction.OneSidedBound (pinned import) → New.Main (pinned import) → Main (pinned import)