TRANSMISSION // 2611.37395v1
When coding agents must prove their work
Source published
AutoSpec tests whether coding agents can prove that existing Rust algorithms meet mathematical specifications, using a translation pipeline into Lean. The results show both progress and persistent challenges.

Software tests can catch errors without proving that a program is correct in every case. AutoSpec explores a more demanding alternative: ask coding agents to produce proofs, checked by Lean, that existing Rust programs satisfy mathematical specifications. The benchmark reveals where that task is difficult—and an important gap between mathematical proofs and exact machine behavior.
From running code to proving what it does
A program can pass its tests and still fail on an input nobody tested. Formal verification takes a different approach: developers state mathematically what a program should do, then use a proof assistant to check an argument that the program meets that specification. The challenge is that writing such proofs can require considerable expertise.
In the preprint AutoSpec: Towards Verifiable Software Development via Automated Theorem Proving, Guchan Li and Hongning Wang study whether coding agents can help with that work. Rather than asking an agent to invent a program and prove it correct from scratch, they give it an existing Rust implementation and a specification, and ask it to prove that the two match.
Translating Rust into a proof setting
The researchers built AutoSpec around Aeneas, a tool that translates supported Rust programs into functional definitions in Lean, an interactive theorem prover. This lets agents work with implementations written in a familiar programming language while constructing proofs in Lean. The paper extends the translation pipeline with numerical retargeting and term simplification, intended to make mathematical reasoning about numerical algorithms more manageable.
The resulting benchmark contains 159 programs across nine algorithmic domains, including graphs, matrices, strings, and dynamic programming. Each program comes with a manually written Lean specification. The authors divide tasks into two difficulty tiers, based on program size, and test eight coding agents in interactive Lean environments. Agents can inspect proof states, consult libraries, make edits, and receive feedback from verification tools. A proof counts only if Lean’s comparator accepts it without changes to the theorem statement or reliance on non-standard axioms.
This setup isolates proof construction: the agent is not responsible for writing the original implementation or specification. That makes the benchmark useful for studying one part of verification, but it does not test a complete workflow in which an agent must also determine what a program ought to do.
A demanding, structured task
The strongest-performing agent in the evaluation, Claude Opus 5.5, proved 73% of the benchmark tasks overall. Its success rate was lower on the larger-program tier: 50%. All eight agents did worse on that tier than on the smaller one. Graph, matrix, and dynamic-programming tasks proved especially challenging across agents.
The researchers also examined successful proofs to understand what makes them difficult. Many require more than applying a mathematical fact to a final result: agents must break program behavior into intermediate claims, handle branches, and reason about loops or recursion. The largest tenth of the theorems accounted for nearly half of all tactic applications in the analyzed proofs. In other words, a small share of proof obligations demanded a disproportionately large amount of work.
A second hurdle was finding the right verification-specific knowledge. Successful proofs drew on both general mathematical results and information about Aeneas, the translation tool, and the particular program. In an experiment with one agent, the researchers supplied general guidance: information about the environment, relevant lemmas, and loop-proof templates, but not solutions to individual tasks. On tasks that agent had previously failed, it proved 34 additional cases. The aid improved its use of Aeneas resources, but it did not solve the graph tasks in that experiment. The authors interpret this as evidence that better access to library knowledge can help, while structural reasoning remains a separate challenge.
What the proofs do—and do not—establish
A crucial qualification concerns numerical arithmetic. For some programs, AutoSpec translates selected floating-point operations into exact rational or real-number arithmetic. That makes mathematical proofs more tractable, but it changes the computational model: the proof establishes a property of the translated, idealized calculation, not necessarily of the original Rust program’s exact floating-point execution, including rounding. The toolchain also supports only a subset of Rust and excludes features such as unsafe code and some forms of references and generics.
Specifications are another boundary. Because the benchmark provides them in advance, a successful proof shows that a translated implementation satisfies the supplied statement. It does not by itself establish that the statement captures every behavior users need, or that the original implementation and its translated representation agree in all respects beyond the checks described.
AutoSpec is therefore best understood as a benchmark and research tool, not a demonstration that coding agents can routinely deliver fully verified software. Its results point to two practical needs: agents must reason effectively about program structure, and they must navigate the specialized knowledge required by verification tools. The paper is a preprint, so its claims should be treated as research findings awaiting further scrutiny; its authors also describe the benchmark and toolchain limitations directly.
- formal verification
- AI coding agents
- Lean
- Rust
- theorem proving
- software correctness
- AutoSpec
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
How AI Agents Build Formal Proofs for Complex Chips
Source published
Shared keywords: formal verification, theorem proving
How AI Refactored Lean Proofs Without Changing Their Claims
Source published
Shared keywords: formal verification
How AI Shrunk Lean Proofs for Less Checking Cost
Source published
Shared keywords: formal verification, theorem proving
Taking away the hints: a tougher test for AI proof-writing
Source published
Shared keywords: ai coding agents, formal verification
How a Budgeted AI Pipeline Refactored Lean Proofs
Source published
Shared keywords: formal verification