RH · checked in Lean

For students: the mathematics, step by step

This page assumes Year 11–12 maths, or first-year university. Topics marked uni go beyond school; skim them if you need to. If you're a teacher, see the Australian curriculum links and the activities.

TL;DR

  • RH says all the important zeros of the zeta function sit on one straight line, called the critical line.
  • The proof works with a smoothed count of primes and shows its error never gets much bigger than \(\sqrt x\) (at most \(x^{1/2+\varepsilon}\) for any tiny \(\varepsilon\)).
  • An upper limit like that, on one side only, is enough to rule out zeros off the line.
  • The deep part that produces the bound is new and not yet fully explained by anyone.

Short on time? Read sections 1, 4 and 7, then How the argument works.

1. Counting primes

Let \(\pi(x)\) be the number of primes \(\le x\). Gauss and Legendre guessed that \(\pi(x)\approx x/\ln x\). The Prime Number Theorem (proved in 1896 by Hadamard and de la Vallée Poussin) says that the ratio \(\pi(x)\big/(x/\ln x)\) tends to 1. A better approximation is the logarithmic integral \(\operatorname{li}(x)=\int_0^x \frac{dt}{\ln t}\) (a principal-value integral, because of the blow-up at \(t=1\)), which is roughly "add up the probability \(1/\ln t\) that \(t\) is prime". Some books use the offset version \(\operatorname{Li}(x)=\int_2^x\frac{dt}{\ln t}=\operatorname{li}(x)-\operatorname{li}(2)\), with \(\operatorname{li}(2)\approx1.045\); for counting primes the difference doesn't matter.

The Riemann Hypothesis is equivalent to the error estimate

$$\pi(x)=\operatorname{li}(x)+O\!\left(\sqrt{x}\,\ln x\right).$$

Explore this in the \(\pi(x)\) versus \(x/\ln x\) activity.

2. The zeta function

For real \(s\gt 1\), the series

$$\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^{s}}=1+\frac1{2^s}+\frac1{3^s}+\cdots$$

converges. (At \(s=1\) it is the harmonic series, which diverges.) Euler found the link to primes. Because every integer factors uniquely into primes,

$$\zeta(s)=\prod_{p\ \text{prime}}\frac{1}{1-p^{-s}}.$$

The same formula works when \(s\) is a complex number \(s=\sigma+it\) with real part \(\sigma\gt 1\). Here \(n^{-s}=n^{-\sigma}e^{-it\ln n}\): the size is \(n^{-\sigma}\), and the factor \(e^{-it\ln n}\) is a rotation. See the spinning-arrows activity.

3. Beyond where the series converges uni

Riemann showed that \(\zeta\) extends to every complex \(s\neq1\) as a smooth (holomorphic) function. One way to see part of this uses the alternating series \(\eta(s)=1-2^{-s}+3^{-s}-\cdots\), which converges for \(\sigma\gt 0\) and satisfies \(\zeta(s)=\eta(s)/(1-2^{1-s})\).1 The zeta explorer shows the first zero on the critical line, near \(\tfrac12+14.1347i\) (it computes \(\zeta\) by Euler–Maclaurin summation, which has no such exceptional points).

1 Valid for \(\sigma\gt0\) except where \(1-2^{1-s}=0\), at \(s=1+2\pi ik/\ln2\) for whole numbers \(k\). At \(k=0\) this is the pole of \(\zeta\). For \(k\ne0\), \(\eta\) is also 0 there, so the quotient is 0/0 (a removable singularity): \(\zeta\) is perfectly finite, for example \(\zeta(1+9.0647i)\approx1.3466+0.1099i\), but the formula can't be evaluated there directly. Back

The extended function obeys the functional equation, which is a mirror symmetry about the line \(\sigma=\tfrac12\):

$$\zeta(1-s)=2\,(2\pi)^{-s}\,\Gamma(s)\,\cos\!\left(\frac{\pi s}{2}\right)\zeta(s)\qquad(s\neq1,\ s\neq0,-1,-2,\dots).$$

This is exactly how Mathlib, Lean's maths library, states it, as the theorem riemannZeta_one_sub. For a non-trivial zero \(\rho\), it forces a zero at \(1-\rho\), the reflection of \(\rho\) through the point \(\tfrac12\). (It doesn't pair every zero: \(\zeta(-2)=0\) but \(\zeta(3)\ne0\), because the cosine factor vanishes at \(s=3\).) Separately, \(\zeta(\bar s)=\overline{\zeta(s)}\), so zeros also come in conjugate pairs \(\beta\pm i\gamma\) with the same real part. Combining the two reflects a zero across the critical line, to \(1-\bar\rho\).

