What a 17M-Line Lean Build Actually Costs
Everyone has seen the headline: a 17-million-line Lean proof of the Riemann Hypothesis. Fewer people have asked the engineering question: what does it cost to build?
I replayed the public archive from a clean worktree on one Apple M4 Max, in a Linux container. The receipt: 114,019 Lake jobs, 9 h 07 m 39 s, 0 errors, 537 GB written.
Five numbers
- 47,885 modules and 494,947 internal imports in the working tree.
- 95.5% of 16 cores busy for the whole build — an average of 15.3 cores.
- 139 core-hours of measured compile work, against about 146 available.
- 464 GB of IR against 73 GB of oleans; 537 GB total.
- 262 modules in the deepest 46-core; the longest chain is 156 modules.
Why the build takes nine hours
Not because the graph is deep. The measured critical path is about 24 minutes. The build is slow because there are 139 core-hours of real compilation work and the scheduler keeps the machine saturated. Median module time is 8.2 seconds; the top 1% of modules account for only 9.9% of compile time. This is a throughput problem, not a hotspot problem.
The storage surprise
The build writes 464 GB into .lake/build/ir. In the repaired subtree, 99.7% of that directory is one .setup.json per module: a manifest of the module's transitive import closure with absolute paths. It is not machine code. The generated C for a proof module is often a few kilobytes.
Five hundred thirty-seven gigabytes over nine hours averages 16.4 MB/s. Disk capacity is a gate; disk bandwidth is not the bottleneck.
What this means
The levers are less work, reused work, or more cores — not a better topological sort. The graph is wide: median degree 10, maximum 4,209, 14.6% of edges cross a namespace. Ollivier–Ricci curvature is an interface detector, not a cost model: 90.9% of edges are negative, and cross-namespace edges are more negative than same-namespace edges.
I wrote the full audit as a 24-page report with a data appendix: the build receipt, the graph, the storage math, the certification ladder, and a reproduction checklist. It is an independent replay, not a new proof.
Get the report · Free 3-page sample
Use code LAUNCH20 for 20% off through December 2, 2026.
Need AI agents for your business?
At The Brainy Guys, we build and deploy production AI agents on dedicated infrastructure.
Learn MoreGet AI & engineering insights
Articles on AI agents, distributed systems, and software architecture. No spam, unsubscribe anytime.
Keep Reading
From Council to Production: Shipping 38 AI Projects in 60 Days
How a multi-agent decision engine — eight proposers, a structured debate, and a judge — picked the projects worth building, and what it actually takes to ship them as production CLIs and FastAPI services.
Bilingual Vertical SaaS for Mexico: What I Learned Building 8 Products in 30 Days
WhatsApp-first onboarding, CFDI 4.0 from day one, and bilingual UX that doesn't feel like a translation layer. Notes from shipping AgroFlow, FloraFlow, FisioFlow, TerapiaFlow, EntrenadorIA, WaFlow, MoreliaBox, and ArtisanFlow.