A proposal for 3d quantum gravity and its bulk factorization

Recent progress in AdS/CFT has provided a good understanding of how the bulk spacetime is encoded in the entanglement structure of the boundary CFT. However, little is known about how spacetime emerges directly from the bulk quantum theory. We address this question in an effective 3d quantum theory of pure gravity, which describes the high temperature regime of a holographic CFT. This theory can be viewed as a $q$-deformation and dimensional uplift of JT gravity. Using this model, we show that the Bekenstein-Hawking entropy of a two-sided black hole equals the bulk entanglement entropy of gravitational edge modes. In the conventional Chern-Simons description, these black holes correspond to Wilson lines in representations of $\PSL(2,\mathbb{R})\otimes \PSL(2,\mathbb{R}) $. We show that the correct calculation of gravitational entropy suggests we should interpret the bulk theory as an extended topological quantum field theory associated to the quantum semi-group $\SL^+_{q}(2,\mathbb{R})\otimes \SL^+_{q}(2,\mathbb{R})$. Our calculation suggests an effective description of bulk microstates in terms of collective, anyonic degrees of freedom whose entanglement leads to the emergence of the bulk spacetime.


Introduction
In recent years, various lines of investigation have led to the suggestion that black hole entropy arises from the entanglement of spacetime [1][2][3][4][5]. The paradigmatic example supporting this idea comes from the AdS/CFT correspondence [6,7], which implies that the two-sided AdS Schwarzschild black hole is dual to an entangled thermofield double (TFD) state of two CFTs living at the disconnected asymptotic boundaries. In this scenario, the Bekenstein-Hawking entropy of the two-sided black hole, given by one quarter of the area of the bifurcation surface, is identified with the entanglement entropy of the TFD state [3]. Moreover, the Ryu-Takayanagi formula generalizes this identification to boundaryanchored extremal surfaces inside a general asymptotically AdS spacetime. In this case, the area of the extremal surface is dual to the entanglement entropy of spatial subregions of the boundary theory [8]. This relation between bulk areas and boundary entanglement entropy is one of the key evidences underpinning the idea that entanglement is responsible for the emergence of a smooth, connected bulk spacetime.
We would like to understand bulk emergence directly from the entanglement of the bulk gravitational theory. For example, in the case of the two-sided black hole, we expect that a single connected bulk geometry can be equivalently described by an entangled sum of one-sided bulk geometries: 1 this is a bulk manifestation of the ER=EPR paradigm [9]. However, this appealing picture is difficult to verify because it requires a formulation of the bulk gravity Hilbert space as well as its factorization into subregion Hilbert spaces. The former would seem to require solving the bulk string theory, while the latter is difficult to define, even in principle, because the classical notion of a spacetime subregion does not exist in quantum gravity. We must therefore search for a more fundamental quantum mechanical concept replacing the notion of a subregion.
A useful starting point for a bottom-up approach to this problem is provided by three-dimensional pure gravity with a negative cosmological constant. Here there are black hole solutions even though the bulk degrees of freedom are topological [10]. In particular, the classical bulk theory can be described by PSL(2, R)× PSL(2, R) Chern-Simons theory [11,12]. For compact gauge groups, the factorization of Chern-Simons theory into subregion Hilbert spaces is well-understood, leading to a well-defined notion of entanglement entropy [13]. Therefore we might hope that the Chern-Simons formulation of 3d gravity in the presence of a two-sided black hole will allow a Hilbert space factorization that leads to an entanglement entropy consistent with the Bekenstein-Hawking entropy. 2 To motivate the concepts advocated in this work, consider the bulk Hilbert space H gauge bulk for a pure gauge theory coupled to the fixed background of a two-sided black hole. As shown in the left of Figure 1, the presence of a Wilson line operator W bulk crossing the Einstein-Rosen (ER) bridge obstructs a naive factorization of H gauge bulk into two factors corresponding to the left and right wedge. To split the Wilson line, we must introduce edge modes, i.e. charged objects on which Wilson lines in any representation can end in a gauge-invariant way. As discussed in [15], these charged objects must exist in the microscopic bulk theory, given that the dual CFT does factorize into a tensor product of left and right factors. However, in the low-energy effective field theory these charges are confined : they are entangled to form a singlet under an edge mode symmetry G S . Explicitly, this singlet condition refers to the factorization of the bulk Wilson line, in which the edge mode indices a are always contracted. Formally, the factorization map (1.1) defines a co-product on the Hopf algebra of functions on the gauge group. From the point of view of the low-energy effective field theory, it defines a map into an extended Hilbert space: see e.g. [16][17][18][19][20][21] for a sampling of work describing this construction in various contexts. We would like to generalize this gauge theory set-up to factorize the bulk quantum gravity Hilbert space. This is heuristically depicted on the right of Figure 1 as an entangled sum of one-sided geometries. The essential conceptual shift required in quantum gravity is that rather than factorizing a Wilson line inserted on top of a fixed background, we want to split the Wilson line that makes up the spacetime itself. In this context, W bulk represents the wavefunction of a quantum state defining a two-sided bulk geometry.
Our technical approach will be to take inspiration from 2d JT gravity as a BF gauge theory, and then generalize this to 3d pure gravity and its analogous 3d Chern-Simsons gauge theoretic formulation. This will allow us to interpret black hole entropy as entanglement entropy.
Summary and outline. We begin in Section 2 by defining a model of 3d gravity in which the question of bulk factorization can be addressed. There is a long history and an ongoing debate about how to properly define 3d quantum gravity [22][23][24][25][26]. Drawing inspiration from similar approaches to 2d JT gravity, we will define an effective quantum theory of 3d gravity that describes a universal sector relevant for 3d black holes at sufficiently high temperature. From the boundary point of view, this is a theory of "vacuum Virasoro blocks in the dual channel": Z(β, µ) = |χ 0 (−1/τ )| 2 = +∞ 0 dp + dp − S 0 p+ S 0 p− χ p+ (τ )χ p− (τ ) . (1.2) In this sense it is similar in spirit to [24], with a modified boundary condition at infinity that fixes the periodicity along the temporal cycle. The bulk theory involves a sum over (off-shell) black holes of different mass and spin, but does not include a sum over their modular images since we have a distinguished temporal cycle. As a result this is a non-modular invariant theory, dual to a tensor product of chiral and anti-chiral CFTs living at the asymptotic boundary. This theory can be independently derived from gravitational path integral considerations. Our model reproduces existing results for JT gravity, but extends it away from (near-)extremality. In fact, we identify a double scaling limit in which the contribution from the descendants is subdominant and the above partition function can be approximated by a doubled JT model Our model can also be extended in the presence of boundary operator insertions, as discussed in Appendix A.
In Section 3, we set the stage for the Hilbert space factorization in our introduced 3d gravity model, by reviewing technical aspects of factorization in gauge theory. In more detail, subsection 3.1 focuses on the algebraic aspects of the extended Hilbert space formalism, using 2d YM and BF theories as examples, whereas subsection 3.2 defines the shrinkable boundary condition that is imposed at the entangling surface.
Section 4 then applies this gauge theoretic set of ideas and tools to 2d and 3d gravity. 2d JT gravity can be formulated as a 2d BF gauge theory. Borrowing factorization methods developed for the latter, we show that factorization in gravity can be implemented by introducing edge states at the entangling surface, tagged by SL + (2, R) representation labels for 2d JT gravity. For 3d gravity, we find that consistency with the shrinkable boundary condition leads to a bulk surface (or edge mode) symmetry group given by SL + q (2, R) × SL + q (2, R). The deformation parameter q is related to the cosmological constant as q = e πib 2 through the central charge of the dual CFT c = 1 + 6(b + b −1 ) 2 , which equals 3 2GN in the semi-classical regime. As depicted in the right of Figure 1, factorizing this gravitational Wilson line hence allows for a local splitting of the physical spacetime. If we go in the opposite direction, we are probing the emergence of connected spacetime [4,9] by gluing together the edge states on both sides of the entangling surface. Notice that whereas this picture is readily understood qualitatively from the boundary dual perspective (in e.g. the thermofield double state [4]) where factorization is manifest, it is highly non-trivial to describe this in technical detail in the bulk gravitational language. The charged objects on the entangling surface in 3d gravity are anyons belonging to the representation category Rep(SL + q (2, R) ⊗ SL + q (2, R)), and their quantum dimensions give rise to the Bekenstein-Hawking entropy of the two-sided black hole. 3 Despite the role the Chern-Simons description of 3d gravity plays for us, both technically and inspirationally, we stress the important differences between the gauge theory (CS) and gravity formulations in Section 5. In particular, in subsection 5.1 we embed our gravitational entanglement entropy formula into a broader discussion of entanglement entropy in QFT in curved backgrounds. In subsection 5.2, we borrow results from [28] to give an explicit factorization of Wilson line operators as in (1.1), with the edge modes transforming under a hidden quantum group symmetry. Finally, in subsection 5.3 we show that the gravity path integral excludes conical defect geometries that would ordinarily be included in gauge theory. This ensures the gauge and gravity path integral measures are different and explains why the implementation of the shrinkable boundary condition in gravity forbids the existence of descendants on the entangling surface. The latter is the reason why the bulk entanglement entropy computed in section 4 is finite, matching the Bekenstein-Hawking answer in the semi-classical regime.
Section 6 presents a conceptual abstract framework that is capable of jointly describing the earlier gauge and gravity discussions. Subsection 6.1 motivates a more abstract perspective on these issues by introducing the main concepts behind the axiomatic formulation of extended topological quantum field theories (TQFTs), see e.g. [29], and linking them to the shrinkable boundary condition in subsection 6.2. 2d gauge theories and 3d pure Chern-Simons (CS) with compact gauge group are revisited in appendix D to illustrate this more abstract framework. The application to gravity is described in subsections 6.3 and 6.4. We show our earlier Euclidean path integral calculations are compatible with the categorical formulation of an extended TQFT where different mathematical objects are assigned, through the computation of the euclidean path integral, to different surfaces of each codimension. In particular, the shrinkable boundary condition at the entangling surface appears as an additional TQFT sewing relation, as shown in [30]. Given the relevance of the latter to determine the correct factorization map, edge mode symmetry for 3d gravity and the correct entanglement entropy, it suggests our bulk theory should be interpreted as an extended TQFT associated with the quantum semi-group SL + q (2, R) ⊗ SL + q (2, R). For each chiral copy, we expect this is closely related to the Teichmüller TQFT studied in [31].
In Section 7, we conclude with some different perspectives and suggestive routes for future investigation.
Appendix A provides details on a (doubled) JT limit of the boundary correlators. Appendix B introduces the relevant finite-volume regularization methods to describe the non-compact groups that appear in low dimensional gravitational models, such as JT and 3d gravity. These methods play an important role to interpret our factorization results in section 4. Appendix C provides a brief review on Hopf algebras of functions and their deformation leading to the concept of quantum group and its co-representation that appears in subsection 4.3.5. Finally, Appendix D provides some details on pedagogical examples of extended TQFTs.

Universal model for 3d pure gravity
The first goal of this work is to formulate and interpret a proposal for 3d gravity with negative cosmological constant. Given the success achieved in recent years in 2d JT gravity [32][33][34][35][36], it is natural to reconsider the 3d strategy. We build on the universality of the AdS 3 /CFT 2 correspondence at large temperature to propose a partition function that can be independently reproduced by gravitational path integral considerations choosing adequate boundary conditions. We check this proposal reproduces the 2d JT gravity results and, in fact, extends them at low temperature away from extremality.
However, in most of the literature on this relation, and in particular in the Schwarzian boundary interpretation [34-36, 38, 39], the JT action is found in the spatial (r, ϕ) plane instead, see e.g. [24]. To make such link more apparent, it would hence require a reinterpretation of time versus space. Using the language of 2d CFTs, this requires a modular S-transformation. This will be key in what follows.
In the rest of this section, we explore this idea allowing us to write down explicit expressions to formulate a concrete proposal for 3d gravity, in parallel with the JT proposal. Quite a few expressions that follow are known in some form in the literature; our main goal here is to present the material in a suggestive form, paralleling our understanding of the JT story.

Universality of vacuum character from 2d CFT
First, we motivate our proposal by describing how it is universally encoded in the high-temperature regime of any holographic CFT (with sufficiently sparse low-energy spectrum).
Consider a discrete microscopic unitary realization of the AdS 3 /CFT 2 duality with modular invariant torus partition function where M h,h are integers with M 0,0 = 1. 4 The set of conformal weights is labeled by (h,h), or alternatively, by ∆ = h +h and J = h −h. τ = β 2π (µ + i) is the modular parameter of the boundary torus, β is the inverse temperature, µ is the chemical potential for rotation and is the bulk AdS length. Assume this model only has the Virasoro symmetry and is irrational (we focus on c > 1). The Virasoro characters can be written as (1 − q m ), (2.4) in terms of the left-and right-modular parameters q ≡ e 2πiτ = e β (iµ−1) ,q ≡ e −2πiτ = e − β (iµ+1) . (2.5) The central charge c can be parameterized as where the first equality uses standard Virasoro CFT notation (with c ≥ 25 and hence b ∈ R) and the second equality uses the Brown-Henneaux holographic formula [41], valid in the large c semi-classical regime. Let us evaluate (2.3) at large temperature, i.e. when β/ ∆ gap , with ∆ gap the spectral gap between the vacuum and the first excited primary state (see e.g. [42,43]). Working in the dual channel, observe the ratio goes to zero as β/ ∆ gap . Thus, at large temperature and for a 2d CFT with not too many light primaries (sparse spectrum), the vacuum character in the dual channel dominates the irrational CFT partition function Even if β/ ∆ gap , since we are not taking the c → ∞ limit (with hence c ∼ O(1)), one retains a quantum theory. Our main goal is to argue that the resulting partition function |χ 0 (−1/τ )| 2 , capturing the universal vacuum character in the dual channel of any irrational 2d CFT, makes sense on its own and plays the same role as JT gravity does in 2d. Note the role played by the modular Stransformation. The dominance of the vacuum module is well-known to only contain the gravitational interactions since it isolates the stress tensor (see e.g. [44][45][46]). Here it dominates in the dual channel instead. Notice that, due to the exponential suppression in (2.7), the vacuum still dominates in (2.8) even if β/ ≈ ∆ gap , as long as β(1 + µ 2 )/ is not significantly larger than ∆ gap . 5 Having this in mind, we will rewrite the condition on vacuum dominance as ∆ gap β . (2.9) This observation will be important in subsection 2.5.

