22.2 Formal Identities for the Residue, Dirichlet Series, and Euler Product
Before entering the half-plane , we anchor the most prominent landmark of in the complex plane: its unique simple pole at , where the harmonic series diverges with unit residue.
Geometrically, as , the divergence of reflects the unbounded accumulation of prime amplification factors across infinitely many orthogonal prime axes, scaled by with residue exactly .
The closer to 1, the wider the gap. The list holds the primes up to and the amber line stands at : the cyan product reaches only against the ink , so the magenta gap is larger than the product itself. Moving left only widens it: at the cyan curve stops at the finite value , while the ink runs off the top of the picture, at the pole of Lemma 22.2.
For the Riemann zeta function of Definition 22.1, as approaches along the punctured neighborhood filter ,
Unfolding classicalZeta in ZetaIdentities reduces the claim directly to Mathlib’s theorem riemannZeta_residue_one (which in ZetaUpgrade is combined with analyticity on to form classical_zeta_unique_simple_pole_residue_one). The full proof is checked by the Lean kernel.
Now we enter the half-plane of absolute convergence (written explicitly as the hypothesis hs : 1 < s.re in Lean). In strict adherence to our formal verification contract, every series and product theorem below retains the explicit half-plane hypothesis , where absolute convergence makes unconditional summation (tsum) and infinite multiplication (tprod) completely rigorous and order-independent.
Let satisfy (1 < s.re). Then the unconditionally summable series (tsum) over all natural numbers equals :
When , we have , so the term evaluates to in Mathlib’s complex power convention; the ℕ-indexed tsum therefore coincides with the classical Dirichlet series over . Unfolding classicalZeta and applying Mathlib’s tsum_riemannZetaSummand under hs : 1 < s.re yields the identity. The full proof is checked by the Lean kernel.
On the exact same half-plane , we now pass from additive summation over to multiplicative factorization across Nat.Primes.
Let satisfy (1 < s.re). Then the infinite product (tprod) over the type of prime numbers Nat.Primes equals :
Under the half-plane hypothesis hs : 1 < s.re, is a completely multiplicative, absolutely summable arithmetic function. By unique prime factorization and Mathlib’s Euler product theorem riemannZeta_eulerProduct_tprod, the infinite product of local geometric-series factors over converges to riemannZeta s = classicalZeta s. The full proof is checked by the Lean kernel.
The Euler product over finitely many primes climbs towards step by step, yet always falls short. The cyan staircase is the product over the first primes at , reaching at ; the ink line is . The magenta gap between them keeps narrowing, but with all primes up to it is still ; only the product over every prime equals (Theorem 22.4). The values plotted are numerical.
Eliminating the intermediate symbol joins Proposition 22.3 and Theorem 22.4 directly on : the sum over all natural numbers equals the product over the prime orthogonal basis alone!
Let satisfy (1 < s.re). Then the natural-number Dirichlet series equals the prime-indexed Euler product:
Under hs : 1 < s.re, transitivity of equality combines Proposition 22.3 () with the symmetry of Theorem 22.4 (). The full proof is checked by the Lean kernel.
Every cell cyan, the gap still wide. Primes join the list one by one up to : every cell from to turns cyan, so each of these integers appears in the expansion of the product. The amber line stands at : the cyan product is only against the ink , and the magenta gap of is still more than a fifth of , with as its lowest slice in the magnifier. Only with every prime multiplied in does the product equal the whole series (Corollary 22.5).
Each prime axis can contribute its own geometric series because the coordinates of an integer on different prime axes never constrain one another. The next section turns this freedom into the linear independence of prime logarithms, and watches the phases of the prime clocks wind ever more tightly around a torus as a result. The short film below walks the whole thread once.
Every prime is its own axis (2 min 29 s). On the three cyan axes , , , the number has the amber address . At the geometric series of the axes and , and , are the sides of a rectangle cut into cyan tiles of area , exactly one tile for each built from twos and threes, for a total area of ; the identity for all and all primes on is marked LEAN ✓ (Corollary 22.5, Theorem 22.4). The two cyan bars and differ by a short magenta piece, one odd and one even, never equal; an integer combination of prime logarithms vanishes only when every coefficient is zero (Theorem 22.8, part 1). Then the readings of two prime clocks draw a cyan line on a lit torus, and Kronecker’s theorem behind it is marked LEAN ✓ (Theorem 22.11, part 2); that the line never closes, and that the two clocks never point at six together yet come as close as you like, are hand derivations along the same lines as the next section, marked violet. The film ends with its limits: “orthogonal” is a picture and the theorem is linear independence; density says nothing about how long to wait; the product formula needs ; the classical Riemann hypothesis has a Lean proof (Theorem 22.36), while the extended Riemann hypothesis for general number fields and the grand Riemann hypothesis remain open (red). The numbers in the film (, , , , , and the record misses of clock at the moments clock points exactly at six, from at to at ) are computed on screen.
The same trick for sums. The Euler product rests on multiplicative decomposition: every is uniquely a product of prime powers, and each prime axis contributes its own geometric series. Replace “multiply” by “add” and the trick still works. Split into a sum of positive parts, ignoring order. Each part size is an axis, and the number of times it occurs, , is the coordinate on that axis; summing along the axis is again a geometric series . If parts of size come in colours, and parts of the same size and colour are indistinguishable, the axis splits into axes and the factor becomes . The following theorem pins this down on genuine finite sets: the left side is a coefficient of a formal power series, the right side is the number of elements of a finite type, and the two are defined independently of each other.
Fix colour counts ( may be ). For , a coloured partition of consists of a partition of together with, for each part size that occurs (with multiplicity ), a multiset of colours chosen with repetition from colours. In the ring of formal power series with integer coefficients, write
where the coefficient of is taken to be the coefficient of the product of the first factors (the later factors have no non-constant term below and do not affect it). Then
The Lean proof does not start from the product and “guess” its coefficients. It counts each side on its own terms and meets in the middle.
(1) The right side. The set of coloured partitions is a dependent sum: choose a partition , then independently choose a multiset for each part size occurring in . There are ways to choose items with repetition from colours (stars and bars), so the total is . This is exactly the coefficient of Mathlib’s weighted partition generating function, with weight for size and multiplicity .
(2) The left side. The same generating function is also the infinite product, in the sense of coefficientwise convergence, of the local factors ; comparing coefficients shows that this local factor is . Limits of infinite products are unique, and every coefficient of is already fixed by finitely many factors, so the two sides agree. The full proof is checked by the Lean kernel.
Counting boson states (manual derivation). Picture a collection of independent harmonic modes: modes of frequency for , each able to hold any number of identical bosons, each particle carrying energy (zero-point energy ignored). A Fock state assigns an occupation number to every mode. Treat the modes of frequency as colours: if their occupations add up to , a list of occupations is exactly a multiset of colours chosen with repetition from . The total energy is units of . So Fock states of total energy correspond one-to-one to coloured partitions of , and by Theorem 22.6 their number is the coefficient of . Setting turns into the canonical partition function of this Bose gas. The theorem, however, is about coefficients of a formal power series; substituting a number for also needs the product to converge (for instance, if is bounded and , then and the product converges).
One colour (). These are the ordinary partition numbers . The partitions of are the sums , , , and .
Two colours (). Take . The partition has one part, with choices of colour. The partition needs colours chosen with repetition from , and there are such multisets (two red, two blue, one of each). That makes in all. Physically, this is a one-dimensional cavity with two polarizations at every frequency: it has states of energy .
colours (). Take . The part comes in colours, giving states; has only one colour available, giving . That makes in all.
Expanding the three products up to :
Every entry was computed in two independent ways: by expanding the product term by term as the theorem says, and, without touching the product at all, by enumerating the occupation numbers of every mode and counting the Fock states of total energy . For all three rows and the two agree exactly.
Literature result, not formalized in this book. The row is exactly the number of plane partitions (MacMahon, 1916); the bijection between those and coloured partitions is outside the scope of this book. The growth of the ordinary partition numbers is given by the Hardy–Ramanujan asymptotic (Hardy & Ramanujan, 1918). The table compares the leading term with the exact values; the relative error shrinks only slowly, like :
| Leading term | Leading term | ||
|---|---|---|---|
The Euler product is itself a Bose gas. Carry the same reading back to Corollary 22.5. Let each prime be a bosonic mode with single-particle energy . A Fock state assigns an occupation to each prime (only finitely many nonzero). It corresponds to the integer , and its total energy is ; unique prime factorization makes the correspondence one-to-one (manual derivation). Hence : is the partition function of this “prime gas” at inverse temperature , and the Euler product is the product of the geometric series of the individual modes. By Lemma 22.2, blows up like as : the partition function diverges as the temperature rises to , and at higher temperatures () the series itself diverges (compare the harmonic series). This physical reading comes from the literature (B. Julia, 1990; D. Spector, 1990); the book makes no formal claim about it.
Multiplication splits into primes, addition into parts; both times an infinite sum comes apart into many independent geometric series.