
Srinivasa Ramanujan spent his boyhood in Kumbakonam, on the banks of the Cauvery River in lush south India, working out mathematics on a slate because paper was expensive. He flunked out of college — twice — because he would study nothing but mathematics. And yet within a decade, this self-taught clerk from the Madras Port Trust would sit in Cambridge and see, in a table of numbers compiled by a major in the British military, a secret that the greatest mathematicians in Europe had missed.
The table belonged to Major Percy MacMahon, combinatorialist and officer of the Royal Artillery, who had computed by hand the values of the partition function $p(n)$, the number of ways of writing n as a sum of nonincreasing positive integers, to check the astonishing asymptotic formula of Hardy and Ramanujan. MacMahon arranged his values in columns of five. Ramanujan looked at the fifth column and saw something no formula had predicted.

Nothing in the definition of $p(n)$, the child’s play of adding and counting, suggests it should have any arithmetic structure at all. Yet, Ramanujan proved that the pattern in the fifth column persists forever, and that it has two siblings:
$$ p(5n + 4) ≡ 0 (\!\bmod 5),\quad p(7n + 5) ≡ 0 (\!\bmod 7),\quad p(11n + 6) ≡ 0 (\!\bmod 11). $$
These are the celebrated Ramanujan partition congruences. They were the beginning of a century-long story, one that runs through a magazine article filled with guesses, a letter written from a deathbed, a notebook rescued from a fire, a challenge issued at a centenary, and now, we believe, a new chapter.
Dyson’s guesses
A theorem can tell you that the partitions of $5n + 4$ come in five equal batches without telling you which partition belongs to which batch. In 1944, Freeman Dyson, then a Cambridge undergraduate, asked for the batches themselves, in an article in the student magazine Eureka fittingly titled “Some guesses in the theory of partitions.” His guess was a statistic of disarming simplicity. The rank of a partition is its largest part minus its number of parts. Dyson conjectured that sorting the partitions of $5n + 4$ by their rank modulo $5$ splits them into five groups of exactly equal size, and likewise for $7n + 5$ modulo $7$.

Atkin and Swinnerton-Dyer proved Dyson’s conjectures in 1954. But Dyson himself had already noticed the flaw in his own guess: the rank fails to explain the congruence modulo 11, and the failure appears immediately, at $p(6) = 11$. So he postulated, on no evidence whatsoever, the existence of a better statistic, which he named the crank before anyone knew what it was, praying that it “be preserved from the ignominy of being disproved.” It took forty-four years. Andrews and Garvan found the crank in 1988, and it explains all three congruences. Mahlburg later showed it governs congruences modulo arbitrary powers of every prime at least 5. A mathematical object conjectured into existence by name alone: there is nothing else quite like it in combinatorics.
And here the story takes its most improbable turn. In the spring of 1976, George Andrews was working in the library of Trinity College, Cambridge, going through an old box of papers from the estate of G. N. Watson. Some of its contents had made a circuitous journey from India in the early 1920s, after Ramanujan’s death, and had then lain forgotten for half a century, forgotten so completely that in 1968 the box was scheduled to be burned, and was rescued by Robert Rankin just days beforehand. Inside, Andrews found more than a hundred pages of Ramanujan’s unmistakable handwriting: mathematics from the final year of his life. The world now calls it the lost notebook. And among those pages, written in Madras by a dying man with no reason to explain himself, were identities that make sense only if Ramanujan already possessed the rank. He had found the statistic twenty-four years before it had a name, studied its generating function, and told no one. Dyson did not so much invent the rank as rediscover a room Ramanujan had quietly built and locked behind him.
The last letter, and a challenge
On January 12, 1920, three months before his death at thirty-two, Ramanujan wrote to Hardy one last time. He apologized for his silence, and then, as if resuming a conversation interrupted by nothing more serious than the mail, announced that he had discovered “very interesting functions” which he called “Mock ϑ-functions.” Seventeen examples followed. No definitions, no proofs, no explanation of what “mock” meant. Among them was the function
$$ f(q):=1 + \sum_{n=1}^{\infty}\frac{q^{n^2}}{(1+q)^2\cdots (1+q^n)^2}. $$
which, as it happens, is also a rank generating function in disguise: its coefficients count the partitions of n with even rank minus those with odd rank. Ramanujan’s two deathbed mysteries, the rank and the mock theta functions, were the same mystery all along.

For most of a century, the mock theta functions remained a list of enigmatic power series. Then, at the Ramanujan Centenary Conference in 1987, Freeman Dyson named the gap in our understanding. The mock theta functions, he said, give tantalizing hints of “a grand synthesis still to be discovered… This remains a challenge for the future.” And he added that the purely mathematical exploration of mock-modular forms “must be carried a great deal further.”

