Skip to main content
Back to timeline
arXivSource publication:

Paper2Lean turns 20 optimization papers into whole Lean projects that all compile, yet 21 of 494 statements miss the source meaning

Synopsis

Paper2Lean converts an entire mathematics research paper from PDF into a compilable Lean project rather than translating isolated theorems one at a time. It first extracts definitions, lemmas and theorems into a dependency graph, then coordinates specialized agents for statement formalization, semantic checking and repair, proof construction and library integration. On 20 mathematical optimization papers, every generated project compiles with no sorry placeholders; four experts, each paper read by two reviewers, judged 473 of 494 statements faithful to the source, or 95.7%, and the remaining 21 show that compilation alone does not establish semantic fidelity.

Source-provided article image: Paper2Lean: Agentic Autoformalization of Mathematical Research Papers at Scale
arXiv

Interpretation

A whole mathematics paper can now become a Lean project that compiles, not just a single theorem rendered as a formal statement. Earlier autoformalization mostly stayed at statement-level translation or proof search on isolated theorems, and generally assumed the statement and its surrounding formal context were already given. Across 20 mathematical optimization papers, all automatically generated projects compile successfully and contain no sorry placeholders.

The pipeline starts from the PDF: an extraction agent reads the full document and identifies standing assumptions, definitions, algorithms, lemmas, propositions, theorems, corollaries and formally relevant remarks, and adds items for constructions the paper uses without defining. Extracted content is stored as uniform JSON items recording the source statement, optional proof text, type and dependencies, then arranged as a directed acyclic graph, a dependency network that permits only one-way edges and no cycles. Statement formalization, semantic checking and repair, proof planning and construction, proof golfing and library integration each run as specialized agents, compilation gates apply throughout, and verified interfaces are frozen before dependent items are processed.

Proving proceeds layer by layer along the dependency graph, so items in one depth layer are proved concurrently while the next layer waits until every item in the current layer has a compiling, frozen interface. When a proof attempt fails, the prover returns diagnostics to the orchestrator, which requests a revised proof plan and another attempt, forming a plan-prove-feedback loop. An item counts as proved only when it contains no sorry, admit, axiom or Lean errors, and assumptions may be added to a statement only after repeated failures in which the planner explicitly identifies missing assumptions.

Perspective

The demonstrated scope is 20 mathematical optimization papers, centered on inertial acceleration methods and dynamical-system approaches, formalized as Lean 4 projects against mathlib and a Foundation library built for this set of papers.

The 21 unfaithful statements sit inside projects that compile with no placeholders, so proof construction establishes correctness relative to the generated statement only. Extraction quality strongly shapes downstream formalization, and missing assumptions scattered through a paper can stall proof construction and waste tokens; systematic comparison with other pipelines or agent architectures has not been carried out.