RH proof size unofficial

leanprover-community/riemann-hypothesis · polled every 15 min
of the original code lines left

Relative to the original

Commits, newest first
Code lines added or removed by each commit that changes them
How it's measured

Text search, not Lean. All numbers come from plain text search, with Python regular expressions, over the .lean files as stored in git (collect.py). Lean is never run and nothing is elaborated.

There is one data point per commit on main; a merged pull request counts as one commit, not as the commits it contains. A GitHub Action checks for new commits every 15 minutes.

Total lines
lines of the .lean files under src/, including blank lines and comments
Code lines
total lines, without blank lines and lines that are only comments (--, nested /- -/)
Theorems
code lines starting with theorem or lemma, also after attributes and modifiers such as @[simp] private
Other declarations
code lines starting with def, abbrev, instance, structure, inductive, class, opaque or axiom, likewise
Declarations
theorems and other declarations
Files
.lean files under src/
Folders
the folders directly in src/, each with everything below it; the files directly in src/ are one more group
Import statements
import statements (also public import, meta import), counted as code lines starting with one, assuming the usual one import per line
Repeated theorem statements
theorems and lemmas whose statement (from after the name up to :=, white space aside, at least 30 characters) is word for word that of another theorem, counting the copies beyond the first. The same text can mean different things in different namespaces, which is why Mathlib has some too
maxHeartbeats overrides
set_option maxHeartbeats, which gives a proof more time than Lean's default
omega and nlinarith
uses of these two tactics, which settle arithmetic by brute force
Declaration lengths
code lines from a declaration to the next one in its file, or to the end of the file
Modules, imports
in the pictures of the imports: the .lean files under src/, and the modules of the project their import statements name (imports of Mathlib and other dependencies are left out)
Mathlib
for comparison, the version of Oct 13, 2026 (56a0058): its modules under Mathlib/ and the imports between them, measured the same way
Ideal build
a simulated build on as many cores as needed: every module starts as soon as all modules it imports are built, and takes time in proportion to its code lines. That is an assumption: how long Lean takes depends mostly on the proofs, which text search cannot tell. The fastest such build takes as long as the longest chain of modules that each import the next, in code lines; all the other modules can be built beside it

Because this is text search, declarations generated by commands or macros are missed.