AdS$_3$ gravity and random CFT

We compute the path integral of three-dimensional gravity with negative cosmological constant on spaces which are topologically a torus times an interval. These are Euclidean wormholes, which smoothly interpolate between two asymptotically Euclidean AdS$_3$ regions with torus boundary. From our results we obtain the spectral correlations between BTZ black hole microstates near threshold, as well as extract the spectral form factor at fixed momentum, which has linear growth in time with small fluctuations around it. The low-energy limit of these correlations is precisely that of a double-scaled random matrix ensemble with Virasoro symmetry. Our findings suggest that if pure three-dimensional gravity has a holographic dual, then the dual is an ensemble which generalizes random matrix theory.


Introduction
There has long been hope that simple models of quantum gravity with negative cosmological constant in less than four spacetime dimensions exist as consistent quantum mechanical models. It has recently been demonstrated that Jackiw-Teitelboim (JT) gravity [1][2][3][4][5][6], a twodimensional model of dilaton gravity, is just such a consistent theory [7]. Moreover, as one expects for consistent theories of AdS quantum gravity, it has a holographic dual. Unlike standard examples of AdS/CFT, the holographic dual is not a quantum mechanical system in one lower dimension. Rather its dual is a statistical ensemble of large random Hermitian matrices H [7].
The holographic dictionary equates the n-point ensemble average of tr(e −β i H ) in the dual matrix model to the JT path integral with n boundaries of renormalized lengths β i : The solid disk indicates a sum over all geometries which fill in the boundary circles. The righthand side is known only as an asymptotic series in a genus expansion with effective string coupling g s , while the left-hand side also has a genus expansion. Thanks to the topological recursion of matrix integrals [8][9][10][11], Saad, Shenker, and Stanford [7] have demonstrated that this equation holds to all orders in the genus expansion and for all n, and it is in this sense that JT gravity is dual to a certain matrix ensemble.
A striking feature of JT gravity is that it includes a sum over wormhole geometries which smoothly connect multiple asymptotic regions [7,12]. For example, in the genus expansion, the path integral with two boundaries is in pictures given by The leading contribution of O(g −2 s ) comes from two disconnected disks, while at O(g 0 s ) both disconnected geometries and connected ones contribute. In the matrix model this sum equals the complete two-point function tr e −β 1 H tr e −β 2 H ensemble . Its connected part is, in the genus expansion, the sum over geometries which connect the two boundaries, and is dominated by the leading connected geometry, that is, by a Euclidean wormhole.
There is a long history dating back to Coleman concerning Euclidean wormholes, whether or not they exist, and if they do what they imply for unitarity of Lorentzian quantum gravity [13][14][15]. In the context of AdS/CFT there is an additional complication, namely a tension between the existence of wormholes and the standard holographic dictionary. 1 Under that dictionary, the dual to gravity on a Euclidean wormhole would be a local Euclidean conformal field theory (CFT) on a disconnected space, while the connectedness of the bulk implies that dual CFT correlation functions do not factorize across the components. But these two statements contradict each other. However, in JT gravity we do not have the standard holographic dictionary: the dual description is not a single quantum mechanical theory, but an ensemble thereof (regarding H as a quantum mechanical Hamiltonian), which is enough to alleviate this tension, as correlations across boundaries are induced by an ensemble average rather than nonlocal interactions. The insertion of a nearly AdS 2 boundary is associated with the insertion of tr e −βH , i.e. the thermal partition function Z(β), into the dual matrix integral. As such it is perfectly consistent that the connected two-point function of Z(β), the very thing that tells us that Z(β) is not a c-number but a random variable, is equated in JT with a sum over wormholes that signal an ensemble average in the dual description.
The study of JT gravity has proven fruitful from a variety of perspectives, ranging from the resolution of old puzzles regarding the lack of decoupling of nearly extremal black holes in string theory [3,18] to the Sachdev-Ye-Kitaev model [19][20][21] to even toy models for de Sitter quantum gravity [22][23][24] (see also [25]). In this article we turn instead to pure quantum gravity in three dimensions, which has long been a workhorse in the study of simple models of gravity.
Classical "AdS 3 gravity" is an exactly soluble system: all solutions to Einstein's equations are locally AdS 3 and so one can find the phase space of classical solutions [26]. The classical model has no propagating degrees of freedom, but it does have edge modes (generated by large diffeomorphisms) with marginal interactions, in addition to moduli and a sum over topologies. However it is not yet known if the model is truly consistent or not.
Some years ago, Maloney and Witten [27] computed the leading contribution to the torus partition function of AdS 3 gravity, meaning the gravity path integral over metrics 1 It is worth noting that all but one example of Euclidean wormholes in string theory are known [16,17] to be unstable (the only exception we know of is the AdS5 wormhole of [16]), so concerns about this tension may ultimately be much ado about nothing in standard AdS/CFT. whose conformal boundary is a torus of complex structure τ . Strictly speaking they did not compute the complete path integral; rather they summed over saddle points of this kind, and metrics continuously connected to them. These geometries all have the topology of a disk times a circle, equivalently solid tori.
The density of states unearthed by the Maloney and Witten is not that of a unitary, compact dual CFT. Their result has a large spectral gap between the vacuum and the BTZ threshold, above which the spectrum is continuous. More worrisome, the putative density of states is negative very near its spectral edge [27][28][29][30]. For this reason it has generally been concluded that AdS 3 gravity is not dual to a two-dimensional CFT, and perhaps is not a consistent theory of gravity.
This conclusion is perhaps premature. The sum over spacetimes which asymptote to a torus includes more than a sum over solid tori, and perhaps these non-saddle point contributions render the AdS 3 density of states non-negative [31]. And while a compact CFT does not have a continuous density of states by definition, perhaps we should interpret this as a clue rather than a problem. That is, perhaps AdS 3 gravity is a consistent theory of gravity, dual not to a CFT but instead to a statistical ensemble, as in the holographic duality between JT gravity and a matrix model.
The point of this paper is to investigate this possibility. We do so by studying 3d gravity on spacetimes that are topologically a torus times an interval. These are Euclidean wormholes that smoothly connect two asymptotic regions with torus boundary. This is the simplest setting after solid tori for which we can reliably compute the gravitational path integral. What is this result dual to? The natural guess is that it is a contribution to the connected two-point function of torus partition functions, Z(τ 1 )Z(τ 2 ) conn = Z T 2 ×I (τ 1 , τ 2 ) + · · · , (1.1) which would in general be a sum over geometries which smoothly connect the two boundaries.
On the left-hand side, we have allowed for brackets indicating a suitable ensemble average. If AdS 3 gravity is dual to a single theory rather than a ensemble, then the torus partition function is a c-number and the right-hand side vanishes. Conversely, if the right-hand side is nonzero, then we infer that the dual, if it exists, is some sort of statistical ensemble. We exactly compute the contribution from the torus times an interval. It is Im(τ 1 )Im(γτ 2 ) |τ 1 + γτ 2 | 2 , Z 0 (τ ) = 1 Im(τ ) |η(τ )| 2 .
(1.2) Here Z 0 (τ ) is the partition function of a non-compact boson with η(τ ) = q 1/24 ∞ n=1 (1 − q n ) the Dedekind eta function, q = e 2πiτ , and γ is a modular transformation which acts as γτ = aτ +b cτ +d for ad − bc = 1. Unlike JT gravity, it is not known if AdS 3 gravity has a coupling constant which suppresses fluctuations of topology. As such we do not presently have a principled reason to expect our result to always be a good approximation to the complete sum over connected spacetimes in (1.1). However, there is a kinematic limit in which JT gravity, plus a U (1) gauge theory, gives a controlled approximation to AdS 3 gravity [32]. This is the simultaneous limit of low temperature and fixed, large angular momentum J. The effective genus expansion parameter in this regime is g s ≈ e −2π √ c|J|/6 for c = 3/(2G) the Brown-Henneaux central charge. Therefore we expect our result to be a good approximation in that limit. So the wormhole amplitude (1.2) gives a strong piece of evidence that, if AdS 3 gravity has a holographic dual, then the dual is a statistical ensemble.
The computation that leads to (1.2) is non-trivial. There is no smooth saddle point of AdS 3 gravity with the topology T 2 × I, and so the usual program of finding saddles and summing up fluctuations does not work. Indeed, the final result (1.2) does not depend on the gravitational coupling, and so has no saddle point approximation.
Our route to (1.2) is therefore somewhat indirect. Our starting point is the first-order formulation of gravity in Lorentzian signature, on the annulus times time. The action of gravity in first-order form has a single time derivative, and so is in Hamiltonian form, meaning that in the quantum theory one is integrating over trajectories in a phase space rather than in a configuration space. Furthermore, the time components of the gravitational variables act as Lagrange multipliers, enforcing Gauss' Law constraints on the spatial components. On the annulus we can solve these constraints exactly, and so we arrive at a constrained system. Quantizing the constrained system results in a Hilbert space of gauge-invariant "wormhole states. " We define what we mean by Euclidean quantum gravity by the analytic continuation of this constrained system to imaginary time, and upon compactifying imaginary time, the Euclidean path integral is automatically a trace over this Hilbert space.
The constrained system does not admit wormhole saddles, but it does have the next best thing. There are wormhole configurations which are, in a precise sense, nearly saddle points. These configurations are "constrained instantons" in the language of [33]: they extremize the action subject to two further constraints, whereby we fix the energy and momentum encoded in the boundary stress tensor. These configurations are characterized by a spatial metric and spatial spin connection (since in order to arrive at the constrained system we had to integrate out the time components of the gravitational fields). They are the dominant off-shell configurations of 3d gravity which contribute to the T 2 × I amplitude. See [34] for further discussion on constrained instantons in the context of Einstein gravity.
Of course we want to do more than find special field configurations: we want the complete path integral. To evaluate it we use the machinery of our earlier work [35]. After some simplification, the configurations that solve the Gauss Law constraints are characterized by four moduli and four chiral edge modes, two on each boundary. These edge modes are, at fixed Euclidean time, reparameterizations of a circle, more precisely elements of the quotient space Diff(S 1 ) U (1) , and may be thought of as large gauge transformations. These fields are weighted by an action, previously studied by Alekseev and Shatashvili in a rather different context in the 80's [36]. This action, which we call Alekseev-Shatashvili theory, is a twodimensional version of the Schwarzian action which weights the large diffeomorphisms of JT gravity. The integrals over these Alekseev-Shatashvili modes are one-loop exact, and the ensuing results are stitched together by a moduli space integral. The measure on this moduli space is determined by the symplectic structure of the constrained phase space. We arrive at the summand of (1.2) by performing the moduli space integral.
This procedure closely mirrors the construction of the "double trumpet" path integral in JT gravity in [7], in which two Schwarzian path integrals are stitched together by a moduli space integral. In AdS 3 , the analogue of the "trumpet" in JT gravity is two copies of the Alekseev-Shatashvili model.
The computation we just outlined is what we find for configurations where the spatial and temporal circles on one boundary interpolate through the bulk to the spatial and temporal circles on the other boundary. There are an infinite number of equivalent but topologically distinct configurations where, say, the spatial circle on one boundary interpolates to the temporal circle on the other. Summing over these contributions results in the modular sum in (1.2).
Having outlined how we find the wormhole amplitude, let us describe a few of its basic properties. It is easy to verify that it is invariant under independent modular transformations τ 1 → a 1 τ 1 +b 1 c 1 τ 1 +d 1 and τ 2 → a 2 τ 2 +b 2 c 2 τ 2 +d 2 . As for the modular sum, it is logarithmically divergent. Fortunately the divergence is rather simple: it is an additive constant, independent of τ 1 and τ 2 . Thus, as long as we study the dependence of Z T 2 ×I on its arguments rather than its absolute value, we are on firm footing. AdS 3 gravity is equipped with two copies of the Virasoro algebra that act as asymptotic symmetries on each boundary. The wormhole partition function is organized into contributions from Virasoro primaries and their descendants. The contribution from the primaries Z P comes from taking the complete result (1.2) and stripping off the infinite products in the Dedekind eta functions, It may be further decomposed into contributions from states of fixed spins on s 1 and s 2 on the two boundaries by Fourier transforming with respect to the real parts of τ 1 and τ 2 . At fixed spin and low temperature we find Here Im(τ 1 ) = β 1 and Im(τ 2 ) = β 2 , and we are studying the leading behavior as β 1 , β 2 → ∞ with the ratio β 1 /β 2 fixed. E s is the minimum energy of a black hole of spin s. In fact this limiting behavior is precisely related to random matrix theory. The spectrum of Virasoro primaries in two-dimensional CFT on the torus is characterized by a Hamiltonian H and a commuting momentum P . One can simultaneously diagonalize the two, in which case H is characterized by Hermitian blocks H s corresponding to states of fixed spin or momentum s. Instead of fixed matrices characterizing the spectrum of a particular CFT, if these blocks were large random matrices in a double-scaling limit, then a universal result in random matrix theory informs us that, after accounting for the threshold energy for black holes of fixed spin s, we would have tr e −β 1 Hs 1 tr e −β 2 Hs 2 ensemble, conn.
where the dots indicate genus corrections. This is of course exactly the leading low temperature limit of our wormhole amplitude in (1.4). Now consider the full amplitude, restoring the infinite products in the Dedekind eta functions. The full 2-point spectral statistics near threshold is determined by those of the primaries due to the Virasoro symmetry. These statistics match exactly with those expected from a random matrix theory ansatz with Virasoro symmetry, which we discuss later. So at least in this limit, our AdS 3 results are related to random matrix theory. The low-temperature limit zooms in on the low-energy limit. In gravity the low-energy states are the microstates of BTZ black holes of fixed spin near threshold. Another way of stating our result is that near threshold (and to the extent that our result is a good approximation to the complete gravity answer), the 2-point fluctuation statistics of these black hole microstates is described by double-scaled random matrix theory.
In fact, from (1.1) and (1.4) we may extract a spectral form factor which grows linearly at late Lorentzian time T and fixed spin. This "ramp" is, in random matrix theory, a consequence of eigenvalue repulsion, and it leads to linear growth with a universal slope that exactly matches our gravitational result [7,12,37,38]. While our AdS 3 computation is related to random matrix theory, let us be clear: we are not claiming that AdS 3 gravity is dual to an ensemble of random matrices. It seems more likely to us that AdS 3 gravity is dual to an ensemble which generalizes random matrix theory (and in particular incorporates modular invariance), from which we may sample CFT partition functions. We refer to this ensemble, whatever it may ultimately be, as "random CFT." (For very recent studies of ensembles of free CFT see [39,40].) The remainder of this manuscript is organized as follows. In Section 2 we discuss some basic features of Hamiltonian, or phase space path integrals, as well as set up the basics of AdS 3 gravity in first-order form. The computation of the wormhole path integral in (1.2) may be found in Section 3. We Fourier transform to fixed spin and organize the modular sum at fixed spin as a Poincaré series in Section 4, and show how this result is related to (and goes beyond) random matrix theory in Section 5. We conclude with a Discussion in Section 6. Some technical results are relegated to the Appendix.

