AdS$_3$/RMT$_2$ Duality

We introduce a framework for quantifying random matrix behavior of 2d CFTs and AdS$_3$ quantum gravity. We present a 2d CFT trace formula, precisely analogous to the Gutzwiller trace formula for chaotic quantum systems, which originates from the $SL(2,\mathbb{Z})$ spectral decomposition of the Virasoro primary density of states. An analogy to Berry's diagonal approximation allows us to extract spectral statistics of individual 2d CFTs by coarse-graining, and to identify signatures of chaos and random matrix universality. This leads to a necessary and sufficient condition for a 2d CFT to display a linear ramp in its coarse-grained spectral form factor. Turning to gravity, AdS$_3$ torus wormholes are cleanly interpreted as diagonal projections of squared partition functions of microscopic 2d CFTs. The projection makes use of Hecke operators. The Cotler-Jensen wormhole of AdS$_3$ pure gravity is shown to be extremal among wormhole amplitudes: it is the minimal completion of the random matrix theory correlator compatible with Virasoro symmetry and $SL(2,\mathbb{Z})$-invariance. We call this MaxRMT: the maximal realization of random matrix universality consistent with the necessary symmetries. Completeness of the $SL(2,\mathbb{Z})$ spectral decomposition as a trace formula allows us to factorize the Cotler-Jensen wormhole, extracting the microscopic object $Z_{\rm RMT}(\tau)$ from the coarse-grained product. This captures details of the spectrum of BTZ black hole microstates. $Z_{\rm RMT}(\tau)$ may be interpreted as an AdS$_3$ half-wormhole. We discuss its implications for the dual CFT and modular bootstrap at large central charge.


Introduction
To establish whether AdS 3 pure gravity exists, one must understand the random matrix behavior of its black hole microstates.
Such is the view suggested by recent work on holographic duality in low dimensions, both for the AdS 3 quantum theory and its semiclassical limit. Perhaps the main justification comes from the celebrated JT/RMT duality in two bulk dimensions [1], in which the boundary theory is an ensemble of (double-scaled) random matrices. This work (and its dilaton gravity generalizations, e.g. [2][3][4][5][6]) was a combined evolution of earlier works drawing direct connections between black hole dynamics and random matrix statistics in AdS/CFT [7,8] and the emergence of the SYK model as a tractable yet strongly-coupled quantum system [9][10][11][12][13]. In higher-dimensional holography, the boundary theory is a continuum conformal field theory (CFT), endowed with extra structure. For 2d CFTs, this structure includes locality, Virasoro symmetry and modular invariance of the torus partition function, but more generally is comprised of some set of fundamental bootstrap axioms. How is random matrix theory (RMT) "allowed" to manifest itself in the observables of an individual 2d CFT while respecting the necessary constraints?
We focus our attention on AdS 3 /CFT 2 henceforth, and the ongoing quest for AdS 3 pure gravity. 1 As is well-known, the natural idea [16] for computing the semiclassical bulk path integral with a single torus boundary (sum over all smooth bulk saddles M with ∂M = T 2 ) fails to produce a unitary result, instead carrying exponentially large negative degeneracies [17]: if a consistent partition function exists, something more must contribute. But what? Reckoning with path integral contours is not a simple endeavor in quantum field theory, much less in gravity. In the proposal of [5] -still fairly implicit, but currently the only one which preserves a spectral gap to the black hole threshold -what ostensibly fixes the problem is a specific infinite family of off-shell geometries (Seifert manifolds), whose circle reductions are identified with JT gravity backgrounds in the presence of defects. This gives an elegant hint of random matrices in AdS 3 pure gravity in the near-extremal regime.
Stronger hints come from wormholes. Two-boundary path integrals have been computed in JT/RMT duality: the double-trumpet wormhole, together with the all-orders genus sum over higher topologies, exhibits the famous RMT level repulsion in the ensemble-averaged density-density correlator [1]. After analytic continuation to complex temperature, the double-trumpet leads to a linear ramp in the spectral form factor (SFF); the wormholes with higher topology, exponentially suppressed in entropy, collectively initiate the transition from ramp to plateau [18][19][20]. In seeking an AdS 3 /CFT 2 lesson from (or version of) the JT/RMT ensemble duality, it is an AdS 3 analog of the double-trumpet geometry that one should understand. This was the motivation of Cotler and Jensen (CJ) [21], who computed the contribution of such a geometry -an off-shell, connected, two-boundary torus wormhole -to the AdS 3 gravity path integral. Let us call this Z CJ (τ 1 , τ 2 ). Being off-shell, the computation is non-standard, requiring the technique of constrained instantons instead of familiar-but-unavailable saddle point techniques.
The CJ result is at once highly mysterious, remarkably simple, and deceptively rich. It contains unmistakable signs of random matrices or 2d CFT avatars thereof: at leading order in the lowtemperature limit, Z CJ (τ 1 , τ 2 ) reproduces the universal result of double-scaled matrix integrals. It also contains infinite series of corrections that are apparently tied to modular invariance, and generalizes the RMT result to include spacetime spin. This indicates the presence of some underlying Virasoro generalization of RMT. Less clear was the sense in which an ensemble interpretation of the result is necessary, and if so, how this squares with reasonable expectations of the space of irrational 2d CFTs as a sporadic, generically discrete set of points. This constellation of ideas was playfully labeled "random CFT." Despite lacking a proper definition, this much was certain: whatever "random CFT" means, it ought to be relevant for holography.
In a chaotic 2d CFT in general, how do we extract random matrix behavior hiding within?
In a chaotic 2d CFT dual to AdS 3 pure gravity in particular, what does Z CJ (τ 1 , τ 2 ) mean?
Perhaps in spite of appearances, the CJ wormhole does not imply that the boundary dual of semiclassical AdS 3 pure gravity is an ensemble of large central charge CFTs. Given a microscopic large c CFT, by which we mean a c → ∞ limit of an unbounded sequence of irrational Virasoro CFTs {T c } with a suitable spectral gap, there may be a coarse-graining procedure or kinematic averaging (e.g. with respect to energy or time), as in quantum systems, which is compatible with the bulk wormhole computation. In general, bulk calculations that imply non-factorizing correlations between disconnected boundaries are agnostic about what kind of boundary averaging gives rise to this correlation [21][22][23]; we are not aware of an effective field theory calculation in AdS D≥3 gravity that singles out a boundary ensemble interpretation. Consistent with this are the notions explored in [24], which emphasized that the pertinent CFT phenomenon is not ensemble averaging, but apparent averaging, which arises essentially because of the chaotic nature of the high-energy spectrum in the large c limit. A nice discussion of this set of ideas is given in the Introduction of [25].
Condensing the above into a challenge for semiclassical AdS 3 holography, the goal is to show how the bulk theory can be dual to a microscopic large c CFT in a manner consistent with nonvanishing bulk wormhole amplitudes (or, perhaps, to show that it cannot). We emphasize that this is a challenge particularly posed by off-shell wormholes, as on-shell wormholes are instead fixed by suitable gluing of universal asymptotic CFT data (spectrum and OPE coefficents), which are themselves fixed by crossing symmetry in terms of low-energy inputs -insensitive to level statistics of black hole microstates. 2 Independent of applications to AdS 3 wormholes, we would like to develop a quantitative toolkit to derive emergent RMT physics from microscopic 2d CFT data. It may be useful to phrase this yet another way, using the vocabulary of the bootstrap approach to CFTs [29]. The modular and 2 Recent work establishes an impressive match between partition functions of individual saddle points of AdS3 gravity (possibly coupled to point particles) of some fixed topology, and certain boundary computations. The latter recast the partition function either as a moment problem of a (near-)Gaussian "large c ensemble" of CFT data [26] or using a unique topological quantum field theory [27]. (See [28] for further developments.) This extends earlier ideas about AdS3 gravity as an effective field theory, by incorporating a version of ETH for 2d CFTs [22,26] and allowing multiple disconnected boundaries. Because these works establish a match at the level of individual saddles, irrespective of the full sum over topologies and of level statistics, the questions of whether pure gravity exists and what its boundary dual is (e.g. ensemble or not) are of course not addressed.
conformal bootstrap have focused so far on constraining single-copy observables. This seems to obscure chaotic microstructure of the spectrum which is revealed in "two-copy observables" like the SFF. One would like to know whether the dip-ramp-plateau structure of the coarse-grained SFF of a chaotic CFT can be bootstrapped from a minimal set of CFT data. Lowering our sights by focusing on the linear ramp region, the CJ wormhole suggests a more specific program toward addressing this question vis-à-vis gravity: first, use the constraints of Virasoro symmetry and modular invariance to carve out the space of possible wormhole amplitudes; then, upon imposing the features of a 2d CFT dual to pure gravity in particular, determine where the CJ wormhole sits in this space. An emergence of RMT-like physics from this analysis would give one answer to what "random CFT" could mean in two dimensions, compatible with the necessary symmetry constraints.

