9 minute read

November 25, 2026 — bigsnarfdude

Lab notebook · one lake build of 175,187 Lean files · a 24-thread desktop, no network, 17.5 hours · every compiled file byte-identical to a reference build · then the two short versions, readable and compact, each built and checked end to end in under an hour.


Scope. For the original 17-million-line proof, this is not a check. The Lean FRO and the Mathlib Initiative certified it on November 21, after the exported proof went through Lean’s kernel, con-leche, con-ron and several independent checkers. What I did with it is a build: evidence that the source compiles the same way on ordinary hardware. The export that would let me check it myself ran out of memory at 75%. For the two much smaller versions that appeared on November 25, readable and compact, I did run the full check, and both passed. All of it is below.

On November 20 Levent Alpöge released a Lean proof of the Riemann Hypothesis and of GRH for Dirichlet L-functions: fourteen archive parts on his site, unpacking to 175,187 .lean files and about 17 million lines. Within a day the Lean and Mathlib communities had checked it. By the 24th it had a Polymath project aimed at the harder question of what the proof actually says.

Everyone who wants to read this thing seriously will at some point want to build it. The reference builds I could find ran on a 192-core EPYC and on a 48-core machine with 503 GB of RAM. I wanted to know what it takes on the box under my desk.

The machine

The machine is an Intel i7-13700K (24 threads) with 64 GB of RAM and a 4070 Ti Super. The GPU did nothing; Lean compiles on the CPU. 671 GB of disk was free at the end.

The source

The archive came from the author’s site. Joined, it hashes to 9631b4f0…49c7fc, the value recorded in the community repo’s verification notes. Lean v4.33.1, Mathlib pinned at 0df444a3. Dependencies were fetched once, with network, before anything from the submission ran.

The sandbox

Compiling a Lean file runs its code, and this is 17 million lines nobody had read a week ago. So the build ran in Docker:

docker run --rm --network none --read-only --tmpfs /tmp:rw,size=16g \
  --user $(id -u):$(id -g) --security-opt no-new-privileges --cap-drop all \
  --memory 56g \
  -v <workdir>:<reference-home>:rw \
  -v <lean-v4.33.1-toolchain>:/opt/lean:ro \
  -w <reference-build-path> <sandbox-image> ...

No network (the script inside checks it can’t resolve github.com and aborts if it can), read-only root, all capabilities dropped, the toolchain read-only. The image is debian:trixie-slim plus git, ca-certificates, procps and curl.

The odd-looking part is the mount point. Inside the container the project lives at exactly the absolute path where Andrew Sutherland built it, because I wanted to compare against his build file by file. That only works at the same path.

Why the path matters

Lean 4.33.1 stores each linter message in the compiled .olean, together with the source file’s absolute path, so lake lint can read it back later. Lake hands lean an absolute path. So any module that triggers a linter warning carries its build directory inside its compiled output, and any module that doesn’t, doesn’t.

This project triggers a lot of linter warnings. One build at a different path (ishaan2006’s) matched Sutherland’s checksums on 76,968 files and differed on 98,219, every one of which contained its own path. The proof export doesn’t care, because lean4export writes declarations and the lint log isn’t one. But if you want to compare the compiled files themselves, you build where he built.

Two things that would have gone wrong

A terabyte of setup files. Lake writes a .setup.json per module listing its whole import closure. Here they average about 6 MB, which over 175,187 modules is roughly a terabyte. A module’s file is dead once that module is built, so a loop inside the container deletes each one as soon as its .trace is newer. One was left at the end.

Silent stalls. A build this long can hang without dying. A watchdog kills lake if no new .olean appears for 30 minutes, and a driver outside the container restarts the build up to 12 times. Lake resumes from what’s already built, so a restart doesn’t start over.

Neither safety net was needed. The watchdog never fired.

The run

driver start         2026-11-24T21:18:54Z  oleans=836
attempt 1 exit=0     2026-11-25T14:49:00Z  oleans=175187  disk_free=671G
BUILD DONE           2026-11-25T14:49:00Z

One attempt, 17 hours 30 minutes, 183,893 Lake jobs, Build completed successfully. No errors in a 177 MB log; the warnings are linter noise (haveI where have would do, tactics that never run). The 836 .olean files at the start came from a short smoke build of one library. The build directory ended at 106 GB.

For scale: Sutherland’s sandboxed rebuild on 192 cores took about eight hours including restarts, and the community notes estimate 7 to 10 hours on 48 cores.

The comparison

Sutherland posts two checksum lists at math.mit.edu/~drew/grh/: one from his original build, one from a later sandboxed lake build at the same path. The original list hashes to 375cbee2…4c1d25, the value cited in the community notes, so I know I have the same file.

local oleans: 175187 built, 175187 in manifest, 0 not yet built
identical to original build: 175187; differing: 0

Every compiled file is byte-identical to his original build. That includes LocModel.olean, the one file that differed in his own sandboxed rebuild (175,186 of 175,187). So whatever made that file wobble didn’t happen here.

Separately, the challenge export (the five statements, compiled against Mathlib alone) hashes to bd484ac9…6ab2b9, the value the community repo gives.

What this shows, and what it doesn’t

It shows that the released source, built with no network on a different machine under a different sandbox (Docker rather than bubblewrap), produces exactly the files Sutherland’s build produced. Nothing in the build depended on something outside the sandbox, and nothing came out different.