Grand canonical partition function
Our proposed partition function, providing a universal description of high-temperature 2d CFT dynamics is: where we parametrized h = p 2 + + Q 2 /4 andh = p 2 − + Q 2 /4, and labeled the characters as such. The RHS has the interpretation as a sum of off-shell (rotating) black hole states labeled by (p + , p − ), with a specific measure ( Figure 2). We will come back to this specific interpretation of the gravitational Hilbert space in subsection 2.4 further on. Using the Virasoro modular S-matrix expression Figure 2: Modular S-transform of the vacuum character leads to a sum (integral) of black hole states. The blue lines are Wilson loops in the interior of the torus. The labels (p + , p − ) correspond to defects that have a hyperbolic holonomy around them (as measured on a spatial ϕ-slice). (2.11) this can be written as a thermal grand-canonical partition function for (primary) states labeled by the quantum numbers (p + , p − ), energy H = p 2 + +p 2 − − 1 12 and angular momentum J = p 2 + − p 2 − . For a fixed choice of p + and p − , one has additionally a thermal partition function of boundary gravitons, by series expanding: There is an analogous expansion for the anti-holomorphic sector, where the integern would label its descendants. The energy and angular momentum quantum numbers of a generic state are hence: (2.14) The density of states in our model (2.12) is continuous, but with no overall IR-divergent volume scaling, which is a result of effectively coarse-graining the microscopics at high temperature. Indeed, our model is a limit of a finite volume boundary partition function (2.3), 6 which can hence never obtain an IR divergent volume scaling. Relatedly, a generic state in this Hilbert space does not have integer spin J. This is neither required nor expected in our case. Indeed, integer spin J is usually required by modular invariance (τ → τ + 1), which is lost when approximating the CFT partition function by the vacuum module in (2.8). It is also not expected since this high-temperature regime is a semi-classical regime, where one expects quantization conditions on quantum numbers to be washed out.
One of the goals in this paper is to directly interpret this thermal entropy (2.15) as a von Neumann entropy at the quantum level. As it stands, its first term equals the classical Shannon entropy of p n,n (p + , p − ), whereas its second term contains the expectation value in this probability distribution of the thermal entropy log (dim q p + dim q p − )p(n)p(n) within each such subsector. Notice the thermal entropy (2.15) contains contributions corresponding to the primaries, and to the descendants at the holographic boundary. The descendants at the asymptotic boundary are not part of what we would call the black hole entropy. They are however part of the total holographic entropy in the system. This distinction becomes mute in the limit of semi-classical gravity (to which we turn next). Again we emphasize all quantities, including the thermal entropy (2.15), are continuous but do not contain any IR divergent volume factor. This observation will turn out to be crucial later on when we interpret S th as entanglement entropy.
In the semi-classical high-temperature regime β/ 1, which for the microscopic 2d CFT requires the combined regime β/ min(1, ∆ gap ), the integral (2.12) is dominated by large values of p + and p − . This allows us to approximate the density factors by exponentials as: which is the Cardy scaling at large conformal weight. Next we need to assess the growth of descendants. For an irrational theory for a fixed level n, the asymptotic large weight counting is just the number of partitions of the level n, scaling as p(n) ∼ e 2π √ n 6 . However, we know from the Cardy scaling that the total number of states in this theory at weight L 0 scales as ρ CFT (L 0 ) ∼ e 2π √ c 6 L0 . The latter rises much faster when c > 1. Explicit expressions for the asymptotic density of primary and descendant states at large weight L 0 can be computed by a more detailed analysis [47,48]: This means primary states massively overwhelm descendant states for any Cardy computation in a Virasoro theory with c > 1, and boundary gravitons in this model are subdominant in the semi-classical regime.
If we additionally take the large c limit (c ∼ GN 1), or b 1, the density of states leads to the thermal entropy matching the Bekenstein-Hawking entropy of rotating BTZ black holes: The interpretation of the BH entropy as the logarithm of the quantum dimension was first observed by H. Verlinde and L. McGough [27]. 7 This set-up can be immediately extended to CFTs with larger symmetry algebras. Indeed, in that same work [27], the matching with the BH entropy was extended to the higher spin case as well. Using the vacuum characters of the W N algebra in the dual channel (as in e.g. [49]), one can reach a similar conclusion. As a final extension, for a boundary SCFT with N = 1 supersymmetry, the dominant hightemperature contribution is likewise immediately written down. Imposing anti-periodicity, respectively periodicity for fermions along the spatial (non-contractible) ϕ-circle, one writes for Z NS (β, µ) and Z NS (β, µ) respectively: 8 +∞ 0 dp + dp − 16 sinh(πbp Both of these have the same semi-classical Bekenstein-Hawking growth of states as in the bosonic gravity model. We emphasize that we do not attempt to find a microscopic model of 3d pure gravity. We are instead aiming for a universal description of 2d irrational CFTs. The result is an effective quantum mechanical model (2.12), playing a similar role as JT gravity in 1+1d.

Proposal for 3d pure gravity
Next we present an independent argument where we directly derive the partition function (2.10) from the pure 3d gravitational path integral. So let us instead start with asymptotically AdS 2+1d pure gravity with Euclidean action 7 They derive this entropy by applying the formulas of topological entanglement entropy as log(Sp + 0 Sp − 0 ) to the irrational Virasoro case. A subtlety is that one needs to ad hoc use instead S 0 p ± for this identification to work. For rational models, this is not a problem as S is symmetric, but for the irrational Virasoro case, one actually has Sp ± 0 = 0 by the modular bootstrap. One of our goals is to precisely understand how to think about (2.20), and more generally (2.15), as entanglement entropy. 8 The right hand side contains the super-Virasoro characters: . (2.21) in the interior of a solid 2-torus S 1 ×D 2 , including the suitable Gibbons-Hawking-York boundary term on the torus boundary. Following standard arguments [11,12], one writes the first order formulation of this model as PSL(2, R) × PSL(2, R) Chern-Simons theory. The resulting Chern-Simons models can then, in turn, be rewritten in terms of their boundary WZW description and then finally turned into a combination of left (L) and right (R) Alekseev-Shatashvili coadjoint orbit actions of the Virasoro group [50,51], see also [24] for a detailed discussion on these steps. The Alekseev-Shatashvili actions contain a boundary reparametrization as the degree of freedom. The strategy in [24] considered a Diff S 1 reparametrization f (τ E , ϕ) on the torus boundary, satisfying f (τ E , ϕ + 2π) = f (τ E , ϕ) + 2π and ∂ ϕ f ≥ 0 along a contractible spatial ϕ-cycle. This choice describes the boundary graviton fluctuations around the global AdS geometry. Changing the periodicity from 2π → 2πθ would then allow for the addition of objects on a spatial slice of global AdS 3 , such as massive particles, represented as conical defects. The resulting model again describes the boundary gravitons on such a background. In this sense, their analysis is perturbative, since it concerns the fluctuations around a given background.
Our choice of boundary condition will be different: we impose instead the above periodicity along the temporal cycle, explicitly implementing a swap between time and space cycles, making the reparametrization at fixed spatial coordinate an element of Diff S 1 instead. Given the perspective advocated in this work, such geometric action description of (2.10) would not be interpreted as perturbative, as defined above. Our boundary condition is also different from the choice of boundary conditions imposed in [52], which is summing over possible choices of defect (with flat measure in λ allowing one to recombine both geometric actions into the 2d Liouville CFT). We comment on this difference further on.
Let us be more explicit while considering more general constant-representative orbits with seed element b 0 . We shall revert to the vacuum orbit at the end of the discussion. On a 2d Euclidean torus space with coordinates (T, σ), 9 we evaluate the path integral where the symplectic measure is 25) and the Alekseev-Shatashvili geometric actions [50,51] are where˙≡ d dT and ≡ d dσ . Notice once more space σ and time T were swapped, following [53], compared to the standard discussions. The L-sector has the top sign and the R-sector the bottom sign. These are complex conjugates of each other. We parameterize the orbit parameter as b 0 ≡ − c 48π θ 2 . Geometrically, this corresponds to having a periodicity 2πθ along the temporal cycle.
Adding the Schwarzian action as the Hamiltonian weighing different configurations, as done in [24], and after integration by parts in the time direction, the resulting orbit action used in (2.24) is equivalent to . This action was written in this form (with time and space swapped) in [24], see also [54] for an analysis from the two boundary phase space perspective.
Since the only difference is swapping the time T and space σ cycles, the integration domain D consists of all reparametrization functions f L,R satisfyingḟ L,R ≥ 0 and the twisted periodicity constraints where a, b, c, d are now allowed to depend on σ, since both reparametrization sectors, i.e. f L and f R , do not communicate directly. Using (2.28), one can check that is a classical saddle solution with on-shell action In order to match with our 3d gravity proposal, we must work in the dual channel. This requires us to interpret the dependence on the torus modular parameter in terms of τ → −1/τ ≡ τ . Hence, , Im(τ ) = 2π β(1 + µ 2 ) , (2.33) so that the classical solution is simply f cl (T, σ) = T + µσ. After suitable rescalings of T and σ (and f ) to obtain a standard periodicity of β and 2π for the rescaled coordinates τ E and ϕ respectively, one can rewrite the identification (2.29) as: with µ = 0 corresponding to a non-trivial twisting. In the rescaled coordinates (τ E , ϕ), the classical saddle solution becomes (2.35) or in terms of the Poincaré time coordinate: (2.36) The resulting on-shell action is the same as before, but still evaluated on τ = −1/τ The classical saddle solution captures an Euclidean BTZ black hole, when expressed in terms of the second order metric formulation. 10 For example, for µ = 0, one would recover the Euclidean non-rotating BTZ metric 38) with event horizon at ρ = 0 and the holographic boundary at ρ → +∞. These types of path integrals (2.24) are famously one-loop exact and evaluate precisely to the Virasoro characters for different primaries depending on the choice of θ [50,51]. Indeed, the saddle point approximation reproduces the q h−c/24 part of the character, whereas the one-loop determinant, coming from the fluctuations, captures the contribution from the descendants, i.e. the boundary gravitons.
The above discussion applies for any θ. In particular, when θ = 1, it leads to the solid torus partition function (2.10). Hence starting from a pure gravity perspective, one automatically lands on our model (2.12), recovering the same partition function we encountered earlier for holographic irrational 2d CFTs in the high temperature regime β/ ∆ gap . The geometric action (2.28) has a chiral Virasoro symmetry algebra, and the combination in (2.24) has a separate left-and right-moving Virasoro algebra, as dictated by the asymptotic AdS (or Brown-Henneaux) boundary conditions [41], but it is not a full CFT; it is a tensor product of two chiral CFTs instead: 3d pure gravity = chiral CFT L ⊗ chiral CFT R . (2.39) The difference with a full CFT is that the above models are clearly not modular invariant. In particular, the coadjoint orbit action (2.28) has a unique saddle point, as pointed out above. Indeed, if we specify the temperature and chemical potential at the boundary, there is a unique BTZ black hole that fits this description with on-shell values of mass and angular momentum, M (β, µ) and J(β, µ). In the set-up of A. Maloney and E. Witten [23], only a boundary torus is specified. In that case, an entire SL(2, Z) family of saddle solutions exist. Here we specify more: we choose the interpretation of the two cycles as time and space. This uniquely fixes a single BTZ black hole saddle. Let us next characterize the states appearing in our gravitational Hilbert space in (2.10), keeping in mind the right hand side of Figure 2. On a solid cylinder, there is a unique classical solution of 3d gravity with specified hyperbolic monodromies (p + , p − ) (as measured with a linking Wilson loop in the fundamental representation): the BTZ black hole with these mass H and angular momentum J parameters ( Figure 3).
Geometrically, its spatial slice contains a spatial wormhole (Einstein-Rosen bridge): which opens up close to the hyperbolic defect at ρ = 0. 11 Since the classical phase space (two copies of Teichmüller space of the 2d hyperbolic cylinder) with these fixed holonomies is zero-dimensional, Figure 3: Left: Black hole state defined by specifying its hyperbolic monodromy around a spatial slice, as measured by the red Wilson loop. Right: Spatial slice of the classical geometry containing a spatial wormhole.
there is a unique quantum state associated with it. We conclude that the Hilbert space states in (2.12) are to be interpreted as quantized versions of the rotating BTZ black holes. Finally, we note that the global AdS 3 vacuum is not contained as a state in the Hilbert space of our model (2.10), since the vacuum character is not included on the RHS of (2.10). This feature caused some confusion in the past when attempting to interpret 2d Liouville CFT as the boundary dual of pure gravity. This is because of a notorious mismatch between the Liouville CFT Cardy formula (with effective central charge c eff ≡ c − 24h min = 1 using h min = (c − 1)/24 for the Liouville CFT lowest primary which is at the bottom of the continuum [56]), and the Bekenstein-Hawking formula [57][58][59][60] that uses instead the Brown-Henneaux central charge c (2.6), see also [61] for a pedagogical discussion. In short, Liouville CFT has far too few high-energy states to explain the black hole degeneracy, which has led some authors to attempt to include additional states into the spectrum. Indeed, the 2d Liouville CFT torus partition function (in any channel) is 12 Comparing to our result (2.10), there are two differences: (1) Liouville CFT (2.41) does not have twisted primaries in its spectrum, gravitationally interpretable as having no rotating black hole states, (2) the spectral density is flat for Liouville CFT. In fact, the partition function (2.41) is the same as that of the free boson CFT, whose asymptotic growth is determined by the Cardy formula with c = 1 indeed. The distinction with our proposal can now be appreciated as follows. The asymptotic Cardy growth is usually computed by the dominance of the lowest weight character in the dual channel. For Liouville CFT, by modular invariance, this is the module h =h = (c − 1)/24 at the bottom of the continuum. For our proposal, by construction, this is the vacuum character at h =h = 0. We hence observe that in this language in our case c eff = c, in spite of also not including the vacuum character on the right hand side of (2.10). 13 12 There is an infinite volume factor V φ from the Liouville zero-mode, that is not generated from the bulk gravitational path integral. So this factor has to be removed. The factor of 2 originates simply from our choice throughout this work of limiting the p ± integrals to positive values. 13 Our conclusion mirrors the case of 2d JT gravity, where the AdS 2 global vacuum is also not contained within the Hilbert space of the model. In both cases, the lowest-energy state is at the bottom of the continuum.
We can enrich the proposal (2.12) further by inserting additional defects or Wilson loops in the interior of the solid torus. Inserting a Wilson loop along the (non-contractible) spatial ϕ-direction in the (λ, λ ) continuous representation of SL(2, R) × SL(2, R), 14 just changes the Virasoro characters into: The parameter λ = iθ with θ defined above. Insertion of such a Wilson loop modifies the holonomy along the Euclidean time direction τ E , and implements defect insertions ( Figure 4). This amplitude is also required to glue tori together into more complicated surfaces. In this work, this amplitude will play a role in determining the correct edge state Hilbert space later on.

Application: dimensional reduction to JT gravity squared
Since our motivation was to find a conceptual 3d generalization of the 2d JT model and its Schwarzian description, it is natural to discuss how precisely JT gravity is encoded within our set-up.
It is well known that near-extremality freezes one of the two holomorphic sectors of the 2d CFT [62][63][64]. It was shown in more detail in [65] how the Schwarzian model emerges within a universal 2d CFT sector describing the low-energy excitations in such near-extremal situation. This is an explicit realization of the more general statement that JT gravity governs the near-horizon near-extremal dynamics of all higher-dimensionsal black holes that have an AdS 2 near-horizon region. 15 What we are aiming for here is a statement that is outside of this near-extremal near-horizon regime, i.e. for generic values of µ, but holding specifically for 3d gravity.
We already revisited the high temperature and large c limit of our partition function (2.12), reproducing the classical BTZ black hole thermodynamics. Let us consider instead its low-temperature regime, where the partition function (2.12) is expected to be dominated by small momentum values p + and p − . In fact, working in the double-scaling regime the contribution from the descendants is subdominant and the full partition function (2.12) can be 14 Where h = λ 2 /2 + Q 2 /4 to relate to the notation of equation (2.4). 15 See e.g. [66][67][68] for some recent discussion on these statements. approximated by where we explicitly used b 2 ≈ 4G N / 1, which is indeed compatible with β/ ∼ c. This particular scaling limit was studied extensively in [69] in order to reproduce Schwarzian QM from Liouville CFT. Notice this double-scaling limit gets contributions from all energies, ending up with a quantum theory (2.44) that structurally matches the JT gravity spectral form factor.
In order to achieve this regime in a microscopic 2d CFT, one must combine this scaling regime (2.43) with the vacuum character dominance of subsection 2.2: β/ ∆ gap . However, these conditions together seem impossible to satisfy when accommodating the bootstrap conjecture / result for the gap ∆ gap ≤ c/12 [70,71]. 16 However, at the end of subsection 2.2 we observed that the regime where the vacuum dominates the dual channel is larger than at first sight expected, since even if only ∆ gap β/ , contributions from other primaries are suppressed. In the end, this implies our result (2.44) is a good approximation for not-too-small JT temperatures T JT where β JT = b 2 β . 17 Turning on the chemical potential µ, the condition is more precisely: ∆ gap β(1 + µ 2 )/ . For real µ, this leads to a shrinking of the validity window of the doubled JT regime. For imaginary µ on the other hand, the window of validity enlarges all the way up to the extremal case µ = i where the spectral gap condition would always be satisfied. This extremal situation is the one analyzed in [65]. Our focus on the other hand is deliberately on the opposite regime.
When coming instead from our 3d pure gravity proposal of subsection 2.4, other primaries (next to the vacuum) are absent altogether, and the doubled JT result (2.44) can be trusted for arbitrary small temperatures.
The expression (2.44) is an interesting result on its own right, which we expect to have implications for the calculation of other 3d observables in the regime (2.43). Appendix A elaborates on this remark. We emphasize that we did not tune the chemical potential for rotation µ, which allows us to explore physics outside of the near-extremal regime considered in [65].
We complement the above discussion with an analysis of the bulk metric fluctuations accounting for the different states in this model. The low-temperature and large c double-scaled limit (2.43) removes all descendants from the spectrum. Geometrically, this feature should be captured by removing all fluctuations along the angular ϕ-direction. Let us hence consider a general ansatz for a ϕ-independent metric Notice the latter still involves a one-form V ν (x µ )dx ν which is capable of describing rotating configurations. In the second-order formulation of 3d gravity, this metric ansatz results in a 2d model of JT gravity coupled to a Maxwell term [62]. For our purposes however, the first order formulation is far more direct to find a doubled JT partition function. Working in the Chern-Simons formulation of 3d gravity, this ansatz is equivalent to specifying the gauge connections A = e + ω andĀ = e − ω. The specific details will not be needed though. All we need is the property ∂ ϕ A = ∂ ϕĀ = 0. Denoting B ≡ A ϕ , the resulting ansatz reduces a single Chern-Simons action into the BF action Projecting onto ϕ-independent fluctuations can be motivated from the CS perspective as follows. By conformal invariance the limit of large β/ is equivalent to that of small angular ϕ periodicity. Since the 3d topology is of the form S 1 × D 2 where S 1 is the angular ϕ direction (see Figure 2), this limit projects on the KK zero-mode in the angular ϕ-direction. In order for the resulting action not to vanish, we simultaneously need to scale the prefactor of the CS action ∼ /G N ∼ c to go to infinity in a double-scaled way. This is precisely encoded in (2.43). Thus, the full 3d gravity action functional becomes, setting G Notice this is the difference of two JT actions. Along a contour where B ∈ iR, the result of these independent path integrations yield complex conjugate results, and directly lead to the doubled JT partition function of (2.44).
To avoid confusion, we note that setting µ = 0 leads to a non-rotating BTZ saddle, but is not sufficient to remove all rotating states; it still leads to a doubled JT model, accommodating rotating off-shell black hole states.
Finally, even stronger, if we were to set V ν = 0 in (2.45) by hand, restricting to only non-rotating geometries, also off-shell, the Chern-Simons gauge fields have a specific form:

48)
A τ E dτ E +Ā r dr = (e 1 , e 2 , −ω 12 ),Ā ϕ dϕ = (−ω 23 , 0, e 3 ), (2.49) in terms of the dreibein e and spin connection ω. Both BF models in (2.47) are equal but opposite, and the total bulk action equals 1 16πG (2) N d 2 x Tr (BF ) + I bdy , (2.50) which is just the gauge-theoretical version of (2.2). We can further extend this doubled JT regime of 3d gravity to include boundary correlation functions. Whereas we believe this is an important discussion that gives strength to the current arguments, the methods used are somewhat orthogonal to the main text and we therefore defer it to Appendix A.

Summary
We provided a proposal for an effective 3d quantum theory of pure gravity based on the universal hightemperature dynamics of 2d holographic CFTs. From such boundary perspective, this is a theory of "vacuum Virasoro blocks in the dual channel" with partition function given in (2.12). Our effective model mimics similar claims in 2d JT gravity, but operates far away from extremality. In fact, we identified a low temperature scaling limit (2.43), governed by a doubled JT model, which is of independent interest. Our partition function (2.12) can be independently derived from gravitational path integral considerations leading to a geometric Alekseev-Shatashvili coadjoint orbit type-action [50,51] by a choice of boundary conditions differing from the ones in [24]. Because of the latter, our partition function has a single saddle point, for a fixed value of the chemical potentials, since our theory is not modular invariant.
It is possible to extend our proposal with boundary operator insertions (see Appendix A) and Wilson loop defects.
The thermal entropy of the quantum black hole (2.15) matches the BTZ black hole entropy (2.20) in the semi-classical regime. In the remainder of this work, we will further investigate the structural similarities between JT gravity and 3d gravity on the one hand, and the structural differences between gauge theory and gravity on the other hand, with the specific goal of explaining the black hole entropy in (2.15) as gravitational entanglement entropy, that is, understanding factorization of 3d gravity in terms of gravitational edge states.

Factorization in gauge theory
Section 2 provided an effective model and Hilbert space for 3d gravity in which we can in principle study whether black hole entropy can be understood as gravitational entanglement entropy. However, gravity is a gauge theory and gauge theories are known to have physical Hilbert spaces that are nonfactorizable. Since 2d JT gravity can be directly formulated as a 2d BF gauge theory, this section reviews how the issue of factorization can be handled in gauge theory, using 2d YM and BF theories as specific examples, before applying these tools to 2d JT and 3d gravity in the next section. However, factorization can be achieved by an extension of the Hilbert space. One introduces a regulator splitting the entangling surface S into two pieces. This separates a Cauchy slice Σ into two spatial subregions V andV , each with its own separate boundary. Gauge invariance requires the addition of edge mode degrees of freedom on ∂V and ∂V transforming under large gauge transformations which we will denote by G S . 18 Hence, edge modes carry charges under this group, allowing the construction of new Wilson lines ending on the boundary of each subregion. This is the physical mechanism underlying the factorization of the original Wilson line operators. We shall refer to G S as the surface or edge mode symmetry. 18 Alternatively, one may quantize the theory for a given set of "boundary conditions" at S and sum over all such possible choices, leading to a schematic decomposition

Gauge theory and factorization
in superselection sectors. This perspective has been employed mainly in the literature on edge states in Maxwell theory [72][73][74], with the superselection label α = E ⊥ .
After introducing the edge modes, H physical can be embedded into a tensor product Hilbert space via the factorization map The reduced density matrix on V and its entanglement entropy is then defined in the extended Hilbert space H V ⊗ HV . The image of H physical under the factorization map is a fusion product of H V and HV called the entangling product [75]: where ⊗ G S refers to a quotient by a diagonal action of the surface group symmetry G S on H V ⊗ HV : Here v · g denotes the right action of G S and similarly for w. We will be more explicit below. In gauge theories, the quotient can be interpreted as a projection onto the singlet sector of H V ⊗HV under G S , which imposes the Gauss' law constraint. In the math literature, the entangling product is referred to as the relative tensor product of modules, which are just Hilbert spaces equipped with an action of the symmetry group G S . This is the notion of factorization which we shall pursue in bulk 3d gravity. In the next section, we illustrate these ideas in the context of two-dimensional gauge theories.

