AutoformBench: Beyond Isolated Theorem Proving in Lean 4 Formalization
Summary:AutoformBench introduces 341 Lean 4 formalization tasks drawn from 24 advanced mathematical sources. Target statements were formalized and audited by Lean-experienced mathematicians, while agents receive an informal proof and must construct the missing definitions, intermediate lemmas, and supporting infrastructure. Across frontier models, the study finds a broadly shared difficulty frontier: success is less associated with mathematical domain than with the ability to create formal scaffolding
What the benchmark evaluates
AutoformBench targets a more realistic setting for Lean 4 mathematical work. A model receives a target statement that has already been formalized and audited, together with an informal proof, but must supply the missing definitions, intermediate lemmas, and supporting code that connects the target to Mathlib. The evaluated artifact is therefore a compilable mathematical development rather than the proof of an isolated theorem with most supporting theory already in place.
The benchmark separates formalization into two layers: mapping natural-language concepts onto Lean's types, quantifiers, and declarations; and constructing a reusable chain of lemmas under the constraints of a large library. Errors in the first layer typically surface as type mismatches, while errors in the second appear as missing concepts, incompatible interfaces, or insufficiently strong intermediate results.
Technical mechanism: compiler-guided scaffolding search
A formalization attempt can be represented as a state S_t = (Γ_t, D_t, O_t). Here, Γ_t contains the target context and accessible Mathlib declarations, D_t contains definitions and helper lemmas already introduced by the agent, and O_t contains errors returned by Lean elaboration or compilation. The agent searches over actions that retrieve existing APIs, introduce new declarations, compile the project, and repair failures while expanding D_t.
In a typical Lean workflow, the elaborator turns tactic scripts into proof terms, and the Lean kernel type-checks those terms against the target, local assumptions, and declared objects. Newly introduced declarations become dependencies for later stages. An early definition that omits a parameter constraint, introduces an overly strong hypothesis, or relies on an unsuitable equivalence can therefore create cascading failures in helper lemmas and the final theorem.
The benchmark consequently measures more than the ability to discharge the last proof obligation. It tests whether an agent can identify the correct conceptual boundary, synthesize reusable intermediate abstractions, and locate the first genuine mismatch after compilation errors. An informal proof supplies only a semantic route, not an executable representation: it commonly omits object definitions, quantifier ranges, dependencies, and standard library lemmas. The agent must still translate those implicit elements into Lean declarations and reconcile differences in names and interfaces across Mathlib versions.
Benchmark design and central finding
AutoformBench contains 341 tasks drawn from 24 advanced mathematical sources. Its main quality-control measure is that target statements were formalized and audited by mathematicians experienced with Lean, while the corresponding Lean proofs were left to the evaluated agents. This reduces ambiguity and low-level errors that could otherwise dominate the results.
The paper compares frontier models and reports a broadly shared difficulty frontier. Performance within a mathematical domain is less closely associated with success than the model's ability to construct missing formal infrastructure on top of Mathlib. Failures are thus not always caused by an inability to execute the final mathematical step. They can arise because the model failed to identify the right concept, establish the necessary intermediate lemmas, or map the informal argument onto compatible library interfaces.
The result shifts benchmark attention from broad domain coverage toward library retrieval, dependency management, formal scaffolding generation, and compiler-error repair.
Model results: a qualitative signal rather than a leaderboard
The supplied abstract does not disclose model names, absolute success rates, the pass@k convention, sampling counts, tool-call budgets, inference costs, or run-to-run variance. It is therefore not possible to identify a winning model or model family from this information alone. Two conclusions are supported: the evaluated models encounter a broadly shared difficulty boundary, and infrastructure construction explains outcomes more strongly than the specific mathematical domain.
Because every agent receives an informal proof, the benchmark primarily measures proof translation and scaffolding construction. It does not directly measure theorem discovery, mathematical insight, or the ability to originate a proof. Applying its conclusions to autonomous mathematical research would require a separate evaluation track without a supplied proof route.
Engineering trade-offs and reproducibility risks
-
Context and retrieval cost: The full Mathlib is too large to place in context indiscriminately. Retrieval can reduce token consumption, but irrelevant or version-mismatched declarations may send the agent down longer repair paths.
-
Search and compilation cost: Formalization is an iterative compiler-feedback process. More retries, candidate proofs, and helper lemmas may improve success, but they also increase token use, compilation latency, and sandbox workload. Every new declaration expands the dependency graph that later steps must process.
-
Toolchain reproducibility: The exact Lean 4 version, Mathlib commit, imported modules, and enabled extensions must be pinned. Changes in theorem names, declaration signatures, or tactic implementations can alter outcomes under an otherwise identical prompt.
-
Evaluation fairness: Models should receive matched context budgets, tool-call limits, sampling settings, retry counts, and timeouts. Reporting pass@k without the value of
k, sampling cost, and total tool budget can mistake additional computation for better reasoning. -
Proof integrity: Successful compilation does not necessarily guarantee an acceptable complete formalization. Evaluation should reject
sorry,admit, and unapproved axioms, and inspect dependencies through mechanisms such as#print axioms. Agent-generated code should also run inside an isolated sandbox. -
Contamination and external validity: If target theorems or their informal proofs already appear in public corpora, pretraining contamination may inflate performance. Later use should also examine source difficulty, domain balance, duplicate theorems, and shared formalization templates.
Developer deployment recommendations
- Pin the exact Lean 4 and Mathlib commits, and provide reproducible containers, locked import lists, and minimal environment-build scripts.
- Separate the agent into library retrieval, conceptual modeling, declaration generation, compilation, and error-localization stages instead of relying on one oversized generation pass.
- Cache successfully compiled declarations and environment states, use incremental compilation, and convert repeated failure patterns into structured feedback rather than returning only raw compiler logs.
- Report pass@1, pass@k, tool calls, generated tokens, compilation count, wall-clock latency, cost per successful task, and variance across repeated runs.
- Classify failures into definition discovery, retrieval, quantifier or type errors, insufficient helper lemmas, interface incompatibility, and proof-strategy failures. This decomposition is necessary to distinguish mathematical reasoning failures from formalization-engineering failures.
- The released data and code are well suited to regression testing and capability profiling. Until absolute results are available under a unified compute budget, the benchmark should not be treated as a standalone model leaderboard.
— END —Source: ArXiv AI (cs.AI) (2026-11-27)
Tags: #AutoformBench #Lean 4 #Formal Mathematics #Theorem Proving #Agent Evaluation
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments