CocoSgt/riemann-hypothesis-lean
Learning ResourcesA mirror of a claimed Lean 4 formalization of the Riemann and Generalized Riemann Hypotheses, for readers who want to build and check it.
What this repository is
This is an unmodified mirror of Lean code published by mathematician Levent Alpöge, who announced on 2026-11-20 that he had, working with Claude, found a proof of the Riemann Hypothesis extending to the Generalized Riemann Hypothesis for Dirichlet L-functions, fully formalized in Lean without assumptions. The mirror exists so people and agents can browse, clone and check the code; all credit belongs to Alpöge. The README explicitly states that as of mirroring no independent build or review had been published, so the result should be treated as a claimed proof until compiled and checked.
The targets are short. src/Main.lean states five theorems, including riemannHypothesis, built on Mathlib's own RiemannHypothesis definition at the pinned commit; src/Statements.lean defines the other four statements. The proof terms live under src/Supplements/Kernels/MainTheorems.lean. The codebase is enormous — roughly 175,000 Lean files and about 17.4 million lines — dominated by src/Development/.
Getting the code
The repository is about 234 MB packed and 1.3 GB checked out, so a shallow clone is the fastest route:
git clone --depth 1 https://github.com/CocoSgt/riemann-hypothesis-lean.git
cd riemann-hypothesis-lean
Alternatives are a merged archive in the v2026-11-20 release, checked against the published SHA-256, or the author's original 14-part archive at alpo.ge, which the README recommends when provenance matters most. The repository's src/ tree is byte-for-byte the content of that archive; only the README and .gitignore were added.
Building and checking
The toolchain is leanprover/lean4:v4.33.1, and Mathlib is pinned in the manifest. After installing elan and loading its environment, fetch the prebuilt Mathlib cache and build in stages:
lake exe cache get
lake build Statements
lake build Main
lake build Statements is a quick sanity check; lake build Main builds the full dependency tree of the main theorems and is a very large build. No build time or memory figures have been published, so use a high-core, high-RAM machine and expect a long run. Building with no target compiles more than Main needs.
After Main builds, the README suggests creating a Check.lean in the project root that imports Main and runs #print axioms on the main theorems, then executing lake env lean Check.lean. A clean output lists only propext, Classical.choice and Quot.sound; anything else (sorryAx, a custom axiom) means the proof depends on something unproved. An independent kernel replay with lean4checker is recommended so the result does not rest on the elaborator or repository metaprograms. The README also reports a static text scan at mirroring time finding no sorry, admit, axiom declarations or native_decide, but notes the scan is not a substitute for the build and axiom check.
Constraints
- This is an unverified mirror: by the README's own statement, no independent build or review had been published as of 2026-11-20.
- The archive is very large; cloning and building need substantial disk, memory and time.
- The original code was published without a stated license, and the mirror adds none, so redistribution terms are unclear.
- The
RiemannHypothesisstatement depends on Mathlib at a specific pinned commit; statement review should use that commit.
HotRepo's take
HotRepo records the repository only once, in the new-projects list on 2026-11-20, with 108 stars and 20 forks gained over roughly 2.3 hours since its creation window began. That is a single short snapshot, not a trend, and the project had no daily ranking record. What stands out is the scale mismatch: a 17-million-line claimed formalization appeared and was mirrored in a day, with the README itself flagging that no independent verification existed. Readers drawn by the announcement should treat star count as attention, not evidence, and start from lake build Main plus #print axioms rather than from the headline.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
You might also like
- Deicyde/riemann-hypothesisA byte-exact Lean submission and Comparator setup for independently checking a claimed proof of the Riemann Hypothesis.
- tristanbuckmaster/navier-stokesA paper and Lean 4 formalization of finite-time blow-up for the Navier–Stokes equations, aimed at mathematicians and proof engineers.