The path integral of 3D gravity near extremality; or, JT gravity with defects as a matrix integral

We propose that a class of new topologies, for which there is no classical solution, should be included in the path integral of three-dimensional pure gravity, and that their inclusion solves pathological negativities in the spectrum, replacing them with a nonperturbative shift of the BTZ extremality bound. We argue that a two-dimensional calculation using a dimensionally reduced theory captures the leading effects in the near extremal limit. To make this argument, we study a closely related two-dimensional theory of Jackiw-Teitelboim gravity with dynamical defects. We show that this theory is equivalent to a matrix integral.

D The instanton gas theory 50 1 Introduction In the quest to understand quantum mechanical theories of gravity, one central problem is to distinguish low energy theories with consistent ultraviolet completions from those without. For theories with asymptotically anti de Sitter (AdS) boundary conditions, this question becomes particularly sharp, since a UV complete theory can be rigorously defined through the AdS/CFT correspondence [1], and we by now have a detailed understanding of the conditions that a CFT must satisfy to be well-described by a local theory of gravity at low energies [2,3,4,5]. Perhaps the simplest question to ask is whether a consistent quantum theory of pure gravity exists. While this question is simple to ask, it is much harder to make meaningful progress. A natural way to attempt to construct a quantum theory of pure gravity is by quantizing the classical theory, for example using a path integral over metrics, but it is very challenging to make sense of this in most cases. We can ameliorate these difficulties by studying lowdimensional models, in which gravity simplifies enough that we can hope for a more complete understanding.
We will begin with three dimensional gravity, for which an apparent obstruction to the existence of a theory of pure gravity was pointed out in [6]. Our first major result is to find new contributions to the path integral of pure 3D gravity which overcome this obstacle. Our three-dimensional considerations will lead us naturally to consider a class of two-dimensional models which generalize Jackiw-Teitelboim (JT) gravity by inclusion of additional 'defect' degrees of freedom. Our second major result relates to this class of 2D models, which we study in their own right independent of their 3D origin. The path integral of JT gravity was recently solved exactly by Saad, Shenker and Stanford [7], and we draw heavily from their work. Their main result was that JT gravity has a dual quantum mechanical description as a double-scaled matrix integral. We find that such a description continues to hold when we include a gas of defects in JT gravity. We show that a matrix integral dual to this gravitational theory exists and generalizes [7]. We also argue that this theory is equivalent to another 2D dilaton gravity theory with a modified dilaton potential, appearing from integrating out the gas of defects.
We now review the context of the paper and summarize our main results.

The spectrum of 3D pure gravity
Gravity in three dimensions has several simplifying features. In particular, all classical solutions are locally isometric to empty AdS 3 , and perturbative graviton excitations are determined by the Virasoro symmetry of the theory. Using these simplifications, Maloney and Witten [8] and Keller and Maloney [9] constructed a candidate partition function from a pure 3D gravity path integral and found the corresponding spectrum; we will refer to these as the 'MWK' partition function and spectrum. They took a very natural approach to the path integral, by classifying all classical solutions with appropriate boundary conditions, computing their classical action and all perturbative corrections (which happen to be exact at one loop) and finally summing their contributions. 3 The solutions in question are the SL(2, Z) Euclidean black holes [11], generalizations of the BTZ black hole [12]. Besides the vacuum and its Virasoro descendants describing empty AdS 3 and perturbative graviton excitations, the resulting spectrum is supported on precisely the energies and spins for which BTZ black holes exist. However, the MWK density of states has several problematic features. First, the corresponding spectrum is continuous, which we will comment on later. 4 More seriously, it was recently observed by [6] that the density of states is also negative in a particular 'nearextremal' regime.
To explain this feature, we write the most important contributions to the MWK density of states for energies close to the edge of the spectrum. For a given value of (integer quantized) angular momentum J, the density of states is nonzero for energies E > |J| in appropriate units (in terms of CFT quantities, E = h +h − c−1 12 and J =h − h), corresponding to the extremality bound of BTZ black holes. For large |J| and energies very close to this bound, the density of states behaves like where S 0 (J) 1 is the Bekenstein-Hawking entropy given by the area of the extremal BTZ event horizon in Planck units, and a 0 , a 1 are constants. The first term, coming from the ordinary BTZ black hole, is positive and dominates in almost all regimes. The second term, which comes from the simplest class of SL(2, Z) black holes, is exponentially suppressed by a relative factor of e − S 0 (J) but enhanced very close to the edge. It becomes important when E − |J| is exponentially small, and for odd spins it causes ρ (M W K) J (E) to become negative in that regime. Terms from other classes of SL(2, Z) black holes are negligible, since they have the same ( E − |J|) −1/2 scaling with energy, but grow much slower with spin.
In order to resolve this negativity, [6] and [13] proposed that the dynamics of the theory must be modified by introducing particle degrees of freedom. The correction from a matter loop running round the horizon of the BTZ black hole gives an additional contribution to the density of states proportional to e αmS 0 (J) ( E − |J|) −1/2 , where for a scalar of mass m we have α m = 1 − 4mG N . 5 For sufficiently light particles, with α m ≥ 1 2 , the density grows fast enough to cure the negativity. The matter can be very heavy, consisting of particles with Planckian mass m ∼ 1 8G N and larger, but it would nonetheless be preferable to have a consistent theory with only metric degrees of freedom.
We propose an alternative resolution which does not require a modification of the theory, but rather the inclusion of additional contributions to the path integral over metrics. These contributions require spacetime topologies for which no classical solution exists, which explains their absence from the MWK partition function. We must therefore perform an 'offshell' path integral over an appropriate space of configurations, rather than a saddle-point approximation. Integrals over off-shell configurations were prominent in the recent analysis of the two-dimensional theory of Jackiw-Teitelboim (JT) gravity [7]. We will draw heavily on this work, which will turn out to have an extremely close relationship with the three-dimensional problem we are studying.
Before explaining this, let us describe how the additional topologies in the path integral result in a positive density of states. As opposed to the matter proposal of [6,13], our new contributions grow more slowly with spin, but are more singular than (E − |J|) −1/2 at the edge. Including some of the most important corrections, we find an expansion for the density behaving like (1. 2) The SL(2, Z) black hole now appears as the first term in an infinite series of nonperturbative corrections. In the regime where ρ (M W K) became negative, the later terms in the expansion are no longer suppressed so all terms must be considered together. Fortunately, we are able to compute all terms including the a # coefficients. Once we sum over them, the density of states to leading order in the expansion near the edge takes the simple form (1.4) The interpretation is that the black hole extremality bound E 0 (J) has received a nonperturbative, spin-dependent correction to its classical value |J|. The negativity in (1.1) is an artifact of truncating the binomial series for the square root and then evaluating outside its radius of convergence. The other families of SL(2, Z) black holes, which we have so far disregarded, are themselves the first terms in a multinomial series contributing further nonperturbative shifts. These shifts take the form δE 0 (J) ∼ cos 2π p q J e − S 0 (J) q , (1.5) where p q is a rational number labelling the SL(2, Z) black hole in question, and we have ignored J-independent prefactors; we have so far been discussing the leading order shift with q = 2.
An extremely similar phenomenon arises from the perturbative one-loop contribution of matter [14], but here we see a nonperturbative version from pure gravity alone. This was mostly studied from a dual CFT perspective in [14], where it was shown to be generic phenomenon for chaotic CFTs from crossing symmetry and modular invariance. We will revisit pure gravity from this bootstrap perspective in [15], explaining how our proposal is consistent with modular invariance without introducing states far below the BTZ threshold, and how the arguments of [6] are evaded.
A different negativity of the MWK density of states, taking the form of −6 states at the massless, spinless BTZ threshold, was observed in the original work [8]. Allowing additional topologies, we seem to lose semiclassical control entirely for these small black holes: all the topologies we study (and likely many more) seem to contribute at the same order, and the near-extremal limit we use to study them is no longer a good approximation. Some new insight to control these untamed fluctuations of topology is required to say anything definitive in this regime.

3D gravity in the near-extremal limit
We now describe the new contributions to the path integral that give rise to the additional terms in (1.2). The effect we are studying is important only for black holes very close to extremality. In this regime, the black hole develops a near-horizon region with the geometry of a circle fibered over AdS 2 . We can usefully describe the physics using a two-dimensional theory, obtained by reducing on the circle. In an ensemble of fixed spin J, the resulting theory is perturbatively equivalent to Jackiw-Teitelboim gravity [16,17], a theory which has received much recent attention [18,19,20,21,22,23,24,25,7]. The precise map between perturbative physics in JT gravity and in near-extremal rotating BTZ black holes was described in [26], and was rigorously shown to hold for a generic CFT with large central charge using bootstrap methods.
The new contributions to the 3D gravity path integral we find in this paper come from extending the study of this two-dimensional theory to include new nonperturbative effects. The crucial new ingredient is that the theory contains nonperturbative objects, which we call 'Kaluza-Klein instantons'. These correspond to configurations which appear singular from the two-dimensional geometry, with a conical defect localized at a point in the 2D spacetime, but are smooth in three dimensions (see also [27]). They are somewhat analogous to Kaluza-Klein monopoles [28], which are smooth solutions to a five-dimensional gravity theory which become singular Dirac monopoles when viewed from four dimensions (or 6-branes in type IIA supergravity, which arise as KK monopoles from reduction of a smooth solution to 11dimensional supergravity [29]). The KK instantons correspond to locations in AdS 2 where the circle fibration degenerates, and are labeled by a rational number p q ∈ (0, 1) ∩ Q. An instanton creates a conical defect with opening angle 2π q in the two-dimensional geometry, but gives a smooth three-dimensional metric since a closed loop around the defect is accompanied by a 2π p q rotation in the circle fiber. The corresponding three-dimensional topologies are known as Seifert manifolds.
The KK instantons tend to attract, so the only classical solutions in this class are those with a single instanton, and these correspond to the SL(2, Z) black holes. The new contributions to the path integral we are studying have multiple instantons. In particular, the terms with coefficient a k in (1.2) come from k instantons labeled by p q = 1 2 , and the shift in (1.5) comes from including the instantons labeled by p q . We compute the relevant path integrals in the two-dimensional theory, and argue that this gives a good approximation to the three-dimensional pure gravity result in the near-extremal regime. We concentrate on the leading order KK instantons with q = 2. Contributions from q > 2 include energy-and spin-independent prefactors that do not seem to be captured fully by the two-dimensional theory alone. Nevertheless, their contribution is subleading in the near extremal limit. A full understanding requires a full 3D calculation, which we leave for future work.
We now turn to a summary of the two-dimensional calculations.

JT gravity with defects
Our three-dimensional considerations have thus led us naturally to consider a modification of JT gravity, by including dynamical instantons which source conical defects. In section 3, we study this theory in its own right. Such a defect is labeled by two parameters, α ∈ (0, 1) which specifies the conical angle 2π(1 − α) it sources, and the amplitude λ for a defect to appear in the path integral, defined more precisely in section 3. We may have several 'flavors' of defect, each with their own value of α i and λ i , so for N F flavors we have a 2N F -parameter generalization of JT gravity. A single such defect on the disc was studied by [30], but here we sum over contributions with any number of defects and any topology.
The nonperturbative path integral of JT gravity was solved recently by Saad, Shenker and Stanford [7] (see also [31]) in a genus expansion, and we directly generalize their approach to an expansion in both genus g and number of defects k. Their solution requires the Weil-Petersson (WP) volumes of the moduli space of hyperbolic surfaces with geodesic boundaries of specified lengths b, computed in [32]. Including defects requires us to generalize this to a moduli space of surfaces with cone points. Fortunately, the relevant volumes have been studied already [33,34,35], and they are obtained simply from the usual WP volumes by inserting a boundary with b = 2πiα for each defect (proven for α ≤ 1 2 , but conjectured more generally). This fact was recently used in a slightly different context by [36].
We first compute the defect contributions to the spectrum at low energy, and show that they give rise to an expansion of the form (1.2), which shifts the edge of the spectrum. This gives a 2D toy model of the Maloney-Witten partition function, whereby we include only classical solutions and loop corrections; for JT gravity, this means only the disc and the disc with the insertion of a single defect. This can produce negative contributions to ρ(E), inconsistent with a unitary theory. This problem in 2D is resolved in the manner described above when we sum over an arbitrary number of defects.
We then explicitly compute the sum over any number of defects at genus zero, using an explicit formula for WP volumes derived in [37]. For one boundary, this gives a closed form expression for the density of states at leading order in the genus expansion (3.50). For multiple boundaries, the result matches precisely what is required for a matrix integral dual generalizing [7]. Using a theorem of [38], we prove that this extends to all orders in the genus expansion (as well as providing several explicit checks).
We also argue this theory is also equivalent to a 2D dilaton gravity with a modified dilaton potential, obtained by summing the defects as an instanton gas.

