arXiv:2609.05157quant-phSep 2026

Manuscript Offprint

arXiv:2609.05157

AxQM: A Textbook-Scale Benchmark for Formal Proof Synthesis in a Library of Finite-Dimensional Quantum Mechanics

Weichen Winston Yin, Jacob M. Taylor, Dirk R. Englund, Frank H. L. Koppens

Abstract

Formalizing mathematics in a proof assistant, where a machine checks every definition, statement and proof, has set a new standard of rigor. Large language models are now capable of formalizing autonomously, even at the scale of whole textbooks. We bring this standard of rigor to physics, where theoretical arguments carry idealizations that are rarely stated fully, and any logical gaps could have a cascading effect on interdependent results. Recognizing the need to evaluate autoformalization systems for physics, we release AxQM, 1,019 kernel-checkable proof-synthesis tasks over 479 items drawn from the textbook Quantum Computation and Quantum Information by Nielsen and Chuang. The tasks are stated in a custom Lean library of finite-dimensional quantum mechanics. By task count, it is the largest proof-synthesis benchmark in physics by a factor of four. AxQM is derived from a near-complete formalization of the formal portions of the textbook, so every task is guaranteed a solution, which we keep private. Grading of the benchmark is done deterministically by the Lean kernel, which checks that the proof compiles, that no sorry appears in it or in any declaration it depends on, and that it introduces no new axioms.

1 Introduction

Formalization in a proof assistant is increasingly used by the mathematics community to achieve machine-checked rigor that eliminates the possibility of an incomplete proof. Lean 4 [1] is one such assistant: a programming language in which definitions, theorem statements and proofs are all written in code, and whose compiler accepts a proof only when a small trusted kernel has checked every step of it. Faced with the proof of a theorem formalized in Lean, a reviewer can now simply check that the statement carries the correct mathematical meaning, and fully trust that the proof of that statement has been checked down to the axioms by the kernel. The whole burden of review becomes a single question rather than pages upon pages of argument: does this formal statement say what it claims to say? With autoformalization, the translation of mathematical text into Lean code can now be performed by AI at scale, and what is produced this way has grown from single theorems to entire textbooks [2–4]. LLM formal provers for Lean now span reinforcement-learning systems [5–10], retrieval-augmented assistants [11, 12], and agentic scaffolds around general-purpose models, including one tool-assisted iterative prover [13] and a minimal open-source baseline [14].

Outside of mathematics, physics stands to gain a great deal from this technological advancement. Formal reasoning in the physical sciences, machine-checked and traceable to physical foundations, is now within reach. In some ways, physics needs this more than mathematics does. Seldom is physical reasoning expressed at the level of mathematical rigor [15]. Everything from quantum field theory to adiabatic elimination is full of assumptions and occasional hand-waving, yet remains sufficient for predicting the outcomes of experiment. Where the reasoning is formalizable, formalization has yielded fruitful results: formalizing the stability conditions of the two-Higgs-doublet potential recently exposed an error in a widely cited paper [16], and a machine-verified proof has settled an open conjecture in quantum optimization [17]. By moving to AI-assisted autonomous formalization, physicists are confronted up front with new challenges, but can also benefit from advances in verifiable computer-aided reasoning.

Crucially, formalization must build upon a well-scaffolded set of mathematical axioms and definitions that self-consistently enable lemmas and theorems that build upon that foundation. To date, progress in this scaffolding is largely available only in a few branches of mathematics through the community effort known as Mathlib [18]. Physics has begun to acquire the same scaffolding.

PhysLean, formerly HepLean, collects formalized results across classical mechanics, relativity, condensed matter, quantum field theory and string theory [15, 19], with supporting developments in index notation and Wick's theorem [20, 21] and an axiomatization of quantum field theory [22]. Formalization is being attempted across physics more broadly, from chemical physics [23] and the mean-field derivation of the Vlasov equation [24] to control theory [25], numerical analysis [26], power-flow analysis [27] and particle-physics model building [28], with related work in other proof assistants [29]. In quantum information, Lean-QIT builds an operational layer for quantum Shannon theory, while Lean-Quantum builds it in a basis-independent way; Lean-QuantumInfo covers finite-dimensional quantum information in over a thousand theorems [30–33].

Individual formalized results in quantum information include Shor's algorithm [34, 35], the generalized quantum Stein's lemma [33], CHSH rigidity [36], error correction [37], and the fundamental theorem of matrix-product states of tensor network theory [38], several of them assisted by AI. Agentic autoformalization systems have also been built for the domain, targeting certified quantum neural network design and quantum computation broadly [39, 40]. Quantum computation and protocols have also been formalized in other proof assistants: in Coq [41–44] and in Isabelle/HOL [45–47].

Here we go beyond individual formalized results and apply autonomous formalization to a physics textbook in full, releasing AxQM, a Lean 4 benchmark for the formalization of quantum information and computing theory, built from the exercises in the textbook Quantum Computation and Quantum Information by Nielsen and Chuang [48]. Following the scope of the textbook itself, this benchmark is purposely limited to finite-dimensional Hilbert spaces. Every construction therefore stays inside Mathlib's finite-dimensional linear algebra library, where the spectral theorem, the trace, and tensor products are available without functional-analytic hypotheses. Infinite-dimensional systems and unbounded operators are outside this scope.

References (76)