The Canonical Ensemble Reloaded: The Complex-Stability of Euclidean quantum gravity for Black Holes in a Box

We revisit the stability of black hole saddles for the Euclidean path integral describing the canonical partition function $Z(\beta)$ for gravity inside a spherical reflecting cavity. The boundary condition at the cavity wall couples the transverse-traceless (TT) and pure-trace modes that are traditionally used to describe fluctuations about Euclidean Schwarzschild black holes in infinite-volume asymptotically flat and asymototically AdS spacetimes. This coupling obstructs the familiar Gibbons-Hawking-Perry treatment of the conformal factor problem, as Wick rotation of the pure-trace modes would require that the TT modes be rotated as well. The coupling also leads to complex eigenvalues for the \L operator. We nevertheless find that the \L operator can be diagonalized in the space of coupled modes. This observation allows the eigenmodes to define a natural generalization of the pure-trace Wick-rotation recipe used in infinite volume, with the result that a mode with eigenvalue $\lambda$ is stable when ${\rm Re}\,\lambda>0$. In any cavity, and with any cosmological constant $\Lambda \le 0$, we show this recipe to reproduce the expectation from black hole thermodynamics that large Euclidean black holes define stable saddles while the saddles defined by small Euclidean black holes are unstable.


Introduction
Gibbons and Hawking [1] argued long ago that gravitational partition functions Zpβq are naturally described by Euclidean path integrals. Such integrals can be evaluated in the semiclassical approximation using saddle points associated with Euclidean black holes. The behavior of the action under small fluctuations indicates stability or instability of these saddles and determines which saddles are relevant to a given computation.
Unfortunately, due to the conformal factor problem, the Euclidean gravitational action is unbounded below. This prevents one from taking the integral over all Euclidean metrics as a definition of the problem to be studied. Many authors [2][3][4][5][6][7][8][9][10] have argued that the fundamental definition should instead be made in Lorentz signature, with implications for Euclidean path integrals determined by further careful study. While we are deeply sympathetic to this point of view, it has not yet led to a useful recipe to determine the stability of general Euclidean saddles.
As a result, past work has sometimes simply proposed a defining contour in particular contexts and then checked that it yields physically sensible results. In particular, for path integrals that compute partition functions in the canonical ensemble in asymptotically flat or asymptotically AdS spacetimes, it was suggested in [11] that the conformal factor should be integrated over a contour parallel to the imaginary axis while the conformal metric should be integrated over real values. This recipe has a mathematical elegance and has the important property that black holes saddles for the canonical partition function are unstable when they have negative specific heat and when the above classes of perturbations can be decoupled (see [12] for the asymptotically AdS context and section 4.3 of [13] for a more general argument; in the latter case it is generally clear that the associated negative-action deformation preserves the determinant of the metric and thus remains a physical negative mode after the above Wick rotation).
At the level of linearized fluctuations about saddles, this recipe is easiest to implement by first decomposing the Euclidean-signature perturbations into pure-trace, transverse-traceless (TT), and pure-gauge modes. The proposal then implies that one should integrate the Euclidean pure-trace modes over imaginary field values while integrating transverse-traceless modes over the real contour. Since pure-gauge modes do not change the action, the particular contour chosen for such modes will not affect the result and can be chosen to help preserve boundary conditions not discussed in detail in [11].
Mode stability in this approach is often discussed by noting (see e.g. [14]) that the quadratic action for perturbations h about a saddleĝ ab may be written as an expectation value S p2q rhs " ph, Lhq is the inner product defined by the DeWitt´1 metric 1 G ab cd " 1 2`ĝ acĝbd`ĝadĝbc´ĝabĝcd˘, (1.1c) 1 It was pointed out by DeWitt [15] that there is a one-parameter family of 'ultralocal' metricŝ G ab cd λ DW " 1 2`ĝ acĝbd`ĝadĝbc`λ DWĝ abĝcdȏ n the space of Riemannian metrics on M. Here we have added the subscript DW to DeWitt's parameter λ to avoid confusion with the eigenvalues we study below. Eq. (1.1c) corresponds to λ DW "´1, or a "´1{2 in the conventions of [14]. We refer to the general such metric as DeWitt λ DW , so (1.1c) is DeWitt´1.
G is Newton's constant and pLhq ab " p∆ L hq ab`2∇pa∇ is the Lichnerowicz operator. In particular, L reduces to the usual Lichnerowicz oper-ator∆ L on perturbations that satisfy the de Donder gauge, i.e.∇ ah ab " 0. The inner product (1.1c) has indefinite signature but, in the above thermodynamic context, Wickrotating the pure-trace modes makes the inner product positive definite while leaving L self-adjoint. Positivity of the Wick-rotated version of (1.1a) is thus determined by the spectrum of L, with positive eigenvalues of L corresponding to stable modes. In the presence of matter, the pure-trace modes generally couple to matter modes, but by using the approach of [16] analogous coupled modes can often be identified by inspection with correspondingly successful results [17]. See also [18][19][20] in the cosmological context.
We will be interested below in a more complicated situation that occurs when one studies gravitational thermodynamics in a finite-sized cavity with fixed boundary metric. As in the case with matter fields, such boundary conditions again couple the pure-trace modes to other modes, which in this case are TT gravitational modes. This coupling is described in detail in section 3.1, but it should not be surprising: when they are both real, there are particular combinations of pure-trace perturbations and TT perturbations that preserve the induced metric on the cavity wall, even though each piece separately would change the induced metric. But if we Wick rotate the pure trace modes to imaginary values while keeping the TT modes real, then such cancellations cannot occur and the contributions of pure-trace and TT modes to the induced metric would have to vanish independently. Naively Wick rotating the pure-trace modes would thus have the effect of imposing an additional non-physical boundary condition which should be expected to invalidate any results. And since the bulk action is of course the same as in the infinite volume case, the issue is not immediately resolved by following [16].
It thus seems that the contour rotation prescription of [11] must be modified inside a reflecting cavity. As a first step in doing so we note that the DeWitt´1 metricĜ ab cd can still be used to define an operator L via (1.1a). We study this L below and find that it can again be diagonalized, though some of its eigenvalues may be complex 2 . We then use this observation to propose that the pure-trace Wick-rotation recipe from infinite volume be generalized to Wick-rotation of appropriate negative-norm parts of the L eigenmodes. The upshot of our generalization turns out to be that mode stability is again determined by the eigenvalues λ of L, with stable modes having Re λ ą 0. This is in turn equivalent to analyzing stability under Ricci flow (perhaps modified by a cosmological term) as proposed in [14], though that reference did not explicitly discuss either complex eigenvalues or a definite proposal for Wick-rotation.
In either our formulation or that of [14], the critical input lies in giving a preferred status to the DeWitt´1 inner product. From our present point of view, this choice is as ad hoc as the Wick-rotation of pure-trace modes in [1,29]. Nonetheless, its physical viability is demonstrated below by showing (again, in analogy with [12]) that the above recipe reproduces the prediction from black-hole thermodynamics that in any cavity the large and small black hole saddles are respectively stable and unstable.
We begin with general formalism in section 2, describing both the sense in which complex eigenvalues are natural and our proposed Wick-rotation. This section also introduces the particular approach we will take to discretizing our system for numerical investigation, which involves discretizing the system at the level of the action (from which a discrete L operator follows immediately) rather than using the continuum action to define a continuum L (and then attempting to discretize the result). This discussion also refers to some useful properties of the de Donder gauge that are reviewed in appendix A.
This sets the scene for section 3 to study fluctuations around the associated Euclidean black holes in d " 4, 5 spacetime dimensions. In particular, we show there that our proposed Wick-rotation reproduces the thermodynamic stability/instability of large/small black holes. The associated thermodynamic calculations are of a standard form but, since they do not seem to appear in the existing literature for black holes in a reflecting cavity with negative cosmological constant, we provide the details of this analysis in appendix B. We close with some final comments and discussion in section 4. 2 There are active discussions as to whether the full non-linear theory is physically sensible with such Dirichlet boundary conditions; see [21][22][23][24][25] for discussions of mathematical issues and [26] for discussion of more physical issues. However the linearized problem is well-defined in the context we study below. Furthermore, we have verified that following [22,23,27,28] and using instead boundary conditions that fix the conformal metric and the trace of the extrinsic curvature again leads both to couplings between the pure-trace and TT modes and to complex eigenvalues for the Lichnerowicz operator, though we leave a detailed study of such boundary conditions future work.

