We introduce a novel method for verifying Lean formalizations that goes beyond LLM-judged faithfulness. Unlike most verification methods, which rely on LLMs or trained models, our method combines LLM-based semantic review with mechanical numerical and vacuity checks, providing checkable feedback and detecting errors missed by LLM judges. We apply this method, along with our Extract-Verify-Proof autoformalization pipeline, to construct the Formalized Library of Mathematical Functions (FLMF), a partial formalization of the NIST Digital Library of Mathematical Functions (DLMF). On three labeled datasets, our method achieves the lowest accepted-error rate among the evaluated methods, measured as the fraction of incorrect statements accepted by the verification method. Expert review of the results also identifies translation and source defects in existing datasets. Code available at https://github.com/annamei1/FLMF-Ch7ErrFunc-Release.git.
Figures & tables
Figure 1: The verification workflow. A theorem is verified if it receives a semantic FAITHFUL and no numerical or vacuity FAIL .
Stage
Agent work
Gate on every theorem / equation
DAG
Enumerate equations and dependencies
Open-world gap report
Extract
Write typed definitions and theorem statements
(i) Formalized with appropriate tag or (ii) documented in DISPOSITIONS.md
Verify
Run numerical and back-translation fidelity checks
(i) Obtained a verified stamp or (ii) documented in HUMAN_REVIEW.md
Prove
Fill frozen theorem bodies in waves
(i) Proved with clean build and 0 sorry or (ii) documented in UNPROVEN.md
Table 1: Autoformalization pipeline for FLMF.
FLMF (182 C / 289 I)
Beyond Compilation (245 C / 106 I)
ProofNet (163 C / 204 I)
Method
Incorrect / accepted (rate)
Flagged / correct
Incorrect / accepted (rate)
Flagged / correct
Incorrect / accepted (rate)
Flagged / correct
Ours
5/105 (4.8%)
45.1%
3/154 (1.9%)
38.4%
14/153 (9.2%)
14.7%
GPT-5.5
28/178 (15.7%)
17.6%
10/227 (4.4%)
11.4%
26/176 (14.8%)
8.0%
GPT-5.5 (joint)
45/203 (22.2%)
13.2%
13/232 (5.6%)
10.6%
38/194 (19.6%)
4.3%
Opus 4.6
72/232 (31.0%)
12.1%
24/261 (9.2%)
3.3%
44/206 (21.4%)
0.6%
Opus 4.6 (joint)
88/250 (35.2%)
11.0%
42/267 (15.7%)
8.2%
56/215 (26.0%)
2.5%
Table 2: Accepted-error rate by method on the three labeled datasets. Incorrect / accepted counts the incorrect items among those a method did not flag. A lower accepted-error rate means fewer incorrect Lean formalizations after the check. Flagged / correct is the percentage of all items the method flags among those labeled “correct”. The counts under each dataset are its correct (C) and incorrect (I) items.
Dataset
Check
Flagged
Labeled incorrect
Translation defects
Source defects
False alarm
Beyond Compilation
Numerical
76
35
8
37
0
Semantic
151
101
15
12
25
Vacuity
23
12
1
0
10
Combined
195
102
18
43
35
ProofNet
Numerical
85
85
0
0
0
Semantic
203
183
1
1
17
Table 3: Flags across different datasets and reviewed defect types. Flagged counts all alerts by each method. Labeled incorrect counts alerts on items the dataset labels incorrect. Translation defects and Source defects count review findings among flagged items that the dataset labels correct. RLM25 has no correctness labels; therefore, all statements are considered “correct” by the dataset.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Ch.
Chapter
Targets
Extract
Verified
Proved
1
Algebraic and Analytic Methods
705
88
38
75
2
Asymptotic Approximations
349
2
1
2
3
Numerical Methods
297
2
0
2
4
Elementary Functions
518
26
14
24
5
Gamma Function
164
162
123
137
6
Exponential, Logarithmic, Sine and Cosine Integrals
100
97
56
77
Appendix
Table 4: Complete DLMF chapter progress, reported as counts.
DLMF
Printed defect and correction
Independent evidence
20.10.4
The display uses (1+β) where scale covariance and the theta shift require (ℓ+β) . The θ1 transform has the opposite printed sign, and the θ1 and shifted θ2 integrals are negatives of each other, not equal.
Theta quasi-periodicity already makes the printed chain inconsistent at ℓ=1 ; termwise Laplace transforms and independent 25-digit quadrature recover the corrected form.
20.10.5
The display uses (1+β) where scale covariance and the theta shift require (ℓ+β) .
Termwise Laplace transforms and independent 25-digit quadrature recover the corrected form.
20.13.5
The alternating heat-kernel sum is printed as θ4 ; Poisson summation gives θ2 .
At (α,t,z)=(0.7,0.3,0.4) , the sum is 1.5982… and matches θ2 to 1.6×10−26 , whereas the printed θ4 side is 0.3972… ; complex samples agree.
Appendix
Table 5: DLMF misprint findings.
Dataset
Component
Correct
Incorrect
FLMF
Seeds
38
2
Bound-variable renamings of the seeds
38
2
Human-approved corrected forms of DLMF misprints
7
Mutations of the seeds (M1–M8 + sanity)
160
Historical FLMF errors
17
Misprinted DLMF equations
7
Appendix
Table 6: Dataset composition (1,810 items).
FLMF subset
n
Ours
GPT-5.5
GPT-5.5 (joint)
Opus 4.6
LeanScorer
FormalAlign
N
B
V
Seeds, renamings, and corrected misprints
Seeds
40
12
8
4
3
22
37
0
9
3
Renamed seeds
40
15
7
4
4
21
36
0
12
3
Corrected misprints
7
7
7
7
6
3
1
0
7
0
Mutations, historical artifacts, and printed misprints
M1 impossible hypotheses
20
20
20
20
19
20
18
0
20
0
Appendix
Table 7: Flags on the 271 FLMF seeds, renamings, mutations, historical artifacts, and misprint items.
FLMF (182 C / 289 I)
Beyond Compilation (245 C / 106 I)
ProofNet (163 C / 204 I)
Threshold
Incorrect / accepted
Flagged / correct
Incorrect / accepted
Flagged / correct
Incorrect / accepted
Flagged / correct
0.1
243 / 409
8.8%
100 / 338
2.9%
185 / 312
22.1%
0.2
111 / 199
51.6%
76 / 248
29.8%
81 / 120
76.1%
0.3
32 / 76
75.8%
49 / 139
63.3%
16 / 20
97.5%
0.4
12 / 22
94.5%
21 / 45
90.2%
2 / 2
100.0%
0.5
1 / 1
100.0%
3 / 8
98.0%
0 / 0
100.0%
Appendix
Table 8: FormalAlign certainty-threshold sweep on 1,189 labeled pairs. A statement is flagged when its certainty score is at most the threshold. C and I denote the dataset’s correct and incorrect labels. Incorrect / accepted counts incorrect-labeled items among accepted statements. Flagged / correct is the percentage of correct-labeled items that are flagged. The threshold of 0.3 used in the main comparison is shown in bold. The 0 / 0 entry indicates that no statements are accepted. RLM25 reference pairs are not included in this sweep.
Channel
Items
API calls
Cost (USD)
Cost / item (USD)
Time / item (s)
Numerical check
1,539
3,961
314.18
0.204
77.0
Back-translation
1,539
3,080
99.57
0.065
29.0
Vacuity check
1,539
0
0.00
0.000
–
GPT-5.5 direct
918
920
33.01
0.036
13.5
Opus 4.6 direct
918
922
20.96
0.023
14.6
LeanScorer
918
1,840
66.65
0.073
20.5
Appendix
Table 9: API cost and recorded runtime. The 918-item set comprises 200 FLMF, 351 Beyond Compilation, and 367 ProofNet statements. The 1,539-item set also includes 621 RLM25 reference pairs. Costs include retained reservations totaling $9.64 for 25 requests whose charges remain unresolved. Time per item is the sum of final recorded job durations divided by the item count, with joint-batch time amortized across items; it excludes superseded attempts and is not elapsed wall-clock time. Vacuity runtime is omitted because 1,512 records report result-reuse overhead rather than the original checking time. FormalAlign scored 918 items locally on CPU, with 32.1 minutes of recorded inference time (2.1 seconds per item), excluding model loading.