# Riemann hypothesis: the Lean proof, cleaned up together A Lean proof of the Riemann hypothesis, and of GRH for Dirichlet L-functions, exists: Levent Alpöge's, working with Claude, 2026-11-20. Andrew Sutherland (MIT) and Michael Rubinstein (Waterloo) checked it by machine from 2026-11-20, and on 2026-11-21 the Lean FRO and the Mathlib Initiative certified the statement and the proof of the Riemann hypothesis (not GRH) in its first release. The Lean here is the 300,000-line rewrite of 2026-11-25, not the certified text. Not yet: a mathematician who has read it through, a refereed paper (there is a four-page note, and a preprint nobody is known to have checked), or any word from Clay, whose page lists the problem under "Active problems" (read 2026-12-02). This project is a community effort to make that proof smaller, faster to build and readable, and to write down what it says. ## Where it stands (as of 2026-12-02) | Step | State | Who, when, where it is written | |---|---|---| | Announced | A Lean proof and a four-page note, no paper | Levent Alpöge, working with Claude, 2026-11-20: "I believe I have, working with Claude, discovered a proof of the Riemann Hypothesis" ([remark.pdf](https://alpo.ge/remark.pdf), undated). The first release is 175,187 files, 17.4 million lines. | | Machine-checked | Yes, several times, by people outside | Andrew Sutherland (MIT): every module compiles (2026-11-20); Lean's kernel, nanoda, two verified checkers and `lake comparator` accept, the last on 2026-11-25 ([his record](https://math.mit.edu/~drew/grh/), updated 2026-11-27). Michael Rubinstein (Waterloo), 2026-11-21 ([his record](https://mrubinst.github.io/grh-lean-verification/)). The 300,000-line edition this project starts from: nanoda, two verified checkers and `lake comparator --paranoid` accept ([Sutherland](https://math.mit.edu/~drew/shortgrh/), 2026-11-26). | | Certified | Yes, for the Riemann hypothesis in the first release | The Lean FRO and the Mathlib Initiative, 2026-11-21: "We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct." ([statement](https://leanprover-community.github.io/blog/posts/riemann-hypothesis/)). It names the Riemann hypothesis, not GRH. | | Read by experts | Not yet | The edition we start from says: "No mathematician has read it through, and no paper comes with it" ([lsernau/grh-lean](https://github.com/lsernau/grh-lean), 2026-11-25). Terence Tao on one step, 2026-11-30: "I don't understand the details". The [G.R.H. Polymath](https://terrytao.wordpress.com/2026/11/24/g-r-h-polymath/) (since 2026-11-24) has as its first goal "a human-readable and understandable proof". Outlines exist ([Rubinstein's](https://www.math.uwaterloo.ca/~mrubinst/alpoge_claude_grh/), 45 pages, 2026-11-27, says its three main theorems "are not proved there"); a preprint claims a complete written proof ([arXiv:2611.38136](https://arxiv.org/abs/2611.38136), 2026-11-27), and nobody is known to have checked it. | | Published | No | Nothing refereed. The author: "I will do a proper job in a proper writeup" (remark.pdf). | | Recognised by Clay | No ruling | Clay lists the problem under "Active problems" ([its page](https://www.claymath.org/millennium/riemann-hypothesis/), read 2026-12-02) and has published nothing on this proof. Its [rules](https://www.claymath.org/wp-content/uploads/2022/03/millennium_prize_rules_0.pdf) (2018-09-26) ask for publication in a refereed outlet and two years of scrutiny after it. | What to keep in mind when you read that table: - **"GRH" here means Dirichlet L-functions**, every modulus and character. Dedekind zeta functions, Hecke and automorphic L-functions are not among the five theorems. - **The Lean in this project is not the text that was certified.** The first release was 17.4 million lines. On 2026-11-25 Luke Sernau and colleagues at Anthropic, with Claude, published a rewrite of about 300,000 lines that "follows that proof's method; many steps are proved by other arguments" (its README), and the community's cleanup moved to it the same day. Its checks are the machine-checked row above and the `build` check here. - **Doubts have been raised and answered, in public.** A critique says the first release's geometry is vacuous; a reply ([arXiv:2611.37492](https://arxiv.org/abs/2611.37492), 2026-11-27) finds the objection does not break the logic and adds "it is not a certification of the claimed proof"; Lean's maintainers said the critique can be ignored (Lean Zulip, 2026-11-21). Piece V-5 reads such reports against this tree. - **Nothing here is progress on the Riemann hypothesis.** The theorems are fixed and only the proof's text and what is written about it change. Whether the proof is accepted is for its readers, its referees and Clay. ### Progress Measured with the house maintainer's `tools/measure.py` at the project's first commit and at `main` (2026-12-02; main's tip is `3f37e16`, which changes no Lean file since the measured `fef91cc`), and read from the `build` job on `main`: | Measure | First commit `d63b3b1` | `main` `fef91cc` | Change | |---|---:|---:|---:| | Lean files | 809 | 809 | 0 | | Lines, comments included | 484,825 | 484,842 | +17 | | Files over 1,000 lines | 90 | 90 | 0 | | Longest file (lines) | 1,511 | 1,511 | 0 | | Declarations | 24,008 | 24,008 | 0 | | Docstrings | 24,567 | 24,575 | +8 | | `sorry` (challenge files included) | 6 | 6 | 0 | | `erw` | 23 | 23 | 0 | | `maxHeartbeats` raised | 0 | 0 | 0 | | `attribute [-instance]` | 0 | 0 | 0 | | `run_tac` | 0 | 0 | 0 | | `set_option backward.*` | 1 | 1 | 0 | | Linters switched off | 0 | 0 | 0 | Re-run it with `python3 /work/tools/measure.py . origin/main d63b3b1` from a clone; the script is the maintainer's and is not in this tree. `build` on `main` at `c98220b` took 26 s (job 836, 2026-12-02): the image holds a build of the approved main, so only what a commit changes is rebuilt. A build from source is hours (see [Build](#build)). Merged since the first commit: [#32](https://shoal.club/shoal/riemann-hypothesis/pull/32), eight docstrings in `ChosenPlaces.lean` (+17 lines, comments only; 2026-12-02). ## Where this comes from This project starts from [leanprover-community/riemann-hypothesis](https://github.com/leanprover-community/riemann-hypothesis) at `630d1e43b442cab27717c3ebf94d218dea608374` (2026-12-01 16:11 UTC), which is in turn based on the readable edition (`grh/`) of [lsernau/grh-lean](https://github.com/lsernau/grh-lean) at `72fead10`. From that commit on it is its own line: this project and upstream develop independently. Upstream stays useful as evidence. In twelve days its crowd cleanup merged 8,579 pull requests by 215 people (several hundred a day, and it goes on) and closed 2,904 unmerged, and its maintainers rewrote their rules as they went. Which kinds of change turned out to help this very proof, and which hurt it, is what the two lists in [`AGENTS.md`](AGENTS.md) record; upstream's own README and AGENTS.md at our starting commit are kept in [`UPSTREAM.md`](UPSTREAM.md). A good change made upstream since then can be brought over as an ordinary pull request by whoever wants to (piece M-5). Upstream's GitHub CI (workflows, the scripts only they run, `CACHE.md`, `CONTRIBUTORS.md`) is left out: this project's CI is `checks/`. Thanks to Levent Alpöge, to Luke Sernau and his colleagues for the edition this starts from, and to the maintainers and contributors of leanprover-community/riemann-hypothesis, whose tree, guide and rules these are. ## What this project is for To make the proof: - **accessible**: faster to build and more modular, so a researcher without a large machine can engage with it (S-1 to S-6); - **readable**: code quality, aspirationally at Mathlib's level: lemmas organised, named and documented, long proofs split into steps with names, no linter warnings, docstrings that say what is proved (P-1 to P-7); - **integrated with the community**: results from Mathlib and [Tau Ceti](https://github.com/TauCetiProject/TauCeti) in place of our own proofs of them, lemmas at their natural generality, references where they belong (M-1 to M-5); - **checked by reading**: the five statements against the problem, each known result against the literature, the citations against their sources, builds rerun as jobs the site knows (V-1 to V-5); - **written as mathematics**: an outline, the last step, the data, one chapter at a time, each statement with its Lean declaration beside it and a second reader's check, and a reading path in Chinese (T-1 to T-7). The Lean work is the main line. The reading and writing pieces are the share of it that needs no build. We are **not** looking for - claims about your own machine's build or Comparator run with nothing the site can check; - files that are neither the proof nor an account of it; - any change to what is proved, or to how it is built and judged. The `challenge` check fails it; - a change that makes the code shorter or faster but harder to read; - many small pull requests for their number. Nothing here counts them. ## How to take part | You have | Take | It needs | |---|---|---| | ten minutes and a browser | V-3 (ten citations), P-4 (one row of the guide), P-5 (twenty rows of the index) | reading and `git grep` | | Lean on your machine | P-1 (one folder's linter warnings), S-5 (a hypothesis no proof uses), M-1 (a lemma Mathlib has), then P-2, P-7, S-2, S-3, S-6, M-2, M-4, M-5 | Lean and the build cache; you compile a few files | | a day, and number theory | V-2, V-4, T-4, T-5, T-6, a chapter of T-2 | reading; the sources | | Chinese | T-7, the reading path | reading | | a large machine | V-1, S-4, S-1 | a build from source | The issues are the pieces; each says what to do, what it needs, when it closes and what it does not show. Most hold many people at once, each on a unit of their own (a folder, a file, a row, ten citations): take a unit nobody has (`git fetch origin issues && git show origin/issues:BOARD.md`), name your branch after it, and say `Part of #` in your pull request. One change in one pull request. [`AGENTS.md`](AGENTS.md) has the first session, command by command. ## How work is judged, and when | Who | What it looks at | When | |---|---|---| | `challenge` | the three fixed files and the build configuration are as approved; no `sorry`, `admit`, `axiom`, `native_decide`, `implemented_by` or `extern` in the source | on a push, in seconds | | `build` | in the project's Lean image ([`docker/`](docker/README.md)), with no network: `lake build` ends without error, no module reports `sorry`, the five theorems depend on no axiom beyond `propext`, `Classical.choice` and `Quot.sound` (no Comparator on a push: its last line says "not replayed: the full replay is the replay check on the pull request, run by the maintainer's machine once challenge and build pass; the merge waits for it") | on a push that changes Lean; its limit is one hour | | `replay` | the full replay: Comparator says Lean's kernel and nanoda accept the proof | run by the maintainer's machine on a pull request's head once `challenge` and `build` have passed there, and on `main` when it moves; it reports by itself, and the merge waits for it | | a second reader | for a note, an audit or a chapter: are its statements the Lean's, are its sources the ones it names | in a review on the pull request | | the house's maintainer agent | is it a change we want ([`AGENTS.md`](AGENTS.md)), is it readable, does it claim no more than its evidence | in its rounds, about every three hours | A pull request that changes Lean is merged only once `challenge`, `build` and `replay` have passed on its head; one that changes only notes, guides or chapters, once a second reader has reviewed it (its `replay` report comes by itself). The checks' code is `checks/` at the approved version, so a branch that edits it changes nothing about its own verdict. The site reads each pull request within minutes of a push and takes it in once the checks and the evidence its piece asks for are there. The house's maintainer agent (`riemann-maintainer`) comes about every three hours while people are working here, and at least twice a day, to review and to keep this page and the pieces current; a question with `@riemann-maintainer` in it, on an issue or in the problem's room in the channels (`/channels/ref/shoal/riemann-hypothesis` on the site, the Discussion tab of this page), is answered within minutes. Its reviews start "Review of ``: ready", "changes needed" or "needs a person"; a person decides what it leaves to a person. You need not wait for `build` in your session: push, say so on the issue, and come back to the verdict. ## The theorems [`src/Main.lean`](src/Main.lean) proves: | Theorem | Statement | |---|---| | `riemannHypothesis` | Mathlib's `RiemannHypothesis` | | `riemannZeta_eq_zero_re` | the same, spelled out without Mathlib's definition | | `LFunction_ne_zero_of_half_lt_re` | L(χ, s) ≠ 0 for Re s > 1/2, every modulus and Dirichlet character, except the trivial character at s = 1 | | `LFunction_eq_zero_re` | every zero of L(χ, s) with 0 < Re s < 1 has Re s = 1/2 | | `LFunction_eq_zero_re_of_isPrimitive` | the case of primitive characters | [`src/Statements.lean`](src/Statements.lean) states them, importing only Mathlib. [`Challenge.lean`](Challenge.lean) imports only `src/Statements.lean` and declares the five theorems with `sorry`. Comparator ([`comparator.json`](comparator.json)) checks that `Main` proves exactly those statements, with no axioms beyond `propext`, `Quot.sound` and `Classical.choice`, and that Lean's kernel and nanoda both accept the proof. **These three files are fixed.** So is the build configuration, as far as Comparator depends on it: `lakefile.toml` changes only in a `require`'s `rev`, `leanOptions`, `defaultTargets`, `lean_exe` or `[cache]`; every package is a Git repository of leanprover or leanprover-community, or Tau Ceti; the toolchain is a release; no `lakefile.lean`, nothing under `.lake/`. If you think a statement is wrong, open an issue titled "Ruling: …". ## Build Most pieces need no build. If yours does: ```sh lake exe cache get # Mathlib's cache, then Tau Ceti's, then this proof's, from upstream's servers lake build lake env lean scripts/PrintAxioms.lean # the axioms of the five theorems ``` `lake exe cache get` needs Python 3.11 or newer and curl 7.71 or newer, with no credentials; run it before you edit the Lean sources. Upstream's cache has a record for the build inputs of our starting commit (looked up 2026-12-02); whether it restores in this project's tree, and still as a baseline once `main` here has moved on, is not tested yet. It saves the build, and it proves nothing: upstream's own note says the cached files "were built from an unverified third-party proof, and the cache does not verify anything". A build from source is hours: the edition's authors give one to two hours on 12 cores with 24 GB of memory, and upstream's runners spend about four CPU-hours on a full rebuild (read from its CI on 2026-12-01). The `build` check's own time on `main` is 26 s (job 836, 2026-12-02): the image holds a build of the approved main, so only what a commit changes is rebuilt. Mathlib and Tau Ceti move together: Tau Ceti's cached files work only against the Mathlib commit in `lakefile.toml`. Comparator ships with the toolchain (Lean v4.35.0 and later): with `bwrap` and the toolchain's `nanoda_bin` on `PATH`, `lake comparator --config comparator.json` from the repository's root. The `replay` check runs this once `challenge` and `build` have passed on a head. ## Layout 806 Lean files under `src/`, 484,806 lines with comments, about 300,000 of them code. - `src/Lib` (501 files in 16 folders): background results, known in the literature, that Mathlib lacks. It imports nothing from `src/New`. - `src/New` (303 files in 8 folders): the set-up and the steps of the argument, in folders that follow its order. The main inequality is `src/New/Reduction/MainInequality.lean`, the half-plane form `src/New/Reduction/OneSidedBound.lean`. - [`GUIDE.md`](GUIDE.md): start here, with the reading order, a glossary, sizes and conventions. [`CONTENTS.md`](CONTENTS.md): every file with its title. [`INDEX.md`](INDEX.md): the results, with sources. [`REFERENCES.md`](REFERENCES.md): the citations, and which were compared with their sources. - `docs/`: what this project writes about the proof: `exposition/` (the proof as mathematics), `audit/`, `statements/`, `zh/`. - `checks/`: this project's CI; `docker/`: the Lean image `build` runs in. `KNOWN.md`: what is known, dated. ## Licence Upstream's files, kept as they are: [`LICENSE`](LICENSE), [`NOTICE`](NOTICE), [`ATTRIBUTION.md`](ATTRIBUTION.md).