Example: 2d gauge theory
Consider a 2d gauge theory on an interval I = {x ∈ R | x ∈ [x 1 , x 2 ]} (×time), such as 2d Yang-Mills theory with action S = 1 4gYM M TrF ∧ * F , or the 2d BF model S = − M TrBF + 1 2 ∂M BA t , both sharing the same Hilbert space structure. We focus on 2d BF theory from here on.
The interval has two endpoints where boundary conditions must be chosen. For convenience, take the boundary condition A t − B| ∂M = 0 at both ends for 2d BF theory, although we will consider more general boundary conditions later. Applying Gauss' law in the bulk implies the physical Hilbert space H physical consists of square integrable functions on the compact gauge group G H physical = L 2 (G) . (3.6) A complete basis for this Hilbert space is provided by the Peter-Weyl theorem, which gives the spectral decomposition of L 2 (G) in terms of the group representations P R : Here, the label R ranges over all representations of G. This notation corresponds to the following interpretation: the left-right regular representation is a representation of G ⊗ G obtained by the action: It maps a square-integrable function f into another one, and hence forms a representation of G ⊗ G. Famously, decomposing this into irreducible representations gives precisely the above symmetric decomposition (3.7) where all P R appear precisely once. The Peter-Weyl theorem is the simplest example of how information about a group can be reconstructed from its representations. For example, when G = U(1), its content just corresponds to the Fourier transform with modes e inϕ , mapping the 1d representations, labeled by n ∈ Z, to functions on U(1). The classical statement of the Tannaka-Krein duality (see e.g. [76]) goes a bit farther to say that given the Clebsch-Gordan coefficients and the fusion rules for a set of representations of G, one can reconstruct the compact group G itself. A generalization of this duality to quantum groups [77] will be particularly useful when we consider surface symmetries for 3d gravity.
Concretely, the Peter-Weyl theorem implies that a basis of states for the interval Hilbert space is given by the matrix elements in all irreducible representations R of G {|R, a, b , a, b = 1, 2, . . . dim R} . (3.9) Each normalized basis state |R, a, b has a wave function on the group manifold given by where R ab (g) are the matrix elements in the representation R satisfying the orthogonality relation where V G is the volume of the gauge group G. In the context of JT gravity, the gauge group is non-compact and the set of representations of interest will be continuous. The above discussion still applies, with the normalization (dim R) on the right hand side defining the Plancherel measure dµ(R) = (dim R) dR. This can be viewed as a regularized dimension for the irreducible representation R, and gives rise to the continuous completeness relation The indices a and b may or may not be continuous as well. This depends on the particular choice of basis made within each representation.
Factorization and fusion. Let us characterize the edge modes and their transformation properties under the surface symmetry G S in more detail. At the boundary of a spatial region, would-be gauge transformations are promoted to physical symmetries. We can view the ungauged physical degrees of freedom as the edge modes of the physical boundary. 19 In the case of an interval I with boundary condition A t − B| ∂M = 0 at each end, these large gauge transformations are just a copy of the gauge group G at each endpoint, which we identify with the surface symmetry G S . They act on the states in the interval by left and right multiplication at the left and right endpoint, respectively. In terms of the group basis |g , this action is given by If we use the A t − B| ∂M = 0 boundary condition at the regulated entangling surface, then the extended Hilbert space on the two intervals is given by L 2 (G) ⊗ L 2 (G). The surface symmetry at the split entangling surface is G S = G, acting by right multiplication on V and vice versa forV . The next step is to define a factorization map (3.3). In this case, there is a natural choice arising from the structure of L 2 (G) as a Hopf algebra. This means that in addition to the pointwise multiplication rule for functions, L 2 (G) also has a co-multiplication: which defines the factorization map. This map is an isometry because it has an adjoint i * (|g 1 ⊗ |g 2 ) = 1 √ VG |g 1 g 2 that fuses back the split intervals in the sense that i * • i = 1, where one uses left-or rightinvariance of the Haar measure to prove this statement.
Within L 2 (G) ⊗ L 2 (G), the physical Hilbert space is recovered by taking a quotient with respect to the diagonal action of G S = G: This quotient corresponds to the entangling product (3.4), which is isomorphic to the original Hilbert space: Explicitly, elements of the quotient are equivalence classes (|g 1 , |g 2 ) ∼ (|g 1 h , |h −1 g 2 ). In the context of 3d gravity, G S is deformed to a quantum group, which also has a co-product that we will use to define a factorization map in the same way.
Wilson lines and Factorization in the representation basis. The representation basis may provide a more intuitive description of the Hilbert space factorization. In this basis, the factorized wavefunctions are obtained from pulling back R ab (g) through the group multiplication map G×G → G, which is dual to the co-product (3.14) i : where we used the defining property of the representation matrix R ab (g 1 · g 2 ) = c R ac (g 1 )R cb (g 2 ).
In the representation basis, the entanglement edge modes are labeled by the right index of the wavefunctions on the left interval and vice versa on the right interval. (3.17) explicitly shows how these edge modes (labeled by c) are entangled in the physical state. We can give a more local picture of factorization by expressing the group elements g ∈ G as Wilson lines of the original connection A µ (x): Then the factorization map (3.17), just corresponds to splitting the Wilson line in each representation R of the gauge group:

The shrinkable boundary condition
Not all factorization maps (3.3) define a meaningful notion of entanglement. In the absence of constraints, the embedding of H physical into an extended Hilbert space can have arbitrary edge mode degeneracies leading to an arbitrary amount of entanglement. Arguably, locality is the most natural and important physical constraint to be imposed.
Stretched entangling surface and the shrinkability condition. Locality can be imposed by defining the factorization map via a Euclidean path integral that splits a Cauchy slice into two, as shown in the figure below. (3.20) Mathematically, the spacetime process described by (3.20) is a cobordism, i.e. a manifold interpolating between an ingoing and an outgoing boundary. This cobordism introduces a stretched entangling surface S , which is the surface traced out by the Euclidean modular evolution of the entanglement boundary for V (orV ). This leads to a codimension-1 boundary placed at a distance from the original entangling surface S; this is depicted by the semi-circular arc connecting the entanglement boundaries for V andV in (3.20).
To define the corresponding path integral, an entanglement boundary condition on S must be chosen. This is denoted by e in (3.20). Since S is not a physical boundary, we choose e to preserve the cross-boundary correlations of the initial non-factorized state, in the limit → 0. This constraint is captured by the shrinkable boundary condition, which says that The right hand side is the disk path integral that computes the norm squared of the Hartle-Hawking state, defined by cutting the geometry at a moment of time reflection symmetry. Equation (3.21) says that when → 0, the disk path integral is equal to the annulus path integral arising from sequentially splitting and fusing the Cauchy slice. In the context of an entanglement calculation, the annulus is viewed as the trace of a reduced density matrix ρ V supported on the subregion Hilbert space H V . Hence, equation (3.21) matches the path integral description of the defining relation: Notice the shrinkable boundary condition e provides a statistical interpretation to the path integral Z Disk on a spacetime with a shrinking (interior) thermal circle. While the stretched entangling surface is naively of codimension one, the gluing of the two subregions V andV really occurs at a codimension-2 surface, a fact which becomes manifest in the shrinking limit → 0. It is important to distinguish this from the gluing of spacetimes along a proper codimension-1 surface. In Lorentzian signature, modular flow would evolve ∂V and ∂V into a stretched Rindler horizon which approaches an infinite redshift surface as → 0. This implies the edge modes surviving the → 0 limit must have zero modular frequency, a key feature that is absent when gluing along a codimension-1 surface. As discussed in [78], the static nature of the edge modes in 4d Maxwell theory is also crucial for the (subregion) state counting interpretation of the Euclidean path integral.
Shrinkability as a completeness relation. Shrinkability can be viewed as a completeness relation which states that summing over a complete set of edge modes in a subregion V recovers the path integral on the contractible spacetime. Crucially, this condition determines both the symmetry G S and the required spectrum of representations that closes up the stretched entangling surface.
It is instructive to remember how this works in some of the understood theories. For example, in 2d BF theory and Chern-Simons theory, the shrinkable boundary condition sets to zero both the component A τ E − A ϕ of the gauge field and P exp dτ E A τ E = 1 along the τ E direction of the stretched entangling surface, allowing us to shrink it down to a point. 20 • In 2d BF gauge theories, quantization satisfying this boundary condition leads to edge modes transforming in all representations of the gauge group G. We can see this by applying the shrinkable boundary condition to the sphere: To reproduce the degeneracy (dim R) 2 factor on the left hand side, we need a subregion Hilbert space with (dim R) 2 edge modes for each representation R. This gives a physical motivation for the Peter-Weyl theorem: the shrinkable boundary condition gives L 2 (G) as the subregion Hilbert space, while satisfying (3.23) requires this Hilbert space to have (dim R) 2 degenerate states for each R, as stated by the Peter-Weyl theorem applied to this discussion (see (3.9)). The large gauge transformations are given by the gauge group G, which is identified with the surface symmetry G S . The path integral factorization map (3.20) agrees with the co-product defined in (3.17).
• In Chern-Simons theory with compact gauge group G, the shrinkable boundary condition gives rise to CFT edge modes [13]. In this case, the entangling surface is a circle, so the surface symmetry group G S is the loop group of G since these are the large gauge transformations. The reason for the appearance of these CFT edge modes is exactly the same as the usual holographic duality of Chern-Simons theory, where the stretched entangling surface is treated as the holographic boundary of a subregion.

Towards factorization in gravity
Any attempt to borrow the lessons from the 2d gauge theory factorization to 3d gravity requires considering, at least, two extra problems: 1. if one succeeds in defining a Hilbert space for a bulk subregion, one expects to deal with different sets of boundary conditions at different boundaries: Brown-Henneaux boundary conditions at the holographic boundary and the shrinkable boundary condition at the entangling surface.
2. both 2d JT and 3d gravity involves non-compact gauge groups, whose representation theory is more complex.
The first problem, and still within a 2d gauge theory context, is handled by considering other boundary conditions, labeled by a subgroup H. This corresponds to setting the gauge field along H to zero at the (right) boundary. The interval e H is then assigned to the Hilbert space where P R,0 denotes a projection of P R onto a state invariant under the right action of the subgroup H. The Peter-Weyl theorem implies that this projection gives the space of L 2 -functions on the coset: This coset decomposition will be relevant for gravity when assigning a Hilbert space to the subregion between the entanglement surface and the holographic boundary.
Regarding the second problem, and keeping the discussion general for now, one expects the unitary tempered irreducible representations for non-compact groups to play a relevant role. Since one important lesson to extract from the 2d gauge theory examples is that the shrinkable boundary condition requires not only the knowledge of a symmetry group, but also the spectrum of representations appearing in the Peter-Weyl decomposition, we would expect to need to specify their Plancherel measure dµ(R) for non-compact groups. That is, the shrinkable boundary condition would imply a Peter-Weyl theorem taking the form where we view G as a configuration space variable in a bulk subregion, and with an analogous expression to (3.26) for the coset discussion. We will provide explicit expressions of this kind for both 2d JT and 3d gravity in section 4.

Factorization in gravity
Let us next apply the ideas reviewed in section 3 to gravity. We will first provide a general discussion, stressing the differences between gauge theory and gravity when attempting to implement the shrinkable boundary condition. Then, we shall frame the known JT story in the language developed in section 3, to finally present new results on 3d pure gravity within this framework.

Motivation: shrinkable boundary condition in gravity
In essence, the shrinkable boundary condition allows us to interpret gravitational entropy as bulk entanglement entropy. In the Euclidean computation of Gibbons and Hawking [79], gravitational entropy is defined via the semiclassical evaluation of where Z(β) is an Euclidean path integral on a spacetime with a thermal circle of length β at infinity, and β H is the Hawking temperature. The black hole entropy arises from the tree level evaluation of log Z(β) on a Euclidean saddle with the topology of a cigar in the directions transverse to the horizon.
Cutting out a small disk from the tip of the cigar and inserting a shrinkable boundary condition there, our discussion in section 3.2 suggests the resulting annulus path integral can be viewed as a trace over a subregion Hilbert space: where H V generates rotations around the entangling surface, and is identified with the modular Hamiltonian for the Hartle-Hawking state defined by cutting the cigar in half. In Lorentzian signature, this corresponds to a boost in the spacetime exterior to the black hole. The gravitational entropy (4.1) can then be written as an entanglement entropy This naive argument is insufficient in gravity, because the shrinkable boundary condition is non-local along the Euclidean time circle [80]. The reason is that in contrast with the analogous QFT computation, where the temperature variation in (4.1) would insert a conical singularity at the entangling surface, the gravity calculation only involves saddle point geometries which are smooth in the bulk. To ensure there is no conical singularity at the entangling surface, the shrinkable boundary condition (at arbitrary β) must fix the conical angle around the tip to be 2π. This constraint cannot be imposed by a local boundary condition, since it requires the integral of the spin connection around the stretched entangling surface to be 2π. 21 Following [80], one approach is to quantize the subregion theory on V using a local boundary condition. A gravity path integral with such a local boundary condition defines a naive "cutting map" J : H physical → H V ⊗ HV , which must then be supplemented with a defect operator √ D on H V that implements the 2π cone angle. 22 The correct embedding of the Hartle-Hawking state into the extended Hilbert space is then given by This approach has the advantage of making a direct connection to the horizon area operator, since this generates translations in the conical angle around the entangling surface-we will comment more on this in the conclusion. However, it does not give an interpretation of the black hole entropy in terms of entanglement entropy of edge modes. This is because the shrinkable condition in the presence of the defect operator means where H V is the modular Hamiltonian defined with the naive local boundary condition, and where ρ V = De −βH V is the reduced density matrix defined by the factorization map (4.4). 23 The defect insertion in (4.5) modifies the trace in order to obtain the appropriate density of states. The black 21 This is clear in 2d, since the metric around the conical singularity is locally of the form . This metric has a spin connection ω = dθ, so that we get S 1 ω = 2π(1 − α). Avoiding a conical singularity (α = 0) hence means indeed the advertized property. The same calculation applies in higher dimensions, if we restrict to a normal plane transverse to a point on the codimension-2 entangling surface. 22 In the BF formulation of JT gravity, the defect operator imposes the constraint that the Chern class of the gauge bundle is equal to one; in the gravity language, this corresponds to the fact that the boundary Schwarzian has winding number one around the boundary circle. 23 Equivalently, if we defineρ V = e −βH V , we can write the entropy as Hereρ V is a reduced density matrix obtained from a factorization map with a local boundary condition.
hole entropy is then given by the first term, i.e. the expectation value of the defect operator, and does not have a manifest state counting interpretation.
In the next two sections, we take a more abstract approach. Rather than insisting on a local boundary condition which must be supplemented by a defect insertion, we simply apply the shrinkable boundary condition criteria to identify the appropriate gravitational edge modes.

Bulk factorization and entropy in 2d JT gravity
We review and expand the work of [81], which we interpret as giving a factorization of the JT gravity Hilbert space into a tensor product H V ⊗ G S HV of modules. 24 This factorization was defined using the formulation of JT gravity as an "SL + (2, R) BF gauge theory", and led to a derivation of black hole entropy as entanglement entropy. Our main goal is to learn the subtleties of factorization in the gravitational context, before generalizing to the more difficult problem in the 3d pure gravity context in the next subsection.
Shrinkable boundary condition and the edge mode density of states. Consider the Lorentzian two-sided AdS 2 geometry, as shown in the left of Figure 5. The time slice on which the bulk Hilbert space is supported is a wormhole connecting the two asymptotic boundaries, corresponding to the red interval in Figure 5. We denote this two-sided Hilbert space by H i L i R , with i L , i R labeling the asymptotic boundaries that satisfy holographic gravitational boundary conditions. A basis for this "interval" Hilbert space is given by the energy eigenstates where k is a momentum variable related to the energy as E = k 2 in units where the Schwarzian coupling coefficient C = 1/2 [34][35][36]38].
The momentum k can also be viewed as labeling the representation of a Wilson line threading the wormhole and ending on the two asymptotic boundaries. Indeed, as in 2d YM or BF theory, the corresponding wavefunctions have a group theoretic interpretation as representation matrix elements of the underlying group structure, in our case the semi-group SL + (2, R): with k labeling a representation in the continuous principal series and R k ab (g) a representation matrix. The fixed indices i L i R are associated to the left-respectively right boundary, and are fixed by asymptotic gravitational boundary conditions which directly descend from the 3d Brown-Henneaux boundary conditions [41,82]. These are in essence coset boundary conditions described below equation (3.26) in terms of the parabolic generators of SL(2, R). However, instead of being invariant under leftand right-multiplication by these parabolic one-parameter subgroups of SL(2, R), the wavefunction transforms by an irrelevant factor. We will nevertheless refer to these as coset boundary conditions. We refer to [81] for more details on this gravitational coset. The normalization factor of (4.8) is important, and is explained below.
Our goal is to define a factorization map into the extended Hilbert space: where H i L e and H ei R denote one-side Hilbert spaces supported on "intervals" with one endpoint at asymptotic infinity, and the other on the bulk entangling surface. There is no assumption about the locality of the boundary condition at the entangling surface. Let us appeal to the shrinkable boundary condition to determine the subregion Hilbert spaces and the factorization map (4.9). Consider therefore the Hartle-Hawking state where the disk partition function is: Our desired factorization map i, when applied to |HH β , produces a half annulus. The shrinkability condition then says that Z disk (β) is equal to the → 0 limit of the full annulus: When is finite, the annulus path integral can be computed in the "closed string" channel as a two boundary amplitude. In order to appreciate where the density of states is coming from, it is convenient to insert a complete set of intermediate states 1 = dλ |λ λ| which can be equivalently viewed as defect insertions as shown in the right of Figure 6.
This decomposition can then be written as (4.15) Figure 6: At finite , the two-boundary amplitude in BF or YM theory can be computed by gluing defect amplitudes together. The holographic boundary is drawn in red color.
Each building block partition function has now only a single boundary, of either length or β, respectively. The parameter λ can be interpreted as the geodesic length of the gluing circle, but this interpretation will not be needed here. Importantly, such single-boundary BF models can be described on their respective boundaries in terms of quantum mechanics on the group manifold of interest. Let's compute the different blocks in detail. In Figure 6, the red exterior boundary is at asymptotic infinity, and satisfies asymptotic gravitational boundary conditions. Thus, this "outer" path integral produces a partition function given by [38,83]: where cos(2πλk) = λ|k represents the wavefunction of a boundary state |λ whereas the wavefunction of the asymptotic boundary state is a constant (independent of k). On the other hand, the inner path integral Z inner is an amplitude between |λ and the entanglement boundary state |e , which "caps off" the spacetime when → 0. This takes the form Gluing the two partition functions together by integrating over λ in (4.15) then gives The shrinkability condition Z disk = lim →0 Z( , β) then implies that e|k = k sinh 2πk. We thus conclude that the partition function for the inner disk is Comparing (4.18) with (4.16), we can infer that (k sinh 2πk) plays the role of a density of states originating from the inner entangling boundary, since the cos(2πλk) factor is here merely for the purposes of the gluing. Such density counts the (modular) zero-energy edge modes at fixed k localized at the entangling surface. A technical comment is in order concerning our gluing procedure (4.15). The actual gluing integral one should use both in BF models and in JT gravity, contains a twist variable as well. In the case of Teichmüller space, the range of the twist variable is infinite and global diffeomorphisms are not modded out. One can show that the degree of freedom of the twist variable leads in this case to an overall multiplicative volume factor V C on the right hand side of (4.15) (see e.g. appendix D of [81]). V C can also be interpreted as the regularized volume of the maximal torus as we clarify further below. Given the TQFT nature of our gluing procedure, we note that Teichmüller space gluing is indeed the natural way to implement the shrinkability constraint. With this in mind, we correct our expression for the e-brane boundary state by compensating accordingly: Peter-Weyl Theorem and the subregion Hilbert space. The density of states associated to the boundary label e is the Plancherel measure for SL + (2, R) as defined by the spectral decomposition [84]: Here, SL + (2, R) is the semi-subgroup of SL(2, R) matrices with positive matrix elements and P k denotes a continuous series representation of SL(2, R). This rather non-trivial generalization of the Peter-Weyl theorem arises from a q → 1 limit of an analogous equation for SL + q (2, R) (see eq (4.59)), which originated from a series of studies on Liouville theory and quantum Teichmüller space [84]. It defines a "complete" set of representations for SL + (2, R) given by the continuous series representations with measure k sinh 2πk. As in the ordinary Peter-Weyl theorem, the right hand side of (4.20) is the decomposition of the regular representation of SL + (2, R), in which SL + (2, R) acts on itself by left and right multiplication.
The shrinkable boundary condition implies that the subregion Hilbert space H ei R is given by Here P k,i R denotes the subspace which is invariant with respect to right multiplication by a parabolic subgroup of SL + (2, R), up to a phase: this corresponds to fixing the right index of its representation matrix to i R . The representations P k correspond to the unrestricted left indices which describe edge modes on the bulk entangling surface, each with regularized dimension dim k = k sinh 2πk. Comparing (4.21) to (4.20), implies we can characterize the subregion Hilbert space as: where the symbol ∼ denotes the right coset. This generalizes (4.20) in a way analogous to the ordinary gauge theory generalization (3.26) of the Peter-Weyl theorem.
Factorization map. As in ordinary gauge theory, the factorization map is defined via the co-product on the L 2 -space of functions on SL + (2, R) and its cosets. Since the Hilbert spaces H ei R , H i L e and H i L i R are all subspaces of H ee = L 2 (SL + (2, R)), it suffices to define the factorization map there and then restrict as appropriate. The co-product defines the factorization map in the group basis to be where g, g 1 , g 2 should be restricted to appropriate cosets of SL + (2, R) if one or both of the boundaries are asymptotic boundaries. As in our review of 2d gauge theory in section 3.1.1, the entanglement of edge modes becomes manifest in the representation basis, whose wavefunctions on the SL + (2, R) manifold are given by with normalization determined by the Plancherel measure: In this basis, the factorization map is just a continuous generalization of (3.17) where s labels the entangled edge modes, V G = G dg is the (regularized) volume of the (semi)group manifold and the prefactor is determined by the normalization. 25 Notice that applying the factorization map (4.26) to the Hartle-Hawking state (4.10) gives the usual thermofield double state. Indeed, a thermal density matrix is obtained after tracing over the left region Notice that, crucially, the √ k sinh 2πk factor from the |HH β wavefunction cancels the same factor appearing in the denominator of (4.26). 26 We can explicitly check that (4.29) Indeed, to compute the overlap between (4.27) and its adjoint, we use the formal equalities where V C is the volume of a maximal torus, computable as V C ≡ G,g∼hgh −1 dg, the volume of the conjugacy class elements obtained by identifying group elements according to g ∼ hgh −1 . These identities can be derived by comparing the compact and non-compact group orthogonality and character orthogonality relations as reviewed in Appendix B.
To check the factorization map (4.27) is compatible with the shrinkable boundary condition starting with ρ(β) (4.28) and using the above formulas, we observe the projector onto the irreducible representation k of SL + (2, R) has a non-trivial trace, given by the Plancherel measure. Thus, which manifestly equals Z disk (β). 25 One might interpret the volume regulator as precluding a strict factorization of the Hartle-Hawking state. We prefer to read it as showing us how to make sense of gravitationally factorized states. Analogous comments hold for the 3d case later on, though we will not be as explicit about the analogs of these volume factors. 26 Had we followed [80] and used the co-product factorization map for the universal cover of SL(2, R), these factors would not have cancelled.
After normalizing ρ ≡ ρ(β)/Z disk (β), the von Neumann entropy S = −Trρ log ρ takes the form: where we defined a classical probability distribution: There is an interesting list of points to stress regarding this result: • The last term is an artifact of having infinite-dimensional representations. Indeed, it combines with the second term into +∞ 0 dk P (k) log R ds . Crucially, it does not depend on the state of the system and we can easily renormalize it by subtracting it. Note also that it has nothing to do with the short-range UV divergent term in any entanglement entropy in a continuum theory. This can be appreciated by the fact that it vanishes both for compact gauge groups and for the abelian non-compact gauge group R, something that is not true for the short-range UV divergent term. Upon dropping this last term, (4.32) takes the standard gauge theory form [85].
• P (k) defines a classical probability distribution, whose classical Shannon entropy equals the first term in (4.32). The second term is the averaged entropy within a fixed k-sector. This form of the entropy corresponds to a block-diagonal density matrix with +∞ 0 dkP (k) = 1 and Trρ k = 1. Even more so, in parallel with the compact case, the density matrix ρ can be written as a fully diagonal matrix: with +∞ 0 dk R ds P (k, s) = 1 and Trρ k,s = 1. In this language, the von Neumann entropy (4.32) is entirely classical Shannon entropy: (4.35) • If we start out with JT gravity plus the Einstein-Hilbert action − S0 4π ( R+2 K), as arises in the near-horizon near-extremal regime of higher-dimensional black hole physics, or as a "regulator" of the sum over wormhole corrections [86], the density of states would be ρ(k) = e S0 k sinh 2πk, with S 0 the (naive) extremal black hole entropy. Factorizing such a system only requires a small modification in the reduced density matrix: where the additional labels a = 1 . . . N encode the "extremal" microstates, and N = e S0 is assumed to be an integer in this notation. The resulting von Neumann entropy of ρ N (β)/Z disk (β) then just gets further shifted by S 0 : For fixed value of k, for both labels s and a the state (4.36) is maximally mixed leading indeed to an entropy that is just the log of the dimension of the respective Hilbert spaces: log 2πV V C dim k and S 0 . These additive shifts to the entropy are non-universal and depend on the regulator (here finite-volume regularization of the group manifold). We believe it is a specific case of the more general ambiguity of entropy in type II ∞ von Neumann algebras [87]. The latter has a trace operation, but there is an ambiguity in that trace (existence of an automorphism in the operator algebra), which at the level of the entanglement entropy translates into an arbitrary additive constant.
A stationary phase evaluation of the integral over k in (4.32), fixing a single value k * in the distribution P (k), gives the semi-classical entanglement entropy in agreement with the BH entropy of the classical JT black hole.
Relation to the classical phase space approach. The fact that only representations of SL + (2, R) appears in the subregion Hilbert space shares an interesting resemblence with the classical formulation of gravitational edge modes given in [75]. It was shown there that the gravitational surface symmetry group G S associated with an entangling surface S is given by: 27 where Diff(S) are diffeomorphisms mapping the entangling surface S onto itself, while SL(2, R) S are independent linear transformations of the normal plane to the entangling surface, including the boosts, at every point of S. In JT gravity, the entangling surface is just a point, so the surface symmetry reduces to G S = SL(2, R). However, it was noted in that same work [75] that the SL(2, R) Casimir in this case is always negative, because it corresponds to the determinant of a Lorentzian metric normal to S. Within the SL(2, R) representations appearing in the Plancherel decomposition (see e.g. [93]), this condition selects out solely the continuous principal series representations of SL(2, R), which is consistent with the spectral decomposition (4.20).

