Lean v4.35.0 增加多内核交叉检查功能
Lean v4.35.0 新增 `lake check` 命令,可导出开发项目,并在沙箱中用官方 `leanchecker` 重新检查。该版本加入 nanoda、lean4lean、con-leche 和 con-ron 四套内核。`--paranoid` 模式会运行这四套内核,以及一个使用强化内存分配器构建的官方内核变体;该变体会把内存损坏转为受检中止,而不是静默返回错误结果。Lean FRO 表示,Claude(Fable 和 Opus)在 Joachim Breitner 的监督下实现了 con-leche 及其一致性证明。AI 还被用于将 con-leche 翻译为 Rust,形成 con-ron;Aeneas 证明了该版本精化了 con-leche 的检查算法。Lean FRO 当时预计 lean4lean 的验证将在随后数月内完成。
此次发布让 Lean 开发者可以使用内置工具,通过多套外部内核重新检查项目并比较结果。采用强化内存分配器的官方内核变体可防范内存损坏;Lean FRO 还表示,同时使用 con-leche 和 con-ron 检查,可大幅降低 Lean 编译器与运行时共同存在实现缺陷所带来的风险。报告同时指出,可扩展性仍是主要限制,因为现有外部内核方案无法扩展到规模最大的开发项目。
2026-10-15
AI agents are very effective at finding vulnerabilities in our software. This includes the kernel (the proof checker) of the Lean proof assistant. See our two recent postmortems (August 1, August 24). We are strengthening the official kernel, adding new kernels, and building new tools that simplify rechecking your Lean developments with external kernels. Lean v4.35.0 comes with the lake check command. This command exports your development and rechecks it with leanchecker, the official Lean kernel without all the baggage around it. The whole process runs inside a sandbox. You can disable the sandbox using lake check --inadvisably-no-sandbox. Lean now ships with four additional kernels: nanoda, lean4lean, con-leche, and con-ron. You can recheck your development with all of them using the command lake check --paranoid. In this mode, we also run a variant of the official kernel built with a hardened memory allocator, which turns memory corruption into a checked abort instead of a silently wrong answer.
Con-leche is the first kernel for Lean written in Lean and proven consistent. 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 idea is written up here. The proof itself is checked by the official Lean kernel, and it assumes the consistency of the set theory used in the model. This approach eliminates a complete class of bugs: programming mistakes in the kernel implementation. It does so without a performance penalty. On the full Mathlib export, con-leche executes 0.69x the instructions of the official kernel and checks the whole library in about 100 seconds using eight threads (see PERF.md).
#Lean v4.35.0#Lean FRO#Claude#Aeneas#Mathlib#nanoda#lean4lean#con-leche#con-ron