Summary of results
This work makes some headway on these questions for generic c > 1 Virasoro CFTs and their AdS 3 gravity duals, guided in part by the theory of trace formulas for chaotic quantum systems, and by new perspectives on modular invariance.
We begin in Section 2 by recalling the SL(2, Z) spectral decomposition of torus partition functions of parity-invariant Virasoro CFTs (with no extra conserved currents) [30]. A key player in our framework is Z spec (τ ), a certain subtracted partition function, defined by removing "light" primary operators from the partition function in a modular-invariant way. Z spec (τ ) admits a decomposition into a complete SL(2, Z)-invariant eigenbasis. 3 We review some suggestive hints from AdS 3 gravity and Narain CFT about the physical meaning of Z spec (τ ).
In Section 3 we present a 2d CFT trace formula. It mimics the Gutzwiller trace formula for chaotic quantum systems, which we first review. To make the connection, we proceed to transform Z spec (τ ) to a microcanonical density of states. The total density of spin-j Virasoro primaries splits into two terms: ρ j (t) = ρ L,j (t) + ρ spec, j (t) , t := min(h, h) − c − 1 24 (1.1) One should think of the spectral density ρ spec, j (t) as having removed all self-averaging contributions ρ L,j (t) from the total density ρ j (t): it is supported only on the chaotic, "heavy" spectrum t ≥ 0, computing the difference between the exact density and the smooth asymptotic approximation to it. See Figure 1.
In seeking a possible analogy to quantum systems, the first term ρ L,j (t) would map to a mean density ρ(E), while the second term ρ spec, j (t) would map to ρ osc (E), an oscillatory part that can be expanded over periodic orbits. Indeed, such a relation can be made sharp: the SL(2, Z) spectral decomposition of ρ spec, j (t) is shown to take exactly the form of a Gutzwiller trace formula, for every fixed spin j (see (3.20)). Periodic orbits correspond to elements of the SL(2, Z) eigenbasis, labeled by SL(2, Z) spectral frequencies ω, with a clean identification of the orbit actions, periods and one-loop determinants for each element. An important aspect of this trace formula is that the SL(2, Z) eigenbasis, and hence the set of orbits, is complete. Figure 1: The density of heavy states ρ(t) of a compact CFT is highly oscillatory on wavelengths of order e −S Cardy (t) , the mean level spacing, while the modular completion of light states, ρ L (t), contains the smooth, universal Cardy-like growth (dashed line). Their difference, ρ spec (t), captures the oscillations, encoding level statistics. We have suppressed the spin index j.
With this in hand, we analyze correlations and define a coarse-graining procedure in analogy to Berry's diagonal approximation. Coarse-graining a product of spectral densities over mean twist correlates the two copies by pairing the SL(2, Z) eigenvalues -a 2d CFT analog of restricting the double sum over orbits to those of equal action. We define a diagonal partition function, Z diag (τ 1 , τ 2 ), by projecting the factorized product Z spec (τ 1 )Z spec (τ 2 ) onto the kernel of a difference of Laplacians, thus correlating the eigenvalues of basis elements.
In Section 4, we analyze Z diag (τ 1 , τ 2 ) for general chaotic 2d CFTs, culminating in a necessary and sufficient condition for the coarse-grained spectral form factor (SFF) to exhibit a linear ramp. In chaotic quantum systems, the SFF, call it K β (T ), famously exhibits a linear ramp at times T β, with coefficient controlled by the particular RMT ensemble governing the late-time dynamics. The diagonal approximation to the SFF is designed to capture this ramp behavior. Having constructed a diagonal partition function for 2d CFTs, with self-averaging terms judiciously subtracted, we are in position to show the same.
Focusing on the scalar Fourier mode of Z diag (τ 1 , τ 2 ), it is fully determined by a function we call R(z), defined as the inverse Mellin transform of |(Z spec , E s )| 2 , the squared spectral overlap of Z spec (τ ) with the Eisenstein series E s (τ ). The variable z := y 1 /y 2 is the ratio of inverse temperatures y i := Im(τ i ). Passing to SFF kinematics via y 1 = β + iT and y 2 = β − iT , we show that the coarse-grained SFF exhibits a linear ramp at times T β if and only if R(z) has a simple pole at z = −1, with the correct RMT residue: The constant C RMT sets the RMT ensemble (for example, C GOE = 2). This simple pole may be recast as a straightforward falloff condition (4.23) on the partition function in SL(2, Z) spectral --1 −1 Figure 2: Off-shell wormhole amplitudes Z WH (τ 1 , τ 2 ) in semiclassical AdS 3 gravity are fixed by a single function R(z), where y i = Im(τ i ) are inverse temperatures. The colored contours show Euclidean and Lorentzian kinematics in the low-temperature limit. The spectral form factor (SFF) has a linear ramp at times T β if and only if R(z) has a simple pole at z = −1 (see (1.2)).
In Section 5 we prepare for our descent into the wormhole.
First staying on the CFT side, we introduce an enhanced diagonal projection of Z spec (τ 1 )Z spec (τ 2 ) which pairs SL(2, Z) eigenfunctions, not just eigenvalues (there are degeneracies between Eisenstein series and Maass cusp forms). This is defined by projecting onto the kernel of a difference of SL(2, Z) Hecke operators, T , for every spin j ∈ Z + : we call this Hecke projection, and the corresponding partition function Z Hecke (τ 1 , τ 2 ). From the point of view of the trace formula and periodic orbit theory, Hecke projection does the job of properly pairing identical orbits. We are proposing Hecke projection as an enhanced form of coarse-graining in 2d CFTs. One may view Z Hecke (τ 1 , τ 2 ) as carrying enhanced symmetry and arithmeticity, annihilated as it is by an infinite set of commuting Hecke operators.
There is a satisfying synergy of this proposal with off-shell AdS 3 torus wormholes. In particular, torus wormhole amplitudes Z WH (τ 1 , τ 2 ) exhibit precisely the functional form of Z Hecke (τ 1 , τ 2 ). This signals that wormholes may be viewed microscopically, understood as coarse-grained two-copy partition functions of underlying chaotic CFTs. This forms the basis of our "wormhole Farey tail": that is, the interpretation of bulk wormhole amplitudes Z WH (τ 1 , τ 2 ), constructed as SL(2, Z) image sums over large diffeomorphisms, as gravitational duals of Z Hecke (τ 1 , τ 2 ) in large c CFTs.
Let us expand on this slightly. In a diffeomorphism-invariant theory of semiclassical gravity, a wormhole amplitude Z WH (τ 1 , τ 2 ) that is independently modular-invariant with respect to both τ 1 and τ 2 can be constructed as an SL(2, Z) Poincaré sum of a suitable seed function: the SL(2, Z) transformations at the boundary implement the action of large bulk diffeomorphisms. This is a multi- Figure 3: The Cotler-Jensen wormhole Z CJ (τ 1 , τ 2 ) is obtained by gluing two single boundary partition functions Z RMT (τ 1 ) and Z RMT (τ 2 ). Each factor may be interpreted as a half-wormhole in AdS 3 pure gravity. The gluing is performed by coarse-graining over the spectrum of the dual CFT: the (Hecke) projection P projects the factorized product onto the diagonal terms with respect to the SL(2, Z) spectral basis, analogously to trace formulas for non-disordered chaotic systems.
boundary generalization of the familiar black hole Farey tail for thermal partition functions [16,31,32]. Taking this as one definition (given more precisely in Subsection 5.2) of an off-shell torus wormhole , we prove that Poincaré sums of this form enjoy a few remarkable properties. Among others, Z WH (τ 1 , τ 2 ) is even more constrained than a generic Hecke projection: its Eisenstein and cusp form spectral overlaps are functionally equal, leading to a highly-constrained functional form in spectral space, where C crit defined in (2.6) denotes the straight contour s = 1 2 +iR. Given a Z spec (τ ) of an underlying CFT, the overlaps are simply The form of (1.3) makes manifest that wormhole correlations are diagonalized by the SL(2, Z) spectral basis. Since diagonality is basis-dependent, this affirms the SL(2, Z) spectral decomposition as a proper trace formula for 2d CFT.
In Section 6 we turn to AdS 3 pure gravity and the CJ wormhole. This was derived in [21] to be a Poincaré sum of the above type. Its spectral overlap is very simple, a product of gamma functions. In terms of the function R(z) defined earlier, R CJ (z) not only contains the pole (1.2) that generates the linear ramp -it is exactly equal to it. Moreover, the corrections prescribed by Virasoro and SL(2, Z) are exactly those found in [21].
This analysis tells us that the CJ wormhole is extremal within the space of admissible wormhole amplitudes, in the following quantitative sense. Having incorporated the requisite Virasoro symmetry and modular invariance -that is, upon "quotienting" by the symmetries of 2d CFTs and wormholes -the amplitude is determined solely by the function R(z). The CJ wormhole of AdS 3 pure gravity then sets R(z) exactly equal to the double-scaled RMT result. This signature of pure gravity is what we call MaxRMT: the maximal realization of random matrix universality consistent with Virasoro symmetry and modular invariance. The fact that pure gravity exhibits MaxRMT statistics may be viewed as extending the hallmark maximal chaos of pure gravity in the semiclassical, early-time regime of Lyapunov chaos [33] to the quantum, late-time regime as defined by RMT. We expand on this and make related comments in Subsection 6.2.
That our formalism fits the CJ wormhole like a glove strongly indicates that the wormhole may be interpreted in terms of a microscopic 2d CFT dual, compatible with a traditional holographic interpretation for semiclassical AdS 3 pure gravity. The wormhole is coarse-grained in the manner dictated by the trace formula, which diagonalizes the CJ wormhole exactly how periodic orbits diagonalize the ramp in chaotic systems.
With this understanding, in Subsection 6.3 we take a step further by leveraging the completeness of the SL(2, Z) spectral eigenbasis to factorize the CJ wormhole into its constituent components: see Figure 3. We call the resulting microscopic partition function Z RMT (τ ). The result is unique and fully explicit, given in (6.16). Z RMT (τ ) captures exponentially suppressed fine structure of the black hole spectrum of AdS 3 pure gravity. As is perhaps clear from these results, Z RMT (τ ) may be meaningfully viewed as a half-wormhole of pure gravity. We substantiate this with comparison to 2d gravity half-wormholes, broken cylinders and branes. One intriguing aspect is that Z RMT (τ ) carries a conspicuous erratic phase: its spectral overlap is dressed by a Riemann zeta phase φ(ω) = arg(ζ(1 + 2iω)). This is a property of Z spec (τ ) in general. The Riemann zeta function is a famously quantum chaotic object [34][35][36][37][38], and φ(ω) varies wildly along the line ω ∈ R (see Figure 5); upon gluing to form a wormhole, the phases cancel. This nicely exhibits the erratic nature expected of a higher-dimensional generalization of half-wormholes.
The identification of Z RMT (τ ) means that the torus partition function of the putative 2d CFT dual to semiclassical AdS 3 pure gravity, call it Z grav (τ ), takes the following form: (1.5) Z MWK (τ ) is the sum over smooth bulk saddles. The last term, δZ RMT (τ ), accounts for as-yetundetermined corrections to the spectral statistics; we explain why this term must be nonzero due to unitarity, and sketch its origins from the point of view of wormholes and string theory. The partition function (1.5) also jibes nicely with the proposal of Maxfield and Turiaci [5]. The inclusion of level statistics of heavy operators poses an interesting challenge for the large c modular bootstrap of 2d CFTs.
We end the paper with a discussion of some future directions, a glossary of partition functions defined in this work, and appendices with details complementing the main text.

Groundwork
We begin by briefly recalling some notions in the spectral theory of the Laplacian on the fundamental domain F = H/SL(2, Z) and their application to 2d CFTs. For more detailed treatments and background, see [30,39,40]; for follow-up work, see [41,42]. We mostly use conventions of [40].

Lightning review of SL(2, Z) spectral theory in 2d CFT
A square-integrable, SL(2, Z)-invariant function admits a spectral decomposition in a complete SL(2, Z)-invariant eigenbasis with three branches: is the completed Eisenstein series evaluated on the critical line, φ n (τ ) is an infinite discrete set of Maass cusp forms labeled by n ∈ Z + , and φ 0 is the constant function. We define square integrability with respect to the Petersson inner product with hyperbolic measure dx dy/y 2 where τ := x + iy. The cusp forms are unit-normalized. The respective Fourier decompositions are 4 There are also Maass cusp forms odd under x → −x, but they are not relevant for the applications ahead. The Eisenstein series has Fourier coefficients a (s) Its scalar mode can be formally obtained as a smooth j → 0 limit of the spinning modes (see Appendix C), where Λ(s) = π −s Γ(s)ζ(2s) = Λ 1 2 − s is the completed Riemann zeta function. The cuspidal spectral parameters ω n and Fourier coefficients b (n) j are sporadic real numbers with no known analytic expression. The multiplicity of Maass cusp forms at a given eigenvalue is conjecturally bounded above by one, i.e. the spectrum is "simple" (e.g. [43]).
Given an f (τ ) ∈ L 2 (F), the spectral decomposition is where we integrate over the critical line, The (completed) Eisenstein overlaps are where (f, E s ) is the Petersson inner product. The constant term, f , is the "modular average" of f (τ ) over F. In the remainder of this work, we focus on parity-invariant CFT observables, so the sum over cusp forms is taken over even cusp forms only, with n ∈ Z + . We will occasionally find it useful to write the spectral decomposition in a unified notation as are the eigenfunctions andf ω := (f (τ ), ψ ω (τ )) is a shorthand for the spectral overlap.
Consider now the torus partition function Z(τ ) of a general (non-holomorphic) parity-invariant 2d CFT, which we assume to have only Virasoro symmetry with c > 1. The primary partition function, which strips off Virasoro descendants 5 while preserving modular invariance, is defined by In [30], it was shown that Z p (τ ) can be written in a manifestly modular-invariant way:

10)
Z L (τ ) is the "modular completion" of light states, defined as follows. First, one constructs the partition function of light primaries where in terms of conformal weight ∆ and spin j, and q = e 2πiτ . One subsequently "completes" this into a modular-invariant function Z L (τ ) by suitably adding heavy states. A convenient, and physically distinguished, mode of modular completion is to perform a Poincaré sum over SL (2, Z) images [16,31,32,44]: We have modded out by Γ ∞ , the set of T -transformations, under which the summand is invariant (thanks to spin-quantization). Having explicitly constructed Z L (τ ), we can define Z spec (τ ) by subtraction, which is square-integrable and thus admits an SL(2, Z) spectral decomposition: (2.14) Whereas Z L (τ ) contains the leading-order Cardy asymptotics of Z p (τ ) -namely (but not only) the identity block and its modular images -Z spec (τ ) instead probes the chaotic, high-energy spectrum. We will make this sharper below. Note that Z spec (τ ) has support only on heavy states, but it indirectly "knows about" the light states of the CFT because of the modular completion used to define it; while modular completion is not unique, we will utilize Poincaré summation in explicit computations throughout the paper.
We point out that the analog of Z spec (τ ) would be trivial in a holomorphic (or holomorphically factorized) CFT, where the spectrum of states with h > c/24 is determined by its complement; this inherent non-holomorphicity is useful for focusing on generic irrational 2d CFTs and their gravity duals (as opposed to toy models such as chiral gravity).

