arXiv:2610.38174cs.CLOct 2026

Manuscript Offprint

arXiv:2610.38174

Scaling Lean Theorem Proving for Real-World Code Verification

Debargha Ganguly, Divya Raghunathan, Dejan Jovanović, Vikash Singh, Soonho Kong, Aaron Tomb, Aman Goel, Ferhat Erata, Sam Bayless

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present EASYPROVER, a Lean proving system built from recursive agents with isolated contexts, asynchronous search, parallel tactic probing, and an elastic elaboration service. Using an off-the-shelf frontier model with no additional training, it proves 669/672 PutnamBench problems and all six IMO 2026 formalizations and resolves 597/600 NTP4VC verification conditions and all 189 VERINA tasks by proof or refutation. Because these benchmarks are close to saturation, we also introduce AEGIS, which converts competitive programming problems into much harder verification tasks over real implementations. The pipeline writes safe Rust solutions, translates them into Lean with AENEAS, generates specifications, and labels each frozen statement with a kernel-checked proof or refutation. It produces 2,045 differentially validated Rust–Lean program pairs and 11,533 candidate specifications. Unlike hand-written benchmarks, these tasks carry implementation-level obligations from fixed-width arithmetic, explicit failure, generated loops, casts, and functionalized mutation. On a stratified sample of 2,000 statements, EASYPROVER proves 1,054 (52.7%) within a 30-minute budget per statement. The same tasks can also be used to benchmark other provers and as rewards for reinforcement learning.

1 Introduction

Large language models (LLMs) paired with proof assistants now produce machine-checked proofs of competition mathematics [Chen et al., 2025b, Chung et al., 2026] and of program correctness [Ye et al., 2025, Li et al., 2026]. Building an effective agent for these tasks takes more than a frontier model and a proof checker. The agent must decompose goals, find or prove intermediate lemmas, and recover from failed approaches, all within a finite context window and compute budget. Verifier feedback is also local. Lean reports whether each step elaborates, but the cost of a poor decomposition or a missing lemma may only become visible many steps later. Mathematical proofs often depend on choosing the right abstraction and building auxiliary lemmas in layers. Program verification adds recursive program structure, data representations, invariants, and implementation-level proof obligations. In both settings, the agent must produce correct individual steps and also keep a long reasoning process coherent, revising it when an approach fails.

Evaluating such agents requires tasks they cannot already solve. Several established formal-reasoning benchmarks are now close to saturation (Section 4), and existing verified-programming benchmarks are small. Each verification task needs a formal statement of the intended behavior, a model of the program, and meaningful proof obligations. Writing these requires expertise in programming, formal specification, and theorem proving, so these benchmarks contain only hundreds

*Corresponding author. Work done during an internship at Amazon Web Services.

Preprint.

of tasks [Ye et al., 2025, Xu et al., 2026, Loughridge et al., 2024]. Small static benchmarks are also exposed to memorization and contamination [Carlini et al., 2022, Dong et al., 2024]. Generating verification tasks automatically addresses both problems, provided the specifications capture the intended behavior and the proofs span a range of difficulty. Such tasks have a second use. Tests give only finite evidence of correctness [Chen et al., 2021, Jimenez et al., 2024, Liu et al., 2023], and when used as training rewards they can encourage agents to exploit the test harness instead of implementing the intended behavior [Baker et al., 2025, Helff et al., 2026]. A proof instead certifies correctness against a formal specification and is cheap to check [Lean FRO, 2026], so kernel-checked labels can also serve as rewards for reinforcement learning from verifiable rewards (RLVR) [Lambert et al., 2024].

We make two contributions.

  1. A proving system that nearly saturates current benchmarks. EASYPROVER combines recursive agents with isolated contexts, asynchronous search, parallel tactic probing, and INFINILEAN, a stateless, elastic Lean elaboration service (Section 3.1). With an off-the-shelf frontier model and no additional training, it proves 669/672 PutnamBench problems and all six IMO 2026 formalizations and resolves 597/600 NTP4VC verification conditions and all 189 VERINA tasks by proof or refutation (Section 4). Every reported result is a kernel-checked proof or refutation.

  2. A much harder test set for verification. AEGIS turns competitive programming problems into Lean verification tasks over translated implementations. It synthesizes safe Rust, translates it into Lean with AENEAS, generates specifications, and labels each frozen statement with a kernel-checked proof or refutation (Section 3.2). The pipeline yields 2,045 validated Rust–Lean programs and 11,533 candidate specifications. EASYPROVER proves 1,054 statements in a 2,000-statement sample, so these tasks remain far from saturated for a prover that nearly saturates the established benchmarks. Because the pipeline needs no expert annotation, more tasks can be generated with additional compute, and the same tasks can be used to benchmark other provers or as RLVR rewards.