Manuscript Offprint

arXiv:2610.17331

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 Arora

Tomas Ortega

Princeton Language and Intelligence

Princeton University

Princeton, NJ 08540

tomas.ortega@princeton.edu

Ayush Khaitan

Princeton Language and Intelligence

Princeton University

Princeton, NJ 08540

ayush.khaitan@princeton.edu

Alex Kontorovich

Department of Mathematics

Rutgers University

Piscataway, NJ 08854

alex.kontorovich@rutgers.edu

Simon Park

Princeton Language and Intelligence

Princeton University

Princeton, NJ 08540

juhyunp@princeton.edu

Liam Fowl

Princeton Language and Intelligence

Princeton University

Princeton, NJ 08540

lf2728@princeton.edu

Sanjeev Arora

Princeton Language and Intelligence

Princeton University

Princeton, NJ 08540

arora@princeton.edu

Abstract

General-purpose coding agents use standard shell and file interactions, yet formal theorem-proving agents often rely on specialized, ad-hoc tooling. This makes it difficult to determine which components of theorem-proving agents provide benchmark gains: an improved base model, a specialized harness, a specific tool, or a combination of any of them. We introduce mini-Lean-agent, a deliberately minimal agent for Lean tasks whose only model-visible tool is bash. The model must use bash to inspect and edit the repository, search local libraries, invoke Lean, and manage its own intermediate work, while a separate trusted evaluator verifies the final artifact. We compare mini-Lean-agent against AxProverBase and Numina-Lean-Agent on the Putnam 2025 benchmark. Experiments with Gemini 3.8 Flash as the base model show that mini-Lean-agent solves 7/12 problems at 2perproblemlimit,comparedwithAxProverBase′s4/12.WithAstraasthebasemodel,mini−Lean−agentsolves12/12problemsatanaveragecostof2 per problem limit, compared with AxProverBase's 4/12. With Astra as the base model, mini-Lean-agent solves 12/12 problems at an average cost of1.28 per problem. This suggests that a generic coding agent with a minimal harness can already achieve strong performance on Lean benchmarks. Our results motivate using mini-Lean-agent as a standard baseline when evaluating theorem-proving infrastructure.

1 Introduction

The past few months have seen a flurry of mathematics results solved by Large Language Models (LLMs), both in natural language and in formal language (most notably Lean [Moura and Ullrich, 2021]). In practice, mathematicians and engineers who use LLMs for Lean rely on general-purpose coding agents (such as Claude Code or Codex) rather than specialized prover-specific harnesses.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: The 6th Workshop on Mathematical Reasoning and AI.

However, the AI-for-math literature proposes a variety of specialized machinery to construct agents for Lean tasks: special-purpose harnesses [Lample et al., 2022, Thakur et al., 2024, Pegden, 2026, Li et al., 2026], specialized tools [Requena et al., 2026, Hu et al., 2025], or a combination of both [Yang et al., 2023, Lin et al., 2025a,b, Chung et al., 2026, Aniva et al., 2025, Liu et al., 2026, Dekoninck et al., 2026, Tsoukalas et al., 2026, Song et al., 2025]. These works report substantial performance improvements over variations of their predecessors, but it is hard to attribute the gains to an improved base model, the harness, or the specialized tools considered in isolation.

In software engineering, this problem has been addressed by the development of general-purpose coding agents with a minimal prompt (less than 100 lines) that operate through a shell and filesystem, most notably mini-SWE-agent by Yang et al. [2024]. We then ask: Should we use a generic coding agent for evaluating Lean-specific agent machinery? Rather than positioning our work on the spectrum of few versus many tools, we position it as generic computer access versus Lean-specific tools. First, this establishes a baseline for Lean-agent research that is more comparable to the workflow of current practitioners. Second, it helps isolate the contribution of the base model from the contribution of specialized tools or harnesses.

To study this, we introduce mini-Lean-agent, a deliberately minimal baseline whose only model-visible tool is bash. Note that a generic coding agent with a shell can naturally replicate what specialized tooling hard-codes: searching Mathlib with rg or grep, running tests and interpreting compiler errors with lake env lean, creating temporary scratchpads (e.g., Scratch.lean), and transferring successful proofs to the target file. Because the model can modify its own environment, the output artifact is treated as untrusted: a separate, trusted evaluator validates the final proof in a clean environment using Comparator [LeanFRO, 2026] to catch build failures, undeclared axioms, or statement mutations.

Using this filesystem-native baseline, we investigate two primary research questions:

• RQ1 (Parity and Cost): Using the same model and inference budget, how much solve rate and cost-efficiency does mini-Lean-agent recover relative to specialized theorem-proving baselines?

• RQ2 (Minimal-Scaffold Capability): How far can stronger frontier models go on Lean benchmarks using only a minimal coding agent scaffold?

Our code is available at https://github.com/TomasOrtega/mini-lean-agent.

After mini-Lean-agent was made public, a concurrent project, h1 Moalla et al. [2026], was released. Like our work, h1 argues that minimal agent harnesses achieve strong theorem-proving performance with current models. However, h1 requires specialized tools for Lean library search, whereas mini-Lean-agent relies exclusively on bash.

References (19)