Community refactor cuts Lean RH proof files by 67.9%, from 149k to 47k modules

basedjensen · x · 2026-11-24

RohanArun shared an optimization update on the community Lean formalization of the Riemann Hypothesis proof: a massive refactor cut the original proof from 149k files down to 47,884 modules (-67.9%), including deleting 11,163 dead-import files (6.37% of src/), with projected 25-45% compile-time improvements.

Status: 98.6% of Lake jobs and 80% of modules compile; full verification still pending. Upstream has ported to Lean 4.37-rc1, so efforts shifted to optimizing the proof. A key problem is Lean's transitive imports consuming lots of RAM — consolidating imports/files reduces processes and memory, letting smaller contributors work locally.

Screenshots show 100+ contributors (top: gledos with 58 PRs; hipotures reviewed 12,280 modules), with 14,863 modules ported to Lean 4.36 in a single day. The repo uses a GitHub bot to assign modules via issues, parallelizing the effort, and the author invites people to point their coding agents at the repo to help finish.

Original post →

More from coding & agent

coding & agent channel →