.1 Wick Rotation and mode stability
It is useful to begin by stating our Wick rotation prescription in very general terms. We thus consider any action 3Š , which is a quadratic function of independent and unconstrained real field variables Q I that is stationary at Q I " 0, and where we will explain the reason for the decorationˇin section 2.2. SettingŠ " 0 at the stationary point we thus haveŠ " where the subscript , IJ denotes the indicated second derivative of the action. We take our action to be real for real Q I , so that the coefficientsŠ ,IJ are real as well. Since our discussion is general, the label I may take either continuous values (as in the problem we wish to study) or discrete values (as in the numerical approximations that we will use in practice). In the latter case ř I , ř IJ represents the appropriate integral and , IJ denotes functional derivatives. The above notation is chosen to match that used in later sections in our study of particular systems.
Our goal will be to investigate positivity of (2.1). However, since we will study Euclidean gravity, the conformal factor problem will ensure that (2.1) is not positive definite for real Q I . We therefore wish to introduce some structure that defines a 'Wick rotation' Q I " ř J W I J R J for some complex matrix W I J and to instead investigate positivity ofŠ for real R usinǧ As foreshadowed in the introduction, we will define our Wick rotation W I J by making use of a (real) metric G IJ on the configuration space, which in practice will be the DeWitt´1 metric or a discrete approximation thereof. Indeed, one property we require (which in some sense justifies the name 'Wick rotation') is that the 'Wick rotated metric' N IJ " 4 It should be noted that generic finite-dimensional matrices can in fact be diagonalized in the above sense. This follows from the fact that generic n-dimensional matrices A have n distinct roots of the characteristic equation detpA´λ1q " 0 and that each distinct root yields a linearly independent eigenvector. As a result, this property is non-trivial only at special points in the parameter space where otherwise-distinct eigenvalues become degenerate. 5 As a simple example, consider the actionŠ " 1 2 pQ 1 q 2`2 pQ 1 qpQ 2 q`3 2 pQ 2 q 2 and the line element ds 2 " G IJ Q I Q J " pQ 1 q 2`3 pQ 1 qpQ 2 q`1 2 pQ 2 q 2 . It is a simple exercise to show that the eigenvalues of (2.4) are λ " 5 14˘i ? 3 result yields ř J L I J pv J q˚" λ˚pv I q˚. In particular, complex eigenvalues require complex eigenvectors v, v˚from which we can form the real linear combinations Repvq " v`v2 and Impvq " v´v2 i . When the eigenvalues of L I J are non-degenerate, our Wick rotation will be defined to act in a simple way on the associated eigenspaces. It is convenient to state this definition by noting that any eigenvalue λ can be associated with an eigenvector v that satisfies the normalization condition pv, v˚q " 1 " pv˚, vq. (2.9) Indeed, given an arbitrary eigenvector V we may define α " a pV˚, V qq so that the rescaled eigenvector v " α´1V satisfies (2.9). Here we use the fact that combining the non-degeneracy of the spectrum with the non-degeneracy of the inner product requires α to be non-zero.
When λ is real, v˚corresponds to the same eigenvalue, so non-degeneracy of the spectrum and Hermiticity of the inner product requires v˚to be v times a phase. The condition (2.9) then also requires pv, vq "˘1. This sign is not a convention, but a statement of whether the given eigenmode has positive or negative norm.
The convention (2.9) gives a certain preferred status to the real and imaginary parts Repvq, Impvq. In particular, for λ ‰ λ˚one finds the following inner products: Note that more generally one finds pRepvq, Impvqq " 1 2 Impv˚, vq. Up to a choice of overall scale we thus see that requiring orthogonality of Repvq, Impvq is equivalent to imposing pv, v˚q "˘1, and choosing the positive sign imposes the convention that Repvq is the positive-norm member of the pair Repvq, Impvq while Impvq is the negative norm member.
In this context we define W I J by the following properties: 1. W I J leaves invariant any eigenvector with real eigenvalue λ and positive norm pv, vq.