Two technical remarks
In our expressions for Z spec (τ ), we henceforth set the modular averages Z spec to zero. For Virasoro CFT partition functions (2.10), this is just a choice of convention to "put" the constant in Z L (τ ) rather than Z spec (τ ): a c-number constant may be freely shuffled between the two terms while keeping Z p (τ ) fixed. 6 This choice is motivated by the fact that a constant's contribution to a microcanonical density of states is self-averaging under coarse-graining in energy -a concept that will show up later. Moreover, we note that in many cases of interest, such as the Narain case to be reviewed in Subsection 2.2, Z spec = 0.
Note that in (2.11) we have defined "light" operators with respect to the twist threshold, min(h, h) ≤ ξ, rather than the dimension threshold, ∆ ≤ 2ξ. The latter is more commonplace, and was used in the original definition of [30]; moreover, from the mathematical point of view, one need only subtract the operators with ∆ ≤ 2ξ from Z p (τ ) in order for Z spec (τ ) to be square-integrable. On the other hand, operators with min(h, h) ≤ ξ -dubbed "censored" operators in [32] -are not part of the black hole spectrum of AdS 3 pure gravity, and more generally, the chaotic spectrum of a 2d CFT (as it is currently understood). Though mathematically unnecessary, it is physically well-motivated to define Z L (τ ) and hence Z spec (τ ) with respect to the twist threshold in the manner above, and we will do so in view of the applications of present interest. 7 See [42] for similar comments.

Hints
To better understand the physical significance of the two pieces Z L (τ ) and Z spec (τ ), the authors of [30] studied the partition function of Narain CFT in this formalism. Let us review a few of the lessons gained. A Narain CFT of c free bosons has a local U (1) c × U (1) c symmetry, and moduli which we collectively denote as m.
The first term is the partition function averaged over moduli, and the second term is the spectral partition function. This expression displays two interesting features: • The modular completion of light states is equal to the average over Narain moduli space: The only primary in Narain CFT that is light with respect to the U (1) c primary threshold, with min(h, h) ≤ (c − c currents )/24 = 0, is the vacuum itself: the Eisenstein series is simply the Poincaré modular completion of the vacuum state [47,48].
• The spectral decomposition averages to zero under both modular and ensemble averages: Thus Z (c) spec (τ |m) captures deviations from the average over moduli space. These deviations encode the higher statistical moments of the Narain ensemble, e.g. the variance A study of these correlations was undertaken in [49,50].
Extrapolating these properties to arbitrary 2d CFTs suggests [30] that Z L (τ ) is an average partition function of some kind, capturing universal contributions of light states to the heavy spectrum implied by crossing. The same picture is suggested by the MWK partition function, the sum over smooth semiclassical saddles of AdS 3 gravity and fluctuations around them, which is a (regularized) modular completion of the vacuum and its SL(2, R) null descendants: in particular, this 7 Due to cosmic censorship, states with h < ξ but h > ξ are dual to neither black holes nor conical defects in gravity. The most familiar such states are multi-twist composites of light primaries with min(h, h) < 3 4 ξ: these composites live on Regge trajectories which asymptote, at large spin, to the Virasoro Mean Field Theory spectrum [46]. This demonstrates that a 2d CFT may have an infinite number of operators with min(h, h) ≤ ξ, whereas the number of operators with ∆ ≤ 2ξ is strictly finite (at finite ξ). The sum (2.11) may thus require regularization. The same is in fact true for the Poincaré modular completion of even a single state [16,32]. sum generates the smooth, Cardy asymptotics (and non-perturbative corrections thereto) present in any large c CFT density of states. Somewhat similar ideas were subsequently suggested in [24], motivated by chaos. In such a picture, these universal contributions would encode leading-order coarse-grained data of the original CFT. The remainder, Z spec (τ ), would capture fine-grained fluctuations. For example, one might average the product Z spec (τ 1 )Z spec (τ 2 ), à la (2.18), to extract statistical correlations among microstates.
The challenge in making this precise is to extend it to the generic Virasoro setting, sans moduli, and to find a coarse-graining of CFT data which behaves like an average in the above sense. In the next section we will realize a version of this idea for generic 2d CFTs.

Coarse-graining and Trace Formulas
We start by briefly introducing the Gutzwiller trace formula [51] for chaotic quantum systems which provides useful physical intuition about the density of states of individual non-disordered chaotic systems. We show that the SL(2, Z) spectral decomposition of the density of states is directly analogous to a trace formula. This leads us, via a coarse-graining procedure, to an analog of Berry's diagonal approximation for 2d CFT [52].

Trace formulas for chaotic systems
A well-understood example of quantum chaos is the semiclassical dynamics of few-body quantum systems which are classically chaotic; for a review of trace formulas, see [53][54][55][56]. 8 The Gutzwiller trace formula expresses the density of states in the semiclassical limit as is a mean density. ρ osc (E), the oscillatory part, is given by a sum over semiclassical periodic orbits γ, S γ (E) is the orbit action and A γ is called the stability amplitude. The statistical correlations among energy levels are encoded in the highly oscillatory behavior of ρ osc (E), and can be extracted by microcanonical coarse-graining over an energy window δE.
One notable application of the trace formula is the computation of the coarse-grained microcanonical spectral form factor, where T is real Lorentzian time. Inserting the trace formula, In the theory of chaotic quantum systems, the difference between periodic orbit actions ∆S = S γ 1 − S γ 2 is the central quantity which allows one to systematically organize the sum over orbits. Periodic orbits with ∆S = 0 give the leading diagonal contribution to level statistics. 9 Berry [52,57] showed that the diagonal approximation, which restricts the sum to γ 1 = γ 2 , reproduces the linear ramp as T → ∞: (3.5) The factor C RMT controls the universality class of random matrix behavior (e.g. C GUE = 1 and C GOE = 2).
Berry's analysis extracts the random matrix behavior of an individual chaotic quantum system, with no ensemble averaging, from the oscillatory behavior of the density of states. While the original double sum over orbits is manifestly factorized, the diagonal approximation exhibits an emergent non-factorization, by discarding microscopic details of the spectrum. 10

A trace formula for 2d CFT
Is there a decomposition of a 2d CFT density of states of the form (3.1), with the structure (3.2)? As it happens, the SL(2, Z) spectral decomposition does the trick.

Density of states
The density of primary spin-j states ρ j (∆) in a parity-invariant CFT is defined as The lower bound is set by unitarity. It will be convenient to introduce the "reduced twist" t, defined as [15] t : As a first step toward a trace formula, let us transform the spectral decomposition (2.5) into the microcanonical ensemble, decomposing the density as By inverse Laplace transform, we obtain a manifestly modular-invariant decomposition The basis elements are given for j = 0 by and for j = 0 by Note that ρ * 1 2 +iω,0 (t) may be obtained as the j → 0 limit of (3.10) (see Appendix C). 11 Let us make a few comments about the physical features of these formulas. While ρ j (t) is a sum of delta functions in a compact CFT, both ρ L,j (t) and ρ spec, j (t) are continuous functions of t. The latter is highly oscillatory, with the spectral parameters {ω, ω n } appearing as frequencies in the basis elements (3.10) (hence the notation). We can understand this oscillatory behavior as follows. In the asymptotic spectrum (or for t ξ in sparse large c CFTs [61]), the mean level spacing of ρ j (t) is approximately e −S Cardy,j (t) , the inverse of the spin-j Cardy degeneracy, where Because ρ L,j (t) is continuous and has exponential Cardy growth at t → ∞, ρ spec, j (t) must oscillate over extremely small wavelengths, of the order of the mean level spacing, to encode the microscopic information about the discrete spectrum. 12 See Figure 1.
11 In a more symmetric notation, if we definet = max(h, h) − ξ then and likewise for ρn,j(t). 12 A nonzero constant term Zspec in the spectral decomposition would contribute microcanonically as δ0,j Zspec 2/t. This is not oscillatory, so we associate it with ρL,0(t), cf. Subsection 2.1.

Trace formula
As explained above, ρ L,j (t) has smooth exponential growth in t, whereas ρ spec, j (t) is a sum/integral over infinitely many oscillatory terms. This dichotomy suggests a direct analogy with trace formulas, with an identification along the following lines: This is to be understood as holding at every fixed spin j.
In fact, this can be made quite precise. Let us return to the Gutzwiller trace formula in (3.2). The stability amplitude is canonically decomposed into two pieces: while A γ is a one-loop determinant. We notice that the basis densities (3.10) can be written precisely as contributions of individual periodic orbits. Using ρ 1 2 +iω,j (t) to denote either ρ * 1 2 +iω,j (t) or ρ n,j (t), we have with the following identifications: j ) Fourier coefficient. The above identifications of the different terms in (3.17) follow simply from demanding that S ω,j (t) ∈ R for ω ∈ R, and that the j → 0 limit is smooth for each individual piece. In particular, this instructs us to include ω log j in the action S ω,j (t), giving rise to the following identifications at j = 0: Denoting A * ω,j and A n,j as the specialization of A ω,j to Eisensteins and cusp forms, respectively, we land on the rewriting of the SL(2, Z) spectral decomposition as a trace formula for 2d CFTs: This holds for any fixed j.
A key fact about this formula, to be used later, is that the set of orbits forms a complete and explicit (SL(2, Z)-invariant) eigenbasis: given a determinant factor A ω,j , one can uniquely reconstruct the corresponding orbit.
A small but notable point is that A ω,j is complex by a pure phase. This is reminiscent of something in periodic orbit theory: there exists a phase, the so-called "Maslov phase" e i π 2 µγ , that one can choose to absorb into A γ rather than S γ (E) such that S γ (E) ∈ R. 13 This suggests that we identify a CFT analog of the Maslov index, call it µ ω,j , defined so that A ω,j e i π 2 µ ω,j ∈ R: While (3.21) is so far intended to be a purely functional observation, it raises the obvious question of the physical meaning of this CFT Maslov index. In any case, we see that the identification (3.18) admits a non-trivial compatibility with the analytic structure of periodic orbits of quantum systems, revealed by imposing smoothness of the j → 0 limit.
Before making use of this 2d CFT trace formula, we pause to comment on the relation to trace formulas more broadly. The Gutzwiller trace formula can be applied only for systems which admit a semiclassical limit. On the other hand, the SL(2, Z) spectral decomposition is valid for any 2d CFT. Moreover, the Gutzwiller trace formula, when applicable, describes only the high energy (E 1) part of the spectrum, while the spectral decomposition is valid for all energies above threshold, thanks to the inherent distinction between light and heavy states due to modular invariance. In these respects, the spectral decomposition is more similar to the Selberg trace formula, an exact relation between the spectrum of the automorphic Laplacian on hyperbolic quotient manifolds and their classical periodic orbits. Nevertheless, we frame the analogy with respect to Gutzwiller, which is more generally applicable, in order to emphasize the universal structure of the SL(2, Z) spectral decomposition.