4. Trivial zeros, the critical strip and the critical line

The Riemann Hypothesis. Every non-trivial zero of \(\zeta\) has real part exactly \(\tfrac12\).

Mathlib's definition, which is what the Lean proof establishes, reads:

def RiemannHypothesis : Prop :=
  ∀ (s : ℂ) (_ : riemannZeta s = 0) (_ : ¬∃ n : ℕ, s = -2 * (n + 1)) (_ : s ≠ 1), s.re = 1 / 2

In words: for every complex \(s\), if \(\zeta(s)=0\), \(s\) is not a trivial zero \(-2,-4,\dots\), and \(s\neq1\), then \(\operatorname{Re}s=\tfrac12\). The condition \(s\ne1\) is there because Mathlib gives \(\zeta\) a placeholder value at its pole.

5. The first step of the proof: a proof by contradiction

The Lean proof reduces RH to a one-sided statement: \(\zeta(s)\neq0\) whenever \(\operatorname{Re}s\gt \tfrac12\). The reduction is a short argument you can follow (theorem rh_of_right, file Formalism/GammaFactorNonvanishing/RhOfRight.lean):

  1. Suppose \(\zeta(s)=0\) with \(s\) non-trivial. If \(\operatorname{Re}s\gt \tfrac12\), that contradicts the one-sided statement directly.
  2. If \(\operatorname{Re}s\lt \tfrac12\), apply the functional equation. \(\zeta(s)\) equals a product of factors (powers, a Gamma value, a cosine) times \(\zeta(1-s)\). Each factor is non-zero, and the cosine could only vanish at a trivial zero, which we excluded. So \(\zeta(1-s)=0\). But \(\operatorname{Re}(1-s)\gt \tfrac12\). Contradiction.
  3. So \(\operatorname{Re}s=\tfrac12\). ∎

That is the whole classical part of the reduction. All the difficulty lies in proving the one-sided statement. Try the contradiction activity.

6. Many zeta functions at once: Dirichlet characters uni

The proof actually proves something stronger, for Dirichlet L-functions \(L(\chi,s)=\sum \chi(n)n^{-s}\). Here \(\chi\) is a "character" modulo \(N\): a pattern that repeats every \(N\) steps and is compatible with multiplication. These functions control primes in arithmetic progressions, for example primes ending in 1, 3, 7 or 9. The library's real target, EveryCharacter, says:

$$\text{for every } N\ge1,\ \text{every character } \chi \bmod N,\ \text{every } s \text{ with } \operatorname{Re}s\gt \tfrac12:\quad L(\chi,s)\neq0$$

