How the tutorial was made

From Chebyshev to the Riemann Hypothesis

How prime divisibility, smoothed counts, and lattice geometry fit into the Alpöge–Claude proof

Read alongside Dirac’s 19-minute YouTube explainer. This is the HTML edition of the eight-page tutorial. The full captions provide the chapter order, and four video frames accompany the derivations.

The goal is a one-sided bound. If for every ϵ>0\epsilon>0 there are arbitrarily large YY for which G(x)≤Cϵx1/2+ϵ(Y≤x≤Y3/2),G(x)\le C_{\epsilon}x^{1/2+\epsilon}\qquad(Y\le x\le Y^{3/2}), with CϵC_\epsilon independent of YY, then every nontrivial zero of ζ(s)\zeta(s) has real part 1/21/2. The first four sections develop the analytic implication. The last three explain the arithmetic input.

Alpöge released the Lean development on November 20, 2026. The Lean FRO and Mathlib Initiative independently checked the statement and formal proof. Rubinstein’s working guide quotes the central arithmetic inequality from Lean and shows how it implies the result. The formal development also covers Dirichlet LL-functions. This tutorial works through the zeta case.

1. Read the zeros in the prime staircase

2:03 IN THE VIDEO

For each positive integer nn, define the von Mangoldt weight Λ(n)=logp\Lambda(n)=\log p when n=pkn=p^k for a prime pp and an integer k≥1k\ge1, and 00 otherwise. The Chebyshev function is ψ(x)=∑n≤xΛ(n)=∑pk≤xlogp.\psi(x)=\sum_{n\le x}\Lambda(n)=\sum_{p^k\le x}\log p. It jumps by log2\log 2 at 2,4,8,…2,4,8,\ldots, and by log3\log 3 at 3,9,27,…3,9,27,\ldots. For example, ψ(10)=log(23⋅32⋅5⋅7)=log2520\psi(10)=\log(2^3\cdot3^2\cdot5\cdot7)=\log 2520. The prime number theorem is equivalent to ψ(x)∼x\psi(x)\sim x.

Where the zero terms come from

