# AI-proved number theory: Axiom's ERH for totally real fields, Deligne's bound in Lean, and an Erdős count at the fourth root

> Satyajit Ghana — Head of Engineering @ Inkers Technology
> canonical: https://ai.satyajit.si/articles/ai-proved-number-theory
> date: 2026-11-30
> tags: math, theory, formal-methods, verifiers
> flair: deep-dive, interactive

On 29 November [Axiom posted](https://x.com/axiommathai/status/2127116318730235913): *"Axiom has proved two results: (1) Extended Riemann Hypothesis (RH for Dedekind zeta functions) of totally real and CM fields; and (2) a new route to the generalized Ramanujan–Petersson conjecture using the Weil conjectures, both in Lean."* Three days before that, on 26 November, [@1337isnot1337 posted](https://x.com/1337isnot1337/status/2126039890361979264) that Erdős had been wrong about a prime-factor count, and that his coauthors Pomerance and Sárközy had been right, *"actually it's the fourth root"*, with thanks to GPT-6.2 Astra. A [follow-up](https://x.com/1337isnot1337/status/2126045821150056752) linked a merged pull request and said *"lean verified!"*

These arrive in a month when the bar keeps moving. On 21 November the Lean FRO and the Mathlib Initiative [certified](https://leanprover-community.github.io/blog/posts/riemann-hypothesis/) Levent Alpöge's 17-million-line Lean proof of the Riemann hypothesis. In late September and October came OpenAI's [quasi-Riemann hypothesis](/articles/openai-math) and Cureton and Thorner's half-plane for every number field. The [ω = 9/4 page](/articles/matrix-multiplication-exponent-nine-fourths) set out how I check a claim like this: read the formal statement, find out what it rests on, then build it. The [/math wall](/math) collects the videos.

I read the repositories at the commits below, Axiom's 73-page ERH paper and 10-page technical report, the solved-conjectures proof and its Lean scope document, and the 1987 paper the conjecture comes from. I wrote a script that strips Lean comments and string literals and counts every `axiom`, `sorry` and `native_decide` in all three repositories and in Axiom's dependency.

<Callout type="warning">
None of the three Lean developments has been built for this page yet. Everything below about the Lean comes from reading and scanning the source, not from `lake build` or `#print axioms`. The build scripts are written and waiting for a 28-core machine. Until they report, "it compiles with these axioms" is Axiom's claim and the solved-conjectures repository's claim, not mine.
</Callout>

<RepoCard repo="AxiomMath/erh-totally-real" note="Read at c578e9b (29 November 2026), the commit the paper's Appendix A cites. The public theorems are in main.lean, the three cited theorems in external.lean, the proof under lean/." />

## Zeta, L-functions, and where the zeros are allowed to be

Start with $\zeta(s)=\sum_{n\ge1} n^{-s}$. For $\operatorname{Re}s>1$ it equals Euler's product $\prod_p (1-p^{-s})^{-1}$, which is the whole reason anyone cares: the zeta function is the primes in disguise. It continues to the whole complex plane except a pole at $s=1$. Its interesting zeros sit in the critical strip $0<\operatorname{Re}s<1$, and each zero with real part $\sigma$ puts an error of about $x^{\sigma}$ into the count of primes up to $x$. The Riemann hypothesis says every one of them has $\sigma = 1/2$, so the error is as small as it could possibly be, $x^{1/2}$ up to logs.

Change the coefficients and you get a family. A Dirichlet character $\chi$ mod $q$ is a multiplicative function that only depends on $n$ mod $q$. Its L-function $L(s,\chi)=\sum \chi(n)n^{-s}$ counts primes in the progressions mod $q$. The Generalized Riemann Hypothesis (GRH) says all of these have their nontrivial zeros on $\operatorname{Re}s=1/2$ as well. Several deterministic algorithms are proved fast only under GRH: Miller's primality test, finding a quadratic non-residue, factoring polynomials over finite fields.

Now change the integers. A number field $K$ is a finite extension of $\mathbb Q$, such as $\mathbb Q(\sqrt5)$ or $\mathbb Q(i)$. Its ring of integers need not factor uniquely into primes, but its ideals do, and the Dedekind zeta function sums over them:

$$
\zeta_K(s)=\sum_{\mathfrak a\neq 0}\frac{1}{N\mathfrak a^{s}}=\prod_{\mathfrak p}\frac{1}{1-N\mathfrak p^{-s}} .
$$

For $K=\mathbb Q$ this is $\zeta$ again. The Extended Riemann Hypothesis (ERH) is the claim that every $\zeta_K$ has its strip zeros on the line. It controls the error in the prime ideal theorem, the count of prime ideals of norm up to $x$, and it is the hypothesis behind most class group computations in practice: the standard algorithms certify a class group only under it.

Two words do the sorting in Axiom's result. A field of degree $n$ has $n$ embeddings into $\mathbb C$. It is **totally real** if every embedding lands in $\mathbb R$: $\mathbb Q(\sqrt5)$, or the cubic field cut out by $x^3-4x+1$, whose discriminant 229 is positive and not a square, so its three roots are real and the field is not Galois. It is a **CM field** if it is a totally imaginary quadratic extension of a totally real field: $\mathbb Q(i)$ over $\mathbb Q$, or that cubic field with $i$ adjoined. Everything else, for example $\mathbb Q(\sqrt[3]2)$ with one real and one pair of complex embeddings, is in neither class.

One more fact explains the timeline below. When $K$ is abelian over $\mathbb Q$, $\zeta_K$ factors into Dirichlet L-functions, so anything proved for all Dirichlet L-functions transfers to it. Alpöge's GRH for Dirichlet L-functions therefore already covered $\mathbb Q(\sqrt5)$ and $\mathbb Q(i)$. The ERH paper says so itself (its Proposition 6.1). That GRH is the Dirichlet one: the Lean FRO's certificate of 21 November is for RH, and the readable edition of the GRH proof that the ERH paper cites as its reference [1], [lsernau/grh-lean](https://github.com/lsernau/grh-lean), was created on 25 November. Abhishek Saha [made the same distinction](https://x.com/ObhishekSaha/status/2126978287075209609) on X: GRH for all Dirichlet L-functions "Alpöge–Claude have indeed proved", while in automorphic forms the term usually means much more. What Axiom adds is the non-abelian totally real and CM fields.

<ZeroFreeLadder />

## What Axiom's ERH states, exactly

The paper, *Report: The extended Riemann hypothesis for Dedekind zeta functions of totally real fields*, is on [GitHub](https://github.com/AxiomMath/erh-preprint/blob/main/paper.pdf) and on Hexagon as [2611.01389](https://hexagonmath.org/2611.01389v1). Read its first page of theorems whole.

<Figure src="https://media.thesatyajit.com/ai/articles/ai-proved-number-theory/erh-theorems.png?v=2dc4ee5171eb5235" alt="Theorems 1.1 to 1.4 of the ERH paper: nonvanishing of L_k(s, chi composed with the norm) for Re s greater than 1/2 over totally real k, the Riemann hypothesis for zeta_k with the prime ideal theorem error O(x^(1/2) log(D_k x^[k:Q])), the uniform-sign extension, and the CM case." caption="The four main statements and the abelian remark between them (The extended Riemann hypothesis for Dedekind zeta functions of totally real fields, page 3)." />

The Lean in `main.lean` has seven public theorems. Here are the two that carry the headline, verbatim:

```lean
/-- Nonvanishing to the right of the critical line for totally real norm twists. -/
theorem totallyReal_normTwist
    (k : Type) [Field k] [NumberField k] [NumberField.IsTotallyReal k]
    (q : ℕ) [NeZero q] (χ : DirichletCharacter ℂ q) {ρ : ℂ} (hρ : 1 / 2 < ρ.re) :
    entireRayHeckeL k (normRayClassChar k χ) ρ ≠ 0 := ...

/-- The pole-removed Dedekind zeta function of every CM field. -/
theorem cm_poleRemovedZeta
    (K : Type) [Field K] [NumberField K] [IsCMField K]
    {ρ : ℂ} (hρ : 1 / 2 < ρ.re) :
    entireRayHeckeL K (normRayClassChar K (1 : DirichletCharacter ℂ 1)) ρ ≠ 0 := ...
```

`IsTotallyReal` and `IsCMField` are Mathlib's classes; neither the repository nor its dependency redefines them. `entireRayHeckeL` is the repository's own definition, in `lean/Lib/Analytic/HeckeHalfPlane.lean`, so I read it. It is defined as the unique entire function that agrees with $(s-1)\sum_{\mathfrak a}\chi(\mathfrak a)N\mathfrak a^{-s}$ on $\operatorname{Re}s>1$ when the character is principal (without the $s-1$ otherwise), and as the zero function if no such entire function exists. That fallback could hide a vacuous theorem in a statement of the form "$=0$", but these theorems say "$\neq 0$", which the zero function cannot satisfy. So proving them also proves the continuation exists. With $\chi = 1$ mod 1 the character is trivial on every ideal and the function is $(s-1)\zeta_K(s)$, the Dedekind zeta function with its pole removed.

Reading the statements against the paper gives the exact scope:

- **Right half of the strip only.** The theorems say "no zeros with real part above 1/2". The other half follows from the functional equation $\xi_K(s)=\xi_K(1-s)$, so all strip zeros are on the line. The paper's Appendix A.4 says that step, and the $O(x^{1/2}\log(D_kx^{[k:\mathbb Q]}))$ prime ideal theorem, are not among the formalized theorems. They are textbook consequences, but they are not in the Lean.
- **Which characters.** Over a totally real field: every norm twist $\chi\circ N_{k/\mathbb Q}$, and every ray-class character of uniform sign (the same sign at every real place). Over a CM field: only the norm twists, which include $\zeta_K$. A general Hecke character of a CM field is not covered.
- **Which fields.** Totally real, CM, and any field with an automorphism that acts as complex conjugation under every embedding. For $\mathbb Q(\sqrt[3]2)$ and every other field with a complex embedding that is not CM, the paper's Remark 1.5 says Cureton and Thorner's $\operatorname{Re}s>31/32$ "remains the best result known".

### The three theorems Lean takes on trust

The README says the proof "is conditional on three published theorems, which enter as axioms." They are the only `axiom` declarations in the repository, all in `external.lean`. My scan of its 2,613 Lean files (1,335,084 lines by my count) finds exactly those three, and no `sorry`, `admit` or `native_decide` outside comments. Each axiom carries its source in a docstring. The first:

```lean
/-- **Exact source:** Xinyi Yuan and Shou-Wu Zhang, *On the averaged Colmez
conjecture*, Annals of Mathematics (2) **187**, no. 2 (2018), 533–638,
**Theorem 1.1**. ... This declaration assumes the
published theorem; it does not formalize its proof. -/
axiom averagedColmez (k : Type) [Field k] [NumberField k]
    [NumberField.IsTotallyReal k] : ERHLiteratureInputs.AveragedColmez k
```

The other two are Dasgupta and Kakde's strong Brumer–Stark theorem away from 2 (*Annals* 197, 2023, Theorem 1.3) and Dasgupta, Kakde, Silliman and Wang's Brumer–Stark over $\mathbb Z$, which handles the prime 2. The third is cited as arXiv:2310.16399v1. I could not find a journal version of it, so "three published theorems" is two published theorems and a 2023 preprint by the same group. The preprint repository's README calls the proof "complete relative to three published theorems", and the abstract says they are "used without being reproved". The paper's Appendix A.4 lists what the Lean cannot check: the proofs of those theorems, and whether each `axiom` says what the printed theorem says. The repository records that comparison line by line in `docs/averaged-colmez.md` and the adapter files. Nobody outside Axiom has published a check of it yet.

### What the axioms actually assert

The axiom declarations are one line each. The content is in the three propositions they assert, so I read those too. They are where a formal proof like this can go wrong without the kernel noticing.

`ERHLiteratureInputs.AveragedColmez k` (in `lean/New/LiteratureInputs/AveragedColmez.lean`) says that for every CM extension $F=k(\sqrt{-\delta})$ the construction picks, and every family of abelian schemes with complex multiplication by $\mathcal O_F$ of each CM type, the mean of their Faltings heights equals

$$
-\tfrac12\operatorname{Re}\frac{L'(0,\eta)}{L(0,\eta)}-\tfrac14\log\frac{|d_F|}{|d_k|},
$$

where $\eta$ is the quadratic character of $F/k$. That is Yuan and Zhang's Theorem 1.1, specialized.

`ERH.LiteratureInputs.DK13LayerStatement D` (in `DasguptaKakdeLiteral.lean`) says that for each odd prime $\ell$ and each layer $H=E(\mu_{\ell^b})$ of the cyclotomic tower over the real subfield, the smoothed Stickelberger element, after the involution $x\mapsto x^\#$, lies in the Fitting ideal of the minus part of the Pontryagin dual of a ray class group over $\mathbb Z[\tfrac12][G]/(1+c)$. That is Dasgupta and Kakde's strong Brumer–Stark.

`ERHLiteratureInputs.DKSWDyadicUnits E b` (in `DyadicUnitStatement.lean`) is the prime-2 version, stated as a unit theorem. For each prime $\mathfrak p$ of the real subfield that splits completely in $H=E(\mu_{2^b})$, it asserts a unit $u\in H^\times$ with three properties: it is a unit away from $\mathfrak p$; it has absolute value 1 under every complex embedding; and the character-weighted valuations of its conjugates at the primes above $\mathfrak p$ equal partial zeta values at $s=0$. It also has a congruence to 1 at the smoothing prime. That is the shape of a Brumer–Stark unit, and the file says it keeps "all three conclusions of the paper".

None of the three mentions a zero, the critical line or $\operatorname{Re}s>1/2$. They are statements about heights at $s=0$, class groups and units. So mathematically they are not the crux: they are deep, standard theorems, and the new mathematics is the 1.3 million lines that turn them into a statement about zeros. If someone asked whether "ERH" is the right headline, my answer is "ERH, conditional on Brumer–Stark and averaged Colmez", which is still a striking sentence.

Formally the picture is different, and this is the part the build cannot settle. Each proposition is written in the repository's own vocabulary: a Faltings height defined in `Lib/CM/Colmez/FaltingsHeight.lean`, a Stickelberger element `dkClassWord`, a partial-zeta reading `layerEulerReading`, a Fitting ideal `New.Selmer.fitt`. If any of those definitions drifts from the paper's, the axiom asserts something Yuan, Zhang, Dasgupta, Kakde, Silliman and Wang never proved. If the drift makes the statement false, the axiom is inconsistent, and an inconsistent axiom proves every theorem, the ERH included. The docstrings show the authors know this. `AveragedColmez` insists that its family "contains no freely chosen real height function", which is the obvious way such an axiom could be made trivially false, and `docs/averaged-colmez.md` walks the metric normalization through. That same document also says "This repository introduces no global axiom asserting it", which `external.lean` now contradicts. It reads like a note written before the hypothesis became an axiom, and it is the kind of drift a reviewer should check for everywhere. `#print axioms` will list the three names. It cannot tell anyone whether they say what the Annals papers say.

These are not obscure inputs. Brumer–Stark was a conjecture for forty years before Dasgupta and Kakde, and the averaged Colmez formula was proved twice independently in 2018. A conditional ERH that rests on them is a much stronger statement than an ERH conditional on, say, GRH for some other family. It is still conditional, and the first line of a summary should say so. [@ryverse1 put it](https://x.com/ryverse1/status/2127148482876354709) well in the replies: *"Worth stating that up front alongside the result."* When [Robert Joseph asked](https://x.com/Robertljg/status/2127176761867940251) whether they would formalize the three next, Axiom [answered](https://x.com/axiommathai/status/2127190168620962200): *"We got the result a couple days ago and waited for it to formalize unconditional on the three published theorems + video production. Will def formalize it fully."* I read "unconditional on" there as "conditional only on": the repository at `c578e9b` is conditional, and the reply promises the rest.

There is a second dependency that is not an axiom. The ERH repository imports [AxiomMath/DedekindZetaZeroFree](https://github.com/AxiomMath/DedekindZetaZeroFree), the formalization of Cureton and Thorner's 31/32 half-plane, which the proof uses wherever the classical zero-free region would go. At the pinned commit `15f9d0d` it is another 5,528 files and 1,295,321 lines. My scan finds no `axiom`, and its only two `sorry` are in `Challenge/DedekindZetaChallenge.lean`, the statement file that is supposed to have them. Walking the imports from `main.lean`, the build has to compile about 8,100 project modules and 2.6 million lines before it gets to Mathlib, which comes from a cache.

### How the proof works, as far as the paper explains it

The method is Alpöge's, and the paper is generous about that: the theta correspondence for unitary groups, the Galois representations, the congruence-module bounds and the analytic outer layer are taken "without change" from his formalization. The idea is old in spirit. Chebyshev bounded primes by noting that a nonzero integer is at least as big as the product of the prime powers you know divide it. Here the integer is a determinant built from Taylor coefficients of theta functions on abelian varieties with complex multiplication. Its size comes from a period, its forced prime factors come from supersingular primes, and the two main terms cancel exactly. What is left is a one-sided bound on a sum over primes, and a theorem of Landau (1905) says a one-sided bound is enough to push the zeros back to the line.

Over $\mathbb Q$ that runs on one CM elliptic curve and the Chowla–Selberg formula for its period. Over a totally real $k$ the paper replaces the curve by a family of abelian varieties with multiplication by a CM extension $F=k(\sqrt{-\delta})$. The averaged Colmez formula supplies the exact period, and the two Brumer–Stark theorems replace Stickelberger's theorem in bounding the Selmer groups in the error term. That is where the three axioms enter.

Section 6.4 says why it stops. Theta functions need a positive definite quadratic form compatible with multiplication by the field. A totally real field has one, $\sum_j c_j\tau_j(x)^2$ with all $c_j>0$. A CM field has a hermitian one, because complex conjugation is the same automorphism under every embedding. A field with a complex embedding that is not CM gets terms like $\operatorname{Re}(c\,\tau(x)^2)$, which take both signs, so any positive form is incompatible with the field, the main terms no longer match, and the method "gives the Riemann hypothesis when the main terms match exactly, and nothing otherwise." On 29 November, before Axiom posted, [Acer had predicted exactly this boundary](https://x.com/AcerFur/status/2127043029080911966) for Alpöge's method: *"The proof generalises quite readily to Dedekind zeta functions over totally real fields (including e.g. non-abelian cubic) and also CM fields, but other fields is where there needs to be a bit of a breakthrough to make work."*

### A first application: a rank-32 curve without BSD

The preprint repository includes a second paper, dated 27 November, that uses the theorem. The Elkies–Klagsbrun–Li curve has 32 known independent rational points. Bounding its rank from above needs the 2-rank of the class group of an associated cubic field, and Jain's published certificate for that class group was valid under GRH for Dedekind zeta functions. The cubic field is totally real, and so are the quadratic extensions inside its Hilbert class field that the certificate needs. So Corollary 1.2 removes the hypothesis, and the paper concludes rank exactly 32, using neither BSD nor finiteness of Sha. This is the kind of consequence ERH was always wanted for: a class group computation that used to say "assuming GRH" stops saying it, for totally real fields.

## Deligne's bound, by a different road

The second result is older mathematics with a newer proof. In 1916 Ramanujan wrote down

$$
\Delta(z)=q\prod_{m\ge1}(1-q^m)^{24}=\sum_{n\ge1}\tau(n)q^n,\qquad q=e^{2\pi i z},
$$

and made three conjectures about $\tau$: it is multiplicative, it satisfies a recurrence at prime powers, and $|\tau(p)|\le 2p^{11/2}$. Mordell proved the first two in 1917. The third is the Ramanujan–Petersson conjecture, and Deligne proved it in 1974 as a consequence of his proof of the Weil conjectures, for every holomorphic Hecke eigenform of weight $k\ge2$ at primes not dividing the level: $|a_p|\le 2p^{(k-1)/2}$.

Why the bound has that shape is the cleanest part of Axiom's [technical report](https://github.com/AxiomMath/RamanujanPetersson/blob/main/TechnicalReport.pdf). Factor $1-\tau(p)X+p^{11}X^2=(1-\alpha X)(1-\beta X)$. Then $\alpha\beta=p^{11}$, and the bound is the statement that $|\alpha|=|\beta|=p^{11/2}$. Divide by $p^{11/2}$ and both roots sit on the unit circle as $e^{\pm i\theta_p}$, so $\tau(p)/2p^{11/2}=\cos\theta_p$, which cannot leave $[-1,1]$. Hasse's theorem for an elliptic curve over $\mathbb F_p$ is the same picture one weight down.

<Figure src="https://media.thesatyajit.com/ai/articles/ai-proved-number-theory/rp-circle.png?v=09159707160ec44a" alt="Unit circle with two conjugate points e^(i theta) and e^(-i theta); text: divide alpha and beta by p^(11/2), their magnitudes become one, their mean is cos theta, so tau(p)/(2p^(11/2)) lies in [-1, 1]." caption="Why the bound is a statement about a circle (A proof of the Ramanujan–Petersson conjecture, formalized in Lean, Technical Report, page 3)." />

The widget computes $\tau(n)$ exactly for every $n$ below 2,000 in your browser: $\prod(1-q^m)^{24}$ is the eighth power of Jacobi's sparse series for $\eta^3$, so three BigInt squarings do it. It then plots $\tau(p)/2p^{11/2}$ for all 303 primes. Each value is $\cos\theta_p$, and the histogram already looks like the Sato–Tate semicircle that Barnet-Lamb, Geraghty, Harris and Taylor proved is the limit. The table includes a check from the report I liked: the number of ways to write an odd prime $p$ as a sum of 24 squares is $\tfrac{16}{691}(p^{11}+1)+\tfrac{33152}{691}\tau(p)$, and 691 has to divide the numerator exactly. For $p=3$ it gives 16,192, which is $\binom{24}{3}\cdot 8$, the brute-force count.

<TauBound />

<Figure src="https://media.thesatyajit.com/ai/articles/ai-proved-number-theory/rp-sato-tate.png?v=6defddd23097d874" alt="Histogram of tau(p)/(2p^(11/2)) for the 1,229 primes up to 10,000, against the Sato–Tate semicircle density (2/pi) sqrt(1 - t^2)." caption="The same ratios for 1,229 primes up to 10,000, against the Sato–Tate density (Technical Report, page 8)." />

### What the formal statement covers

The challenge file `Challenge/Basic.lean` imports only Mathlib. It states both theorems with `sorry`, and `Comparator/comparator.json` asks Comparator to check the solution against it, allowing only `propext`, `Quot.sound` and `Classical.choice`. The general statement:

```lean
theorem ramanujan_petersson (N : ℕ) [NeZero N] (k : ℤ) (hk : 2 ≤ k)
    (f : CuspForm (Gamma0 N) k) (h₁ : coeff f 1 = 1)
    (heigen : ∀ p : ℕ, p.Prime → ¬ p ∣ N → ∃ c : ℂ, IsHeckeEigenformAt f p c) :
    ∀ p : ℕ, p.Prime → ¬ p ∣ N → ‖coeff f p‖ ≤ 2 * (p : ℝ) ^ (((k : ℝ) - 1) / 2) := by
  sorry
```

`coeff` is the $q$-expansion coefficient from Mathlib's `qExpansion`, and `IsHeckeEigenformAt` writes the $T_p$ eigen-relation out on coefficients. The second theorem does the same for $\Gamma_1(N)$ with any nebentypus. Its structure is called `HolomorphicNewform`, but its docstring says plainly *"No newform (primitivity) condition is imposed"*, which makes the statement more general than the name. Both are Deligne's theorem. The repository has no `axiom` declarations in its 1,261 files, and its only two `sorry` are the two in the challenge file.

Two words in the announcement need care. "Generalized Ramanujan–Petersson" usually names the open conjecture: the same bound for Maass forms, and for automorphic representations of $\mathrm{GL}(n)$. This development is about holomorphic forms of weight at least 2, where Deligne's theorem has been known for fifty years. [D. Aryan said as much](https://x.com/__daryan/status/2127133656011641088) in the replies. And "new route": Deligne's sketch places $\alpha,\beta$ in the cohomology of a compactified Kuga–Sato variety of dimension 11. Axiom's route matches the Hecke recurrence against the Popa–Zagier and Kaplan–Petrow trace formulas, sums traces of Frobenius on $\mathrm{Sym}^{10}H^1$ over an open modular curve, applies a curve form of Weil II, and finishes with a Turán-style power-sum argument that pins down $|\alpha|$ and $|\beta|$ without the compactification. [Simon Pepin Lehalleur replied](https://x.com/plain_simon/status/2127359595584933986): *"characterizing (2) as a "new route" seems overstated? You are studying the cohomology of the same automorphic local system as Deligne, in a slightly different way?"* I think that is fair. The assembly is different and explicit, and the formalization is the real contribution.

Three more things I found in the repository:

- The Lean was published on 11 November (commit `53826c8`, "Publication of Files"). Only the technical report is from 29 November.
- The report cites Stacks commit `012108f` and Mathlib `16edf57`. The lakefile pins Stacks `c496df0` and Mathlib `56a0058`. The build uses the lakefile's.
- Weil II comes from [AxiomMath/Stacks](https://github.com/AxiomMath/Stacks), a Lean formalization of the Stacks Project. The Weil II modules RP imports are in its `StacksFrontier` tier, which its README describes as "formalizations written by AI agents", where "review is most needed". The kernel checks them either way, and I ran the same comment-aware scan over the whole pinned Stacks checkout: 64,215 files, 18,522,365 lines, no `axiom`, `sorry` or `native_decide`. One thing to watch in the build: Stacks' general Weil II assembly (`WeilIIFinalAssembly.lean`) takes its Laumon inputs as named hypotheses, and RP's `Geometric/WeightBound/CurveBound.lean` discharges them for curves with named proved terms (`weilIICurveBoundOpenAffineLine_zero`). Whether that chain closes with only the standard axioms is exactly what `#print axioms` on the two theorems will show. My rough import walk puts about 20,000 Stacks modules in RP's build, and the README notes there is no cache for them yet. Axiom's own GitHub Actions build on 29 November was cancelled at the six-hour limit after job 15,383 of 15,479, and the run on 11 November failed after about six hours. Neither run reached the end. That says nothing against the proof, but it means "verified in Lean" here rests on Axiom's machines until someone else finishes a build.

## An Erdős count, settled at the fourth root

The third result is smaller and stranger. Write $\omega(m)$ for the number of distinct primes dividing $m$. Erdős, Pomerance and Sárközy, in *On locally repeated values of certain arithmetic functions. III* (Proc. AMS 101, 1987), studied

$$
g(n)=\#\{\,m\le n : m+\omega(m)>n\,\}.
$$

It counts how many integers at or below $n$ jump past $n$ when you add their prime-factor count. Since $\omega(m)$ is tiny, only the last few $m$ can, and $m=n$ always does. They proved its normal order is $\log\log n$ (Theorem 3.2). Then they disagreed in print about what happens next:

<Figure src="https://media.thesatyajit.com/ai/articles/ai-proved-number-theory/eps-1987-dispute.png?v=eea8f7ebb30289f7" alt="Paragraph from the 1987 paper: the first author believes (g(n) - log log n)/sqrt(log log n) has a normal distribution; the second and third authors believe g(n) = log log n + o(sqrt(log log n)) on a set of density 1; settling it would need the second moment, which seems not so easy." caption="The dispute, as printed (Erdős, Pomerance and Sárközy, Proc. Amer. Math. Soc. 101 (1987), page 6)." />

It is not the Erdős–Kac theorem, though it lives next door. Erdős–Kac says $\omega(n)$ itself is Gaussian with mean and variance $\log\log n$, so its natural fluctuation is $\sqrt{\log\log n}$. Erdős expected $g$ to inherit that scale. $g$ is a threshold count instead: it asks, for each shift $h$, whether $\omega(n-h)$ beats $h$. Pomerance and Sárközy expected that to fluctuate less.

The [written proof](https://github.com/1337isnot1337/solved-conjectures/blob/main/results/pomerance-sarkozy-fluctuations/PROOF.md) argues they were right, with a scale nobody had written down. With $L=\log\log X$ and $n$ uniform up to $X$,

$$
\frac{g(n)-\log\log n}{(\log\log n)^{1/4}}\ \Longrightarrow\ \mathcal N\!\left(0,\pi^{-1/2}\right).
$$

The reason fits in a paragraph. After discarding rare events, $g(n)\approx 1+\sum_{h\ge1}\mathbf 1[\omega(n-h)>h]$. The proof's Section 2 shows the vector $(\omega(n-h))_h$, restricted to mid-sized primes, is close in total variation to independent Poisson variables $Z_h$ of mean $\lambda\approx L$. That is the Kubilius-model idea, done here by an explicit Chinese-remainder and Bonferroni argument across a growing window of shifts. Now $\mathbf 1[Z_h>h]$ is almost surely 1 when $h$ is well below $L$ and almost surely 0 when it is well above. Only the $h$ within a few $\sqrt L$ of $L$ are random. Each contributes variance $p_h(1-p_h)$, and summing the Gaussian approximation over a window of width $\sqrt L$ gives

$$
\operatorname{Var}G\sim\sqrt L\int_{\mathbb R}\Phi(t)\bigl(1-\Phi(t)\bigr)\,dt=\frac{\sqrt L}{\sqrt\pi}.
$$

So the standard deviation is about $0.75\,L^{1/4}$, and dividing by Erdős's $\sqrt L$ sends everything to zero. If the proof holds, and its two headline limits are what the Lean below states, Erdős's normal law at the square-root scale is false, and Pomerance and Sárközy's $o(\sqrt{\log\log n})$ holds with a quarter-power Gaussian law underneath it.

The widget shows both halves. On the left is the real $g(n)$, from a sieve of $\omega$ up to two million. On the right is the model, where the variance is summed exactly and, for $L$ up to 4,000, the exact distribution of $G$ is built by convolving its Bernoullis. The "digits" row explains why nobody settled this by computer. $L=\log\log n$ is about 2.6 at $n=10^6$. $L=10$ needs an $n$ with 9,566 digits.

<FluctuationLab />

I ran the real count over every $n$ from 5 million to 10 million with a 20-line sieve in Node, to see how far from the asymptotics we live. There $\log\log n$ runs from 2.73 to 2.78. The mean of $g(n)-\log\log n$ is 0.30 and its mean square is 0.53. The model at $L=3$ has a variance near 0.91, by the same sum the widget does. At these sizes the Poisson approximation has not kicked in, which is the usual fate of anything with $\log\log$ in it. The same run found 13,433 "barriers", $n$ with $g(n)=1$, in that range. The 1987 paper conjectured infinitely many barriers. The new proof does not address that, nor the paper's other open questions about the maximal order and exact collisions, and its "Literature and scope" section says so.

### What "lean verified" covers

[PR #902](https://github.com/1337isnot1337/solved-conjectures/pull/902), merged on 26 November, added two theorems. The first, verbatim:

```lean
theorem source_arithmetic_quarter_gaussian :
    Tendsto (fun X : ℕ ↦ (sourceFullSample X).map (fun n : ℕ ↦
      ((sourceG n : ℝ) - Real.log (Real.log n)) / (Real.log (Real.log n)) ^ (1 / 4 : ℝ)))
      atTop (𝓝 (⟨gaussianReal 0 (Real.toNNReal (1 / Real.sqrt Real.pi)), inferInstance⟩ :
        ProbabilityMeasure ℝ))
```

`sourceG n` is defined as `((Icc 1 n).filter fun m => n < m + distinctPrimeCount m).card` with `distinctPrimeCount m = m.primeFactors.card`, which is the 1987 function letter for letter, and `sourceFullSample X` is the uniform measure on $\{1,\dots,X\}$. The second theorem says the proportion of $n\le X$ with $|g(n)-\log\log n|/\sqrt{\log\log n}>\varepsilon$ tends to 0 for every $\varepsilon>0$. Those are the two headline limits, stated against Mathlib's own Gaussian and prime factors. The repository says its audit replayed the 99-module import closure in the stock kernel with only the three standard axioms. My import walk also finds 99 modules, and my scan of the 142 `PomeranceSarkozy*.lean` files (10,989 lines) finds no `axiom`, `sorry` or `native_decide`.

What is not in Lean: the single set of natural density one on which $g(n)=\log\log n+o(\sqrt{\log\log n})$, which is the literal form of the Pomerance–Sárközy statement (the written proof gets it by a diagonal argument), and the second-moment asymptotic. The repository's own catalogue marks the result "Partial" for that reason. The convergence-in-probability statement implies the density-one one by a standard argument, so this is a gap in the formalization, not in the mathematics. The proof's priority search is, in its own words, "a bounded priority check, not an absolute claim", and the repository's later prior-art audits (#1178, #1179) did not touch this result. The repository is curated by Cinna Davis with GPT-6.2 Astra. The review it cites is internal.

The one expert reply I found was [Thomas Bloom's](https://x.com/thomasfbloom/status/2126083805798928535): *"Erdos' papers are great- so many fascinating ideas. Hopefully you are actually reading them, but in case you're not, or to anyone else seeing this - I recommend actually reading the papers and thinking about the maths."* Read the paragraph above, and he has a point: the 1987 authors had already named the second moment as the way in.

## Reactions so far

There is not much yet from analytic number theorists on the record, which is normal for a result posted on a Sunday, three days after Thanksgiving. On X, besides the replies quoted above, [Jared Duker Lichtman](https://x.com/jdlichtman/status/2127193978760237164) wrote *"Wake me up for the Grand Riemann Hypothesis"*, and when [Acer](https://x.com/AcerFur/status/2127119267086663925) pointed out *"you still have arbitrary number fields to go"*, Axiom [replied](https://x.com/axiommathai/status/2127191958733099293) *"Yep"*. Asked who understands the RP proof, Axiom named [Ken Ono and Jesse Thorner](https://x.com/axiommathai/status/2127190631747657837), both of whom work there. I found no comment from anyone outside Axiom who has read the 73 pages. I searched on 30 November.

## What I read, what I ran, what is still queued

Read: `main.lean`, `external.lean`, the definitions of `entireRayHeckeL`, `normRayClassChar` and `IsUniformSign` in erh-totally-real at `c578e9b`; the ERH paper's introduction, Sections 2.1 and 6.4 and Appendix A; the rank-32 paper's abstract and Section 2; RP's README, challenge file, comparator config and technical report at `dd91d58`; the P-S `PROOF.md`, `FORMALIZATION.md`, `AUDIT.md` and Lean headline file at `f4dc8bea`; page 6 of the 1987 paper.

Ran, on my machine: a comment-aware scan of every `.lean` file in erh-totally-real, DedekindZetaZeroFree at `15f9d0d`, RamanujanPetersson, AxiomMath/Stacks at `c496df0` and the P-S modules, for `axiom` declarations and for `sorry`, `admit`, `native_decide`, `implemented_by` and `@[extern]`; an import-closure walk for each build; the $\tau$ computation (checked against $\tau(2),\tau(3),\tau(5)$ and the 24-squares count for $p=3$); and the $g(n)$ sieve to $10^7$. GitHub Actions history came from `gh run list`.

Not yet run: `lake build` and `#print axioms` for any of the three. The scripts are written and queued on a 28-core machine, one per repository. Until they report, the only build evidence for the ERH is Axiom's own Appendix A, for RP a CI that never finished, and for P-S the repository's receipt.

## Where I land

The ERH for totally real and CM fields is the most important of the three, and it rewards precision more than excitement. If the build reproduces Axiom's report, then, conditional on two Annals theorems and a 2023 preprint, Lean will have checked that the zeta function of every totally real field, abelian or not, has no zeros to the right of the critical line. The step to "on the line" is the functional equation, which is textbook but not in the Lean. The rank-32 curve shows that has teeth. The headline "ERH" overstates it twice: it is conditional, and it covers the fields this method can reach and no others. The boundary in Section 6.4 is the most interesting page in the paper, because it says exactly what is missing, an exact size formula for a theta-like integer over a field with a complex embedding.

The Ramanujan–Petersson development is a formalization of a 1974 theorem by an explicit route. That is real work, and it brings Weil II into Lean as a by-product. I would not call it a route to the generalized conjecture.

The Pomerance–Sárközy result is the one I enjoyed most. It answers a question two famous mathematicians argued about in print, with a scale neither of them guessed, and the reason is one Riemann sum. Its Lean covers the theorem that matters. I will add the build results here when they come back.
