Organizations: State Key Laboratory of Mathematical Sciences, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, and University of Chinese Academy of Sciences.
Lean verifies that a proof establishes its formal proposition, but whether that proposition preserves the mathematical content of an informal source requires separate review. In project-scale formalizations, this correspondence can depend on definitions and constraints distributed across many declarations. We introduce LeanReviewBench, a benchmark for project-level semantic alignment review containing 197 versioned inputs collected from 18 real Lean projects, with 87 aligned and 110 misaligned reference judgments. Each input binds an informal mathematical target to selected formal declarations and an extracted dependency context. Construction combines development-history discovery, independent target binding, reconstruction under a common Lean environment, and Astra annotation with human review of uncertain cases. The collection spans diverse mathematical domains and includes 69 historical pairs. We evaluate six language models with Direct and ReForm prompts on all 197 inputs against final human-reviewed reference labels. GPT-6.1 Sol with Direct prompting achieves the highest reported accuracy of 0.827 and misalignment-detection F1 of 0.844; the effects of prompting vary across models. LeanReviewBench provides a testbed for reviewing semantic correspondence in existing mathematical formalization projects. LeanReviewBench is available at https://github.com/MechMath/LeanReviewBench.
Figures & tables
Benchmark
Lean
Context
Discovered
History
Public
FormalAlign [ Lu et al., 2025 ]
4.7.0-rc2
✗
✗
✗
✓
ProofNetVerif [ Poiroux et al., 2025 ]
4.8.0
✗
✓
✗
✓
CriticLeanBench [ Peng et al., 2026 ]
N/S
✗
✓
✗
✓
ConsistencyCheck [ Chen et al., 2026 ]
N/S
✗
✓
✗
✓
MA-Align [ Patel et al., 2026a ]
4.24.0
✗
✓
✗
✓
FormalRx-Test [ Wang et al., 2026b ]
4.24.0
✗
✗
✗
▲
Table 1: Comparison of informal–formal semantic alignment benchmarks. Context indicates supplied project interpretation context; Discovered indicates errors identified in existing formalizations; History indicates collection using development records; Public indicates availability of inputs and reference labels. ▲ indicates unresolved error provenance in Discovered and availability of inputs only in Public. N/S indicates an unspecified Lean version.
Repository
Category
Roots
Inputs
AlexKontorovich/PrimeNumberTheoremAnd
Analytic number theory
21
40
nikhgarg/AppliedModelingLib
Applied modeling and economics
26
30
teorth/pfr
Additive combinatorics
14
24
qinz1yang/differential-geometry
Differential geometry and topology
10
15
Verified-zkEVM/ArkLib
Cryptographic protocols
7
12
frenzymath/Poincare-Conjecture
Riemannian geometry
12
11
Table 2: Source repositories and mathematical categories. Roots counts distinct successfully extracted declaration names across versions; inputs counts successfully extracted versioned review tasks. Neither count represents independent mathematical cases. We collect 197 inputs from 143 roots in total.
Figure 1: Construction of the empirical-Bernstein review pair from FormalSLT: a repair title identifies a candidate, historical snapshots are bound to the same independent target, and dependency inspection explains the change from misaligned to aligned. The target is the specified predictable-variance specialization, not the paper’s full empirical sample-variance result.
Figure 2: Benchmark data distribution. Panel (a) counts project-local declaration nodes, including roots, and excludes external-library boundary nodes. The two Equational Theories outliers, etp-endtoend and etp-law-coverage , are omitted from this panel only. Panel (b) counts inputs containing each category; multiple categories may apply to one input. O: object and concept; A: applicability; Q: quantification; F: formula and quantitative; P: property and coverage. Panel (c) counts inputs by registered pairing status; the 138 paired inputs form 69 before/after pairs.
Model
Prompt
All inputs (197)
Valid binary judgments
Accuracy
Valid output
Precision
Recall
F1
GPT-6.1 Sol
Direct
0.827
196
0.881
0.809
0.844
ReForm
0.746
194
0.721
0.927
0.811
Qwen3.8 Max
Direct
0.614
193
0.821
0.426
0.561
ReForm
0.650
191
0.800
0.556
0.656
Kimi K3.1 Pro
Direct
0.701
196
0.871
0.555
0.678
Table 3: Comparison of prompting strategies on 197 evaluation instances using final human-reviewed reference labels. Accuracy uses all 197 inputs. Valid output counts inputs with a valid binary judgment. Precision, recall, and F1 are computed on those inputs, with misaligned as the positive class. Bold indicates the higher value for each model and classification metric.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Component
GitHub Repo
GitHub commit hash
Lean
leanprover/lean4
5045d0056413266e57c625dcd7c365b10e377c52
Mathlib
leanprover-community/mathlib4
d13f23b723b8a846827a245b89c10fc7d3f11612
Cslib
leanprover/cslib
7c8f6c0f67015df29b152fdcffaf7850db2e9185
Appendix
Table 4: Common reconstruction environment (Lean 4.34.1). Per-input upstream revisions are recorded separately.
ID
Category
Inclusion and boundary rule
O
Object and concept
A different mathematical object or concept, or a missing binding to the designated object; distinguish from a local expression error.
A
Applicability
A changed input domain or substantive premise, including restrictions encoded in types, instances, or structure fields.
Q
Quantification
A changed quantifier kind, order, scope, or witness dependence; general domain restrictions belong to A.
F
Formula and quantitative
A changed operation, coefficient, sign, exponent, index, normalization, or quantitative relation within the intended object.
P
Property and coverage
A missing, added, or replaced output property or independent conclusion; distinguish output guarantees from input premises.
Appendix
Table 5: Diagnostic categories and their principal boundaries. Categories apply to independent discrepancies against the bound informal target.
Configuration
n
Mean
Median
Min
Max
P90
Direct
197
40,582.21
7,289
537
3,319,343
66,602
ReForm
197
41,073.51
7,782
1,029
3,319,836
67,093
Appendix
Table 6: Input length in tokens for the same 197 examples under Direct and ReForm. We tokenize each message body with o200k_base and sum the counts within each request.
Lean verifies that a formal proof establishes its stated proposition under declared assumptions, but does not check whether that proposition faithfully expresses the mathematical claim in a manuscript. Assessing this correspondence requires interpreting the main theorem through its project dependencies, which may be scattered throughout a large development. We introduce MechAlign, a framework for project-level semantic alignment review that combines formal dependency extraction with LLM-based assessment. Its extraction tool, LeanTrace, constructs a statement dependency graph from elaborated declarations, retaining definition bodies and structure constraints while excluding proof bodies and stopping at an explicit library boundary. The reviewer uses this context to investigate alignment and report discrepancies with localized evidence. We conduct a preliminary review of 201 main results from 173 OpenAI Math projects, using supplied informal descriptions and available paper context. A hyperbolic-group case illustrates how dependency inspection localizes a missing dimensional constraint relative to the manuscript, consistent with the upstream declaration of formalization scope. We also construct LeanReviewBench, comprising 501 fixed claim-statement-context triples from OpenAI Math, Fermat's Last Theorem, and Kakeya, with description provenance recorded. The resource supports controlled comparisons of more project-level semantic alignment evaluations.
Hao Shen, Ruichen Qiu, Lihong Zhi +1
State Key Laboratory of Mathematical Sciences, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, and University of Chinese Academy of Sciences.
Formalizing mathematics in Lean is never a word-for-word translation of a paper: a Lean formalization changes definitions, strengthens hypotheses, splits arguments, and adds lemmas the paper never mentions. It stands to reason that a model that is good at autoformalization must be a good predictor of how a natural language source must differ from its faithful Lean formalization. With that in mind, we collect 4{,}076 audited examples of such changes from 832 Lean projects that formalize research-level mathematics, and use them to ask a practical question: how well can a model write Lean inside a real research-level project that may contain tens of thousands of lines of code, and does training on discrepancies between natural language sources and their faithful Lean formalizations help? Our training set consists of 3{,}431 tasks from 141 repositories, and the test set consists of 645 tasks from the remaining 27 repositories. Training on in-project Lean nearly doubles complete proofs (11%→20%) and raises the share of statements in gold agreement with the project's own formalization by nearly a third (30% to 39%). The gain comes from the pairs themselves: an adapter trained only to predict how the Lean will differ, or a model told the difference in advance, barely helps. Training on where formalizations depart from their sources is thus an effective way of improving semantic equivalence in research-level formalization.
Ayush Khaitan, Liam Fowl, Tomàs Ortega +2
Princeton Language and Intelligence Princeton University Princeton, NJ 08540 · Department of Mathematics Rutgers University Piscataway, NJ 08854
AI-driven autoformalization of mathematics is advancing rapidly. However, the type checker of a proof assistant guarantees only the logical correctness of proofs; it does not verify whether propositions and definitions faithfully capture their intended mathematical content. Consequently, AI-generated formal proofs can exhibit semantic hallucination-passing the type checker yet failing to express the intended mathematics. We propose a human-in-the-loop approach in which human scientists and AI collaboratively produce formal proofs, with humans responsible for the semantic verification of propositions and definitions. To realize this approach, we develop Lean Atlas, a Lean 4 tool that visualizes the dependency graph of a Lean 4 project as an interactive web viewer, enabling human scientists to grasp the overall structure of a formalization efficiently. Its core feature, Lean Compass, is an algorithm that, given a selected theorem set, automatically extracts the project-specific nodes whose semantic correctness can affect those target statements, thereby reducing the candidate set for semantic review in large-scale formalizations. We further define aligned Lean code as formalization code that has undergone human semantic verification, and propose it as a quality standard for AI-generated formalizations. We evaluate the tool on six Lean 4 formalization projects with different structural characteristics; proof-heavy projects (PrimeNumberTheoremAnd, Carleson, Brownian Motion) achieved 94-99% average node reduction, a 6-theorem milestone subset of FLT achieved 59.8%, mixed PhysLib 69.0%, and definition-heavy XMSS 27.3%. Lean Atlas is available as open-source software at https://github.com/NyxFoundation/lean-atlas .
Banri Yanahama, Akiyoshi Sannai
Nyx Foundation · Kyoto University · Large Language Model Research and Development Center, National Institute of Informatics