Bulk factorization and entropy in 3d gravity
The main goal of this section is to provide a derivation of the black hole entropy of the quantum gravitational 3d black hole in terms of the bulk entanglement entropy across the horizon. To do so, we shall define bulk factorization following the same approach just described for JT gravity. The essential new ingredient is a q-deformed surface symmetry SL + q (2, R) at the bulk entangling surface, where the deformation parameter q is related to the cosmological constant. We will find that solving the shrinkable boundary condition implies that the boundary category associated to a bulk entangling surface is the representation category of SL + q (2, R), in direct analogy with JT gravity. This determines the bulk factorization map, which leads to a state counting interpretation of black hole entropy in terms of quantum group edge modes.

Review: the bulk phase space
It is convenient to start our discussion in 3d gravity by reviewing its bulk classical phase space.
Euclidean geometries. A general Euclidean solution to Einstein's equations with a negative cosmological constant is given by the metric [94]: where w = τ E + iϕ is a boundary coordinate and the functions L ± can be identified with the left and right moving Virasoro stress tensor components. Equivalently, in the Chern-Simons formulation, they parametrize the degrees of freedom of the boundary theory which arise from applying the bulk-boundary correspondence satisfying AdS 3 boundary conditions. Either way, these functions parameterize the classical phase space.
In particular, the Euclidean BTZ black hole corresponds to having only the zero modes L + 0 , L − 0 . These are related to the inner and outer horizons of the black hole by L ± 0 = (r + ± r − ) 2 /(4 2 ), where is the AdS radius, or to the mass and the angular momentum by Phase space of Lorentzian, 2-sided geometries. The above Bañados metric (4.40) describes a single-boundary Euclidean geometry. In Lorentzian signature however, by continuation past any horizons, one reaches a two-sided configuration whose spatial topology is that of an Einstein-Rosen bridge. Our 3d gravity phase space consists of classical solutions with the topology of the two-sided Lorentzian BTZ black hole.
Here we describe this phase space following [54,95]. In the presence of two asymptotic boundaries, there are now two pairs of stress tensors describing boundary degrees of freedom, which we denote by The subscripts L, R label the left and right boundaries which are responsible for the doubling of the degrees of freedom relative to the Euclidean section, while ± labels the two chiral stress tensor components, as before. These degrees of freedom are not independent: they are correlated through their zero modes. For example, BTZ black holes satisfy Thus, their zero-modes are equal and should be matched with the pair L + 0 , L − 0 giving rise to the black hole charges as in equations (4.41).
The Chern-Simons formulation in terms of bulk gauge connections A ± gives a Wilson line description of the coupling between the phase space degrees of freedom of the two sides. Here L + L,R and L − L,R are the boundary degrees of freedom that remain after imposing AdS 3 boundary conditions on the gauge fields A + and A − , respectively. Denoting the SL(2, R) generators by L 0 , L ± , these AdS 3

boundary conditions imply
Besides L + L,R , the phase space has one extra degree of freedom: the radial Wilson line W C linking the holonomy on the two asymptotic boundaries This is why the phase space does not factorize into two independent boundary theories. This shared holonomy between the two boundaries can be described by a single quantum mechanical degree of freedom p + , parameterizing the Wilson loop around ϕ at arbitrary r. To see this, assume the Wilson loop is in the hyperbolic conjugacy class of SL(2, R). It can then be written as i.e. in terms of a real proportionality factor p + , as claimed. 28 Since the above discussion holds for both chiralities, we conclude the Hilbert space is described by the non-zero modes of all four L ± L , L ± R , combined with a common zero-mode p ± for each chirality.

The two-sided Hilbert space and the Hartle-Hawking state
The 3d analog of the interval Hilbert space in JT is a Hilbert space supported on a spatial annulus with two circular boundaries. For example, the two-sided Hilbert space is supported on the Einstein-Rosen bridge connecting the two asymptotic boundaries, while the one-sided Hilbert space has one boundary at asymptotic infinity, and one at the bifurcation surface. Following the notation in JT gravity, we denote the two-sided Hilbert spaces by H i L i R , with the indices i L , i R labeling the asymptotic AdS 3 boundary conditions.
Quantization of the stress tensor pair L ± L , L ± R leads to boundary Hilbert spaces labeled by shared chiral primaries p ± , each supporting an infinite tower of descendants. The two-sided Hilbert space is given by where m L,R and n L,R label the descendants on the left and right boundaries and the indices i L , i R label Kac-Moody zero-modes belonging to the p ± representation of SL(2, R). These zero-modes correspond to the SL(2, R) Kac-Moody generator fixed by the Drinfeld-Sokolov reduction (see [82]), which reduces the symmetry algebra from SL(2, R) to Virasoro. Physical states in the 3d gravity Hilbert space are non-factorizable due to the matching of p ± on the left and right boundary, corresponding to the shared zero mode p ± in the bulk. The JT limit removes descendants, and gives the two-sided states of (4.7): The bulk Hartle-Hawking state |HH β,µ whose norm squared produces the 3d gravity partition function (2.12) Z(β, µ) ≡ HH β,µ |HH β,µ is where q = e β (−1+iµ) andq = e β (−1−iµ) , as before. Notice the descendants on the L and R side are matched. This is the standard TFD state of the boundary theory, obtained from the path integral over half of the Euclidean geometry as shown in Figure 7. Below, we will derive the bulk factorization of this state and compute its entanglement entropy.

Edge sector of 3d gravity from the shrinkable boundary condition
To define factorization in 3d gravity, we need to identify its edge sector, i.e. the edge symmetry group, its relevant irreducible representations and its density of states. A first route to answer this question is to demand that the shrinkable boundary condition is satisfied. In this case the stretched entangling surface S describes a thin torus inside the Euclidean spacetime, which is the boundary of the darkblue region in Figure 8. To find the bulk edge modes, we follow the procedure in JT, as outlined below eq (4.15). Consider one of the chiral sectors in our proposal for 3d gravity in (2.39). The addition of the stretched entangling surface corresponds to putting the Chern-Simons theory on T 2 × I ≡ A × S 1 , where A is an annulus. The path integral on this spacetime can be viewed as an amplitude between the inner and outer boundary with modular parameter τ 1 , τ 2 , where τ n = βn 2π (µ n + i). Inserting a complete set 1 = dλ |λ λ| between the boundary states of this amplitude can then be interpreted as inserting a Wilson loop labeled by λ in the interior of the two solid tori. This corresponds to decomposing the partition function on T 2 × I as (4.52) which in the limit τ 1 → 0 is a 3d Chern-Simons analog of equation (4.15): However, for 3d gravity we will see that the "inner" piece is not quite correct in (4.52).
The gravitational Wilson loops in the representation λ play the role of the defect insertions in Figure 6, here depicted in Figure 9. The outer boundary labeled by τ 2 is at asymptotic infinity. As noted earlier, the gravitational boundary conditions fix a zero-mode i L,R of the Kac-Moody algebra, leading to a partition function given by Virasoro characters rather than Kac-Moody ones. As in JT, the fixing of these indices leads to a coset partition function (this is a chiral sector of (2.42)): The inner boundary labeled by τ 1 corresponds to an entangling surface. In ordinary Chern-Simons theory with compact gauge group G, we saw in section D.2 that the appropriate shrinkable boundary condition A τ − A ϕ | ∂M = 0 leads to Kac-Moody edge modes. Thus we would naively be tempted to associate the Kac-Moody character of the loop group SL(2, R) to the inner torus: where χp(τ 1 ) ∼ 1/η(τ 1 ) 3 , as written in (4.52). However, (4.55) is neither compatible with the gravitational shrinkable boundary condition nor finite as τ 1 → 0, since most noticeably, it describes an infinite degeneracy due to all the descendants as τ 1 → 0. The latter is interpretable as coming from all of the modes with non-trivial spatial profile along the black hole horizon. We then set out to find Z inner (τ 1 → 0, λ) by demanding consistency with the shrinkable boundary condition as illustrated in Figure 10. This shrinkability condition then requires 29 which most noticeably contains no descendants! This inner partition function (4.57) provides an interpretation for the density of states as counting edge modes living on the bulk entangling surface. Crucially, (4.58) coincides with the Plancherel measure on the quantum semi-group SL + q (2, R). We can think of SL + q (2, R) as an object defined by the spectral decomposition [84,96] This is a quantum group generalization of the Peter-Weyl theorem (4.21) in which the P p are representations of the modular double of U q (SL(2, R)). To explain what this is, first recall that U q (SL(2, R)) denotes the q-deformation of the universal enveloping algebra U(SL(2, R)); the latter being an algebra generated by the Lie algebra elements of SL(2, R), subject to the standard commutation relations. When q = 1, the right hand side of (4.59) corresponds to a basis of representation matrix elements R ab (g), which naturally transforms as P R ⊗ P * R under left and right action of g, as in (3.8). By considering infinitesimal versions of left and right multiplication, we can interpret P R ⊗P * R as representations of U q (SL(2, R)).
Modulo some subtleties which we will return to shortly, these representations can be q-deformed, giving representations of U q (SL(2, R)). The modular double of U q (SL(2, R)) refers to a special subclass of continuous series representations of U q (SL(2, R)) appearing in Liouville theory: they are simultanenous representations of U q (SL(2, R)) and its modular dual Uq(SL(2, R)) withq = e i π b 2 . This is the origin of the self-duality transformation mapping b → 1 b , which plays a prominent role in Liouville theory. As Hopf algebras, SL + q (2, R) and the modular double of U q (SL(2, R)) are dual spaces. We can interpret (4.59) to mean that their representations are in one-to-one correspondence.
Our conclusion is hence that, unlike PSL(2, R) ⊗ PSL(2, R) Chern-Simons theory, in 3d gravity the boundary category associated to bulk entangling surfaces is given by two copies of Rep(SL + q (2, R)).
This distinction between gravity and gauge theory is forced on us by the shrinkable boundary condition. We will provide a physical picture of the meaning of this difference in boundary category in section 5.3. Note that from the perspective of the edge sector, the transition from JT to 3d gravity requires precisely a q-deformation of the underlying group theoretical structure of the edge degrees of freedom. We will see below that these degrees of freedom fully account for the black hole density of states, and carry the entire black hole entropy. There are descendants on the asymptotic boundary that also carry entropy, contributing to the total entropy in spacetime, but we do not associate these degrees of freedom to the black hole itself. 30

One-sided states and the factorization map
Next, let us introduce a boundary label e on the entangling surface, which is a circle splitting the wormhole into two regions V andV . Each of these regions is an annulus with one boundary on the stretched horizon and one at asymptotic infinity. We denote the associated one-sided Hilbert spaces as H i L e and H ei R .
In 3d gravity, the shrinkable boundary condition e labels a complete set of representations SL + q (2, R), corresponding to anyonic edge modes living at the black hole horizon. The edge mode Hilbert spaces are q-deformations of those in JT. When neglecting descendants, one-sided wavefunctions are L 2 -functions on a quotient of SL + q (2, R) induced by the AdS 3 asymptotic boundary conditions. In particular, the zero-mode subspace H 0 ei is given by Similarly, H 0 i L e can be identified with functions on the left coset, while H 0 i L i R corresponds to functions on the double coset. The parallel structures exhibited in the interval Hilbert spaces of 3d gravity and JT gravity suggests one should define a factorization map by q-deforming (4.26), i.e. by interpreting the edge mode indices s as states transforming under SL + q (2, R) with a density of states given by the Plancherel measure (4.58). Explicitly, such a factorization map is given by (4.61) Here s labels a state in the representation P p±,i L and P * p±,i R respectively. Notice that the descendants m L , m R describing the boundary gravitons are spectators in this factorization map, which only acts non-trivially on the zero-mode subspace, and no descendants are introduced at the entangling surface. We will not write down the analogous volume IR regulators that we wrote explicitly in the JT gravity case starting with equation (4.26). These should correspond to q-volume factors of both the quantum group V q G and the subgroup of conjugacy class elements V q C , with well-defined limits lim q→1 V q G = V G and lim q→1 V q C → V C . Both would have to be suitably defined in the q-setting, which we leave as an important open problem. We illustrate this factorization map in Figure 11. 30 As a final comment, we also note that 2d Liouville gravity is governed by the same q-deformation of the JT structure, and can be formulated in the same language. In particular, its disk partition function, amplitudes and (presumably) its factorization can be similarly developed as we have done here. The amplitudes differ from 3d gravity in that there are no descendants anywhere, and the energy eigenvalues (in the exponentials) are also q-deformed. We refer the reader to [97][98][99] for the expressions and discussions. Figure 11: Splitting a two-sided state using the factorization map, which introduces an entangling surface (the black circle) and an edge sector label s.
To apply this factorization map (4.61) to the Hartle-Hawking state (4.51), let us write the latter in terms of its chiral pieces, i.e. |HH β,µ = |HH β,µ,+ ⊗ |HH β,µ,− , where When restricted to a single chiral sector, the calculation of the reduced density matrix is, in essence, the same as in JT, except for keeping track of the boundary gravitons. The factorized state in the + sector is The corresponding reduced density matrix after tracing over the left (L) degrees of freedom is The shrinkable boundary condition guarantees that the partial trace of this reduced density matrix reproduces the 3d gravity partition function Z(µ, β) (2.12), provided that we impose that the trace of the projector onto the p + representation matches the Plancherel measure: The total reduced density matrix is obtained by combining both chiral sectors: Its von Neumann entanglement entropy has contributions from both the entangled boundary gravitons labeled by m R and n R , and the entangled "bulk" edge modes labeled by s. By design, this entanglement entropy S equals the thermal entropy of Z(β, µ) (2.15), which we reproduce here for convenience: +∞ 0 dp + dp − p n,n (p + , p − ) log p n,n (p + , p − ) − p n,n (p + , p − ) log (dim q p + dim q p − )p(n)p(n) , and p(n) is the number of descendants at level n, where we have used the notation of section 2.2 where the descendant level is denoted by n,n. As explained in section 2, the contribution from the boundary gravitons is subleading in the semi-classical limit. Thus, to leading order in the semi-classical expansion, the bulk entanglement entropy gives

