The Siegel–Walfisz theorem for arithmetic progressions (Davenport §22)
ProvedDavenport.siegel_walfisz_apThe Siegel–Walfisz theorem, progression form (Davenport §22). For any fixed there are constants such that for all , all moduli and all with ,
i.e. uniformly for . It follows from the character form by orthogonality of characters, . The constants are ineffective.
import Definitions.Def_Davenport_siegelWalfisz import Mathlib.NumberTheory.LSeries.DirichletContinuation import Mathlib.NumberTheory.DirichletCharacter.Basic import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt import Mathlib.NumberTheory.Chebyshev import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Nat.Totient open Finset DirichletCharacter Vino
namespace Davenport
theorem siegel_walfisz_ap (A : ℝ) (hA : 0 < A) :
∃ c C : ℝ, 0 < c ∧ 0 < C ∧
∀ (N q a : ℕ), 2 ≤ N → 1 ≤ q → (q : ℝ) ≤ Real.log N ^ A → Nat.Coprime a q →
|psiAP N q a - (N : ℝ) / (Nat.totient q : ℝ)|
≤ C * N * Real.exp (-c * Real.sqrt (Real.log N)) := by sorry
end DavenportRead-back
What the Lean code literally says, in plain math · claude-opus-4-8
Read-back: Davenport.siegel_walfisz_ap
Statement. For every real number satisfying , there exist real numbers and with and , such that for all natural numbers , , satisfying the four hypotheses
- ,
- ,
- (the natural number cast to a real, compared against the real power , i.e. when ),
- ,
the following inequality holds:
where is Euler's totient function and denotes the quantity written psiAP N q a in the code, which unfolds to
i.e. the sum of the von Mangoldt function over those in the index range whose residue class modulo equals that of . Here when for a prime and an integer , and otherwise; in particular , so the terms and contribute nothing even when they satisfy the congruence. All arithmetic in the displayed inequality is over the reals: , , and are cast to real numbers, is the real natural logarithm, the real square root, the real exponential, and the real absolute value.
Quantifier order. The order is: first, then and (which may therefore depend on but on nothing else), then , , . Thus and are uniform in , , and simultaneously: a single pair must work for every admissible triple. The statement asserts only the existence of such a pair; it gives no formula for, or bound on, or , and does not claim any relation between them.
Range and endpoint conventions. The summation index runs over ; the endpoint is excluded. The main term subtracted is with the full in the numerator (not , and not a count of the summation range), and it is divided by rather than by anything involving or .
Degenerate and edge cases silently included.
- is excluded by the hypothesis , so the division by is never a division by ; for one has .
- is permitted. Then the ring is trivial, so the congruence condition holds for every , and is the full Chebyshev-type sum ; also , so the main term is , and holds for every including .
- No hypothesis requires ; is an arbitrary natural number and only its residue class modulo matters. Large values of (including , or arbitrarily larger than ) are covered, as is — though , so is admissible only when .
- No hypothesis relates to beyond ; in particular there is no assumption or beyond what that inequality forces, and no lower bound on other than .
- The hypotheses and together force , hence (as ) , i.e. , i.e. . Consequently the case — although admitted by the hypothesis — is vacuous: no satisfies both remaining constraints, so the theorem asserts nothing for . For all one has , so is the ordinary positive real power and is a genuine (positive) square root rather than the value that the total square-root function returns on negative inputs.
- Nothing is asserted for pairs with : the range of moduli covered grows only like a fixed power of , with the power fixed before and are chosen.
- The inequality is non-strict () on both the modulus bound and the conclusion.
What is not said. The statement contains no reference to Dirichlet characters, -functions, exceptional zeros, or any of the other definitions in the surrounding bundle; it is purely the displayed inequality on . It is an existence claim over only, with no effectivity, no uniformity in , and no assertion about the sharpness of the exponent .
Confirmed by the mission captain (proposal self-audit).