APE-Bench: Evaluating Automated Proof Engineering for Formal Math Libraries
Huajian Xin, Luming Li, Xiaoran Jin, Jacques Fleuriot, Wenda Li
cs.CL
Apr 27, 2025 · v3
TL;DR
Builds a benchmark of proof-engineering tasks mined from Mathlib4 commit histories, verified by Lean 4 compilation plus an LLM judge.
Abstract
While frontier formal mathematics systems now routinely develop repository-scale proof engineering artifacts requiring multi-file coordination and semantic correctness beyond compilation, existing evaluation benchmarks remain focused on isolated theorem proving. We introduce Automated Proof Engineering (APE), the first systematic framework for evaluating repository-scale proof engineering through dual verification that validates both syntactic compilation and semantic requirement satisfaction in pinned library environments. We present a complete infrastructure comprising APE-Bench, which automatically extracts proof engineering tasks from real library commit histories, and APE-Harness, a unified execution framework based on task contract abstraction. This contract-based design enables standardized evaluation across diverse formal mathematics tasks and fair systematic comparison of different agent implementations (including our APE-Agent reference scaffold alongside Claude Code and Codex CLI) on identical task specifications. We demonstrate the framework's effectiveness through comprehensive evaluation. All code and benchmark dataset are released as open-source at
https://github.com/xinhjBrant/APE-Bench.
Problem
Existing formal mathematics benchmarks such as miniF2F and FATE test isolated theorem proving. They miss the repository-scale proof engineering found in real library development: multi-file coordination, library evolution and maintenance.
Approach
The authors define Automated Proof Engineering (APE) tasks. Each task has a natural-language instruction, a pinned Mathlib commit and Lean toolchain, and dual verification: Lean compilation plus LLM-as-judge semantic checks. APE-Bench builds these tasks automatically by filtering Mathlib commits, synthesizing instructions from the diffs and validating that the tasks are solvable. APE-Harness is a contract-based execution framework that runs different agent scaffolds (APE-Agent, Claude Code, Codex CLI) on the same task specifications.
Results
A 100-task instance was built from 67 Mathlib commits made in January 2026. The best model, Gemini 3 Flash, solved 47% of tasks, compared with 92–100% on miniCTX. The semantic judge reached 90.6% overall accuracy. Removing retrieval and other tools lowered the pass rate only modestly (44–45%).
| Model | miniCTX-mathlib | miniCTX-others | APE-Bench |
|---|
| Gemini 3 Flash | 100.0% | 92.6% | 47.0% |
| GPT-5.2 | 92.0% | 89.8% | 27.0% |
| Gemini 3 Pro | 94.0% | 85.6% | 24.0% |
Pass rates across benchmarks