Preliminaries
In this Section we set up the computation of the path integral of three-dimensional Euclidean gravity on T 2 × I. This computation is rather delicate and requires some preparation before diving in. We begin with the first-order formulation for gravity with negative cosmological constant in Lorentzian signature, which in second-order formalism is described by the action up to a boundary term. Here and henceforth we set the AdS radius to unity. In the first-order formalism, the gravity path integral is in fact a phase space path integral with constraints, analogous to Yang-Mills theory in Hamiltonian form. So we begin in Subsection 2.1 with a review of phase space path integrals, using Yang-Mills and Chern-Simons theory as examples. We then move on to review the first-order formulation of AdS 3 gravity in Subsection 2.2 and carefully continue to imaginary time in Subsection 2.2.3. We conclude in Subsection 2.3 with a discussion of the edge modes of AdS 3 gravity, large diffeomorphisms, whose contributions to the path integral are weighted by an action analogous to the Schwarzian action appearing in JT gravity.

Phase space path integrals and "constrain first" quantization
Phase space or Hamiltonian path integrals with constraints naturally arise in field theory and gravity. By phase space path integral, we mean a model whose action has a single time derivative and one integrates over trajectories in phase space rather than in configuration space. For instance, the quantum mechanics of a particle with position q i (t) and Lagrangian L = mq 2 2 − V (q) can equivalently be described in terms of a path integral over q i (t) and p j (t) with action L = p iq i − H(p, q) with H(p, q) the Hamiltonian.
The phase space path integral enjoys some relative advantages over the usual Feynman path integral, which will be of use to us in our study of Euclidean wormholes. The biggest one is that it allows us to perform an analysis at all! Our wormholes are not saddle points of the full gravity action, and so they are inaccessible by a standard perturbative treatment. Now in a Hamiltonian path integral for gauge theory or gravity, the time components of the gauge field or metric act as Lagrange multipliers enforcing Gauss' Law constraints. In a sense that will be more clear later, our wormholes are instead near-saddles, extremizing the gravity action in all but two directions of field space. In the language of [33] they are constrained instantons.
The phase space path integral description of gauge theories and gravity is an example of constrained quantization. We refer interested readers to [41,42]. We focus on two examples: Yang-Mills theory, and the Chern-Simons path integral.
Our initial discussion will be pedagogical; our goal is to contextualize some technical aspects of our gravity computations. The reader who wishes to skip to a summary of this discussion can go straight to Subsection 2.1.4.

Yang-Mills in Hamiltonian form
Ordinary Yang-Mills theory 2) may be recast as a phase space path integral. One integrates in electric fields E i so that 3) with F ij the field strength of A i and D i the gauge covariant derivative. This action is of the usual one-time-derivative term appropriate for a phase space action, of the schematic form where λ a are Lagrange mutlipliers enforcing the vanishing of the constraints C a = 0. In the Hamiltonian formulation of Yang-Mills theory, A 0 acts as a Lagrange multiplier enforcing Gauss' Law, A i is conjugate to E i , and there is the usual Hamiltonian ∼ tr(E 2 + B 2 ). The action is gauge-invariant with the electric field transforming in the adjoint representation of the gauge symmetry, and by 1 gauge we refer to the division by the gauge symmetry. One route to quantization is a "constrain first" approach in which one first integrates out A 0 with a flat measure. The residual path integral is performed over configurations of A i and E j that respect Gauss' Law. What happens next depends on the gauge-fixing, though of course the end result does not.
Suppose we impose Coulomb gauge ∂ i A i = 0. Then the Faddeev-Popov ghosts do not couple to A 0 and the residual integral is performed over configurations exactly satisfying D i E i = 0. If we instead impose Lorentz gauge ∂ µ A µ = 0, then the Faddeev-Popov ghosts have a linear coupling to A 0 and the Gauss' Law involves ghost bilinears. For definiteness consider the original path integral in Coulomb gauge, which reads (2.5) After integrating out A 0 the residual integral is performed over the ghosts, as well as over configurations of A i and E j which obey Gauss' law. Since the ghost action does not include time derivatives, c andc do not have conjugate momenta and the ghost integral is best understood as part of the measure for A i and E j . At fixed time these configurations, modulo the gauge symmetry, parameterize a phase space as we presently demonstrate. From the pq term we extract a putative symplectic form on this space, where by d we mean a formal variation in the space of field configurations rather than the exterior derivative. The integral is taken over a constant-time slice. It is easy to verify that ω is gauge-invariant on account of Gauss' Law. In order for ω to be a symplectic form it must be closed and non-degenerate. Clearly dω = 0, and as for being non-degenerate, the zero eigenvalues of ω correspond to gauge-variations. That is, ω is non-degenerate on the space of constrained A i and E j modulo the gauge symmetry, and is therefore a symplectic form. A nice feature of this approach is that it is easy to pass over to the operator formalism. One promotes A i and E j to operators with canonical commutation relations; the classical Hamiltonian becomes the quantum Hamiltonian (up to the usual ordering prescription); and one gets the Hilbert space of gauge-invariant states, parameterized by wavefunctionals of (A i , E j ) that satisfy Gauss' Law.

Chern-Simons theory
Another example of a phase space path integral is pure G k Chern-Simons theory for a compact gauge group G on a closed space Σ g times time [43]. This example is particularly useful to keep in mind, given the close relationship between three-dimensional gravity and Chern-Simons theory. The Chern-Simons path integral reads with A anti-Hermitian and the trace taken in the fundamental representation of G. Unlike Yang-Mills theory, we do not have to integrate in degrees of freedom to put the path integral into Hamiltonian form. We simply separate time from space, A = A 0 dt + A i dx i , and then the Chern-Simons action reads which is of the one-time-derivative form appropriate for a phase space action. The pq term implies that A i is conjugate to ε ij A j , there is no Hamiltonian, and A 0 enforces the Gauss' Law constraint. The story from here parallels the one for Yang-Mills theory, although there is a simpler route to the constrained system. One may obtain the classical phase space directly, and then quantize it. The classical constraint is simply F ij = 0 which may be solved locally as A i =g −1 ∂ ig whereg is a group-valued field which need not be periodic around cycles of Σ g . The effective action is simply the first term of (2.8), which upon substituting in this expression for A i only depends on the holonomies of A around the cycles of Σ g . From the pq term we extract the symplectic form on the phase space, which if we wished could be written in terms of the holonomies. Written this way it is clear that it satisfies all of the requirements of a symplectic form. It is manifestly closed; it is gaugeinvariant on account of the Gauss' Law constraint; the trace form is negative semi-definite (since A is anti-Hermitian and G is compact); and the zero eigenvalues of ω correspond to pure gauge fluctuations. So ω is closed and non-degenerate on the space of constrained A i modulo the gauge symmetry, and the residual integral is performed over trajectories in this phase space. In this instance the Chern-Simons path integral reduces to quantum mechanics (with H = 0) for the holonomies with a 2g-dimensional Hilbert space. The quantization is richer on a space with boundary, for which the Hilbert space becomes infinite-dimensional. Consider the disk times time, perhaps with a puncture in the interior. In this case the basic result is that the Chern-Simons theory is equivalent to a chiral WZW model on the boundary, i.e. to current algebra. The Hilbert space is isomorphic to a single highest weight module of a G k Kac-Moody symmetry, where the weight is determined by the puncture. (Here we have allowed that k and k differ by some renormalization, as in k = k + 2 for G = SU (2).) The infinite-dimensional phase space comes from the fact that locally one may decompose A i =g −1 ∂ ig , whereg's non-periodicity around the boundary circle is fixed by the conjugacy class of the puncture. The phase space and Chern-Simons action only depend on the boundary value ofg (modulo the redundancyg(x, t) → h(t)g(x, t) introduced by parameterizing A i in terms ofg).
Another basic example is quantization on the annulus times time. In this instance Chern-Simons theory is equivalent to a full non-chiral WZW model on the boundary. The rightmovers live on one boundary, the left-movers on the other, and the Hilbert space decomposes into a sum of tensor products of the form H λ ⊗ H λ * , with H λ a (right-moving) highest weight module of the Kac-Moody symmetry in a representation λ and H λ * the (left-moving) module in the conjugate representation. To arrive at this conclusion, one decomposes A i =g −1 ∂ ig , whereg = e λ(y)x g with g single-valued. The physical degrees of freedom are a single-valued G-field, g on each boundary, and a quantum mechanical holonomy characterized by λ.

Continuation to imaginary time and Hilbert space trace
Now let us continue to imaginary time, t = −iτ . In Euclidean signature we still want for A 0 to act as a Lagrange multiplier and, for Yang-Mills, we want the real part of the Euclidean action to be bounded below. These considerations fix A i and E i to continue with no factors of i, while i.e. A 0 → iA τ . So we integrate over the Euclidean gauge field A = A τ dτ + A i dx i with real contours for the A µ . For Yang-Mills theory the Euclidean phase space action is Compactifying Euclidean time with periodicity β, the path integral performed with this action and periodic boundary conditions gives us a trace over the physical Hilbert space H obtained after imposing Gauss' Law, Z E = tr H (e −βH ). Similarly, in Chern-Simons theory, we arrive at a Euclidean action Again this continuation guarantees that A τ acts as a Lagrange multiplier. The Euclidean path integral again has the interpretation of a Hilbert space trace, now over the Hilbert space of states on Σ g . When there is a boundary we have seen that the Hilbert space is enlarged from finitedimensional to infinite-dimensional. For example, on the disk times time, the Hilbert space is a single irreducible module of a Kac-Moody algebra i.e. that of a chiral WZW model; and on the annulus times time it is the Hilbert space of the full G k non-chiral WZW model.
Consider the disk times time. Upon continuation, one may arrange for the boundary to be a torus of complex structure τ . The Euclidean path integral is the torus partition function of a G k chiral WZW model, a character of a highest weight module of the Kac-Moody symmetry. For the annulus times time, upon continuation, one equivalently has the Chern-Simons path integral on a torus times an interval. One may arrange for the boundary where the right-movers reside to be a torus of complex structure τ 1 , and the other τ 2 . For an appropriate choice of boundary conditions, the Euclidean path integral then becomes a generalized WZW torus partition function, where the left-and right-movers are at different temperatures: with q 1 = e 2πiτ 1 and q 2 = e 2πiτ 2 . The usual torus partition function of a WZW model, i.e. with τ 1 = τ 2 = τ , is modular invariant. This generalized partition function is also modular invariant even when τ 1 = τ 2 , This invariance is geometrized in the Chern-Simons computation. See Fig. 1. The threedimensional space is topologically T 2 × I. The usual arguments for modular invariance of 2d CFT on the torus can then be adapted here. Recall that the torus is a quotient of the complex plane T 2 = C Z × Z generated by a basis of lattice vectors (ω 1 , ω 2 ) with τ = ω 2 ω 1 . For T 2 × I we should regard the basis vectors ω 1 and ω 2 as smoothly varying along the interval. But we may describe the same torus with any basis we wish, and any two bases are related by a modular transformation, which then acts simultaneously on τ 1 and τ 2 .
This last example of G k Chern-Simons theory on T 2 × I is particularly relevant for us. It is a prototype for the Euclidean wormholes of AdS 3 gravity that we will study, which are also topologically T 2 × I, smoothly connecting two asymptotic regions with torus boundary.
There is another useful fact to glean from Fig. 1. The bulk orientation induces opposite orientations on the two boundaries. In our AdS 3 analysis we wish to study wormholes where both boundaries have the same orientation. In practice this can be accomplished by parityflipping boundary 2. With respect to the new orientation both boundaries are endowed with modes of the same chirality. At the level of the partition function we do this by reinterpreting its complex structure as τ 2 → −τ 2 , i.e. by flipping the real part of τ 2 while preserving the imaginary part. The ensuing partition function is Z (τ 1 , τ 2 ) = Z A×S 1 (τ 1 , −τ 2 ), and by (2.14) it obeys Z (γτ 1 , γ −1 τ 2 ) = Z (τ 1 , τ 2 ) for γ ∈ SL(2; Z).

