Agent-built Lean 4 proofs shrink compile cost in Refactor Arena entry
A paper reports a competition pipeline that used a frontier model plus a Lean optimizer to rewrite proofs shorter and cheaper, scoring 87.88 on the final benchmark.
In plain words
The authors describe an automated system that rewrites formal math proofs in Lean 4 so they use fewer tokens and less computing effort to check, while still compiling. A language model proposes rewrites, the compiler itself scores each attempt, and a verified optimizer refines the winner. On the contest's 60-problem benchmark it cut both measures by over 80 percent.
What was announced
The paper, posted to arXiv, describes a closed-track entry to the Lean Refactor Arena, a contest where Lean 4 proofs must be rewritten to use fewer tokens and fewer heartbeats — a measure of checking effort — while still compiling on every listed toolchain, under a $3 API budget per problem. The authors treat the task as a search against an exact, compiler-defined cost.
Their pipeline has a frontier model, gpt-6.1-sol, propose candidate proofs. A Lean metaprogram embedded in the target file measures each candidate the way the competition does, and a candidate replaces the current best only if it scores strictly higher on all three axes. A deterministic Lean optimizer then polishes the winner with verified local rewrites, and a reproduction of the contest scorer judges the result. On the 60-problem final benchmark the entry scored 87.88 combined, with length down 80.2 percent, heartbeats down 83.4 percent, and all 67 cross-toolchain checks passed, at an average of $2.83 per problem and $2.97 at most. The authors report that score rose with the number of verified evaluations the budget allowed: a cheaper per-turn model, a policy that spends the full allowance, and half-price Flex tokens each helped, while adding more information, structure, or forced diversity did not.
What it does not show
- The evidence is the paper's abstract only; the full article's methods, baselines, and error analysis are not available for verification.
- The reported scores, cost figures, and check results come from the authors' own submission and scorer reproduction; no independent confirmation is present in the supplied passages.
- The abstract does not state whether the pipeline or its outputs are publicly available.
For security and IT teams
- Scope
- The results cover a single closed-track competition entry on a 60-problem Lean 4 benchmark, not a general-purpose proof tool.
Sources
Source-support review completed 1 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 1 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.