AI & Formal Verification
Lean-backed Rust verifier solves nearly all proofs in major programming benchmark
A new proof-generation system based on Lean 4 successfully verified 1,259 formal proofs from a 1,007-problem competitive programming benchmark, vastly outperforming earlier AI approaches.
Researchers have developed Rust-Prover, a formal verification system that tackles proof generation—a major bottleneck in AI-assisted program verification. The system converts Rust code and specifications into theorems in Lean 4, then uses large language models to construct proofs that are checked by Lean's kernel. On the VeriContest benchmark, the approach achieved near-complete coverage while remaining remarkably cost-effective.
The Challenge#
VeriContest consists of 1,007 competitive programming problems written in Rust, each paired with a Verus specification and formal proof. According to the benchmark's creators, even the best frontier models struggle with this task: they generate accepted proofs for only about 13.95% of problems on a first attempt. Proof generation has emerged as a critical bottleneck in scaling formal verification through AI.
Results at Scale#
Using Claude Opus 5.5, researchers proved all 1,325 theorems across the entire benchmark. Of these, 1,259 proofs were completed in a single continuous run lasting under 32 hours—a median of 3.2 minutes per proof at a cost of $1.17 per proof. Remarkably, 70% succeeded on the first iteration without revision. The translated Lean programs ran against 21,413 test cases from the benchmark's suite, matching the output of the original Rust implementations exactly in every case.
The restated specifications were validated against existing test suites and manually reviewed where no automated tests existed. No specifications were found to be incorrect or weakened during translation.
Scaling Across Models#
Testing spanned eight models—four from Claude and four from OpenAI—across five reasoning-effort levels. The study found that every current frontier model successfully proves nearly every theorem in a representative ten-theorem sample, regardless of effort setting. Counterintuitively, increased reasoning effort typically raised costs without improving proof success rates.
Even Claude Sonnet 5.5 at the lowest reasoning setting proved all 50 of the benchmark's most challenging theorems. When the researchers reran VeriContest's own Verus protocol using Claude Opus 5.5 on the 50 problems with the longest reference proofs, the model failed to prove only one.
Why This Matters#
This work demonstrates that formal verification can scale to large benchmark suites when backed by a sound logical framework like Lean 4. The approach's combination of rigorous kernel checking with LLM-based proof search offers a path toward automating correctness guarantees in competitive-programming contexts—and potentially beyond.