For Res>1\operatorname{Re}s>1, unique factorization and absolute convergence give ζ(s)=∏p(1−p−s)−1,−ζ′ζ(s)=∑p∑k≥1(logp)p−ks=∑n≥1Λ(n)n−s.\zeta(s)=\prod_p(1-p^{-s})^{-1},\qquad -\frac{\zeta'}{\zeta}(s)=\sum_p\sum_{k\ge1}(\log p)p^{-ks} =\sum_{n\ge1}\Lambda(n)n^{-s}. Perron’s inversion uses xs/sx^s/s to recover the staircase, with half weight at a jump. When its contour is shifted left, the pole of ζ\zeta at 11 contributes xx, and a zero ρ\rho of multiplicity mρm_\rho contributes −mρxρ/ρ-m_\rho x^\rho/\rho. The residue at 00 gives −log(2π)-\log(2\pi), and summing the residues at the trivial zeros −2,−4,…-2,-4,\ldots gives the logarithmic correction. ψ0(x)=x−limT→∞∑|ℑρ|≤Txρρ−log(2π)−12log(1−x−2),x>1.\psi_0(x)=x-\lim_{T\to\infty}\sum_{|\Im\rho|\le T}\frac{x^\rho}{\rho} -\log(2\pi)-\frac12\log(1-x^{-2}),\qquad x>1. Here the symmetric height limit is taken along a sequence avoiding zero ordinates, zeros are repeated by multiplicity, and ψ0\psi_0 averages the two one-sided values at jumps.

3:26, the Riemann--von Mangoldt formula
Dirac video frame · 3:26, the Riemann--von Mangoldt formula

For an upper-half-plane zero ρ=β+it\rho=\beta+it, its conjugate pair contributes −2xβ|ρ|−1cos(tlogx−argρ)-2x^\beta|\rho|^{-1}\cos(t\log x-\arg\rho) per copy. The real part β\beta sets the growth exponent and tt is the angular frequency in logx\log x. Under RH all β=1/2\beta=1/2. Controlling the whole sharp-cutoff sum takes additional work. Von Koch’s bound under RH is ψ(x)=x+O(xlog2x)\psi(x)=x+O(\sqrt{x}\log^2 x).

Rubinstein, v2, Part I, §1. Video, 3:57–5:01.

2. Integrate the staircase, then center it

5:38 IN THE VIDEO

Write v+=max(v,0)v_+=\max(v,0) and define the ramp-smoothed sum S(x)=∑n≥1Λ(n)(x/n−1)+=x∫1xψ(t)t2dt,x≥1.S(x)=\sum_{n\ge1}\Lambda(n)(x/n-1)_+ =x\int_1^x\frac{\psi(t)}{t^2}\,dt,\qquad x\ge1. The equality follows by integrating the contribution of each jump: x∫nxt−2dt=x/n−1x\int_n^x t^{-2}dt=x/n-1. At x=100x=100 the term at n=7n=7 is (100/7−1)log7(100/7-1)\log 7, and at n=97n=97 it is only (3/97)log97(3/97)\log 97.

7:12, the missing linear term
Dirac video frame · 7:12, the missing linear term

Why Euler’s constant enters

For Res>1\operatorname{Re}s>1, ∫n∞(x/n−1)x−s−1dx=n−ss(s−1).\int_n^\infty (x/n-1)x^{-s-1}\,dx=\frac{n^{-s}}{s(s-1)}. Thus the inverse Mellin integrand for SS is xs(−ζ′/ζ)(s)/[s(s−1)]x^s(-\zeta'/\zeta)(s)/[s(s-1)]. Put w=s−1w=s-1 and use ζ(1+w)=w−1+γ+O(w)\zeta(1+w)=w^{-1}+\gamma+O(w), where γ\gamma is Euler’s constant. The factors have expansions −ζ′ζ(1+w)=w−1−γ+O(w),x1+w(1+w)w=x(w−1+logx−1+O(w)).-\frac{\zeta'}{\zeta}(1+w)=w^{-1}-\gamma+O(w),\qquad \frac{x^{1+w}}{(1+w)w}=x\bigl(w^{-1}+\log x-1+O(w)\bigr). The coefficient of w−1w^{-1} in their product is xlogx−(1+γ)xx\log x-(1+\gamma)x. Hence define G(x)=S(x)−xlogx+(1+γ)x.G(x)=S(x)-x\log x+(1+\gamma)x. The naive density-one integral ∫1x(x/t−1)dt=xlogx−x+1\int_1^x(x/t-1)dt=x\log x-x+1 misses −γx-\gamma x, which is much larger than the desired x\sqrt{x} scale. The transform of the centered sum is F(s):=∫1∞G(x)x−s−1dx=−ζ′(s)s(s−1)ζ(s)−1(s−1)2+1+γs−1.F(s):=\int_1^\infty G(x)x^{-s-1}dx =-\frac{\zeta'(s)}{s(s-1)\zeta(s)}-\frac{1}{(s-1)^2} +\frac{1+\gamma}{s-1}. Its right-hand side is regular at 11 and has a pole at every nontrivial zero ρ\rho, with residue −mρ/[ρ(ρ−1)]-m_\rho/[\rho(\rho-1)].

Rubinstein, v2, Part I, §1 and Part II, eq. (II.1).

3. From square-root error to a zero-free region

7:58 AND 9:35 IN THE VIDEO

What RH predicts for the smoothed count

Inverting FF gives, for x>1x>1, G(x)=log(2π)−∑ρxρρ(ρ−1)−∑k≥1x−2k2k(2k+1).G(x)=\log(2\pi)-\sum_\rho\frac{x^\rho}{\rho(\rho-1)} -\sum_{k\ge1}\frac{x^{-2k}}{2k(2k+1)}. Zeros are repeated by multiplicity. The first sum now converges absolutely since the number of zeros of height at most TT is O(TlogT)O(T\log T) and the denominators grow like |ℑρ|2|\Im\rho|^2. Under RH, ρ(1−ρ)=|ρ|2\rho(1-\rho)=|\rho|^2, so the classical zero-sum identity gives the envelope |G(x)−log(2π)|≤(2+γ−log(4π))x+O(x−2).|G(x)-\log(2\pi)|\le (2+\gamma-\log(4\pi))\sqrt{x}+O(x^{-2}). The constant is 0.0461914…0.0461914\ldots. The graph uses actual prime powers. At x=106x=10^6, G(x)≈11.0404G(x)\approx11.0404 and the conditional envelope has radius about 46.1946.19.

Normalized prime-sum error computed from prime powers, with the conditional Riemann Hypothesis envelope.
Normalized prime-sum error computed from prime powers, with the conditional Riemann Hypothesis envelope.

A hypothetical zero with real part β>1/2\beta>1/2 adds a normalized wave with envelope proportional to xβ−1/2x^{\beta-1/2}. To make the converse rigorous, one has to rule out persistent cancellation by other zeros.

Landau’s argument for an eventual upper bound

Fix 0<θ<10<\theta<1. Suppose G(x)≤xθG(x)\le x^\theta on [X,∞)[X,\infty). For x≥X≥1x\ge X\ge1, let h(x)=xθ−G(x)≥0h(x)=x^\theta-G(x)\ge0. Its Mellin transform equals 1/(s−θ)−F(s)1/(s-\theta)-F(s) up to an entire function, from the finite interval [1,X][1,X].

Let σc\sigma_c be its real abscissa of convergence. A nonnegative hh forces a singularity there if σc\sigma_c is finite. Indeed, regularity at σc\sigma_c would allow a Taylor expansion about a nearby real b>σcb>\sigma_c to reach a real a<σca<\sigma_c. At s=as=a its terms are (b−a)jj!∫X∞h(x)(logx)jx−b−1dx≥0.\frac{(b-a)^j}{j!}\int_X^\infty h(x)(\log x)^j x^{-b-1}\,dx\ge0 . Monotone convergence sums them to the supposedly divergent integral at aa, a contradiction. Here 1/(s−θ)−F(s)1/(s-\theta)-F(s) has no real singularity for s>θs>\theta. The pole at 11 was canceled, and ζ(σ)<0\zeta(\sigma)<0 for 0<σ<10<\sigma<1 by the alternating eta series. Consequently σc≤θ\sigma_c\le\theta, and holomorphy of the transform on Res>θ\operatorname{Re}s>\theta excludes every zeta zero there.

Rubinstein, v2, Part I, §1. The bound used in the formal proof holds on windows, as discussed on the next page.

4. A window of scales is enough

11:57 IN THE VIDEO

Window criterion. Fix 0<θ<10<\theta<1. If G(x)≤xθG(x)\le x^\theta throughout [Y,Y3/2][Y,Y^{3/2}] for arbitrarily large YY, then ζ\zeta has no zeros with Res>θ\operatorname{Re}s>\theta. Rubinstein’s Part II proves this via high derivatives. The details below use a gamma tail estimate to show the localization.

Set u=logxu=\log x, U=logYU=\log Y, and g(u)=G(eu)g(u)=G(e^u). Let σ=300\sigma=300 and Aj(s)=(−1)jF(j)(s)/j!A_j(s)=(-1)^j F^{(j)}(s)/j!. Then Aj(σ+it)=∫0∞g(u)e−ituKj(u)du,Kj(u)=uje−σuj!.A_j(\sigma+it)=\int_0^\infty g(u)e^{-itu}K_j(u)\,du,\qquad K_j(u)=\frac{u^j e^{-\sigma u}}{j!}. The triangle inequality plus the real integral at t=0t=0 gives |Aj(σ+it)|+Aj(σ)≤2∫0∞g(u)+Kj(u)du.|A_j(\sigma+it)|+A_j(\sigma)\le 2\int_0^\infty g(u)_+ K_j(u)\,du. On [U,3U/2][U,3U/2], g(u)+≤eθug(u)_+\le e^{\theta u}, so the contribution there, before the factor 22, is at most (σ−θ)−j−1(\sigma-\theta)^{-j-1}.

Outside that window, the elementary bound |g(u)|≪e2u|g(u)|\ll e^{2u} follows from Λ(n)≤logn\Lambda(n)\le\log n and the definition of SS. Put k=j+1k=j+1 and choose it nearest to 54(σ−2)U\tfrac54(\sigma-2)U. The normalized density proportional to e2uKj(u)e^{2u}K_j(u) is gamma with shape kk and rate σ−2\sigma-2. Its mean is near 5U/45U/4. The two window endpoints divided by that mean approach 0.80.8 and 1.21.2. For a gamma variable with mean μ\mu, the Chernoff bound at vμv\mu is e−k(v−1−logv)e^{-k(v-1-\log v)} for the lower tail if v<1v<1, and for the upper tail if v>1v>1. This follows by optimizing the exponential moment. Both limiting exponents exceed 0.010.01. The outside contribution is therefore O(e−0.01k(σ−2)−k)=O((σ−θ)−k)O(e^{-0.01 k}(\sigma-2)^{-k})=O((\sigma-\theta)^{-k}), since (σ−θ)/(σ−2)<e0.01(\sigma-\theta)/(\sigma-2)<e^{0.01}. We have the combined upper bound along a sequence j→∞j\to\infty, uniformly in tt.

Higher derivatives concentrate the gamma kernel in the selected interval on the logarithmic scale.
Higher derivatives concentrate the gamma kernel in the selected interval on the logarithmic scale.

A pole forces faster Taylor growth. Let RR be the smaller of σ−θ\sigma-\theta and the distance from the real center σ\sigma to the nearest pole in Res>0\operatorname{Re}s>0. If a pole lies to the right of θ\theta, some center z=σ+itz=\sigma+it has a pole at distance d<Rd<R. When RR is set by a nearest pole to σ\sigma, moving to its height strictly shortens the distance because the pole is nonreal. A small perturbation of tt makes the nearest pole to zz unique. Choose d<r<Rd<r<R with no other poles in the disk of radius rr about zz. Subtract that pole’s principal part and apply Cauchy’s coefficient estimate. Then |Aj(z)|≥cd−j−O(r−j),|Aj(σ)|=O(r−j),c>0.|A_j(z)|\ge c\,d^{-j}-O(r^{-j}),\qquad |A_j(\sigma)|=O(r^{-j}),\qquad c>0. Since d<r<σ−θd<r<\sigma-\theta, this contradicts the combined upper bound. Let θ↓1/2\theta\downarrow1/2 and use symmetry ρ↦1−ρ\rho\mapsto 1-\rho. A fixed constant in the original bound is absorbed by slightly increasing the exponent, and RH follows.

Rubinstein, v2, Part II, §1. This is a prose proof of the window implication. The guide notes that Lean takes a different route to that implication.

5. Chebyshev’s integer and its precision limit

12:19 AND 14:33 IN THE VIDEO

If N≠0N\ne0 is an integer and vp(N)≥ep≥0v_p(N)\ge e_p\ge0 for each prime in a finite set, then ∑peplogp≤log|N|.\sum_p e_p\log p\le\log|N|. The exponent vp(N)v_p(N) counts the copies of pp dividing NN. This compares many local divisibilities to a single real size bound.

A binomial coefficient bounds primes in a dyadic interval

Let Bn=(2nn)B_n=\binom{2n}{n}. If n<p≤2nn<p\le2n, the numerator (2n)!(2n)! contains one multiple of pp and n!n! contains none, so vp(Bn)=1v_p(B_n)=1. Also Bn≤4nB_n\le4^n from the binomial theorem. Therefore ϑ(2n)−ϑ(n)≤nlog4,ϑ(x):=∑p≤xlogp.\vartheta(2n)-\vartheta(n)\le n\log4,\qquad \vartheta(x):=\sum_{p\le x}\log p. At n=1000n=1000 the left side is 983.59…983.59\ldots and the upper bound is 1386.29…1386.29\ldots. Summing dyadic comparisons gives ϑ(x)=O(x)\vartheta(x)=O(x). The same order holds for ψ(x)=∑k≥1ϑ(x1/k)\psi(x)=\sum_{k\ge1}\vartheta(x^{1/k}).

Legendre’s formula already contains the ramp

Using ⌊u⌋=(u−1)+(1−{u})\lfloor u\rfloor=(u-1)+(1-\{u\}) when u≥1u\ge1, where {u}\{u\} is the fractional part, yields log(n!)=∑pk≤n(logp)⌊n/pk⌋=S(n)+R(n),R(n):=∑pk≤n(logp)(1−{n/pk})≥0.\log(n!)=\sum_{p^k\le n}(\log p)\left\lfloor n/p^k\right\rfloor=S(n)+R(n), \qquad R(n):=\sum_{p^k\le n}(\log p)(1-\{n/p^k\})\ge0. By Stirling’s formula, G(n)≤log(n!)−nlogn+(1+γ)n=γn+12log(2πn)+O(n−1).G(n)\le\log(n!)-n\log n+(1+\gamma)n =\gamma n+\tfrac12\log(2\pi n)+O(n^{-1}). Under the prime number theorem, R(n)∼γnR(n)\sim\gamma n. One way to see this uses n−1∑m≤nΛ(m)δm/nn^{-1}\sum_{m\le n}\Lambda(m)\delta_{m/n}, which converges weakly to uniform measure on [0,1][0,1]. The bounded weight 1−{1/t}1-\{1/t\} has only countably many discontinuities. Its integral is ∑j≥1[1/j−log(1+1/j)]=γ\sum_{j\ge1}[1/j-\log(1+1/j)]=\gamma.

15:24, the loss is linear
Dirac video frame · 15:24, the loss is linear

At n=106n=10^6, this comparison allows G(n)≲577,223.49G(n)\lesssim577{,}223.49. The nearly exact leading term nlognn\log n is insufficient. A viable replacement needs prime valuations shaped like the ramp, a sharp size bound including the linear term, and enough coverage of primes to recover the desired untwisted sum.

Rubinstein, v2, Part I, §2 and Part II, §2.

6. Replace the integer by a lattice index

16:37 IN THE VIDEO

A lattice of rank rr is the integer span of rr linearly independent vectors in a real inner-product space. Its covolume is the volume of a fundamental cell in its span. Let L,ML,M have rank rr and let TT be injective on spanℝL\operatorname{span}_{\mathbb R}L with T(L)⊆MT(L)\subseteq M. The quotient M/T(L)M/T(L) is finite, and the index is its order. Comparing volumes gives [M:T(L)]=covol(T(L))covol(M)=covol(L)covol(M)∏i=1rsi(T)≤covol(L)covol(M)∥T∥r.[M:T(L)] = \frac{\operatorname{covol}(T(L))}{\operatorname{covol}(M)} =\frac{\operatorname{covol}(L)}{\operatorname{covol}(M)}\prod_{i=1}^r s_i(T) \le \frac{\operatorname{covol}(L)}{\operatorname{covol}(M)}\|T\|^r. Here si(T)s_i(T) are the singular values of the restriction of TT to the span of LL, and ∥T∥\|T\| is their maximum. Equivalently the index is |detA||\det A| for the integer matrix AA in lattice bases.

17:42, index versus operator norm, followed by the chain
Dirac video frame · 17:42, index versus operator norm, followed by the chain

A fully worked example

For L=M=ℤ2L=M=\mathbb Z^2 and T=diag(6,10)T=\operatorname{diag}(6,10), representatives are the 6060 pairs in [0,6)×[0,10)[0,6)\times[0,10) with integer coordinates. The quotient is ℤ/6ℤ⊕ℤ/10ℤ\mathbb Z/6\mathbb Z\oplus\mathbb Z/10\mathbb Z. Its order 60=22⋅3⋅560=2^2\cdot3\cdot5 has both an arithmetic interpretation and a geometric one. The coarse norm inequality gives 60≤10260\le10^2. For a chain of injective equal-rank lattice maps, determinants multiply, so prime valuations add. Norms are submultiplicative, so one can also control global size along the chain.

Rank changes and the Stepanov analogy

For an injective map into a higher-rank MM, use M′=M∩spanℝT(L)M'=M\cap\operatorname{span}_{\mathbb R}T(L) and compare volumes there. This is the saturation of T(L)T(L) in MM. More general rank changes require controlling the ranks and volumes of images. In Stepanov’s finite-field model, if a nonzero polynomial of degree DD vanishes to order at least aa at each of NN distinct points, then aN≤DaN\le D. Here successive lifts supply repeated divisibility, which plays the role of multiplicity.

Alpöge’s announcement, pp. 1 and 3. Rubinstein, v2, Part II, §§2, 6.8.

7. Where the arithmetic proof does its work

AFTER 18:49 IN THE VIDEO

The local gain and the global comparison

A theta lift is an integral transform with a theta kernel that transfers automorphic data between groups. Here the lifts produce maps on lattices. At an inert prime, one that remains prime in the auxiliary quadratic field, a local model gives a factor p/(p2−1)=∑h≥1,h oddp−hp/(p^2-1)=\sum_{h\ge1,\ h\text{ odd}}p^{-h}. The proof’s weighted version uses contributions of the form (a/ph−w)+(a/p^h-w)_+. With a=wxa=wx, these are precisely w(x/ph−1)+w(x/p^h-1)_+. The local arithmetic identifies ramps on selected prime powers. Global norm and covolume estimates, including exact period constants, put a bound on their weighted mean. The central comparison is Rubinstein’s inequality (M), quoted from Lean.

How the selected primes yield the zeta sum

For a nonprincipal Dirichlet character χ\chi, define Gχ(x)=∑nΛ(n)χ(n)(x/n−1)++xL′(1,χ)/L(1,χ)G_\chi(x)=\sum_n\Lambda(n)\chi(n)(x/n-1)_++xL'(1,\chi)/L(1,\chi). The zeta-case guide chooses auxiliary quadratic characters χq,χd\chi_q,\chi_d. Expand the nonnegative filter (1+χq)(1−χd)(1+\chi_q)(1-\chi_d), whose values away from q,dq,d are 00 or 44. After centering, the filtered sum Rq,dR_{q,d} obeys the exact identity Rq,d(x)=G(x)+Gχq(x)−Gχd(x)−Gχqχd(x).R_{q,d}(x)=G(x)+G_{\chi_q}(x)-G_{\chi_d}(x)-G_{\chi_q\chi_d}(x). Here χq\chi_q and χd\chi_d are quadratic residue characters modulo the respective primes. An upper bound for Rq,dR_{q,d} and absolute bounds for the three twists give an upper bound for GG. Estimates B and C in the guide support the choices and the reduction from (M).

Why the chain length is of order square root

After normalization, the guide tracks errors of orders x/mx/m, xm/kxm/k, mm and k/n2k/n^2, up to arbitrarily small powers of xx. Here mm is the chain length, kk a rank parameter and nn a table-size parameter. End effects contribute x/mx/m, while accumulated step losses contribute mm. At m≍x1/2m\asymp x^{1/2}, k≍x9/2k\asymp x^{9/2} and n≍x2n\asymp x^2, the four model scales are x1/2,x−3,x1/2,x1/2x^{1/2},x^{-3},x^{1/2},x^{1/2}. The work is to prove those error estimates and the exact centering. The balancing then explains how the resulting exponent reaches the critical line through the analytic criterion.

What’s next

Numerical exercise. Use a sieve to tabulate Λ(n)\Lambda(n). Make prefix sums Aj=∑n≤jΛ(n)/nA_j=\sum_{n\le j}\Lambda(n)/n and Bj=∑n≤jΛ(n)B_j=\sum_{n\le j}\Lambda(n). Then S(x)=xA⌊x⌋−B⌊x⌋S(x)=xA_{\lfloor x\rfloor}-B_{\lfloor x\rfloor}. Reproduce G(104)≈1.7493G(10^4)\approx1.7493, G(105)≈3.6715G(10^5)\approx3.6715, G(106)≈11.0404G(10^6)\approx11.0404, and the plot on page 4.

Proof exercise. If the normalized accumulated loss were mam^a for a>0a>0, minimize x/m+max/m+m^a. Differentiating gives m=(x/a)1/(a+1)m=(x/a)^{1/(a+1)}. The best exponent would be a/(a+1)a/(a+1). Track the corresponding zero-free half-plane and ask which lattice estimate actually forces a=1a=1.

Rubinstein, v2, Part I, §§6–8 and Part II, §§3–6 · Slijepčević’s broader GRH outline.