4.3.5
The coordinate algebra for SL + q (2, R) and its (co-)representations To understand why our factorization map (4.61) is not an ad hoc construction, we must understand how it arises as part of a constrained algebraic structure that defines SL + q (2, R). In particular, we will explain that the factorization map (4.61) is a representation of the co-product for a Hopf algebra F(SL + q (2, R)) associated with functions on SL + q (2, R). F(SL + q (2, R)) is referred to as the coordinate algebra of SL + q (2, R) and underlies the L 2 -space appearing on the left hand side of the Peter-Weyl theorem (4.59). We also note that an additional set of constraints is imposed on the co-product factorization map, when we embed it within a putative extended TQFT for 3d gravity associatedto the boundary category Rep(SL + q (2, R)), see subsection 6.4. 31 There are indications that such a TQFT exists, based on work related to the quantization of Teichmüller space [31]: we will briefly comment on this in the conclusion. For now, our goal is to identify the ingredients needed to define factorization within such a framework. With this in mind, we turn to a more detailed explanation of the algebraic structure of SL + q (2, R).
Coordinate algebra for SL(2, R). We begin by defining L 2 (SL(2, R)) in a manner that will be convenient for q-deformation. Consider a basis given by products of matrix elements g ij of SL(2, R) in the fundamental representation. This basis of matrix elements generates a commutative algebra F(SL(2, R)) which consists of sums of products of g ij , subject to the relation F(SL(2, R)) is referred to as the coordinate algebra.
As for compact gauge groups, F(SL(2, R)) is a Hopf algebra that has a product defined by the ordinary multiplication of matrix elements, together with a unique co-product ∆ that can be used to define factorization. A further property of a Hopf algebra is an operation called the antipode S, which can be used to define conjugate representations. In the case of an ordinary group, S is just the inverse operation: Now consider the quantum group SL q (2, R). In the original formulation due to Fadeev, Reshetikhin and Takhtajan [100], this quantum group was defined by its coordinate algebra F(SL q (2, R)), which is a non-commutative deformation of F(SL(2, R)) satisfying the relations ab = q 1/2 ba, ac = q 1/2 ca, bd = q 1/2 db, cd = q 1/2 dc, bc = cb, ad − da = (q 1/2 − q −1/2 )bc. (4.73) These commutation relations are captured by the R-matrix of SL q (2, R) (see Appendix C), which specifies its braiding property. In addition, one imposes a q-deformed version of the condition det g = 1: ad − q 1/2 bc = 1. (4.74) Since the "matrix elements" of SL q (2, R) are non-commutative, they should be represented as operators on a Hilbert space rather than numbers. Explicit "integrable" representations of these operators can be constructed, see e.g. [101]. It is important not to confuse the representation of the operator algebra defined by (4.73) and (4.74), with the representations appearing on the right hand side of the spectral decomposition (4.59). The former give a representation of the Hopf algebra of functions on SL q (2, R) preserving the multiplication rule for the matrix elements. When q = 1, this corresponds to the commutative algebra of four elements a, b, c, d subject to the determinant condition, which is indeed different from the P R representations appearing in (4.59). When q = 1, the antipode is given by As in the undeformed case, this allows us to define conjugate representationsR, which can fuse with the representations R to form singlets. This completes the definition of the Hopf algebra F(SL q (2, R)), which we can complete into the space L 2 (SL q (2, R)) with an appropriate norm.
We are now ready to define SL + q (2, R). We simply take F(SL q (2, R)), but restrict to a representation of a, b, c, d in terms of positive self-adjoint operators (i.e. operators with a positive spectrum). This is the q-deformed analog of the positivity condition for the matrix elements of SL + (2, R). As in the case of SL + (2, R), the "inverse" S(g) may not belong to SL + q (2, R) even if g ∈ SL + (2, R); hence this symmetry is non-invertible. A norm on operators in F(SL + q (2, R)) was defined in [84], and the completion of F(SL + q (2, R)) with respect to this norm gives L 2 (SL + q (2, R)).
Co-representation of SL + q (2, R). Having defined the configuration space SL + q (2, R) on the lefthand side of the Peter-Weyl theorem (4.59), we now turn to a more detailed understanding of the representations which appear on its right-hand side. As we alluded to previously, in the original statement of (4.59), these are certain irreducible representations of the modular double of U q (SL(2, R)). Intuitively, these act on "representation matrix elements" R ab (g) via left and right multiplication of g.
However we have yet to give a proper definition of a representation matrix for SL + q (2, R). This is not entirely straightforward; for example, the usual definition of a representation is a mapping ρ R that defines the action of a group of G on a vector space V R : However, this does not make sense even for the "fundamental" matrix elements of SL q (2, R) described above, since R ba (g) is then given by the operators a, b, c, d acting on L 2 (R) which has no apriori relation to the 2 dimensional vector space V R .
In the quantum group literature, these issues are addressed by the general philosophy of replacing a group G with the algebra of functions on G. Thus one replaces the notion of a representation of G with a co-representation of the coordinate algebra F(G), defined by which satisfies a set of compatibility conditions involving the co-product ∆ and the co-unit on F(G): When F(G) is the coordinate algebra (possibly of a quantum group), a concrete characterization of its co-representations ρ R satisfying the compatibility relations (4.78) is given by a map where R ji is a matrix of elements in F(G) satisfying We will refer to R ij as matrix elements of the co-representation ρ R : in the case of an ordinary group G, one can show that these coincide with the usual representation matrix elements. Indeed, next to the above "bootstrap" argument, for F(G) one can derive the co-product and co-unit of representation matrix elements (4.80) directly from the Peter-Weyl theorem, as we show in Appendix C. The upshot is that the co-product (4.80) on these co-representations can be used to define the bulk factorization map (4.61). To make this totally explicit, let's write down the action of the factorization map on the zero-mode sector, and restore the frozen boundary indices i L , i L as in JT: If we define the wavefunctions as co-representation matrices: Then the factorization map just corresponds to the co-product (4.80) for the continuous series corepresentations of SL + q (2, R). An explicit formula for the highly nontrivial representation matrices R p± ss (g) has been computed: see equation (7.35) of [96]. Given their importance in 3d gravity, it would be useful to understand these kinds of expressions better, see [102] for recent progress and explicit expressions relating these different types of gravitational wavefunctions.

