A Comparator setup and community build cache for the Lean formalization that claims a proof of the Riemann Hypothesis, and of GRH for Dirichlet L-functions, announced on 2026-11-20 at https://alpo.ge/remark.pdf.
The submitted Lean source is unmodified. This repository adds Comparator files and cache infrastructure:
| File | What it is |
|---|---|
src/Challenge.lean |
the five theorems, stated in a file that imports only Mathlib |
comparator.json |
the Comparator config |
export-targets.txt |
the declarations to export |
verification/ |
our notes, and the results once there are some |
scripts/ |
public Lake cache configuration and reproducible bootstrap/publishing tools |
Fetch and restore Mathlib and this project's compiled modules:
lake exe cache get
lake build --no-buildThe cache settings are in lakefile.toml; no user configuration is needed. The first command
fetches both caches anonymously and extracts the oleans to .lake/build. It prefers a successful
CI build matching the current clean source, configuration, dependency manifest and toolchain;
documentation-only commits can reuse the same cache. Otherwise it tries the original published
cache. The second command checks the default build targets without compiling them. The original
project cache is 4.94 GB and contains portable Lean outputs and generated C. Subsequent ordinary
builds compile changed modules and their dependents.
The community cache includes outputs from untrusted pull requests and volunteer machines. Download integrity checks do not verify proofs. Use an independent fresh build when you need to trust the result.
The cache notes describe the pinned published archive, the cheaper bootstrap that reuses its proofs, and how to produce and publish future caches. For independent verification, follow the clean-build instructions below.
Theorem in Main.lean |
Statement |
|---|---|
riemannHypothesis |
Mathlib's RiemannHypothesis |
riemannZeta_eq_zero_re |
the same, written out |
LFunction_ne_zero_of_half_lt_re |
L(χ, s) ≠ 0 for Re s > 1/2, for every modulus and every 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 same, for primitive characters |
export LEAN_ABORT_ON_PANIC=1 # as Comparator sets it: stop on an internal error, don't continue
export LAKE_ARTIFACT_CACHE=false # rebuild the submission even if cache-env.sh was sourced earlier
export MATHLIB_CACHE_GET_URL=https://cache.mathlib.org/mathlib4 # Mathlib's current cache server
# 1. Export the challenge. Clean clone at $CLEAN, Lean v4.33.1.
cd "$CLEAN"
lake exe mathlib/cache get
lake build Challenge
lake env lean4export Challenge -- $(cat export-targets.txt) > challenge.export
# 2. Build the solution. Second clone, inside a sandbox with no network. Takes hours.
lake exe mathlib/cache get # before entering the sandbox
lake build Main # inside the sandbox
# 3. Export the solution. Still inside the sandbox; only solution.export comes out.
lake env lean4export Main -- $(cat "$CLEAN/export-targets.txt") > solution.export
# 4. Judge. Lean v4.36.0, from an empty directory, with the config from the clean clone.
lake comparator --config "$CLEAN/comparator.json" \
--challenge-from-export "$CLEAN/challenge.export" --solution-from-export solution.exportWhat to know before running it:
- Two Lean versions. The project is pinned to Lean
v4.33.1, andlake comparatorexists only from Lean 4.35. So the proof is built and exported withv4.33.1and judged withv4.36.0. The exporter is lean4export at tagv4.33.0, built with Leanv4.33.1. - Challenge first. Compiling the submission runs its code, so the challenge is exported
where none of that code has been compiled. CI does step 1 on every push and publishes the
result as the
challenge-exportartifact. Its sha256 isbd484ac9886a96f26b1d9a7a59ebd45b7a70d102c015d4f31f9302bbdd6ab2b9. - Not
lake exe cache get. In this repository that command also downloads prebuilt files for the submission itself, andlake build Mainthen compiles nothing. Steps 1 and 2 uselake exe mathlib/cache get, which fetches Mathlib only. - Cost. Hours on a large machine, about 100 GB of disk, and a lot of memory for step 4.
The notes have the details: where the source came from, the Lean version and its known kernel fixes, the tools, the sandboxes, the test of these steps, and the limits of what a passing run shows.
The submission belongs to its author and was published without a license. It is mirrored here unmodified, for verification only.