The answer, for the rank
The synthesis Dyson asked for arrived in 2002, in the doctoral thesis of Sander Zwegers, written under Don Zagier in Utrecht. Zwegers showed that each mock theta function can be completed: add to it a specific non-holomorphic integral, a “period integral” of a classical theta function, and the sum transforms like a genuine modular form of weight 1/2. In the same year, Bruinier and Funke introduced harmonic Maass forms, and Zwegers’s completed functions turned out to be exactly that: the lock and the key were cut in the same year. Zagier canonized the framework in his 2007 Bourbaki seminar, and Axiom Math Founding Mathematician Ken Ono, in joint work with Kathrin Bringmann, brought the theory home to Dyson’s question: the rank generating function, specialized at roots of unity, is the holomorphic part of a weight 1/2 harmonic Maass form, and from this flow infinitely many congruences for the rank counting functions themselves, in every modulus coprime to 6.
By 2010, then, the case $m = 1$ was closed. Dyson’s rank belongs to mock modularity. The framework even reached the physicists, precisely as Dyson had dreamed aloud in 1987: mock modular forms now appear in the counting of quantum black hole states, in the work of Dabholkar, Murthy, and Zagier on meromorphic Jacobi forms, work that will make a quiet reappearance below.
The sequel question
So generalize. Dyson’s rank generating function is built from one pair of partition statistics. Our new paper, with Claudia Alfes and Ashvin Swaminathan, studies the higher Dyson systems: for each $m\geq 1$, the series
$$ \mathcal{R}_m(z;q):=\sum_{n\geq 0} \frac{q^{n^2}}{\prod_{j=1}^m(z^jq,z^{-j}q;q)_n}., $$
which at $m = 1$ is exactly Dyson’s rank generating function. For $m\geq 2$, it is the generating function for a natural refinement: m-Dyson symbols, built from a central square of size $n^2$ and $m$ independent pairs of partitions, weighted by a full rank that combines the m individual ranks with weights $1, 2, …, m$. Like the Dyck paths of our earlier work, this is an object one can draw on graph paper.

The natural expectation, the expectation every reader of the story so far will have, is that the higher systems produce more mock theta functions. They do not appear to. For $m\geq 2$, the series $R_m(z; q)$ at roots of unity are not expected to fit the mock-modular framework at all, and their analytic structure had resisted identification. That is the sequel question: if not mock modularity, then what?
Before answering, it is worth seeing the mystery in raw numbers. Set $m = 2$ and $d = 2m + 1 = 5$, and let $\zeta_5$ be a primitive fifth root of unity. A pleasant Galois argument shows that the full ranks of 2-Dyson symbols are always equidistributed among the nonzero classes modulo 5, for every size N, with no arithmetic progression required. (Contrast Dyson’s original miracle, which required the progression $5n + 4$ and a difficult proof.) The entire mystery therefore concentrates into a single signed sequence: the deviation $D_2(N)$ between the class of full rank $0$ and any other class. This deviation sequence is precisely the coefficient sequence of the specialization
$$ R_2(\zeta_5;q):=\sum_{n=0}^{\infty}\quad \frac{q^{n^2}(q;q)_n}{(q^5;q^5)_n}=1+q-q^2+q^4-q^5+2q^9-2q^{10}-q^{11}+q^{13}+\cdots. $$
Concretely: there are 342 uncoupled 2-Dyson symbols of size 9; exactly 70 have full rank $0 (mod 5)$, and each nonzero class has exactly 68 — a deviation of 2, the coefficient of $q^9$. At sizes 6, 7, 8, and 12 the deviation vanishes: perfect five-way equidistribution. The coefficients are small, signed, and patternless to the eye.

