Lean is a proof assistant—a software tool used by mathematicians and computer scientists to write and verify complex logical proofs. At its core is a 'kernel,' the foundational piece of code that determines whether a proof is valid. Because these kernels are critical to the integrity of the entire system, any bug in the kernel's implementation could allow an incorrect proof to be accepted as true. Leonardo de Moura, co-founder of the Lean FRO, announced that Lean v4.35.0 now ships with several new kernels to address the increasing effectiveness of AI agents at identifying vulnerabilities in such software.

Portrait of Leonardo de Moura, co-founder of the Lean FRO.
Leonardo de Moura, who announced the release of Lean v4.35.0 and its new verified kernels.leodemoura.github.io

Leonardo de Moura is the co-founder of the Lean FRO and the primary figure announcing these security updates.

One of the primary additions is 'con-leche,' the first kernel for Lean written in Lean itself and proven consistent. Consistency in this context means that every environment the kernel accepts has a corresponding model in set theory. By using a kernel written in the language it is meant to verify, the developers aim to eliminate a class of bugs caused by programming mistakes in the kernel's implementation. To further mitigate risks from the compiler or runtime environments used to build the software, the team also introduced 'con-ron.' This kernel was created by using AI to translate the con-leche logic into Rust, which was then verified using Aeneas, a tool that proves Rust code refines the checking algorithm. By checking a proof against both con-leche and con-ron, users can gain a high level of protection against bugs that might exist in one environment but not the other.

While these verified kernels provide a significant security upgrade, the Lean team acknowledges that scalability remains a challenge. As the community grows and libraries like Mathlib expand into the millions of lines of code, the current method of rechecking developments with external kernels may become inefficient. The team is currently exploring binary export formats and incremental checking to handle massive developments, such as those exceeding 100 million lines of code. In the meantime, users can utilize the new `lake check --paranoid` command, which runs a variant of the official kernel built with a hardened memory allocator to turn potential memory corruption into a checked abort rather than a silent error. editorial.evidence_sufficient: true,