Berry's diagonal approximation for 2d CFT
We now proceed analogously to the treatment of spectral correlations in chaotic systems, treating one-and two-point density correlations in turn.
For periodic orbits, averaging over a large enough energy window smooths out the oscillatory part of the density of states, Let us define a microcanonical coarse-graining by convolution against a window function W (t − t ): In analogy to (3.22), the density of states ρ spec, j (t) averages to zero under microcanonical coarsegraining over a large enough window δt. 14 To show this, we use that the spectral decomposition is convergent which allows us to average directly over the basis elements. For concreteness, we choose our window function W (t) to be the characteristic function over the interval (t − δt, t + δt). A single basis element vanishes upon coarse-graining: This shows that ρ spec, j (t) = 0 (3.25) and hence ρ j (t) = ρ L,j (t). The density of light states ρ L,j (t) is self-averaging, as its behavior in its argument is exponential rather than oscillatory.
We now turn to the two-point function and statistical correlations. Again following a standard approach in quantum chaos, we define the microcanonical coarse-graining for the product of two densities by integrating over the mean twist t = t 1 +t 2 2 while keeping the difference = t 1 −t 2 2 fixed: Coarse-graining over the product of basis densities produces The terms involving the sum of actions are smoothed out to zero, Instead, terms involving the difference in actions ∆S = S ω 1 ,j 1 − S ω 2 ,j 2 can give large contributions if the actions cancel. We will concentrate on the leading terms, with ∆S = 0: this is the analog of Berry's diagonal approximation.
To see what this approximation means in the case of 2d CFT, we choose to consider the Fourier mode of equal spins, j 1 = j 2 = j. Performing microcanonical coarse-graining then selects the terms with ω 1 = ω 2 , where we inserted the periods (3.18), and took → 0. Thus, the diagonal approximation is obtained by projecting the product of SL(2, Z) spectral decompositions onto terms with equal eigenvalues ω 1 = ω 2 : all others are de-phased, coarse-graining to zero. We call the resulting diagonal density ρ diag (t 1 , t 2 ). Having derived this, all spin sectors (j 1 , j 2 ) are fixed by SL(2, Z)-invariance of the full density, in terms of the respective basis densities of the Eisensteins and cusp forms: There are cross-terms because of the spectral degeneracy between cusp forms and Eisenstein series at ω = ω n . These cross-terms pair distinct orbits with the same action S ω,j (t) but different one-loop determinants A ω,j ; an enhanced diagonal approximation that pairs only identical orbits will be examined in Section 5.
We point out that the density is not diagonal in spin: ρ This is a manifestation of the general fact that modular invariance correlates different spin sectors of 2d CFT data. In Appendix D we give a quick proof that diagonality in spin is incompatible with modular invariance. In contrast, one expects different spin sectors to be statistically independent in generic chaotic systems.

Diagonal projection
Having established the eigenvalue pairing by coarse-graining using the trace formula, we rigorously define the diagonal approximation in the canonical ensemble. The density ρ diag (t 1 , t 2 ) corresponds, in the canonical ensemble, to the following diagonal partition function: The Laplace eigenvalues of the SL(2, Z) eigenbasis elements are paired. This is the diagonal projection, Z diag (τ 1 , τ 2 ), of the factorized product Z spec (τ 1 )Z spec (τ 2 ). To formalize this, consider the operator acting on functions f (τ 1 , τ 2 ) ∈ L 2 (F × F), the space of square-integrable functions of two moduli τ 1 , τ 2 valued in F. Such functions admit a double spectral decomposition in a joint basis of eigenfunctions. 15 Since f (τ 1 , τ 2 ) has paired eigenvalues if and only if ∆ 12 f (τ 1 , τ 2 ) = 0 for all τ 1 , τ 2 , we can define Z diag (τ 1 , τ 2 ) as the diagonal projection of Z spec (τ 1 )Z spec (τ 2 ) onto ker(∆ 12 ), the kernel of ∆ 12 : . Factorization can be explicitly restored by including the off-diagonal terms. In Section 6.3 we will develop an analogy to the approach to factorization in 2D gravity and random matrix theory.

The Structure of Z diag in Chaotic CFTs
Having identified a 2d CFT trace formula using the SL(2, Z) spectral decomposition of partition functions, we presented a framework for studying coarse-grained CFT correlations with modular invariance and Virasoro symmetry baked in, focusing on the diagonal approximation in particular. We now analyze general properties of the diagonal partition function Z diag (τ 1 , τ 2 ) and the implications of chaos for the CFT. This will lead to a necessary and sufficient condition for the presence of a linear ramp in the spectral form factor (SFF).
The diagonal partition function Z diag (τ 1 , τ 2 ) admits a double-Fourier decomposition In this section we specialize to the scalar sector, (j 1 , j 2 ) = (0, 0). Besides reasons of clarity and simplicity, we do so because we will later consider a special class of amplitudes -namely, wormhole amplitudes -which are fully determined by the scalar sector.
In the spectral basis, where we have written the integral over the critical line explicitly. Inserting the zero mode and using symmetry under reflections s → 1 − s yields where we have defined r := √ y 1 y 2 , z := y 1 y 2 (4.5) Recall that |f (s)| 2 := f (s)f (1 − s) on the critical line. We can write this as are inverse Mellin transforms of the squared overlap, defined in general as The contour C is a vertical contour within the critical strip of the inverse Mellin transform [62], which for our purposes may be taken to be Re s = 1 2 . 16 Lest it appear that there are two independent functions in (4.6), we emphasize that S(r −2 ) is completely determined by R(z), since the latter may be used to reconstruct |(Z spec , E s )| 2 . This determinism can be formalized using techniques of Mellin convolution (see Appendix E), giving where φ(n) is the Euler totient function. An equivalent representation in terms of residues of R(z), given in (E.11), may be obtained by blowing up the contour. So in total, Note the z → 1/z inversion symmetry of √ zR(z), inherited from the inverse Mellin transform.
The above expressions are valid for all temperatures. We now take the low-temperature limit: This limit includes two physically distinct regimes of interest (see Figure 2), depending on how we take y i to infinity in the complex plane: • In "Euclidean" signature where y i ∈ R, this is a low-temperature limit, and z ∈ R + .
• In Lorentzian signature, analytically continuing as one does to construct the SFF, (4.12) The limit (4.11) is a simultaneous late-time/low-temperature limit of T 1 and fixed T /β, with z ∈ H on the unit circle: In either case, applying the limit (4.11) to (4.4), we must deform the contour of the second term to the left. Consequently the S(r −2 ) term is subleading: 17 This result is interesting. First, the behavior is universally linear in r. More importantly, since R(z) fixes the entire function Z (0,0) diag (r, z) via (4.10), the leading result at low temperatures fixes the result at all temperatures. Indeed, it fixes the entire Eisenstein part of Z diag (τ 1 , τ 2 ). As we will see later, for two-copy partition functions with enhanced symmetries, R(z) fixes the function completely.

A condition for a linear ramp
The spectral form factor, K β (T ), is defined for quantum systems as where Z(β + iT ) = Tr e −(β+iT )H is the analytically-continued sum over states. In 2d CFT, it is cleaner to account for Virasoro descendants by defining the SFF with respect to the Virasoro primary partition function, where the brackets denote a coarse-graining of some kind. The prefactor, which amounts to stripping off the √ y 1 y 2 coming from using the primary partition function (before analytic continuation), is a useful convention for the late-time limit and contact with previous literature (e.g. [7,8,21]).
We can also define a SFF using Z spec (τ ) instead, Now, since Z spec (τ ) and Z p (τ ) differ only by terms which contribute to the slope/dip of the SFF [63,64], 18 the difference between K spec (β; T ) and K β (T ) vanishes at late times: Our spectral formalism is tailor-made to study the SFF in the late-time regime: the quantity Z diag (τ 1 , τ 2 ), constructed from Z spec (τ ), is designed precisely as a coarse-grained product of partition functions in the diagonal approximation, whose point is to produce the ramp. So our claim is that where Z diag (β; T ) is the analytic continuation of Z diag (τ 1 , τ 2 ) to SFF kinematics. (Implicitly, here and below, T is bounded above by the plateau time.) Starting from Z diag (τ 1 , τ 2 ), we construct the SFF by analytically continuing as in (4.12). Denote the spin-graded SFF as K (j 1 ,j 2 ) β (T ). We specialize to the case (j 1 , j 2 ) = (0, 0), whereupon (4.14) and 18 This is because the difference, ZL(τ ), is a sum over self-averaging quantities. (If ZL(τ ) sums over an infinite set of light operators, we are assuming that this sum can be regulated.) Supporting arguments from other perspectives can be found in the literature. In 2D gravity, the ramp is generated by a new bulk saddle [8], with similar arguments for one-point wormholes [65] and in higher dimensions [7,8]. It was argued in [63,64] in the AdS3 context that Poincaré completions of individual operators (i.e. sums over smooth saddles) contribute only to the dip. In the Poincaré completion of individual light states, the modular images are self-averaging, with a density that is a sum of smooth functions growing exponentially in energy (see e.g. eq. (2.3) of [15]). Similar arguments can be made for enigmatic AdS3 black holes, which are also smooth saddles (when they exist).

(4.19) imply that
We now impose the ramp. From (4.13) and (4.20), the presence of a linear ramp is equivalent to the presence of a simple pole in the analytic continuation of R(z) to z = −1: C RMT is a constant that fixes the choice of RMT ensemble governing the ramp. 19 Since R(z) is simply the inverse Mellin transform (4.7) of the spectral overlap, the pole condition (4.21) is equivalent to an asymptotic property of the spectral overlap (Z spec , E s ) on the critical line s = 1 2 + iω. In the parameterization (4.13), This only satisfies (4.21) if the integral diverges linearly. This implies the following condition: where f (ω) is allowed to fluctuate around C RMT , but is flat at infinity "on average", for any finite ω 0 .
Equations (4.23) and (4.24), equivalently (4.21), comprise a necessary and sufficient condition for the presence of a linear ramp in the (scalar) SFF of a 2d CFT, with the constant in (4.24) set by the chosen RMT ensemble governing the ramp. The linear ramp, a property of the coarse-grained theory, is transmuted into a quantitative property of the microscopic spectrum. The algorithm to detect it from a torus partition function is straightforward: form Z spec (τ ), then look for the asymptotic (4.23) in the spectral basis.
Note for context that the convergence of the spectral decomposition only requires the much weaker falloff |(Z spec , E 1 2 +iω )| O(1) as ω → ∞, up to power-law and logarithmic corrections (e.g. [40]). Systems for which this upper bound is saturated would have an exponential rather than linear ramp. 20 So we see that in the SL(2, Z) spectral basis, random matrix universality becomes a condition of rapid decay at infinity.

Universal corrections
The symmetries of 2d CFT prescribe corrections to this result. Having extracted the condition (4.23) on the overlap, modular invariance implies an infinite set of other terms in Z (0,0) diag (r, z), coming from the second term in (4.10) (the S(r −2 ) term in (4.6)). In SFF kinematics these terms give subleading corrections to the RMT ramp at T β, but are otherwise present and unsuppressed for generic temperatures.
Specifically, the falloff (4.23) implies an infinite set of square-root singularities at z ∈ R − . The simplest way to see this is to insert the polar behavior (4.21) into the second term in (4.10). This yields The branch point singularities (4.25) are universal in any chaotic 2d CFT. Their existence is required by modular invariance (and Virasoro symmetry) upon imposing the linear ramp in the SFF.
Note that in detecting these singularities, we are probing analytic structure of the partition function in the complex-temperature plane: the r 2 = −1/n 2 locus is not a "physical" locus, neither in real time T in SFF kinematics (where r 2 = β 2 + T 2 ) nor in Euclidean kinematics (where r 2 = y 1 y 2 ). In the limit of r → ∞ with fixed z, these singularities indicate an accumulation of branch points at z → −n 2 y 2 1 and their images under inversion. At leading order in r → ∞, the sum is constant in r but linearly divergent (see [21] and Appendix E).
We note in passing the generalization to non-linear ramps. At leading order, where f (ω) can again fluctuate around a constant at infinity. The constraints on S(r −2 ) may be likewise derived from (4.9), yielding We note that if α > 1 2 , the corrections are term-wise finite in r. This singles out √ T behavior of the late-time SFF as a somewhat notable threshold from the analyticity point of view.

Wormholes and Hecke Symmetry
In the previous sections we introduced a coarse-grained diagonal partition function, Z diag (τ 1 , τ 2 ), defined in (3.33) through a projection operator P diag acting on the factorized product Z spec (τ 1 )Z spec (τ 2 ). We now take one step further, defining a stronger projection, one which enjoys an enhanced symmetry and is relevant for addressing a driving question of this work: where are the wormholes?

