Formalized $q$-series: The Rogers-Ramanujan Identities and Beyond
Kenny Lau, Seewoo Lee, Ken Ono
math.NT
Jul 1, 2026 · v3
math.CO math.LO
TL;DR
Formalizes q-series theory in Lean/Mathlib, including q-Pochhammer symbols, Bailey's Lemma, the Jacobi Triple Product, and the Rogers–Ramanujan identities, with proofs produced by AxiomProver.
Abstract
The theory of $q$-series and basic hypergeometric series plays a crucial role at the intersection of combinatorics, number theory, and representation theory. From the classical partition identities of Euler and Jacobi to modern developments in class field theory, vertex operator algebras, and the Monstrous Moonshine conjecture, $q$-series provide the analytic framework for a wide range of profound applications. In this paper, we discuss the formalization of this theory in the Lean proof assistant, a process that requires careful design of scalable and versatile structures to reconcile formal algebraic identities with analytic convergence properties. We address these foundational challenges by focusing on the construction of $q$-Pochhammer symbols, $q$-binomial coefficients, Bailey's Lemma and similar primitives. To demonstrate the utility of this work, we provide fully verified proofs of the Jacobi Triple Product formula and the celebrated Rogers-Ramanujan identities, which serve as both historical and technical benchmarks for the field. This work establishes a rigorous computational foundation for the future formalization of mock theta functions, modular forms, and the diverse algebraic structures that underpin their applications across mathematics and physics. AxiomProver was used to produce the formalizations in this paper.
Problem
q-series identities have several readings: formal power series identities, analytic statements, and partition facts. A proof assistant requires each transition between these readings to be made explicit. No reusable Lean library existed for q-Pochhammer symbols, q-binomials, and Bailey machinery.
Approach
The library is built on Mathlib's infinite products and summation filters. Its q-series primitives are stated over complete strongly non-archimedean rings with a topologically nilpotent q. The Jacobi Triple Product is generalized to parameters b, c with bc = q, avoiding invertibility assumptions. Bailey pairs and Bailey's Lemma are used to derive the Rogers–Ramanujan identities. Formal proofs were produced with the AI system AxiomProver and checked by the Lean kernel.
Results
Fully verified Lean proofs of the Jacobi Triple Product and both Rogers–Ramanujan identities. Euler's pentagonal number theorem and Jacobi's identity are also derived as corollaries. The library is intended to support future formalization of modular forms, partition congruences, and p-adic modular forms.