Figure 1:
Chern-Simons theory on T 2 × I is modular invariant, even when the boundary tori have different complex structures. Here r is the coordinate along the interval, and (ω 1 (r), ω 2 (r)) are the lattice vectors corresponding to the torus as a function of r.

Taking stock
Let us summarize a few lessons from the phase space path integral form of gauge theory that will appear in our AdS 3 analysis.
1. The time component of the gauge field acts as a Lagrange multiplier, enforcing the Gauss' Law constraint. For Chern-Simons theory the constraint is simply that the spatial field strength vanishes, and the residual integral is performed over flat spatial connections, locally A i = G −1 ∂ i G. The residual integral only depends on topological data (holonomies around contractible cycles) and boundary values of G.
2. After imposing the constraints and modulo the gauge symmetry, the residual space of field configurations is, at constant time, a phase space with a symplectic form determined by a single-time-derivative term ∼ pq in the effective action. This gives us a canonical measure for the residual path integral, on each time slice given by the Pfaffian of the symplectic form of that phase space.
3. The continuation to imaginary time is simply t → −iτ and A t → iA τ , i.e.
with a real integration contour for A τ . This guarantees that A τ continues to act as a Lagrange multiplier in the Euclidean theory. Upon compactifying Euclidean time, the Euclidean path integral then has the interpretation of a trace over the Hilbert space of states obtained after enforcing the Gauss' Law constraint.
4. Finally, in Chern-Simons theory on T 2 × I we have encountered a prototype of the Euclidean wormholes we will study in 3d gravity. We can clearly tune the complex structures τ 1 and τ 2 of the boundary tori to be different from one another, but they are connected through the bulk. The space is equivalent to an annulus times a circle, which continues in real time to an annulus times time. The Hilbert space is that of a G WZW model, where the right-movers reside on one boundary and the left-movers on the other. The Euclidean path integral is a trace over that Hilbert space, tr H WZW q L 0 1qL 0 2 with q i = e 2πiτ i , and it is modular invariant.
All of these lessons correspond to aspects of our gravity computation. In the first-order formalism the gravitational action is already in Hamiltonian form. The time components of the dreibein e A 0 and spin connection ω A B0 act as Lagrange multipliers, enforcing curvature and torsion constraints. The continuation to imaginary time parallels (2.15), 16) and the local Lorentz symmetry remains SO(2, 1). This continuation is essentially fixed by discrete symmetries and the requirement that e A τ and ω A Bτ continue to act as Lagrange multipliers. However, this means that we continue to integrate over Lorentzian-signature metrics even though we are in imaginary time. This statement is initially puzzling, but we can made our peace with it on two counts. First, we require this continuation in order to have a Hilbert space interpretation in real time. Second, it has a parallel in JT gravity, where much more is known about the gravity path integral. The analogue there is the integration over imaginary values of the dilaton, which enforces the constant curvature constraint.
Finally, our wormholes are topologically T 2 × I, or equivalently A × S 1 . These configurations are not saddle points of the complete gravity action, however we can fully enumerate them, after integrating out e A τ and ω A Bτ . As in the Chern-Simons case, we may independently dial the complex structures of the boundary tori, and we expect on general grounds for the gravity path integral to be modular invariant under simultaneous modular transformations acting on τ 1 and τ 2 . This is a strong consistency condition which is obeyed by our result.

First order formulation of AdS 3 gravity
Three-dimensional gravity with negative cosmological constant is often said to be classically equivalent to a Chern-Simons theory [44]. (For statements going beyond classical physics see [45,46].) This statement needs additional qualifiers in order to be true. More precisely, AdS 3 gravity on spacetimes of the topology disk times time (i.e. global AdS 3 and spacetimes continuously connected to it) is equivalent to a topological sector of SO(2, 2) Chern-Simons theory. This equivalence holds in the quantum theories to all orders in perturbation theory but, as we will see, it does not hold on other spacetimes. In other words there is only a perturbative equivalence between three-dimensional gravity and a Chern-Simons theory, but they are non-perturbatively different theories.
Let us review the usual classical equivalence, which is seen as follows. Let M, N be spacetime indices. Consider the first-order formulation, where we decompose the metric into a dreibein e A M through g M N = η AB e A M e B N , where A, B are flat indices which are raised and lowered with the Minkowski metric η AB . We introduce a spin connection ω A BM satisfying ω (AB)M = 0. The gravity action in first-order variables is Notably the action only has a single time derivative, and each component of the dreibein and spin connection only appears once. So we are dealing with a phase space path integral with constraints. To see the relation to a Chern-Simons theory, one then groups the first order variables into the vector-valued one-forms and introduces generators J A andJ A in the fundamental representation of sl(2; R) satisfying and similarly forJ A , with ε 012 = −1. Define the algebra-valued one-forms A = A A J A and A =Ā AJ A . Note that A andĀ are independent real fields. When we require an explicit form of the generators, we use Then up to a boundary term a short computation shows that the action (2.1) may be written as a difference of Chern-Simons terms, Since A andĀ are linear combinations of the dreibein and spin connection, it follows that the classical equations of motion for the first-order variables are simply those for A and A, the flatness conditions Further, on a classical solution, infinitesimal diffeomorphisms and local Lorentz rotations act in the same way as infinitesimal sl(2; R) × sl(2; R) gauge transformations. 2 So on-shell, A andĀ appear to be sl(2; R) × sl(2; R) gauge fields, and linearized diffeomorphisms and local Lorentz rotations act as linearized gauge transformations. Of course we would like to see that the converse is true, i.e. that linearized gauge transformations are in one-to-one correspondence with linearized diffeomorphisms/rotations. But this is only the M , so this is simply the condition that the spacetime metric is non-degenerate.
To sum up, we see that AdS 3 gravity is on-shell equivalent to sl(2; R) × sl(2; R) Chern-Simons theory at the level of the equations of motion and linearized gauge symmetries, so long as the spacetime metric is non-degenerate. Of course the quantum theories are rather different.

Global AdS 3 and boundary conditions
The simplest solution to Einstein's equations on a spacetime with the topology of a disk times time is global AdS 3 , parameterized by the dreibein . This spacetime has a conformal boundary as ρ → ∞. Upon solving for the spin connection so that the torsion vanishes, the combinations A andĀ are This G andḠ are double-valued, with G(x+2π, t, ρ) = −G(x, t, ρ) and similarly forḠ. Recall that P SL(2; R) is the quotient of SL(2; R) by its Z 2 center {I, −I}, and that SO(2, 2) is its double cover, the quotient of SL(2; R)×SL(2; R) by the Z 2 subgroup {(I, I), (−I, −I)}. Then G andḠ are single-valued only as elements of either P SL(2; R) × P SL(2; R) or SO(2, 2), and not of any cover thereof. So, to the extent that the Chern-Simons description has a good candidate for the global form of the gauge group, it must be either P SL(2; R) × P SL(2; R) [47] or SO(2, 2) [35].
In fact nonlinear classical equivalence selects SO(2, 2). The isometry group of global AdS 3 is SO(2, 2), since the combined transformation x → x + 2π and t → t, acts as the identity. It is easy to verify that these nonlinear isometries act on A andĀ as SO(2, 2) gauge transformations.
SO(2, 2) has a fundamental group isomorphic to Z × Z, and it is worth noting that the SO(2, 2) field (G,Ḡ) parameterizing global AdS 3 has a non-trivial winding number around the spatial circle. Configurations with other winding numbers have curvature singularities in the interior. So first-order AdS 3 gravity (on the disk times time) is only classically equivalent to a particular winding sector of SO(2, 2) Chern-Simons theory.
In order to fully specify the classical theory we must also supply a variational principle and add requisite boundary terms to the Chern-Simons action. We impose the standard Brown-Henneaux boundary conditions on the metric, which when translated to the first-order variables become as one approaches a conformal boundary at ρ → ∞. These boundary conditions clearly allow global AdS 3 , and crucially, an infinite-dimensional phase space of solutions connected to it parameters by the action of large diffeomorphisms on global AdS 3 . These boundary conditions are consistent with a good variational principle for e and ω, equivalently A andĀ, only if we add a boundary term to the Chern-Simons action which we describe momentarily.

Going off-shell
In this manuscript we are interested not in classical physics but the complete gravity path integral. Our approach is to take the first-order path integral as fundamental, and in Section 3 we will see just what a Chern-Simons description does and does not get correct.
In the original first-order action e A 0 and ω A B0 appear linearly and we proceed by treating them as Lagrange multipliers. Equivalently, we take the combinations A 0 andĀ 0 to be Lagrange multipliers. So we separate time from space x µ = (t, x i ) with i = 1, 2 the spatial directions, and decompose A andĀ into their temporal and spatial parts as Here S bdy is a boundary term required in order for there to be a variational principle consistent with the boundary conditions (2.26). It is given by This action is indeed of the form (2.4) with a Hamiltonian only coming from the boundary term, and a symplectic form coming from the pq term as taken over a constant time slice. A 0 andĀ 0 appear as Lagrange multipliers enforcing the Gauss' Law constraints. From here the path integral quantization that ensues closely parallels that of Chern-Simons theory as described in Subsection 2.1.2. One solves the flatness constraints to obtain the classical phase space, which one then quantizes using the action (2.27) and symplectic structure (2.29). The step that is different from Chern-Simons theory is that we integrate over inequivalent metrics, not inequivalent gauge fields. For 3d gravity on the torus times interval, equivalently annulus times time, this difference boils down to a different field range for the wormhole moduli as well as a different integration measure over the moduli space.

Continuing to imaginary time
Now we continue to imaginary time. The story here parallels the continuation of gauge theory to imaginary time t = −iy 3 in Subsection 2.1.3. We require that the time components of the dreibein and spin connection, equivalently A andĀ, continue to act as Lagrange multipliers, and that the spatial metric is real. These considerations fix e A 0 → ie A y and ω A B0 → iω A By , with the spatial components not picking up any factors of i. Equivalently, with real integration contours for e A y and ω A By , equivalently A A y andĀ A y . Relatedly, in our continuation we take the local rotations to remain valued in SO(2, 1) rather than SO (3). We do this because we are interested in a Hilbert space of the Lorentzian signature theory, whose local Lorentz invariance is SO(2, 1) rather than local rotational invariance SO(3). Consequently we sum over Lorentzian signature metrics g M N = η AB e A M e B N even though we are in imaginary time.
Let us be more explicit. Consider Global AdS 3 , (2.24). Continuing t = −iy, we have and the resulting line element is Euclidean. We may further identify z ∼ z + 2πn + 2πmτ so that the boundary is a torus of complex structure τ . Note that A y andĀ y are pure imaginary. In going off-shell, we integrate over A andĀ subject to the boundary conditions and we integrate over real fluctuations. That is, we fix A y andĀ y (equivalently e A y and ω A By ) to be pure imaginary near the boundary, and integrate over a real contour for them in the interior.
This is analogous to what one does in JT gravity, where one fixes the dilaton to be a real constant on the boundary and integrates over imaginary fluctuations in the bulk.

What about SL(2; C)?
Clearly we must be careful about what we mean by Euclidean quantum gravity. Let us briefly comment on another possible definition, namely the sum over real Euclidean metrics. In the first-order formalism we would have a dreibein e A M and spin connection ω A BM with ω (AB)M = 0, where now we raise and lower flat indices with the Euclidean metric δ AB and mod out by local SO(3) rotations. The Euclidean action is the same as (2.17), except now ε ABC is the antisymmetric invariant tensor of SO(3) instead of SO(2, 1). The spin connection appears quadratically and can be integrated out, resulting in Euclidean gravity in the second-order formalism.
On-shell, there is again a story about classical equivalence with a Chern-Simons theory. One can group the dreibein and spin connection into an sl(2; C) gauge field, on which linearized diffeomorphisms and local rotations act in the same way as infinitesimal sl(2; C) gauge transformations. The gravity action equals a Chern-Simons action for this gauge field. Nonlinearly, for Euclidean global AdS 3 , the P SL(2; C) isometries of EAdS 3 act on this gauge field as P SL(2; C) gauge transformations.
However, unlike in Lorentzian signature where classical AdS 3 gravity is equivalent to a winding sector of SO(2, 2) Chern-Simons theory, P SL(2; C) is simply connected and so has no winding sectors.
In any case, the reader may wonder why we do not start with this definition. The reason is simple: in this definition, while e A M and ω B CM appear linearly in the action (for fixed M ), the action is real and so they do not act as Lagrange multipliers with a real contour of integration.

