[proofplan]
The proof passes from analytic information about the Riemann zeta function to the asymptotic count of primes. The main ingredients are: (i) the Hadamard factorisation of $(s-1)\zeta(s)$, which encodes $\zeta$ as a product over its non-trivial zeros; (ii) the non-vanishing of $\zeta$ on the line $\operatorname{Re}(s) = 1$, proved by Mertens's $3$--$4$--$1$ trick exploiting positivity of $3 + 4\cos\theta + \cos 2\theta$; and (iii) a Tauberian theorem (Wiener--Ikehara) that converts analytic properties of the Dirichlet series $-\zeta'/\zeta$ into the asymptotic $\psi(x) \sim x$ for the Chebyshev function. The final step is elementary: an Abel-summation argument converts $\psi(x) \sim x$ into $\pi(x) \sim x/\log x \sim \mathrm{li}(x)$.
[/proofplan]
[step:Reduce the theorem to the asymptotic $\psi(x) \sim x$ for the Chebyshev function]
Define the Chebyshev functions
\begin{align*}
\vartheta : (0, \infty) &\to [0, \infty) \\
x &\mapsto \sum_{p \leq x,\, p \text{ prime}} \log p,
\end{align*}
\begin{align*}
\psi : (0, \infty) &\to [0, \infty) \\
x &\mapsto \sum_{p^k \leq x,\, p \text{ prime},\, k \geq 1} \log p.
\end{align*}
Equivalently $\psi(x) = \sum_{n \leq x} \Lambda(n)$ where $\Lambda$ is the [von Mangoldt function](/pages/Von%20Mangoldt%20Function) defined by $\Lambda(n) = \log p$ if $n = p^k$ for some prime $p$ and integer $k \geq 1$, and $\Lambda(n) = 0$ otherwise.
We claim that $\pi(x) \sim \mathrm{li}(x)$ follows once we establish
\begin{align*}
\psi(x) &\sim x \quad \text{as } x \to \infty. \tag{$*$}
\end{align*}
First, note $\vartheta(x) \sim \psi(x)$: the difference is
\begin{align*}
\psi(x) - \vartheta(x) &= \sum_{k \geq 2} \sum_{p^k \leq x} \log p \leq \sum_{k=2}^{\lfloor \log_2 x \rfloor} \vartheta(x^{1/k}) \leq (\log_2 x) \cdot \vartheta(\sqrt{x}) \leq (\log_2 x) \cdot \sqrt{x} \log x,
\end{align*}
using the elementary bound $\vartheta(y) \leq y \log y$. Hence $\psi(x) - \vartheta(x) = O(\sqrt{x} (\log x)^2) = o(x)$, giving $\vartheta(x) \sim \psi(x) \sim x$ under $(*)$.
Next, we convert $\vartheta(x) \sim x$ to $\pi(x) \sim x/\log x$ by [Abel Summation](/theorems/???). Write
\begin{align*}
\pi(x) &= \sum_{p \leq x} 1 = \sum_{p \leq x} \frac{\log p}{\log p},
\end{align*}
and apply Abel's identity to the sequence $a_p = \log p$ summed against the weight $f(t) = 1/\log t$ for $t \geq 2$:
\begin{align*}
\pi(x) &= \frac{\vartheta(x)}{\log x} + \int_2^x \frac{\vartheta(t)}{t (\log t)^2} \, d\mathcal{L}^1(t).
\end{align*}
The derivation: $\pi(x) = \sum_{p \leq x} 1$, and with $A(t) := \vartheta(t)$ Abel summation gives $\pi(x) = A(x)/\log x - A(2)/\log 2 + \int_2^x A(t) \cdot (1/\log t)' \, (-1) \, d\mathcal{L}^1(t)$, whence the formula (with $A(2)/\log 2 = 0$ since $\vartheta(2) = \log 2$ gives the constant $1$, absorbed into the integration).
Assuming $\vartheta(t) \sim t$, for every $\varepsilon > 0$ there is $T_\varepsilon$ with $(1 - \varepsilon) t \leq \vartheta(t) \leq (1 + \varepsilon) t$ for $t \geq T_\varepsilon$. Then $\vartheta(x)/\log x \sim x/\log x$, and
\begin{align*}
\int_{T_\varepsilon}^x \frac{\vartheta(t)}{t(\log t)^2} \, d\mathcal{L}^1(t) &= (1 + o(1)) \int_{T_\varepsilon}^x \frac{d\mathcal{L}^1(t)}{(\log t)^2} = o\!\left( \frac{x}{\log x} \right)
\end{align*}
as $x \to \infty$, since the elementary estimate $\int_2^x (\log t)^{-2} \, d\mathcal{L}^1(t) = o(x/\log x)$ holds (integrate by parts or split at $\sqrt{x}$). Therefore $\pi(x) = x/\log x + o(x/\log x)$.
Finally, $\mathrm{li}(x) = \int_2^x (\log t)^{-1} \, d\mathcal{L}^1(t) = x/\log x + O(x/(\log x)^2)$ by integration by parts, so $\pi(x) \sim x/\log x \sim \mathrm{li}(x)$.
It remains to prove $(*)$. The rest of the argument is devoted to this.
[/step]
[step:Introduce the Dirichlet series $-\zeta'(s)/\zeta(s) = \sum_n \Lambda(n)/n^s$]
On $\operatorname{Re}(s) > 1$ the [Euler Product Identity](/theorems/1694) gives
\begin{align*}
\zeta(s) &= \prod_{p} \frac{1}{1 - p^{-s}}.
\end{align*}
Taking the logarithmic derivative, justified by absolute convergence of the product and of the resulting series on compact subsets of $\operatorname{Re}(s) > 1$:
\begin{align*}
-\frac{\zeta'(s)}{\zeta(s)} &= -\frac{d}{ds} \log \zeta(s) = -\frac{d}{ds} \sum_p \log\!\left( \frac{1}{1 - p^{-s}} \right) = \sum_p \frac{p^{-s} \log p}{1 - p^{-s}} = \sum_p \sum_{k=1}^\infty \frac{\log p}{p^{ks}} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s}.
\end{align*}
The series on the right converges absolutely on $\operatorname{Re}(s) > 1$: for $\sigma := \operatorname{Re}(s) > 1$, $\sum_n \Lambda(n) n^{-\sigma} \leq \sum_n \log(n) n^{-\sigma} < \infty$.
Define the map
\begin{align*}
F : \{s : \operatorname{Re}(s) > 1\} &\to \mathbb{C} \\
s &\mapsto \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s} = -\frac{\zeta'(s)}{\zeta(s)}.
\end{align*}
We will study $F$ near $\operatorname{Re}(s) = 1$ and feed it into a Tauberian theorem.
[/step]
[step:Recall the meromorphic continuation of $\zeta$ to $\operatorname{Re}(s) > 0$ with a simple pole of residue $1$ at $s = 1$]
By [Meromorphic Continuation of $\zeta$](/theorems/???), the function $\zeta(s)$ extends to a meromorphic function on $\operatorname{Re}(s) > 0$ whose only singularity is a simple pole at $s = 1$ with residue $1$. One classical proof uses the identity
\begin{align*}
\zeta(s) &= \frac{s}{s - 1} - s \int_1^\infty \frac{\{t\}}{t^{s+1}} \, d\mathcal{L}^1(t),
\end{align*}
valid for $\operatorname{Re}(s) > 1$ by [Abel Summation](/theorems/???) applied to $\sum_n n^{-s}$, where $\{t\} = t - \lfloor t \rfloor$ is the fractional part. The integral converges absolutely on $\operatorname{Re}(s) > 0$ (since $|\{t\}| \leq 1$ and $\int_1^\infty t^{-\sigma - 1} \, d\mathcal{L}^1(t) = 1/\sigma < \infty$ for $\sigma > 0$), and defines a holomorphic function there. This identity exhibits the continuation, with a simple pole at $s = 1$ coming from $s/(s-1)$ and residue $\lim_{s \to 1} (s-1) \cdot s/(s-1) = 1$.
Consequently, $F(s) = -\zeta'(s)/\zeta(s)$ is meromorphic on $\operatorname{Re}(s) > 0$, with a simple pole of residue $1$ at $s = 1$ (the pole of $\zeta$ at $s = 1$ is simple of residue $1$, so $\log\zeta(s) \sim -\log(s - 1)$ near $s = 1$, whence $-\zeta'/\zeta$ has a simple pole with residue $+1$ there) and additional poles at each zero of $\zeta$ in the strip $0 < \operatorname{Re}(s) \leq 1$.
[/step]
[step:Prove $\zeta(1 + it) \neq 0$ for all real $t \neq 0$ using the $3$--$4$--$1$ trick]
[claim:For every real $t \neq 0$, $\zeta(1 + it) \neq 0$]
[proof]
Fix $t \in \mathbb{R} \setminus \{0\}$ and suppose for contradiction that $\zeta(1 + it) = 0$. Since $\zeta$ is meromorphic at $s = 1 + it$ with $t \neq 0$ (no pole there), the hypothetical zero has some order $m \geq 1$.
For $\sigma > 1$, take real parts of the logarithm of the Euler product:
\begin{align*}
\log |\zeta(\sigma + i\tau)| &= \operatorname{Re} \sum_p \sum_{k=1}^\infty \frac{p^{-k(\sigma + i\tau)}}{k} = \sum_p \sum_{k=1}^\infty \frac{\cos(k\tau \log p)}{k p^{k\sigma}}.
\end{align*}
The identity
\begin{align*}
3 + 4\cos\theta + \cos(2\theta) &= 2 (1 + \cos\theta)^2 \geq 0 \quad \text{for all } \theta \in \mathbb{R}
\end{align*}
applied with $\theta = k \tau \log p$ yields, upon summing with the positive weights $(k p^{k\sigma})^{-1}$,
\begin{align*}
3 \log|\zeta(\sigma)| + 4 \log|\zeta(\sigma + i\tau)| + \log|\zeta(\sigma + 2 i\tau)| &\geq 0,
\end{align*}
equivalently
\begin{align*}
|\zeta(\sigma)|^3 \, |\zeta(\sigma + i\tau)|^4 \, |\zeta(\sigma + 2 i\tau)| &\geq 1.
\end{align*}
This inequality is valid for every $\sigma > 1$ and every $\tau \in \mathbb{R}$.
Now let $\sigma \to 1^+$ with $\tau = t$:
- $|\zeta(\sigma)| \sim 1/(\sigma - 1)$ by the simple pole of residue $1$ at $s = 1$.
- $|\zeta(\sigma + it)| \leq C_1 (\sigma - 1)^m$ for $\sigma$ close to $1$, since $\zeta$ has a zero of order $m$ at $1 + it$ (so $\zeta(s) = (s - (1+it))^m g(s)$ for a holomorphic $g$ with $g(1+it) \neq 0$ near $1 + it$, giving $|\zeta(\sigma + it)| \leq C_1 |\sigma - 1|^m$).
- $|\zeta(\sigma + 2it)|$ is bounded by a constant $C_2$ as $\sigma \to 1^+$, since $\zeta$ is holomorphic at $1 + 2it$ (the only pole of $\zeta$ is at $s = 1$, and $1 + 2it \neq 1$ because $t \neq 0$).
Substituting these into the $3$--$4$--$1$ inequality:
\begin{align*}
\frac{1}{(\sigma - 1)^3} \cdot (\sigma - 1)^{4m} \cdot C_2 \cdot C_1^4 &\gtrsim 1,
\end{align*}
that is, $(\sigma - 1)^{4m - 3} \gtrsim 1$. For $m \geq 1$ we have $4m - 3 \geq 1 > 0$, so the left side tends to $0$ as $\sigma \to 1^+$, a contradiction.
Therefore no zero of $\zeta$ lies on the line $\operatorname{Re}(s) = 1$.
[/proof]
[/claim]
[guided]
The $3$--$4$--$1$ trick is a clever application of the non-negativity of a specific trigonometric polynomial. To see where it comes from: $2(1 + \cos\theta)^2 = 2 + 4\cos\theta + 2\cos^2\theta = 2 + 4\cos\theta + (1 + \cos 2\theta) = 3 + 4\cos\theta + \cos 2\theta$. Any non-negative trigonometric combination of this type, when integrated or summed against positive measure, produces a positive-coefficient linear combination of $\log|\zeta|$ values.
Why does the inequality force non-vanishing on $\operatorname{Re}(s) = 1$? The pole of $\zeta$ at $s = 1$ gives a factor $(\sigma - 1)^{-3}$ as $\sigma \to 1^+$. A hypothetical zero at $1 + it$ of order $m$ gives a factor $(\sigma - 1)^{4m}$. The remaining factor at $1 + 2it$ is holomorphic (bounded). For the product to stay $\geq 1$ as $\sigma \to 1^+$, we need $4m - 3 \leq 0$, i.e., $m \leq 3/4$. Since $m$ is a non-negative integer, $m = 0$, meaning no zero.
Why the coefficients $(3, 4, 1)$ specifically? They are dictated by the polynomial $2(1+\cos\theta)^2 = 3 + 4\cos\theta + \cos 2\theta$; the exponent $3$ of the pole factor must be strictly beaten by $4m$ (the zero's contribution), giving the sharp condition that the coefficient in front of $\cos\theta$ (which is $4$) exceeds the constant coefficient (which is $3$).
[/guided]
[/step]
[step:State and invoke the Wiener--Ikehara Tauberian theorem]
[claim:Wiener--Ikehara Tauberian theorem]
Let $A: [1, \infty) \to [0, \infty)$ be non-decreasing and suppose that the Laplace--Mellin transform
\begin{align*}
f(s) &= \int_1^\infty A(x) x^{-s - 1} \, d\mathcal{L}^1(x)
\end{align*}
converges for $\operatorname{Re}(s) > 1$, and that there exists a constant $c \geq 0$ and a function $g$ continuous on $\operatorname{Re}(s) \geq 1$ with
\begin{align*}
f(s) - \frac{c}{s - 1} &= g(s)
\end{align*}
for $\operatorname{Re}(s) > 1$ and $g$ extending continuously to the closed half-plane $\operatorname{Re}(s) \geq 1$. Then $A(x)/x \to c$ as $x \to \infty$.
[/claim]
This is the [Wiener--Ikehara Tauberian Theorem](/theorems/???); its proof is a Fourier-analytic argument using the Fejér kernel to extract the asymptotic from the boundary regularity of $f(s) - c/(s-1)$.
We apply it to $A(x) := \psi(x) = \sum_{n \leq x} \Lambda(n)$, which is non-decreasing and non-negative. The associated Laplace--Mellin transform is identified using [Abel Summation](/theorems/???):
\begin{align*}
\int_1^\infty \psi(x) x^{-s-1} \, d\mathcal{L}^1(x) &= \frac{1}{s} \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s} = \frac{F(s)}{s}, \qquad \operatorname{Re}(s) > 1.
\end{align*}
Here the interchange of sum and integral is justified by absolute convergence (Fubini--Tonelli applied to non-negative integrands).
Hence $f(s) = F(s)/s = -\zeta'(s)/(s \zeta(s))$ on $\operatorname{Re}(s) > 1$. We must verify the hypothesis: there exists a constant $c$ such that $f(s) - c/(s-1)$ extends continuously to $\operatorname{Re}(s) \geq 1$.
Near $s = 1$: the simple pole of $F$ at $s = 1$ has residue $+1$ (Step 3), and $1/s$ evaluated at $s = 1$ is $1$, so $f(s) = F(s)/s$ has a simple pole at $s = 1$ with residue $1$. Thus the correct constant is $c = 1$, and $f(s) - 1/(s-1)$ has a removable singularity at $s = 1$.
Elsewhere on $\operatorname{Re}(s) = 1$: we need $f$ to extend continuously. By Step 4, $\zeta(1 + it) \neq 0$ for $t \neq 0$. Hence for $t \neq 0$, $F(s) = -\zeta'(s)/\zeta(s)$ is holomorphic at $s = 1 + it$ (the denominator is non-zero), so $f(s) = F(s)/s$ is holomorphic there. The extension of $f(s) - 1/(s-1)$ to $\operatorname{Re}(s) = 1$ is continuous (in fact holomorphic except at $s = 1$, where the subtraction removes the only pole).
All hypotheses of Wiener--Ikehara are met with $A = \psi$ and $c = 1$. The conclusion is
\begin{align*}
\lim_{x \to \infty} \frac{\psi(x)}{x} &= 1,
\end{align*}
i.e., $\psi(x) \sim x$, which is $(*)$.
[guided]
The Wiener--Ikehara theorem is the bridge from analytic information about $F$ to arithmetic information about $\psi$. Its hypothesis has two parts:
(a) $F(s)/s - 1/(s-1)$ has a removable singularity at $s = 1$. This requires the residue of $F$ at $s = 1$ to equal $+1$. The simple pole at $s = 1$ of $\zeta$ with residue $1$ means $\zeta(s) \sim 1/(s-1)$ and $\zeta'(s) \sim -1/(s-1)^2$ as $s \to 1$, so $-\zeta'(s)/\zeta(s) \sim 1/(s - 1)$, confirming the residue is $+1$. Dividing by $s = 1$ preserves this.
(b) $F(s)/s - 1/(s-1)$ extends continuously to the entire line $\operatorname{Re}(s) = 1$. This is where the non-vanishing of $\zeta$ on $\operatorname{Re}(s) = 1$ is consumed: if $\zeta$ had a zero at some $1 + it_0$ with $t_0 \neq 0$, then $F$ would have a pole at $1 + it_0$, destroying the continuous extension.
The two facts (a) meromorphic continuation with the right residue at $s = 1$, and (b) non-vanishing on $\operatorname{Re}(s) = 1$, are the analytic inputs, and Wiener--Ikehara is the black box that converts them into the asymptotic $\psi(x) \sim x$. The Tauberian theorem is proved by Fourier analysis: the Fejér-kernel averaging of the boundary regularity of $f(s) - 1/(s-1)$ yields a convolution estimate that, combined with the monotonicity of $\psi$, forces $\psi(x)/x \to 1$.
[/guided]
[/step]
[step:Combine Step 1 and Step 5 to conclude]
By Step 5, $\psi(x) \sim x$ as $x \to \infty$. By Step 1, this implies $\pi(x) \sim x/\log x \sim \mathrm{li}(x)$.
Therefore $\pi(x) \sim \mathrm{li}(x)$ as $x \to \infty$, completing the proof of the Prime Number Theorem.
[/step]