Do Theorem Provers Need Theorem-Proving Agents? mini-Lean-agent: A Coding-Agent Baseline for Lean

Tomas Ortega, Simon Park, Ayush Khaitan, Liam Fowl, Alex Kontorovich, Sanjeev AroraarXiv 2026

TL;DR

This paper introduces mini-Lean-agent, a minimalist theorem-proving agent that interacts with the Lean 4 environment using only a standard bash shell. By stripping away specialized, ad-hoc harnesses, the authors demonstrate that generic coding agents can achieve state-of-the-art performance on the Putnam 2025 benchmark at a fraction of the cost of complex, purpose-built systems.

What Problem Does This Paper Address?

The field of AI-driven formal theorem proving is currently dominated by increasingly complex "harnesses"—specialized software layers that provide LLMs with custom tools for searching mathematical libraries, managing memory, or interpreting compiler feedback.

While these systems report impressive gains, they create a "credit assignment" problem: is the performance boost coming from a better base model, a clever specialized tool, or the specific way the workflow is structured? The authors argue that we lack a clean, "minimalist" baseline to determine if this specialized machinery is actually necessary or if a smart model with generic computer access (a shell) is sufficient.

Methods

The authors propose mini-Lean-agent, which is built on the philosophy of generic computer access rather than Lean-specific tools.

  • The Interface: The only tool visible to the model is bash. To solve a problem, the model must manually use standard CLI commands like cat to write files, grep or rg to search the mathematical library (Mathlib), and lake env lean to invoke the compiler.
  • Workflow: Unlike specialized agents that have separate "proposer" and "compiler" modules, mini-Lean-agent manages its own workflow. It can create scratch files (e.g., Scratch.lean) to test lemmas before moving them to the final target file.
  • Trusted Evaluation: Because the agent has shell access and could theoretically "cheat" by modifying the theorem statement or environment, a separate, trusted evaluator verifies the final artifact in a clean, isolated environment using the Comparator tool.
Figure 1: A comparison between mini-Lean-agent and AxProverBase workflow. mini-Lean- agent is only given bash tools, through which it can directly search for local Mathlib statements and edit files containing the target proof. AxProverBase instead introduces customized search tools and specialized modules in the workflow.

Datasets

The agent was evaluated on the Putnam 2025 benchmark, consisting of 12 challenging mathematical problems (A1–A6 and B1–B6) formalized in Lean 4. This benchmark is a standard for testing high-level mathematical reasoning in formal languages.

Key Insights and Ideas

  • Generic Agents are Strong Baselines: The most significant insight is that a generic coding agent with a minimal harness can match or exceed the performance of specialized theorem-proving agents.
  • Efficiency through Simplicity: By using a standard shell, the agent can leverage model-side caching more effectively. In experiments, mini-Lean-agent achieved a 91.5% cache share for input tokens, compared to only 8.7% for the more complex AxProverBase.
  • Tool Overhead: Specialized tools might actually hinder models. For example, AxProverBase uses a custom fuzzy search for Lean statements, whereas mini-Lean-agent simply uses rg. The results suggest that modern frontier models are already proficient enough at using basic CLI tools to navigate complex codebases.

Key Results

The researchers compared mini-Lean-agent against two specialized baselines: AxProverBase and Numina-Lean-Agent.

  • Gemini 3.8 Flash ($2 budget): mini-Lean-agent solved 7/12 problems, while the specialized AxProverBase only solved 4/12.
  • Astra ($50 budget): Using the Astra model, mini-Lean-agent achieved a perfect 12/12 score.
  • Cost-Effectiveness: mini-Lean-agent solved the entire 12-problem suite for a total of $15.37 (averaging $1.28 per problem). In contrast, the previous open-source state-of-the-art, Numina-Lean-Agent, reportedly used a budget of approximately $50 per task to achieve the same 12/12 result.
Table 1: Comparison between mini-Lean-agent and AxProverBase with Gemini at $2 limit. Each column (except last) shows the number of verified problems out of 12 when the output is truncated at an even smaller per-problem limit. The last column shows the total charge, including that for unsuccessful attempts. This does not include the charge for the higher budget run for A5/B6.
Table 2: Performance of mini-Lean-agent with Astra and Fable at $50 limit. The total charge includes the charge for unsuccessful attempts.

Limitations and Future Work

  • Dataset Contamination: The authors acknowledge they cannot rule out that the frontier models (Astra, Fable, Gemini) were trained on the Putnam 2025 solutions, which could inflate performance.
  • Small Benchmark: The Putnam 2025 set only contains 12 problems. Testing on larger, more diverse formal math datasets (like miniF2F or ProofNet) would provide more robust evidence.
  • Future Directions: The paper opens a new research question: as base models become more capable, will the value of specialized theorem-proving scaffolding continue to diminish, or will we eventually hit a ceiling where only specialized tools can help?

Summary updated

BibTeX
@misc{ortega2026do,
  author = {Tomas Ortega and Simon Park and Ayush Khaitan and Liam Fowl and Alex Kontorovich and Sanjeev Arora},
  title = {{Do Theorem Provers Need Theorem-Proving Agents? mini-Lean-agent: A Coding-Agent Baseline for Lean}},
  year = {2026},
  eprint = {2610.17331},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.17331},
}
Figure