Alekseev-Shatashvili theory
AdS 3 gravity has no propagating degrees of freedom, but it does have edge modes. These are sometimes called boundary gravitons. They are generated by acting on a spacetime with large diffeomorphisms and Lorentz transformations (meaning they do not die off at the boundary, and so are not part of the gauge symmetry) that preserve the boundary conditions.
In our previous work [35], we obtained the effective action for these large gauge transformations for global AdS 3 . Our approach was to use the classical equivalence between AdS 3 gravity on the solid cylinder D × R and a particular winding sector of SO(2, 2) Chern-Simons theory, and to then quantize using the Chern-Simons description. In this case the Chern-Simons phase space coincides with the phase space of 3d gravity on the disk, and so both lead to the same quantum theory. Our goal for this Subsection is to summarize that effective action, its path integral, and a deformation of it which will appear in Section 3.
Let us briefly summarize the Chern-Simons quantization, and refer the reader to [35] for more details. We integrated out the time components A 0 andĀ 0 , which enforced that the spatial gauge field was flat. Parameterizing it as which clearly leads to the same gauge field. So we identify these configurations in the path integral over G andḠ. Decomposing the AdS 3 boundary conditions (2.26) fix (λ, ψ,λ,ψ) near the boundary in terms of (φ,φ) which remain finite on the boundary. The winding condition implies that (λ, ψ,λ,ψ) are single-valued, but φ andφ are not periodic, instead obeying That is, φ andφ are, at fixed time, diffeomorphisms of the circle, Diff(S 1 ). Translated into an identification on φ andφ, (2.35) means that we identify Thus, at fixed time, φ andφ are elements of the quotient space Diff(S 1 ) P SL(2; R) . With these substitutions the chiral WZW action then simplifies to the desired boundary effective action for the edge modes φ andφ, 5 The quantity C is the Brown-Henneaux central charge, and C 1 is the weak coupling limit both for AdS 3 gravity and for this model. This action is Lorentz-invariant, in fact conformally But the fractional linear transformation in (2.38) is the same for (a, b, c, d) and (−a, −b, −c, −d). So the quotient is effectively by two independent copies of P SL(2; R), rather than by SO(2, 2). 5 This result was anticipated in [48]. Its quadratic approximation was independently arrived at in [49] as an effective field theory for 2d CFTs dominated by exchange of the identity operator and its Virasoro descendants.
invariant, despite not being manifestly so. Being linear in time derivatives, it is already in Hamiltonian form. The time derivative term tells us that the symplectic form is which is also what we get from the bulk symplectic form (2.29) upon rewriting A in terms of φ andφ. At the quantum mechanical level, the AdS 3 path integral is then (2.43) The notation indicates that the measure of integration is, at fixed time, over the space with the symplectic measure inherited from (2.42). So large gauge transformations are weighted by the action S, and in the quantum theory we integrate over them.
We see that the action and path integral chirally factorize into models for φ andφ. The classical chiral action for φ (orφ) was not new. It first appeared in a paper of Alekseev and Shatashvili [36], and for this reason we refer to it as Alekseev-Shatashvili theory. The point is that the integration space of φ at fixed time is a coadjoint orbit of the Virasoro group. See [35,50] for a practical primer to coadjoint orbits. Coadjoint orbits of Lie groups G are phase spaces with a G-invariant symplectic form, and under certain conditions one can consider the quantum mechanics of trajectories in the phase space, the quantization of the phase space. This quantization generally produces a quantum mechanics whose Hilbert space is a single irreducible representation of G. There is some freedom in the choice of Hamiltonian, but the natural ones correspond to elements of the Lie algebra of G. Building upon previous work, Alekseev and Shatashvili obtained the classical action corresponding to the quantization of the coadjoint orbit Diff(S 1 ) P SL(2; R) of the Virasoro group, which for a Hamiltonian corresponding to the generator L 0 coincides with the action S + above. (The action S − is its chiral conjugate, with a Hamiltonian corresponding toL 0 .) There is a close relationship between this model and the Schwarzian path integral describing Euclidean JT gravity on the hyperbolic disk. The field of the Schwarzian path integral is an element of the same phase space φ ∈ Diff(S 1 ) P SL(2; R) . It may be thought of as a phase space integral, Z disk ∼´dxdp e −βH . The Alekseev-Shatashvili model is simply the quantization of this phase space, and AdS 3 gravity on the disk times time is two decoupled copies of this quantum mechanics, one right-moving and one left-moving.
To investigate the Hilbert space of the Alekseev-Shatashvili model we continue to imaginary time t = −iy and put the model on a torus of complex structure τ by identifying z = x + iy ∼ z + 2πτ (recall that x is already periodic with x ∼ x + 2π). The ensuing Euclidean action is The boundary conditions for φ andφ are that they wind once around the spatial cycle, and are periodic around the other, 6 This corresponds in three dimensions to our continuation of gravity on global AdS 3 , where the asymptotic geometry is Euclidean and the boundary is a torus of complex structure τ . The bulk is a disk times a circle, and we call the path integral Z(τ ).
There is a unique solution to the equations of motion with these boundary conditions modulo the quotients, and at large C we compute Z(τ ) to one loop by expanding φ andφ in fluctuations around the classical trajectory. The one-loop determinant must be evaluated with respect to the symplectic measure (2.42), with the result which we recognize as the Virasoro character of the vacuum representation with a one-loop renormalization of the central charge by 13. (This one-loop renormalization can also be seen from a one-loop computation in the bulk [51].) In other words, the path integral tells us that the Hilbert space of the mode is the vacuum representation of two copies of the Virasoro group. The holomorphic contribution comes fromφ, and the antiholomorphic from φ.
In our previous work [35] we showed that the torus partition function of the Alekseev-Shatashvili model is one-loop exact by a localization argument. In a sense the argument is the quantization of the argument of Stanford and Witten [6] that the Schwarzian path integral is one-loop exact. The gist is to exponentiate the symplectic measure with ghosts. The total action, including the ghost term, is invariant under a Grassmann-odd BRST supercharge Q. Because the integration space at fixed time is not only symplectic but Kähler with a metric invariant under the action of L 0 andL 0 , there is a Q-exact term constructed from the Kähler metric whose bosonic part is positive definite. Adding this term to the action with a large positive coefficient leaves the partition function invariant, but localizes the path integral. We then conclude that the exact Alekseev-Shatashvili path integral is (2.47) In this computation the spatial circle of the boundary is contractible in the bulk. There are infinitely other configurations where other combinations of boundary cycles are contractible in the bulk, and the path integral on each is given by Z(γτ ) for some modular transformation γ ∈ P SL(2; Z). Gravity sums over this choice, so that the complete disk times circle partition function is (2.48) Here Γ ∞ is the subgroup of P SL(2; Z) generated by the T transformation, which leaves the vacuum character invariant. The path integral analysis complements that of Maloney and Witten. Using [52] they performed a Kähler quantization of the phase space of 3d gravity on the cylinder, the same one we mentioned above, Diff(S 1 ) P SL(2; R) × Diff(S 1 ) P SL(2; R) . The ensuing Hilbert space is the vacuum representation of Virasoro at some central charge c. Passing over to imaginary time and taking the boundary to be a torus of complex structure τ , the Euclidean path integral is the vacuum character, and the sum over other configurations gives the same partition function (2.48).
There is a one-parameter family of deformations of the model (2.44) that will appear in our wormhole analysis. In Euclidean signature, the deformation of the right-moving part is labeled by a constantb 2 > −1 and is given by At constant time the fieldφ is an element of the quotient Diff(S 1 ) U (1) , meaning it obeys the same boundary conditions as in (2.45), but is subject to a gauge symmetrȳ φ(x, y) ∼φ(x, y) +ā(y) . (2.50) This more general Alekseev-Shatashvili path integral, is also one-loop exact (in fact it is secretly a quadratic theory after a non-local field redefinition), giving an ordinary holomorphic Virasoro character where the renormalized central charge c and scaling weight h are A left-moving mode with some b would give rise to the antiholomorphic character with (2.54) In our wormhole analysis, we can imagine cutting the wormhole into two "trumpets." We will see that each trumpet is endowed with two Alekseev-Shatashvili modes of this sort, one holomorphic and with one antiholomorphic, and characterized by some b andb. The total contribution from the trumpet is then a non-holomorphic character with scaling weights (h,h) as above. In a picture, we have

Spectral form factor in random matrix theory
The spectral form factor lies at the focal point of the connection between our AdS 3 analysis and random matrix theory. Here we provide a brief review of the spectral form factor in random matrix theory and gravity. (See [38] for a modern review of random matrix theory.) We begin with random matrix theory. Suppose we have an ensemble of d×d Hamiltonians, that is, a probability distribution P (H) over the space of d × d Hermitian matrices. Each H has d eigenvalues E 1 , ..., E d , and we can write the averaged density of states as (2.55) Due to the ensemble average, ρ(E) will often be a smooth function of E instead of a sum of delta functions. The density of states encodes the probability of finding an eigenvalue at energy E. We can also consider two-point correlations such as which encodes the joint probability of finding an eigenvalue at energy E and another eigenvalue at energy E . For ensembles of sufficiently "generic" Hamiltonians, the energy eigenvalues will repel one another. Furthermore, in small, contiguous energy windows away from the edge of the spectrum, the pair correlations of eigenvalues are equivalent to the pair correlations of a classical one-dimensional Coulomb gas with logarithmic repulsion at finite temperature. Thus the eigenvalues form a crystal in one dimension, which can be more rigid or more floppy depending on the strength of the level repulsion. The long-range level repulsion is captured by a term in ρ(E, E ) of the form The spectral form factor is the Fourier transform (2.57) Due to the inverse square repulsion 1 d 2 (E−E ) 2 , the spectral form factor will contain term linear in time ∼ T . Often it is convenient to consider a finite-temperature analog of the spectral form factor, namely tr e −(β+iT )H tr e −(β−iT )H ensemble . (2.58) This will also contain linear growth in time ∼ T , called the ramp.
The time-dependence of the (finite-temperature) spectral form factor is as follows. At time T = 0, its value is ∼ d 2 , which then decays to zero either exponentially or polynomially depending on the details of the ensemble. Once the spectral form factor has decayed to an O(1) value, the linear growth ∼ T (with small fluctuations around it) dominates until times of O(d). As stated above, this linear growth is due to long-range level-level repulsion. At T ∼ O(d), the spectral form factor is probing short distances on the scale of the average nearest-neighbor level spacing, which causes the spectral form factor to become constant (with small fluctuations).
The spectral form factor has been computed for many random matrix theories and disordered theories. Using matrix fat graphs, the diagrams which correspond to the ramp correspond to discretized wormhole-like geometries of the connected part tr(e −iHt ) tr(e iHt ) ensemble, conn. [53]. More recently, the initial decay and subsequent ramp of the spectral form factor was computed analytically and numerically in the SYK model [12,37]. Here the ramp manifested as bulk gravitational configurations corresponding to a Euclidean wormhole. Perhaps most interestingly, the spectral form factor can be computed in JT gravity, dual to a random matrix theory [7]. One subtlety is that this random matrix theory is double scaled, i.e. d → ∞, but in such a way that e S 0 (where S 0 is a large genus expansion parameter) takes on the role of d in the spectral form factor and other spectral correlators. Again the ramp corresponds to Euclidean wormhole configurations in the gravity picture.
It is worth noting several aspects of the spectral form factor that are relevant to our analysis in the present paper. First, suppose we can consider an ensemble of Hamiltonians with a common symmetry that allows us to block-diagonalize each Hamiltonian as Then generically, each block will behave like an independent random matrix. That is, the eigenvalues within a particular H j will experience level repulsion, but there will not be level repulsion between eigenvalues of H j and eigenvalues of an H k for j = k. As such, it is natural to compute the spectral form factor for each block independently, i.e.
Such spectral form factors will contain a late-time ramp ∼ T . One of the more notable features of the spectral form factor is that it is not a selfaveraging quantity [54]. In particular, if we sample a random H from our ensemble H, the for large d will not approximate the spectral form factor at late times in terms of having a large percent error. Eqn. (2.59) will have a ramp, but with large fluctuations that are the size of the height of the ramp itself. Similarly the plateau at times t O(d) is swamped by large fluctuations. Only the early-time behavior corresponding to the decay of the spectral form factor is self-averaging. If we take a single Hamiltonian (without regard to any ensemble) and compute Eq. (2.59), we will find similar behavior, i.e. the ramp and plateau will be present but nearly swamped out by large fluctuations. It is only by ensemble averaging that these fluctuations become suppressed.
In this paper we effectively compute the connected part of the spectral form factor in pure AdS 3 gravity at late times (but before the plateau). On the boundary we have Virasoro symmetry, including a conserved, commuting Hamiltonian and momentum. The Virasoro symmetry implies that many states at a given energy and momentum are descendants of primary states, with quantum numbers fixed by those of the primaries. So we will work with primary states in sectors of fixed momentum. Now the key question is whether the spectral form factor in AdS 3 gravity is more like Eq. (2.59) with a single Hamiltonian, having a ramp with large fluctuations, or instead is like Eq. (2.58) which is an ensemble average and thus has a ramp with suppressed fluctuations. We will provide evidence for the latter. Furthermore, while we provide strong evidence that AdS 3 gravity is an ensemble-averaged theory, it is only resembles the random matrix theory of a single block-diagonal Hamiltonian in the large-time limit, with the blocks corresponding to sectors of fixed momentum. Outside of this regime, there is an intriguing departure from the discussion above. Pure AdS 3 gravity is, at its simplest, a matrix model with infinitely many non-independent matrices. More broadly, we conjecture that AdS 3 gravity is an ensemble from which one draws CFT partition functions, rather than quantum mechanical Hamiltonians, and that his ensemble becomes double-scaled random matrix theory in a certain limit.

