cs.AINov 21, 2026

Improving semantic equivalence in research-level math formalization

Authors: Ayush Khaitan, Liam Fowl, Tomàs Ortega, Alex Kontorovich, Sanjeev Arora

Organizations: Princeton Language and Intelligence Princeton University Princeton, NJ 08540 · Department of Mathematics Rutgers University Piscataway, NJ 08854

Abstract

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%11\% \to 20\%) and raises the share of statements in gold agreement with the project's own formalization by nearly a third (30%30\% to 39%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.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LeanReviewBench: Semantic Alignment Review in Mathematical Lean Projects

    Nov 23, 2026Ruichen Qiu, Hao Shen, Lihong Zhi +1Lean Theorem ProvingLanguage Model Reasoning Evaluation

  2. SemantEq: Faithful Bidirectional Equivalence of Formal Statements

    Oct 23, 2026Xinrui Li, Pawan Sasanka Ammanamanchi, Siddharth Bhat +3Formal VerificationLean Theorem Proving

  3. Improving Lean4 Autoformalization via Cycle Consistency Fine-tuning

    Mar 25, 2026Arsen ShebzukhovCycle ConsistencyAutoformalization