arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.30106cs.LO
收藏

Rust到Lean的验证流水线结合AI证明器:经验报告

A Rust-to-Lean Verification Pipeline with AI Provers: An Experience Report

Runtime Verification, Inc.(Runtime Verification 公司)

Natalia Klaus, Juan Conejero, Palina Tolmach

AI总结:

本文描述了一个将生产级Rust加密代码转换为Lean 4中机器验证的正确性证明的流水线,结合符号提取工具、形式化加密规范库和AI证明器,并报告了在zkEVM验证项目中的应用经验。

摘要:

我们描述了一个验证流水线,该流水线将生产级Rust加密代码转换为Lean 4中的机器验证的正确性证明。该流水线结合了三个组件:符号提取工具(Charon和Aeneas,或Hax),将Rust提升到Lean 4;形式化加密规范库(来自Verified zkEVM项目的ArkLib和CompPoly),提供数学目标;以及AI证明器(Harmonic AI的Aristotle和Logical Intelligence的Aleph),用于关闭生成的证明义务。每个证明都由Lean内核检查,因此AI输出不会损害可靠性。在以太坊基金会zkEVM验证项目的范围内,我们将该流水线应用于Plonky3(FRI折叠、Mersenne31和KoalaBear域算术、Horner多项式求值)和RISC Zero(Merkle包含验证)中的加密原语。此外,Aleph为Plonky3的compute_log_arity_for_round中的两个边界风格定理撰写了证明,这些定理之前被标记为sorry。本文描述了架构,通过基于Aleph的两个证明的运行示例进行讲解,报告了AI关闭了哪些类别的证明义务以及哪些需要手动工作,并讨论了我们遇到的工程差距:跨工具的Lean 4工具链漂移以及特定的Aeneas/Hax提取限制。我们还记录了在证明开发过程中发现的具体缺失引理、策略差距和代码生成摩擦点。我们希望这一贡献能降低形式化验证的采用门槛,并促进AI在该流水线中的更有效使用。结果是一个用于Rust形式化验证的工作流水线,具有内核检查的证明和可复现的工件。

英文摘要:

We describe a verification pipeline that takes production Rust cryptographic code and produces machine-checked correctness proofs in Lean 4. The pipeline combines three components: symbolic extraction tools (Charon and Aeneas, or Hax) that lift Rust into Lean 4; formal cryptographic specification libraries (ArkLib and CompPoly, from the Verified zkEVM project) that provide the mathematical targets; and AI provers (Aristotle from Harmonic AI and Aleph from Logical Intelligence) that close the resulting proof obligations. Every proof is checked by the Lean kernel, so AI output cannot compromise soundness. Within the scope of the Ethereum Foundation's zkEVM Verification Project, we applied the pipeline to cryptographic primitives in Plonky3 (FRI folding, Mersenne31 and KoalaBear field arithmetic, Horner polynomial evaluation) and RISC Zero (Merkle inclusion verification). In addition, Aleph authored proofs of two bounds-style theorems in Plonky3's compute_log_arity_for_round that previously stood as sorry. The paper describes the architecture, walks through a running example based on Aleph's two proofs, reports which classes of proof obligations AI closed and which required manual work, and discusses the engineering gaps we encountered: Lean 4 toolchain drift across tools and specific Aeneas/Hax extraction limits. We also document concrete missing lemmas, tactic gaps, and code-generation friction points discovered during proof development. We hope this contribution lowers the barrier to adoption of formal verification and facilitates more effective use of AI in this pipeline. The result is a working pipeline for formal verification of Rust, with kernel-checked proofs and reproducible artefacts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