Further issues and a comment on numerics
Our discussion above was cleanly presented in terms of an actionŠ that was a quadratic function of independent and unconstrained field variables Q I . However, the form in which gravitational systems are typically presented is not quite so clean. One issue is that, because spacetime is continuous, a good gravitational variational principle will generally require certain boundary conditions that constrain what would otherwise be independent values of the Q I . At first glance this is a minor issue that should affect only our choice of notation. We use the somewhat awkward notation r Q r I to denote a naive set of field variables on which boundary conditions have not yet been imposed, and we reserve Q I for the remaining independent variables after the constraints defined by such boundary conditions have been solved. Since we study linearized theories, the boundary conditions are also linear and explicit such solutions are always possible.
However, due to the need to impose boundary conditions, and in order to develop a practical formalism that can be applied to very general situations, when it comes time to study our system numerically we will find it prudent to depart somewhat from the traditional approach of [12][13][14][29][30][31][32][33][34]. That approach would use the continuum action to construct a continuum differential operator L, after which the boundary conditions could be used to define an appropriate discretization of this operator. However, this discretization is not unique, and may not interact cleanly with the discretization of other structures such as the metric G.
For this reason, we instead choose to first discretize the fields Q that solve the boundary conditions, the actionŠ, and the chosen metric G. Using the discretizedŠ, G to define L via (2.4) then guarantees that the properties described in section 2.1 hold exactly, or at least up to the numerical accuracy with which the resulting algebraic equations have been solved. While this is a minor issue for the current paper, we have found it to be extremely useful in studying the more general boundary conditions that we will consider in [35]. This is the comment on our numerical approach advertised in the title of this subsection A second issue is that gravitational systems have a gauge symmetry, so that different Q I are generally not physically independent. While such physical independence was not strictly required in our treatment above, its lack means that -even after discretization -general physical parameters might not lead to non-degeracy of the spectrum of L. Indeed, gauge invariance means that there are modes ξ I which we may use to shift any Q I without changing the value of the action; i.e., the action is the same for all Q I` ξ I , independent of the value of . For gravity we may take ξ I real, so that for real Q I we may differentiate the above result with respect to to find pQ, Lξq " 0 for all Q. And since the inner product is non-degenerate, this would require each pure gauge mode ξ I to be a zero-eigenvalue eigenvector of L, leading to a highly degenerate spectrum.
While this is rightly considered a mere technical issue, it is one that we will wish to avoid. As usual, one can do so by fixing a gauge. The de Donder gauge ∇ a h ab´1 2 ∇ b h " 0 is a common choice. At the conceptual level we will also make this choice, though with certain technical modifications as discussed below.
As reviewed in appendix A, the time-component of the de Donder gauge condition is straightforward to implement in our context. Indeed, doing so corresponds merely to setting a certain component of the metric to zero. But the radial component will also be non-trivial in our context. While it can also be solved, inserting the solution into the action leads to a higher-derivative action that is more complicated to study.
We thus avoid imposing this last condition explicitly (except at the cavity wall where it use it as an additional boundary condition). Instead, we will call the quadratic gravitational action I (with no check (ˇ)), and we will define a new actioň to be used in our numerics by adding an additional quadratic term ř IJ K IJ Q I Q J that explicitly breaks gauge invariance but which has no effect on modes that satisfy the de Donder condition. That is to say, we require ř IJ K I Q I " 0 when Q I satisfies the de Donder condition. In our gravitational problem, it is the operator L defined by the modified action (2.12) that turns out to be usual Lichnerowicz operator in the bulk.
While one could in principle use any gauge condition in the above way, the de Donder gauge has a particularly elegant property for this purpose. To explain this properly, let us use V to denote the space of all pure-gauge modes. Then as also reviewed in appendix A, as defined by the DeWitt´1 inner product, in our context the orthogonal complement V K of V consists precisely of perturbations satisfying the de Donder gauge. To see the utility of this property, recall that following the strategy outlined in section 2.1 means that we study eigenvalues of a self-adjoint operator L. And since the action of this operator on any de Donder gauge mode is the same as that defined by gauge-fixing the theory, this L must have eigenmodes that satisfy the de Donder gauge and which in fact span V K . The above orthogonality then means that any eigenmode will either lie in V K or in V ; i.e., the eigenmodes will sort themselves cleanly into "physical" de Donder gauge modes and pure-gauge modes.
In particular, recall that (as reviewed in appendix A) any mode can be uniquely decomposed into a pure-gauge mode and a mode that satisfies the de Donder gauge. Since the addition of a pure-gauge mode leaves the original S invariant, if this action has a negative mode then it must in fact have a negative mode that satisfies the de Donder gauge 6 . But since the two actions agree on such modes, this would also provide a negative mode for the modified actionŠ. It follows that establishing positivity ofŠ will also establish positivity of the original action S under physical perturbations.
With these details in hand, we are now ready to analyze our gravitational system.

Fluctuations about the d " 4, 5 Euclidean Schwarzschild(-AdS) black hole in a reflecting cavity
We now turn to the details of mode stability for Euclidean Schwarzschild-AdS black holes in reflecting cavities. We introduce notation and conventions for the metric and for time-independent spherical perturbations in section 3.1 and provide brief comments on numerical methods in section 3.2. Results regarding eigenvalues and eigenvectors are then presented in section 3.3.

Linearized modes
Euclidean AdS-Schwarzschld black hole solutions in a spherical cavity are just those parts of the usual Euclidean Schwarzschild-AdS spacetimes that lie within the cavity walls. We will work in Schwarzschild coordinates, where the Euclidean Schwarzschild-AdS line element reads with dΩ 2 n the metric on a unit radius round n´sphere, with f prq " r 2 2`1´´rr¯d´3ˆr 2 2`1˙.

(3.2)
and where is the AdS length scale, related to the cosmological constant Λ via The black hole event horizon is located at r " r`, where f prq vanishes linearly. We take τ to be a periodic coordinate with τ " τ`β˚, and to avoid a conical singularity at r " r`, we must have This fixes r`as a function of β˚. Note that β˚is not the physical inverse temperature as measured at the cavity wall, as such walls have not yet been introduced. But in any case we will find it more convenient to describe results in terms of r`below.
The detailed thermodynamics of such solutions in a cavity of radius r 0 are described in appendix B. As usual, for a given box size there are both 'large' and 'small' branches of the space of black hole solutions, with the large/small black holes being thermodynamically stable/unstable and with the boundary between the two branches given by (B.11). The calculations are standard, and we will use (B.11) below.
Since the background metric is spherically symmetric, we can take advantage of its SOpd´1q symmetry group and expand perturbations in terms of spherical harmonics. These harmonics come in three classes: scalar-derived gravitational perturbations, vector-derived gravitational perturbations and tensor-derived gravitational perturbations, with all of these being mutually orthogonal with respect to any DeWitt inner product. Furthermore, we expect modes with non-zero angular momentum to have larger values of Re λ, so we will study in detail only perturbations with zero angular momentum.
For zero angular momentum the vector-derived and tensor-derived modes are pure gauge and thus leave the action invariant. When the cavity walls taken to infinity, adding angular momentum is known to increase the eigenvalues of the Lichnerowicz operator [36]. Assuming that this result continues to hold in the presence of a finiteradius spherical wall, all vector-and tensor-derived modes will necessarily have positive Euclidean action after applying the Wick rotation of section 2.1. We reserve a careful check of this assumption for future work.
We are thus left with scalar perturbations. Scalar perturbations depend on a single quantum number S ě 0 and, as described above, modes with S " 0 will have the smallest Re λ eigenvalue λ. We will therefore focus on such modes.
Recalling that we restrict discussion to time-independent geometries, these S " 0 perturbations have exactly the same symmetries as the background geometry. Furthermore, as reviewed in appendix A, imposing the τ -component of the de Donder gauge condition sets the rτ component of the perturbation to zero everywhere. As a result, our perturbations take the form The action (1.1a) is readily evaluated on such perturbations. However, as described in section 2.2 we in fact wish to modify this action by adding a term that breaks gauge invariance. In particular, a standard argument shows that using the DeWitt´1 metric the space V 1K described in section 2.2 is just the space of perturbations that satisfy the de Donder gauge. As a result, we may take the additional K term in (2.12) to be given by ph, r hq with r h ab "´2∇ pa∇ ph bqp , so that the modified action is jusť evaluated on the perturbed line element (3.5). The results may be writteň where Ω d´2 is the volume of the metric on a unit radius round pd´2q´sphere, q " taprq, bprq, cprqu, the operation¨denotes the standard Cartesian inner product in Euclidean space defined by the Kronecker delta metric δ r I, r J , and P and V are symmetric matrices with the following independent components P 11 " P 22 "´1 , P 12 " 1 , P 13 " P 23 " d´2 , and P 33 " pd´4qpd´2q . (3.8) and Note in particular that neither P nor V are positive definite. This is to be expected, since we know that pure trace deformations (in the infinite cavity limit) will have a negative contribution to the Euclidean action.
In the infinite cavity limit, the trace modes and the traceless-tranverse modes decouple. For this reason, we can then Wick rotate the trace modes freely. However, in the presence of a cavity they couple. Let us see this more explicitly. We begin by separating the trace and trace-free parts of the metric by writing However, in the canonical ensemble, perturbations must preserve the induced metric on the cavity walls (located at r " r 0 ). This amounts to imposing apr 0 q " cpr 0 q " 0 , (3.11) or ppr 0 q "´dĉpr 0 q and ppr 0 q " d d´1b pr 0 q. (3.12) Furthermore, at least with the symmetries imposed above, the part of this boundary condition that fixed the proper length of the Euclidean time circle at the value of r where the sphere has radius r 0 is invariant under all diffeomorphisms, and is thus unaffected by the pure gauge modes 7 . Yet it is clear from (3.12) that the effect of any pure trace mode on the boundary conditions can be compensated by turning on a non-trace mode with appropriateĉpr 0 q,bpr 0 q proportional to ppr 0 q, and with real proportionality constants. As a result, when p,ĉ,b all take real values, there are allowed perturbations of p with ppr 0 q ‰ 0. But if we were to Wick rotate the contour of integration for p so that ppr 0 q is imaginary while keeping the TT modes real, the (real) boundary conditions (3.12) would require ppr 0 q and the corresponding boundary values of the TT modes to vanish separately 8 . This would amount to imposing at least one extra boundary condition which, in particular, has no analogue in any real-time version of the system. Such a condition would be highly suspect, and strongly motivates us to explore other proposals for defining the contour of integration such as that proposed in section 2.
One can make the issue more concrete by choosing a gauge. Let us consider in particular the de Donder gauge condition This gives a first order differential equation that involvesb,b 1 ,ĉ andp 1 which can be readily solved forĉ: 7 This is the key difference between finite r 0 and removing the cavity by taking r 0 " 8. As is well known, with asymptotically AdS boundary conditions the conformal rescaling of the boundary metric induced by any pure-trace mode can be compensated by a diffeomorphism. 8 Whileb andĉ can both be affected by pure-gauge modes, as described above there must be a gauge-invariant combination. This combination is necessarily real due to the underlying reality of the physical system.

The boundary conditions then becomê
For p,b real, these define two boundary conditions as desired. But for p imaginary and b real, (3.15) can be satisfied only if the real and imaginary parts vanish separately, effectively imposing four boundary conditions, which is two more than one would find in any Lorentz-signature analogue of the problem.

A small interlude on numerical methods
A standard approach to minimizing the action Eq. (3.7) is to use an operator approach.
In such an approach, one does not work directly with the action, but instead studies the auxiliary problem with h chosen to satisfy the de Donder gauge. One then discretizes∆ L on a numerical grid and studies the resulting eigenvalues. As advertised in section 2.2, we will proceed differently here by discretizing the action (3.7) directly and then using the result to define a discretized Lichnerowicz operator. Again, this allows us to easily incorporate complicated boundary conditions. We will find this to be particularly useful when we study the microcanonical ensemble [37]. We have checked that our action-based approach reproduces known results from the operator approach (including all that were reported in [14]).
Numerically, it is useful to work with a compact coordinate y P r0, 1s defined as so that the horizon is located at y " 0 and the cavity walls at y " 1. It is in these coordinates that we introduce a grid with N`1 discrete points. In this work, we will use spectral collocation methods on Gauss-Lobatto collocation points defined in terms of the coordinate y 9 . For the case at hand these are simply defined as Let gpyq be a function, whose derivative we want to compute on the grid ty i u. Let Dg be our approximation to the derivative of g on the grid points ty i u. It turns out that Dg can be computed via matrix multiplication Dg " D¨g, with g i " gpy i q. Explicit expressions for the components of D can be found for instance in [38]. Integration also is implemented by a similar linear operator, which can be taken to be given by the formulae in [39].
Using this approach, one can write a discretization of the action in the form where the factor of 3 in 3pN`1q is a result of the fact that we take r Q r I " ta, b, cu with a, b and c being respectively discretized versions of a, b and c.
As in section 2.2, the tilde on r Q indicates that we have not yet imposed boundary conditions. At the cavity walls we demand ap1q " cp1q " 0, since we want the period of the time circle to remain unchanged, as well as the size of the S d´2 sphere. At the horizon, we demand regularity, which in y coordinates amounts to ap0q " bp0q, a 1 p0q " b 1 p0q " c 1 p0q " 0. It might appear that we are missing a boundary condition for b at the cavity wall y " 1. However, this may be resolved by imposing the de Donder gauge condition at this one point. Doing so turns out to yield a Robin boundary condition We now discretize these boundary conditions using the scheme described above. For instance, the Neumann boundary condition for a will appear as D N`1¨a " 0. We then use the boundary conditions to reduce Eq. (3.19) to a function of the degrees of freedom that remain unconstrained after imposing the boundary conditions. In particular, we set a N`1 " b N`1 , solve D N`1¨a " 0, D N`1¨b " 0 and D N`1¨c " 0 with respect to a N , b N`1 and c N`1 , respectively. At the cavity, we solve with respect to a 1 , b 1 and c 1 . Once these conditions are imposed, the sum in (3.19) may be rewritten so that it sums only over the remaining unconstrained components Q: Because the boundary conditions are homogeneous linear relations, the actionŠ remains a homogeneous quadratic function of the Q I .
As described in section 2, we must now choose a metric G IJ in order to use (2.4) define the linear operator L I J . As advertised in the introduction, in the continuum we choose the DeWitt´1 metric for which where the factor of p32πGq´1 in front is chosen to agree with the conventions of [14]. We now discretize (3.22) by following the same procedure used to discretize the action. The result is of the form where by construction both S ,IJ and G IJ are symmetric in I, J. Finally, we wish to solve for eigenvectors of the L I J defined by (2.4). However, we comment that this is equivalent to the so-called generalized eigenvalue problem ř K δ IK G IJ in terms of the Kronecker delta δ IK and the metric G IJ . Note in particular, since the operatorsL,Ĝ are both self-adjoint with respect to the positive definite metric δ IJ . The point of writing (3.24) is that this formulation of our problem is found in many standard libraries of numerical methods.

Results
Our findings are summarised in Fig. (1), where we plot the dimensionless lowest lying r λ " λ r 2 as a function of y 0 " r 0 {r`and y`" r`{ for d " 4 (left panel) and d " 5 (right panel). In all cases, the mode with smallest Re r λ has real r λ. We also plot the plane r λ " 0 in red, so that it is apparent when the mode becomes positive. The solid black curve in each of the plots is given by Eq. (B.11) and it precisely matches the locus where r λ changes sign. In the limit where y 0 becomes large we recover the results of [12,13,30,[40][41][42]. To our knowledge this work is the first to report the lowest lying mode in AdS at finite y 0 .
We now come to the issue of the norm of the mode underĜ. Any metric perturbation can be decomposed as a sum of a traceless component r h ab and a pure trace part φ: The metricĜ is such that r h ab andĝ ab h are orthogonal to each other. That is to say r h abĜ ab cdĝ cd " 0 . This, in turn, implies that the norm defined in (2.9) may be written in the form where we have defined It thus follows that positivity of h 2 is equivalent to positivity of (3.28) In Fig. (2) we plot η as a function of y 0 and y`for d " 4 (left panel) and d " 5 (right panel). We see that the norm is positive definite everywhere, so that, according to our rule, we should not Wick rotate. η also reveals another expected result, namely, the fact that the trace mode decouples from the traceless-transverse part of the metric. This is seen in Fig. (2), where we see η approaching unity when the cavity is removed, i.e. y 0 Ñ`8.
Having established that the Schwarzschild AdS black hole is unstable whenever the lowest lying mode is negative, we turn turn to the issue of the details of the spectrum.
For simplicity, we start by studying the case with y`" 0, i.e. the case with a vanishing cosmological constant, and we restrict to excited modes (i.e., we leave aside the lowest-lying mode that we have already studied). In Fig. 3 we plot the eigenvalues corresponding to the first twenty excited modes as a function of y 0 . The colour coding is as follows: green triangles are non-gauge modes with complex eigenvalues; blue diamonds are non-gauge modes with negative norm underĜ; red squares are nongauge modes with positive norm underĜ and the black disks are pure gauge modes. Modes are classified as gauge vs. non-gauge by comparing the modified actionŠ p2q to the original action S p2q , with vanishing of the latter (to numerical precision) indicating a gauge-mode while for non-gauge modes the values agree. As a consistency check, we also verify that the non-gauge modes are precisely those that satisfy the De Donder gauge condition as expected.
In the left column of Fig. 3 we plot the real part of the eigenvalues, and on the right column we plot the absolute value of the imaginary part of the complex eigenvalues using a logarithmic scale. The top row has d " 4, while the bottom row has d " 5.
The first and most important thing we note is that all excited modes have Re r λ ą 0, thus establishing stability with respect to all excited modes for all y 0 , y`. Again, we remind the reader that this sets aside the lowest-lying mode studied earlier.
The second observation is simply that complex modes exist, in the sense that some eigenvalues have non-zero imaginary parts. In fact, because they must come in complex conjugate pairs, the spectrum exhibits bubbles at the edges of which non-gauge modes with positive and negative norms merge together to form a complex mode (which, as described in section 2, always have zero norm). Each green triangle (which denotes data associated with a complex eigenvalue) has a two-fold degeneracy because complex mode appear in conjugate pairs.
We now further address the issue of completeness of the spectrum. We first note that in generic regions of parameter space our numerics yield exactly 3N´4 distinct eigenvalues (here we are counting λ and λ˚as distinct eigenvalues when λ is complex). This is precisely the dimension of the space of all independent unconstrained perturbations Q. As explained in section 2.1, this is sufficient to show that we can construct 3N´4 orthogonal eigenvectors, thus showing that L is digonalizable and that the eigenvectors of L span the full space of perturbations in generic regions of parameter space.
However, one might wonder what happens at the special values of y 0 , y`where the eigenvalues become degenerate, i.e. where a bubbles first forms or where it disappears. For simplicity, we will restrict detailed discussion to the case with vanishing cosmological constant, but we find similar results when Λ ‰ 0. Since the pure gauge modes never become complex, they are absent from this discussion. Let us denote by region I, the range of y 0 where modes are all real. In this region we have negative-norm modes and positive-norm modes. Let denote by region II the range of y 0 where complex modes exist. The question is then what happens to these modes as we cross from region I into region II and vice-versa. We find that, with our normalisation for the complex modes, the limit of the negative-norm eiegenmode from region I agrees to numerical precision with the limit of the imaginary part of the eigenmode from region II, while the limit of the positive-norm eigenmode in region I agrees with the limit of the real part of the complex eigenmode from region II. Furthermore, the limits of the positive-and negative-norm eigenmodes from region I are linearly independent. This means that, as previously advertised, the eigenmodes continue to span the space of all modes even when the eigenvalues become degenerate at the edges of the bubbles. Furthermore, the continuity between these modes in passing from region I to region II ensures that our Wick rotation is well defined throughout the entire parameter space, including the  critical points when the spectrum becomes degenerate. As a typical example, let us investigate the region of moduli space near y 0 « y b " 6.0285 with y`" 0. This corresponds to the region in the top row, right column, of Fig. 3 where the first bubble on the left forms. We use f˘to denote the positive-norm and negative-norm eigenfunctions, respectively, associated with the perturbed metric function a for y 0 À y b . Additionally, let us define f R (f I ) to be the real (imaginary) part of the complex eigenfunction associated with the perturbed metric function a for y 0 Á y b . In Fig. 4 we plot on the left panel f`(blue disks) and f R (orange squares), while on the right panel we plot f´(red diamonds) and f I (purple triangles). We see that lim as claimed in the preceding paragraph.  The blue disks represent f`, defined as the limit of the positive-norm eigenfunction from region I, and the orange squares represent f R , defined as the limit of the real part of the complex eigenfunction (using our normalisation) from region II. Right panel: Two eigenfunctions are plotted as a function of y. The red diamonds represent f´, defined as the limit of the negative-norm eigenfunction from region I, and the purple triangles represent f I , defined as the limit of the imaginary part of the complex eigenfunction (using our normalisation) from region II. Region I is defined as y 0 À y b " 6.0285, while region II is defined as Let us now return to describing general features of the spectrum, this time with a non-zero cosmological constant. Perhaps surprisingly, we find that complex eigenvalues exist for all values of y`, and in particular even if the black hole is very large compared to the AdS scale. However, as we describe below, at large y`a given excitation becomes complex only in a very narrow window of y 0 .
It is computationally challenging to monitor what happens to all the bubbles we found with y`" 0 as we increase y`, so we instead focus on the bubble in d " 4 and d " 5 that starts at the smallest value of y 0 and follow its dependence on y`. This is the bubble associated with the first pair of positive/negative norm excitations. In Fig. 5 we plot the imaginary part (left column) and real part (right column) of the eigenvalues for the first excited mode in the region where r λ is complex. The top row has d " 4, while the bottom row has d " 5. The green horizontal plane on the left column lies at r λ " 0 and is included for illustration purposes only. The mode with Im r λ ą 0 is represented in red, while for Im r λ ă 0 we represent the mode in blue. From this figure it is clear that the width (measured in terms of y 0 ) of the bubble becomes shrinks as we increase y`.
From the behaviour as we increase y`, it might appear that the bubble will disappear altogether at some threshold value of y`. However, we find that this is not the case. Instead, it appears that for any finite value of y`we can find a small bubbles where the given modes becomes complex, though the width of the bubbles becomes incredibly small. In Fig. 6 we plot the real part of r λ (left panel) for d " 4, as a function of y 0 P p1.1, 20q and y`" 2 using the same colour coding as in Fig. 3. Examining the left panel it appears that complex modes do not exist. However, if we zoom in on the region where positive and negative modes appear to cross we see that complex bubbles do exist (right panel) in an incredibly narrow region of y 0 . We have confirmed this picture for values of y`as large as 100.
It would be interesting to explore these structures further in the future. One may expect that more complicated black holes, and in particular those associated with additional free parameters, lead to even more intricate structures.

Discussion & Conclusions
The main point of our work above was to generalize the proposal of Gibbons, Hawking, and Perry for the contour of integration in the path integral describing fluctuations about a saddle in Euclidean quantum gravity. This was motivated by consideration of Euclidean gravity in a reflecting cavity, where boundary conditions couple the puretrace and transverse-traceless (TT) modes, preventing us from Wick-rotating one the former without also Wick-rotating the latter. However, by making use of the DeWitt´1 metric, the quadratic action can still be said to define a linear operator L. When this operator can be diagonalized, its eigenmodes can be used to specify an integration contour that reduces to the Gibbons-Hawking-Perry proposal in their context. The Figure 5: The imaginary part (left column) and the imaginary part (right column) of the first excited mode in a region of y 0 and y`where the mode is complex. The top row has d " 4, while the bottom row has d " 5. The green horizontal plane on the left column sits at r λ " 0 and is just there for illustration purposes. The mode with Im r λ ą 0 is represented in red, while for Im r λ ă 0 we represent the mode in blue.
result is an eigenmode is stable precisely when its eigenvalue λ satisfies Re λ ą 0. We show numerically that L can be diagonalized for cavity fluctuations about Euclidean Schwarzschild-AdS black holes, and that our recipe reproduces the stability/instability of large/small black holes expected from the black hole thermodynamics studied in appendix B. While the proposal thus satisfies an important physical consistency re- and y`" 20. In the right panel we plot the imaginary part of r λ in a magnified description of the region where the first excited non-gauge mode with negative norm crosses the first excited non-gauge mode with positive norm. The colour coding is as follows: green triangles are non-gauge modes with complex eigenvalues; blue diamonds are non-gauge modes with negative norm underĜ; red squares are non-gauge modes with positive norm underĜ and the black disks are pure gauge modes. quirement, it remains somewhat ad hoc. For that reason we describe the proposal as a 'rule of thumb.' Because our L is just the Lichnerowicz operator (or a discretization thereof), the stability condition Re λ ě 0 is precisely the same as that proposed in [14] based on Ricci flow (or a generalization thereof to include a cosmological constant). Indeed, while [14] did not discuss the possibility of complex eigenvalues, when they exist the condition for stability of their flow is again Re λ ě 0.
There are many future directions to explore. In particular, the conjectured generality of our rule of thumb opens up a wide arena of related contexts for the community to investigate. In addition to adding charge, and perhaps rotation, one is also free to consider all manner of cavities (e.g., Schwarzschild black holes in rectangular or ellipsoidal boxes), or perhaps infinite-volume AdS systems with complicated boundary conditions. It would be interesting to check that L remains diagonalizable in all cases, and that our rule of thumb continues to reproduce expectations from black hole ther-modynamics 10 . It also remains to check our assumption that angular momentum does indeed increase Re λ and thus that the vector-and tensor-derived modes are indeed stable, to investigate whether such higher angular momentum modes become complex, and to similarly study modes that break time-translation symmetry. Finally, one would also like to have a more general abstract argument for such agreement along the lines of section section 4.3 of [13], but somehow showing that the negative mode discussed there is not affected by the Wick rotation defined by our rule of thumb.
Perhaps more interesting is the question of whether choosing a different value of the DeWitt parameter λ DW ‰´1 continues to give physically viable results. A priori it would appear that our procedure is well-defined for any λ DW , but since λ DW affects the definition of L it is natural to expect that the stability/instability of large/small black holes will be reproduced for at most one value of λ DW . However, this remains to be checked, and it is worth noting that in the absence of a cavity wall the decoupling of trace and TT perturabtions means that our rule of thumb would yield identical results for all λ DW .
Finally, while the results of our Euclidean analysis seem quite satisfactory, it remains to find a first-principles derivation of our rule of thumb. We expect the Lorentzsignature path integral to provide a useful starting point for such an analysis since, as an oscillatory integral, it should be well-defined in a distributional sense without any Wick rotation. Allowed deformations of the contour of integration for this path integral might then be used to define the correct Euclidean prescription. We hope to at least partially address this issue in future work.
for any one-form ξ a . As usual we define gauge transformations to be such that the tangential projection of ξ a into the cavity wall vanishes. In our case, we also fix the cavity wall to be at the coordinate location r " r 0 . The remaining gauge transformations then have ξ r pr 0 q " 0, so that ξ a vanishes entirely at the cavity wall.
As a result, we refer to perturbations of the form h gauge ab " ∇ a ξ b`∇b ξ a as pure gauge modes whenever ξ a | r"r 0 " 0.
As in the main text, we restrict attention to transformations that preserve explicit spherical symmetry and time-translation symmetry, so that ξ a has only r and τ components and both are independent of τ . We denote the space of such pure gauge modes by V .
It will be useful to understand the space V K of perturbations that are orthogonal to V in the DeWitt´1 inner product. Using (1.1b) and (1.1c), the statement h ab P V K takes the form 0 " 32πGph, g gauge q " where we used the condition ξ a " 0 to drop a potential boundary term. It follows that V K contains precisely those modes that satisfy our boundary conditions and the de Donder condition ∇ a h ab´1 2 ∇ b h " 0. This is an ordinary differential equation for h rτ which we can readily solve where C 1 is a constant of integration. Regularity at the horizon, where f vanishes, thus requires C 1 " 0 and thus h rτ " 0 for all r. This part of the de Donder condition is thus simple to impose analytically. Finally, we would like to show that every perturbation can be written as the sum of a mode in V and a mode in V K , and that in fact this decomposition is unique. The fact that the DeWitt´1 metric is not positive definite means that we cannot simply take this for granted, as complications arise if the induced metric on V is degenerate. To show where we have used the fact that It follows that when r`ě the Euclidean Schwarszschild-AdS solution has lower Euclidean action than thermal AdS and is thus the preferred phase [46]. This corresponds to β˚ď β HP " 2π d´2 . (B.7) and marks the onset of the so-called Hawking-Page transition. Note in particular that β ‹ ą β HP , so that when the Hawking page transition takes place, the black hole is large and has positive specific heat. It is also not a coincidence that β star matches the maximum value of β˚(at which the large and small Euclidean Schwarzschild-AdS black holes coincide). In the flat space limit, when Ñ`8, the Euclidean Schwarzschild black hole always has negative specific heat and the Hawking-Page transition never occurs.

B.2 Inside a spherical box
We now analyze the same issues for Schwarzschild-AdS black holes inside a spherical reflecting cavity on which the induced metric is held fixed. We take the area-radius of the cavity to be r " r 0 . As in flat space [47][48][49][50][51], the cavity has an effect on the thermodynamics of the system. In particular, Eq. (3.4) expressing the relation between β˚and r`is now affected by the red-shift of the cavity walls For each value of β˚, there are again two distinct black solutions, corresponding to small and large black holes. We will refrain from present explicit expressions in terms of r, as For numerical purposes it is more useful for introduce a compact coordinate y, so that y " 0 is the Euclidean horizon and y " 1 is the location of the cavity. In particular, we define [14] r " r1´´1´rr 0¯y , so that y " r 0 r r´rr 0´r`, (B.9) with y P p0, 1q. It is also useful to introduce dimensionless quantities y 0 " r 0 r`a nd y`" r` , (B.10) so that we recover the vanishing cosmological constant case for y`Ñ 0.
We can now use these dimensionless quantities to investigate the boundary between large and small black holes. This is also the boundary that we expect to divide regions of moduli space with positive and negative values of r λ. The expression marking this boundary reads Note that when y 0 Ñ`8 we recover Eq. (B.3). Furthermore, inside a cavity, even when Ñ`8 (and thus y`Ñ 0), there are distinct large and small black hole branches which merge when (B.12) The above result has been also derived in [52], where a detailed analysis of the negative mode of a Schwarzschild black hole inside a cavity has been performed across a number of spacetime dimensions. For d " 4, we recover the well known result y ‹ 0 " 3{2 [49]. We shall see that our numerical results in the canonical ensemble are in perfect agreement with the fact that the solutions are thermodynamically stable iff y`ă y ‹ . This is certainly not a surprise given the by now very well established relation between the existence of negative modes with grand canonical ensemble boundary conditions and local thermodynamic stability [13,53,54].