LeanReviewBench: Semantic Alignment Review in Mathematical Lean Projects
Organizations: State Key Laboratory of Mathematical Sciences, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, and University of Chinese Academy of Sciences.
Abstract
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 | ✗ | ✗ | ✗ | ▲ |
| 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 |
| 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 |
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 |
| 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. |
| Configuration | 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 |
Lean Theorem Proving
Lean theorem proving uses the Lean proof assistant to construct machine-checked mathematical proofs, often with automated search and language models.
See all 139 papers