Outline of paper
The paper is organized as follows. In section 2 we study the path integral of 3D gravity near extremality from the perspective of a dimensionally reduced theory. This leads us to suggest a new class of topologies to include in the path integral. In section 3 we study a 2D theory of JT gravity with a gas of defects, motivated by the 3D considerations. We solve the theory in an expansion in genus and number of defects, and construct a matrix integral dual. In section 4 we apply what we learnt back to 3D gravity, and we argue that the two-dimensional theory is a good approximation in the most interesting regime. We conclude in section 5 with discussion and open problems.
Note: A related analysis of JT gravity with defects and matrix models was carried out independently by E. Witten and appeared in [39].

The path integral of 3D gravity
Our main target of study will be the spectrum of three-dimensional pure gravity with negative cosmological constant. This is a very simple theory in several ways, giving hope that we might understand it completely, if it indeed exists as a consistent quantum theory. In particular, all classical solutions are locally isometric to empty AdS 3 , due to the absence of local propagating degrees of freedom, so can be classified in some cases. In addition, it enjoys an infinitedimensional Virasoro symmetry group, which determines the perturbative excitations around the vacuum.
Nonetheless, we will find it profitable to simplify the theory yet further, by studying more closely the 'S-wave' path integral over metrics with a U (1) symmetry. After dimensional reduction on the symmetry direction, we will find a two-dimensional theory that we can solve. Fortunately, the issues with the path integral of 3D gravity appear in the near extremal limit, for which this reduction in a good approximation (up to a subtlety discussed in section 4).

Dimensional reduction
We begin by describing the two-dimensional action that results from a dimensional reduction of pure 3D gravity, closely following [26] to which we refer for more details.
We start from the Einstein-Hilbert action in three dimensions: The subscripts on the metric g 3 , curvature R 3 , AdS length 3 , and extrinsic curvature κ 3 in the boundary term distinguish them from the two-dimensional quantities we encounter later. We impose boundary conditions that fix the induced metric γ on the boundary to be a flat torus parameterized by spatial angle ϕ and Euclidean time t E , where is a holographic renormalisation parameter which is taken to zero. We choose dimensionless coordinate ϕ, t E , so that −1 has units of length, while β is dimensionless. With these boundary conditions, the resulting path integral is interpreted as the partition function of the theory, where H is the Hamiltonian and J the angular momentum. We have also written this in terms of the left-and right-moving conformal generators L 0 ,L 0 and modular parameter τ = θ+iβ 2π , τ = θ−iβ 2π . The simplification of the S-wave path integral is to consider not completely general metrics, but only those which respect a U (1) symmetry, which we will take to act as translation in the ϕ direction on the boundary. This means that we can write the three-dimensional metric as in terms of a two-dimensional metric g 2 , dilaton Φ and Kaluza-Klein gauge field A, which can be taken to be independent of the coordinate ϕ. The three-dimensional diffeomorphisms that leave the metric in this form consist of two-dimensional diffeomorphisms, as well as shifts in ϕ generated by λ∂ ϕ for any function λ of the two-dimensional coordinates. The latter acts as gauge transformations A → A + dλ, so that A is a U (1) gauge field, with compact gauge group due to the 2π periodicity of ϕ. Given this ansatz, we can now write the action (2.1) in terms of the two-dimensional fields and integrate over ϕ, giving an Einstein-Maxwell-dilaton theory [40] The indices a, b run over the two remaining coordinates, F = dA is the field strength of the Kaluza-Klein gauge field, and s a proper length parameter on the boundary. Expressing the three-dimensional boundary conditions in terms of two-dimensional fields, we find that we must have constant dilaton Φ = −1 at the cutoff and the proper length of the boundary is −1 β. Finally, we must fix the holonomy of the gauge field A = θ (this being the only gauge invariant information contained in the one-dimensional gauge field pulled back to the boundary). This will not be the most convenient form in which to study the theory, due to the presence of A. Fortunately, the simplicity of two-dimensional gauge fields allows us to integrate it out (see [26] and references therein). Furthermore, by changing boundary conditions the resulting effective action will in fact be local in terms of Φ and g 2 . To see this, we rewrite the Maxwell piece of the action by introducing an auxiliary scalar field J : If we integrate out J , we get back to the original action, in the meantime finding that it is related to the field strength via F = iJ µ. (2.8) In particular, note that for real Euclidean three-dimensional geometries J will be imaginary. Now, we may instead integrate out the gauge field, which imposes the constraint that J is constant, and the Maxwell action becomes In fact, we see that gauge-invariance requires J to be not only constant but an integer, since θ is a 2π-periodic variable. This still leaves us to sum over possible values of J . But we can in fact identify J with the angular momentum J, which suggests that it is nicer to work in an ensemble of fixed spin, rather than with a chemical potential θ for spin. This means that we would like to study the spin-J partition function which requires us to introduce the boundary term before integrating over θ. This precisely imposes the constraint that J = J (a Neumann boundary condition fixing the asymptotic field strength F ), leaving behind the local effective action 1 2 J 2 µ for the Maxwell field. We thus find a theory of metric and dilaton only, governed by the two-dimensional action However, this two-dimensional action does not quite capture the whole theory. We will find that we must include additional nonperturbative dynamical objects in the two-dimensional theory. To see why, we next examine the classical solutions of the three-dimensional theory.