Summary
Paralleling the gauge theory mathematical structure of section 3, we showed that factorization in gravity can be implemented by introducing edge states at the entangling surface, tagged by SL + (2, R) representation labels for 2d JT gravity, and by quantum semi-group SL + q (2, R) labels for 3d gravity. The Plancherel measure appearing in the Peter-Weyl like spectral decomposition of L 2 SL + q (2, R (4.59) is determined by the Virasoro modular S-matrices S p± 0 in (2.11). This spectral decomposition allows us to define a factorisation map (4.61) that matches the co-product of the underlying Hopf algebra. Thus, mathematically, our gravity factorization is a rather natural construction given our BF review in section 3.
Physically, the q-deformation parameter equals q = e iπb 2 and is related to the original microscopic 2d CFT by c = 1 + 6(b + b −1 ) 2 . The group theory Plancherel measure can be interpreted as the density of edge states at the entangling surface when implementing the shrinkable boundary condition using euclidean path integral methods. Most notably, the gravitational shrinkable boundary condition in 3d gravity does not allow descendant labels for the edge states at the entangling surface, leading to a finite entanglement entropy.

Gravity versus gauge theory
The purpose of this section is to offer a physical interpretation of our results in section 4 in a broader context. We will compare our gravitational entanglement entropy formula to more standard entanglement entropy formulas in QFT or semiclassical gravity, paying special attention to Chern-Simons theory where we will identify key differences between its standard gauge theory formulation and the gravitational interpretation described in this work.

Embedding in entropy formulas
The finiteness of the bulk entanglement entropy (4.69) for a two-sided black hole in 3d gravity stands in contrast to the standard entanglement entropy formulas in QFT in a fixed background, which includes Chern-Simons theory and semiclassical gravity. Here, we revisit the validity of these expressions and explain their differences with our quantum gravity result (4.69).
QFT in curved spacetimes. For any continuum quantum field theory in d spacetime dimensions, the entanglement entropy in any state of the system across a cut has the form (see e.g. [103]): 32 where is a UV-regulator with dimensions of length encoding the short-distance entanglement of the QFT across the entangling surface. The divergent terms are the same for any state, whereas the specific information of the state itself is encoded in S finite only. The leading contribution S leading ≡ # A d−2 is proportional to the area A of the entangling surface, but has a cut-off dependent prefactor. Since the near-cut region is always locally Rindler, S leading can also be calculated as the thermal entropy of the gas described by the modular Hamiltonian associated to a half-line (the Rindler Hamiltonian). For example, for a scalar field in d = 4 one obtains [104]: where is the regulated proper length to the Rindler horizon. This leads to an infinite amount of correlation between quanta in both subregions. Given the locality of these arguments, they extend to arbitrary cuts (see e.g. [103]), in particular to the black hole event horizon entangling surface considered in this work. From the thermal entropy perspective, one can hence view this divergence as an IR volume divergence, originating from the existence of infinite space close to the Rindler horizon, something that can be made more explicit by using tortoise coordinates. We should stress here that the thermal entropy obtained in subsection 2.3 did not contain an IR volume divergence. Hence, according to the current discussion, there is no infinite correlation across the entangling surface. It follows our gravitational entanglement entropy is of a different kind than the QFT entanglement entropies (5.1). We will make this comment more precise below.
Anyon defect entropy. Focussing on the relevant dimension d = 3 discussed in this work, where we now compare this generic QFT expectation with specific analytic results applicable to Chern-Simons theory. Chern-Simons theory is a topological gauge theory in which (part of) the finite part of (5.3) can be interpreted in terms of the factorization of Wilson lines via edge modes that transform under a quantum group. For compact gauge groups, it is well known this quantum group is a "hidden symmetry" of Chern-Simons theory [105]; these are symmetries commuting with all observables of the theory. In general, the edge mode symmetry satisfies this definition of hidden symmetry for a subregion, since the symmetry generators are in the center of the subregion operator algebra. This is why the edge state labels split the Hilbert space into superselection sectors. We make some further comments on this in the concluding section 7.
Physically, quantum groups are the symmetries of anyons, i.e. the particles that couple to the Chern-Simons gauge field and provide the charges on which Wilson lines can end. As a result, one expects the factorization of a state with a Wilson line inserted across an entangling surface would require the introduction of anyonic edge modes (see Figure 12). Unlike ordinary charged particles, anyons transforming in a representation R of the quantum group are assigned a quantum dimension dim q R which does not have to be an integer. This is an effective dimension for the Hilbert space associated to a single anyon, defined so that as N → ∞ the fusion Hilbert space of N anyons scales as (dim q R) N . Heuristically, we expect to obtain a contribution of log dim q R to the entanglement entropy each time we cut a Wilson line in the representation R. This expectation is almost correct.
Using the standard shrinkable boundary condition for Chern-Simons theory [13,106], the edge partition function is counting the states of a chiral WZW model at the entangling surface: Hence the entanglement entropy of a state containing a Wilson line insertion crossing the entangling surface is where l is the length of the entangling surface and a UV regulator separating the two subregions.
In the second equality, we used the relation between the quantum dimension and the regulated dimension for the representation R of a chiral algebra [107] which holds in a rational CFT. This is the analogous entanglement entropy formula to (5.3) specific to Chern-Simons theory in an excited state that includes a Wilson line. Let us discuss the different terms in (5.5) in more detail.
• The first two terms in (5.5) define the vacuum entanglement entropy S vac = π 2 c 3 l + log S 0 0 , i.e. in the absence of any Wilson line excitation. This is an explicit realization of the general statement relating the divergent structure in (5.1) to the vacuum entanglement entropy. Let us comment on the l and dependences.
Since the Chern-Simons action does not make explicit reference to any bulk background metric, it is natural to ask what the origin of the length l dependence in (5.5) is. This comes about because the gauge theory shrinkable boundary condition A τ E − A ϕ | ∂M = 0 at the entangling surface requires the addition of a boundary term to the Chern-Simons action that introduces a metric dependence. For example, the standard boundary term ∂M Tr A ∧ * A depends on the background metric via the Hodge star * . This metric dependence is part of the edge CFT data and defines the length l appearing in the "area law" divergence.
Regarding the 1/ divergence, it can be traced to the fact that the number of descendants per primary is infinite in the edge CFT at the entangling surface. Indeed, the left hand side of (5.4) is just χ R (1) = lim q→1 Tr R q L0 .
• The log dim q R term is associated with the entanglement of anyons arising as a defect entropy. This is defined by subtracting the background entanglement entropy S vac from (5.5) Difference with 3d pure gravity. Since 3d gravity can be formulated in terms of Chern-Simons theory, one may wonder if we can directly apply (5.5) to find the entanglement entropy of the gravitational degrees of freedom. This does not work. The failure to satisfy the gravitational shrinkability condition manifests itself in two ways: • In the gravitational Chern-Simons theory, the topological (or defect) entanglement entropy one would write down using the gauge theory arguments above is [27]: This is not correct since both S 0 0 = 0 and S p 0 = 0 in the gravitational case, where these are just the Virasoro modular S-matrices. Even stripping off the normalization factors S 0 0 = 0 does not work. As we stressed in footnote 7, for compact groups, the modular S-matrix is symmetric, but this is not so for the non-compact case at hand.
• The divergent area term ∼ l/ itself is also problematic in the gravitational theory. As noted earlier, the length dependence arises from the background metric on the entangling surface, which makes sense when describing quantum matter in a fixed background. However, this does not make sense in gravity, where the dynamical spacetime metric is encoded into the Chern-Simons connection itself as A ± = e ± ω. There is simply no consistent way to match the background metric in the boundary term ∂M Tr A ∧ * A to the dynamical one encoded in A µ . For example, if we allowed for a varying background that matches with the one determined by A ± , the classical variational principle would not be satisfied due to the hidden A dependence in the Hodge star of the boundary term. This differs from the situation at the asymptotic boundary of AdS 3 , where the metric is fixed and this matching in principle makes sense.
Altogether, this argument says the "area" dependence found in the first term of (5.5) is not the correct area of the black hole horizon, which should be measured with the metric information encoded in A ± instead. Hence this term has no meaning at all for the gravitational model, and we have to focus on S def instead.
Our results from section 4.3.3 show that the correct gravitational black hole entropy is instead How do we interpret this formula?
Gravitational anyons. Anyons allow excited states with Wilson lines to split, and the quantum state describing a two-sided black hole is one such Wilson line. Since we expect the entanglement entropy associated with the splitting of such Wilson line to be the logarithm of the effective dimension of the anyon Hilbert space, we are left to ask what is the appropriate quantum dimension of these anyons. This quantum dimension is effectively just the non-vanishing S-matrix element leading to the entropy (5.9). This does appropriately account for the black hole entropy in terms of the entanglement of anyon edge modes. The defect entropy equation (5.9) holds for a state with an anyon excitation (p + , p − ). To properly compare with our gravitational von Neumann entropy (2.15), we should consider the mixed state that is a classical mixture of such anyon excitations, ρ = p±,n,n p n,n (p + , p − )ρ p±,n,n , (5.10) with probability distribution p n,n (p + , p − ) (2.17), and with ρ p±,n,n the reduced density matrix for a state with anyon label p ± and asymptotic descendant labels n,n. 33 To what extent do these "gravitational anyons" behave the same as the well-studied (compact) non-abelian anyons? A first question is whether there exist anti-anyons whose fusion with the original anyon contains the identity. The answer is mixed. Firstly, our anyon degrees of freedom are labeled by p ± . Within the representation theory of SL + q (2, R), the conjugate representation is found by letting p ± → −p ± , and these are to be interpreted as the anti-anyon degrees of freedom. However, these representations do not fuse into the identity module since the latter is not present in the Hilbert space. 34 These are well-known features in the context of 2d Liouville CFT that also appear here.
A second question one might ask is whether these anyons and anti-anyon degrees of freedom correspond to positive and negative energy. This is not true due to two seperate reasons. Firstly, the energy for both anyon and anti-anyon, according to a fiducial observer, is the same and ≥ 0 (up to a zero-point energy), and is proportional to the quadratic Casimir H = p 2 + +p 2 − . Secondly, the edge degrees of freedom live at the horizon, and hence for any outside observer these energies are redshifted to zero. The above discussion applies without modification in the JT limit. 35 33 Asymptotic boundary descendants are added in a somewhat ad hoc way from the perspective of this section. 34 What is instead true is the (weaker) property that the DOZZ formula for the bulk Liouville three-point function C(α 1 , α 2 , α 3 ) with operator labels α 1 = Q/2+iP 1 , α 3 = Q/2+iP 2 and α 2 = → 0 yields precisely a Dirac delta function on P 1 + P 2 = 0. The main difference with the compact case is that the identity representation is not normalizable. 35 An interesting feature that appears there is that for N = 2 JT supergravity, the shift between the vacuum and the continuum disappears (in technical terms, the Weyl vector for the supergroup OSp(2|2, R) vanishes). It would be interesting to see whether in this case the anyon fusion rules are more in line with the compact case.
Comparison with quantum bulk entanglement entropy. Finally, we compare our result with those obtained in semi-classical gravity. This involves working in a bulk semi-classical expansion 36 in G N where the relevant notion of bulk black hole entropy is the generalized entropy [109][110][111] S gen = Area 4G N,bare (Λ) containing a classical area piece, plus possible corrections of local integrals of combinations of the Ricci scalar and the extrinsic curvature at the entangling surface, combining into the Wald entropy [112]. The quantum loop effects S vN across the entangling surface are of the form discussed earlier (5.1) . Both types of contributions to (5.11) are cut-off Λ dependent and divergent, but their sum is expected to be finite and typically interpreted as renormalizing G N and the couplings of higherderivative gravitational terms added to the effective action. This procedure underlies the slogan that gravity is expected to make sense of QFT entanglement entropy, by providing an effective physical regulator [2]. This expectation has recently been supported by abstract arguments based on von Neumann operator algebras [87,113], building on [114,115].
In the context of AdS/CFT, quantum error correction provided significant insights into the holographic nature of these kinds of formulas [116]. In particular, this perspective stresses the relevance of the code subspace, as a subspace embedded in the full UV complete H physical where an emergent bulk geometric description together with a bulk effective QFT describing small energy excitations is reliable. In usual discussions, the "dimension" of the code subspace is much smaller than the full Hilbert space. Thus, one does not have access to the UV degrees of freedom in the bulk. However, when the size of the code subspace equals the size of H physical , and we have reached the UV-scale Λ Planck , the Wald entropy term in (5.11) disappears, and the entanglement entropy should be entirely quantum. In the above notation, this is the finite quantity S vN (Λ Planck ). This is precisely the result in our gravity proposal (4.69). At the Planck scale, the gravitational degrees of freedom become visible and one just computes their von Neumann entropy, instead of the semi-classical area term. In our scenario, we have accounted for these gravitational degrees of freedom as edge states instead.
We stress this does not mean our proposal has a full UV-complete description of all gravitational physics. We do have an effective quantum description of the Hilbert space that can count the black hole microstates correctly, in a low-energy description [15]. To better appreciate this last point, it may be useful to observe an analogous phenomenon in the study of topological phases in condensed matter physics. There is a variety of UV-complete lattice models (Kitaev's Toric code [117] and the Levin-Wen models [118]) exhibiting topological order in their ground state. Since the Hilbert space manifestly factorizes, the entanglement entropy can be computed directly from the microscopic degrees of freedom. However, one can also appeal to the description of the ground state as a network of anyon Wilson lines [118,119], 37 in which the entanglement entropy is determined by anyon fusion category data. Our 3d gravity calculation of the entanglement entropy is analogous to the one provided by the anyon worldline description. In particular, each anyon excitation R that crosses the entangling surface contributes an entanglement entropy of log dim q R. Notice that in the lattice model, the quantum dimension does not count the dimension of the microscopic Hilbert space: instead it measures the dimension of a non-local Hilbert space which arises as the fusion space of anyons with label R. This fits well with the bulk gravitational picture, where there are no local degrees of freedom: as a result the usual QFT entanglement due to UV-modes near the horizon is absent in the gravitational computation. Instead, "long-range" entanglement makes up the entire contribution to the gravitational entanglement entropy.

Wilson line factorization in Chern-Simons theory
Our earlier discussions showed that quantum group symmetry plays a crucial role in labeling the edge states required for factorizing 3d gravity. In the context of CS theory, we also saw it was natural to introduce the defect entropy S def in (5.7). One can ask whether there exists a factorization map which only cuts the Wilson line degrees of freedom (and not the vacuum contribution), and provides a canonical definition of S def in terms of a reduced density matrix. Here, we briefly comment on this question and supplement this perspective with a more explicit form of the gravitational Chern-Simons wavefunctions and their factorization across an entangling surface.
The results of [120,121] imply there exists a factorization map cutting only the Wilson line degrees of freedom provided we introduce anyon edge modes transforming under a q-deformation of the gauge group. A q-deformed entanglement entropy can then be defined which counts the quantum dimension of the anyon: In this formula, ρ R is the reduced density matrix for a Wilson line in a fixed representation R, and Tr q is a quantum partial trace which is defined to be invariant under the adjoint action of the quantum group surface symmetry. This q-deformed notion of entanglement entropy has also been used to measure entanglement on spin chains with quantum group symmetries [122].
To illustrate these ideas, we will here use the results of reference [28], which give explicit Chern-Simons wavefunctions in the presence of punctures corresponding to the endpoints of Wilson line insertions. 38 In the canonical quantization of Chern-Simons theory, the two spatial components A a i (x), i = 1, 2 = r, ϕ are conjugate variables. In the Schrödinger representation, wavefunctions depend on the "position" component, which we pick to be A a 1 (x). Moreover, Gauss' law requires the wavefunctions to be gauge-invariant, which implies they only depend on A a 1 (x) via the holonomy variable U : be the vacuum wavefunctional of the Chern-Simons theory on a spatial cylinder with no Wilson line insertions. An explicit expression can be written down, but it will not be needed here. If the cylinder is heuristically identified with a Cauchy slice connecting the two asymptotic boundaries, 39 the insertion of a Wilson line in the irreducible representation k connecting the boundary points y L and y R produces the wavefunctionŴ (5.14) 38 Technically, the Chern-Simons description of bulk gravity goes beyond the scope of reference [28], which restricts to compact gauge groups, since gravity requires a theory of SL(2, R) Wilson lines. The proper TQFT-like framework underlying our gravitational Chern-Simons description was developed mainly by J. Teschner and collaborators, see e.g. [123,124], and generalizes the usual formulation in terms of modular tensor categories which is appropriate to the case of compact gauge groups. 39 This is heuristic because the gravitational Wilson line is what produces the ER bridge connecting the two sides to begin with.
HereŴ i L ,i R is the matrix element of a Wilson line operator acting as an operator on the above Hilbert space of wavefunctionals: The L k a are the generators of SL(2, R) in the irreducible representation k, and the objectsÂ a i (x) are quantum operators satisfying the canonical commutation relations for Chern-Simons theory. We view (5.14) as a "position space" realization of the two-sided states in our gravitational Hilbert spacê where the matrix indices i L , i R correspond to the asymptotic AdS 3 boundary conditions. Reference [28] shows that this wavefunctional can be "split" as: Here, for each a and s,V −1 as (y L ) is an operator carrying the quantum numbers of the puncture at y L associated with the representation k of the gauge group G. It can also be interpreted as a Wilson line from some arbitrary (common) reference point to the point of interest y L . The left index a transforms as an ordinary representation of G, whereas the right index s transforms under the q-deformation of G. The latter can be shown by braiding the punctures around each other: this operation transforms the index s by the monodromy matrix associated with the relevant quantum group [28]. In the context of our gravitational theory, we have labeled the left index by a = i L , as it corresponds to the particular Kac-Moody generator that is fixed by the asymptotic AdS 3 boundary conditions. Similarlŷ V sa (y R ) carries an ordinary group index a on the right, and a quantum group index s on the left. The contraction of the s indices is what makes the quantum group symmetry hidden: the quantum group symmetry cannot be detected in the bulk theory because all states transform in its singlet representation.
Equation (5.17) should be viewed as a concrete realization of our factorization map (4.61): the gravitational Wilson lineŴ k i L ,i R is factorized with quantum group edge modes labeled by s. This is consistent with our discussion in section 5.1, where we pointed out that the correct gravitational bulk factorization should cut only the Wilson line degree of freedom and not the reference background represented here by the wavefunction Ψ 0 [U ].

Gravitational shrinkability and conical singularities
The distinction between gauge theory and gravity, encoded in the gravitational shrinkability condition, can be given a clean physical interpretation in terms of partition functions with conical defects. Let us elaborate on this calculation.
Let us go back to the defect Wilson line insertions within the solid torus partition function. Analytically continuing (2.42) λ → iθ, leads to the amplitude: Geometrically, this corresponds to a conical defect inserted in the Euclidean time direction. We will write down the corresponding classical (saddle) metrics below.
For the specific case when θ or θ are integers, the expression (5.18) changes. Indeed, inserting the ((1, n), (1, n )) degenerate Virasoro representation, corresponds to setting θ = n and θ = n , and leads to a different measure: The classical metric description corresponding to the insertion of these defect Wilson lines for representations satisfying n = n is, setting β = 2π here for simplicity: This has a conical periodicity in the (τ, ρ) plane of 2πn. Similarly, defect Wilson lines in representations satisfying n = n correspond to spinning conical defects. The Euclidean section of this geometry has a complex metric (dt = −idτ E ) as usual:

21) with a conical singularity of periodicity 2π
√ nn in the plane (τ E , ρ), whereτ E is the direction along which dϕ = −i n−n n+n dτ E in the (τ E , ϕ) plane, normalized such that τ E =τ E along this direction. Note that this geometry becomes real in Lorentzian signature.
We need to make one important modification to the amplitude (5.19). The actual evaluation of the Alekseev-Shatashvili path integral that would lead to (5.19) is formal: as soon as θ > 1, (or n ≥ 2), unstable modes appear in the one-loop fluctuations, and the extremum becomes a genuine saddle. The expression itself (5.19) is a bit formal from that perspective but can be motivated by other means.
Dealing with negative modes in the Euclidean gravitational path integral is an old problem that dates back to [125,126], where a simple proposal was made to complexify the unstable modes, making them stable again. Going through this process requires an extra factor of i per such unstable mode, coming from the det −1/2 fluctuation determinant. Increasing n by 1 leads to 2 extra modes that become negative. This leads to a factor of (−1) in the path integral coming from the inverse square root of the quadratic operator. This is the same type of procedure as in [125].
Hence for a chiral sector with a defect (1, n), the effective spectral density factor in the amplitude (5.19) becomes (up to a factor of 4 √ 2): The above results let us stress the important differences between the first-order gauge theoretic formulation and the second order formulation of gravity. These can be made visible especially in lower dimensional models where we have sufficient control over the computations. Indeed, in JT gravity, an intuitive argument was given in [127] on how to go back from the JT spectral measure to the correct Plancherel measure of the full group SL(2, R). Armed with the above discussion on defects in 3d gravity, we can mirror this argument and use it to conjecture a new q-deformed measure for SL q (2, R).
In the gauge theory formulation, Wilson line defects with unit monodromy matrix as one goes around the Euclidean time cycle require θ, θ ∈ N [128]. However, in gravity, only the case n = n = 1 is a geometrically smooth configuration. Indeed, any other value of n or n yields a (rotating) conical defect as illustrated above.
What we learn from this discussion is that going back from gravity to gauge theory requires forgetting these winding numbers again by summing over n, n ∈ N. Since these two integers are independent, we can focus on a chiral sector to go through the argument. Summing the resulting spectral densities (5.22), we regularize the expression by including an exponential dampening factor e −2πrn , r ≥ 0 and resum: Letting r → 0, we get the effective measure: ρ(s) = tanh(πb −1 s) sinh(2πbs). (5.24) This object has the following properties: • The double-scaling limit reproduces the correct group-theoretical Plancherel measure for SL(2, R). This makes us interpret (5.24) as the quantum dimension of the principal series representations of SL q (2, R), with standard deformation parameter q = e πib 2 . Notice the asymmetry of (5.24) under b → 1/b. This is in stark contrast to the sinh(2πb −1 s) sinh(2πbs) measure of the modular double governing gravity, which by definition has this symmetry.
• This quantum dimension makes an appearance as the modular S-matrix of the characters of the corresponding Kac-Moody algebra sl(2, R) [129][130][131]. In particular, the right hand side of (5.23) is a candidate formula for the quantum dimension of the same set of representations of the universal cover of SL q (2, R).
To sum up, the gravitational shrinkable boundary condition excludes bulk geometries with a conical defect at the entangling surface. On the other hand, these conical defects are naturally summed over in the gauge theory with gauge group PSL(2, R) ⊗ PSL(2, R). Thus, the measure for gauge theory and gravity differs in an essential way, leading to a different choice of bulk edge modes.

Summary
Gravity and gauge theory differ in the implementation of the shrinkable boundary condition at the entangling surface. The gravitational entanglement entropy does not contain contributions from the fluctuations parallel to the entangling surface (descendants), because gravity does not contain the local degrees of freedom which produce the reference vacuum entanglement entropy across the horizon. We illustrated this last statement by the analogy with anyon defect entropy, and the splitting of a Wilson line on top of the vacuum. We also showed that the absence of conical singularities in the Euclidean 3d bulk is what distinguishes the gravitational description from the gauge theory formulation.

Gravity and gauge theory as extended TQFT
Our earlier discussions on factorization in gauge theory and 3d gravity relied on group theory and path integral considerations. Here, we retake the issue of factorization with an emphasis on the categorical formulation of symmetry and path integrals, in an attempt to explain and unify, in a relatively selfcontained and abstract way, some of the statements we made in the previous sections. There are two reasons for introducing this level of abstraction.
First, to understand the meaning of splitting Wilson lines in representations of SL + (2, R) or SL + q (2, R), we must appeal to a more abstract notion of a symmetry: a generalized symmetry G is a space defined by the (generally noncommutative) algebra F(G) of functions on G. As in the commutative case, F(G) can be identified with a dual category of representations Rep(G). 40 In physical applications, one is often first presented with the latter, which contains data such as the Plancherel measure and fusion rules, without knowing exactly what G is a priori. Thus it is useful to view the representation category as a definition of G.
Second, while identifying the factorization map (1.1) as a co-product of a generalized symmetry G imposes algebraic constraints from the Hopf algebra structure of F(G), these constraints have a priori no relation to spacetime locality. On the other hand, the Euclidean path integral does impose local constraints on the factorization map. To incorporate the latter, we appeal to a categorical formulation of the (Euclidean) path integral called extended TQFT, in which spacetime locality is captured by sewing relations. Geometrically, these sewing relations express the rules for the consistent cutting and gluing of spacetime subregions. Crucially, extended TQFT translates subregions and their gluing rules into abstract objects and algebraic relations. It thus provides a fundamental substrate from which spacetime "emerges".

Extended TQFT and factorization
We now explain how the framework of (extended) topological quantum field theory (TQFT) unifies the group theory and path integral formulation of factorization described so far. 41 In a TQFT, the path integral is replaced by a set of algebraic data that satisfy constraint equations capturing spacetime locality. A familiar example of this viewpoint is given by the modern formulation of a conformal field theory. Rather than appealing to path integration over local fields, a CFT is defined by its spectrum of primaries and the OPE coefficients C ijk appearing in their three-point function (see e.g. [132]): The tensors C ijk are obtained by solving a set of sewing relations: this is the modular bootstrap program. When a Lagrangian presentation is available, the same OPE data can be obtained from the path integral on a sphere with three insertions, or equivalently, the "pair of pants" diagram. Sewing relations arise from different slicings of the same manifold. For example, crossing symmetry corresponds to equating two different slicings of a sphere with 4 holes in the path integral perspective. This is equivalent to the associativity constraint satisfied by the algebra defined by the tensors C ijk .
We want to take a similar perspective with the path integral (3.20) computing our factorization map. Compared to the pair of pants cobordism, our factorization map has additional labels determining the boundary conditions at the physical and entanglement boundaries. For example, in d = 2, the most general factorization map is given by a 6-index tensor: Instead of computing this path integral directly, we shall obtain it by solving the sewing relations of an extended TQFT, which include the shrinkable boundary condition. In 2d, the sewing relations imply the extended TQFT is a Frobenius algebra [133,134], and the factorization map is its co-product. A Frobenius algebra is an associative algebra equipped with a trace that we denote as Tr Fr . The aforementioned unification of the path integral and group theory factorization refers to the following statement: the same factorization map serves as a co-product of a Hopf algebra (as discussed above eq. (3.14)) and as a co-product of a Frobenius algebra. The former captures the group multiplication axioms whereas the latter captures the sewing relations of the extended TQFT.
Besides providing a definition of local factorization, 42 the extended TQFT can be formulated in a higher category language that is useful for capturing the parallel structure between low-dimensional gravitational theories and their gauge theory counterparts. In this framework, the boundary labels are viewed as objects in a category of boundary conditions. For example, in 2d gauge theories, this boundary category is the category of algebras, and the entanglement boundary condition e corresponds to the group algebra C[G S ] of the surface symmetry group. Since in a 2d extended TQFT, all amplitudes can be reconstructed by the category assigned to a point, the TQFT itself can be defined by its boundary category. 43 The boundary category thus provides a precise mathematical definition of the bulk gravity theory. For example, in 2d, by replacing the ordinary surface symmetry group of 2d YM or BF by SL + (2, R), we can define an "SL + (2, R) gauge theory", which can be viewed as a formulation of JT gravity. Similarly, in 3d, we propose an analogous construction in which SL + (2, R) is replaced by its q-deformation SL + q (2, R). In section 6.4, we will comment on hints that the resulting bulk theory corresponds to an extension of the Teichmüller TQFT, which was developed in [31,137].

Definition of a (closed) TQFT
Heuristically, a topological field theory is a map: This idea is most naturally formulated in the language of category theory. In particular, a ddimensional (closed) TQFT is a functor between the geometric category of d-dimensional cobordisms to the category of complex vector spaces. The objects of Bord closed d,d−1 are (d − 1)-manifolds and the morphisms are the d-dimensional cobordisms, while the objects of Vect C are vector spaces and the morphisms are linear maps between them.
More explicitly, Z is a rule that maps [138] • every closed, oriented (d−1)-manifold Σ to a vector space Z(Σ) over C. The empty set is mapped to C and disjoint unions of manifolds are mapped to the tensor product of vector spaces.
• every d-dimensional cobordism B between two closed (d−1)-manifolds Σ in and Σ out to a complex linear map Z(B) : Z(Σ in ) → Z(Σ out ).
These "two tiers" are related by the fact that a d-manifold B with only an outgoing boundary Σ out is mapped to Z(B) ∈ Z(Σ out ). This rule follows from the fact that B is a cobordism from the empty set into Σ out , and the corresponding linear map Z(B) : C → Z(Σ out ) is just a choice of an element in Z(Σ out ). The functorial property of Z implies the gluing of cobordisms along the in/out boundaries is mapped to composition of linear maps. Intuitively, this means a TQFT provides a linear representation of manifolds.
To illustrate these ideas, consider the case of d = 2. In this case the d − 1 manifolds are disjoint unions of circles, and the cobordisms are "closed string" worldsheets with circular ingoing and outgoing boundaries. All 2d closed, oriented manifolds can be generated by gluing a finite set of cobordisms (read from top to bottom): , , , . (6.5) The vector space Z(S 1 ) ≡ H S1 is endowed with a multiplication rule due to the pair of pants cobordism, which gives the analog of the OPE coefficients: : H S1 ⊗ H S1 → H S1 , This makes H S1 an algebra, with a unit, co-unit, and co-product given by the 3 rightmost diagrams of (6.5). The properties of this algebra are given by the sewing relations of Bord closed d,d−1 . These ensure that different ways of cutting up a manifold into the generators (6.5) should give the same partition function when gluing them back together. These TQFT sewing relations imply that H S 1 is a commutative Frobenius algebra [133,134].
A simple example is given by a "classical limit" of a 1+1d rational CFT, in which we take all primary dimensions h i,j,k to go to zero. Then the OPE coefficients C ijk go to the structure constants c ijk of a TQFT (see e.g. [139]).

Extended open-closed TQFT in 2d
For applications to the two-sided black holes in JT and 3d gravity, we need to introduce (d − 1)manifolds with boundaries. These codimension-2 boundaries are decorated by a label denoting an abstract boundary condition. This is a familiar aspect of boundary conformal field theory in 2D, where a spatial boundary is labeled by a conformal boundary condition that satisfies a set of sewing constraints [140]. An extended TQFT incorporates the extra structure associated with codimension-2 or higher boundaries into the TQFT framework. Different formulations of extended TQFT exist in the mathematical literature. The approach we follow in this work, based on a version called "open-closed" TQFT [141,142], is tailored for computations of entanglement entropy.
As before, we begin by introducing these ideas in d = 2. An open TQFT is a functor Z where Bord open 2,1 is a geometric category whose objects are intervals a b with labeled endpoints, and the morphisms are cobordisms between these intervals. A vector space H ab is assigned to a labeled interval, and a cobordism maps ingoing intervals into outgoing intervals. The open TQFT makes a distinction between the "gluing" boundary corresponding to the initial and final slice, and the "free boundary" which describes the time evolution of the interval endpoint where a boundary condition is assigned. Notice that open cobordisms satisfy a superselection rule for the boundary labels : these are always unchanged along a free boundary. As in the closed TQFT, the total Hilbert space ⊕ a,b H ab of the open TQFT forms a Frobenius algebra, with the "open string fusion" (second diagram of (6.8)) as the multiplication rule. However in this case the Frobenius algebra need not be commutative.
We have now defined two Frobenius algebras describing the closed and open sector of a TQFT "path integral". The combined, open-closed TQFT relates these two sectors via algebra homomorphisms which split the circle into an interval and vice versa: a , a (6.9) The resulting combined open-closed TQFT satisfies sewing relations making the total Hilbert space ⊕ a,b H ab a knowledgeable Frobenius algebra [143].

The higher category viewpoint and the boundary category
The gluing of manifolds along codimension-2 boundaries introduces a higher categorical structure that we now explain. The idea is to treat the labeled codimension-2 surfaces as objects in a geometric 2-category Bord d,d−1,d−2 , and iterate the same structure that was previously associated with (d − 1)dimensional objects. In particular, the 1-morphisms of this category are (d−1)-dimensional cobordisms between these (d − 2)-dimensional objects. Gluing along (d − 2)-manifolds corresponds to composition of these 1-morphisms. For d ≥ 3, we can have a (d − 1)-manifold M with a single outgoing boundary ∂M . In this case the TQFT assigns to M an object Z(∂M ) of the boundary category B s . The ddimensional cobordisms are now viewed as 2-morphisms (morphisms between 1-morphisms), and the composition of these 2-morphisms corresponds to gluing along (d − 1)-manifolds. These two types of gluing satisfy natural compatibility conditions. Let's illustrate these ideas in d = 2. The objects of Bord 2,1,0 are labeled points and the 1morphisms are labeled intervals a b . The composition of these 1-morphisms is determined by the open string fusion, which satisfies the requirement of associativity. The 2-morphisms are strips swept out by an interval: a b (6.10) The compatibility condition says we can interchange the order of vertical versus horizontal gluing. In higher categorical language, a d = 2 extended TQFT is defined to be a functor where B S is a 2-category of boundary conditions. For the d = 2 examples considered in this paper, B S is the category of algebras, with bimodules as the 1-morphisms and bimodule homomorphisms as the 2-morphisms [136]. 44 The composition of 1-morphisms is the relative tensor product of modules, which coincides with the entangling product (3.4). What do we gain by this higher categorical description? Note that in any dimension the extension can be iterated all the way down to a point, allowing us to consistently glue along manifolds of all codimension. This increases the computational power of the TQFT when d ≥ 3. The enhanced computational power arises because the mathematical structure becomes more refined as we go to higher codimensions, capturing more information about the total theory. For the particular d = 2 and d = 3 theories we consider, the partition functions, Hilbert spaces, and quantum information measures can be fully determined by the boundary category assigned to a codimension-2 surface, i.e. an entangling surface. 45

The shrinkable boundary condition in extended TQFT
To discuss entangling surfaces, we introduce the shrinkable boundary condition e into the open-closed TQFT formalism. For simplicity, consider first the open-closed TQFT with only this boundary condition. Thus there is a single interval Hilbert space H ee with the multiplication rule e e e : H ee ⊗ H ee → H ee , (6.12) required to satisfy all sewing relations of a knowledgeable Frobenius algebra. In addition, we impose the shrinkable boundary condition given by [30]: This implies all holes created by the e boundary can be closed. The factorization map on the interval is then given by the co-product of the Frobenius algebra H ee : e e e (6.14) 44 In 2d BCFT, one would view the objects of B S as conformally invariant boundary conditions, and the 1-morphisms as boundary condition changing operators. This defines a vector space H ab = Hom B S (a, b), where a, b labels Cardy boundary states. 45 In fact, the cobordism hypothesis states that a fully extended TQFT is completely determined by what it assigns to a point.
For 2d gauge theories, we give an explicit realization of the Frobenius algebra H ee in appendix D. 1. In the open-closed TQFT formalism, the e label essentially turns a "free" boundary into a gluing boundary along which we can fuse or split an interval using (6.14) and (6.13). As we alluded to in section 3.2, this should be viewed as cutting and gluing along a codimension-2 entangling surface. This is a useful way to view codimension-2 gluings because it gives an open TQFT interpretation to any replica calculation of entanglement entropy on a closed 2d manifold: one simply introduces holes with the shrinkable boundary condition at each connected component of the entangling surface. In particular, the sphere can be interpreted either as a "closed string" amplitude, or an "open string" trace as shown in (3.23). The extended TQFT language provides a precise algebraic description of this type of open-closed duality. As illustrated in section 4, such a duality provides a mechanism by which the Euclidean gravity path integral can "know" about black hole microstates.
Since this is an important point, let us spell out the details. First, consider computing Z(S 2 ) in the unextended TQFT by making a codimension-1 cut along the equatorial circle. Z(S 2 ) is then obtained by composing the unit = with the co-unit Tr Fr (·) = , (6.15) which is the trace function for the closed Frobenius algebra H S1 . This gives Z(S 2 ) = Tr Fr (1). (6.16) These operations are fixed by the Frobenius algebra corresponding to the closed TQFT. However the trace (6.16) corresponds to the evaluation of an amplitude in the "closed string channel" and is not relevant to counting quantum states. On the other hand, a state-counting interpretation of Z(S 2 ) can be obtained by introducing codimension-2 cuts along the equator. This is achieved by applying the factorization map to the unit, which gives a cobordism describing the "thermofield double state": Coset and shrinkable boundary conditions. In the fully extended higher category description of 2d gauge theory, a point is assigned to the category of algebras. In particular, the shrinkable boundary label e corresponds to the object C[G], viewed as a Frobenius algebra: we refer the reader to [136] for the details of this construction. Here, we observe that the Peter-Weyl theorem implies that the interval Hilbert space H ee = L 2 (G) is indeed a bimodule of C[G], consistent with the definition of 1-morphisms in the category of algebras, as stated below (6.11). The relative tensor product which describes the composition of 1-morphisms just corresponds to the entangling product defined by the surface symmetry group G. Consider now a subgroup H. In the extended TQFT language, two objects e, H are introduced in the boundary category B S of algebras. These correspond to the group algebras C

[G], C[G/H].
Following the TQFT rules, a bimodule of these algebras is assigned to the intervals e H and H e . Using the relative tensor product, these two intervals can be glued along the endpoint labeled by e. This is the entangling product producing the interval H H and the Hilbert space The coset boundary condition H is relevant to the one-sided black hole states in JT and 3d gravity, where the gluing process just described provides a categorical description of how entanglement generates spacetime, or ER=EPR.

JT gravity as an extended TQFT
Let us now apply the extended TQFT paradigm to JT gravity. As alluded to earlier, we interpret e as the semi-group algebra C[SL + (2, R)]. The interval Hilbert space H ee is a bimodule of C[SL + (2, R)], which we identify as the space of functions on the semi-group H ee = L 2 (SL + (2, R)). (6.20) As we saw previously, this space supports the left-right regular representation (3.8) of the semigroup, and has a basis given by representation matrix elements of SL + (2, R) (4.20). In this basis, we can define the Frobenius algebra structure of H ee by These are formally identical to the cobordism generators of two-dimensional gauge theory, except that the representation basis have continuous labels. From a formal point of view, this modification does not alter the sewing relations provided that we account for the associated volume factors. For this reason, this set of cobordisms define a Frobenius algebra just as in the compact case. One aspect of the JT TQFT that is a bit more subtle than the compact case involves the identification of the unit element in the Frobenius algebra with the unit element of the group: For compact groups, this follows directly from the delta function identity: − 1), (6.23) which in turn follows from the completeness relation satisfied by the characters , (6.24) with g set to the identity, and the delta-functions on the right hand side only contain the contribution from the maximal torus. For the Frobenius algebra associated to JT gravity, (6.22) is still true provided we define the characters in (6.24) with respect to the appropriate measure. Notice also that the "closed string" cap state corresponds to the identity element (6.22) of the Frobenius algebra. This is made explicit by mapping the full disk to the half disk using one of the sewing relations of the extended TQFT: Coset boundary conditions in JT To capture the two-sided geometries in figure 5, we introduce the asymptotic boundary labels i R , i L , which are the gravitational analog of the coset boundary labels H described at the end of section 6.2. The extended TQFT assigns the right quotient algebra C[SL + (2, R)/ ∼] to the boundary label i R and the analogous left quotient to i L . The two-sided Hilbert space H i L i R is then the 1-morphism corresponding to the bi-module of these algebras given by Similarly, the one-sided Hilbert spaces H ei R = L 2 (SL + (2, R)/ ∼) are bimodules on which e and i R act by left and right multiplication. We can think of each element g ∈ SL + (2, R)/ ∼ as a Wilson line connecting the bifurcation surface with the asymptotic boundary. The composition of one-morphisms that glue H ei R to H i L e into H i L i R can be viewed as a categorical description of how entanglement generates spacetime, or ER=EPR. This more abstract perspective is useful in this situation, since defining an explicit path integral over SL + (2, R) gauge fields is difficult due to the non-local constraints that one has to impose on the gauge field. For 3d gravity, we will have to suitably q-deform these objects.

