Lean Now Ships With Verified Kernels
Lean, the proof assistant developed by Leonardo de Moura and the Lean FRO, has shipped version 4.35.0 with four additional verified kernels. The release is a direct response to a modern problem: AI agents are now effective at finding vulnerabilities in software, including the kernel of a proof assistant. Two recent postmortems (August 1 and August 24) documented kernel bugs discovered this way. The fix is not to patch harder, but to verify the verifier.
The Problem: Who Checks the Checker?
A proof assistant like Lean has a kernel that checks whether a given proof is valid. Everything else, the tactics, the automation, the user-facing tools, depends on trusting that kernel. If the kernel has a soundness bug, it could accept a proof of False, and from there you can prove anything. The entire tower of verified mathematics and software collapses.
Lean's kernel is written in C++. It is well-tested, but testing is not proving. AI agents have recently demonstrated an uncanny ability to find edge cases in it. This is not a hypothetical risk. The two postmortems from August were real bugs found by real AI systems probing the kernel.
Four New Kernels
Lean 4.35.0 ships with four additional kernels alongside the official one:
nanoda, a minimal kernel implementation.
lean4lean, a kernel that closely follows the official C++ implementation, currently being verified (expected complete in the next few months).
con-leche, the first kernel for Lean written in Lean and proven consistent.
con-ron, a Rust translation of con-leche, verified with Aeneas.
The flagship is con-leche. It was implemented and proven consistent by Claude (Fable and Opus), under heavy supervision by Joachim Breitner at the Lean FRO. "Consistent" here means that every environment con-leche accepts has a model in set theory, following Mario Carneiro's model of Lean's type theory. The proof itself is checked by the official Lean kernel, and it assumes the consistency of the set theory used in the model. This is as close to bedrock as you can get without circularity.
From Lean to Rust to Proven Correct
Con-leche eliminates an entire class of bugs, programming mistakes in the kernel implementation, without a performance penalty. On the full Mathlib export, it executes 0.69x the instructions of the official kernel and checks the whole library in about 100 seconds using eight threads.
But con-leche is not bulletproof. It runs on Lean's compiler and runtime, which could themselves have bugs. To address this, Joachim Breitner used AI to translate con-leche to Rust, then used Aeneas, a tool for verifying Rust code using Lean, to prove that the Rust version refines con-leche's checking algorithm. The result is con-ron. The key insight: it is very unlikely that the same bug exists in both Lean's compiler/runtime and the Rust compiler/runtime. By checking a proof with both con-leche and con-ron, you gain a high level of protection against this class of bugs.
lake check, and the Paranoid Mode
The new lake check command exports your development and rechecks it with leanchecker, the official Lean kernel without the surrounding tooling. The whole process runs inside a sandbox. You can disable the sandbox with lake check --inadvisably-no-sandbox if you enjoy living dangerously.
For those who want maximum assurance, lake check --paranoid rechecks your development with all four additional kernels, plus a variant of the official kernel built with a hardened memory allocator that turns memory corruption into a checked abort instead of a silently wrong answer.
Why This Matters
Proof assistants are increasingly used to verify critical software, including distributed systems, compilers, and cryptographic protocols. Anthropic's Fermat's Last Theorem proof is over 13 million lines of code. Mathlib, Lean's mathematical library, is 2.5 million lines. Tau Ceti, a formalisation project, is already over 3 million and growing fast. At that scale, a single soundness bug in the kernel could invalidate years of work.
The response from the Lean team is notable for its honesty. Rather than downplaying the AI-discovered bugs, they embraced the finding and built infrastructure to prevent the entire class of problem. Four independent kernels, one proven consistent, one translated to Rust and verified, all runnable with a single command. This is how you harden a system that millions of lines of mathematics depend on.
There is still work to do. The team wants a more user-friendly lake check, the ability to hook in third-party kernels, verification of parts of the compiler, and solutions to the scalability challenge. But the direction is right. When the tools that find your bugs are also the tools that help you fix them, you have a virtuous cycle. Lean is betting on it.