Estimate for from the zero-free region, with exceptional term (Davenport §20)
ProvedDavenport.psi_char_of_regionThe prime number theorem for characters, given the zero-free region (Davenport §20, character form). Fix a region constant . There are constants (depending only on ) such that for every modulus , every Dirichlet character modulo , and every exceptional set for with respect to (IsExceptionalSet c χ E: at most one real zero of in the region, only for quadratic , and no other zeros in the region ), and every with
one has
where and if is principal, otherwise. That is, , the term being present exactly when has an exceptional zero .
The region constant is a parameter so that this milestone is independent of the §14 milestone (which produces a specific together with a witness for every ). For a large the hypothesis on may be unsatisfiable for some , which makes the statement vacuous there, not false. The principal character is included (main term ), so the statement contains the prime number theorem with de la Vallée Poussin error.
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
open Classical in
theorem psi_char_of_region (c : ℝ) (hc : 0 < c) :
∃ c₁ c₂ C : ℝ, 0 < c₁ ∧ 0 < c₂ ∧ 0 < C ∧
∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q) (E : Set ℂ),
IsExceptionalSet c χ E →
∀ N : ℕ, 2 ≤ N → (q : ℝ) ≤ Real.exp (c₂ * Real.sqrt (Real.log N)) →
‖vmSumChar q χ N - (if χ = 1 then (N : ℂ) else 0)
+ ∑ᶠ z ∈ E, (N : ℂ) ^ z / z‖
≤ 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.psi_char_of_region
Statement. The declaration asserts: for every real number with , there exist three real numbers , all strictly positive, such that the following holds for every modulus, every Dirichlet character, every set , and every . The quantifier order matters: is given first; then are chosen (they are allowed to depend on , and on nothing else); and only afterwards are , , , quantified, so are uniform in all four of those. The three constants are required only to be positive reals — no upper bound, no lower bound, and no relation among them or to is imposed.
The inner universally quantified claim. For every natural number that is nonzero (the typeclass hypothesis NeZero q, i.e. ), for every Dirichlet character modulo with values in , and for every subset , if is an exceptional set for at parameter (unfolded below), then for every natural number satisfying
one has
Here is the von Mangoldt function (cast from into ), the summation index runs over (strictly below ; the value is not included, and ), is the character evaluated at the residue class of in (in particular it is when ), denotes the trivial (principal) character modulo — the multiplicative unit — so the subtracted main term is exactly the complex number when is principal and for every non-principal , is the complex power of the positive real , is the complex modulus, and the right-hand side is the real number (note , so the square root is real and positive). The sum is a finite sum over the set , defined to be when the summand has infinite support; it is added to, not subtracted from, the difference of the character sum and its main term.
Unfolding IsExceptionalSet c χ E. The hypothesis on is the conjunction of exactly three conditions.
-
has at most one element ( is a subsingleton: any two of its elements are equal). In particular is permitted, and then the added sum is ; otherwise for a single and the added sum is .
-
Every satisfies all seven of: ; ; ; lies in the region (unfolded below); , where is the analytically continued Dirichlet -function of ; is quadratic (every value of is , , or ); and . Consequently, if is the principal character (which is automatic when , where every character is trivial), no can satisfy clause 2, so must be empty; and whenever , is forced to be a non-principal quadratic character and is a real zero of in the open interval .
-
Zero-freeness off : for every with , if lies in the region and , then . This is asserted for all such in the region, including those with and arbitrary imaginary part; the single point is excluded from the requirement, as is the (at most one) point of .
Unfolding the region. " lies in the region" is InRegion c q s, which unfolds to the inequality
a non-strict inequality, with regionBoundary being the left-hand side. Since , the argument of the logarithm is at least , so the logarithm is at least and no division by zero occurs. For real (as in clause 2) the condition reads .
Degenerate and edge cases made explicit.
-
Large can make the hypothesis unsatisfiable. The parameter is an arbitrary positive real and appears only inside the region: larger pushes
regionBoundaryfurther left, enlarging the region and therefore strengthening clause 3 (zero-freeness is demanded on a bigger set) while also relaxing the membership condition in clause 2. For large enough that the region contains points where vanishes at more than one place — e.g. once the region reaches for small , which happens when — no set satisfiesIsExceptionalSet c χ E, and the whole inner claim is vacuously true for that and . The statement makes no claim that any exists; it only says what follows if one is supplied. -
. Permitted by
NeZero q. Then is trivial, the only character is , for all , must be empty by clause 2, the main term is , and clause 3 demands that (the Riemann zeta function in this case) be nonvanishing on the whole region except at . -
. Allowed by the subsingleton condition; the correction term is then and the conclusion is the plain bound .
-
. Explicitly exempted from clause 3, so nothing is asserted about (where the principal character's -function has a pole). Note also that can never lie in , since elements of must have real part strictly less than ; and can never lie in either (real part strictly positive), so the division by in the correction term is never by zero.
-
The range hypothesis. For any fixed , the condition fails for small and holds for all sufficiently large ; conversely, for fixed it restricts the conclusion to moduli up to . Nothing is asserted for pairs outside this range, nor for .
-
No modulus, primitivity, or conductor conditions are imposed on beyond what clause 2 forces when is nonempty; may be any Dirichlet character modulo with complex values, including imprimitive ones, and need not be related to except through the displayed inequality.
-
The proof is omitted (
sorry); the file asserts the statement without establishing it.
Confirmed by the mission captain (proposal self-audit).