Wormholes
In this Section we compute the path integral of AdS 3 gravity for the torus times an interval. In our Hamiltonian framework it is more useful to think of the space as an annulus times a circle. See [55,56] for previous work on the classical phase space of AdS 3 gravity on the annulus.
Let us begin by setting up the conventions, boundary conditions, and solving the constraints. We let x ∼ x + 2π, y ∼ y + 2π parameterize a torus and ρ ∈ R be a radial coordinate which parameterizes the interval. The two conformal boundaries are approached as ρ → ±∞. In this setting the asymptotically AdS 3 boundary conditions are that, as ρ → ∞, the combi-nations A andĀ defined in (2.18) approach With this choice, the spacetime metric approaches so that the conformal boundary is indeed a torus of complex structure τ 1 . Note that we are imposing boundary conditions so that the spatial part of the dreibein and spin connections are real, but the temporal components have an imaginary part. This is required so that the metric is Euclidean near the boundary. In the path integral we integrate over real fluctuations of all of the fields. Similarly we impose that near the other boundary ρ → −∞ we have so that the conformal boundary is a torus of complex structure τ 2 . With these boundary conditions, the spatial and temporal circles on boundary 1 respectively interpolate to the spatial and temporal circles on boundary 2. Let us call the path integral with these boundary conditions and bulk topology Z(τ 1 , τ 2 ). This object is not the complete gravity path integral on T 2 ×I, which we denote as Z T 2 ×I (τ 1 , τ 2 ). The latter includes a sum of P SL(2; Z) Dehn twists of the torus on boundary 1 relative to the torus on boundary 2. For instance, we ought to sum over bulk configurations in which the spatial circle on boundary 1 smoothly interpolates to the temporal circle on boundary 2. As we will see at the end of Subsection 3.3, the partition function Z(τ 1 , τ 2 ) includes an infinite sum of these Dehn twists generated by the axial T transformation (τ 1 , τ 2 ) → (τ 1 , τ 2 + 1). As a result the total wormhole amplitude is given by where Γ ∞ is the subgroup generated by T , i.e. the subgroup of modular transformations which preserves τ = i∞. The Euclideanized gravity action, including boundary terms is (3.5) One may verify that these boundary terms and the boundary conditions are consistent with a good variational principle.
Integrating out A y andĀ y imposes the Gauss' Law constraints F ij =F ij = 0, which are solved by whereG andG are SL(2; R)-valued fields which may be multi-valued around the spatial circle but which are periodic in y. This non-periodicity may be parameterized as with G andḠ periodic fields in the trivial winding sector of SL(2; R). It is simple to show that smoothness of the spatial metric requires that λ andλ are "spacelike" vectors in sl(2; R).

By decomposing A intoG andĀ intoG we introduce a redundancy under
G(x, y, ρ) → h(y)G(x, y, ρ) ,G(x, y, ρ) →h(y)G(x, y, ρ) , (3.8) for h andh elements of SL(2; R), since both configurations parameterize the same A i and A i . This redundancy may be partially alleviated by fixing the non-periodicity ofG andG in group space. We pickG = e b(y)xJ 1 G ,G = eb (y)xJ 1Ḡ . (3.9) The redundancy is then only under those h andh which commute with the non-periodic parts, meaning under transformations h = e a(y)J 1 andh = eā (y)J 1 . If we were quantizing Chern-Simons theory rather than gravity, then b(y) andb(y) would parameterize the holonomies of A andĀ respectively around the spatial circle at time y. These holonomies would be in the hyperbolic conjugacy class of SL(2; R). Their interpretation in gravity will become clear in the next Subsection.

(3.16)
One consistency check on the action (3.14) is that it is invariant under the gauge redundancy (3.12), which acts simultaneously on the 1 and 2 fields as φ 1 (x, y) ∼ φ 1 (x, y) + a(y) , φ 2 (x, y) ∼ φ 2 (x, y) + a(y) , (3.17) and similarly for the barred fields. The "twist" fields Y andȲ are in fact gauge-invariant. The effective action (3.14) is a bit complicated. We will simplify it shortly. For now, we note that it also has a single time derivative and therefore is in Hamiltonian form. Accordingly, the single time derivative term in the action determines a symplectic measure on the space of field configurations, which we will use to perform the path integral below.

Representative wormholes
Let us pause to consider some representative wormhole geometries before going on to compute the full path integral. Consider the configuration with φ andφ defined as in (3.10). This corresponds to φ 1 = φ 2 =φ 1 =φ 2 = Y =Ȳ = 0. In fact this configuration is almost a saddle point of the constrained action (3.14) for all b,b. After a shift of ρ, this configuration corresponds to Extracting the spatial dreibein, we arrive at a spatial metric (recall that in imposing the constraints we have integrated out the temporal component of the dreibein) This is a bottleneck geometry, as in Fig. 2. Clearly we must have bb > 0 in order for the wormhole to be smooth and non-singular. The bottleneck is characterized by a minimum length geodesic around the x-circle at ρ = 0. It has length which gives an interpretation to the sum of b andb. To interpret the difference of b andb we consider the spin connection. The wormhole described by (3.19) has a spin connection with some curvature. So the holonomy around some curve depends on the curve. However a natural way to describe the wormhole is the holonomy of the spin connection around a particular curve, the minimum length geodesic around the bottleneck. Recall that the spin connection is valued in sl(2; R) = so(2, 1). The holonomy in the two-dimensional representation is in the hyperbolic conjugacy class with tr P exp So fields with spin are twisted by an amount determined by b −b when going around the bottleneck. Studying the spatial metric (3.20) and holonomy (3.22) we learn that these wormholes are characterized by arbitrary b,b ≥ 0. (The configurations with b,b ≤ 0 are equivalent to those with b,b ≥ 0.) Our continuation to imaginary time rears its head here. In our continuation we do not continue the gauge group for local Lorentz rotations from SO(2, 1) to SO(3). This has the following consequence: the holonomy (3.22) allows for arbitrarily large b −b, whereas if the spin connection was for local SO(3) rotations, its holonomies would be valued within a finite range.

The gravitational action (3.14) evaluated on (3.20) is
The fact that the action depends on b andb tells us that the wormhole is a constrained saddle. It is a saddle only when we fix b andb, and the complete path integral will involve an integral over b,b ≥ 0. This action also gives us another way to interpret the parameters b andb. The classical approximation to the path integral (upon fixing b andb) is

Moduli space field range and measure
The full set of constrained saddles is parameterized by constant b,b as above, in addition to twists between the two boundaries: where α and β are finite at infinity with boundary values α i and β i for i = 1, 2. The fields α and β are related to the twists Y andȲ defined in (3.16) by More precisely, the most general saddles are characterized by constant b,b, and the boundary values of α and β. These are the wormhole moduli. As we will see, α 1 and β 1 parameterize a spacetime translation on the boundary 1, while α 2 and β 2 parameterize a translation on boundary 2. Common translations are trivial, and lead to the same configuration. Only relative translations are physical, and these are precisely the twists. We already found above that the zero modes b,b are non-negative. Our goal in this Subsection is to obtain the field ranges of the twists and the measure on the moduli space.
As in (3.19) the wormhole configurations correspond to dρ .

(3.27)
Near both boundaries, the spatial geometry is approximately We then see that a shift of α 1 corresponds to a spatial translation on boundary 1, and a shift of α 2 to a spatial translation on boundary 2. So α is compact with periodicity 2π. However, β appears to be non-compact. As result the "vector twist" Y +Ȳ 2 = α = α 1 − α 2 is compact and it seems the "axial twist" Y −Ȳ 2 = β = β 1 − β 2 is non-compact. To interpret this result we temporarily go back to Lorentzian signature, where the boundaries are cylinders S 1 × R. The asymptotic metric is and so shifts in β correspond to time translations. So axial twists β = β 1 −β 2 are relative time translations of the boundaries and are obviously non-compact. From the last line of (3.14) we extract the symplectic structure on the moduli space and so a measure db 2 db 2 dαdβ Pf(ω moduli ). In Euclidean signature however, the periodicity of Euclidean time suggests that we may rotate the contour of the zero mode β so that axial twists correspond to relative Euclidean time translation. If τ 1 and τ 2 are pure imaginary, then the statement is simply that we rotate β 1 and β 2 (and so the twist β) to be pure imaginary.
This idea is simple enough, but its execution is a little more tricky than one might think, on account of the independent boundary complex structures.
Consider the full spacetime dreibein near the boundary, including the temporal part anchored down as a boundary condition. From (3.1) and (3.27) we have at large positive ρ e + = e 0 + e 1 ≈ e ρ b 2 (dx +τ 1 dy + dγ) , e − = e 0 − e 1 ≈ − e ρb 2 (dx + τ 1 dy + dγ) , (3.31) and at large negative ρ, with e 2 = dρ in both regions. We proceed by parameterizing the translations γ andγ near the boundaries as with α(ρ) and β(ρ) real. This definition for α is consistent with the one we used above, but the definition for β is different, in particular it is not purely axial. Crucially we are allowing for the zero modes to acquire an imaginary part. With this decomposition, at large positive ρ we have e + ≈ e ρ b 2 (dx + dα +τ 1 (dy + dβ)) , e − ≈ − e ρb 2 (dx + dα + τ 1 (dy + dβ)) , (3.34) and similarly at boundary 2. With this continuation shifts of α i are spatial translations and shifts of β i are translations in imaginary time. So, as expected, the α i and β i are compact with periodicity 2π. Points in the moduli space are labeled not by the individual translations α i and β j but by the relative translations α = α 1 − α 2 and β = β 1 − β 2 . The original twists Y andȲ , however, are not functions on the moduli space: we have Y = α+(τ 1 β 1 −τ 2 β 2 ) andȲ = α+(τ 1 β 1 −τ 2 β 2 ) which only depends on β when the two complex structures are aligned as τ 1 = τ 2 = τ .
Let us take this limiting case of τ 1 = τ 2 = τ . Then from the last line of (3.14) we extract a symplectic form on moduli space This leads to a consistent symplectic measure on the moduli space db 2 db 2 dαdβ Pf(ω moduli ) ∝ db 2 db 2 dαdβ Im(τ ). However, for more general τ 1 and τ 2 , the pq term in (3.14) does not lead to a symplectic form since the twists are functions of the individual β i and not β. To illustrate the point, suppose that we define the temporal twist to only act on boundary 1, i.e. β 2 = 0 and β = β 1 . Then we would have a putative symplectic form ∝ (db 2 − db 2 ) ∧ dα + (τ 1 db 2 − τ 1 db 2 ) ∧ dβ and arrive at a measure ∝ db 2 db 2 dαdβ Im(τ 1 ). Clearly we would get a different answer if we defined our axial twist to only act on boundary 2.
So we are forced to analytically continue both ω moduli and the volume form when the complex structures are no longer aligned. We view this as part of the continuation to imaginary time. We define which is a tensor on the moduli space and reduces to ω moduli in (3.35) when τ 1 = τ 2 . Ω is non-degenerate and so defines a covariant measure, which is indeed a volume form on the moduli space. Up to the factor of Im(τ 1 )Im(τ 2 ) this is two copies of the Weil-Petersson measure on the moduli of the hyperbolic cylinder.
To summarize, the moduli may be labeled by (b,b, α, β) with b,b ≥ 0. The spatial and temporal twists α and β are compact zero modes of periodicity 2π. The moduli space measure is given by (3.37), and it will play a pivotal role in our analysis. In particular, its dependence on τ 1 and τ 2 ensures that the wormhole amplitude is modular invariant.
It is worth noting that if we were studying SO(2, 2) Chern-Simons theory instead of gravity, then b,b ≥ 0 correspond to hyperbolic holonomies and the twists Y andȲ would be non-compact. So the measure would be proportional to db 2 db 2 dY dȲ . This is a perturbative (1-loop) difference between Chern-Simons theory and gravity on the space T 2 × I. However, we are of the opinion that it should be regarded as a non-perturbative difference between the two theories, since in gravity the wormhole is already a non-perturbative effect.