The theorem in plain English
The answer is not mock modularity. It is something older and, in a precise sense, more finite: the elliptic half of Jacobi’s theory of theta functions, with a correction mechanism whose data one can write down completely.
Elliptic functions are not exotic. They are among the oldest and most classical objects in complex analysis, the doubly periodic meromorphic functions studied by Abel, Jacobi, and Weierstrass in the nineteenth century. The archetype is the Weierstrass $\wp$-function attached to the lattice $\Lambda = \mathbb{Z}\tau + \mathbb{Z}$:
$$ \wp(w; \tau) := \frac{1}{w^2} + \sum_{0 \neq \lambda \in \Lambda} \left( \frac{1}{(w-\lambda)^2} - \frac{1}{\lambda^2} \right),$$
which repeats itself perfectly in both directions: $\wp(w+1) = \wp(w+\tau) = \wp(w)$. A Jacobi form is a two-variable refinement of this idea, modular in $\tau$, and in $w$ obeying an elliptic transformation law in which the shift $w \mapsto w + \tau$ costs a precise exponential factor rather than nothing: for index $m$, one has $H(\tau, w+\tau) = q^{-m} e^{-4\pi i m w} H(\tau, w)$. It is this elliptic law, not the modular one, that the higher Dyson systems turn out to satisfy once corrected.
Here is the mechanism. The higher Dyson series satisfies a finite $q$-difference recurrence, a $(2m+1)$-term relation as elementary in form as Fibonacci’s. Package the series into a two-variable function of a modular variable τ and an elliptic variable w, normalize by an explicit infinite product, and ask whether the result transforms the way an index $m$ Jacobi form should when $w$ is shifted by $\tau$. It does not, but it fails by a completely explicit, completely finite amount: a polynomial of degree at most $2m − 1$, determined by the recurrence itself. Take the partial fraction decomposition of that defect polynomial. Each pole dictates its own correction term, an Appell–Lerch series of the kind that Zwegers used at $m = 1$and that Dabholkar, Murthy, and Zagier developed for meromorphic Jacobi forms, ones that encode stringy black holes. Subtract these finitely many corrections, and the corrected function transforms by a twisted index $m$ elliptic law; a single translation removes the twist; and after subtracting the remaining local polar parts, what survives is holomorphic and decomposes into finitely many theta functions, $2m$ of them.

The contrast with the classical story is the point. At $m = 1$, the obstruction to modularity was transcendental: Zwegers had to add a non-holomorphic period integral, and mock modularity was born. At $m\geq 2$, the obstruction to ellipticity is a polynomial, and partial fractions suffice. The paper also identifies the geometric carrier of the whole structure: an explicit meromorphic Jacobi form, a quotient of Dedekind eta and Jacobi theta functions, with exactly the same elliptic law and the same torsion-pole geometry that the higher Dyson recurrence generates on its own. The recurrence, in other words, secretly knows Jacobi’s geometry.
We are careful about what is proved and what is open. The theorems establish the elliptic structure: the finite defect, the canonical corrections, and the finite theta decompositions, with the first genuinely new case, $m = 2$, level 5, the deviation sequence above, worked out explicitly. The modular properties of the resulting theta coefficients, whether they are modular, mock modular, or something new again, are deliberately left for future work. Dyson asked in 1987 that the exploration be carried a great deal further. This paper carries it into new territory; the territory’s map is not yet finished.
What AxiomProver did
This paper is a human–AI collaboration; the AI contributed to the discovery, not only the verification. The higher Dyson systems sit beyond the reach of the classical theory, and their analytic structure was genuinely unknown when we began. In the exploratory stage, AxiomProver, the AI system for mathematical research we are developing at Axiom Math, and the authors proposed candidate structures, tested them, discarded them, and refined them, until the elliptic correction mechanism described above emerged. The broader analytic and conceptual framework is the work of the human authors; the search that led to it was shared.
AxiomProver’s second role was the one our readers know: machine verification. The construction depends on a long chain of delicate identities, finite recurrences, root-of-unity phases, product normalizations, partial-fraction residues, correction-kernel shift laws, elliptic transformation multipliers, in which a single dropped sign or misplaced exponent would silently destroy the entire structure. We isolated the new identities as a list of Key Formulas and asked AxiomProver to formalize and prove them in Lean 4 with Mathlib. The final proofs are fully sorry-free. The verification is organized in four batches that compose into a single conditional chain, the core q-series algebra; the defect-clearing and partial fractions; the elliptic assembly; and the kernel shift laws, with the classical analytic inputs (convergence and summability) supplied as explicit hypotheses rather than proof obligations. We formalized the new algebraic core of the paper, not the paper wholesale, and the input and output files for every batch are public. A research paper is a narrative written for people; a Lean file is written to satisfy a proof- checking kernel. In this project the two play complementary roles: the Lean development guarantees that the algebraic backbone of the theory is correct, and the paper — and this post — tell the story of what it means. Somewhere in the lost notebook, one suspects, there is a page we have not yet understood.
Paper and code
- Paper: “Beyond Mock Modularity: Elliptic Corrections for Higher Dyson Ranks,” by Claudia Alfes, Ken Ono, and Ashvin Swaminathan.
- arXiv: https://arxiv.org/abs/2607.13159
- AxiomProver Repo: https://github.com/AxiomMath/HigherDyson