Aether / Rigor
Rigor
An independent proof checker for Lean 4, written in safe Rust. It re-checks every definition and theorem that Lean exports, so a proof is trusted only if a second, small kernel agrees.
forbid(unsafe_code), no dependenciesTry the real kernel
The same kernel and parser, compiled to WebAssembly, run below on Lean's Init.Prelude export (1,840 declarations; 570 KB download). Checking runs in a background worker on one thread. Tamper gives one theorem another theorem's proof; the kernel must refuse it.
Your own file: run lake exe lean4export YourModule > out.ndjson (lean4export 3.x, NDJSON). It is read in this page only. Large libraries are faster with the native, multi-threaded build.
Measured against leanchecker
Lean v4.36.0-rc1 exports, Apple M4 MacBook Air, leanchecker --fresh against rigor-bench --check. Peak resident memory from /usr/bin/time -l. Rigor’s times include parsing the text export (332 MB for Init, 532 MB for Std); leanchecker reads compiled .olean files.
| Library | Declarations | leanchecker | Rigor, parallel | Rigor, one thread |
|---|---|---|---|---|
| Init | 58,546 | 28.7 s · 547 MB | 7.8 s · 478 MB | 25.1 s · 404 MB |
| Std | 96,626 | 44.2 s · 928 MB | 11.9 s · 696 MB | 44.9 s · 567 MB |
How it stays trustworthy
- Small, auditable kernel. Type inference, definitional equality and the inductive-type checker fit in about 2,600 lines of Rust with
#![forbid(unsafe_code)]and zero third-party crates. Recursors are regenerated and checked, never taken from the export. - Lean's rules, not shortcuts. Large elimination, proof irrelevance, eta for functions and structures, unit-like types,
Natand string literals andeagerReducefollow Lean's own kernel. - Mutation testing. Exports are corrupted on purpose (swapped proofs, changed universes, broken definitions, altered inductive types) and re-checked. Across eight rounds and 1,608 mutants, every change that alters meaning was rejected; the few accepted ones were provably harmless (for example
outParamvssemiOutParam, which are the same function). - Fast without trusting more. Hash-consed expressions in 16-byte nodes, cached reduction and parallel checking of independent declarations; none of it adds rules to the kernel.
Source on GitHub · MIT license.