The path integral
We now compute the wormhole amplitude. Recall the boundary action (3.14). We proceed by redefining the fields φ i andφ i so that the twist fields Y andȲ are independent degrees of freedom. Given the subtleties about twist zero modes that we discussed in the last Subsection, we explicitly separate out the axial twist zero mode: (3.38) while leaving φ 2 andφ 2 alone. Here α(y) is an arbitrary function of Euclidean time with α ∼ α + 2π, while β(y) is non-compact and has no zero mode, i.e.´2 π 0 dy β(y) = 0. The cost of performing this redefinition is that we must introduce gauge symmetries. The redundancies (3.12) are enhanced to The action (3.14) becomes (3.40) Our next step is to integrate out the twists α(y) and β(y), which only appear in the last line of the action through a pq term. Clearly α and β act as Lagrangian multipliers enforcing that b(y) andb(y) are constants. But let us proceed slowly and compute the exact effect, including the normalization.
Consider a simpler version of the problem at hand. Let p(y) be a non-compact variable with some range and q(y) compact with periodicity 2π, and an action S E = ic´2 π 0 dy p∂ y q. We may expand p and q into Fourier and winding modes where (p, q) are the zero modes, w is a winding number of q around the thermal circle, and the Fourier expansion coefficients satisfyX * m =X −m . So we can eliminate the negative modes and regard theX m>0 as independent complex variables. Because the action is of the pq form there is a symplectic structure ω = c dq ∧ dp on the space of zero modes, and on the space of nonzero Fourier modes. At fixed m we have ω m = c dq m ∧ dp −m , (3.42) so that the integration measure for fixed m > 0 is d 2 q m d 2 p m Pf(ω m ) = d 2 q m d 2 p m c 2 . In this parameterization the action becomes Then we have as a general identity for any functional F(p(y)), (3.44) In going from the first line to the second we integrated out the Fourier expansion coefficients, which sets p to constant at the cost of a Jacobian which we Zeta-regularize as In going from the second line to the third we use the Poisson summation formula, ∞ w=−∞ e −2πiwcp = ∞ n=−∞ δ(cp − n). Finally, in the last line we used that the field range of q is 2π and the sum is taken over those values of p n which lie within the original integration range of the zero mode p.
To summarize, the Fourier modes of q set p to be constant up to a Jacobian 1 2π ; the winding modes quantize cp ; and there is a remaining integral over the zero modes of q and p. Now we turn to the problem we really want to solve. Let us decompose b(y),b(y), α(y), and β(y) into Fourier and winding modes.  The zero modes (b 2 ,b 2 , α) along with β defined above parameterize the moduli space, and w is a winding number. Integrating out the Fourier modes of α m and β m sets b andb to be constant with a Jacobian of 1 (2π) 2 since we have integrated out two sets of modes rather than one. This Jacobian is canceled by the (2π) 2 field range of the twist zero modes α and β. The sum over windings quantizes As we will see shortly this is the integer quantization of spin. It remains to integrate over the fields φ i andφ i . Once b andb are constant we may perform a field redefinition which simplifies the problem, namely So defined the fields φ 1 , φ 2 , etc., are at fixed time elements of Diff(S 1 ) U (1) , meaning 49) and similarly for the other fields. The remaining part of the action, the first two lines of (3.40), then becomes four decoupled copies of the Alekseev-Shatashvili theory we discussed in Section 2.3, (3.50) The Alekseev-Shatashvili path integral over each mode is one-loop exact [35]. The integrals overφ 1 andφ 2 produce holomorphic Virasoro characters (2.52) which we reprise as while the integrals over φ 1 and φ 2 produce antiholomorphic characters withh = c−1 24 + Cb 2 24 . By (3.47) the spin is then quantized: (3.52) Converting the integration over b,b ≥ 0 to an integral over h,h ≥ c−1 24 , we then have (3.53) Using the Poisson summation formula and (3.51) we can rewrite this as dhdh e 2πih(τ 1 +τ 2 +n) e −2πih(τ 1 +τ 2 +n) where Z 0 (τ ) is the modular invariant partition function of a non-compact boson 1 √ Im(τ )|η(τ )| 2 . The sum over windings n corresponds to a partial sum over Dehn twists, relative T n transformations of the boundaries. The basic objectZ is the gravity path integral on T 2 × I without any Dehn twist at all between the boundaries.
We are nearly finished. Before going on, we note that the more basic objectZ is invariant under simultaneous modular transformations, for γ ∈ P SL(2; Z). In fact our amplitude had to be invariant under this simultaneous transformation for the same reason why Chern-Simons theory on T 2 × I is as we discussed in Subsection 2.1.3. This is a strong consistency check on our result. We note that had we not continued the axial twist as in Subsection 3.2 we would have instead gotten infinity times a non-modular-invariant result. So modular invariance in fact tells us that we had to continue the axial twist. Relatedly, modular invariance combined with the fact that the moduli space is symplectic for τ 1 = τ 2 together fix the moduli space measure we landed on in (3.37). 7 As we discussed before (3.4), the complete wormhole partition function Z T 2 ×I is given by the sum γ∈P SL(2;Z)/Γ∞ Z(τ 1 , γτ 2 ), corresponding to a sum over relative Dehn twists. This Maloney-Witten-like modular sum over Z(τ 1 , γτ 2 ) then gives our main result, Im(τ 1 )Im(γτ 2 ) |τ 1 + γτ 2 | 2 (3.56)

The modular sum
In the last Section we computed the path integral of AdS 3 gravity on T 2 ×I. The result is just above, in (1.2), and is expressed as a modular sum over P SL(2; Z). The goal of this Section 7 With the result (3.54) in hand, modular invariance alone implies that the measure must be proportional to Im(τ1)Im(τ2) G Im(τ 1 )Im(τ 2 ) |τ 1 +τ 2 | 2 for some function G. However recall that for τ1 = τ2 = τ the measure was proportional to Im(τ ). This fixes G to be a constant, and so the measure in (3.37) is the unique one consistent with modular invariance and the aligned limit τ1 = τ2.
is to compute the modular sum, and to process it into something more useful. Because Z 0 (τ ) is modular invariant, we need only compute the Poincaré series This sum does not converge. However the divergence is particularly simple and it can be understood by a variant of Zeta regularization.
To simplify the notation, we henceforth work with complex variables z and w rather than τ 1 and τ 2 , with z = z 1 + iz 2 and w = w 1 + w 2 . Define a Zeta function which converges for Re(s) > 1, and which becomes our sum at s = 1. Further as s → + 1 we find that This demonstrates that the modular sum F(z, w) in (4.1) diverges. Zeta-regularizing the sum with s = 1+ε and taking ε → 0, there is a 1/ε pole with constant coefficient, independent of z and w, and a finite remainder. This finite remainder is almost independent of the regulatory scheme. In Appendix A we demonstrate that other Zeta-based regulatory schemes, which have the virtue of maintaining modular invariance, also lead to finite pieces which agree up to an additive constant. So it seems reasonable to define a renormalized version of the prefactor F(z, w) by this finite remainder, up to addition by a constant. When it converges the Zeta-regularized sum F s (z, w) is invariant under independent modular transformations, F s (z, w) = F s (γ 1 z, w) = F s (z, γ 2 w) and in particular under independent T transformations, z → z + 1, and w → w + 1. As a result it has a well-defined Fourier series in the real parts of z and w, Because the divergence as s → 1 is independent of z and w, it follows that the double Fourier transform of the modular sum for F(z, w) converges, as long as at least one of the momenta s i is nonzero. The divergence only contributes to a constant divergence in the zero momentum subsector. So as long as we work with the Fourier transformed version of our sum, we can set s = 1 from the start.
In the remainder of this Section we compute this double Fourier transform and analyze it in some detail.

Fourier series expansion
The Fourier coefficients in question are 2πiz 1 s 1 +2πiw 1 s 2 F(z, w) . (4.5) To evaluate F s 1 ,s 2 , we make several simplifications enabled by the modular sum and the symmetries of F. Defining f (z, w) = Im(z)Im(w) |z + w| 2 , (4.6) we can write F(z, w) = γ∈P SL(2;Z) f (z, γw) and similarly Note that f (z, γw) = f (γ −1 z, w). We can parameterize a general element γ of SL(2; Z) by an integer matrix a b c d , which acts as γτ = aτ +b cτ +d . For c and d coprime, let us denote by γ c,d some element of SL(2; Z) of the form * * c d .
There may be multiple such elements of this form (and there is guaranteed to be at least one), but for our purposes the specific choice will not matter. Letting (Z/cZ) * denote the residue classes mod c which are multiplicatively invertible (more concretely, consider the set of integers from 1 to c − 1 which are coprime to c), we show in Appendix B that (4.9) The first term equals n∈Zˆ1 0 dz 1ˆ1 0 dw 1 e 2πiz 1 s 1 +2πiw 1 s 2 f (z, w + n) = πz 2 w 2 z 2 + w 2 e −2π(z 2 +w 2 )|s 1 | δ s 1 ,s 2 . (4.10) Let us denote the second term in (4.9) by G s 1 ,s 2 (z 2 , w 2 ). Its general form is slightly complicated, although for sgn(s 1 ) = −sgn(s 2 ) it simplifies to Here, d −1 is any multiplicative inverse of d mod c. In the remaining parts of this Section we will examine the salient features of the c = 0 contribution in (4.10), and the c ≥ 1 contributions packaged as G s 1 ,s 2 (z 2 , w 2 ).

Zero momentum mode
We begin by examining the zero momentum mode F 0,0 . Eqn.'s (4.10) and (4.11) simplify to The second term is divergent, which we can see by rewriting it as where ϕ(c) is the Euler totient function which counts the number of positive integers less than or equal to c which are coprime to c, i.e. the size of (Z/cZ) * . This sum is then ∞ c=1 π 2 c 2 ϕ(c) + (convergent) . (4.14) we find that the source of the divergence of our sum is i.e., we run into the s = 1 pole of ζ(s).
As suggested earlier, we can regulate the divergence as follows. Letting Computing F s,0,0 , we find that divergent term we examined above is regularized to 8 π It is natural to subtract off the s = 1 pole, and then take the limit as s → 1. In this way, we can regularize F 0,0 so that it is finite. Our regularization procedure is robust up to an additive constant which is independent of z 2 and w 2 , i.e. different ways of implementing the zeta-function regularization will differ by an additive constant. Next, we will show that the the remaining Fourier coefficients F s 1 ,s 2 for at least one of s 1 , s 2 non-zero are finite. Furthermore, we establish that once we have regularized the divergence in F 0,0 , the function F(z, w) itself is finite.

Summary
We have decomposed F(z, w) into a Fourier expansion in z 1 and w 1 with Fourier components F s 1 ,s 2 . The zero mode F 0,0 is divergent, which we showed how to Zeta-regularize. All of the remaining Fourier coefficients F s 1 ,s 2 are finite, and upon regularizing F 0,0 the entire Fourier series for F(z, w) converges.
The Fourier coefficients are given by The first term accounts for all of the terms in the modular sum generated by τ → τ + 1 while the second term G s 1 ,s 2 includes all terms in the modular sum with at least one S transformation. In general G s 1 ,s 2 is given by (4.20), and when the signs of s 1 and s 2 are opposite it simplifies to (4.11).
In the next Section, we will show how our the Fourier coefficients F s 1 ,s 2 allow us to relate our Euclidean wormhole computation in AdS 3 to the calculation of a ramp in the spectral form factor of a putative dual "random CFT." Our results will generalize the analysis of the spectral form factor in random matrix theory.

Beyond random matrices
Equipped with the Fourier series decomposition of F(τ 1 , τ 2 ) defined in (4.1) in (4.25), we will now analyze the wormhole amplitude Z T 2 ×I (τ 1 , τ 2 ) at fixed spins and low temperature. We will show how to extract a spectral form factor from the amplitude, and provide evidence that, if AdS 3 gravity has a dual, then the dual is an ensemble which provides a generalization of random matrix theory.

