LeanReviewBench: Semantic Alignment Review in Mathematical Lean Projects
Ruichen Qiu, Hao Shen, Lihong Zhi, Xiao-Shan Gao
cs.CL
Nov 23, 2026 · v1
cs.SE
TL;DR
Builds a benchmark of 197 Lean declaration sets from 18 real Lean projects, reconstructed under Lean 4.34.1, for reviewing informal-formal semantic alignment.
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.
Problem
Lean checks that a proof establishes its formal proposition, but not whether that proposition faithfully captures the informal mathematical source. In project-scale formalizations, the relevant meaning depends on definitions and constraints spread across many declarations, which makes reviewing alignment difficult.
Approach
LeanReviewBench collects 197 versioned review inputs from 18 Lean projects, including PrimeNumberTheoremAnd, pfr, carleson and ArkLib. Candidate discrepancies were discovered from commit and development histories. Each input pairs an independently sourced informal target with selected Lean root declarations and an extracted dependency context with proof bodies removed, all rebuilt under a common Lean 4.34.1/Mathlib environment. Labels were produced by an LLM annotator with human review of uncertain cases; six language models were then evaluated with Direct and ReForm prompts.
Results
The benchmark has 87 aligned and 110 misaligned labels, including 69 historical pairs. GPT-6.1 Sol with Direct prompting scored highest (accuracy 0.827, misalignment F1 0.844). The effect of prompting strategy varied across models, and output-validity failures lowered the scores of small models.
| Model | Prompt | Accuracy | Valid | F1 |
|---|
| GPT-6.1 Sol | Direct | 0.827 | 196 | 0.844 |
| GPT-6.1 Sol | ReForm | 0.746 | 194 | 0.811 |
| Kimi K3.1 Pro | ReForm | 0.777 | 192 | 0.808 |
| Qwen3.8 Max | ReForm | 0.650 | 191 | 0.656 |
| Gemma 4 E4B | ReForm | 0.137 | 42 | 0.667 |
Selected model results on all 197 inputs (F1 computed on valid outputs, misaligned as positive)