It doesn’t show the proof is correct. A successful build means the 4.33.1 kernel accepted everything as it compiled, which the community notes rightly call limited evidence on its own. The actual check is the export judged by independent checkers, and the community has done that.

Where a desktop stops

The next step is exporting the proof for the checkers. On Sutherland’s run the exporter peaked at 163 GB of memory and produced a 61.6 GB file. I tried anyway, with the same v4.33.0 exporter he used (binary hash identical), in the same sandbox, capped at 58 GB, to see how far it would get.

start   2026-11-25T17:53:13Z
killed  2026-11-26T02:32:27Z  exit 137 (cgroup OOM)
written 46,317,195,264 of 61,570,595,788 bytes  (75%)

Eight and a half hours in, 75% of the way through, the exporter’s own memory jumped by about 12 GB between two of my one-minute samples and the kernel killed it at 58.8 GB. Its file-backed memory (the memory-mapped .oleans) was never the problem; the exporter’s working set just keeps growing.

So for anyone joining the Polymath effort with ordinary hardware: the original’s build fits on a 64 GB desktop overnight, within a 56 GB container cap. Exporting it doesn’t. Checking the original yourself needs a machine with something like 256 GB, or trusting the checkers that already ran.

The second proof

On November 25 a much shorter version turned up: lsernau/grh-lean, 803 .lean files and 477,124 lines against the original’s 175,187 files and 17 million. Its Main.lean opens with “The proof is Levent Alpöge’s, with Claude.” The community repository switched over to it that evening, and it has since taken hundreds of pull requests; I checked its first commit, 72fead1, on Lean v4.35.0 and Mathlib 56a00585.

Same machine, same Docker sandbox, same in-container network check:

build    2026-11-26T03:19:38Z → 03:35:29Z   15m51s, 9,852 jobs, 0 errors, no sorry
export   solution 4.49 GB (2m15s), challenge 355 MB (14s)
nanoda   Checked 222121 declarations with no typechecker errors
lake comparator
         statements match, axioms OK
         nanoda kernel accepts the solution
         Lean default kernel accepts the solution
         Your solution is okay!

The container’s peak memory for the whole check was 16.7 GB. The five theorems (riemannHypothesis and four GRH forms for Dirichlet L-functions) use only propext, Quot.sound and Classical.choice.

lake comparator is the tool that compares a challenge file (the statements with sorry) against the solution, checks the axioms, and replays the whole export through Lean’s kernel and an independent one (nanoda). Two notes on how I ran it:

  • No bubblewrap. Comparator wants to sandbox the exporter with bwrap, which my machine doesn’t have, so I passed --inadvisably-no-sandbox and ran everything inside the same --network none Docker container instead. It prints “this run is not trustworthy” because it can’t see the outer sandbox.
  • Export the full target list. My first exports contained just the five theorems, and comparator stopped with Const not found in challenge 'String.mk'. Lake also exports the Quot builtins, the permitted axioms and 28 kernel primitives (Nat.add, String.mk, …) so it can check the solution didn’t redefine them. With Lake’s exact list the check went through.

What does comparator’s “statements match” actually guarantee? That the solution proves the same statements as the challenge file. But the challenge imports Statements.lean from the same repository, so it’s worth reading. The main theorem is riemannHypothesis : RiemannHypothesis, and that is Mathlib’s own definition, not one from this repository. The four GRH statements are defined locally; they read as stated (zeros of L(s, χ) with 0 < Re s < 1 lie on Re s = ½, for every Dirichlet character, and no zeros with Re s > ½, with s = 1 excluded for the trivial character, whose L-function has a pole there). The lower bound 0 < Re s matters: imprimitive characters have extra zeros on Re s = 0, and leaving it out would make the statement false.

So this one I can say plainly: on a desktop, in a sandbox, the readable proof builds, exports, and passes both kernels and the statement and axiom checks.

The compact version

The same commit carries a third version in its own folder: 796 files and 112,854 lines by my count, under a quarter of the readable version’s length. It pins the same Lean and Mathlib, and its Statements.lean, Challenge.lean and comparator.json are byte-identical to the readable version’s. I ran the identical pipeline on it:

build       9,843 jobs, 0 errors, 18m44s
axioms      all five: [propext, Classical.choice, Quot.sound]
nanoda      Checked 209643 declarations with no typechecker errors
comparator  nanoda kernel accepts the solution
            Lean default kernel accepts the solution
            Your solution is okay!

Start to finish took 54 minutes. The container peaked at 27.4 GB, with the process itself at 13.6 GB. The challenge export hashes to the same 20eb99a0… as the readable version’s, so both proofs were checked against byte-for-byte the same five statements.

One surprise: fewer lines didn’t mean less work. The compact solution export is 5.17 GB against the readable version’s 4.49 GB, and its build and kernel replay both took longer. It also has fewer declarations (209,643 against 222,121), so each one is larger on average. My guess is denser proofs that leave more for Lean’s automation to work out, but I haven’t checked that.

  original readable compact
.lean files 175,187 803 796
lines ~17 million 477,124 112,854
build here 17h30m 15m51s 18m44s
solution export 61.6 GB (Sutherland’s) 4.49 GB 5.17 GB
checked here no, export ran out of memory yes yes

Files

I kept everything from the runs: build logs, timelines, checksum lists, memory logs, the exports and the comparator output. The sandbox, driver and watchdog are a few short shell scripts.