Low temperature, long times
From the results of Section 4 we can write the amplitude (3.56) as 1) where again Z 0 (τ ) = 1/( Im(τ )|η(τ )| 2 ) and we have regularized F 0,0 as explained previously. The Fourier coefficients F s 1 ,s 2 are in general rather complicated. However they simplify enormously in the low temperature limit Im(τ 1 ) = β 1 , Im(τ 2 ) = β 2 → ∞ with β 1 /β 2 fixed. In that limit one can show from the integral representation (4.20) that 9 where I (n) s 1 ,s 2 are series coefficients which are suppressed by powers of the temperature relative to the indicated, leading order result. For example, the leading low-temperature correction is the n = 0 term Here Θ(x) is the Heaviside step function. So there is universal behavior in the low temperature limit, with rather complicated corrections. Taking the low temperature limit zooms in on low-energy physics in the usual way. In this setting the low-energy physics is that of BTZ microstates near threshold. We would like to interpret the wormhole amplitude as being a good approximation of an ensemble average Z(τ 1 )Z(τ 2 ) ensemble, conn. in some regime with Z(τ ) a CFT torus partition function. There is a JT limit of AdS 3 gravity [32] at large spin and low temperature, with a genus expansion parameter which suppresses fluctuation of topology. At least in, and perhaps beyond that regime we expect our result to be a good approximation to the complete one. The torus partition function of a given, fixed CFT is determined by its spectrum on the circle, which is organized into representations of the Virasoro symmetry. The complete spectrum is determined in terms of the spectrum of primaries, which themselves may be labeled by their energy and momentum. The wormhole amplitude Z T 2 ×I may be separated into a contribution from primary states alone, which we call Z P , and contributions from descendants determined by symmetry. From the final form of Z T 2 ×I (τ 1 , τ 2 ) in (3.56), as well as the unintegrated expression in (3.53), we see that the full amplitude comes from non-degenerate representations of Virasoro on the two boundary tori with no vacuum contribution. So to obtain Z P we simply strip off the infinite products in the prefactors Z 0 (τ 1 )Z 0 (τ 2 ), giving Im(τ 1 )Im(τ 2 ) ∞ s 1 ,s 2 =−∞ e −2πiRe(τ 1 )s 1 −2πiRe(τ 2 )s 2 F s 1 ,s 2 (Im(τ 1 ), Im(τ 2 )) .
(5.4) The prefactor is independent of Re(τ 1 ) and Re(τ 2 ), and so the Fourier coefficients of Z P are simply proportional to the F 's. We arrive at the leading low-temperature expression (5.5) Here E s is the threshold energy (with respect to the Hamiltonian 2π L 0 +L 0 − c 12 ) for a BTZ black hole at spin s.
We can extract the spectral form factor for primaries. See Subsection 2.4 for a summary of the spectral form factor in random matrix theory. We simply take our result in (5.5) and analytically continue β 1 → β + iT , β 2 → β − iT , which allows us to study finite temperature correlations of the spectrum at Lorentzian time T . Including the first low-temperature correction we have The leading correction comes from the expansion of the square root of the first term of (5.6), as well as of from the leading behavior of the second line. Eq. (5.7) has the behavior of a linear ramp, with fluctuations which are power-law suppressed in 1/T . Guided by the JT limit of AdS 3 gravity, we have some reason to believe that the torus times interval amplitude dominates the two-torus partition function at least at low temperature and large spin (and implicitly for times which are not exponentially long compared to c). We would then have a spectral form factor containing a ramp with small fluctuations around it, which is a smoking gun of a disordered theory. In the next Subsection we will find a precise connection between the slope of the ramp and random matrix theory.

Random matrix statistics and Virasoro symmetry
In looking for an ensemble dual to pure AdS 3 gravity, we notice several features which emulate random matrix theory. In random matrix theory, nearest-neighbor eigenvalue statistics are controlled by the symmetries of the ensemble. In this Subsection we are primarily interested in GUE eigenvalue statistics (in the absence of symmetry) and GOE eigenvalue statistics (in the presence of T 2 = 1 time-reversal symmetry). Operationally, we will consider the late-time behavior of the spectral form factor, whose behavior depends on the symmetry class. For a recent discussion in the relevant context of double-scaled random matrix theory, see [57].
Suppose that we envision AdS 3 gravity as being dual to an ensemble of CFTs, inducing an ensemble over CFT Hamiltonians on the circle. CFT Hamiltonians are (infinitely) large matrices, and so perhaps there is a connection between AdS 3 gravity and random matrix theory with Virasoro symmetry. We are not aware of a discussion of such matrix models, nor do we know how to construct such an ensemble for AdS 3 gravity specifically. However, due to the universality of eigenvalue pair correlations in random matrix theory, we can analyze certain properties of matrix ensembles with Virasoro symmetry on general grounds.
The complete spectrum of such a random matrix ensemble is organized into a sum over representations of the Virasoro symmetry, determined by the spectrum of primaries, which are themselves labeled by an energy and momentum. Let us call the Hamiltonian which labels Virasoro primary states H. It commutes with a momentum operator P, which we take to also act only on primary states. Of course the spectrum of primaries completely determines the spectrum of the full Hamiltonian and momentum. We can block diagonalize each Hamiltonian H in the ensemble into blocks H p of fixed momentum p. Positing that H p is itself a large random matrix in the absence of additional symmetries, we would expect each H p to have GUE eigenvalue statistics. Accordingly, we can define a momentum-block spectral form factor Z P p,q (β + iT, β − iT ) = tr e −(β+iT )Hp tr e −(β−iT )Hq ensemble, conn. (5.8) We would expect that each Z P p,p (β + iT, β − iT ) has a GUE ramp due to level repulsion, and that Z P p,q (β +iT, β −iT ) for p = q does not have a ramp since H p and H q will have statistically independent eigenvalues. Our AdS 3 computation realizes these expectations, thus supporting the conceptual framework of AdS 3 being dual to a "random" CFT. Specifically, we find a ramp exactly matching that of double-scaled GUE random matrix theory.
As an additional piece of evidence for a putative duality with random CFT, suppose we gauge time reversal symmetry in the bulk. This corresponds to introducing a global time reversal symmetry on the boundary theory, implemented by an anti-unitary operator T with [P, T] = 0 . (5.9) For simplicity we suppose T 2 = 1. As above, let us block diagonalize an H in the ensemble into blocks H p of fixed momentum. Then for a |ψ in the subspace corresponding to the block H p , we have P|ψ = p|ψ . But we also have P(T|ψ ) = −TP|ψ = −p(T|ψ ), and so T|ψ is in the subspace corresponding to the block H −p . More generally, TH p T † = H −p , and so H p and H −p have identical eigenvalues. Since TH 0 T † = H 0 , H 0 is a real symmetric matrix in a suitable basis. Taking all of these considerations into account, we have that Z P p,p (β + iT, β − iT ) and Z P p,−p (β + iT, β − iT ) for p = 0 have GUE ramps, Z P 0,0 (β + iT, β − iT ) has a GOE ramp, and Z P p,q (β + iT, β − iT ) for p = q does not have any ramp. These features are mirrored in gravity. After gauging bulk time reversal, the Fourier coefficients become Z s 1 ,s 2 (β 1 , β 2 ) = Z s 1 ,s 2 (β 1 , β 2 ) + Z s 2 ,s 1 (β 1 , β 2 ) . (5.10) Accordingly, we find that for small temperatures and long times, Indeed, this exactly matches expectations from random matrix theory.
In the remainder of this Subsection we return our focus to the ungauged model. In fact our gravitational result (5.5) matches more than the slope of a ramp predicted by random matrix theory. The leading contribution to the connected two-point function of eigenvalues is a universal result in random matrix theory. In the present setting, it implies that in the double-scaling limit tr e −β 1 Hp tr e −β 2 Hq ensemble, conn.
where the dots indicate corrections in the genus expansion. Here the cut for ensemble averaged density of states of H p runs from [E p , ∞). This result precisely matches the leading lowtemperature limit of our gravitational result. In summary, we find that the T 2 × I contribution to the spectral form factor ramps, and more broadly to the full low-temperature 2-point fluctuation statistics of BTZ microstates, exactly matches the predictions of random matrix theory with Virasoro symmetry. While this agreement with random matrix theory is totally striking, we note that there may be roadblocks to a straightforward random matrix interpretation. Specifically, the Maloney-Witten density of states is negative near threshold [27][28][29][30]. This flatly contradicts the prospect of a random matrix duality, although perhaps the negativity of the Maloney-Witten density of states is cured upon performing a complete non-perturbative path integral analysis (instead of just summing over saddles corresponding to smooth geometries with torus boundary, and geometries continuously connected to these). An interesting feature of our gravitational result is corrections to the ramps which are suppressed by powers of the temperature. These are not expected in standard random matrix theory, and so could provide clues as to how AdS 3 may go beyond this framework.
In any case, now let us consider the complete form of the wormhole amplitude, restoring the contribution from descendants. The full result is determined by Virasoro symmetry in terms of the contribution from primaries. From the leading low-temperature limit of the Fourier coefficients F s 1 ,s 2 , we find Im(τ 1 )Im(τ 2 ) Im(τ 1 ) + Im(τ 2 ) (5.13) The Fourier coefficients of the full result at fixed spin read where E s,n = 2π |s| + 2n − 1 12 and C s 1 ,s 2 ,n is an integer determined by the small−q expansion of the Dedekind eta prefactor. In other words, the Fourier coefficients contain an infinite sum of increasingly suppressed exponentials. As an example, when s 1 = s 2 = s and n = m = 0 we have with p(k) the partition function of k, the number of ways k may be partitioned into integers.
As another example, consider s 1 = 2, s 2 = 1, and n = m = 0. In that case C 2,1,0,0 = 3. Note that there are low temperature correlations for any s 1 and s 2 , not merely when the spins are equal, and that there is an infinite tower of exponentially suppressed corrections. These facts guarantee that the full spectral form factor has the long time form C s 1 ,s 2 ,n,m e −β(Es 1 ,n+Es 2 ,m)−iT (Es 1 ,n−Es 2 ,m) 1 + O 1 T .
(5.16) So there is a ramp only when the two energies coincide, with a more complicated slope than before.
These expressions automatically match the prediction from random matrix theory with Virasoro symmetry, which is similarly determined in terms of the primaries by the symmetry. The full Hamiltonian H block diagonalizes into sectors H p of fixed spin p, in such a way that the full blocks are determined in terms of the Hamiltonian H and momentum P on primaries. In particular, the symmetry determines the full correlation function tr e −β 1 Hp tr e −β 2 Hq ensemble, conn.
Let us unpack this with the example of s 1 = 2, s 1 = 1, and n = m = 0. The full Hamiltonian H 2 has infinitely many blocks, one corresponding to the spin-2 primaries H 2 , and the others corresponding to descendants. There are three other "descendant" blocks whose densities of states starts at the minimum value E 2 (the other descendant blocks have densities of states starting at E 2,n ): one comes from acting on the spin-1 primaries H 1 with L −1 , and the other two from acting on the scalar primaries H 0 with L 2 −1 or L −2 . Similarly at spin-1 the lowest energy contributions come from the primary block H 1 and the descendant block where the dots indicate blocks whose cuts begin at larger energies. The leading low-temperature contribution to (5.17) simply comes from tracking the effects of eigenvalue repulsion between identical primary blocks. There are three such terms in the two-point function tr e −β 1 H 2 tr e −β 2 H 1 ensemble, conn. : one where L −1 · H 1 repels against H 1 , and two more where L 2 −1 · H 0 and L −2 · H 0 repel against L −1 · H 0 . So from the matrix ensemble we obtain C 2,1,0,0 = 3, matching what we found from the Fourier analysis of the wormhole amplitude above.
Having gone through this example, we emphasize that more generally the constants C s 1 ,s 2 ,n,m is determined both from the wormhole amplitude and matrix ensemble by the same Virasoro symmetry. And so given that the statistics of the primaries match, the statistics of the descendants match too.

