Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Zero-counting functions N(T)N(T)N(T), N(T,χ)N(T,\chi)N(T,χ) and the Lindelöf hypothesis

Definition
RiemannVonMangoldt_ZeroCounts

by Lucas · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theoryriemann-zetazeros-of-zeta

This file fixes the three objects in terms of which the Riemann–von Mangoldt formula and its refinements are stated.

  1. The zero-counting function of ζ\zetaζ. For real TTT, let
N(T)=∑ρ: ζ(ρ)=00<Re⁡ρ<1, 0<Im⁡ρ≤Tmρ,N(T)=\sum_{\substack{\rho:\ \zeta(\rho)=0\\ 0<\operatorname{Re}\rho<1,\ 0<\operatorname{Im}\rho\le T}} m_\rho ,N(T)=ρ: ζ(ρ)=00<Reρ<1, 0<Imρ≤T​∑​mρ​,

where mρ≥1m_\rho\ge 1mρ​≥1 is the multiplicity (order of vanishing) of the zero ρ\rhoρ of the Riemann zeta function. Thus N(T)N(T)N(T) is the number of zeros of ζ\zetaζ in the critical strip with imaginary part in (0,T](0,T](0,T], counted with multiplicity; N(T)=0N(T)=0N(T)=0 for T≤0T\le 0T≤0.

  1. The zero-counting function of a Dirichlet LLL-function. For a positive integer qqq, a Dirichlet character χ\chiχ modulo qqq and real TTT, let
N(T,χ)=∑ρ: L(ρ,χ)=00<Re⁡ρ<1, −T≤Im⁡ρ≤Tmρ,N(T,\chi)=\sum_{\substack{\rho:\ L(\rho,\chi)=0\\ 0<\operatorname{Re}\rho<1,\ -T\le\operatorname{Im}\rho\le T}} m_\rho ,N(T,χ)=ρ: L(ρ,χ)=00<Reρ<1, −T≤Imρ≤T​∑​mρ​,

the number of zeros of L(s,χ)L(s,\chi)L(s,χ) in the critical strip with imaginary part between −T-T−T and TTT, counted with multiplicity.

  1. The Lindelöf hypothesis. The statement that for every ε>0\varepsilon>0ε>0,
ζ ⁣(12+it)=O ⁣(tε)(t→+∞).\zeta\!\left(\tfrac12+it\right)=O\!\left(t^{\varepsilon}\right)\qquad (t\to+\infty).ζ(21​+it)=O(tε)(t→+∞).

These are the standard definitions used by Titchmarsh (The Theory of the Riemann Zeta-Function, §9.2 and §13) and Davenport (Multiplicative Number Theory, Ch. 16).

Formalization Note ζ\zetaζ is Mathlib's riemannZeta and L(s,χ)L(s,\chi)L(s,χ) is DirichletCharacter.LFunction (the analytic continuation of ∑χ(n)n−s\sum\chi(n)n^{-s}∑χ(n)n−s). The multiplicity is analyticOrderNatAt, and each count is a finsum over the zero set, which is finite for every TTT (zeros of a nonzero meromorphic function in a bounded region); this finiteness is a fact a solver must establish, not an assumption. Every zero of ζ\zetaζ with positive imaginary part lies in the open strip 0<Re⁡s<10<\operatorname{Re}s<10<Res<1, so restricting to the strip in item 1 agrees with the source's "zeros with imaginary part greater than 0 and at most TTT". In item 2 the open strip excludes the trivial zero at s=0s=0s=0 of an even nonprincipal character. Since ζ(sˉ)=ζ(s)‾\zeta(\bar s)=\overline{\zeta(s)}ζ(sˉ)=ζ(s)​, the one-sided bound in item 3 is equivalent to the usual two-sided form ζ(12+it)=O((1+∣t∣)ε)\zeta(\tfrac12+it)=O((1+|t|)^{\varepsilon})ζ(21​+it)=O((1+∣t∣)ε).

Definition code
import Mathlib

/-!
# Zero-counting functions for the Riemann–von Mangoldt formula

* `zetaZeroCount T` is `N(T)`: the number of zeros `ρ` of the Riemann zeta function with
  `0 < Re ρ < 1` and `0 < Im ρ ≤ T`, counted with multiplicity.
* `dirichletZeroCount χ T` is `N(T, χ)`: the number of zeros `ρ` of the Dirichlet
  `L`-function `L(s, χ)` with `0 < Re ρ < 1` and `-T ≤ Im ρ ≤ T`, counted with multiplicity.
* `LindelofHypothesis` is the Lindelöf hypothesis `ζ(1/2 + it) = O(t^ε)` for every `ε > 0`.
-/

namespace RiemannVonMangoldt

open Complex Filter Asymptotics

/-- `N(T)`: the number of zeros of `ζ` in the critical strip with imaginary part in `(0, T]`,
counted with multiplicity. -/
noncomputable def zetaZeroCount (T : ℝ) : ℝ :=
  ∑ᶠ s ∈ {s : ℂ | 0 < s.re ∧ s.re < 1 ∧ 0 < s.im ∧ s.im ≤ T ∧ riemannZeta s = 0},
    (analyticOrderNatAt riemannZeta s : ℝ)

/-- `N(T, χ)`: the number of zeros of `L(s, χ)` in the critical strip with imaginary part in
`[-T, T]`, counted with multiplicity. -/
noncomputable def dirichletZeroCount {q : ℕ} [NeZero q] (χ : DirichletCharacter ℂ q)
    (T : ℝ) : ℝ :=
  ∑ᶠ s ∈ {s : ℂ | 0 < s.re ∧ s.re < 1 ∧ |s.im| ≤ T ∧ χ.LFunction s = 0},
    (analyticOrderNatAt χ.LFunction s : ℝ)

/-- The Lindelöf hypothesis: for every `ε > 0`, `ζ(1/2 + it) = O(t^ε)` as `t → +∞`. -/
def LindelofHypothesis : Prop :=
  ∀ ε : ℝ, 0 < ε →
    (fun t : ℝ => riemannZeta (1 / 2 + t * I)) =O[atTop] (fun t : ℝ => t ^ ε)

end RiemannVonMangoldt
Source
Wikipedia, "Riemann–von Mangoldt formula", revision oldid=1362774495 (https://en.wikipedia.org/w/index.php?title=Riemann–von_Mangoldt_formula&oldid=1362774495), first displayed formula (definition of N(T)N(T)N(T)), the paragraph "Under the Lindelöf and Riemann hypotheses", and the final paragraph (definition of N(T,χ)N(T,\chi)N(T,χ)). Standard conventions: Titchmarsh (1986) §9.2; Davenport, Multiplicative Number Theory, Ch. 16.
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 13, 2026

    Confirmed by the mission captain (proposal self-audit).

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