Hecke projection
The new projection uses SL(2, Z) Hecke operators. Let us recall their definition. Hecke operators T j exist for every spin j ∈ Z + . Their action on SL(2, Z)-invariant functions f (τ ) is 21 In this normalization, the Hecke action on the SL(2, Z) eigenbasis elements is 1 . An equivalent definition, which will be useful momentarily, is where M j denotes the following set of matrices, and Aτ denotes the fractional linear transformation, The quotient SL(2, Z)\M j is taken by identifying elements under the equivalence relation A ∼ B if there exists a γ ∈ SL(2, Z) such that B = γA. We emphasize that j ∈ Z + .
We now introduce Z Hecke (τ 1 , τ 2 ), the projection of Z spec (τ 1 )Z spec (τ 2 ) onto the kernel of the difference of Hecke operators at every spin. Defining we define the Hecke projection onto ker T The essential feature of Z Hecke (τ 1 , τ 2 ) is seen upon considering the action of T (12) j on "mixed" 21 Hecke operators for non-prime spins j are fixed in terms of the prime spins via the Hecke multiplication rule. For a recent review of Hecke operators in a physics context see [70].
Eisenstein-cusp form terms in Z diag (τ 1 , τ 2 ): This is nonzero on account of the inequality of Eisenstein and cusp form Fourier coefficients. While such terms are present in Z diag (τ 1 , τ 2 ), they are eliminated by the Hecke projection (5.7). It is important that the object Z Hecke (τ 1 , τ 2 ) is defined via projection for all spins j. 22 The spectral decomposition of Z Hecke (τ 1 , τ 2 ) is thus We may rephrase the special property of Z Hecke (τ 1 , τ 2 ) as a statement of enhanced symmetry: employing the terminology of [72], we say that a modular-invariant function f (τ 1 , τ 2 ) enjoys Hecke symmetry if T In this sense, Z Hecke (τ 1 , τ 2 ) carries an enhanced symmetry with respect to both Z diag (τ 1 , τ 2 ) and Z spec (τ 1 )Z spec (τ 2 ): it is annihilated by an infinite set of commuting operators, one for each positive integer.
Stated succinctly, whereas Z diag (τ 1 , τ 2 ) pairs eigenvalues, Z Hecke (τ 1 , τ 2 ) pairs eigenfunctions. It is rather natural to introduce a projection that pairs eigenfunctions. It is a fact of life on the SL(2, Z) fundamental domain that there is spectral degeneracy for the infinite discretuum of Laplace eigenvalues ω = ω n where Maass cusp forms exist. From the point of view of the trace formula and analogy to periodic orbit theory, the Eisensteins and Maass cusp forms with equal eigenvalues appear as different orbits: their actions are equal, but their one-loop determinants differ. The Hecke projection P Hecke is designed to account for this innate quirk of 2d CFT. We are proposing Hecke projection as an enhanced form of coarse-graining. It would be nice to understand this more fundamentally, say, from a microcanonical perspective.
With this in mind, Hecke projection really comes to life when we consider its dual gravitational interpretation: as we now show, Hecke symmetry is an emergent feature of Euclidean torus wormholes in semiclassical AdS 3 gravity.

Interlude: A Wormhole Farey Tail
The next subsection establishes some technical results about SL(2, Z) Poincaré sums over appropriate "seed" functions f 0 (τ 1 , τ 2 ) of two complex moduli τ 1 and τ 2 . Sums of this form may be taken as one definition of "wormhole amplitudes" in semiclassical theories of gravity. 22 While it is conceivable that a (s) j = 2b (n) j for very special choices of n and j, it is highly inconceivable that the Fourier coefficients could be equal for all j, given the numerical and statistical properties of cusp forms -for example, the available numerical data at finite n [71], and the Sato-Tate conjectures on the statistical distribution ofb To motivate this, and to explain the title of this subsection, let us recall the (non-supersymmetric) black hole Farey tail [16,31,32]. The partition sum over all smooth saddles M of semiclassical Einstein gravity with ∂M = T 2 can be written as a (regularized) SL(2, Z) Poincaré sum over the partition function of thermal AdS 3 : writing the primary partition function, The sum runs over the full "SL(2, Z) family" of BTZ black holes, one for each independent SL(2, Z) element. The essential point is that the one-to-one correspondence between smooth saddles and SL(2, Z) images of thermal AdS 3 is not merely a technical observation: these saddles are generated by large bulk diffeomorphisms acting on the vacuum contribution to the path integral, inducing a boundary SL(2, Z) action.
The idea that Poincaré sums are how semiclassical gravity implements boundary modular invariance in AdS 3 /CFT 2 is independent of the number of asymptotic boundaries. As long as the bulk theory respects diffeomorphism invariance, large diffeomorphisms will again relate different contributions to the path integral, implementing SL(2, Z) transformations (or the appropriate higher-genus generalization) of boundary moduli. The obvious question is what the analog of the vacuum solution is. Consider now bulk topologies M with two asymptotic torus boundaries, ∂M = T 2 ∪ T 2 . In the example of semiclassical Einstein gravity, as we will recall in Section 6, there is no smooth on-shell solution with this topology. Nevertheless, diffeomorphism invariance implies that if there exists such an amplitude -perhaps off-shell, justifiable one way or another -it should take the form of a Poincaré sum over a suitable seed function f 0 (τ 1 , τ 2 ), with the image sum geometrizing the boundary modular invariance. 23 This slight generalization of the familiar single-boundary ideology to the case ∂M = T 2 ∪ T 2 guides what we will define as a "torus wormhole" in semiclassical gravity, and accordingly begets the wormhole Farey tail: that is, the construction of SL(2, Z) Poincaré sums over suitable seed functions, viewed as gravitational duals of Z Hecke (τ 1 , τ 2 ) in large c CFTs.
(5.12) 23 This view receives indirect formal support from [27], where it is argued that the canonical quantization of AdS3 gravity on hyperbolic manifolds M produces sums of the form Z(M ) = γ Z0(Mγ), where Z0 is the bulk gravity partition function on a fixed manifold and γ ∈ Map(∂M )/Map(M, ∂M ), where Map(∂M ) and Map(M, ∂M ) are the boundary and bulk relative mapping class groups, respectively. Torus wormholes are not hyperbolic. Nevertheless, the sum prescribed above would, if naively applied, lead to the picture in the text. Namely, for M = T 2 × I, the resulting sum would be over the coset SL(2, Z) × SL(2, Z)/SL(2, Z), which can be parametrized as a sum over relative modular transformations of a seed which is invariant under simultaneous modular transformations. 24 Depending on context, the sum may instead be taken over P SL (2, Z). This distinction is not relevant for what follows, and indeed, in Section 6 we will study an SL(2, Z) sum.

