Almost all primes are partially regular

Evan Chen, Chris Cummins, Ben Eltschig, Dejan Grubisic, Leopold Haller, Letong Hong, Andranik Kurghinyan, Kenny Lau, H.m. Leather, Seewoo Lee, Aram Markosyan, Ken Ono, Manooshree Patel, Gaurang Pendharkar, Vedant Rathi, Alex Schneidman, Volker Seeker, Shubho Sengupta, Ishan Sinha, Jimmy Xin, Jujian ZhangarXiv 2026 · DOI · arXiv

This paper presents a significant result in analytic number theory regarding the distribution of "regular" primes, while simultaneously marking a milestone in the use of Artificial Intelligence for formal mathematical discovery.

TL;DR

The authors prove that "almost all" prime numbers (a set with density one) satisfy a partial version of the regular prime condition and the Vandiver Conjecture. Notably, the entire proof was discovered and formalized autonomously by an AI system, AxiomProver, and verified using the Lean 4 theorem prover.

What Problem Does This Paper Address?

In the 19th century, Ernst Kummer showed that Fermat’s Last Theorem holds for "regular" primes—primes $p$ that do not divide the class number of the $p$-th cyclotomic field. This condition is equivalent to saying $p$ does not divide the numerator of any of the first few Bernoulli numbers ($B_2, B_4, \dots, B_{p-3}$).

While it is conjectured that about 61% of primes are regular, we still don't even know if there are infinitely many of them. Conversely, we know there are infinitely many irregular primes. This paper shifts the focus to partial regularity: even if a prime is irregular, is it "mostly" regular for a specific range of indices?

The authors investigate whether the eigenspaces of the class group (which govern the failure of regularity) vanish for a range of characters up to roughly $\sqrt{p}$. This has deep implications for the Vandiver Conjecture, a major open problem that suggests these eigenspaces always vanish for even indices.

Methods

The paper employs a mix of classical analytic number theory and cutting-edge formal verification:

  1. Analytic Bounding: The core mathematical strategy involves bounding the number of distinct prime factors of a product of Bernoulli numerators. The authors use:
  2. Euler’s formula for the Riemann zeta function to estimate the size of Bernoulli numbers.
  3. The von Staudt–Clausen theorem to handle the denominators.
  4. The Prime Number Theorem (specifically Chebyshev’s $\theta$-function) to bound the number of distinct prime divisors ($\omega_{pf}(n)$) of a large integer.
  5. AI-Driven Discovery: The proof was not written by humans first. The authors provided the natural-language statement of the theorem to AxiomProver. The AI autonomously:
  6. Generated the mathematical proof.
  7. Wrote the formal code in Lean 4.
  8. Independently derived necessary lemmas (like a version of the von Staudt-Clausen theorem) to complete the verification.

Datasets

This is a theoretical mathematics paper, so it does not use traditional training datasets. However, it utilizes:

  • Lean/Mathlib: The standard library of formalized mathematics served as the environment for the AI to construct and verify the proof.
  • AxiomProver: The AI tool itself (currently under development) which was tested as a case study for autonomous theorem proving.

Key Insights and Ideas

  • The Growth Gap: The "aha moment" lies in the disparity between how fast Bernoulli numbers grow versus how slowly the number of their distinct prime factors grows. Bernoulli numbers grow factorially, but the number of distinct prime factors $n$ grows only as $O(\log n / \log \log n)$. This "room" allows the authors to prove that the set of primes dividing "early" Bernoulli numbers is vanishingly small compared to the total set of primes.
  • Density-One Result: The paper proves that the property of partial regularity holds for a "density-one" subset of primes. In plain English: if you pick a very large prime at random, the probability that it is partially regular is 100%.
  • Autonomous Formalization: The paper demonstrates that AI can now handle "bookkeeping" and complex side conditions in formal logic that usually frustrate human formalizers, producing a 3,500-line Lean script without human intervention.

Key Results

  • Theorem 1.1: For any $\alpha > 1/2$, the number of primes $\le X$ that fail to be partially regular in the range $2k \le \sqrt{p}/(\log p)^\alpha$ is bounded by $C_\alpha \frac{X}{(\log X)^{2\alpha}}$. Since the total number of primes is $\sim X/\log X$, the proportion of "bad" primes goes to zero as $X \to \infty$.
  • Partial Vandiver Theorem: The result provides a "density-one" version of the Vandiver Conjecture for a specific range of indices.
  • Analytic Consequences: The authors derive new results for Kubota–Leopoldt $p$-adic $L$-functions, proving they have no zeros on $\mathbb{Z}_p$ for almost all primes in the specified range.
  • Concrete Constants: In Remark 1.2, the authors note that the AI found that the constant $C_\alpha = 10$ works for all $\alpha > 1/2$.

Limitations and Future Work

  • Range Constraints: The "partial" regularity only extends up to $\sqrt{p}$. The full Vandiver Conjecture and Kummer’s regularity require checking indices up to $p-3$. Extending this density result to the full range remains a massive open challenge.
  • AI "Hints": While the main theorem was end-to-end autonomous, the authors note that for some experiments (like finding the constant $C_\alpha = 10$), they provided the AI with additional resources like the formalized Prime Number Theorem.
  • Future Directions: The success of AxiomProver here suggests a new workflow for mathematics: humans conjecture a bound, and AI systems handle the grueling work of epsilon-delta bookkeeping and formal verification.

Summary updated

Abstract

For odd primes $p$, we let $K_p:=\mathbb{Q}(ζ_p)$ be the $p$th cyclotomic field and let $ω$ denote its Teichmuller character. For $α>1/2$, we say that an odd prime $p$ is partially regular if the eigenspaces of the $p$-Sylow subgroup of $\operatorname{Cl}(K_p)$ under the Galois action vanish for all characters $ω^{p-2k}$ with \[ 2\le 2k \le \frac{\sqrt{p}}{(\log p)^α}. \] Equivalently, $p\nmid \operatorname{num}(B_{2k})$ throughout this range. We prove that a density-one subset of primes is partially regular in this sense. By Leopoldt reflection, this yields a partial Vandiver Theorem: for a density-one set of primes $p$, the even eigenspaces $A_p(ω^{2k})$ vanish for all even $2k$ satisfying the inequality above. This result has consequences for Kubota-Leopoldt $p$-adic $L$-functions, congruences between cusp forms and Eisenstein series, and $p$-torsion in algebraic $K$-groups. The theorem proving partial regularity for almost all $p$ is fully formalized in Lean/Mathlib and was produced automatically by AxiomProver from a natural-language statement of the conjecture.
BibTeX
@misc{chen2026almost,
  author = {Evan Chen and Chris Cummins and Ben Eltschig and Dejan Grubisic and Leopold Haller and Letong Hong and Andranik Kurghinyan and Kenny Lau and H.M. Leather and Seewoo Lee and Aram Markosyan and Ken Ono and Manooshree Patel and Gaurang Pendharkar and Vedant Rathi and Alex Schneidman and Volker Seeker and Shubho Sengupta and Ishan Sinha and Jimmy Xin and Jujian Zhang},
  title = {{Almost all primes are partially regular}},
  year = {2026},
  eprint = {2602.05090},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05090},
}
Figure