arXiv:2610.20573cs.LOOct 2026

Manuscript Offprint

arXiv:2610.20573

Beyond LLM Judge: Mechanical Verification for Agentic Autoformalization

Anna Mei, Michael R. Douglas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

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/annameil/FLMF-Ch7ErrFunc-Release.git.

1 INTRODUCTION

With the rapid development of agentic coding assistants, the formalization of mathematics has become very accessible to researchers and has received a lot of attention. However, to this day, the most trusted and widely used library is still Mathlib (The mathlib Community, 2020), whose correctness is guaranteed by careful human review and which is therefore trusted by its downstream users. For the same reason, it also faces a slow review process and limited coverage of existing mathematics, blocking the formalization of more advanced mathematical work. Efforts have been made to resolve this problem by building agentic systems to formalize textbooks, research blueprints, and dependency-guided libraries at increasing scale (Gloeckle et al., 2026; Rammal et al., 2026; Wang et al., 2026; Cabral et al., 2026; Milikic et al., 2026; Douglas et al., 2026).

In contrast to Mathlib, autoformalizations of this kind face severe challenges to their reliability. An autoformalizer can change a domain, index, sign, or branch convention, or introduce contradictory hypotheses, and still produce a provable statement. Audits of formal benchmarks document such defects (An et al., 2026).

We therefore propose a verification method that combines numerical verification, an LLM check, and a vacuity check, along with an agentic autoformalization pipeline, to allow the creation of trustworthy reusable formal libraries. We chose the Digital Library of Mathematical Functions (DLMF) as our testing ground, and propose the Formalized Library of Mathematical Functions (FLMF) as the product of our pipeline and verification method.

This paper makes three contributions:

• Numerical and vacuity verification method (Section 3). We introduce numerical and vacuity checks on Lean statements, which are mechanical and provide checkable feedback on points of failure. As indicated by their names, a numerical check verifies numerical validity of a Lean statement, and a vacuity check looks for vacuous formalization, for example a tautological definition. So far, all verification in autoformalization relies on LLM judgements, and our method complements the ambiguity and arbitrariness of an LLM judge’s verdicts. Its feedback is tractable and informative, and passing these checks adds another layer of certainty about the correctness of a Lean statement.

• Autoformalization pipeline (Section 4). Our pipeline divides the formalization process into three stages: extract, verify, and prove. We emphasize human gating at each stage, requiring every item either to pass a gate or to be documented with a reason for failure. We then use an auditor agent to revise those documents against written guidelines. We also keep track of all statement corrections to allow future studies of them.

• Corrections to existing datasets (Section 5). Expert review of our verification flags identifies multiple defects in existing datasets. Among the statements that are labeled correct, we found 4 defects among ProofNet items labeled faithful by Ground False, 61 defects among correct-labeled Beyond Compilation items, and 224 defects in RLM25 (Table 3). We will release corrected statements for confirmed defects.

References (55)