(5.13)
The results to follow may be tweaked to accommodate seeds that instead obey where M τ = −τ implements an orientation reversal.
In Subsection 5.3.1 we will assume slightly more of the seed, namely, an invariance under simultaneous SL(2, R) transformations. 25 One may justify why this is sensible from different points of view. As we will see, it will play nicely with the result of Subsection 5.3.3, where we will prove that Hecke symmetry of f (τ 1 , τ 2 ) implies that the seed f 0 (τ 1 , τ 2 ) is not only fully SL(2, R)-invariant, but is solely a function of the H-invariant distance between τ 1 and τ 2 . This being a very natural criterion from a physical standpoint, one may reasonably demand that the seed amplitudes depend only on this distance in the first place, justifying the assumption of simultaneous SL(2, R)-invariance. At any rate, we expect that the logical connections among these ideas will be clear in the proofs to follow.
A modular-invariant function f (τ 1 , τ 2 ) ∈ L 2 (F × F) is entirely specified by its spectral overlaps with the basis elements: if two such functions have the same overlaps, they are equal. Using this logic, we prove Hecke symmetry by showing that where ψ ω (τ 2 ) := {E 1 2 +iω (τ 2 ), φ n (τ 2 )} is an SL(2, Z) eigenfunction. We start from the expression where we have used the unfolding trick for f (τ 1 , τ 2 ), since it is given by a Poincaré sum. We now 25 Actually, we will not use the full SL(2, R), but only the subset of matrices whose entries are given by √ j times integers, where j ∈ Z+. use the invariance of the seed, 26 Next, we perform a change variables τ 2 = A −1 τ 2 in the integral, which leaves the Poincaré measure on H invariant. 27 This results in In the second line we brought the sum inside the integral. Using self-adjointness of the Hecke operators, (T Noting equality of (5.19) and (5.20), we have which is the desired result. The proof for a seed invariant under (5.14) is essentially identical. Following the same steps, the final result follows from the invariance of the right-hand side of (5.1) upon taking b → −b in the summand.
A Hecke-symmetric function has spectral overlaps proportional to the respective basis elements, as seen in (5.9). We parameterize these as In general, f E (s) and f φ (s n ) are different functions of their arguments. Using the unfolding trick 26 Elements of Mj may be mapped to elements of SL(2, R) by rescaling: given a matrix B ∈ Mj with det B = j, there exists a matrix B := B/ √ j with det B = 1. Since j ∈ Z+, and B is integer-valued, B ∈ SL(2, R). Note that both B and B act on τ via the same fractional linear transformation. 27 Similar manipulations can be found in Theorem 3.6.4, Point 4 of [39].
for f (τ 1 , τ 2 ), we write these overlaps explicitly as We now expand the functions on the right-hand side in a Fourier series, and then project onto a spin k = 0 with respect to τ 1 . In doing so we employ the Fourier decomposition of a seed f 0 (τ 1 , τ 2 ) invariant under simultaneous SL(2, Z) transformations (5.13), Changing variables to x ± , we can perform the integral over x + which sets j = |k − 2 | and yields (recall that a The factor in parentheses in (5.25) is the spin-k Fourier mode with the coefficient stripped off. Evaluating the first line of (5.25) at s = s n and taking the ratio of the two equations, the left-hand side is independent of y 1 . This is incompatible with the right-hand side unless for some fixed * . In fact, the only possible choice is * = 0, such that the Fourier coefficients cancel completely, because the equation must be satisfied for any k ∈ Z + . Therefore, That is, the cusp form overlap is equal to the Eisenstein overlap evaluated at s = s n .
As a statement about Fourier decomposition, this means that the (j 1 , j 2 ) = (0, 0) mode of f (τ 1 , τ 2 ), which determines the Eisenstein part of the spectral decomposition, actually determines the entire function. Building on the language of [30,73], we call this strong spectral determinacy. This is compatible with the general result of [42] because we are imposing extra structure on f (τ 1 , τ 2 ).
Essentially the same result holds for a seed obeying the condition (5.14). In this case, f 0 (τ 1 , τ 2 ) has a Fourier decomposition (5.24) with the swap x + ↔ x − . The same argument then leads to That is, the seed depends on geodesic distance with the orientation-reversal τ 2 → −τ 2 .

Summary and comments
The results of the previous subsection suggest the following general nomenclature: we define "wormhole amplitudes" Z WH (τ 1 , τ 2 ) as those functions which have the following spectral decomposition: In our spectral framework, given a Z spec (τ ) of a CFT, Z WH (τ 1 , τ 2 ) are to be regarded as instances of Z Hecke (τ 1 , τ 2 ) with enhanced structure. In particular, the property Z Hecke (τ 1 , τ 2 ) = Z WH (τ 1 , τ 2 ) holds if and only if Poincaré sums of the form (5.12) are but one example of such amplitudes. We may also view this as a prediction for large c CFTs: to the extent that we accept the Farey tail sum (5.12) as a wormhole ansatz in semiclassical gravity, (5.35) should hold in the dual large c CFT.
The functions Z WH (τ 1 , τ 2 ) furnish a highly-symmetric class of square-integrable SL(2, Z) × SL(2, Z)-invariant functions: not only are they Hecke-symmetric, but they are fixed by a single overlap function, f WH (s). Let us put this last point in sharper focus. In the language of Section 4, recall that the leading low-temperature term of the (j 1 , j 2 ) = (0, 0) Fourier mode was controlled by the function R(z). This term fixes other Fourier modes of our various amplitudes, away from the low-temperature limit, according to their degree of symmetry:
While the notation Z WH (τ 1 , τ 2 ) invokes bulk language to reflect the properties of Poincaré sums derived in the previous subsection, other functions could in principle assume the functional form (5.33). However, there is clearly a gravitational nature to Z WH (τ 1 , τ 2 ), and to Z Hecke (τ 1 , τ 2 ) more generally. The projection P Hecke is in some sense capturing the "wormhole part" of the factorized product Z spec (τ 1 )Z spec (τ 2 ): it isolates the correlations between the two copies which, when there is an AdS 3 bulk dual, are geometrized by a smooth, two-boundary, connected Euclidean spacetime. This interpretation is on firmest footing at large c, where it becomes a semiclassical geometric statement that is supported by our proofs above for wormholes-qua-SL(2, Z) Poincaré sums.
These results suggest the following conceptual interpretation. In gravitational language, the Hecke operators T (τ ) j , which act on a single boundary component, are AdS 3 "half-wormhole detectors." That T (τ ) j Z spec (τ ) = 0 reflects the fact that Z spec (τ ) by definition receives no contribution from smooth geometric saddles in gravity: it only counts off-shell, or non-geometric (e.g. matter), degrees of freedom. Then forming the difference operator T , the projection onto its kernel via P Hecke implements the pairing of these degrees of freedom to form a smooth two-boundary spacetime. To say this slightly differently, T (12) j has the flavor of non-local bulk operators, which can be freely moved to the "left" or "right" boundary tori: Hecke symmetry is then the statement that these operators are, in a sense, topological. Conversely, a nonzero action of T (12) j detects non-geometric contributions to the wormhole amplitude. It would of course be nice to find an explicit bulk construction of Hecke operators, or of P Hecke as a topology-changing operator.
We will soon make these ideas explicit upon turning to semiclassical AdS 3 pure gravity.

Pure Gravity as MaxRMT
We now apply our framework to semiclassical AdS 3 pure gravity. We begin our treatment with the two-boundary torus wormhole of Cotler and Jensen [21].

Torus wormhole
The Cotler-Jensen (CJ) wormhole was originally presented in [21] as a Poincaré sum of the form considered in Section 5, 29 Z CJ (τ 1 , τ 2 ) = γ∈SL (2,Z) f 0,CJ (τ 1 , γτ 2 ) (6.1) with seed given by the inverse of the (orientation-reversed) hyperbolic distance: The CJ wormhole is an off-shell contribution to the path integral of AdS 3 pure gravity with the topology of a torus times an interval, T 2 ×I. It is a constrained instanton, namely it becomes on-shell after adding a constraint [74]. The CJ computation uses a dynamical theory of only boundary gravitons [75]. This differs from the corresponding quantity in the Chern-Simons formulation of AdS 3 gravity [21,27,76].
The point is now to understand Z CJ (τ 1 , τ 2 ) as an instance of Z WH (τ 1 , τ 2 ): that is, as a coarsegrained two-copy partition function of an underlying chaotic CFT.
Since Z CJ (τ 1 , τ 2 ) is a Hecke-symmetric wormhole amplitude, the entire amplitude is fixed by the (0, 0) Fourier mode. From [21] eq. (4.12) (and doubling the result), we read off the functions in (4.6) as with r = √ y 1 y 2 and z = y 1 /y 2 . Recall that R CJ (z) is the leading low-temperature term, which fixes 29 [21] wrote this as a P SL(2, Z) image sum, but considerations of discrete symmetries suggest that the result should be doubled [66]. For this reason, and to streamline some of the expressions to follow, we work with the GOE version of the CJ wormhole, which amounts to overall multiplication of the expressions in [21] by C GOE = 2. the entire zero mode by (4.10).
By the general proofs of Section 5.3 for Poincaré sums of the form (6.1), Z CJ (τ 1 , τ 2 ) admits a spectral decomposition 30 of wormhole form (5.33): we need only determine the spectral overlap, call it f CJ (s), by Mellin transform of R CJ (z). A simple integral yields This determines the full Z CJ (τ 1 , τ 2 ). Let us write it explicitly for the sake of clarity: It will prove useful to rewrite (6.5) in terms of the completed Eisenstein series: The Eisenstein overlap takes an intriguing form in terms of the Riemann zeta function.
The spectral decomposition (6.5) is a very clean way to package the Fourier modes for arbitrary spins, determined as they are by the low-temperature scalar term R CJ (z). (For comparison, the modes Z (j 1 ,j 2 ) CJ (y 1 , y 2 ) are given in eq. (4.20) of [21].) Note that there is no constant term in the decomposition. This follows our general discussion earlier in the paper, but is additionally bound up with the fact that the (0,0) mode is actually divergent [21] (cf. the r → ∞ limit of S CJ (r −2 )). 31 Given this, the constant term is subject to the choice of regularization scheme, and the finite constant may be set to zero; this is the meaning of (6.5).

MaxRMT
The CJ wormhole has some very special features. Notice that (6.4) realizes the RMT ramp falloff condition (4.23), with f (ω) = C GOE = 2 exactly -in particular, with no fluctuations. Likewise, not only does (6.3) manifestly realize the universal singularities (4.21) and (4.25) required by the presence of a linear ramp in the scalar SFF, but the CJ wormhole is given exactly as the sum over those singularities! This last property is remarkable. Having shown that general wormhole amplitudes are fully determined by the single function R(z) after accounting for Virasoro and modular symmetries, R CJ (z) is exactly equal to the double-scaled RMT result. Stating this from the Lorentzian point of view, the scalar SFF of the CJ wormhole is saturated by the RMT result for all times T β, given by "just the ramp" plus corrections fully fixed by the symmetries; in turn, the entire amplitude for all moduli τ 1 and τ 2 , including Euclidean and Lorentzian temperatures, is its minimal, most symmetric completion.
These properties of the torus wormhole reveal that the spectrum of semiclassical AdS 3 pure gravity and its dual 2d CFT exhibit random matrix statistics to the maximal extent possible. As stated in the Introduction, this is a signature of what we call MaxRMT: the maximal realization of random matrix universality consistent with Virasoro symmetry and modular invariance.
This extends the sense in which AdS 3 pure gravity may be understood as an extremal theory: within the space of consistent theories of AdS 3 gravity, the statistical correlations among black hole microstates of pure gravity are as random as possible (in the sense of RMT).
At early times, well before random matrix behavior sets in, theories of semiclassical Einstein gravity (in any spacetime dimension) saturate the chaos bound on the Lyapunov exponent of out-of-time-order correlators [33]. What our analysis shows is that pure gravity is also maximally chaotic at late times: viewing Z CJ (τ 1 , τ 2 ) as computing coarse-grained spectral correlations of a dual microscopic CFT at large c, its level statistics are "maximally random" for a 2d CFT. 32 In other words, random matrix universality enjoys a maximally extended regime of validity. This is a refinement, incorporating chaos, of the statement [61] that the Cardy density of states enjoys an extended regime of validity beyond the asymptotic regime ∆ → ∞, all the way down to ∆ ∼ c/6 (or possibly to c/12, for certain exceptional theories), in a sparse CFT at leading order in large c.
Rephrasing this slightly, we have recovered the CJ wormhole amplitude as an extremal two-copy partition function. In particular, the CJ wormhole amplitude is the unique solution to the following large c CFT bootstrap problem: find a Z Hecke (τ 1 , τ 2 ) that i) admits a Poincaré sum representation of wormhole form (5.12), and ii) reproduces the double-scaled RMT SFF at late times T for any fixed T /β. The first criterion specializes to large c, though not to pure gravity specifically, by imposing the geometric structure of semiclassical wormholes (see Subsection 5.2). Upon imposing the SFF of RMT, Virasoro symmetry and modular invariance take care of the rest, leading to Z CJ (τ 1 , τ 2 ). 33 This is similar in spirit to the bootstrap approach to four-point functions in AdS 5 × S 5 supergravity in [77].

RMT wormholes vs. ETH wormholes
We are able to interpret Z CJ (τ 1 , τ 2 ), a bulk off-shell wormhole partition function, in terms of a microscopic CFT. As discussed in the Introduction, it does not require a CFT ensemble interpretation, though it is perfectly compatible with the large c notions articulated in [24]. This "RMT wormhole" is capturing the high-energy spectral statistics of a large c limit of a family of chaotic CFTs.
In contrast, on-shell wormholes in AdS 3 gravity capture different information. They are "ETH wormholes": they are fixed by leading-order spectral (Cardy) and OPE (DOZZ) asymptotics of Virasoro primaries [22,78,79], independent of level statistics, instead computing averaged matrix elements. All on-shell wormholes in AdS 3 gravity are of this type [80]. 34 The partition function of any such wormhole saddle can be reduced to a moment problem for a probability distribution of CFT data that encodes universal asymptotics [26], insensitive to chaos. 35

Quantum chaos from arithmetic chaos
The CJ amplitude exhibits a linear ramp in all spin sectors [21]. Given the amplitude (6.5), we can compute the Eisenstein contribution to any Fourier mode Z (j 1 ,j 2 ) CJ (y 1 , y 2 ). The necessary integral was performed in [42] for j 1 > 0, yielding where λ j 1 are O(1) numerical factors. After analytic continuation and stripping off a factor √ y 1 y 2 (see (4.19)), this gives an O(1) contribution to the SFF. Therefore, the late-time linear ramp at nonzero spin comes from the cusp form contribution alone. This observation establishes a relation between the arithmetic chaos of Maass cusp forms and quantum chaos of AdS 3 pure gravity as defined by RMT.

On c-independence of wormhole amplitudes
The CJ wormhole amplitude is independent of Newton's constant G N = 3L AdS /2c. This is consistent with the fact that it is not a semiclassical saddle in the bulk, but otherwise calls for a fundamental explanation (in contrast to the JT double-trumpet, whose O(1) scaling follows from the topological expansion of 2D gravity).
Our formalism gives an indirect explanation of this fact: it is a consequence of the linear ramp in the SFF and the "wormhole" form of the amplitude. In short, if there were a c-dependent factor in the wormhole amplitude, it would violate random matrix universality. Demanding a linear ramp in the scalar SFF with RMT coefficient implies (4.21), a c-independent condition. In general, given a family of chaotic CFTs {T c } which admits a c → ∞ limit, any dependence on c, or other parameters (e.g. exactly marginal couplings) which we collectively denote as λ, must sit in an additive correction 34 As an illustrative example, for a two-boundary torus wormhole to be on-shell in gravity, one must instead consider a one-point wormhole with boundary operators O inserted, where ∆O < 2ξ is dual to a bulk matter field [80]. The trace over Hilbert space is an OPE sum, and the result is fixed by Virasoro ETH asymptotics. Consistent with this, if one studies the late-time behavior of the "one-point SFF", the on-shell one-point wormhole does not produce a ramp [66]. 35 This is not fully crossing symmetric on average, but is (almost) S-invariant on average. Small violations of average S-invariance may be fixed using a matrix-tensor model with a potential controlled by the variance under S [28]. term, At large c, this is finite. Since any wormhole amplitude Z WH (τ 1 , τ 2 ) of the form (5.33) is fixed completely by this quantity, as shown in Section 5, the entire amplitude is independent of c. What sets the CJ wormhole apart is that the correction exactly vanishes -a property of MaxRMT.

