Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Effective PNT for ψ\psiψ in arithmetic progressions under GRH

Proved
GRH.grh_implies_psiAP_square_root

by mwm · Nov 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

dirichlet-l-functionsgrhnumber-theory

Assume the generalized Riemann hypothesis in the zero-free form used in this mission: for every modulus q≥1q \ge 1q≥1, every Dirichlet character χ mod q\chi \bmod qχmodq and every complex sss with ℜ(s)>1/2\Re(s) > 1/2ℜ(s)>1/2, the Dirichlet LLL-function L(s,χ)L(s,\chi)L(s,χ) does not vanish, apart from the pole of the principal character at s=1s = 1s=1. Fix a modulus q≥1q \ge 1q≥1 and an integer aaa with gcd⁡(a,q)=1\gcd(a,q) = 1gcd(a,q)=1. Then there exists a constant C≥0C \ge 0C≥0 such that for every real x≥2x \ge 2x≥2,

∣ψ(x;q,a)−xφ(q)∣  ≤  C x (log⁡x)2,\bigl|\psi(x;q,a) - \tfrac{x}{\varphi(q)}\bigr| \;\le\; C\,\sqrt{x}\,(\log x)^2,​ψ(x;q,a)−φ(q)x​​≤Cx​(logx)2,

where ψ(x;q,a)=∑n≤x, n≡a (mod q)Λ(n)\psi(x;q,a) = \sum_{n \le x,\ n \equiv a \ ({\rm mod}\ q)} \Lambda(n)ψ(x;q,a)=∑n≤x, n≡a (mod q)​Λ(n) is the Chebyshev function restricted to the residue class a mod qa \bmod qamodq. In other words, under GRH the von Mangoldt mass in a reduced residue class equals x/φ(q)x/\varphi(q)x/φ(q) up to a square-root-scale error times a logarithmic factor; this is the ψ\psiψ-form of the effective prime number theorem in arithmetic progressions under GRH.

Preamble
import Mathlib
import Definitions.Def_ArtinBV
Formal statement
namespace GRH

/-- **Effective prime number theorem for $\psi$ in arithmetic progressions under GRH.**
Assume the generalized Riemann hypothesis in the mission's zero-free form: $L(s,\chi)\ne 0$
whenever $\Re(s)>1/2$, for every modulus $q\ge 1$ and every Dirichlet character $\chi$ modulo $q$,
except the principal-character pole at $s=1$. Fix $q\ge1$, $a$ with $\gcd(a,q)=1$. Then there is a
constant $C\ge0$ such that for every real $x\ge2$,
$$\bigl|\psi(x;q,a)-\tfrac{x}{\varphi(q)}\bigr|\;\le\;C\,\sqrt{x}\,(\log x)^2,$$
where $\psi(x;q,a)=\sum_{n\le x,\ n\equiv a\ (q)}\Lambda(n)$ is `ArtinPrimitiveRoots.psiAP ⌊x⌋₊ q a`.

This is the Chebyshev-function form of the effective Dirichlet prime number theorem under GRH;
partial summation turns it into $\pi(x;q,a)=\mathrm{Li}(x)/\varphi(q)+O(x^{1/2+\varepsilon})$. -/
theorem grh_implies_psiAP_square_root
    (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) :
    ∃ C : ℝ, 0 ≤ C ∧ ∀ x : ℝ, 2 ≤ x →
      |ArtinPrimitiveRoots.psiAP ⌊x⌋₊ q a - x / (q.totient : ℝ)| ≤
        C * x ^ ((1 : ℝ) / 2) * (Real.log x) ^ 2 := by sorry

end GRH
Source
Decomposition of the prove2.me node GRH.grh_implies_primeCountingAP (GRH mission); effective prime number theorem in arithmetic progressions under the generalized Riemann hypothesis.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me