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

📅 2026-05-28
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of achieving efficient and reliable formal verification of production-grade cryptographic code written in Rust. We present the first end-to-end Rust-to-Lean 4 verification pipeline, integrating the Charon, Aeneas, and Hax frameworks for symbolic extraction, leveraging the ArkLib and CompPoly libraries of formally specified cryptographic primitives, and introducing the Aristotle and Aleph AI-powered provers to automatically discharge complex proof obligations. All results are rigorously validated by the Lean 4 kernel. Our approach successfully reproduces and fully verifies key cryptographic primitives from Plonky3 and RISC Zero—including FRI folding, finite field arithmetic, Horner evaluation, and Merkle inclusion proofs—and automatically completes proofs for two longstanding open conjectures.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

formal verification
Rust
Lean 4
cryptographic code
correctness proofs
Innovation

Methods, ideas, or system contributions that make the work stand out.

Rust-to-Lean verification
AI theorem proving
formal verification
symbolic extraction
zkEVM
🔎 Similar Papers
N
Natalia Klaus
Runtime Verification, Inc.
Palina Tolmach
Palina Tolmach
Nanyang Technological University
J
Juan Conejero
Runtime Verification, Inc.