Wormholes in AdS 3 × M gravity
In a theory of AdS 3 pure gravity, corrections to MaxRMT behavior should be non-perturbative in G N . We will discuss these in Subsection 6.3.1. On the other hand, in theories of gravity coupled to matter, such as AdS 3 × M string or M-theory compactifications with large extra dimensions M, the corrections will generically be O(1). These theories should not have MaxRMT statistics. The RMT wormholes with T 2 × I topology will receive large matter contributions to the quantity δR (c) (z|λ) written above, thus modifying the geometry on macroscopic scales. By virtue of diffeomorphism invariance their partition functions should take the form (5.33) and, being chaotic, preserve the linear ramp of the SFF, but we expect their overlaps f WH (s) to differ substantially from f CJ (s).
We may parameterize these overlaps as with R WH (z) and G(z) = δ(z − 1) + δG(z) the corresponding inverse Mellin transforms, respectively. Mellin convolution implies R WH (z) = 1 π where δR WH (z) := ∞ 0 dy δG(y) 1 + zy (6.11) This correction must be finite at z = −1. Singularities of δR WH (z) for z ∈ C\{−1} can arise either from delta functions (and possibly their derivatives) in δG(y) on the contour, or poles off the contour. These singularities must not violate the physical requirement that R WH (z) be regular at |z| = 1 (no spurious poles in the SFF) and z ∈ R ≥0 (finite Euclidean low-temperature limit). 36 In Appendix F, we provide a toy family of RMT wormholes in AdS 3 × M gravity, for which both f WH (s) and R WH (z) can be computed explicitly. The spectral overlaps are of the form (6.9) with while their dual functions R WH (z) in (F.6) are harmonic sums over an infinite set of simple poles, with the correctly normalized RMT ramp (4.21) at z → −1. We note here that g(s) non-trivially satisfies the falloff condition (4.23), which follows from the asymptotic |ζ(σ + iω)| → 1 as ω → ∞ for any σ > 1.

Black hole microstates of AdS 3 pure gravity
The above framework actually lets us extract non-coarse-grained microstructure of the black hole spectrum of AdS 3 pure gravity by factorizing the CJ wormhole. In particular, we can deduce what Z spec (τ ) gives rise to the correlations encoded in Z CJ (τ 1 , τ 2 ) upon coarse-graining by using the powerful fact, highlighted earlier, that the 2d CFT trace formula expands Z spec (τ ) over a complete eigenbasis. Combined with the high degree of symmetry of wormhole amplitudes, the result is unique. Define That is, Z RMT (τ ) is the Z spec (τ ) that generates the CJ wormhole upon coarse-graining. We then deduce the spectral overlaps (Z RMT , E s ) and (Z RMT , φ n ), and hence Z RMT (τ ), from (6.5). The Eisenstein overlap is easily determined using (6.6) in which the reflection symmetry is manifest, by taking the square root: Equivalently, The cusp form overlaps are simply (Z RMT , φ n ) = |(Z RMT , E sn )|, as follows from the wormhole form (5.33) of the amplitude. Therefore, a CFT dual to AdS 3 pure gravity has a spectral partition function Z spec (τ ) ≈ Z RMT (τ ) where with overlaps given by (6.15).
This quantity Z RMT (τ ) is a contribution to the torus partition function of a microscopic putative CFT dual to AdS 3 semiclassical pure gravity. It is the leading-order off-shell partition function. The identification Z spec (τ ) ≈ Z RMT (τ ) holds up to exponentially small corrections in c, discussed further momentarily.
We view Z RMT (τ ) as a half-wormhole of AdS 3 pure gravity: it is a single-boundary, non-selfaveraging quantity which, when squared and glued appropriately, generates the smooth spacetime wormhole. See Figure 3. As is by now hopefully clear, the right procedure is prescribed by the 2d CFT trace formula, gluing the half-wormholes in SL(2, Z) spectral space. The detailed form of Z RMT (τ ) is "jiggly," with spectral overlaps characterized by erratic fluctuations. We can make this where In addition to the regular "background" phase χ(ω), the overlap is dressed by the "Riemann zeta phase" φ(ω), a quantum-chaotic object: φ(ω) oscillates erratically along the critical line (see Figure  5), producing the non-self-averaging behavior characteristic of half-wormholes. 37 Upon squaring and projecting Z RMT (τ ) to form the CJ wormhole, the phase cancels, leaving the smooth integrand of (6.5).
This dovetails nicely with expectations of how the wormholes and half-wormholes of 2D gravity should generalize to higher dimensions. The factorized product Z RMT (τ 1 )Z RMT (τ 2 ) explicitly contains the wormhole Z CJ (τ 1 , τ 2 ), isolated by the Hecke projection P Hecke ; the terms that are projected out, presumably to be thought of as "linked half-wormholes" of some kind, combine with the wormhole to restore factorization. We can say this in the closely related but some what more general "broken cylinders" picture of [84] (see Sections 3.6 and 5.2). A broken cylinder in the "b basis" is geometrically a trumpet with a geodesic boundary carrying a random boundary condition, Ψ(b). Two broken cylinders are glued into a smooth wormhole by averaging over these boundary conditions, integrating over b with measure The random function Ψ(b) is a bulk effective description of coarse-graining the dual theory. There 37 The Riemann zeta phase also appears in the Gutzwiller model of chaotic scattering on the "leaky torus" as a phase in the S-matrix, producing poles at the locations of non-trivial Riemann zeros [83].  Figure 3 emphasizing the analogy to 2D gravity, with the extra S 1 direction suppressed. Each half-wormhole is viewed as a deformed annulus times a circle, in which one of the annular boundaries is replaced by an erratic/random boundary. In the spectral representation this boundary is precisely the Riemann zeta phase e iφ(ω) . The CJ wormhole is formed by gluing along the deformed boundaries. We have drawn the second deformed annulus "inside out" for visual aid.
is an intuitive analogy between AdS 2 broken cylinders and AdS 3 half-wormholes: We recall that P Hecke projects onto the diagonal the factorized double sum over eigenfunctions, where we used the unified notation (2.8). An interesting aspect here is that ω is not manifestly a geometric quantity in AdS 3 , unlike the geodesic length b in AdS 2 .
This picture emphasizes that, while the CJ wormhole is topologically an annulus ×S 1 , it should be viewed as a gluing of two constituent topologies, namely, of two "deformed solid tori" (i.e. deformed annuli times a circle). See Figures 3 and 6. This is somewhat schematic because we do not yet have a bulk geometric derivation of Z RMT (τ ). What we do know is that Z RMT (τ ) probes the part of the black hole Hilbert space that is precisely not captured by semiclassical saddles: whatever off-shell configurations should be included in the path integral with a single torus boundary, they must generate this term.
We note that the Riemann zeta phase φ(ω) is the phase for any (Z spec , E 1 2 +iω ), as one can show from its functional equation in ω. This supports our earlier half-wormhole characterization of Z spec (τ ) in the discussion of Hecke projection (Subsection 5.4), even absent a large c limit. For this reason, Z spec (τ ) is closely analogous to the "brane one-point function" Z brane (β) in the 2D gravity model of [85], an additive correction to the JT disk partition function that is non-perturbatively exact in the entropy S 0 . What we are finding is that this same mechanism operates in the bona fide AdS 3 /CFT 2 setting in broad generality, with Z spec (τ ) playing the role of the brane.

Pure gravity path integral
The identification of Z RMT (τ ) augments our knowledge of Z grav (τ ), the primary partition function of semiclassical AdS 3 pure gravity with a single torus boundary. Any primary partition function Z p (τ ) for which the vacuum is the only Virasoro primary with 38 t < 0 can, in general, be written By leveraging Z CJ (τ 1 , τ 2 ), we have shown that Z spec (τ ) is not a free function: at leading order in large c, it is equal to Z RMT (τ ). Consequently, the semiclassical path integral Z grav (τ ) is of the form There are three contributions: • Z MWK (τ ) in (5.11) sums over smooth bulk saddles M with ∂M = T 2 .
This refines the usual point of view taken in the modular bootstrap approach to Z grav (τ ), by adding the (off-shell) fine-grained spectral fluctuations of the black hole/heavy spectrum to the sum over (on-shell) BTZ black hole geometries. The "brane" terms Z RMT (τ ) + δZ RMT (τ ) are exponentially suppressed relative to the sum over saddles.
The corrections δZ RMT (τ ) are important, even though they are expected to be exponentially small in c ∼ 1/G N . Were they perturbative instead, they would lead, upon squaring and projecting, to 1/c corrections to the CJ wormhole: this would violate reasonable expectations inferred from the genus expansion of 2D gravity for the structure of AdS 3 wormholes, as well as the method of computation of [21]. 39 Instead, δZ RMT (τ ) should represent "higher genus" terms that encode UV data of a (say) strongly-coupled string theory, or M-theory, compactification. Indeed, it could well be the case that the string landscape hosts many compactifications to AdS 3 pure gravity which share a parametrically identical spectral gap, differing only in the detailed correlations among black hole microstates: the quantity δZ RMT (τ ) encodes exactly these contributions. When glued to form a wormhole, these would give O(e −αc β ) corrections to Z CJ (τ 1 , τ 2 ) for some α, β > 0, perhaps corresponding to wormholes with torus boundary but higher topology in the interior.
Actually, not only should such corrections be present on general grounds, they must be present in a consistent theory: if δZ RMT (τ ) = 0, then the partition function (6.22) is non-unitary. To see this, recall that the MWK partition function Z MWK (τ ) contains an exponentially large and negative density of states in a near-extremal limit of t → 0 + and j → ∞ [17], is the extremal spin-j Cardy entropy. But this cannot be cured by Z RMT (τ ), which is independent of the central charge.
The above results altogether lead us to a rather interesting conclusion. If a unitary Z grav (τ ) exists, the non-perturbative corrections δZ RMT (τ ) must not only be present, but must resum in some manner to give a contribution to the density of states below the semiclassical black hole threshold. Were this not the case, then for all values of the modulus τ we could safely drop δZ RMT (τ ) in the large c limit; but as reviewed above, the resulting partition function would be non-unitary. To avoid this order-of-limits issue between large c and near-extremality, the corrections δZ RMT (τ ) should resum to shift the black hole threshold slightly below t = 0, giving non-square-integrable contributions to Z grav (τ ). 40 On the CFT side, the large c modular bootstrap quest is thus transformed to the following: find δZ RMT (τ ) such that (6.22) is unitary. In the bulk, δZ RMT (τ ) is an off-shell contribution to the AdS 3 path integral that presumably captures non-perturbative degrees of freedom.

On the Maxfield-Turiaci proposal
There is one proposal in the literature for at least some such off-shell contributions, due to Maxfield and Turiaci [5], which realizes precisely the resummation mechanism described above. They proposed that Z grav (τ ) should include a sum over a class of Seifert manifolds. These smooth 3-manifolds are S 1 fibrations over a disc D 2 with orbifold points. 41 Their inclusion in Z grav (τ ) was motivated by studying the near-extremal limit, where the AdS 3 theory admits an effective dimensionally-reduced description as JT gravity coupled to conical defects. Maxfield and Turiaci pointed out that, from the dimensionally-reduced point of view, the MWK negativity (6.23) is cured upon summing over multiple-defect configurations, not just the saddle points. This shifts the density near extremality to 42 ρ MT, plus exponentially small corrections to the shift. The corrections, which are required for modular invariance of the AdS 3 result, would come from including the full set of defects. More explicitly, each species of JT defect of [5] is labeled by an integer q (corresponding to a Z q orbifold point on 40 We thank Daniel Jafferis for a discussion. 41 An excellent review of Seifert manifolds may be found in [86]. 42 The result of [5] formally holds for j → ∞, but the functions appearing in the calculation depend on the combination ξj, which partially justifies an extrapolation to all nonzero spins at large ξ. the base D 2 ), and an associated coupling In [5], the approximation t 0 (j) ≈ λ 1/2 is made: that is, the sum is only over the gas of q = 2 defects. The full sum over arbitrary numbers of arbitrary species of defects was proposed to have an S 1 uplift to a sum over Seifert manifolds, The . . . represents other, non-Seifert contributions which near-extremal physics does not constrain. Z Seifert (τ ) has not been computed.
There has been ample reason to believe that the Maxfield-Turiaci proposal is correct. Our argument above supports this further. If it is correct, the Seifert manifolds of [5] should contribute to Z RMT (τ ) + δZ RMT (τ ). Understanding how this works is a very worthwhile direction for future work. Let us take some initial steps toward understanding this connection. First, recall that Z RMT (τ ) is independent of c, and hence of the entropy. A generic defect configuration term has coefficient It is rather tidy that the only term which is independent of entropy is the q = n 2 = 2 term. So we see that Z RMT (τ ) should include only the Seifert manifold with n 2 = 2 exceptional fibers, each over a Z 2 orbifold point on the base. On the other hand, Z RMT (τ ) is SL(2, Z)-invariant, whereas the q = n 2 = 2 Seifert partition function is not. This confirms that Z grav (τ ) should include other, non-Seifert, off-shell topologies which give an O(1) contribution, as anticipated in [5]. (More explicitly, in the Maxfield-Turiaci realization of (6.22), δZ RMT (τ ) would include the other Seifert manifolds that are further entropically suppressed, while Z RMT (τ ) would include non-Seifert manifolds.)