Random CFT
We have seen that the leading low-temperature limit of the wormhole amplitude Z T 2 ×I is precisely described by double-scaled random matrix theory with Virasoro symmetry. However there are some simple reasons why we expect that the dual to AdS 3 gravity is not a random matrix theory. The first is that in Euclidean gravity we may arrange for the boundary to be any genus g surface, and it is not clear how to interpret such an observable in a putative random matrix dual. Another reason is the power-law suppressed fluctuations of the ramp, which are not expected in standard random matrix theory, although perhaps these can be accommodated for with suitable long-range eigenvalue correlations. Finally, beyond Virasoro symmetry the gravitational amplitude is invariant under independent modular transformations of each boundary torus. Interpreting the two torus partition function as characterizing the fluctuations of torus partition functions within the dual ensemble, the independent modular invariances tell us that the objects we are averaging over (the partition functions) are themselves modular invariant point by point in the ensemble, and it is not clear how to incorporate this property in random matrix theory. For these reasons we have made the guess that AdS 3 gravity is dual to an ensemble of CFTs, although perhaps when the boundaries are tori there is a non-standard random matrix description. (More precisely, we have in mind an ensemble of CFTs with a large gap to the BTZ threshold.) But what would this mean? In this Subsection, we sketch a plausible schematic framework, following the usual logic of statistical physics. We stress that this sketch is speculative. We regard it as an organizing principle to keep in mind when trying to make sense of AdS 3 gravity beyond the torus times interval. In particular, we are going to ignore the pressing conceptual concern that we do not have any knowledge of specific irrational CFTs at large central charge, much less an ensemble of such theories. Our optimistic hope is that there are many solutions to the modular bootstrap for CFTs that "look" gravitational, and that in a sense 3d gravity is an average over this solution space.
With these caveats and declarations out of the way we proceed. Suppose we denote that data of a 2d CFT by T , standing for "theory." For a given theory T there is a genus g partition function Z T ,Σg (Ω), where Ω is the period matrix of the surface. Let d[T ] be a measure on 2d CFTs, with which we can consider correlators like Z T ,Σg 1 (Ω 1 ) · · · Z T ,Σg n (Ω n ) ensemble ≡ˆd[T ] Z T ,Σg 1 (Ω 1 ) · · · Z T ,Σg n (Ω n ) . (5.18) Next we turn to AdS 3 quantum gravity. Let us define where S grav is the gravitational action. The path integral in the summand is understood to be the amplitude of Euclidean AdS 3 gravity on M 3 with boundary ∂M 3 = Σ g 1 · · · Σ gn and corresponding period matrices Ω 1 , ..., Ω n . It is far from clear if the right-hand side of (5.19) is well-defined. For example, there is no known analogue of the genus expansion for 3-manifolds, nor do we know the amplitudes of AdS 3 gravity on general topologies. In light of these unknowns, an ambitious conjecture is that there exists an ensemble of 2d CFTs with fixed central charge obeying Z T ,Σg 1 (Ω 1 ) · · · Z T ,Σg n (Ω n ) ensemble Z AdS 3 (Σ g 1 , Ω 1 ; . . . ; Σ gn , Ω n ) . (5.20) Here " " means non-perturbative equivalence to all orders in a putative asymptotic expansion where we might hope that the analogue of the genus expansion parameter of JT gravity is a coupling ∼ e −#/G . This would be an AdS 3 generalization of the duality between nearly-AdS 2 JT gravity and a double scaled matrix model in [7]. We emphasize that essential refinements of the conjecture in Eqn. (5.20) are required. A logical possibility is that quantities like those in (5.19) are somehow pathological in AdS 3 gravity. Even if this is so, it may still be that a correspondence like Eqn. (5.20) holds, with the same pathologies occurring on both sides of the duality. As an example we have in mind the duality [57] between JT gravity on unorientable manifolds and a double-scaled random matrix theory with time reversal symmetry, both sides of which diverge.
Our approach to (5.20) has been to compute examples of the right-hand side for AdS 3 gravity, and suggest the existence of an ensemble average on the left-hand side. Very recent works [39,40] can be cast in a similar conceptual framework as (5.20): examples of partition functions in an ensemble average of free CFT's are computed, and a bulk dual is suggested (up to the treatment of zero modes it is a Chern-Simons theory with gauge group R 2c -not Einstein gravity as in our setting).
In this paper, we have investigated a special case of (5.19), the T 2 × I amplitude. If this amplitude was expressible in terms of an average over an ensemble of CFTs, it would correspond to a contribution to We might even hope that the geometry T 2 × I provides the leading contribution. We can suggestively rewrite the above equation as tr e −Im(τ 1 )H+i Re(τ 1 )P tr e −Im(τ 2 )H+i Re(τ 2 )P ensemble, conn. .

Discussion
In this paper we have computed the path integral of Euclidean AdS 3 gravity on the torus times interval. These configurations are Euclidean wormholes, and they represent a nonperturbative effective in three-dimensional quantum gravity. Our answer encodes the fluctuation statistics of microstates of the BTZ black hole near threshold, and we found that these correlations precisely match those of double-scaled random matrix theory with Virasoro symmetry. The gravitational computation also includes low temperature corrections which differ from what one finds in standard random matrix theory. For this and other reasons, our computation strongly supports the hypothesis that pure AdS 3 gravity is dual to an ensemble of CFTs. If true this duality would be a higher-dimensional analogue of the duality between Jackiw-Teitelboim gravity and a double-scaled matrix model in [7]. Our analysis opens up a path to studying quantum AdS 3 gravity on 3-manifolds with the topology S 1 × f Σ g,n or R × f Σ g,n . The former would correspond to a class of partition functions in Euclidean AdS 3 , whereas the latter could be used to study topology-changing amplitudes in Lorentzian AdS 3 . On the Euclidean side, it is important to study the finiteness (or lack thereof) of partition functions on these spaces, and more broadly develop an analog of the genus expansion for 3-manifolds. Only then can we know if the T 2 × I amplitude is the dominant contribution in some regime. More ambitious still would be to determine if AdS 3 gravity is dual to an ensemble as our results suggest, and to establish an exact duality.
The torus times interval amplitude suggests how the quantization of AdS 3 gravity on these manifolds proceeds. There were "trumpets" associated with each asymptotic region, stitched together by an integral over time-dependent moduli. In our example it was simple to integrate out the twist moduli, which enforced that the length moduli b andb were constant. For constant b andb each trumpet was a Virasoro character stemming from the path integral over two Alekseev-Shatashvili modes on its boundary, which decreases exponentially at large b andb. As a result the moduli space integral was finite. This finiteness is similar in spirit to how Schwarzian modes in JT gravity regulate the volumes of moduli spaces of Riemann surfaces with asymptotically hyperbolic boundaries (see [58] for a discussion). In our three-dimensional analysis there were two twist moduli, with a compact moduli space, corresponding to large diffeomorphisms of space and time respectively. The main open question to us is whether the twist moduli space is finite at higher genus.
It is far from clear how to construct an appropriate ensemble of irrational CFTs at large central charge. Although there are candidate examples of such CFTs, they have not been studied conclusively. Even if there was much better knowledge of the broader landscape of irrational CFTs at large central charge, one would still be have to construct a measure over them. Our approach in this paper has been pragmatic, focusing on computations in gravity rather than positing a precise dual framework in which to interpret them.
However, there is a putative example of an ensemble of irrational CFTs which is worth noting, a family of CFT fixed points coming from a two-dimensional version of the supersymmetric SYK model [59]. Each element of the ensemble is thought to flow to a CFT with large central charge at long distance, albeit with a relatively low twist gap. The ensemble averaged, low-energy spectrum is a well-defined tower of operators. That is, the averaged density of states is a sum of delta functions at O(1) energies. However, we expect that the high energy part of the averaged spectrum, meaning h +h > c/12, will exhibit a continuous density of states with some correlations. This feature is reminiscent of the black hole microstates of AdS 3 gravity including the fluctuation statistics computed in the present work.
More speculatively, we would like to propose an organizing principle for thinking about dualities between quantum gravity and disordered theories. One perspective in condensed matter physics is that many disordered theories can be viewed as effective theories; for instance, we could imagine augmenting standard effective field theory by an appropriate disorder average over irrelevant operators. In some circumstances, like the SYK model [19][20][21] such a disorder average may simplify computations of long-wavelength physics.
But in the case of Jackiw-Teitelboim gravity and pure AdS 3 gravity, the situation is more peculiar. These theories are self-consistent in their own right and we do not have to regard them as effective theories. Yet they are dual to ensembles of matrices and (tentatively) CFTs, respectively. However, JT gravity in two dimensions and pure gravity in three dimensions only contain boundary gravitons, moduli and topology. From that point of view, we might say that low-dimensional pure quantum gravity is a kind of self-contained, quantum hydrodynamical theory of long-wavelength fluctuations of spacetime. Then the dual disordered descriptions would provide a way of averaging over different microscopic theories with common long-wavelength gravitational physics to yield a universal pure quantum gravity theory. To borrow terminology from condensed matter physics, it may be appropriate to call such theories "mesoscopic quantum gravity." Beyond AdS 3 gravity, our computational techniques generalize to other settings. In three dimensions one can adapt our methods to study quantum effects with positive and zero cosmological constant [23,60,61]. But, perhaps a more promising pathway is to adapt our phase space techniques to study Euclidean wormholes in four and higher dimensions [62]. We anticipate that these methods will open up new horizons in quantum gravity.
for τ 1 , τ 2 in the fundamental domain of the Poincaré half-plane H. Unfortunately, the function F(τ 1 , τ 2 ) is divergent. In this Appendix, we consider a natural regularization scheme by generalizing F(τ 1 , τ 2 ) to a suitable Zeta function, and isolating the divergent behavior.

(A.2)
This reduces to F(τ 1 , τ 2 ) for s = 1. We will show that F s (τ 1 , τ 2 ) has a simple pole at s = 1 with a residue which is independent of τ 1 and τ 2 . Then we will regulate F s (τ 1 , τ 2 ) at s = 1 by subtracting out the pole, thus providing a natural regularization of F(τ 1 , τ 2 ). For our analysis, we require the spectral theory of the non-Euclidean Laplacian ∆ on SL(2; Z) \ H. This Laplacian has an orthonormal basis of eigenfunctions f λ (z) with respect to the inner product including a single zero mode eigenfunction f 0 (z) = 3 π . The Green's function of ∆ − λ is L 2 (SL(2; Z) \ H)-integrable with respect to the inner product defined above.
Let us treat F s (τ 1 , τ 2 ) as a function of τ 2 with τ 1 fixed. We will consider s in a neighborhood of s = 1, say (1 − , 1 + ). Then as a function of τ 2 , it is readily checked that F s (τ 1 , τ 2 ) is L 2 (SL(2; Z) \ H) integrable for s ∈ (1 − , 1) ∪ (1, 1 + ). Note that F s is not L 2 (SL(2; Z) \ H) integrable at s = 1 itself. On the other hand, ∆ τ 2 F s (τ 1 , τ 2 ) is L 2 (SL(2; Z) \ H) integrable for s ∈ (1 − , 1 + ), notably including s = 1. The L 2 (SL(2; Z) \ H) integrability conditions are checked most easily by noting that F s and ∆ τ 2 F s are both bounded functions of τ 2 , and by using a special case of Hölder's inequality, namely f 2 2 ≤ f 1 f ∞ . Since both ∆ τ 2 F s and the Green's function of ∆ − λ are L 2 (SL(2; Z) \ H) integrable, this implies that F s (τ 1 , τ 2 ) − F s , f 0 f 0 (A.4) has a uniformly and absolutely convergent Roelcke-Selberg expansion (i.e., an expansion in the eigenfunctions of ∆, see [63]) for s ∈ (1 − , 1 + ). Furthermore, the fact that F s is L 2 (SL(2; Z) \ H) integrable away from s = 1 implies that all of the singular behavior in F s is due to F s , f 0 f 0 at s = 1, i.e. the singular behavior is contained in the projection onto the zero mode. It remains to compute F s , f 0 f 0 and examine the singular behavior at s = 1. We have As claimed, the above has a simple pole at s = 1 with residue 3, clearly independent of τ 1 and τ 2 . Since F s (τ 1 , τ 2 ) − F s , f 0 f 0 is non-singular at s = 1, we see that Res s=1 F s (τ 1 , τ 2 ) = 3 , (A. 6) agreeing with the analysis in Subsection 4.2. This motivates the definition of the regularized Zeta function F s (τ 1 , τ 2 ) = F s (τ 1 , τ 2 ) − 3 s − 1 (A.7) which is non-singular at s = 1. Then F s=1 (τ 1 , τ 2 ) provides a natural regularization of F(τ 1 , τ 2 ), as desired. Note that when performing Zeta regularization, the choice of regularized Zeta function is often ambiguous up to an additive constant. The present situation is no different. As an explicit example, suppose instead of the Zeta function F s (τ 1 , τ 2 ) we chose Here we derive Eq. (4.9) from Section 4. We begin with We have the important property that for any γ ∈ P SL(2; Z), f (z, w) = f (γz, γ −1 w). As mentioned in Section 4, a general element of SL(2; Z) can be represented by an integer matrix γ = a b c d such that ad − bc = 1 .

(B.3)
Then a general element of P SL(2; Z) can be written as the restriction to c ≥ 0, and when c = 0 we have a = 1. The matrix γ acts on a τ in H by γτ = aτ +b cτ +d . Notice that this is invariant under γ → −γ.
Upon inspecting (B.3), we observe that gcd(a, b) = gcd(a, c) = gcd(b, d) = gcd(c, d) = 1. For example, suppose gcd(a, b) = k. Then we could write a = ka and b = kb for some integers a , b . But then ad − bc = k(a d − b c) has the form k · (integer) which can only equal one if k = 1. There are additional properties of the a, b, c, d that are useful. For instance, since ad − bc = 1, we have ad ≡ 1 (mod c). That is, a and d must be multiplicative inverses modulo c. That is, we can specify an element of P SL(2, Z) by coprime c, d with c ≥ 0, and an integer n.
It is prudent to further massage (B.4) for our purposes. Let (Z/cZ) * denote the residue classes mod c which are multiplicatively invertible. Specifically, we take (Z/cZ) * to denote the set of integers from 1 to c − 1 which are coprime to c. Given coprime c, d, we can decompose In light of the above decomposition, to ease the notation we denote γ c,d ,0,0 by γ c,d . It is easy to check that the complete set P SL(2; Z) elements (i.e., without duplication) is given by which is Eq. (4.9) from Section 4.