The classical solutions: SL(2, Z) black holes.
The finite action classical solutions of three-dimensional gravity with torus boundary admit a complete classification [8]. They fall into a discrete set of topological classes, with one solution in each class respecting the full U (1) × U (1) symmetry of the boundary torus. These solutions are usually called the 'SL(2, Z) black holes', for reasons that will become clear. The other solutions add perturbative excitations of boundary gravitons, obtained by acting with an asymptotic symmetry generator, a diffeomorphism that does not fall off sufficiently rapidly to be regarded as part of the gauge symmetries.
Topologically, the SL(2, Z) black holes are simply solid tori; there are many such solutions, since we have a choice of which boundary cycle to fill in. Different choices are related by the SL(2, Z) mapping class group of the torus. To see this explicitly, we first use complex coordinates to write the torus as the complex plane identified by translations on a lattice, These coordinates pick out the spatial circle as a line running from the origin to z = 1. But we can choose a different coordinate w to pick out any simple closed curve in this way, running from the origin to cτ + d for coprime integers c, d (and by choice of orientation we may set (2.14) Having picked the first generator of the lattice to be cτ +d 6 , we can choose the second generator as aτ + b, where in order that these form a basis we must choose a, b such that ad − bc = 1. We thus have ( a b c d ) ∈ SL(2, Z). Now, to construct a Euclidean SL(2, Z) black hole, we simply define new coordinates as real and imaginary parts ofz throughz = 1 2π (φ + it E ), write the real and imaginary parts of thez lattice identification asτ = 1 2π (θ + iβ), and write the metric of AdS 3 withφ chosen as the spatial circle: Note that the choice of a and b (which is ambiguous up to the addition of a multiple of c and d respectively) does not affect this metric, since it acts only by shiftingθ by a multiple of 2π. The solutions are thus classified not by P SL(2, Z) elements, but by the coset P SL(2, Z)/Z. Equivalently, they are classified by the rational number Q = − d c which gets mapped to infinity by Q → aQ+b cQ+d . The solutions are thus in one-to-one correspondence with rational numbers Q ∈ Q ∪ {∞}, where infinity accounts for AdS 3 itself, corresponding to c = 0. Now, to understand this solution in terms of the dimensionally reduced theory we would like to express the metric (2.15) in terms of the original untilded coordinates ϕ, t E . To do this, we simply make the relevant substitutions and define a new radial coordinate r as the coefficient of dϕ 2 . It is convenient to write the solution in terms of new parameters r ± , related to β, θ or τ,τ by where r + is positive, and r − is imaginary for the Euclidean solutions of (2.15) with real θ. We then have −2 This result takes the familiar form of the metric of the BTZ black hole [12]. Indeed, for c = 1, d = 0 this is the BTZ black hole, in Euclidean signature for imaginary r − , and Lorentzian signature for real r − when we Wick rotate the time coordinate. However, it is not quite the BTZ black hole for c = 1, since we have slightly different identifications. This metric is manifestly in the form of our ansatz (2.4), so we may immediately write it down in terms of two-dimensional fields. Before we do this, we first address the subtlety that in the current form we have a nontrivial gauge bundle at infinity: due to the nontrivial identification (t E , ϕ) ∼ (t E + β, ϕ + θ), when we go around the spatial circle we must also perform a gauge transformation. We can remove this by using a new angular coordinate ϕ − θ β t E which does not have such a shift when we go around the Euclidean time circle. From the two-dimensional perspective, this acts as a gauge transformation with gauge parameter λ = θ β t E . With this understood, we can write our solution as follows: The gauge field A can be reconstructed (at least locally; we will see later how the holonomy arises) from the relation between the angular momentum J and the field strength F in (2.8).
The volume form is given by dr ∧ dt E , so we can write This is the usual expression for the angular momentum of the BTZ black hole, which can also be read off from the asymptotics of the three-dimensional metric. Once again, J is imaginary for the Euclidean solution.
All seems well so far. But if we look more closely, we will see that this solution is apparently singular! To see this, we examine the metric near the origin r = r + , where f has its largest zero. Using a new coordinate ρ defined as r − r + ∼ r 2 + −r 2 − 2r + ρ 2 and the expression (2.16) for β in terms of r ± , we find −2 (2.24) Recalling that t E has period β, so that 2π β t E is an angular variable with period 2π, we see that g 2 is smooth only if c = 1. For larger c, the metric close to ρ = 0 looks like a cone with opening angle 2π c . To see how this is possible, given that we started with a smooth three-dimensional solution, we must also look at the gauge field near the conical defect. We have so that a small closed curve surrounding this point has nontrivial holonomy A = −2π d c . Equivalently, the field strength F has a delta-function source of this strength at ρ = 0. This means that traversing a small loop around the origin in the two dimensional metric does not give rise to a closed curve in the three-dimensional space; rather, there is a nontrivial translation in the angular ϕ direction by the holonomy. A closed curve only arises after going round c times. A nice description of this is also given in [27].
Before giving a complete two-dimensional description of these defects, we note one important feature of the two-dimensional solution. By making large gauge transformations that wind around the circle, A → A + 2πn β dt E for integer n, we can shift d by multiples of c. This moves us between isometric but inequivalent gravitational solutions, with θ → θ + 2nπ; they are not gauge equivalent because the identification with the boundary metric is different. We can simply sum over these solutions (or, more generally, any configurations related in the same way), which can be accounted for simply by quantizing spin. Given some contribution z(β, θ) to the path integral, we can rewrite a sum over its images θ → θ + 2nπ using the Poisson summation formula, and we see that the Poisson dual variable is precisely the angular momentum.
We thus see that in the fixed spin ensemble (2.10) with integer spin, it is sufficient to restrict to rational Q = − d c in the interval [0, 1) (with Q = 0 corresponding to the usual BTZ black hole). Under the classification which identifies geometries only up to identification by such shifts θ → θ+2nπ, the classes correspond to elements of the double coset Z\P SL(2, Z)/Z, where the groups of integers on the left and right both act by τ → τ + 1. This is also the classification of solutions of a given angular momentum and either mass or temperature, which is more pertinent for us since we work an ensemble of fixed spin.
We note that the solutions we have been led naturally to consider, using the ensemble of fixed integer J, have complex Kaluza-Klein gauge field. These are real Euclidean solutions for the two-dimensional metric and gauge field, but have complex three-dimensional Euclidean metric. The off-shell configurations we generalize to later will be of the same nature. The SL(2, Z) black holes (though not the later generalizations) have real three-dimensional Lorentzian sections, which are nothing but the usual BTZ metric as can be seen from (2.18).
To complete our review of the SL(2, Z) black hole solutions, we record their contribution to the density of states. Since we will be studying the theory exclusively in the near-extremal regime, we will give the answer only in that limit, taking This means that the temperature is low and the horizon is large when measured in AdS units. For the exact result, see [6,13]. First, we define S 0 (J) as the Bekenstein-Hawking entropy given by the area of the classical extremal BTZ black hole: 7 S 0 (J) = 2π Now, we must treat the usual BTZ black hole solution as a special case in this limit. It contributes to the density of Virasoro primary states of spin J as The other families of SL(2, Z) black holes, coming in families labeled by the rational parameter Q = p q ∈ (0, 1) ∩ Q, contribute as , (2.30) where (p −1 ) q denotes the inverse of p modulo q, that is the solution to p(p −1 ) q − 1 ∈ qZ. In particular, for Q = 1 2 we have . (2.31)

Kaluza-Klein instantons
From the SL(2, Z) black holes, we have seen that smooth configurations in the three-dimensional theory give rise to particular singular objects in the dimensionally reduced theory, which are localized in spacetime. We call these objects Kaluza-Klein instantons, in analogy to the Kaluza-Klein monopoles which arise from compactification from five to four spacetime dimensions [28]. We discuss here their incorporation into the two-dimensional theory.
We have a countably infinite set of species of instantons labeled by rational numbers strictly between zero and one, Q ∈ (0, 1) ∩ Q; in the previous section we had Q = − d c , but here we will write Q = p q (1 ≤ p < q, with p and q coprime). They provide a delta-function source for F of strength 2π p q , and create a conical defect of angle 2π q . Since they are smooth in the three-dimensional geometry, they should not provide any singular contribution to the action once these boundary conditions are obeyed.
We will take these boundary conditions at the defect as a definition of a KK instanton, but it can also be helpful to understand them from an action formulation. To impose the boundary conditions for a KK instanton, we can add an action to the Einstein-Maxwell-dilaton action (2.5) after rewriting the Maxwell theory in terms of the auxiliary field J using (2.9). Here, the dilaton Φ is evaluated at the location of the instanton.
In concert with the ΦR 2 term in the dilaton action, this sources a conical defect of the desired strength at the instanton's location. This conical defect gives a delta-function contribution to the curvature R 2 , which can be computed by the Gauss-Bonnet theorem applied to a small disc containing the defect. The resulting singular piece of the action (2.12) precisely cancels the dilaton term in the instanton action (2.32). Due to this cancellation, the overall contribution to the action from this dilaton piece is zero as desired.
The term −2πiJ p q accounts for the Maxwell piece of the action and induces the correct source for the field strength. With this addition, the relation (2.8) is modified to including a source (with δ a two-form delta-function defined so that δf for a scalar function f gives the value of f at the location of the instanton). We still have that J is a constant, which our boundary conditions set equal to the desired spin J. After integrating out the gauge field we can therefore simply replace the auxiliary field J by the integer J chosen by boundary conditions. We can think of the resulting action −2πiJ p q as a contribution to the boundary term (2.11) I ∂ = −iθJ inserted to change to the fixed spin ensemble, coming from the additional holonomy sourced by the instanton.
Since the action (2.32) is of order 1 G N , the instantons are nonperturbative, solitonic 'Dinstanton'-like objects. An analogous phenomenon occurs in type IIA supergravity, with solitonic D6 branes arising as the Kaluza-Klein monopole upon compactification of a smooth solution of 11-dimensional supergravity [29].
The advantage of formulating this two-dimensional theory with KK instantons is that we can now consider the effect of including multiple instantons in the path integral. We do not obtain new classical solutions in this way, since the instantons tend to attract to minimize the action. Nonetheless, we can in several circumstances perform the path integral over off-shell configurations. The resulting three-dimensional topologies are known as Seifert manifolds.
The action (2.32) defines the KK instantons classically, but a full quantum mechanical treatment requires more input. In particular, at one loop we must specify an amplitude for the insertion of each instanton, or a measure for integrating over the locations at which we may insert it (see section 2.5). This amplitude or measure may depend nontrivially on background fields, in particular the dilaton. Properly determining this requires a full threedimensional analysis. However, in the near-extremal limit we describe in a moment, the geometry approaches a rigid AdS 2 background with the dilaton approximately constant, so any natural measure appears to reduce to a simple preferred choice. Only a normalization constant (which can depend on J) then remains unfixed, and this can be determined by matching to the SL(2, Z) black holes. A more careful understanding of this is an important problem for the future.

Near-extremal limit
One regime in which we are able to study the Kaluza-Klein instantons in detail is the nearextremal limit of rapidly rotating black holes at low-temperature. We will see that, as well as being tractable, this is in fact the regime where they give rise to important physical effects.
As an example of a more generic phenomenon, our Einstein-dilaton theory (2.12) reduces in the near-extremal limit to JackiwTeitelboim gravity. We first very briefly review this, referring the reader to [26] and references therein for details.
We can begin by looking for AdS 2 solutions of the theory. These must have constant dilaton at a zero of the dilaton potential, which for us sets (2.34) The two-dimensional AdS radius is then set by the gradient of the potential at Φ = Φ 0 , giving the AdS 2 radius 2 = 1 2 3 . This AdS 2 space is the near-horizon geometry of a near-extremal rotating BTZ black hole (completed to the three-dimensional 'self-dual orbifold' geometry [41], which is the analogue of near horizon extreme Kerr). To incorporate fluctuations away from this AdS 2 geometry, we write Φ = Φ 0 + 4G N φ and expand to linear order in φ. This leads us to the action of JT gravity, The first term here is the two-dimensional Einstein-Hilbert action, which is topological, proportional to the Euler characteristic χ. Its coefficient S 0 is the extremal entropy of BTZ, which we take to be very large. The final boundary term is introduced at an artificial location where the value of the dilaton is set at a constant φ ∂ satisfying 1 φ ∂ S 0 , demarking the edge of the 'near-horizon' region. Inside this near-horizon region, the dilaton is sufficiently small that the linearized approximation leading to JT gravity is valid. Outside this region, quantum corrections are suppressed by the large parameter S 0 , so we may solve the theory classically.
With our fixed J boundary conditions, this classical solution from the region far from the black hole has two important effects. First, it contributes an action βJ, which shifts the energy by the value of extremal BTZ, M = J. Second, it induces boundary conditions at our artificial boundary ∂, setting the ratio of the proper length L ∂ of the boundary to the dilaton value φ ∂ (with both taken very large): The parameter γ sets the energy or temperature γ −1 below which quantum fluctuations become strong. In the Schwarzian description of the theory [18], γ appears as the coefficient of the Schwarzian action. Now we simply need to incorporate the Kaluza-Klein instantons into this near-extremal theory. We can do this by simply rewriting the instanton action 2.32 in terms of the JT variables: We will study the theory of JT gravity with such defects in detail in section 3.

Instanton gas
Before turning to the analysis of JT gravity with defects outlined above, we mention a possible alternative approach, summing the KK instantons as an instanton gas. This incorporates the effect of the instantons into a shift of the dilaton potential. This method is usually introduced as an approximation, taking a sum over instantons in a limit that they are well-separated and do not interact. Here, however, if we think of our instantons as fundamental pointlike objects in the two-dimensional theory, there is no such approximation required in principle. Note first that we can introduce a single instanton by an insertion into the path integral of where I p/q (x) is the action (2.32) for an instanton at the point x, and we integrate over all possible insertion points. We have included a measure Ω, which is possibly a function of fields in the theory. This is either taken as part of the definition of the instanton, or must be determined if we use a definition independent of the action formulation, as is the case for our theory obtained from dimensional reduction. The measure is of subleading importance in the classical limit, and Ω should approach a constant in the near-extremal limit, so we will be content to leave Ω as an unknown function in this section's more qualitative discussion. Now, we can include many instantons by simply inserting many such factors into the path integral. To avoid overcounting equivalent configurations from permuting instantons, we must divide the k-instanton contributions by k!. The sum over all sectors then exponentiates: (2.40) But now this amounts to an insertion into the path integral of the exponential of a local integral. In other words, it is equivalent to adding a new local term to the action, Our instanton action (2.32) is simply linear in the dilaton, so the instanton gas adds an exponential to the dilaton potential. More explicitly, we can write the bulk part of our dilaton action (2.12) as Φ. The instanton gas from the action I p/q shifts U by addition of a term proportional to where we should remember that the prefactor is subject to determination of the measure Ω. First, these terms will be of leading importance if we have a regime where Φ is of order G N . This occurs close to the threshold for the lightest black hole at small spins. There, higher topologies, including (but not limited to) the manifolds represented by the KK instantons, are no longer suppressed, and we appear to lose all hope of describing the physics semiclassically.
The second important regime, which we concentrate on in this work, occurs at large spin J but very low temperature. This means that Φ is still large so the new exponential terms from instantons are small, but there are physical effects nonetheless, such as a shift of the ground state energy.
We now have two potential ways to compute the effects of instantons, either by computing the path integral with a fixed number k of instanton insertions and summing over k, or by using the instanton gas potential from summing their effects. These approaches have their utility in complementary regimes. For circumstances where the typical instanton number is small, the first approach is useful; indeed, in the next section we will be able to explicitly calculate the k-instanton path integrals. Conversely, when we have a high density, the effects may be describable in semiclassical terms from the instanton gas potential, arising as the collective behavior of a condensate of instantons. We will discuss this in section 5.5.

JT gravity with defects
Our analysis of dimensionally reduced three-dimensional gravity above, in particular in the near-extremal limit of section 2.4, leads us naturally to a two-dimensional theory of Jackiw-Teitelboim gravity with the inclusion of fundamental defects. In this section, we study this family of theories in their own right.

The JT path integral with defects
We here review the genus expansion of amplitudes in JT gravity following [7], making the necessary extensions to incorporate defects. JT gravity, as encountered in the near extremal limit of BTZ in section 2.4, is a theory of a two-dimensional metric g 2 and a scalar dilaton φ, with action We have here chosen units to set the two-dimensional AdS length 2 to unity. The coefficient S 0 of the Euler characteristic χ parameterizes the suppression of higher topologies, which will organize into an asymptotic series in e −S 0 . We should therefore regard S 0 as a large parameter. We impose boundary conditions on circular boundaries 'at infinity', which means the we fix the proper length L ∂ 1 of the boundary, and ultimately take L ∂ to infinity. We take the dilaton to be a constant φ ∂ on the boundary, which we also take to be large, but fixing the ratio L ∂ φ ∂ . Boundary condition: The dimensionless parameter γ is fixed once and for all, and acts only to rescale the units in which β is measured. In section 2.4 we had γ = 3 16G N = c 24 using the Brown-Henneaux value of central charge [42]. This means that β of order γ corresponds to temperature of order one in Planck units, not in AdS units. We refer to β as the renormalized length of the boundary, or an inverse temperature.
Our theory in addition contains dynamical 'defects' or 'instantons', parameterized in terms of a defect angle α and a weighting λ. As in [30], we can include a defect by an insertion in the path integral proportional to For our purposes, we will take this more as a heuristic guide, and use the expansion we develop below as our precise definition for the defects and the parameter λ; we explore this path integral definition a little more in the context of the instanton gas in section 5.5. We may also have several species of defect labeled by an index i = 1, . . . , N F , with parameters λ i , α i . The path integral is defined to sum over insertions of any number of each species of defect. We will take 0 < α < 1, though to be conservative, for reasons that will become clear later, we can restrict further to 0 < α ≤ 1 2 . ...
... For the p/q KK instanton in our 3D analysis, the action (2.38) gives us a defect but in this section we take arbitrary parameters. The general amplitude we are interested in is computed by the path integral with n boundaries, each with boundary condition parameterized by its own renormalized length β. Without loss of generality, it is sufficient to compute the connected amplitude, and following [7] we denote this by Z(β 1 ) · · · Z(β n ) C . This amplitude can be expanded as a sum over sectors give by different topologies, labeled by the genus g of the connected spacetime, as well as the number of defects k i of each species i, with k = i k i in total: The symmetry factors k i ! in this definition of Z g,n,k are included to account for overcounting by permutations of identical defects. With this definition, the k defects in Z g,n,k can be regarded as distinguishable, labeled only by their defect parameters α, and it becomes irrelevant whether two defects with the same α are of the same or different species. We sketch the first few terms in this expansion for a single boundary n = 1 in figure 1.
The remarkable result of [7] was that the amplitudes Z g,n (without defects) can be computed from the Weil-Petersson (WP) volumes of the moduli spaces of constant-curvature surfaces with boundary. To understand this result, we note first that the dilaton appears linearly in the action (3.1), so acts as a Lagrange multiplier constraining the curvature R 2 = −2. The resulting metrics are locally unique, so the path integral reduces to an integral over locations of the boundary (governed by the Schwarzian theory), and over the finite-dimensional moduli space of surface with a given topology. More explicitly, with the exceptions of the n = 1, g = 0 amplitude with one boundary and disc topology, every constant curvature surface with n asymptotic boundaries has a unique geodesic homotopic to each boundary. We can cut the surface along these geodesics, which we take to have lengths b 1 , . . . , b n . We then have cut the spacetime into a genus g surface with n geodesic boundaries of lengths b 1 , . . . , b n (the 'convex core'), and n 'trumpets' with one geodesic boundary and one asymptotic boundary. This split is shown for the g = 1, n = 1 case in the bottom diagram of figure 1, where the dotted line corresponds to the geodesic of length b. On the asymptotic boundaries, we must integrate over all ways in which the boundary conditions of renormalized length β can be obeyed on the trumpet geometry, with the result Next, we must integrate over all constant curvature surfaces of genus g with n geodesic boundaries of the specified lengths. This is a compact space of dimension 2n + 6(g − 1), and it turns out that the correct measure on this space is provided by the WP symplectic form. The result of the integral is thus the WP volume, denoted V g,n (b 1 , . . . , b n ). Finally, we must integrate over the lengths b of the geodesics separating the trumpets from the convex core with the correct measure bdb. Putting these pieces together, we have (3.7) There are two exceptional cases for which this formula does not apply. The first is the n = 1, g = 0 disc, for which we have The second is the n = 2, g = 0 double trumpet, which follows from the above if we set , with the factor of 1 b informally understood as coming from the residual gauge symmetry of rotating both boundaries along the length b of the separating geodesic: .
The expression (3.7) is only as useful as our knowledge of the volumes V g,n . Fortunately, they can be efficiently computed due to a recursion relation found by Mirzakhani [32]. In particular, the volumes are even polynomials in b 1 , . . . , b n , with degree equal to the dimension of moduli space 2n + 6(g − 1).
This concludes our brief review of [7], giving the expansion of the amplitudes without defects. It is now a rather simple matter to include the defects, using a result on the volumes of moduli spaces of hyperbolic surfaces with conical defects, also used by [36] in a somewhat different context. First, let us understand the effect of the defects when we integrate out the dilaton. Since the defect insertion (3.3) is exponential in the dilaton, it can be thought of as another term in the action which is linear in the dilaton. With this inclusion, the bulk JT action becomes − 1 where δ inst is a delta-function at the location of the defect. When we integrate out φ, we impose constant curvature everywhere except at the locations of defects, where we have delta-function sources of positive curvature. These are conical defects, with defect angle 2π(1 − α). Now, just as before, we are left with an integral over surfaces of constant curvature, now with conical points. And just as before, excepting some special cases, every such surface has a unique geodesic homotopic to each asymptotic boundary, where we do not allow homotopies to pass through any defect. This split is made along the dotted line for all but the first two diagrams in figure 1; the first is the disc which we have already addressed, and the second will be discussed in a moment. We thus have the same formula as before, except that we must use volumes of moduli spaces with conical points. The WP measure has a natural generalization to this setting. The fact that this is the correct measure for our integrals was derived in [36]. We thus can simply generalize (3.7) to where V g,n,k are the WP volumes of genus g, with n geodesic boundaries with the specified lengths and k cone points with the specified defect angles. We take these amplitudes as a constructive definition of what we mean by JT gravity with defects 8 .
Before discussing these new volumes with cone points, we address the special cases with boundaries which are not homotopic to geodesics, so we cannot split the surface into trumpets and surfaces with geodesic boundary, and formula (3.10) does not obviously apply. This occurs only for disc topology, with genus g = 0 and a single boundary n = 1, when the total defect angle is less than 2π, (1 − α) ≤ 1. To see that this occurs, we can use the Gauss-Bonnet theorem to compute the area of a negatively curved disc (χ = 1) with geodesic boundary and defects, finding A = −2π + 2π (1 − α); this area is negative if the total defect angle is too small. This always occurs for a single defect k = 1, which we treat as a special case below. We can avoid meeting any other special cases by restricting our attention to sufficiently strong defects, α ≤ 1 2 . We now turn to the volumes V g,n,k including cone points. Remarkably, this does not require any new ingredient! These volumes can be computed from the volume polynomials V g,n+k without defects but with n + k boundaries, simply be evaluating k of the boundary lengths at imaginary values b = 2πiα: This has been proven for α ≤ 1 2 [33] (see also [34,35]), with the restriction essentially due to the special cases discussed above. This formula was recently applied to de Sitter JT gravity in [36].
We now address the special case k = 1. The relevant single-defect path integral was computed in [30], with the result (3.12) In fact, rather remarkably, this result can be obtained from (3.10), by rather formal use of the two-boundary volume We take this as evidence that the formula (3.10) for the amplitudes, along with (3.11) for the volume polynomials V g,n,k , is correct even when the argument that led there does not apply. We would therefore be extremely surprised if the results we will obtain fail to apply for general α ∈ (0, 1), though strictly speaking they are proven only for α ≤ 1 2 . Before beginning our analysis of the amplitudes from (3.10), we recall the interpretation of the n-boundary path integral Z(β 1 ) · · · Z(β n ) in JT gravity without defects. As observed by Eynard and Orantin [43,38], Mirzakhani's recursion relation [32] is closely related to the topological recursion obeyed by matrix integrals. The matrix over which we are integrating is to be interpreted as the Hamiltonian H of a dual quantum mechanical theory, and Z(β) = Tr(e −βH ) is the corresponding partition function. However, since we are integrating over H this Hamiltonian is not unique, but rather selected from a random distribution determined by the measure in the matrix integral, so that for each β, Z(β) is a random variable. We then interpret the amplitudes Z(β 1 ) · · · Z(β n ) as moments of this distribution, Z(β 1 ) · · · Z(β n ) = dH µ(H) Tr(e −β 1 H ) · · · Tr(e −βnH ), (3.14) and learn about the measure µ from the JT path integral. From the agreement between Mirzakhani's recursion relations and topological recursion, we learn that at any order in the genus expansion, the moments agree with a particularly special type of ensemble, namely a matrix integral with measure µ(H) ∝ e −L Tr V (H) (3.15) for some potential V , taking H to be an L × L Hermitian matrix (and dH is the flat measure on independent components). More precisely, we must take a 'double-scaled' limit of such integrals, where we take L → ∞ and tune the potential V such that the resulting average density of states at leading order in the large L expansion agrees with the disc amplitude (3.8).
The structure of such matrix integrals is extremely rigid, since the leading order density of states (or equivalently the disc amplitude) completely determines Z g,n for all g, n.
In the following we will find that such an interpretation exists for our modified theory of JT gravity with defects. We will show analytically that the amplitudes Z(β 1 ) · · · Z(β n ) are consistent with the moments of some ensemble of Hamiltonians at any genus. This will allow us to find an explicit solution for the matrix integral measure in the double scaling limit.

3.2
The disc with defects: n = 1, g = 0 amplitudes We begin our analysis of JT gravity with defects by looking at the disc with any number of defect insertions, the amplitudes Z g=0,n=1,k for any k. We will mostly restrict to a single species, commenting later on the extension to multiple types of defect.
First, we note that most contributions to the path integral discussed above do not come from classical solutions. One way to see this is to use the equation of motion coming from variation of the metric in the action (3.1). This equation is equivalent to the statement that ab ∂ b φ is a Killing vector for g 2 [44], implying that the level sets of φ are the integral curves of the Killing vector, coinciding with orbits of the symmetry it generates. For a given surface with constant curvature metric g 2 , a classical solution to JT therefore exists if and only if the metric has a globally defined continuous symmetry. The only surfaces with such symmetries are the disc and double trumpet (for which the corresponding solution does not have the desired boundary conditions, since the dilaton must go to −∞ at one end). Once we include defects, the dilaton must be stationary at their locations, so they lie at fixed points of the symmetry. The only additional classical solution is therefore the disc with all defects localized at the origin. For α < 1 2 , two defects on a constant curvature metric are always separated by a finite minimal distance at which the surface develops a cusp, so we can never have more than one defect in a single location (and likewise for the marginal case α = 1 2 , for which we can bring the defects as close as desired, but they recede to infinite distance, limiting to a cusp geometry).
As a result, if we were to take the approach (analogous to Maloney and Witten in the case of three-dimensional pure gravity) of classifying all classical solutions, computing the perturbative expansion to all orders, and summing the results, we would only have two contributions, where we used (3.8) and (3.12). We can then extract the corresponding density of states by taking an inverse Laplace transform, finding so the second term is suppressed by a factor of λ, but enhanced by a factor of E −1 . Now, any consistent unitary dual (even one involving an average over Hamiltonians) must have positive density of states. For λ < 0, our naive density of states violates this for E < |λ| 2γ . In the context of three-dimensional gravity, this is precisely the problematic feature of the Maloney-Witten-Keller partition function pointed out by [6]. The defect in question in that case is the Q = 1 2 KK instanton described in the previous section, whose one-defect solution corresponds to an SL(2, Z) black hole [11] in three dimensions. Indeed, the sum of the BTZ density (2.29) and Q = 1 2 SL(2, Z) density (2.31) takes precisely the form of (3.18) for an appropriate λ ∝ (−1) J e −S 0 (J)/2 .
If we include only classical solutions and fluctuations around them, we must conclude that this theory does not have a unitary dual. To solve the negativity problem we would be forced to alter the dynamics of the theory, for example by introducing an additional species of defect with λ ≥ |λ|. In the 3D gravity context, this can be achieved by introducing a particle of mass m ≤ 1/(16G N ), as discussed in the introduction and later in section 5.4. This is the two-dimensional version of the proposal of [6,13].
However, it turns out that the negativity is automatically resolved by including the path integral over off-shell configurations including multiple defects on the disc. To see how this might occur, we look first at the two-defect result, which is simple to obtain from (3.10) and (3.11) using V 0,3 = 1. This volume is clear from the observation that there is a unique hyperbolic surface with three boundaries of fixed length (i.e. a pair of pants), so the moduli space in question is a single point. We find the result which we can include in our expansion of the density of states (recalling the symmetry factor of 2 in the definition (3.5)): The density E −3/2 (supported at positive E) is not an integrable function, so strictly speaking we must regard the last term as a distribution which regulates the divergence at E → 0 in an appropriate way 9 . The new term is once again suppressed by a factor of λ, but more singular 9 Specifically, it is the principal value distribution PE −3/2 , defined through its pairing with a smooth test function ψ which decays rapidly as E → +∞ by (PE −3/2 )ψ(E) = ∞ 0 dE E −3/2 (ψ(E) − ψ(0)). Roughly speaking, we have subtracted an 'infinite delta function' at zero energy to cancel the divergence of the integral. Choosing ψ(E) = e −βE gives us the Laplace transform (3.20). at small energy. This suggests that the expansion in powers of k is breaking down at E of order λ, so we cannot trust the perturbative series in the regime where the negativity occurs.
In fact we can do better, since we can compute the leading order term in Z g=0,n=1,k (β) at low temperature explicitly and sum the resulting series of leading order corrections. The limit when our asymptotic boundary becomes very long corresponds taking the corresponding geodesic length b → ∞ with all other lengths or defect angles fixed. Since V g,n is an even polynomial in the lengths of order 2n + 6g − 6, we are picking out the monomial b 2n+6g−g , and the result is independent of all other lengths or defect angles. We compute the coefficient in appendix A using results from [32,45], finding (3.22) Specializing to the case of multiple defects on the disc g = 0 using (3.11), we have (3.23) and integrating this against the trumpet gives simply The derivation applies for k ≥ 2, but the result also is valid for the special cases k = 0, 1. Now we simply sum over k as in (3.5) including the required symmetry factors, simply finding that the defects give an exponential correction to leading order at low temperature: In term of the density of states, this corresponds simply to a shift in the ground state energy, The naive density of states (3.19) arises from taking a binomial expansion and truncating after the first two terms. The negative density of states appears in a regime where that series fails to converge. It was this an artifact of the truncation, and has been resolved in a rather elegant manner by including the off-shell configurations of multiple defects. At this leading order in the low-temperature limit, it is straightforward to generalize to include several species of defect, and their contributions to E 0 simply add, The contributions from k ≥ 2 defects include new terms decaying as β −1/2 and growing as odd positive powers of β, which themselves have the potential of causing a negative density of states or other pathological low-energy behavior. Experimentally, by explicit calculations (we compute up to k = 6 defects using the list of volume polynomials in appendix B of [35]), we find that all higher corrections fit into the same pattern, shifting the edge of the spectrum at higher orders in λ. The higher order corrections are no longer independent of α. Explicitly, the first few orders for a single defect are given by and for two species of defect we find We emphasize that this structure places extremely stringent constraints relating the volume polynomials. The amplitude Z 0,1,k contains terms proportional to β 1 2 +p for p = 0, 1, · · · , k − 2; for p ≥ 2 there is a unique coefficient determined by lower orders in k that is compatible with the interpretation as a shift of E 0 . The next order in E 0 can then be read off from the p = 1 term, and finally the p = 0 term describes a change in the functional form of the density of states, so ρ disc is not simply a uniform translation of the Schwarzian density of states.
In the next section, we will perform these calculations exactly and explain more directly the origin of the structure that emerges from the perturbative calculation done above.

The matrix integral dual
In the previous section we studied JT gravity with a gas of defect perturbatively in the weighting parameter λ. In this section we will obtain exact expressions at genus zero from resuming over an arbitrary number of defects and show that the result for Z(β 1 ) . . . Z(β n ) C matches precisely with a matrix integral. In section 3.5 we give a more formal, but less explicitly, proof that is valid also for higher genus contributions.

Two boundary amplitude
We will begin by considering the two boundary correlator Z(β 1 )Z(β 2 ) C at genus zero, including defects. This correlator is universal for all double-scaled (GUE) matrix models. Its independent of the spectral curve which defines the theory and depends only on the position of the edge of the spectrum E 0 , where we include the annotation MM to emphasize that this result comes from a matrix model. If our model defects gives this result, it is a 'smoking gun' giving us strong evidence that there is a dual matrix integral.
To compute this cylinder amplitude, we write the answer in the defect expansion where the sum is over the number of defects present in the gravitational path integral, and The quantity in the right hand side is the WP volume with 2 + k boundaries. We used the fact stated above that the volume with defects is a simple analytic continuation. To simplify the expression, the case without defects k = 0 is included in the sum with the understanding . We now make use of the explicit formula derived in [37] for the genus zero WP volumes: and primes denote derivatives with respect to x. In a moment we will briefly review the role played by u JT in the matrix model, but for now we will simply take the formula as given and apply it to our problem. Using this explicit formula for WP volumes we can find the contribution with k defects to the double trumpet (3.36) To derive this formula we integrated over b 1 and b 2 which produces the prefactor and a simple exponential of β 1 and β 2 . Putting everything together we obtain So far, we have just been plugging the formula (3.34) for the Weil-Petersson volumes into the expression for the amplitudes with k defects. At this point, we can explicitly perform the sum over all defects using the Lagrange reversion theorem (see Appendix B for a statement of the theorem). We obtain precisely the answer expected from the double-scaled matrix integral, given by where we defined the function u(x) implicitly through For later convenience, we have chosen to define u(x) with a minus sign relative to the conventional definition used for u JT (x). We can eliminate the variable x from these expressions to obtain a more direct implicit definition for u(x), where we used that I n (x) = i −n J n (ix) to simplify the expression. In the old matrix model literature [46,47] this equation is called the (genus zero) string equation, u(x) is called the heat capacity and x is related to the leading KdV parameter. This function characterizes the theory completely in the double scaling limit and is equivalent to giving the genus zero density of states (or equivalently the spectral curve), which we will compute later. It is evident that taking λ → 0 sends u(x) → −u JT (x), recovering the JT gravity string equation.
Taking the x → 0 limit of the expression above we get the final answer for the two-loop amplitude corresponding to JT gravity with a gas of defects where the exact edge of the spectrum is given by E 0 = (2γ) −1 u(x = 0). The zero-point energy can be written more explicitly, using the string equation, as the largest solution E 0 of the equation The gravitational result (3.41) from summing over defects thus takes the precise functional form (3.31) required for a double-scaled matrix integral. This result can be straightforwardly generalized to allow a number of flavors N F of defects with weighting λ i and angles α i for i = 1, . . . , N F . Using the second version of the Lagrange reversion theorem described in Appendix B we can show the two-loop amplitude takes the same form (3.38) but with a string equation given by where we leave implicit that u should be thought of as a function of x. Taking x → 0 gives the equation that the zero-point energy satisfies These expressions can be verified by Taylor expanding in all the λ's, comparing with the perturbative results (3.29), (3.30), and we checked that they agree up to seventh order in λ.
We find it remarkable that the defects appear linearly at the level of the string equation (3.44). This is completely obscure from the expansion in terms of Weil-Petersson volumes. As we will see, all the nonlinearities can be traced back to the shift E 0 of the edge of the spectrum.

All genus-zero amplitudes
The procedure in the previous section can be generalized to the genus zero amplitude with any number of boundaries (including the one-boundary disc amplitude studied perturbatively in section 3.2, which we will treat as a special case in the next subsection). We will find that these all match the results from the matrix integral we met above.
The gravitational calculation for the connected amplitude Z(β 1 ) · · · Z(β n ) C,g=0 with n boundaries involves a sum over defects for a genus zero topology, adding Z g=0,n,k (β 1 , . . . , β n ) for all k (and summing over species if N F > 1). Using the explicit formula for the WP volumes, for the case of one specie of defects, the n-loop amplitude becomes We can again evaluate this sum using the Lagrange reversion theorem. Since the derivation is almost identical to the case with n = 2 we will just quote the final result: The function u(x) appearing here is exactly the same one that appeared above for the special case n = 2, defined thorugh (3.40). The matrix model multi-loop amplitude at genus zero was derived some time ago in [48,49]; for a recent discussion see [37]. The expression derived in those references is precisely equivalent to (3.47). Therefore we have shown here that at genus zero, or equivalently to leading order in S 0 , JT gravity with a gas of defects is equivalent to a matrix integral Z(β 1 ) . . . Z(β n ) JT+def = Tr(e −β 1 H ) . . . Tr(e −βnH ) MM . (3.48) When multiple defect flavors are present, we obtain (3.47), where u(x) is given by (3.44). Again, this is easily derived using the second version of the reversion theorem in Appendix B.
In the next section we will analyze the density of states one can derive from these formulas, before discussion higher genus amplitudes.

Density of States
We show that JT gravity with defects has a matrix integral dual, interpreted as an ensemble of random Hamiltonians [7]. From this perspective the spectral curve plays an important role and is related to the averaged density of states of the dual theory. In this section we will analyze this quantity. The partition function with a single boundary can be derived using the same method as before, combining the exact formula for the genus zero WP volumes and the reversion theorem. We obtain the result where u(x) is defined by (3.44). Once again, this matches with the answer for a matrix integral with heat capacity equal to u(x), see for example [50,51]. Using (3.44), this gives us an exact expression in the defect weighting parameter λ. The density of states extracted from this formula can be obtained by an inverse Laplace transform. Changing the integration variable to u, we have the explicit expression The integrand is basically the derivative with respect to u of the string equation. In the right hand side the density of states depends on the coupling λ not only through the linear term in the integrand, but also through the implicit λ dependence of the zero-point energy E 0 . This is defined as the largest root of an equation that we repeat here for convenience: Unless the solution to this equation is degenerate, this immediately implies that we have a smooth density with a square-root edge as we found perturbatively in section 3.2. The prefactor is proportional to the integrand in the expression above evaluated at u → 2γE 0 . Now, we should check whether the model we have arrived at makes sense as a doublescaled matrix model (at least perturbatively in the genus expansion; we leave aside possible nonperturbative instabilities for now which are also present in JT gravity). For this, we require that the density of states ρ disc is positive for all E > E 0 . Now that we have an expression for this density at finite λ, we can explore this for a range of parameters α and λ. For simplicity we will restrict to the case of a single species of defect.
First we can look at large energies. In this regime, it is possible to approximate the density of states by ρ(E) ∼ e 2π √ 2γE for α < 1 and ρ(E) ∼ λe 2πα √ 2γE for α > 1. This change of the ultraviolet behavior for α > 1 is not unexpected from the gravitational perspective, since such defects would be favored to proliferate and destroy (or at least substantially modify) the asymptotic region of the geometry. As before, we will now focus on 0 < α < 1.
We find that for all such α, there is a range of λ for which ρ disc is positive. However, this can fail for sufficiently large λ. There are several cases to consider; we show some representative examples from numerical integration of (3.50) in figure 2.
• For α c < α < 1, where the critical value α c ≈ 0.627 is the ratio between the first zero of J 0 and the first zero of J 1 , the density of states is positive for all energies, for any choice of λ.
• For 0 < α < α c and λ < 0 the density of states is positive. An example is shown in figure 2(a).
• For 0 < α < α c and λ > 0, the theory is well behaved for couplings smaller than a critical value λ c (α). This critical coupling is given implicitly by solving the following two equations simultaneously 2γE c I 1 2π 2γE c + 2πλ c I 0 2πα 2γE c = 0, (3.53) 2γE c I 0 2π 2γE c + 2παλ c I 1 2πα 2γE c = 0. (3.54) The first equation gives the zero-point energy at the critical coupling λ c . The second equation determines the point where the solution to the first equation becomes degenerate, which means that the suppressed prefactor in (3.52) vanishes. Eliminating the critical zero-point energy E c gives the desired relation λ c (α). Solving this numerically, we find that λ c (α) goes smoothly between values λ c (0) ≈ 0.03 and λ c (α c ) ≈ 0.12. For small enough λ 0.03, the theory has a positive density of states for any α < 1. An example is shown in figure 2(b). For the KK instantons, the coupling λ is exponentially small in S 0 , so this is the relevant case.
• For 0 < α < α c and λ > λ c (α), the density of states is no longer positive for all E, so we cannot interpret our model as a double-scaled matrix integral. The solution to (3.53) determining the edge of the spectrum E 0 jumps to a smaller value, and we then find a finite range of energies E 1 < E < E 2 for which ρ disc (E) < 0. A representative example is shown in figure 2(c).

Higher genus
We have now defined a matrix integral which reproduces all genus zero amplitudes of JT gravity with defects by explicit computation. We do not have a closed form expression for the volumes of moduli space at higher genus, so we must take a slightly more indirect approach.
In this section, we give a formal proof that the amplitudes with defects (3.10) satisfy the topological recursion of a matrix integral, using a theorem of Eynard and Orantin. We thus have a duality to all orders in the genus expansion, generalizing [7]. To simplify we will set γ = 1 2 in this section. Since the proof is rather formal, we also present explicit checks at higher genus in Appendix C, where we also write down the recursion explicitly.
We begin by introducing some notation following [7]. First define the coordinate z in terms of the matrix eigenvalue E as z 2 = −E. The spectral curve is defined through the disc density of states as y(z) = −iπe −S 0 ρ disc (E). For example pure JT gravity has y JT (z) = sin(2πz)/(4π). Then define the functions W g,n (z 1 , . . . , z n ) = (−1) n 2 n z 1 . . . z n R g,n (−z 2 1 , . . . , −z 2 n ), (3.55) proportional to the genus g contribution to the connected correlator of n resolvents, The expectation value is taken within the matrix model ensemble. This is related through a Laplace transform to the connected partition function Tr(e −βH ) correlator which we denote by Z g,n (β 1 , . . . , β n ). For the exceptional case g = 0, n = 1 the resolvent of the double-scaled integral is not convergent, but we can instead define W 0,1 (z) = −2zy(z).
The main result we will use is the deformation theorem derived by Eynard and Orantin, Theorem 5.1 of [38] (see also section 4.3.2 of [52] and for a summary of other interesting properties of the topological recursion [53]). This starts with a given solution of the topological recursion and considers a one-parameter deformation, parameterized by λ (which for us will be the defect amplitude). We denote various quantities after the deformation by y(z; λ), W g,n (z 1 , . . . , z n ; λ) and Z g,n (β 1 , . . . , β n ; λ). The undeformed case corresponds to λ → 0, returning us to y(z), W g,n (z 1 , . . . , z n ) and Z g,n (β 1 , . . . , β n ).
Deformation Theorem: The statement of Eynard and Orantin's theorem requires the choice of a closed curve γ in the complex plane and a function f (z) (which for simplicity we take to be independent of λ). We require that the spectral curve and the cylinder amplitude behave as follows under the deformation: Then, applying topological recursion with these deformed amplitudes as input, the solution satisfies ∂ ∂λ W g,n (z 1 , . . . , z n ; λ) = γ dz 2πi f (z)W g,n+1 (z, z 1 , . . . , z n ; λ). (3.59) The deformed amplitudes are thus completely determined at all genus by the closed curve γ and function f (z) in a simple way. Since the resolvent correlators are invariant under permutations of its arguments the choice of the variable being integrated in the right hand side is irrelevant.
Solution at finite λ: From the above, it is simple to construct a solution to topological recursion to all orders in λ: For our model, the amplitudes W g,n,k (z 1 , . . . , z n ) will be equivalent to the expansion coefficients Z g,n,k (β 1 , . . . , β n ) in (3.5), up to an integral transform to convert between resolvents and partition functions. By repeated use of the relation (3.59), the W g,n,k are given by multiple integrals, as W g,n,k (z 1 , . . . , z n ) = γ dz 1 2πi f (z 1 ) · · · γ dz k 2πi f (z k )W g,n+k (z 1 , . . . , z n ,z 1 , . . . ,z k ). (3.61) The same equation applies for the cylinder (3.58), and from (3.57) we have a similar expansion for the spectral curve, If the family of solutions to topological recursion is analytic in λ in a neighborhood of the origin, this series converges to the solution. In fact, it is sufficient for the input to the topological recursion (the deformed spectral curve y(z; λ) and W 0,2 (z 1 , z 2 ; λ)) to be analytic, since the topological recursion preserves analyticity. This is the case for our example of the sum over defects.
JT gravity with defects: We will now apply the general result above to our specific problem. We will find an appropriate choice of contour γ and function f (z) to implement the deformation induced by inclusion of defects, before showing that the coefficients W g,n,k in (3.61) are precisely those given by the path integral with k defects (3.10). From equation (3.60), it is roughly clear what we need to do: the extraz variables give us extra boundaries in JT gravity, and we need to choose f and γ so that the integrals act to replace those boundaries with defects. Let us make this more explicit. The Weil-Petersson volumes are simply related to the expansion of the resolvent in JT gravity by a Laplace transform [54], This is equivalent to the JT path integral (3.7), with the trumpet factor replaced by the Laplace transform so that we get the resolvent rather than the partition function. Our defect expansion of the resolvent (3.10), using the WP volumes with cone points (3.11), is then W g,n,k (z 1 , . . . , z n ) = with the identity Comparing the gravity answer (3.64) to the deformation of the topological recursion (3.61), we should choose the integral dz 2πi f (z) · · · to implement the inverse Laplace transform, stripping off some of the integrals in (3.63) and setting lengths in the Weil-Petersson volumes to b = 2πiα. Because the volumes are all even polynomials in b, this is equivalent to choosing f (z) = sin(2παz) 2πα , (3.67) and taking γ to be any curve encircling the origin, as we will check in detail now. Each term in the WP volume will depend on the lengths b as a monomial b 2m . Taking the Laplace transform, this contributes to the JT resolvent as (2m + 1)!z −2(m+1) . Now we insert this into (3.61), where the integral picks out the residue of (2m + 1)!z −2(m+1) sin(2παz) 2πα atz = 0, which is precisely (2πiα) 2m . The overall result is therefore to evaluate the WP volume with b replaced by 2πiα, as required by (3.64).
This analysis applies for n ≥ 2 and all genus. The n = 1, g = 0 case, which is the disc with defects giving the deformed spectral curve y(z; λ), can be treated similarly. There is one exception, coming from the g = 0, n = 1, k = 1 disc amplitude with a single defect, where the corresponding Weil-Petersson volume is not defined. This contributes to leading order in the deformation of the spectral curve, which from section (3.2) is given by This can be checked separately to follow from the same deformation, though the curve γ must be large enough to enclose the point z at which we are evaluating the spectral curve. 10 This establishes that the addition of defects is a special case of Eynard and Orantin's deformation theorem, and hence the resulting genus expansion obeys the topological recursion. The argument generalizes straightforwardly to multiple defects, by treating each species of defect as a separate deformation.

Back to 3D gravity
Our analysis of 3D gravity near extremality in section 2 motivated us to study a simplified model for the path integral on Seifert manifolds. This simplified model is an example of JT gravity with defects, as studied in section 3. When we included only classical solutions, this model had a potential problem with a negative density of states, similarly to the Maloney-Witten-Keller partition function (1.1). We saw that this problem was naturally resolved by including the path integral with multiple defects, and instead we found a shift in the edge of the spectrum of energies. Our proposal is that the same mechanism applies in the full three-dimensional problem: a sum over Seifert manifolds cures the negativity arising from the SL(2, Z) black holes, and we instead have a nonperturbative shift of the extremality bound.
To establish this mechanism conclusively, and for a more detailed quantitative study, it is important to solve the complete three-dimensional problem of computing the path integral on Seifert manifolds. Nonetheless, in the regime of large spin and very low temperature where the effect is relevant, we have principled reasons to believe that the dimensionally reduced theory is a good approximation. To that end, in this section we will also discuss and quantify various sources of corrections to this approximation.
Here, we will use a shifted and rescaled energy which is natural from the near-extremal point of view, measured in units of the characteristic scale of quantum fluctuations: The leading contribution to the density of states near the extremal limit is given by the BTZ black hole where we ignore a (spin dependent) multiplicative constant that can in any case be absorbed as a logarithmic correction to S 0 (J). From the 2D JT perspective this is the contribution to the partition function from the disk with no defects. The leading correction to this contribution comes from the SL(2, Z) black hole with Q = 1 2 , given near extremality by From the JT perspective this is precisely the one-defect contribution with α = 1/2 and λ = λ 1/2 defined above. For the exponential classical dependence on parameters, including the important factor of (−1) J , this agrees with the action (2.38) obtained earlier.
The potential pathologies in the spectrum occur at exponentially low temperatures, so we will focus on the following 'double scaling' limit [6] at very low energies above extremality: fixed. (4.4) In this regime the Q = 1 2 family of SL(2, Z) black holes is relevant at leading order, but all others are negligible. Then the density of states from classical solutions is approximately In our double-scaling limit, these two terms are of the same order. If λ1 2 < 0 (odd J), then for E JT < |λ1 2 | the density of states can become negative. But now, we can apply the lesson of section 3.2 and include the path integral over multiple defects. Here, this defects are KK instantons, which lift to smooth Seifert three-manifolds with U (1) symmetry. In the near-extremal limit we are studying, we approximate the full path integral by the dimensional reduction, so we can directly apply the results of the previous section. The resulting density of states is now free of negativities, and instead we have a shift of the extremal energy: Here, we wrote the shift in the extremal energy is written in terms of the variable E JT . Going back to the original energy E, the extremal value E 0 (J) is shifted by a non-perturbative correction anticipated in the introduction Now, there is one important contribution to the three-dimensional path integral which is not captured by the dimensional reduction in this limit, namely the one-loop effect of Kaluza-Klein modes of the graviton. In the large spin limit, the transverse circle direction is very large so these modes are not heavy (though their interactions are suppressed [26], see also [55]), and they should be included. Intuitively, this loop determinant accounts for boundary gravitons on top of our solutions, which correspond to Virasoro descendants in the dual. We therefore expect our results to capture the density of Virasoro primary states, not of all states; these are not greatly different, since at large central charge, most states carry a very small amount of their energy in descendants. This intuition is supported by matching the JT density of states, as well as the density with a single defect, to the energy dependence of the low-energy spectrum of primaries from BTZ and SL(2, Z) black holes. For a single KK instanton, we can simply match λ with the coefficient in the exact SL(2, Z) contribution from three dimensions, since we have the correct energy dependence. Our underlying assumption is that the graviton KK modes do not introduce new effects for multiple KK instantons, at least at leading order. This is not unreasonable, since the gravitons propagate only at the boundary, but demands more careful justification from a full three-dimensional calculation 11 .
If we were to go to lower temperatures still, the contributions from other families of SL(2, Z) black holes become important. These should also give rise to shifts of the extremality bound, with the Q = p q contribution proportional to at leading order. The proportionality constant includes some additional spin-independent phase originating with the one-loop effects discussed above (in particular, from the fact that the vacuum has a null descendant); this can be seen from the SL(2, Z) black hole contribution in (2.29). The imaginary part cancels between terms labelled by Q and 1 − Q. When we add the contributions from all p coprime to a given q, these phases give rise to Kloosterman sums, which appear in the MWK density [8,9,6]. From this, the BTZ extremality bound appears to depend on spin in a complicated number-theoretic way. Finally, we analyze the order of magnitude of corrections to this result and see that they are negligible in the double scaling limit (4.4). The corrections can be suppressed either due to the large spin limit or due to the small energies above extremality.
Other saddles: First, we look at contributions from KK instantons with q > 2. At small energies their contribution to the density of states is of order ρ q (E) ∼ e −(1− 1 q )S 0 / √ E JT , with q > 2. Since we are focusing on energies of order E JT ∼ e − 1 2 S 0 all these contributions are exponentially suppressed in the large spin limit by a factor of e −( 1 2 − 1 q )S 0 1 and therefore can be neglected. It is crucial for this conclusion to hold that contributions from q > 2 do not grow any faster at low energies than those with q = 2.
Corrections to dilaton potential from dimensional reduction: A second source of corrections is the fact that in the throat, the 2D dilaton gravity which appears from the reduction of 3D gravity has non-linear corrections to the dilaton potential. The leading correction to the dilaton potential in the near extremal limit is U (φ) = −2φ + εφ 2 , where ε is a fixed coupling of order 1/S 0 which can be read off from equation (2.12). This produces a shift in the free energy δ log Z ∼ εβ −2 , computed in detail by Kitaev and Suh [57], which translates in a relative shift of the density of states δρ/ρ 0 ∼ εE 2 JT . In the limit we are interested in this is of order δρ/ρ 0 ∼ e −S 0 /S 0 which is also negligible: from our very low energy perspective it is a UV effect, and we are interested in the deep IR.
Other topologies: Another source of corrections are higher topologies appearing in the near-horizon region. We can study a class of these which arise in JT gravity, by adding handles to AdS 2 . The relative shift in the density of states from adding a handle on the disc is δρ/ρ ∼ e −2S 0 /E 3 JT . This grows at low energies, but not sufficiently quickly to overcome the exponential suppression: for E JT ∼ e − 1 2 S 0 this is of order δρ/ρ ∼ e − 1 2 S 0 . Interestingly, these higher genus corrections become important at energies E JT ∼ e − 2 3 S 0 , which is the same scale at which the q = 3 KK instantons become relevant. At very low energies, we expect the handles to resum into the universal form for a matrix integral with a square-root density at genus zero, namely We do not then have a sharp edge of the spectrum, since it is smoothed out on this scale, and has an exponentially small tail for E < E 0 . The shifts in E 0 from the SL(2, Z) black holes at q > 2 are therefore not particularly meaningful, since the spectrum is expected to be smooth at the relevant scale.

Discussion
Previous attempts to define the Euclidean path integral of pure 3D gravity [8,9] have considered only the quantum fluctuations around saddle point geometries, and obtained results in tension with an interpretation as a unitary quantum mechanical theory [6]. We have proposed a mechanism to resolve this tension, by including certain topologies in the path integral for which there is no classical solution. We have not computed the path integral over such topologies in the full theory, but instead reduced to a more tractable problem by concentrating on the near extremal limit, where their effects are most important. In this regime the physics is approximated by a dimensionally reduced two dimensional theory of JT gravity, with the addition of new instanton-like objects inherited from the reduction from three dimensions. These objects correspond to points where the circle fibration over which we are reducing becomes degenerate, so the two-dimensional geometry is singular while the full three-dimensional geometry remains smooth. The corresponding three-geometries -Seifert manifolds -are the new topologies we include in the path integral, and we argue that they cure the negative density of states found in [6], replacing it with a nonperturbative shift in the energy of extremal rotating BTZ black holes.
In the process we needed to understand the path integral of JT gravity with a sum over defects, which we studied in its own right in section 3. We discovered that this family of theories is dual to a matrix integral, generalizing the pure JT result of [7].
We conclude with some comments on open questions and future directions.

An ensemble dual for three-dimensional pure gravity?
Our cure for the pathological negative density of states revives the hope that there may be a consistent theory of pure 3D quantum gravity, with only metric degrees of freedom. This relied on two-dimensional calculations closely related to those in JT gravity [7], so we are led naturally to the idea that a dual CFT description should be of the same form: that is, we do not have a single dual CFT, but rather an ensemble of duals. Such an interpretation would explain the second pathology of the MWK density of states, namely that it is continuous: this is not consistent for a single theory, but is the expected result from an average over a family of theories. The ensemble interpretation offers an explanation for the path integral over geometries that connect several disconnected Euclidean boundaries, such as those discussed in section (3.3.1). The simplest of these corresponds to a three-dimensional geometry with the topology of a torus times an interval, with two torus boundaries living at the ends of the interval; work computing the path integral on this topology [56] appeared while this paper was in preparation. Similar 'spacetime wormhole' geometries connecting disjoint boundaries have also made a recent appearance in discussion of the information paradox [58,59], and put the 'baby universe' discussions of [60,61,62] in an asymptotically AdS context [63]. At least naively, these wormholes give rise to 'connected correlators' between boundaries, so the partition function on two disjoint tori is different from the product of the separate partition functions on each torus. This is incompatible for single local dual theory, but can be interpreted as a result of statistical correlations in an ensemble of theories.
For two-dimensional gravity, a dual description is a one-dimensional quantum mechanics, for which matrix integrals provide a natural class of ensembles. For 3D gravity, we instead require a two-dimensional CFT dual, and there is no such obvious candidate ensemble to select from, at least for irrational theories (see [64,65] for discussion of an ensemble of free theories and the possibility of an exotic gravitational dual). Our findings strongly suggest that the spectrum of Virasoro primaries at a given spin is well-described by a matrix integral near extremality. However, this cannot be the whole story, since it contains no sign of spatial locality. An ensemble of consistent local CFTs certainly requires correlations between sectors of different spins (for example to impose modular invariance), and seems likely to also require deviations from random matrix statistics even within a sector of fixed spin. In particular, without marginal operators we do not expect a continuous moduli space of theories, but rather a set of isolated CFTs; it is hard to imagine what an appropriate ensemble may look like in this case. Perhaps there is a large set of CFTs that resemble pure gravity, which mimic a continuum in a large central charge limit.
We also have more dynamical data and constraints coming from boundaries of higher genus. For example, we can interpret the results of [66,67] as an ensemble average (rather than a microcanonical average) for the OPE coefficients of pure state black holes, arising from a gravitational calculation of genus 2 partition functions. More gravitational calculations with different boundary conditions and topologies will be helpful to elucidate the properties of a putative ensemble (see [56,68] for first steps in this direction). Such results provide us with the opportunity of a window into the statistics of chaotic quantum systems [69,70,71,68]. Another possible source of inspiration is provided by the two-dimensional analog of the SYK model studied in [72]; while not directly related to gravity, this model is a tractable example of an ensemble of irrational CFTs (other relevant models are [73,74]).

The full three-dimensional path integral
To make our off-shell path integrals tractable, we truncated the full three-dimensional theory to a two-dimensional sector. We have argued that this truncation is a good approximation to the physics of interest near extremality, but it is nonetheless important to upgrade this to a full three-dimensional calculation. Besides verifying that the two-dimensional model is indeed a good approximation, such a calculation would be useful in its own right, to extend the range of validity away from extremality and study more detailed statistics (such as correlations between sectors of different spin) in a putative ensemble dual.
The geometries we studied are Seifert three-manifolds, which may be a tractable class of manifolds on which to study the gravitational path integral more completely, for example generalizing the methods of [75] and [56]. At least in perturbation theory, 3D pure gravity is closely related to a noncompact Chern-Simons theory [76], so we may be able to draw inspiration from previous studies of Chern-Simons theories on Seifert manifolds (some examples are [77,78]).
Due to the emergence of the near-horizon AdS 2 region where quantum fluctuations are important, it is plausible that the most important topologies in the near-extremal limit are those we study, respecting the symmetry of the large transverse circle direction. However, we are not guaranteed that this will be the case. While a systematic study of all three-manifolds seems beyond reach, we would like to find some organizing principle to guide us to the most relevant topologies.
Our results suggest that there is one regime where topological fluctuations become completely uncontrolled, namely for small non-rotating black holes. Our two-dimensional approximation is not useful there (for example, it becomes important that we integrate only over positive values of the dilaton), but at least formally we note that the genus expansion breaks down entirely, so the infinite set of topologies we consider (and likely may more) will be of equal importance at leading order.

Consistency with modular invariance
After observing the negativity of the MWK spectral density, [6] argued that a positive density of states required the existence of sufficiently light states, well below the black hole threshold, from modular invariance. On the other hand, our gravitational calculation indicates that there is a cure to the negativity without introducing any such light states. We will explain how this is consistent with modular invariance and the loophole in the argument of [6] in a companion paper [15], which we briefly preview.
Modular invariance gives universal results for the density of states in an asymptotic limit of large spin |J| → ∞ and fixed twist E − |J| [79,71,14]. We will state a precise and rigorous version of this statement in [15], as well as a generalization giving (for instance) the density of even spin states minus the density of odd spin states, following ideas of [6]. The most important terms in this large spin expansion arise as the modular transforms of the operators of lowest twist.
However, this is not quite the limit in which the negative density of states appears. Instead, to probe this regime we require a combined limit of large spin and exponentially low twist, which is more subtle to study. Since our proposed cure for the negativity does not involve new terms which grow rapidly with spin, but instead terms that become more important at very low twist, it does not require the existence of light operators. Instead, it implies a small correction to the density of states relative to the Cardy formula. The required correction to the degeneracy of black hole states grows polynomially with spin, giving an exponentially small correction to the entropy.

Including matter
If we consider a three-dimensional theory of gravity with matter, we can ask how it affects our near-extremal two-dimensional description. We obtain a useful perspective by including the matter as 'first-quantized' particles, using a point-particle action rather than a field description. An interesting effect arises from particles which run round the S 1 on which we reduce.
Taking the worldlines of such particles to be independent of the AdS 2 directions, they appear as pointlike objects in the two-dimensional theory. Indeed, they give new examples of the defects we studied in section 3. For a particle of mass m, the resulting defect is parameterized by α = 1 − 4G N m and λ ∼ e −4mG N S 0 (J) .
This gives a two-dimensional perspective on the proposal of [6,13] to cure the negative density of states with matter, as discussed after equation (3.19). To cancel the contribution of a KK instanton defect without considering off-shell geometries, one can add a matter defect with λ growing sufficiently rapidly with spin, which means m < 1 8G N . Of course, we can now include multiple matter defects, and as a result find a shift in the black hole extremality bound. Precisely this effect was obtained from a three-dimensional analysis of one-loop corrections to the extremal BTZ geometry in [14], for light matter (excluding backreaction). Such an effect was also demonstrated for a generic irrational CFT using conformal bootstrap methods, which gave a result that includes backreaction when applied to a gravitational dual. The consistency between this full three-dimensional analysis and the two-dimensional reduced theory gives us extra confidence in the approximations we used in this paper.

The instanton gas for JT with defects
We gave a solution to JT gravity with defects by constructing the path integral with a definite number of defects, and then summing their results. A possible alternative approach to pursue is provided by the instanton gas described in section 2.5, where we instead perform the sum before doing the path integral. This leads us to propose that this theory is also equivalent to a theory of dilaton gravity.
As discussed in [30] and sections 2.5 and 3.1, a defect insertion in JT gravity is equivalent to inserting an operator exponential in the dilaton. Including an integral over the location of the defect, we can include defects by insertions of an operator proportional to in the path integral, as in (3.3). At this point, we could carefully relate this to our earlier calculations by gauge-fixing diffeomorphisms and integrating out φ to arrive at an integral over moduli space, checking that we land on the Weil-Petersson volume form. In particular, such a calculation would determine the normalization of a defect insertion in terms of λ. We will not follow this route here, instead fixing the normalization by comparing the two methods. As described in section 2.5, we now can insert any number of defects in the path integral and sum over them including symmetry factors, giving the exponential of (5.1). This can be incorporated as an additional local term added to the JT action (3.1), giving with potential with the normalisation chosen to match parameters (see appendix D). This is a model of dilaton gravity in the class studied by [17] (see also [80,81,82]), which approaches JT gravity at large dilaton (as long as α < 1, since otherwise defects will proliferate at large φ, and destroy or at least modify the asymptotic region). This argument leads us to conjecture that we have an equivalence between three theories: JT gravity with defects, the matrix integral of section 3.3, and now a theory of dilaton gravity. We make some very preliminary comments, and leave more detailed study to the future. See the independent work [82] for a discussion on the relationship between the dilaton gravity theory and the sum over defects.
We discuss the semiclassical physics of this model in appendix D. Here, we will highlight one aspect, determining the classical stability of the model. This depends on qualitative features of the dilaton potential, for which we have three cases, shown in figure 3. First, for λ < 0 the potential U is monotone with a single zero, which means that the model is classically stable. However, this is no longer true for λ > 0, since the potential increases without bound as φ → −∞; this leads to classical solutions with energy unbounded below. For coupling smaller than a critical value, 0 < λ < λ c , the potential U has two zeros. The consequence is that we have sensible black hole solutions for every temperature, and we can at least make sense of the model perturbatively. For λ > λ c , the potential is positive for all φ, and as a consequence we do not have classical solutions below a critical temperature: the model is not stable even perturbatively at low energies. As long as λ is not too large, there is some hope that we are saved from this fate quantum mechanically. For example, perhaps the solutions that lead to the instability of the theory are themselves unstable to the spacetime pinching off near the minimum of the dilaton potential, where we have potentially large quantum corrections.
At a very qualitative level, this stability analysis chimes with our findings for the density of states in the matrix model at finite λ in section 3.4. The model is well-behaved for any negative λ, but does not make sense for low temperatures when λ is sufficiently large and positive. We potentially have a semiclassical interpretation of the regime in which the theory is well-defined, which deserves better understanding.
We can construct more general dilaton gravity models by including multiple species of defect, each of which should simply add another exponential term to the potential U . If our conjecture is correct, we thus have a large class of dilaton gravity theories with matrix integral duals. Through this dual, we have the opportunity to understand such models nonperturbatively. An interesting application is to studying flows in the bulk between geometries that are not necessarily AdS 2 . This can be intuitively understood as a condensation of defects that modifies the geometry deep in the bulk. An important example is given by [83,84]. For a dilaton potential with a certain shape it is possible to produce flows where the geometry inside the bulk is dS 2 (see also [85,36]). From the semiclassical analysis we see this may be possible for λ > 0 and α close to one. Another possible application is to understand the path integral over finite spaces following [86] and using the exact density of states as a seed for the solution of the Wheeler-de Witt equation. We leave such explorations for future work.
In this appendix we will give a simple derivation of the WP volume on a surface with genus g and n geodesic boundaries of length b = (b 1 , . . . , b n ) where one of them has a very large length b 1 → ∞. The leading term is this limit is given by To show this we first write down the general WP volume as where α i are a set of positive integers, (α 1 , . . . , α n ) g,n are the coefficients multiplying each power of the boundary length and |α| = n i=1 α i (not to be confused with the defect angles which will not appear in this appendix). The coefficients of highest order on the geodesic length can be obtained with the string equation. This applies when, in this notation, we have |α| = 3g − 3 + n. Then the string equation is (α 1 , . . . , α n−1 , 0) g,n = α i =0 (α 1 , . . . , α i − 1, . . . , α n−1 ) g,n−1 , which Mirzhakani showed to be equivalent to her recursion relations in theorems 7.1 and 7.2 of [32]. For our purposes since we are interested in taking only one boundary length to be large, we will consider the simpler case with top power α 1 = 3g − 3 + n and α i>1 = 0. The string equation becomes very simply (3g − 3 + n, 0, . . . , 0) g,n = (3g − 3 + n − 1, 0, . . . , 0) g,n−1 .
This equation shows that the coefficient (3g − 3 + n, 0, . . . , 0) g,n is independent of n. Finally we need to compute this coefficient for some particular value of n. This calculation is easier to do for a single boundary so that n = 1. This was computed by Itzykson and Zuber [45] obtaining (3g − 3 + n, 0, . . . , 0) g,n = 1 (24) g g! . (A.5) Putting everything together we get the leading power we needed where the dots indicate terms in the polynomial with lower powers of b 1 . This is precisely the relation (A.1) we wanted to prove. The dilaton and string equation prove more useful in order to derive this result, and also to derive subleading terms, than Mirzhakani recursion relation 12 . This can be seen more directly for the case of genus zero g = 0. In this case we can use the explicit formula for the WP volumes found in [37], given by where u JT (x) is the JT gravity specific heat, defined implicitly through When b 1 → ∞ this is approximated by the leading term where the n − 3 derivatives act on the first Bessel function n − 3 times, giving We can efficiently compute the derivatives of u JT (x) with respect to x at x = 0 using the Lagrange inversion theorem. This gives u JT (0) = 2 and we reproduce (A.1) for genus zero.

B Lagrange reversion theorem
In section 3.3 we showed that, at genus zero, all the multi-loop amplitudes of JT gravity with a gas of defects match precisely with the results from a matrix integral. In order to show that we used a theorem, which we explain in more detail here. The Lagrange reversion theorem can be used to resum series which have the following form where f (x) and g(x) are arbitrary functions of x, y is another variable, and g (x) indicates the derivative of g(x) with respect to x. It is useful to introduce the variable v, defined implicitly as a function of x (and the parameter y) through the equation Then the theorem states that the answer for the infinite sum written above is In the main text we applied this theorem with f (x) → J 0 2πα u JT (x) , g(x) → e 1 2γ u JT (x)β , y → λ, and u JT (x) is a given function defined in section 3.3.
When dealing with multiple types of defects we need a slight generalization of this theorem. If we allow a number K of variables and functions y i , f i (x) for i = 1, . . . , K, and we define the variable v implicitly as a function of then we can use the previous theorem to show that for any function g(x). The sum runs over a set of K non-negative integers n i excluding the case where they are all zero. In the main text we applied this with f i (x) → J 0 2πα i u JT (x) , y i → λ i , and K is the total number of defect flavors. This theorem is a simple generalization of the previous one if we call y → y 1 and f (x) →

C Explicit higher genus checks
In this appendix we include some explicit checks that JT gravity with defects is equivalent to a matrix integral at higher genus. To simplify the expressions, we will set γ = 1/2 in this section.
The pure JT gravity has spectral curve y JT (z) = sin(2πz)/(4π). The partition function connected correlator from the matrix model perspective Tr(e −βH ) will be denoted by Z MM g,n (β 1 , . . . , β n ). Define the special cases W 0,1 (z) = −2zy(z) and W 0,2 (z 1 , z 2 ) = (z 1 − z 2 ) −2 . The latter is equivalent to the universal answer presented in (3.31) with the edge of the spectrum E 0 set to zero. The topological recursion relation is where h + h = g and I ∪ I = J denotes a subset of the labels z 2 , . . . z n , and the sum excludes the cases (h = g, I = J) and (h = g, I = J). This form of the recursion applies for a density of states that starts at E = 0 (z = 0). Therefore, when we apply it to our disk density of states for JT gravity plus defects we need to shift E → E + E 0 , before using (C.1). After this shift, we already proved analytically that JT gravity plus defects exactly gives W 0,2 (z 1 , z 2 ) = (z 1 −z 2 ) −2 , which is also necessary in order for the recursion to make sense. Moreover all W 0,n (z 1 , . . . , z n ) can be easily computed exactly from (3.47), and they satisfy the recursion.
The calculation is tedious and we will give the main final results at each order, to show how surprising it is that the gravitational theory with defects satisfies the topological recursion. We introduce some notation first, expanding the following quantities as y(z) = y JT (z) + λ y 1 (z) + λ 2 y 2 (z) + . . . , (C.2) W g,n (z) = W JT g,n (z) + λW g,n,1 (z) + λ 2 W g,n,2 (z) + . . . , (C.3) Z MM g,n (β) = Z JT g,n (β) + λZ MM g,n,1 (β) + λ 2 Z MM g,n,2 (β) + . . . , (C.4) where to ease notation we wrote z = (z 1 , . . . , z n ) and β = (β 1 , . . . , β n ). The leading contributions, which match with pure JT gravity, were computed in [7] and we will not repeat them here. While in this section y's and W 's are defined with respect to the shifted ensembles with edge at E 0 → 0, the quantity Z MM g,n is defined by the ensemble with the edge at E 0 . This is done to be able to directly compare with the gravitational answer (3.10).
The general procedure we apply below is the following. First, we compute the correction to the spectral curve from the defects, and shift the zero-point energy to zero. Second, we insert this result in the topological recursion to compute the correction to W g,n and from it obtain the resolvent correlator. Third, an inverse Laplace transform gives the expectation value of a product of Tr(e −β(H+E 0 ) ). Finally, we multiply this by a factor of e E 0 (β 1 +...+βn) to correct the shift in energy, obtaining the quantity we call Z MM g,n (β 1 , . . . , β n ) above, expand in λ, and compare with the answer from JT gravity with defects order by order in λ.

(C.7)
This is equal to the gravitational JT gravity plus defect calculation, which at this order following (3.10) is given by where we used the explicit form of the WP volumes tabulated by Do in Appendix B of [35].

D The instanton gas theory
In this appendix we will present more details regarding the instanton gas theory, which we define as a 2D dilaton gravity with a specific potential originating from summing over defects. We will analyze the semiclassical thermodynamics and match it with the high energy limit of JT gravity with defects, as a basic check of the equivalence between the two theories. As explained in section 5.5, by formally summing defects as insertions in the path integral, we obtain a dilaton gravity theory with action and potential This theory emerges from integrating out the species of defects with angle α i and coupling λ i , with i = 1, . . . , N F . Here we will study the case of a single species with parameters α and λ.
To analyze this theory in the semiclassical limit it is convenient to introduce the coupling Λ ≡ (2π(1 − α)) 2 λ. The the potential can be written as 3) The potential approached the JT gravity one for large φ as long as α < 1, which is expected since otherwise we get an instability driven by the proliferation of instantons towards the asymptotic boundary where φ → ∞.
We will here simply analyze the dilaton model at the classical level. The model then only depends nontrivially on Λ, as can be seen by rewriting the action with a rescaled dilatoñ φ = 2π(1 − α)φ: The model will dependen nontrivially on α and Λ independently once quantum corrections are taken into account. It is interesting to note from this that 1 − α plays the role of , so α → 1 is a natural classical limit to study. Now, we will describe the classical thermodynamics of the model following [80,82]. First, we describe the qualitative features of the potential, which determine the classical stability. There are three different parameter regimes, shown in figure 3. For Λ < 0, U is decreasing, so has a single zero. For Λ > 0, the potential U has a minimum at φ min = log Λ 2π(1 − α) , U (φ min ) = log Λ + 1 π(1 − α) (D. 6) For Λ larger than a critical value, this minimum is positive, so for Λ > Λ c the potential does not have any zeros. For Λ < Λ c , the largest zero of U is at where W is the Lambert function or product log. For 0 < Λ < Λ c there is a second zero, and the potential increases exponentially as φ → −∞. The classical Euclidean solutions of the theory are uniquely determined by the minimum value φ h of the dilaton, as where we have chosen the gauge φ = r, and φ > φ h . This gives a Euclidean metric as long as f (φ) is always positive, so we require For Λ < 0, our solutions correspond to φ h > φ 0 . For 0 < Λ < Λ c , we have one branch of solutions for φ h > φ 0 , but also a second branch for sufficiently negative φ h . For Λ > Λ c we have solutions for all φ h . Now recall our boundary conditions at the asymptotic boundary with large positive dilaton and where β is the period of the t coordinate. The proper length of the boundary (at large r) is L ∂ = βγ −1 f (φ ∂ ) ∼ βγ −1 φ ∂ , so we have chosen the correct normalization of the t coordinate. The temperature is determined by smoothness at the origin, where f (r) ∼ U (r h )(r − r h ); if we write r − r h ∼ U (r h ) 4 ρ 2 our metric goes like dρ 2 + ρ 2 d( U (r h ) 2γ t) 2 , so β = 4πγ U (r h ) . The entropy is given by the value of φ h , and the energy is read off from the constant term when we expand f at infinity. Putting this together, our thermodynamic quantities are given by and it is manifest that we have the expected relation dE = T dS. As a rudimentary comparison between the dilaton model and the defects, we now compare the thermodynamics to linear order in Λ with the effect of a single defect. We note that the result will not only apply for small Λ, but also at sufficiently large energy that the exponential term in the potential is a small correction.
To do this, write φ h = √ 2γE + O(Λ), where the term of order Λ is chosen such that the energy remains fixed at E to order Λ. From this, we read off the first order variation in the entropy from including the exponential term in the potential: Now, from the defects we find the variation in the entropy by taking the logarithm of the density of states (3.18) including a single defect: where we have taken γE 1 so that we can expect the classical thermodynamics to be applicable. The two results match as a function of energy, and give us relation Λ = (2π(1 − α)) 2 λ (D. 17) between the parameters in the defect calculations and the dilaton potential.