Future Directions
We have presented a framework for quantifying random matrix statistics of microscopic 2d CFT spectra, manifestly compatible with the requisite symmetries. The identification of a 2d CFT trace formula suggests deep and robust connections with random matrix theory and chaotic quantum systems. While we focused mostly on the diagonal approximation to the product of partition functions, a clear path forward is to understand how the full non-perturbative structure of RMT embeds itself in the dynamics of high-energy states in 2d CFTs and their dual black holes of AdS 3 gravity, and how to excavate it within our spectral framework.
Let us highlight a few specific directions of interest.
One target therein is to understand how encounter theory [54,56,58,60], which initiates the transition from ramp to plateau in the SFF of quantum chaotic systems, should be phrased in the language of the SL(2, Z) spectral decomposition. This subject was nicely reviewed and ported over to the JT gravity setting in [18]. The goal vis-à-vis 2d CFT is to go beyond the diagonal approximation to Z spec (τ 1 )Z spec (τ 2 ), organizing the off-diagonal terms in a way that mimics encounter theory. Our framework gives a clear meaning to "off-diagonal terms": they are correlations among SL(2, Z) eigenfunctions with unequal spectral parameters, ω 1 = ω 2 . The question is how to develop a systematic approach to these correlations. and whether they give rise to different types of corrections to (say) the SFF.
A related, more specific starting point is the following. The SFF of double-scaled random matrix ensembles admits a "τ-scaling limit" in which T → ∞ with τ := T e −S 0 held fixed. The expansion in τ 1 has been reproduced to all orders by encounter theory [54,60]. Is there a τ-scaling limit in 2d CFT? If so, how do we compute it in our formalism? Understanding this could help to extend the meaning of MaxRMT to the non-perturbative level [87][88][89][90][91][92][93][94].
It is interesting to notice that there are two distinct classes of corrections to the SFF in the SL(2, Z) spectral framework: corrections to the spectral overlaps themselves, and the inclusion of terms beyond the diagonal approximation. The former give corrections to the SFF beyond the strict ramp term, even without incorporating off-diagonal terms in Z spec (τ 1 )Z spec (τ 2 ). The latter are obviously crucial to reproduce the constant late-time plateau; but in the interpolation from ramp to plateau, the two types of corrections should in principle combine to give the full SFF. It is important to disentangle and stratify these various effects, and to connect them to non-perturbative corrections to the CJ wormhole of AdS 3 pure gravity.
The condition (4.23) for the SFF to have an RMT linear ramp at T β is an asymptotic condition on Z spec (τ ) in SL(2, Z) spectral space. Given the torus partition function of a CFT, this condition can be checked unambiguously. If we accept that generic irrational CFTs are chaotic, then to the extent that one believes (a CFT version of) the Bohigas-Giannoni-Schmit conjecture [95] that ties chaos to random matrix statistics, the condition (4.23) should be obeyed by generic irrational CFTs [96]. It is worth asking whether this condition can be tied to other, ideally low-energy, properties of irrational CFT data. For example, it is not known whether a nonzero primary twist gap above the vacuum state is sufficient to imply that the CFT is chaotic in an appropriate sense. 43 Perhaps one can determine whether the twist gap is related to (4.23).
On the bootstrap front, it is of clear interest to further pursue the large c modular bootstrap program [98][99][100][101][102] for the partition function (6.22). This raises the larger question of how to incorporate RMT spectral statistics into modular and conformal bootstrap algorithms.
Our formalism is not restricted to studying partition functions. One immediate generalization is to study coarse-grained products of torus one-point functions of local primary operators, O τ . Onepoint functions are modular-covariant and, like partition functions, can be dressed and massaged to be modular-invariant and square-integrable on F, hence admitting a SL(2, Z) spectral decomposition and thus a trace formula. The spectral overlaps encode the OPE statistics. In the AdS 3 bulk, the projections P Hecke [ O τ 1 O τ 2 ] would be holographically dual to "one-point RMT wormholes": that is, off-shell connected configurations with a profile for the field dual to O threading the wormhole, with local sources at each torus boundary. Essentially this quantity was studied in the 2D gravity context in [65,103,104]. These generalizations of the CJ wormhole are not the Maldacena-Maoz one-point ETH wormholes [80], instead incorporating the level statistics of the states in the OPE. One can formulate a straightforward one-point generalization of the CJ wormhole (6.5) that combines the RMT level statistics with Virasoro ETH asymptotics; this will be presented elsewhere.
We have introduced a notion of MaxRMT in 2d CFTs. How does it generalize to higher dimensions? A natural conjecture that we would like to make is that the black hole spectrum of semiclassical Einstein gravity in AdS D≥3 exhibits MaxRMT statistics. The meaning of this in D > 3 is somewhat vague. In the AdS 3 /CFT 2 context, the MaxRMT nature of pure gravity is a quantitative statement, built on the infrastructure of the SL(2, Z) spectral decomposition as a trace formula. That allowed us to fully process the symmetries of the spectrum, leaving only those spectral correlations that are unrelated by symmetry; MaxRMT then states that these correlations are exactly those of RMT. This latter characterization in principle generalizes MaxRMT to higher dimensions. What, then, is the CFT d trace formula for the density of states? Given such a formula, one could construct a diagonal approximation to the two-point correlator and proceed as we did here. It would be very interesting to make this idea concrete, and to ask how MaxRMT relates to the familiar holographic CFT conditions of large N and large higher-spin gap.
Our work may also have something to say about lower dimensions. In JT gravity an analogous description of wormholes as emergent from non-disordered systems via a trace formula has been anticipated since [1]. Given the existence of an emergent Schwarzian sector in the near-extremal limit of 2d CFTs [5,105,106], it seems reasonable to seek a dimensional reduction of the CJ wormhole that yields the JT double-trumpet. One could then hope to translate the diagonality of the CJ wormhole (6.5) to a diagonal approximation interpretation of the JT double-trumpet. In that case, identifying the reduction of Z RMT (τ ) would yield new microscopic information about the microstates of JT gravity in the form of a trace formula for ρ(E). It would be interesting to compare it to other proposals for restoring factorization in JT gravity [84,85,[107][108][109].
Consider now the space of square integrable functions of two moduli τ 1 , τ 2 , i.e. L 2 (F 1 × F 2 ). A function f (τ 1 , τ 2 ) ∈ L 2 (F 1 × F 2 ) is in general not factorizable. The functions appearing in the body of the text (Z diag , Z Hecke , Z WH , Z CJ ) are elements of this space. The Stone-Weierstrass theorem [110] states that the subspace of factorized functions f (τ 1 )g(τ 2 ) ∈ L 2 (F) ⊗ L 2 (F) is dense in L 2 (F 1 × F 2 ). We then have a complete basis of functions for L 2 (F 1 × F 2 ) given by: The overlapsf ω 1 ,ω 2 are computed by taking the inner product with the basis elements, with the "double inner product" defined by the product metric As an example, the constant term in the spectral decomposition can be computed by taking residues of a double Rankin-Selberg transform: where the double Rankin-Selberg transform is defined as: The overlaps with a single Eisenstein can also be computed in terms of the Rankin-Selberg transform on the critical line Res = 1 2 : and similarly for (f, φ 0 E s (τ 2 )).

B.1 Regularization of the Cotler-Jensen wormhole
As an application, we show how the divergence of the Cotler-Jensen wormhole can be obtained and regularized from the constant term in the spectral decomposition. The constant term is given by taking residues of the double Rankin-Selberg transform: The Rankin-Selberg transform has a double pole at s 2 = 1, indicating the need for regularization. Simply taking the residue one obtains is the "finite part" of E s (τ ) as s → 1. The integral (B.9) is divergent, as E 1 (τ 1 ) diverges linearly as y 1 → ∞. We can regularize the overlaps by splitting the pole with a new parameter r in the following way, preserving the s → 1 − s reflection symmetry: As r → 1, this has a divergence that is constant in τ 1 , τ 2 , so we can regularize by subtracting this term: This is the same regularization originally proposed by [21], now obtained from regularizing the constant term in L 2 (F × F). The remaining finite constant is a free parameter of the regularization scheme.

C Continuity of the j → 0 limit
In this appendix we show that the scalar Fourier mode of the Eisenstein series E s,0 (y) can be obtained from a smooth j → 0 limit of the spin j mode E s,j (y), and similarly for the Eisenstein density ρ s,j (t).
First suppose the scalar sector is non-vanishing, Z The spin-(0, j) mode, which by assumption is equal to zero, is given by {Z spec , E sn }(Z spec , φ n ) E * sn,0 (y 1 )b (n) j √ y 2 K sn− 1 2 (2πjy 2 ) + (y 1 ↔ y 2 ) (D.3) We can single out the first line by using the Bessel orthogonality relation which allows us to project onto a chosen, non-degenerate eigenvalue ω = ω n on the critical line. This implies {Z spec , E s } = 0, in contradiction with the starting assumption that Z (0,0) diag (y 1 , y 2 ) = 0.

E Derivation of (4.9)
Here we derive (4.9), the "corrections" to the RMT ramp that are mandated by SL(2, Z) invariance, starting from the definition (4.7).
To prove (4.9) we first write Note that if R(0) is finite and nonzero, then S(x −1 ) has a linear, r-independent, divergence as 44 Defined within the relevant strips.
We can also rewrite (E.8) as a sum over residues by contour deformation. Since the integral is along the branch cut from zero to one, 45 we can replace it with a contour surrounding the branch cut, which we then blow up to pick up residues elsewhere in C. For example, simple poles of R(z) contribute as This may of course be generalized to include higher-order poles or non-meromorphic behavior.

F Toy wormholes in AdS 3 × M gravity
In this appendix we construct an explicit family of torus wormhole amplitudes which are toy models (or perhaps candidates) for off-shell wormholes of AdS 3 gravity with light matter, such as AdS 3 × M compactifications with large M. These theories are not MaxRMT theories, and their wormholes should reflect this. Specifically, the function R WH (z), which determines the entire amplitude (see Note that reflection symmetry f WH (s) = f WH (1 − s) requires the poles to appear in pairs, at z = z * and z = z −1 * . The reflection-symmetric combination is A well-known [62] set of Mellin dual pairs involves harmonic sums in z, i.e. taking F WH (z) to be an infinite sum over simple poles with no regular term. So long as we include the pole at z = −1 with the correct normalization, the wormhole reproduces the linear ramp. In accordance with the comments in Section 6.2.1, the remaining poles should avoid z ∈ R + and |z| = 1. For this reason, harmonic sums over poles along z ∈ R − is not only mathematically, but also physically, well-motivated here. Inserting this overlap into the wormhole ansatz (5.33) defines a family of toy model RMT wormholes for a theory of gravity with light matter, one for every p ∈ Z + . 46 By construction, this has the RMT ramp: 46 It would be nice to ask whether one can construct an amplitude of this form from a Poincaré sum over relative modular transformations. The structure of such Poincaré sums might also constrain the allowed singularity structures in the complex z plane.
On the Mellin side, one readily verifies that for all p ≥ 1 and any finite ω 0 , because |ζ(σ + iω)| → 1 asymptotically as ω → ∞ for any σ > 1. This can be seen numerically in Figure 7. Together with the exactly constant falloff of f CJ (s), the total f WH (s) satisfies the linear ramp condition (4.23).