(except at \(s=1\) when \(\chi\) is the principal character, where \(L\) has a pole: Lean's condition is \(\chi\ne1\) or \(s\ne1\)). Taking \(N=1\) gives \(\zeta\) back. The library first proves this for primitive characters and then extends it to all characters. An imprimitive \(L\)-function differs from a primitive one only by finitely many Euler factors \((1-\chi(p)p^{-s})\), and those can't vanish when \(\operatorname{Re}s\gt 0\).

7. The engine: a smoothed prime count uni

If a weighted count of primes never runs too far ahead of its expected value, there are no zeros off the line.

To show there are no zeros to the right of \(\tfrac12\), the proof uses an idea that goes back to Landau: if a prime-counting error is small, the zeta function can't have zeros far from the line. A zero at \(\rho=\beta+i\gamma\) produces a wave of size about \(x^{\beta}\) in the prime count, so a bound of \(x^{\theta}\) on the count rules out zeros with \(\beta\gt \theta\).

The quantity the Lean code uses (file …/TotientGaloisClasses/Analytic.lean) is a smoothed Chebyshev-type sum:

$$G(y)=\sum_{n\le y}\Lambda(n)\,\max\!\left(\frac{y}{n}-1,\,0\right)\;-\;y\,(\ln y-1-\gamma),$$

where \(\Lambda(n)=\ln p\) if \(n\) is a power of a prime \(p\) (and 0 otherwise), and \(\gamma\approx0.5772\) is Euler's constant. The subtracted term is the "expected" size, so \(G\) measures the error. The proof needs only an upper bound. If, on long intervals ("windows") \([Y,Y^{3/2}]\) for arbitrarily large \(Y\),

$$G(x)\le x^{\theta},$$

then there are no zeros with real part above \(\theta\) (the definition FormBAt). The proof establishes the bound with \(\theta=\tfrac12+C\varepsilon\) for every small \(\varepsilon\gt 0\) (the definition ChebyshevInequalityOnWindows), and a short argument (level_of_tiedWin) concludes that there are no zeros to the right of \(\tfrac12\).

8. Where the bound comes from: the part nobody can yet explain simply

A chain of about \(\sqrt x\) "theta lifts" compares divisibility with size; it is the newest and least understood part.

For a guided tour of this part, see How the argument works.

Proving \(G(x)\le x^{1/2+C\varepsilon}\) is the hard part, and it is where the proof is genuinely new. According to Alpöge's announcement, the inspiration is Stepanov's method. That method proves square-root bounds for counting points on curves over finite fields (the setting where the analogue of RH was proved by Weil and Deligne). Over function fields, his argument uses a divisor "involving multiplicity"; over the integers, the announcement says, multiplicity is "hard to find". The announcement describes replacing each unit of multiplicity with a theta lift between unitary groups, chaining about \(\sqrt{X}\) such lifts, and controlling the "cost" of each one.

Where our understanding is thin. In the code, this layer appears as definitions named ChainTied, TopG and HostExW, together with deep inputs: the existence of theta lifts (TLiftK), Galois representations (Row0b), local Langlands (recTExists), a Vandiver-type condition (VWin) and Green's parametrisation of characters of \(GL_d(\mathbb F_q)\). We can show you exactly where each lives and what it states (see the proof map). A draft guide by Rubinstein's team now explains the strategy (our How the argument works page): the main inequality (M) is a divisibility-versus-size comparison for a chain of theta lifts, and VWin is the Galois-cohomology bound used to control denominators (guide §I.7 item 3, §III.9). The guide explains why the chain has about \(\sqrt{x}\) steps: two error terms \(x/m\) and \(m\) balance at \(m\approx\sqrt x\) (§I.8). Comparing the Lean definitions with the guide term by term: ChainTied is the package of the data and side conditions of (M) at one scale, and HostExW is the existence of the auxiliary primes and the two-scale estimates (Estimates B and C, guide §III.1–§III.2). Both are confirmed in content, though the guide doesn't use those names. The \(\sqrt x\) chain length is fixed by RankVal, a condition inside HostExW. TopG matches only at its interface: it states that the construction of (M)'s data exists, and that construction is the part nobody has explained yet. Details are on How the argument works. The guide itself does not prove (M); it takes it from Lean.

The maths ladder: where you are

How much maths do you need to reach a real piece of RH? Less than people expect: the prime-counting side opens up in Year 6, while the exact statement needs Year 11 Specialist. The top rung hasn't been reached by anyone yet. Rungs follow ACARA (v9 for Foundation–Year 10, v8.4 senior units, where Units 1–2 are usually Year 11 and Units 3–4 Year 12); curriculum points are quoted word for word, and each state's version is one tap away. The links from each rung to RH are our teaching suggestions, not official advice.

  1. Year 6

    Maths: Prime, composite and square numbers

    You can reach: What RH is about: the primes, and how they are spread out along the number line.

    • AC9M6N02 Year 6 · Number: identify and describe the properties of prime, composite and square numbers and use these properties to solve problems and simplify calculations

    AC9M6N02 is the first place the v9 F–10 content names prime, composite and square numbers (Year 5 has factors and multiples, AC9M5N02).

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: Sieve game

  2. Years 7–8

    Maths: Square numbers and square roots; plotting on the Cartesian plane

    You can reach: Plot the count of primes: it climbs smoothly while primes get rarer. RH says the count's wobble around a smooth curve stays about the size of \(\sqrt{x}\) (a little more).

    • AC9M7N01 Year 7 · Number: describe the relationship between perfect square numbers and square roots, and use squares of numbers and square roots of perfect square numbers to solve problems
    • AC9M7A05 Year 7 · Algebra: generate tables of values from visually growing patterns or the rule of a function; describe and plot these relationships on the Cartesian plane
    • AC9M8N01 Year 8 · Number: recognise irrational numbers in applied contexts, including square roots and π

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: Count primes

  3. Years 9–10

    Maths: Logarithms (logarithmic scales; optional content on logarithms for post–Year 10 pathways)

    You can reach: Primes thin out like the number of digits: near a number with \(d\) digits, about 1 number in \(2.3\,d\) is prime (2.3 ≈ ln 10). And RH in words: the count of primes up to \(x\) stays within only a bit more than \(\sqrt{x}\) of a smooth curve.

    • AC9M10M02 Year 10 · Measurement: interpret and use logarithmic scales  in applied contexts involving small and large quantities and change

    Logarithm laws are optional content for post–Year 10 pathways (no code).

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: Count primes · The big picture

  4. Year 11 Methods

    Maths: Geometric sequences and series

    You can reach: The Euler product idea: \(1+\tfrac{1}{2^s}+\tfrac{1}{4^s}+\dots=\frac{1}{1-2^{-s}}\), and multiplying one such series for every prime rebuilds ζ(s), because every whole number factors into primes in exactly one way.

    • ACMMM074 Mathematical Methods Unit 2: understand the limiting behaviour as \(n\rightarrow\infty\) of the terms \(t_n\) in a geometric sequence and its dependence on the value of the common ratio \(r\)
    • ACMMM075 Mathematical Methods Unit 2: establish and use the formula \(S_n=t_1\frac{r^n-1}{r-1}\) for the sum of the first \(n\) terms of a geometric sequence

    Your state: The syllabus covers finite sums and the limit of the terms; summing to infinity is a small step beyond it. SACE: Stage 1 Mathematics Subtopic 7.2.

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: Euler product activity

  5. Year 11 Specialist

    Maths: Proof by contradiction, "for all" and "there exists", induction, complex numbers as points

    You can reach: The exact statement: every non-trivial zero has real part ½. How a proof checker like Lean reads a proof one step at a time. And the shape of the proof's first step, a proof by contradiction (the step itself also needs the functional equation from the University rung).

    • ACMSM025 Specialist Mathematics Unit 1: use proof by contradiction
    • ACMSM027 Specialist Mathematics Unit 1: use the quantifiers ‘for all’ and ‘there exists’
    • ACMSM064 Specialist Mathematics Unit 2: understand the nature of inductive proof including the ‘initial statement’ and inductive step
    • ACMSM071 Specialist Mathematics Unit 2: consider complex numbers as points in a plane with real and imaginary parts as Cartesian coordinates

    Your state: Induction: Specialist Unit 2 in ACARA and WA; introduced in SACE Stage 1 Mathematics (Subtopic 12.2) and continued in Stage 2 Specialist (Topic 1); QLD Specialist Unit 3; VCE Specialist Units 3 and 4. Complex numbers start in QLD Specialist Unit 2, VCE Specialist Unit 2 and SACE Stage 1 Subtopic 12.3.

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: The critical line · Contradiction activity · How Lean checks

  6. Year 12 Specialist and Methods

    Maths: Complex numbers in polar form; integrals; the natural logarithm

    You can reach: Each term \(n^{-s}\) as a spinning arrow; li(x) as the area under \(1/\ln t\); and the classic form of the prime-number law: near \(x\), about 1 number in \(\ln x\) is prime.

    • ACMSM082 Specialist Mathematics Unit 3: define and use multiplication, division, and powers of complex numbers in polar form and the geometric interpretation of these
    • ACMMM159 Mathematical Methods Unit 4: define the natural logarithm ln x = logₑ x
    • ACMSM126 Specialist Mathematics Unit 4 (link: li(x) in the prime-counting activity is computed by numerical integration): use numerical integration using technology

    Integrals are Mathematical Methods Unit 3, Topic 2.

    Your state: Polar form: Specialist Unit 3 (ACARA, WA and QLD), VCE Specialist Units 3 and 4, SACE Stage 2 Specialist Subtopic 2.1.

    Your state on Classrooms: NSW VIC QLD SA WA TAS NT ACT

    Try: Zeta explorer · Count primes

  7. University

    Maths: Analytic continuation, the functional equation, the Gamma function

    You can reach: Why ζ(s) still makes sense to the left of 1, what the trivial zeros −2, −4, −6, … are, and the proof's first step: a short proof by contradiction that reduces RH to "no zeros with real part above ½".

    Try: Beyond the series · The first step

  8. Research frontier Not yet reached by anyone

    Maths: Theta lifts between unitary groups, automorphic forms

    You can reach: The core of the proof: the one-sided bound that rules out zeros to the right of the line. Nobody can yet explain this step by hand; mathematicians are still reading it.

    Try: What is still unclear · The part nobody can yet explain simply · Proof map

What to take away