Skip to content
Case study · Formal verification

The Riemann Hypothesis Replay

A 17.4M-line Lean 4 proof, rebuilt from source and measured.

This is not a new proof. It is an independent replay of the Alpöge–Claude formalization: a clean build, a dependency graph, storage economics, and the certification ladder. The numbers come from the build log, the source graph, and the exported proof — not from estimates.

← Back to selected projects
Dependency graph of the Riemann Hypothesis formalization
17.4M
lines
114,019
build jobs
9 h 07 m
wall clock
0
errors
494,947
imports
95.5%
core utilization
537 GB
written
262
modules in the 46-core

What I did

  • Rebuilt the archive from a clean worktree with a pinned Lean 4 toolchain on an Apple M4 Max.
  • Parsed every Lake build line into a per-module timeline: 47,881 records with start and end clocks.
  • Parsed 494,947 internal imports into a DAG; measured degree, depth, k-core, namespaces, and Ollivier–Ricci curvature.
  • Documented the storage amplification: 464 GB of IR against 73 GB of oleans, and the per-module setup manifest behind it.
  • Built the certification ladder — clean build → export → comparator → con-leche → leanchecker — and reported each stage separately.

What the numbers show

  • The build is throughput-bound, not depth-bound: 139 core-hours of work, 15.3 of 16 cores busy, and a ~24-minute critical path.
  • Storage is a capacity gate, not a bandwidth bottleneck: 537 GB over nine hours averages 16.4 MB/s.
  • The graph is wide: median degree 10, maximum 4,209, and a 46-core of 262 modules.
  • 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.
  • Instance debt and duplicates are generator-level problems: 18,815 instance disables and 444 strict near-duplicates.

Certification status

The original proof was certified by the Lean FRO and Mathlib Initiative on 2026-11-21: statement, compile, comparator/con-leche, and independent kernel checks. The replay's build is green; its solution export and later stages were still running when this page was written. The page does not claim a replay certificate it does not have.

Read and verify