Agentic Proof Automation: A Case Study
Yichen Xu, Martin Odersky
TL;DR
The paper tackles the high cost of mechanized proofs by introducing agentic proof automation, where off-the-shelf LLM agents perform mechanical proof engineering under human guidance. Through a Lean 4 case study of System Capless (over 14,000 lines), the authors demonstrate an 87% task-success rate across 189 tasks, with only 16% needing human intervention, and they provide an interactive explorer and open-source mechanization for replication. Humans supply mathematical insight, theorem statements, and strategies, while agents search codebases, craft proof scripts, and repair proofs in response to prover feedback, showcasing a practical workflow that accelerates formal verification. The results reveal that agents are strong proof engineers but limited in creative reasoning, underscoring a division of labor and the potential to broaden formal-method adoption while highlighting areas for future tooling and benchmarking improvements.
Abstract
Proof engineering is notoriously labor-intensive: proofs that are straightforward on paper often require lengthy scripts in theorem provers. Recent advances in large language models (LLMs) create new opportunities for proof automation: modern LLMs not only generate proof scripts, but also support agentic behavior, exploring codebases and iteratively refining their outputs against prover feedback. These advances enable an emerging scheme where LLM-based agents undertake most proof engineering under human guidance. Humans provide mathematical insight (definitions, theorems, proof strategies); agents handle the mechanical work of proof development. We call this scheme agentic proof automation. We present this scheme through a case study: mechanizing the semantic type soundness of a sophisticated formal system, System Capless, in Lean 4, comprising over 14,000 lines of code. Using off-the-shelf LLM agents with a single lightweight proof-checking tool, the agents completed 189 proof engineering tasks with an 87% success rate, only 16% requiring human intervention. The case study demonstrates that agents are capable proof engineers that substantially boost productivity, though they fall short in creative reasoning and still require human guidance in certain cases. We release an interactive explorer where readers can examine all agent interactions; the mechanization is open-sourced for experiments and extensions.
