Runtime Ledger
Lean's kernel checks that proofs about a definition are correct. It does not check that the code runs fast. This ledger lists cases where executable Lean code was accidentally exponential, with the probe that shows it and the status of its fix.
Last updated 2026-11-27. So far every entry is in cslib-frontier. Timings are from one machine, wall time: they show growth, not exact speed.
Entries
One entry is fixed upstream and one fix is in review. Both open entries were reproduced on a second machine (a clean GitHub-hosted Ubuntu runner, run 46087261879), so they are now confirmed. Each will be updated here with the merged pull request's own benchmark.
| # | Definition | Before | After | Before and after on a Log scale | Cause | Status |
|---|---|---|---|---|---|---|
| 1 | programGateLitSemiCircuit/OfCircuit.lean |
345 s 17-gate refuter test |
31 ms | Each gate lookup recomputed every earlier gate. | fixed upstream #8970, merged 2026-11-27 |
|
| 2 | NBP.pathCount / NBP.pathsBranchingProgram/Nondeterministic.lean |
37.8 s ladder, n = 20; about 2.4x per added node |
under 1 ms local measurement of a drafted fix |
Each node's count re-ran its successors' counts. | fix in review Confirmed on a second machine (25.7 s at n = 20). Fix: #9030, opened 2026-11-28. |
|
| 3 | rrvWeakDesignAffineDisperser/Li/LinearStrongExtractor.lean |
23.8 s t = 4; t = 5 over 120 s |
not yet | Stored prefixes are closures that re-run earlier minimisations (by reading the code). | confirmed Reproduced on a second machine (13.4 s at t = 4). Reported in the cslib Zulip; fix planned, not started. |
Raw timings and probe details: docs/scanner-results.md. Probes: tasks/probes. Entry 2: the scanner's probe run measured 40.5 s at n = 20; the drafted fix's own benchmark measured 37.8 s for the unchanged code.
What counts
- The definition is executed by someone: an
#evalor#guardtest, aDecidableinstance used bydecide, or a definition documented as computable. - A probe on a growing input family with a known small answer shows superpolynomial growth. The probe is public and anyone can rerun it.
- The blowup is not part of the specification. Definitions that are exponential by design are not bugs and are not listed.
- Fixes never change statements or proofs. They keep the original definition for proofs and add a faster implementation proved equal to it (
@[csimp]or an equivalent).
Not listed, and why
QueryLearner.answersUpTo (UniformLearning/AdaptiveCircuit.lean) is exponential when executed (q = 8: 399 ms; q = 12: over 120 s), but no executed client was found. It is listed if someone starts running it.
How to report a case
- Open an issue in the Fairtally repo with the definition, who executes it, the probe file and the timing table.
- We rerun the probe on a second machine before an entry is marked confirmed.
- Fixes go upstream in small pull requests that follow the library's own rules, one topic each, with a benchmark. Please do not flood maintainers with unreviewed reports.
No probe of your own yet? Lend compute to the existing ones: see Run a probe, or tell your AI coding agent to Read https://fairtallylabs.com/join.txt and follow it.
AI disclosure
The scanner, probes, fixes and this page are written with Claude agents for Sentria Inc. Every fix pull request says so, a separate reviewer agent checks each one, and the library's CI and maintainers decide what merges. Contributors disclose their own AI use the same way.