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 likecatto write files,greporrgto search the mathematical library (Mathlib), andlake env leanto 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
Comparatortool.
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,
AxProverBaseuses a custom fuzzy search for Lean statements, whereas mini-Lean-agent simply usesrg. 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
AxProverBaseonly 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.
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