3d gravity as an extended TQFT
In three dimensions, the boundary category which defines an extended TQFT is a modular tensor category. For Chern-Simons theory with compact gauge group G, this is usually taken to be the representation category of the loop group LG. As reviewed in appendix D.2, the Hilbert space factorization, shrinkable boundary condition, and computation of entanglement entropy can be defined within the extended TQFT framework: in particular the entanglement edge modes are identified with elements of the representation category Rep(LG).
Since we have identified SL + q (2, R) × SL + q (2, R) as the edge mode symmetry of bulk 3d gravity, it is natural to ask whether there exists a corresponding extended TQFT with a boundary category given by Rep(SL + q (2, R) × SL + q (2, R)). A natural candidate for such a TQFT is given by the Teichmüller TQFT [31]. This is the TQFT defined via the quantization of Teichmüller space, which is the classical phase space of 3d gravity [137,144]. 46 More precisely, canonical quantization of Teichmüller space on a Riemann surface Σ introduces a representation of the mapping class group (large diffeomorphisms), and it is well known that such a "modular functor" defines a 3d TQFT [145]. Concretely, the quantization of Teichmüller space on Σ gives rise to the Hilbert space of Virasoro conformal blocks 47 on Σ, and the fact that these conformal blocks define a modular functor means that they satisfy a continuum version of the modular bootstrap equations [84]. There is a wealth of evidence suggesting that Rep(SL + q (2, R)× SL + q (2, R)) defines an analog of a modular tensor category which underlies the Teichmüller TQFT. In particular, the fusion rules and F -matrices dictated by the Virasoro modular bootstrap are given by the Clebsch-Gordon decomposition and 6j-symbols of Rep(SL + q (2, R) × SL + q (2, R)). 48 The identity Wilson line and the entanglement boundary state Finally, we address one well known feature of the Teichmüller TQFT that might raise concerns about its viability as our gravitational TQFT. Unlike the compact case, the Teichmüller TQFT does not contain the identity Wilson line. This is related to the fact that the spectrum does not contain the vacuum Virasoro block, defined by a path integral on a solid torus with an identity Wilson loop inserted. This seems like a serious defect in the context of entanglement calculations; the entanglement brane boundary state associated to our factorization of the BTZ black hole is given by such a solid torus path integral, in the limit that it shrinks to zero size. However, we circumvented this problem by applying a modular transform to the vacuum block, leading to a superposition of heavy Virasoro blocks with a density of states given by the SL + q (2, R) Plancherel measure. This gives the entanglement boundary state |e ≡ dp 4 √ 2 sinh(2πbp) sinh(2πb −1 p) |p , (6.27) which dimensionally reduces to the entanglement boundary state in JT gravity corresponding to a bulk disk path integral.

Summary
We reviewed how Hilbert space factorization can be embedded within the framework of extended TQFT, emphasizing a more abstract categorical perspective that we argue to be applicable to both gauge theories and gravity in d=2 and 3. In its standard formulation, the extended TQFT framework assigns a boundary category B S to any closed oriented codimension-2 manifold S. In d = 3, B S corresponds to a category of representations. Furthermore, a codimension-1 manifold V ending on S is assigned to an object of the category B S . For example, for Chern-Simons theory with a compact gauge group, this is a representation of G S . In physical terms, this is a Hilbert space H V of the bounded region V . These facts are summarized in Figure 13. Figure 13: The extended TQFT assigns a boundary category B S to a circle S, and an object H V ∈ B S to a region V bounded by S.
To provide a precise framework for the emergence of spacetime from entanglement, we embedded the Euclidean path integral calculations provided in section 4 into the extended TQFT formalism. In particular, we introduced codimension-2 entangling surfaces for which the associated representation category is determined by the shrinkability constraint. This constraint determines the gravitational edge modes necessary for the consistent cutting and gluing of spacetime subregions according to the rules of the extended TQFT. In this language, the ER=EPR paradigm reduces to the composition of morphisms. More generally, we proposed that the extended TQFT formulation of JT and 3d gravity provides the abstract algebraic structure from which classical geometry emerges.

Concluding remarks
We proposed an effective quantum mechanical model of 3d gravity with Λ < 0 based on the universal features of 2d holographic CFTs at high temperature. From the perspective of a microscopic AdS/CFT, our model is a theory of vacuum Virasoro blocks in the dual channel. While the bulk theory is 3d pure gravity, the boundary theory is given by the geometric action of Alekseev-Shatashvili [50,51] for a Diff(S 1 ) reparametrization field, with S 1 being the time coordinate. Instead of the usual Chern-Simons formulation, we argued the bulk Euclidean path integral should be defined as an extended TQFT with a boundary category given by Rep(SL + q (2, R) × SL + q (2, R)). In particular, this viewpoint reproduces the Bekenstein-Hawking entropy as the bulk entanglement entropy of gravity edge modes transforming under the quantum semi-group SL + q (2, R) × SL + q (2, R). As known from gauge theory, once one introduces surface edge states, the Hilbert space can be split. This means that the gravitational Hilbert space can be split at the expense of introducing gravitational anyons. The entanglement of these anyons then allows us to glue spacetime back together again, providing a concrete picture of how gravitational entanglement generates connected spacetime. Forgetting the exterior of a subregion, the gravitational entanglement entropy associated to it is the black hole entropy. In the TQFT framework, the magic that allows the Euclidean path integral to give the correct counting of black hole microstates is attributed to the TQFT sewing relations which constrains the cutting and gluing of the path integral along codimension-2 surfaces.
Our proposal is incomplete. First, we did not give a full description of the putative extended TQFT describing the 3d bulk theory. A natural candidate is given by the Teichmüller TQFT formulated in [31], since this is the unitary TQFT associated with the representation category Rep(SL + q (2, R) × SL + q (2, R)). 49 Perhaps the most direct way to see the connection between our formulation of 3d gravity and Teichmüller TQFT is to consider the state sum model, in which the Teichmüller TQFT on a hyperbolic 3 manifold is defined by gluing together tetrahedra that gives a triangulation of the 3-manifold. Such a state sum model defines an extension of the TQFT, since it must involve gluing along co-dimension 2 and higher surfaces (like the edges of the tetrahedra). The 6j-symbols for Rep(SL + q (2, R) × SL + q (2, R)) are naturally identified with the tetrahedra in the state sum model, with each edge labelled by a quantum group representation. Indeed, it has been shown that the semiclassical limit of the 6j-symbols for Rep(SL + q (2, R) × SL + q (2, R)) give the quantum volume of these hyperbolic tetrahedra, which is given by the exponential of the Einstein-Hilbert action [148]. This relation suggests that the gluing of cauchy slices along co-dimension 2 entangling surfaces correspond to the fusion of quantum group representations along the edges of the tetrahedra. We leave an explicit verification of this idea to future work. One way to test our proposal would be to see if it gives a consistent set of rules to compute bulk entanglement entropy on different states and with different bi-partitions. In particular, one might wonder if the same gravitational edge modes can reproduce the Ryu-Takayanagi formula via a bulk entanglement entropy calculation: the answer is affirmative and reported on in [149].
We have given a description of gravitational edge modes as anyons: we showed that the bulk entanglement entropy measures their quantum dimension in a manner that is consistent with the black hole entropy. However, our proposal does not provide a microscopic description of the edge modes. Similarly, our description of the subregion Hilbert was abstract: in particular, we did not give a realization of these states in terms of one-sided geometries. To understand the true implications of our proposal, we would need to make a connection to the microstates of the bulk string theory on AdS 3 × M 7 . As a first step in this direction, one might add the appropriate matter content due to reduction of string theory on M 7 , and ask how the SL + q (2, R) × SL + q (2, R) symmetry is modified. Finally, the TQFT language of local cutting and gluing can only take us so far in gravity. The complication has to do with the group of large diffeomorphisms that would spoil locality. In 2d, this is the non-trivial mapping class group on Riemann surfaces of more complicated topology, leading to non-trivial global considerations. For the application to 3d chiral gravity, see [150].
Edge states, hidden symmetries and superselection sectors. The Lorentzian interpretation of the inner boundary in the shrinkable boundary condition is the horizon of the black hole. Hence, the resulting density of states should correspond to the gravitational edge modes localized at the black hole event horizon.
The "hidden" property of the edge mode symmetry structure is consistent with the idea that edge modes are not accessible from an outside observer perspective, since it would require an infinite amount of time to measure them. 50 In a sense, edge modes can only be probed, when the system is cut or split into two pieces.
This picture is also consistent with the physical picture of edge modes in Maxwell gauge theory in Rindler space [72][73][74]. One expects that due to infinite redshift, all excitations localized at the black hole event horizon should have vanishing energy for the outside observer, in terms of which the temperature and energies are measured. An explicit mode analysis shows the existence of vanishing ω Rindler = 0 at the Rindler horizon ρ Rindler = 0 [74]. Such bulk localization is consistent with these modes not being accessible for these observers in finite time. Since they should commute with any other exterior bulk operator, they should introduce superselection sectors decomposing the bulk Hilbert space H bulk = α H α ⊗ Hᾱ. (7.1) In our 3d gravitational discussion, α labels irreducible representations of SL + q (2, R): the p ± labels describe the macroscopic properties of the black hole states, i.e. the energy H and angular momentum J. Since the gravitational edge sector is based on a non-abelian group structure, there are additional edge labels: the s ands are continuous microscopic labels counting the black hole degeneracy within a fixed "macroscopic" (p + , p − ) sector. Indeed, we already saw explicitly in JT gravity, see (4.34), that the density matrix is block-diagonal in all of these edge labels. An analogous property holds in 3d gravity.
These edge quantum numbers (p + , p − s,s) cannot be changed by any observer who only has access to the exterior of the black hole, or to the right half of the Hilbert space. This is obvious for the s,s quantum numbers since they are localized at the entangling surface. The macroscopic quantum numbers p ± can also not be changed at the entangling surface in a finite amount of time, since attempting to inject some energy and/or angular momentum into the system only succeeds in creating multiple regions with different p ± quantum numbers, without changing these quantum numbers at the black hole horizon. 51 Note that quantum group edge modes have been studied previously in the classical analysis of pure gravity edge modes, based on the covariant phase space formalism [151]. However, the quantum group that arose in [151] is the ordinary U q (sl(2, R)) and not the modular double associated to SL + q (2, R). It would be interesting to understand the relation between the two approaches.
Generalization to other models and higher dimensions. Since our work specifically applies to d = 3, it is a natural question to ask whether the extracted lessons may carry over to higher dimensions. In such systems, gravity includes dynamical degrees of freedom. However, in a perturbative regime in G N , these can be carefully described as a further contribution to the matter sector propagating in a given background. Thus, the origin of the gluing of spacetime is still expected to be carried by gravitational edge modes, with symmetry transformation properties which may appear as "hidden", to outside observers, as in our 3d context.
An important outcome of our work uncovered the lack of descendants at the entangling surface in 3d gravity. An equivalent statement is that the edge sector of 3d gravity has no quantum numbers describing fluctuations along the horizon. This rephrasing makes the potential generalization of this statement to other models and higher dimensions straightforward. To be concrete, let us compare this description of the edge sector to that of dynamical Maxwell theory, as studied in this language by [72][73][74]. In spacetime dimensions d ≥ 3, there are edge modes on the black hole horizon, in one-to-one correspondence with a surface electric flux perpendicular to the horizon: where x is the transverse coordinate along the black hole horizon and k is a (continuous) momentum label. Regularizing the black hole horizon with a brick wall boundary condition at ρ Rindler = , each edge mode labeled by k carries an energy leading to the total energy in the coherent edge state |E ⊥ , defined to be an eigenstate of the perpendicular electric field with eigenvalue (7.2): The fact that edge states are labeled by a transverse momentum label k immediately leads to a contribution to the entropy as S ∼ A/ d−2 . These tangential modes play the same role as the descendant labels in the 3d gravity story. Given the apparent similarity between the origin of edges states in 3d Chern-Simons models (reviewed in section D.2) and in Maxwell's theory in d ≥ 3, together with the absence of such edge sector in 3d gravity, we are lead to conjecture that no gravitational edge modes with non-trivial profile tangential to the black hole horizon exist in higher-dimensional gravity. It would be interesting to get more clues on how this could be proven more generally. 52 Towards more general formulations of the shrinkable boundary condition. It is not apparent how to formulate our approach for implementing the shrinkable boundary condition to higher dimensions. However, as reviewed in section 4.1, an alternative approach that generalizes more naturally to higher dimensions was given in [80]. Here one combines a local cutting map J and a defect operator insertion √ D to provide the factorization map in (4.4). Even though the statistical mechanical interpretation of the bulk entanglement entropy seems to be gone from this perspective, it has the advantage that such a defect operator is related to the area of the black hole. This relation can be understood via Carlip and Teitelboim's [155] off-shell formulation for the BTZ black hole. They showed that the phase space associated with the Euclidean cigar topology is enlarged to include the conical angle and horizon area as a conjugate pair. This implies that the horizon area operatorÂ generates translations in the conical angle. Therefore the defect operator which imposes a 2π cone angle can be identified with the operator D = exp(Â 4G ). A similar statement holds for higher dimensional black holes when we allow for a conical deficit at the Euclidean horizon [156]. It should be possible to obtain an explicit realization ofÂ in a subregion Hilbert space along the lines of [80]. Finally, it would be interesting to connect this Euclidean picture to the Lorentzian description of gravitational edge modes in [75]. Here, the conical angle becomes a boost, and the area operator originates from a gauge-fixed version of an SL(2, R) gravitational surface symmetry associated with the normal geometry of the entangling surface. We hope to report on these ideas in future work.
ST/T000600/1]. GW would like to thank the Aspen center for physics for hospitality while this work was being completed.

A Boundary correlators in doubled JT limit
In subsection 2.5, we identified a double scaling limit of our 3d gravity partition function leading to the squared JT gravity partition functions (2.44). As mentioned in the main text, this is an interesting observation on its own right. In particular, it is natural to describe the insertion of boundary matter operators, extending the known techniques in the JT limit. We briefly discuss this below.
Consider two identical operators O h,h , with conformal weights h andh, inserted on the boundary of the solid torus and consider the Euclidean grand canonical correlator: The set-up is illustrated in Figure 14. The regime of interest to relate to known JT expressions is the following: combined with a condition on the spectral gap being not too small: ∆ gap τ E , β−τ E . The above correlator can be written more explicitly as in terms of primary sphere three-point functions C OO1O2 , and Virasoro 2-point torus conformal blocks F h1,h2 andFh 1 ,h2 . The latter can be obtained by inserting complete sets of states between the operators, when evolving in the Euclidean time direction: where N 1,2 is the descendant label, |N 1,2 | its level, and where we normalized the primary matrix element h 2 |O|h 1 = 1 (since the OPE coefficient was explicitly extracted). We largely follow the notation of [65]. The diagrammatic representation of one of such blocks is drawn as: To proceed, we need to distinguish between two situations. One where our model is a proposal for 3d pure gravity as in section 2.4, and a second one as containing universal dynamics of 2d CFT in the regime sketched in section 2.2. Let's start with the first case. In the regime of interest τ E , β−τ E ∼ c 1, descendants scale out and the boundary correlator reduces to: Furthermore, for irrational Virasoro 2d CFTs with such weights, the sphere threepoint function is determined by the conformal bootstrap and explicitly given by a DOZZ-like formula [157,158], derived in [40]. In principle, we should compute the Euclidean path integral of the Alekseev-Shatashvili model of subsection 2.4 with bilocal operator insertions to prove this statement explicitly purely from the gravity perspective. We leave this to future work. This DOZZ-formula simplifies in the scaling limit [69] as [65] (where we set p ± i → bp ± i ): .
The resulting sum over primaries O 1,2 decouples into four integrals over p ± 1,2 : → #b 12 e β 12 +∞ 0 dp + 1 dp + 2 p + 1 sinh(2πp where we have not written some numerical prefactors similar as in (2.44). This expression is invariant under τ E → β −τ E . Notice that even though all dependence on ϕ gets scaled away in the double-scaled limit of interest discussed here, there is still an imprint of rotation on this doubled 1+1d JT system: the chemical potential µ is present and able to describe correlators probing a system with a rotating BTZ black hole as its saddle. Let us next consider the situation describing the universal dynamics of an irrational 2d CFT in the regime (A.2). Whenever ∆ gap τ E , β−τ E , no additional primaries beyond the vacuum contribute in the dual channel. This is the same argument as in subsection 2.2. In this channel, one inserts complete sets of states in the spatial ϕ-cycle instead, leading to an expansion in dual conformal blocks. In our case, the latter is dominated by identity blocks: 53 To proceed, we need to transfer this information by transforming the above torus two-point conformal blocks (A.4) between S-dual channels. Luckily this analysis has already been done for a chiral sector in [65], by applying a three-step sequence of fusion, modular S, and fusion transformations. Here we just apply it for both chiral sectors. The result for the boundary two-point function on the torus in terms of the conformal blocks (A.4) is: = DOZZ-like formula of [40]. (A.12) In the double-scaling limit (A.2), these blocks are further dominated by the primaries once again, and this expression reduces to (A.8). However, the expression (A.10) is fully valid in 3d, and is the boundary correlator on the solid torus for sufficiently small spectral gap. Note that this is the unnormalized correlator; the normalized one can be obtained by dividing by the partition function (2.12). Generalizations to higher-point functions and out-of-time ordered configurations can similarly be worked out, giving rise to results compatible with the doubled JT expressions in the double-scaling limit discussed in this appendix.

