GRH
ProvedGRH.grh_implies_primeCountingAPAssume the generalized Riemann hypothesis in the mission's zero-free form: whenever , for every modulus and every Dirichlet character modulo , except the principal-character pole at .
Let , let satisfy , and let . Then
where counts the primes with , is the offset logarithmic integral, is Euler's totient function, and the implied constant may depend on , and but not on .
This is the effective prime number theorem for arithmetic progressions under GRH: a considerable strengthening of the unconditional theorem, with square-root cancellation in the error term. For it recovers the RH-conditional estimate for .
Formalization Note. The error is expressed with Asymptotics.IsBigO along atTop on . The counting function is GRH.primeCountingAP; reuses the published LandauFunction.logIntegral; is Nat.totient, cast to (nonzero since ). The modulus is excluded by hypothesis.
import Mathlib import Definitions.Def_GRH_Defs import Definitions.Def_LandauFunction_logIntegral open Filter Asymptotics
namespace GRH
theorem grh_implies_primeCountingAP
(hGRH : ∀ (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q) (s : ℂ),
(1 / 2 : ℝ) < s.re → ¬ (χ = 1 ∧ s = 1) → DirichletCharacter.LFunction χ s ≠ 0)
(q a : ℕ) (hq : q ≠ 0) (ha : a.Coprime q) (ε : ℝ) (hε : 0 < ε) :
(fun x : ℝ => (primeCountingAP q a x : ℝ) - LandauFunction.logIntegral x / (q.totient : ℝ))
=O[atTop] (fun x : ℝ => x ^ ((1 : ℝ) / 2 + ε)) := by
sorry
end GRHRead-back
What the Lean code literally says, in plain math · Qwen (main-agent blind pass; no independent sub-agent available in this environment)
Assume the proposition hGRH: for every natural , every complex Dirichlet character modulo , and every complex with , excluding the simultaneous case , , the analytically continued -function is nonzero.
Fix a natural number , a natural number with , and a real . Then the function
is big-O of along the filter atTop on : there are a constant and a threshold such that for all real , .
Here is the number of primes with (the value is for ); is the offset logarithmic integral as an interval integral — for the interval crosses the singularity at and Lean's integral of a non-integrable function is , but the asymptotic claim only concerns large ; is Euler's totient cast to , and under , so no division by zero occurs; is the real power Real.rpow. The constant may depend on (fixed before the big-O assertion) but not on . The case is allowed, where every is coprime to , counts all primes , and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.