B Regularization of volume factors for non-compact groups
Following Appendix C of [81], we review and improve here a natural strategy to regularize the different volume factors appearing in section 4.2. Our discussion should hold for non-compact groups with a continuous set of irreducible representations.

B.1 Regularization of the representation dimensions
The main idea in Appendix C of [81] is to relate the Schur orthogonality relation holding for discrete representations R and R , with the delta-regularized orthogonality relation leading to the mathematically more accurate notion of Plancherel measure ρ(k) ≡ dim k for continuous representations. Here we associate R ↔ k. A formal comparison leads to Taking the trace in (B.1), and using (B.3), allows us to derive the orthogonality relation for characters This integral over G can be simplified using Weyl's integration formula: 54 where W is the Weyl group, and the Weyl denominator |∆(α)| 2 is the Jacobian in the change of variables on the group g → (α, h). The subgroup of conjugacy class elements C is a maximal torus in the group. For the specific case of a class function f , such as the characters in our set-up, we can simplify this formula into: Taking the unit function 1(g), we get the formal equality: V G = V C G/C dh , where V G is the volume of G and V C is the volume of a maximal torus (or a Cartan subgroup, or the subgroup C of conjugacy classes). 55 The last factor represents the volume of any fixed conjugacy class, which we write as the ratio V G /V C . We can hence rewrite (B.4) into: This leads to the formal relation δ(k − k) = V C /2π, which combined with (B.3) allows us to infer This equation explicitly extracts the "infinity" from the dimension of the representation, and makes manifest its k-dependence. 56 The existence of several types of inequivalent conjugacy classes for non-compact groups requires an additional sum over class types C i when applying Weyl's integration formula (B.5), as developed in a general theorem for reductive Lie groups by Harish-Chandra. This sum over class types C i carries over into the left hand side of (B.7). E.g. for the specific case of SL(2, R), these class types are elliptic, parabolic and hyperbolic. However, the elliptic conjugacy classes do not contribute to (B.7) since the elliptic characters of the principal series irreps χ k (α) vanish. The parabolic classes are of measure zero, and hence also do not contribute to the left hand side of (B.7). For the positive semi-group SL + (2, R), 54 Note that this is the compact version of Weyl's integration formula, which turns out to be correct as we explain in the next paragraph. 55 The Jacobian factor |∆(α)| 2 and size of the Weyl group |W | are part of the measure dα of the Cartan subgroup. 56 As a simple check, for the abelian group R, we have irreducible representation matrix elements e ikx and hence by (B.2) ρ(k) = 1/2π, and V G = V C , leading indeed to dim R = 1. elliptic conjugacy classes do not even exist [81]. We conclude that for the group-like structures of interest in the main text, equation (B.7) still holds but is restricted to the hyperbolic conjugacy class elements. These conjugacy classes are generated by the Cartan subalgebra: Hence V C is the volume of the maximal torus for the hyperbolic conjugacy classes. For the principal series irreps k of these group-like structures, we use a continuous basis of quantum numbers s to label states within the representation. Hence we formally have dim R = R ds. These equations are written in equation (4.30) in the main text.

B.2 The e-brane boundary state and the unit group element
For a compact group, we have the character completeness relations: where U is a group element in the maximal torus (or a conjugacy class). We can expand the (nonnormalizable) unit state |U = 1 in the irrep basis as: As an explicit example, for the compact group SU(2) we have the character completeness relation: where φ labels the different conjugacy classes. 57 Taking the limit φ → 0, we obtain the formal identity: (B.14) We can view (B.13) as the natural regularization of the above limiting identity. Let us now look at the same argument for the positive semigroup SL + (2, R). We start with a brief review on the principal series characters themselves, starting with the full group SL(2, R). The characters of the principal series irrep of SL(2, R) are computed by the following integral [93] where j = −1/2 + ik. Using that the character is a class function, we write for an element in the hyperbolic conjugacy class: 57 Note that φ and −φ are in the same conjugacy class: this is simply a swap of the two eigenvalues of the SU(2) or SL(2, R) matrix. We hence restrict to φ > 0 here without loss of generality.
where can be viewed as a regulator since the delta-function generically has two solutions for x unless = 0. 58 A better way to think about this is we should instead of R attach the point at infinity as R ∪ ∞, and allow for a "solution at infinity". Hence (B.17) The integral over x boils down to the fixed point of the group action. We have two fixed points, and the delta function evaluates to Hence If we specify to g = 1, then we would get from (B.15) the formal expression χ j (1) = δ(x − x) R dx, which is divergent both due to the proliferation of fixed points and the range of the x-integral. Instead letting φ → 0 in (B.19), the result diverges due to sinh φ → 0, as we approach the identity group element from the hyperbolic side. The characters of SL + (2, R) are only including a factor 1/2 compared to the full SL(2, R) manifold. This can be proven directly using the argument around footnote 21 of [81]. Alternatively, from the above computation, we restrict to x ∈ R + . This causes both fixed point locations x = 0 and x = ∞ to be at the integration endpoints, picking up an additional factor of 1/2 in the process. 59 We write again a completeness relation of these characters (B.20). By explicit calculation we have: Letting φ → 0, we obtain the limiting identity: This rather formal expression is given meaning as a limit of the well-defined relation (B.21). This expression is as expected: using our finite volume regularization, we replace R → V C 2π dk and dim R → 2πV G V C ρ(k) in (B.11), and we find the non-compact version: 58 See [127] for an analogous recent application of this calculation procedure to the supergroup OSp(1|2, R). 59 One might worry about the case φ < 0 picking up only one of the solutions of the delta-function. This is misleading however, since in the case the second fixed point is at x → −∞, which in the one-point compactification of R is identified with x → +∞.
where the delta-function on the maximal torus contains the Weyl denominator contragrediently to the measure factor: δ(U − 1) ∼ δ(φ) sinh 2 φ . Hence this indeed matches the above expression found from the character completeness relation.
The unit element state |U = 1 is then expanded in the representation basis as Indeed, using R → V C 2π dk and dim R → 2πV G V C ρ(k) in (B.12), we reproduce (B.25), and the overlap k|U = 1 = V G V C k sinh 2πk if we normalize the states such that k|k = δ(k − k ). We observe that the "closed string" e-brane boundary state, defined by the shrinkability constraint (4.19) in the main text, is precisely this unit group element state (up to a 1/V G normalization factor):

C Hopf algebra of functions on a (quantum) group
The properties of a group G can be captured by the algebra of functions on G. The latter is a Hopf algebra F(G), which has both a co-product and a product. The axioms satisfied by G can be translated into compatibility relations for the algebraic structure of F(G). A quantum group can be defined via a non-commutative deformation of F(G). The non-commutativity is encoded by the R-matrix. Below we review these algebraic structures.
Hopf algebra structure. The quantum group F q (G) is a quasi-triangular Hopf algebra. To explain what this is, we start with the simpler structure of a bi-algebra A, which is an algebra endowed with 4 operations product ∇ : A ⊗ A → A, These operations are required to satisfy compatibility relations [101]. In particular the product and co-product are associative and co-associative respectively. Our main example is the set F(G) of C-valued functions on a group G, where the operations are the following: f 1 , f 2 ∈ F(G), (C.2) η = 1 (the identity function), (C.3) ∆(f )(g 1 , g 2 ) = f (g 1 g 2 ), g 1 , g 2 ∈ G, (C.4) The first line is pointwise multiplication. Here g 1 g 2 denotes the group multiplication of g 1 and g 2 , and 1 G is the identity element of G. The definition (C.4) makes ∆ : F(G) → F(G × G), which is not what we want. By the Peter-Weyl theorem, providing a dense basis of F(G) in terms of the representation matrix elements R ab (g), we have the isomorphism F(G × G) F(G) × F(G) since its action (C.4) on a single basis element is: ∆(R ab )(g 1 , g 2 ) = R ab (g 1 g 2 ) = c R ac (g 1 )R cb (g 2 ) = c R ac ⊗ R cb (g 1 , g 2 ), (C. 6) making it an element in F(G) × F(G). Linearly extending then proves the isomorphism. We can hence summarize the above natural co-product as: The co-unit acting on representation matrix elements is: A bi-algebra structure is upgraded into a Hopf algebra by the introduction of an anti-homomorphism: S : A → A, S(f 1 f 2 ) = S(f 2 )S(f 1 ), f 1 , f 2 ∈ A, (C.9) called the antipode. For F(G), the natural definition is to act as the pullback of the inverse action: On a single basis element of F(G), we write S(R ab )(g) = R ab (g −1 ) = R −1 ab (g), (C.11) mapping a representation matrix element to its inverse. Depicting the group element as an oriented interval, the inverse map changes this orientation by diagrammatically twisting: : f (g) → f (S(g)), f (g) → f (S 2 (g)) (C. 12) In the underformed algebra, S 2 = 1, so the double twist is just the identity. Crucially, this will change under q-deformation.

R-matrix.
Adding an R-matrix to a Hopf algebra, makes it a quasi-triangular Hopf algebra. Given a vector space V carrying the "fundamental rep" of the group, the R-matrix can be viewed as a linear operator on the tensor product V ⊗ V : We should view V as the Hilbert space of an anyon, and the R-matrix applies a braiding operation to a pair of anyons. Given the co-unit and antipode S, it is heavily constrained to satisfy several relations among itself, and S, including famously the Yang-Baxter equation.
q-deformation of F(G). As a vector space, F(G) is defined over the complex numbers and spanned by the basis g i1j1 g i2j2 · · · g injn , n = 1, · · · ∞. (C.14) where g ij are the matrix elements in the fundamental representation of G. The co-product (C.6) in the fundamental representation can be written as: In the undeformed algebra, the matrix elements themselves commute: However, in the quantum group F q (G) this multiplication law (distinct from the matrix multiplication rule) becomes non-commutative. 60 The precise nature of the non-commutative product in F q (G) is determined by the R-matrix of the quantum group. To express the product rule it is useful to consider an element g as a matrix acting in the fundamental representation. Thus it acts on a vector space V according to If we analogously define matrices acting in V ⊗ V as g (1) = g 1 ⊗ 1, g (2) = 1 ⊗ g 2 , (C. 18) then the multiplication rule for the coordinate algebra is defined now using the R-matrix (C.13) as: Rg (1) g (2) = g (2) g (1) R, (C. 19) where the composition of the operators above is defined with ordinary matrix multiplication. If R is not trivial, the group elements g ij no longer commute. The non-commutative product defined by the R-matrix also implies that the antipode is no longer the usual inverse. However it still satisfies j g ij S(g jk ) = j S(g ij )g jk = δ ik . (C.20) Example: SL q (2). To illustrate these definition, consider the quantum group SL q (2). Its coordinate algebra is generated by 4 elements (a, b, c, d)  (C.22) 60 It is customary to abuse language and refer to both the "quantum space" Gq and the deformed algebra of functions Fq(G) as the quantum group.

D Examples of extended TQFT
We review the extended TQFT formulation of 2d gauge theories and Chern-Simons theories.

D.1 2d gauge theory
Two-dimensional YM or BF theories with compact gauge group G can be formulated as an extended TQFT. In the open-closed TQFT description, the Frobenius algebra H ee associated to the interval is the group algebra C[G]. This is the algebra with basis states |g labeled by group elements, sum defined as i α i |g i , α i ∈ C, and the product |g 1 · |g 2 = |g 1 g 2 and linearly extending. The Frobenius form Tr Fr (g 1 ·g 2 ) ≡ g 1 , g 2 is defined by taking the coefficient of the identity group element in the expansion of g 1 · g 2 . To relate the group algebra to the conventional description of the gauge theory Hilbert space, it is natural to identify C[G] with the function space L 2 (G), whose elements are wavefunctions ψ(g) |ψ = dg ψ(g) |g . (D.1) However, note the group product on C[G] corresponds to the convolution product on L 2 (G) ψ 1 * ψ 2 (g) ≡ dh ψ 1 (gh)ψ 2 (h −1 ), (D.2) rather than pointwise multiplication. This is due to the property: where we twice inserted (D.1) and used the right-invariance of the Haar measure. This is an important distinction: in the TQFT language, spacetime locality is captured by the convolution product on L 2 (G), rather than the pointwise multiplication associated to the Hopf algebra. This distinction between the Hopf and the Frobenius algebras can be more explicitly seen by considering the group algebra in the representation basis. Here, the Frobenius algebra multiplication corresponds to a path integral process fusing the endpoints of a pair of intervals according to (R ab (g 1 ), R cd (g 2 )) → R ab * R cd (g) = dh R ab (gh)R cd (h −1 ) = e R ae (g) dh R eb (h)R cd (h −1 ) = 1 dim R R ad (g)(δ bc ), (D. 4) where we used the orthogonality relation (3.11). On the other hand, the Hopf algebra product is simply pointwise multiplication (R ab (g 1 ), R cd (g 2 )) → R ab (g)R cd (g) , (D. 5) and has no path integral interpretation. The closed TQFT describing gauge theory states on the circle corresponds to the center Z[C[G]], which forms a commutative Frobenius algebra. This can be identified with the gauge-invariant Hilbert space of class functions on the circle. 61 More details about the open-closed TQFT formulation of 2d gauge theory are given in [30].

D.2 Chern-Simons theory
Consider Chern-Simons theory with compact gauge group. In this case, the definition (6.4) of an unextended TQFT for d = 3 is much less powerful because cutting 3-manifolds along a codimension-1 slice does not produce a finite, generating set of cobordisms as in the d = 2 case. However, the extension of the TQFT down to codimension two, i.e. a circle, does provide the computational power needed to evaluate path integrals on 3-manifolds. Whereas a d = 2 extended TQFT is equivalent to a Frobenius algebra, a d = 3 once-extended TQFT is equivalent to a modular tensor category (MTC), 62 which is the boundary category assigned to a codimension-2 surface. For gapless boundaries such as the entangling surface, the latter is given by the representation category of a loop group or quantum group. When we extend down to a circle, it is possible to obtain a finite set of generating 1-morphisms analogous to (6.5), along with a set of 2-morphisms satisfying sewing relations [159]. An important part of the MTC data is the modular S-matrix. Equipped with the S-matrix, we can perform a "closed channel" calculation of the 3-sphere partition function Z(S 3 ). Following the approach of [138,160], cut open S 3 along a codimension-1 surface Σ = T 2 with the topology of a torus. Using the Heegaard Splitting (Figure 15), this torus separates S 3 into two solid tori, to which the TQFT assigns a quantum state |0 ∈ H T 2 . The Heegaard splitting means that we glue these solid Open-slicing and "microstate counting". To get a state counting intepretation of Z(S 3 ), consider an "open slicing" analogous to the annulus interpretation of Z(S 2 ) in two-dimensional gauge theory. This involves cutting along a codimension-2 surface, requiring us to perform a more intricate type of surgery. First, notice that a 3-sphere S 3 can be identified as two solid 3d-balls glued along their 2-sphere boundary. The latter forms the equator of S 3 (see Figure 16) and can be viewed as our Cauchy slice. As a codimension-1 cut of S 3 , it defines a Hilbert space H S 2 . From the gluing of the two 3d-balls, we can just view Z(S 3 ) = Ψ S 2 |Ψ S 2 , where |Ψ S 2 ∈ H S 2 , is the "Hartle-Hawking" state. Figure 16: Cutting the three-sphere symmetrically into two three-dimensional balls.
Second, let us cut the S 2 Cauchy surface along a codimension-2 surface with the topology of a circle, separating the 2-sphere into two disk like subregions V andV . As in the extended Hilbert space procedure described in section 3.1, separate the subregions V andV with a regulator . This construction gives a quantum mechanical interpretation to the codimension-2 cut as the factorization of |Ψ S 2 (and Ψ S 2 |) implemented by the path integral on a three ball with a trough dug out by a stretched entangling surface S . This is shown in Figure 17. The extended TQFT assigns a mathematical structure to the codimension-2 closed oriented manifold emerging from the → 0 limit of this construction: a linear category, with objects, the collection of Hilbert spaces assigned to codimension-1 manifolds that can end on it, and morphisms, the maps between these Hilbert spaces. To compute Z(S 3 ), we reverse the cutting process and glue back together the basic building blocks. We observe that the cutting process has left us with two factorized states i |Ψ S 2 and Ψ S 2 | i * , which when glued together give the partial trace of a reduced density matrix. A successful gluing then implies Z(S 3 ) = lim →0 Tr V e −2π HV , (D. 9) where Hamiltonian H V is the generator of modular flow in region V . Thus, the criteria for the codimension-2 cutting process to produce Z(S 3 ) is precisely the shrinkability condition (3.21).
The shrinkable boundary condition, the boundary category B S . Unlike (3.21), the shrinkability condition (D.9) can only be satisfied up to an infinite subtraction. This is because the introduction of the stretched entangling surface S breaks the topological invariance of the TQFT and introduces a UV divergence on the right hand side of (D.9). In particular, the standard holographic boundary condition setting A τ E − A ϕ | ∂M = 0 on S introduces CFT edge modes which depend on the complex structure of S . Under modular evolution by 2π, S becomes a thin torus which pinches as → 0, giving a divergence due to the infinite tower of descendants contributing to the CFT partition function at infinite temperature.
Technically, one can subtract this divergence via zeta-function regularization or a counterterm subtraction. However, when Chern-Simons theory is viewed as an emergent, low energy description of an underlying microscopic model, this divergence is a feature rather than a bug. In particular, this divergence gives the leading area law term in the entanglement entropy S V of a subregion which is needed to ensure the positivity of S V . In subsequent sections, we will see that gravity regulates this divergence such that shrinkability can be satisfied exactly. The upshot is that for Chern-Simons theory with a compact gauge group G, we relax the definition of shrinkability to allow for this divergence. The corresponding shrinkable boundary condition A τ E − A ϕ | ∂M = 0 leads to the usual holographic duality, where the Hilbert space H V on a disk is given by the representations of the loop group of G associated with boundary edge modes on S = ∂V . The boundary category B S on the codimension-2 entangling surface is thus identified with the representation category of the loop group. Expression (D.9) then implies that Z(S 3 ) can by computed from the thermal partition function of the associated WZW model, with the CFT Hamiltonian H V = 2π l L 0 +L 0 − c 24 as the modular Hamiltonian, where l is the length of S. 64 Factorization Map. The factorization map i on S 2 is represented by a cobordism from S 2 to a disjoint union V V of two disks, which according to Atiyah's axioms, is assigned to the tensor product H V ⊗HV . Rather than computing the path integral on such a topologically nontrivial space, we simply treat the factorization as a linear map i : H S 2 → H V ⊗ HV , (D. 10) subject to the shrinkable boundary condition. In [13], it was shown that a solution is given by embedding |Ψ S 2 into a regulated Ishibashi state: where m is a schematic label for the descendants, l is the length of S, and 2π is the effective temperature at the entangling surface. We can deduce the mapping i from the fact that the right hand side is the thermofield double state for the thermal CFT on the stretched horizon. The norm of the resulting state is 1, which is the partition function on S 2 × S 1 .
In the presence of a Wilson line in the representation R, which adds a puncture on S 2 , the state is modified to |Ψ S 2 (R) , and the factorization map is given by where a = 1, · · · , dim R labels the Kac-Moody zero modes. This is a generalization of the co-product factorization in (3.14). Moreover, the image of i is exactly the entangling product (3.4) with loop group of G as the surface symmetry G S [13].