Harmonic analysis of 2d CFT partition functions

We apply the theory of harmonic analysis on the fundamental domain of $SL(2,\mathbb{Z})$ to partition functions of two-dimensional conformal field theories. We decompose the partition function of $c$ free bosons on a Narain lattice into eigenfunctions of the Laplacian of worldsheet moduli space $\mathbb H/SL(2,\mathbb Z)$, and of target space moduli space $O(c,c;\mathbb Z)\backslash O(c,c;\mathbb R)/O(c)\times O(c)$. This decomposition manifests certain properties of Narain theories and ensemble averages thereof. We extend the application of spectral theory to partition functions of general two-dimensional conformal field theories, and explore its meaning in connection to AdS$_3$ gravity. An implication of harmonic analysis is that the local operator spectrum is fully determined by a certain subset of degeneracies.

1 Introduction and summary: can one hear the shape of a CFT?
It is often illuminating to ask how a quantum field theory behaves when it is deformed. When the theory is a conformal field theory (CFT), a particularly useful concept of deformations is the "space of CFTs," on which an individual theory is just a single point. There are two natural and common ways to formulate the space of CFTs, both of which lead to a rich and fascinating structure. The first is to use the fact that conformal symmetry (or some extension of it) together with the operator product expansion (OPE) allow one to define CFTs in terms of a discrete set of "data" -typically, operator dimensions and OPE coefficients -so that, roughly speaking, the space of CFTs is the space of such data. One can then study which points in this space satisfy abstract CFT axioms. Remarkably, such constraints can lead not only to the exclusion of large regions of CFT data, but can sometimes sharply pinpoint specific theories living at the boundary of the allowed region, and can even be a practical method for computing results about a specific universality class of CFTs. The challenge in this conformal bootstrap approach is to extract the constraints in an efficient and useful way. The second concept of a space of CFTs arises when a theory contains one or more exactly marginal operators, which connect continuous families of CFTs. Understanding this moduli space of deformations can provide a new perspective on the original CFT.
Our goal in this paper is to describe a set of tools -and more generally, an organizing principle -for 2d CFTs that sheds light on both of these approaches. The main technology will be harmonic analysis on the fundamental domain F = H/SL(2, Z).
In two dimensions, CFTs have a rich structure due to the infinite-dimensional conformal symmetry as well as modular covariance of local torus observables. For example, the torus partition function must be modular-invariant. Viewing the partition function as a positive sum of characters of the Virasoro algebra, the mechanism by which modular invariance is satisfied remains obscure and rather remarkable. On the other hand, harmonic analysis on F builds in the constraint of modular invariance automatically. This comes at the expense of obscuring unitarity and discreteness, in a reversal of the typical modular bootstrap method [1]. 1 Fortunately, mathematicians have extensively developed the theory of harmonic analysis on F, reviewed in e.g. [19]. All square-integrable modular functions can be uniquely decomposed into a complete set of eigenfunctions of the Laplacian on the upper half-plane.
Certain other properties are nicely encoded in the spectral decomposition of Narain lattice partition functions. 4 The fact that the Narain lattice partition functions are eigenfunctions of the difference between the target space and worldsheet Laplacians [20,29] arises in the spectral decomposition as the fact that the coefficients of the eigenfunctions of the worldsheet Laplacian are target space Laplacian eigenfunctions with a correlated eigenvalue. In the special case of c = 2, the "triality" under exchange among the three complex moduli [30], that of the worldsheet and two from the target space, is made completely manifest in the spectral representation. Perhaps most interesting from a modular bootstrap perspective is that the scalar primary spectrum in Narain CFTs is completely determined by the overlaps with the continuous (rather than discrete) series of basis eigenfunctions in the spectral decomposition, and therefore it provides a new handle on the problem of determining the maximal gap in the scalar primary spectrum in the Narain lattice moduli space. We demonstrate this explicitly at c = 2.
Turning now to "generic" 2d CFTs, by which we mean those with Virasoro symmetry alone and c > 1, spectral decomposition remains a powerful, if somewhat trickier, technique to implement. Harmonic analysis is applicable to modular objects that are square-integrable -or close to it, in a sense articulated by Zagier [22] and used heavily here -but primary partition functions of generic CFTs do not obey this constraint: instead, they possess exponential divergences at the cusp at τ → i∞, due to the vacuum state and any other "light" primaries, defined as those with conformal dimension ∆ ≤ c−1 12 . Their presence forces us to address the key question of how to massage partition functions into a form fit for spectral decomposition, and what this means physically. We are led to advance the following perspective for general 2d CFTs. The spectral decomposition may be applied to a partition function after subtracting off all light states in a modular-invariant way. We refer to this as subtracting the "modular completion" of the light spectrum. The remainder after subtraction, which we call Z spec , is modular-invariant and square-integrable, and thus admits a spectral decomposition.
One rigorous consequence of this structure that emerges rather easily, as shown in Section 4.4, is a new result on spectral determinacy, i.e. the minimal content necessary to fully determine the spectrum of a 2d CFT [31,32]. We show that, under the widely-held assumption that the cuspidal eigenspectrum of SL(2, Z) is non-degenerate (e.g. [33][34][35]), the entire primary spectrum of a 2d CFT is uniquely fixed by the light spectrum, the scalar spectrum, and the spectrum of any single nonzero integer spin j (see Fig. 1). 5 As we will discuss, we Figure 1: In a 2d CFT, the full Virasoro primary spectrum is determined by the primary spectrum in blue. Circles represent the unitarity bound, ∆ ≥ j, where ∆ = h + h and j = |h − h|. This statement assumes that the cuspidal eigenspectrum is non-degenerate, an unproven but widely held property of SL(2, Z). The j = 1 data may, subject to a further mild assumption about Maass cusp forms, be replaced by the data of any fixed integer spin j > 0 without affecting this conclusion. This result is explained in Section 4.4. think it quite plausible that this result could be strengthened to use even less data as input.
Physically, the modular completion of light states represents a universal part of the CFT, or perhaps a kind of "average," implied by the existence of the light spectrum. The remainder, Z spec , captures the deviation of a given CFT spectrum around this universal part. That spectral analysis of CFT partition functions is sensitive to the distinction between light and heavy operators jibes with central properties of the black hole spectrum of quantum gravity in AdS 3 . We explain how this interpretation provides a 2d CFT analog of the "half-wormholes" of [36]. This viewpoint has some limitations, and we discuss some concrete avenues for further research that could strengthen it. Fortunately, it is buttressed by application to the Narain case, in the following way. In situations where the partition function of interest belongs to an exact moduli space of CFTs, the sense of "average" used above may be given a literal interpretation. As noted earlier, the partition function Z (c) of a fixed Narain lattice CFT is a sum of the square-integrable terms, which average to zero, and the ensemble average with respect to the Zamolodchikov metric, Z (c) ; in harmony with the above paradigm, the known result [20,21] for the average Z (c) turns out to be precisely equal to the modular completion, via Poincaré sum, of the vacuum state. This paper is organized as follows. In Section 2, we introduce harmonic analysis on the fundamental domain F = H/SL (2, Z). In Section 3, we apply our technology to Narain's family of free boson CFTs. In Section 4, we apply our technology to general 2d CFTs.
A word on notation: In this paper all functions of complex variables are assumed to be non-holomorphic. However, for the sake of brevity of notation, we will drop all antiholomorphic coordinate dependence. We will write e.g. f (z) instead of f (z,z), but f should not be assumed to be a holomorphic function. We will also denote the real and imaginary parts of the torus modular parameter τ as x and y, respectively.

Harmonic analysis on the fundamental domain
We begin by collecting some basic properties of the spectral theory of the Laplacian on the fundamental domain, Many important results of this subject are nicely summarized in Chapter 3 of [19]. The Laplacian on the upper half-plane H is given by Throughout this paper we will make use of the Petersson inner-product on the space L 2 (F) of square-integrable modular-invariant functions,

Spectral resolution of the Laplacian
The spectrum of the Laplacian on the fundamental domain includes both discrete and continuous components. The discrete part can be expanded in an orthogonal basis 6  dx ν n (τ ) = 0 (2.5) and by the fact that they decay exponentially at the cusp, The continuous spectrum of the Laplacian can similarly be expanded in an orthonormal basis consisting of the real analytic Eisenstein series with s, which labels their eigenvalue, on the critical line Re s = 1 2 , Unlike the cusp forms, the Eisenstein series do not decay exponentially at the cusp: where Λ(s) is a symmetrized version of the Riemann zeta function that satisfies a functional equation Λ(s) := π −s Γ(s)ζ(2s) We summarize some basic facts about real analytic Eisenstein series, Maass cusp forms and their Fourier decompositions in Appendix A.

The Rankin-Selberg transform
In this paper the inner product of various partition functions Z with the real analytic Eisenstein series, (Z, E s ), will play a central role. We will see that this quantity amounts to a Mellin transform of the scalar component of the partition function, and inherits many interesting analytic properties in the s plane from those of the Eisenstein series. These observations date back to work of Rankin [37] and Selberg [38], whose work was usefully extended by Zagier [22]. 8 Consider a modular-invariant function f (τ ) that is of "rapid decay", meaning that f decays faster than any polynomial at the cusp y = ∞. We will define the Rankin-Selberg (RS) transform of f by its integral over the fundamental domain, weighted by a real analytic Eisenstein series where f 0 (y) is the zeroth Fourier component of f f 0 (y) = However, we will see that CFT primary partition functions are not of rapid decay, and are thus not subject to the spectral analysis as stated in (2.10). Thankfully, Zagier has developed the RS method to accommodate modular functions that are of "slow growth" at the cusp [22]. We will summarize many of the relevant details from [22] here. When we say that a modular-invariant function f is of slow growth at the cusp, what we mean is where ϕ(y) grows sub-exponentially, In Section 3, we will see that the primary partition functions of Narain lattice CFTs correspond to the maximally simple m = 1, c 1 = 1, n 1 = 0, α 1 = c 2 . Then the definition of the RS transform is simply modified to omit the problematic terms at the cusp, namely This converges when Re s is sufficiently large. This procedure, which essentially amounts to throwing out the problematic terms in the scalar part of f , may seem ad hoc, but it turns out to be quite natural. The reason is that this definition of the RS transform can be shown [22] to be equivalent to a renormalized integral of the product of the function weighted by the Eisenstein series over the fundamental domain This modification of the RS transform will be both conceptually and technically useful in our spectral analysis of CFT partition functions. To explain why, consider the case of the constant function, f (τ ) = 1. In this case f 0 (y) = ϕ(y) = 1 so its RS transform trivially vanishes. In particular one has Similarly, if we consider the case that f is an Eisenstein series, f (τ ) = E r (τ ), then again its RS transform (2.17) vanishes because f 0 (y) = ϕ(y) = ϕ r (y): This motivates the following interpretation of the renormalized integral of f in the fundamental domain. Since R s [E r (τ )] = 0, we can subtract from f (τ ) a suitable combination of Eisenstein series without affecting its renormalized integral, such that the resulting function is square integrable: This converges for Re s in a certain range dictated by the powers of y in ϕ(y). The RS transform again inherits the meromorphic continuation of the Eisenstein series in the s plane, now with poles in the plane to the right of Re s = 1 2 at s = 1 and s = max(α i , 1 − α i ). In other words -and as groundwork for the viewpoint espoused later -one simply forms a new, square-integrable modular-invariant function f (τ ) by subtracting the appropriate linear combination of E s (τ ) and its derivatives from f (τ ), one for each term in (2.16). 9 The procedure of mapping the divergent terms to modular-invariant functions with the same asymptotic growth is what we will call "modular completion. " The new function f (τ ) then admits a spectral decomposition (2.10), with the overlap integrals computed using the unmodified RS transform. Thus, the form of the spectral decomposition for functions of slow growth is which is equivalent to (2.10) applied to the function f (τ ). 9 The reader may notice that terms with α i < 1/2 are not subtracted off in (2.23), but are nevertheless included in the definition of ϕ(τ ). They are so included because they spoil convergence of the original RS transform for some range of s. However, it also follows from Zagier's theorem that for RS transforms with Re s = 1/2 -the only value needed for spectral decomposition -the terms with α i < 1/2 may be safely neglected in the RS transform. This is consistent, as it must be, with the fact that they do not violate square-integrability, so f (τ ) must admit a Roelcke-Selberg spectral decomposition without any modifications.

Comparison with harmonic analysis on the Euclidean conformal group
Harmonic analysis on the Euclidean conformal group SO(d+1, 1) [2] is a powerful tool for the study of the constraints of conformal invariance on four-point functions of local operators, that has underlied many recent developments in the conformal bootstrap [3][4][5][7][8][9][11][12][13]43,44], and has some parallels with the technology developed in this section. Here we briefly review some elements of SO(d + 1, 1) harmonic analysis in order to contextualize our results.
In Euclidean kinematics, the four-point function of local operators φ 1 φ 2 φ 3 φ 4 , taken to be scalars for simplicity, is, up to a kinematic prefactor, a function G(z,z) of a single complex conformally-invariant cross-ratio z. The function G(z,z) admits a conformal block decomposition where the sum is over local primaries O with dimension ∆ and spin j appearing in the φ × φ OPE, F ∆,j are the conformal blocks that encode the kinematical contribution of O and its descendants, and the coefficients C are the corresponding structure constants. Harmonic analysis on the conformal group allows one to decompose the function G(z,z) into a complete basis of eigenfunctions of the conformal Casimir that are single-valued functions of the cross-ratio in Euclidean kinematics, namely, the conformal partial waves Ψ ∆,j (which are a particular linear combination of the conformal block F ∆,j and the "shadow block" F d−∆,j ) [2,4,[8][9][10]. For real external dimensions, In the above equation we have emphasized that the contributions of certain operators in the OPE, in particular those with ∆ ≤ d 2 (which always includes the identity operator), must be subtracted from the four-point function in order to apply the spectral decomposition and preserve normalizability. The coefficient function C j (∆) is a sort of resolvent for the structure constants, in the sense that it has simple poles in ∆ corresponding to the dimensions of operators in the OPE 10 − Res (2.28) We say that this applies for "generic" ∆ i due to the fact that the conformal partial waves have poles in the right half ∆ plane with residues that are themselves conformal blocks with special values of the dimension (which may thus shift the relationship between the structure constants and the residue of the coefficient function), and due to the need for subtractions of states that give non-normalizable contributions. That the conformal partial waves are orthogonal with respect to a certain inner product means that one can extract the coefficient function C j (∆) by means of a Euclidean inversion formula [9] C j (∆) = N j (∆) C d 2 z µ(z,z)Ψ ∆,j (z,z)G(z,z), (2.29) where N j (∆) is a proportionality constant and µ(z,z) a measure, whose detailed form are known but unimportant for our purposes.
Let us now make the analogy with harmonic analysis on the fundamental domain. One may think of the modified Roelcke-Selberg decomposition (2.25) as analogous to (2.27). As we will see when studying the spectral decomposition of both the Narain theories, as discussed in Section 3, and especially in more general CFTs in Section 4, we will also encounter the need to subtract non-normalizable contributions: in particular, those corresponding to the light primary operators. The RS transform (2.11) discussed in the previous subsections, which extracts the overlap coefficient (f, E s ) = R 1−s [f ] that appears in the Roelcke-Selberg decomposition (2.10) from an integral of f weighted by an Eisenstein series over the fundamental domain, is closely analogous to this Euclidean inversion formula, but with some key differences.
For one, an obvious difference from (2.27) is that in applying harmonic analysis on the fundamental domain, we are expanding the partition function into a complete basis of functions that are themselves modular-invariant, unlike the conformal partial waves that appear above which are not crossing-symmetric. 11 This is related to the fact that a key feature of the Euclidean inversion formula for correlators is that the eigenfunctions are labeled by their spin j, which is restricted to be an integer. By contrast, the eigenfunctions in the Roelcke-Selberg decomposition do not have such a spin label, but rather are all certain infinite sums over spins. In fact, once one has determined the Roelcke-Selberg decomposition, one can use it to evaluate the partition function for complex values of x and y as long as Re(y) > 0, so in this sense the decomposition is equally Lorentzian or Euclidean, even though our method for extracting it relies on the partition function in the Euclidean regime (x, y) ∈ H. Another important difference stemming from the built-in modular invariance is that there is no immediate analog of (2.28) that directly relates the RS transform of a partition function to the degeneracies of particular operators in the spectrum. However, after some subtractions or if Z has particularly tame asymptotic growth, we are able to extract a resolvent from R s [Z] via a formal Laplace transform (e.g. for the c = 1 free boson; see Appendix B). A final difference is the presence of the infinite family of cusp forms in the Roelcke-Selberg decomposition, which do not have any obvious analog in the decomposition into conformal partial waves.
In [9], by exploiting an analogy with the Froissart-Gribov formula for the partial wave coefficients in scattering amplitudes, Caron-Huot was able to deform the integration region in the Euclidean inversion formula (2.29) to one over the Lorentzian causal diamond z,z ∈ (0, 1) with profound implications for the structure of the spectrum of a CFT. In particular, by providing a formula for the CFT data (for operators of sufficiently large spin) that is analytic in the spin j, the result of [9] formalized the idea that the local operator content of a CFT is organized into Regge trajectories of increasing spin. This implies a remarkable rigidity of the spectrum. Although our methods for SL(2, Z) are apparently Euclidean, we will nevertheless see in Section 4.4 that the spectral analysis of 2d CFT partition functions has conceptually similar implications for the rigidity of the spectrum of local operators.

Application to Narain lattice CFTs
In this section we will discuss the application of techniques from harmonic analysis on F to the study of partition functions of free boson CFTs based on an even self-dual lattice Λ ∈ R c,c . Narain lattice CFTs are characterized by a U (1) c × U (1) c current algebra, and thus provide a natural testing ground for the application of the technology described in the previous section. The reason is the following. For unitary CFTs with two copies of a U (1) c chiral algebra, the primary partition function Z p (τ ) that counts U (1) c × U (1) c primary operators is given in terms of the full partition function Z(τ ) by Z p (τ ) := y 1/2 |η(τ )| 2 c Z(τ ), (3.1) which only diverges polynomially at the cusp where ∆ * is the dimension of the lightest non-trivial primary operator in the spectrum. The divergence is merely polynomial, rather than exponential, because Narain CFTs have central charge equal to the number of currents; more precisely, c = c currents , where c currents parameterizes the asymptotic density of current composites as defined in (4.1). Moreover, the only source of this divergence is the universal contribution of the identity operator. Thus the primary partition function is a modular-invariant function of "slow growth" on the fundamental domain, so we can apply the technology of Section 2.2 to understand its spectral decomposition. In contrast, partition functions of generic CFTs diverge exponentially at the cusp, and so in that case more care must be taken to make sense of a spectral decomposition, as we discuss further in Section 4.
In the remainder of this section we drop the subscript on the primary partition function Z p (τ ), leaving the restriction to primaries implicit.

Spectral decomposition of specific partition functions
We will now explicitly compute the spectral decomposition of Narain CFT partition functions, Z (c) , at small values of c, and will outline the general computation for general c. We do so by explicit computation of the RS transform (Z (c) , E s ) = R 1−s [Z (c) ] -which, as we have seen in Section 2.2, amounts to a Mellin transform of the scalar sector of the partition function -and also computation of (Z (c) , ν n ), the inner product with the cusp forms.
Narain lattices are far from unique; a particular lattice is specified by a point in Narain's Such theories are realized as sigma models with toroidal target space T c , with the data of the Narain lattice encoded in the c 2 degrees of freedom of the metric and B-field flux of the target. The modular-invariant primary partition function for a Narain lattice CFT with central charge c is given by the following sum over momentum and winding modes where m denote the target space moduli (the metric G and 2-form flux B) and 12 M n,w (m) 2 := G ab (n a + B ac w c ) n b + B bd w d + G cd w c w d . From their explicit forms, one can confirm that the Narain partition functions satisfy the differential equation [20,29] is the Laplacian associated with the Zamolodchikov metric on the target space moduli space, with ∂ G ab := 1 2 (1 + δ ab ) ∂ G ab .

c = 1
Consider the special case of the c = 1 free boson compactified on a circle of radius r. In this case the primary partition function is given by We begin by computing the continuous part of the spectral decomposition via RS transform of the partition function (3.8), using technology of Section 2.2 for modular functions of "slow growth," followed by the discrete part.
Neglecting the contribution of the identity operator by defining where the prime on the summation denotes the omission of n = w = 0, we get (3.10) Provided the real part of s is sufficiently large (in particular, Re s > 1 2 ), we can exchange the sum and the integral, leading to (3.11) The result indeed has poles at s = 1 and s = 1 2 as promised. We thus conclude that Next, the constant part of the spectral decomposition may be computed by applying (2.14): Res In fact, the results (3.11) and (3.13) have previously appeared in the literature in [28], where the RS method was used as a technical tool for the computation of certain one-loop integrals in toroidal compactifications of string theory. For those purposes, only the residue of the RS transform at s = 1 was desired.
So far we have computed the constant and continuous components in the spectral decomposition of the primary partition function of the c = 1 free boson. To finish the job we need to add in both the contribution of the vacuum state and the Maass cusp forms. In fact it turns out that both of these contributions will vanish. For the former, we see in the modified Roelcke-Selberg decomposition (2.25) with α i = 1/2 and n i = 0 leaves E 1 2 (τ ), which is in fact zero: E 1 2 (τ ) = 0. For the latter, in Appendix C we explicitly show that the Maass cusp forms do not show up at c = 1 by computing the overlap (Z (c=1) , ν n ) and showing it vanishes. Moreover, we have verified this by checking numerically that (Z (c=1) , ν n ) can be made seemingly arbitrarily small by increasing the precision of the numerical integration. Thus, the spectral representation of the partition function of the c = 1 free boson is given exactly by See Appendix B to see explicitly that the resolvent inherited from (3.14) has poles precisely at the locations of physical operators in the free boson CFT with residues equal to the correct degeneracies.
The partition functions of the Z 2 orbifolds of the compact boson admit a similarly straightforward spectral decomposition. The orbifold partition functions, Z (c=1) orb (τ ; r), can be written in terms of free boson partition functions as (3.15) where the contribution of the Z 2 twisted sectors is independent of the target space moduli: where θ i are elliptic theta functions. Then the well-known relation The spectral decomposition of Z (c=1) orb (τ ; r) then follows from (3.14), (3.15) and (3.18). 13 13 Of course, since we are computing y 1/2 |η(τ )| 2 times the orbifold partition function, and 1 η(τ ) is not the vacuum character for the S 1 /Z 2 theory, the spectral decomposition above, unlike (3.14), does not have a positive inverse Laplace transform (although it is still discrete).

c = 2
We next consider the family of c = 2 Narain CFTs with T 2 target space. The moduli space of such theories is captured by two elements σ, ρ of H/P SL(2, Z), respectively the complex structure and complexified Kähler structure of the target. They are given in terms of the metric and B field flux on the T 2 as (see e.g. [30]) In these variables, the primary partition function can be written as 14 (3.20) Remarkably, Z (c=2) (τ ; ρ, σ) obeys a "triality" symmetry: it is totally symmetric under exchange of the three moduli [30]. The invariance under exchange of ρ and σ is a special case of mirror symmetry. The invariance under the exchange of the worldsheet modular parameter τ with the target space moduli ρ, σ, which follows from Poisson summation, is more mysterious.
The RS transform of the c = 2 Narain partition function is given by where again the prime on the summation indicates the omission of the identity operator n a = w a = 0 and we have assumed Re s > 0 in order to exchange the integral and the sum.
In fact, this constrained sum was worked out very explicitly in [28], whose results we briefly summarize. In solving the constraint n · w = 0, there are essentially two cases to consider. In the first case we simply set w a = 0, and we have In the second case we set where u 1 , u 2 ∈ Z with (u 1 , u 2 ) = 1 and c, d ∈ Z with c ≥ 1. In this case we have The RS transform then takes the form (3.25) So the inner product of the c = 2 Narain partition functions with the real analytic Eisenstein series is given by the following product of Eisenstein series At the cusp, the c = 2 Narain partition functions diverge linearly, Z (c=2) (τ ; m) y→∞ ∼ y. And indeed we see as expected that the RS transform (3.25) has a double pole at s = 1. For this reason we must take slightly more care in extracting the constant part of the spectral decomposition. Because of the linear divergence of Z (c=2) at the cusp, in order to apply the Roelcke-Selberg theorem we subtract E 1 (τ ) − ω from the partition function, where E 1 (τ ) is the non-singular part of the Eisenstein series at s = 1 (see (A.8)) and ω := 6 π (1 − 12ζ (−1) − log(4π)) is the constant part of E 1 (τ ). The remainder of the constant part of the spectral decomposition comes from the residue of the RS transform at s = 1, cf. (2.14), which is given by where δ := 18 Finally we address the discrete part of the spectrum. Following the discussion in Appendix D, we generally expect all c > 1 Narain partition functions to have support on the cusp forms. The differential equation (3.6), the triality of the c = 2 partition function, and the orthogonality of the cusp forms together imply that the discrete contribution must take the following highly constrained form: where c ± n are a set of constants and where we have separated the cusp forms into the even and odd cusp forms, denoted by ν + and ν − respectively. 15 Any other product of cusp forms totally symmetric in ρ, σ, τ will not obey (3.6). We have also normalized the c ± n 's in (3.29) by a factor of (ν ± n , ν ± n ) which will turn out to be convenient. In Appendix C we analytically derive: 16 by making use of the fact that the c = 2 Narain partition function (3.20) can be written in terms of Poincaré series and Hecke operators.
Assembling the continuous and discrete pieces, we thus obtain the following exact form for the spectral decomposition of the c = 2 Narain partition functions:

31)
15 A previous version of this paper incorrectly omitted the odd cusp forms ν − n from the spectral decomposition. However, Narain theories with B field turned on are generically not parity invariant, which imply the presence of odd cusp forms. We are grateful to Ying-Hsuan Lin and Yifan Wang for discussions related to this point. 16 One may be concerned that the overlap coefficient with the odd Maass cusp forms is imaginary, given that the cusp forms are real functions when τ = τ * . This is not a problem, since parity-non-invariant partition functions need not be real. Indeed, we see below that the overlap with the odd cusp forms is only non-vanishing when the B-field is turned on, in particular when the c = 2 partition function is not parity invariant.
where the constant α is given by and δ is defined as The result exhibits manifestly the remarkable triality of [30]. We do not have a physical explanation for the "8," but it is tempting to speculate that it is counting something.
We pause to note that we have also checked our expression (3.31) numerically, in large part thanks to the plethora of numerical data available on the cusp forms. 17 For example, by plugging in various values of τ , ρ, and σ into Z (c=2) (τ ; ρ, σ), we can numerically fit for the first few c n . 18 We find the following values: with higher values of n being less numerically stable. Our numerical results (3.34) are indeed consistent with the result c + n = 8. In [28,29], an efficient method was described to perform spectral decomposition on the product locus of Narain moduli T d × S 1 where the radius of the S 1 is taken very large. Here we will focus on the case d = 2. In Appendix F, we describe this method in detail; here we simply state the result. If we take ρ, σ to be the moduli of the T 2 theory, and r 3 to be the 17 We refer the reader to the online database [47] for numerical data on the cusp forms, and to Appendix A.2 for more details of the cusp forms. See also [48] for even higher numerical precision on the cusp forms which we used in our fit (3.34) (we are grateful to A. Sutherland for pointing out this reference) and [49] for a study of cusp forms at large eigenvalue. 18 In principle we could also have explicitly numerically estimated the overlap integral for fixed ρ and σ, and found the c n 's this way. In practice, however, we found that restricting to a specific spin, plugging in various values of τ , ρ, and σ and finding the best fit for the c n 's (after cutting off the sum in n) led to far more accurate numerics. For simplicity, we restricted ourselves to parity-invariant theories, so we did not obtain numerical data on c − n .
radius of the S 1 , then at large r 3 (with all other parameters fixed), we get where means equals to all orders in 1/r 3 (i.e. the error is non-perturbative in 1/r 3 ). In (3.36), E3 2 (τ ) is the non-holomorphic Eisenstein series at s = 3/2, and the constant term is inherited from the residue of the Eisenstein overlap at s = 1 To fix the cusp form contributions, we again can numerically fit (3.36) for various values of target space moduli. Remarkably they also seem to take a simple form at large r 3 . We conjecture that at large r 3 .
Interestingly in (3.39) we see that for c = 3, unlike for c = 2, there are special points in the moduli space (for instance, very large r 3 ) where the cusp forms contribute numerically a much larger contribution to the partition function than the average E 3 2 (τ ). For the c = 2 partition function (3.31) this is not the case due to the boundedness of the cusp forms.
In Appendix F we also describe a generalization of the method introduced in [28,29] to consider the spectral decomposition of Narain partition functions on the product locus T d × T D , where we take the volume of the T d to be parametrically large. Here we will focus on the case d = D = 2, which is a sublocus of the c = 4 Narain moduli space. We will denote the moduli of the individual tori as ρ (i) and σ (i) for i = 1, 2, and will consider the limit in which ρ (1) 2 = Im(ρ (1) ) is taken very large. In this limit, up to non-perturbative corrections in ρ We are now in a position to study the spectral decomposition of the partition functions of Narain lattice CFTs with c > 2. As in previous subsections, we begin with the Eisenstein overlap, whose residue at s = 1 gives the constant term, followed by the cusp form overlap.
From (3.6), we see the RS transform of the Narain partition functions is an eigenfunction of the target space Laplacian ∆ Mc That the lattice theta function provides a pairing between eigenfunctions of the worldsheet and target space Laplacians is reminiscent of a concept in the math literature known as the "theta correspondence" [50]. The RS transform is straightforwardly computed to be [28] where m represents the moduli, and we have assumed Re s > 1 − c 2 in order to exchange the sum and the integral. In [28], E c s is referred to as a "constrained Epstein zeta series" which converges for Re s > c − 1. 19 It admits a meromorphic continuation to the entire s plane and satisfies a functional equation, both inherited from the Eisenstein series: The constant part of the spectral decomposition is extracted from the residue of R 1−s [Z (c) ] at s = 1, cf. (2.14). As far as the cusp forms, we do not have analytic control over their inner product with the Narain partition functions. However, we do know that they must be eigenfunctions of the target space Laplacian, in particular, Moreover from the argument in Appendix D, we know that the inner products (Z (c) , ν n ) are generically non-zero. Altogether, therefore, the spectral decomposition of the partition function of a general Narain lattice CFT with c > 2 takes the following form Let us emphasize one important feature here. The Eisenstein series E c 2 (τ ), present in (3.47) because the Narain partition functions are not square integrable (due to the identity operator), has recently been shown to have an elegant interpretation as the Narain partition function averaged over the moduli space M c with the measure inherited from the Zamolodchikov metric [20,21]. So the other terms on the right hand side of (3.47) admit a natural interpretation as the deviation from the average. (We remind the reader that this average is only well-defined for c > 2 [20,21].) We will say more about this interpretation in Section 4.

On the optimal gap in the scalar sector
Before moving on, we make a brief remark on how our methods may be useful in determining the largest possible gap to non-vacuum primary operators in Narain CFTs. 19 In e.g. [28], it was written that convergence requires Re s > c, but it seems that the weaker condition Re s > c − 1 is enough for convergence. For c > 2, the density of states of scalar primary operators grows ∆ c−2 , so for convergence of (3.44), we require that c − 2 − Re s < −1, or equivalently Re s > c − 1. We are grateful to Cyuan-Han Chang for pointing this out to us.
In the spectral representations of the Narain partition functions (3.14), (3.31), (3.47), modular invariance is completely manifest but unitarity (positivity of the spectrum), compactness (discreteness of the spectrum) and integrality (degeneracies are integers) are obscured. This is in contrast to standard approaches to the modular bootstrap, where positivity is manifest, but modular invariance, compactness 20 and integrality are not.
A simple example of a problem for which the technology developed in this paper may be suitable is the question of the optimal upper bound on the gap in the spectrum of scalar U (1) c × U (1) c primary operators, particularly in the large c limit. The latter is a problem that evades even state-of-the-art numerical modular bootstrap analyses [56][57][58]. For the purposes of attacking this question, it is convenient to introduce a counting function N j (∆) that enumerates the total number of spin-j primaries with dimension less than or equal to ∆. In particular, the scalar counting function N 0 (∆) is dictated entirely in terms of the overlap of the Narain partition function with the real analytic Eisenstein series, as the cusp forms have no scalar Fourier mode. From (3.47) we can read off the counting function by integrating the scalar part, which gives: The existence of a gap in the spectrum implies that f c (s) has certain analytic properties in the complex s-plane. For sufficiently small ∆, we should be able to evaluate the counting function (3.49) by deforming the s contour away from the critical strip to infinity to get zero. For example, in order to cancel the contribution of the first term in (3.49), representing the 20 Although in numerical approaches to the modular bootstrap one typically demands positivity of the action of the linear functional on the contribution of the vacuum module to the modular crossing equation, in practice [51][52][53] it is often quite difficult to rule out noncompact solutions to the modular crossing equations that are spurious for the problems of interest. A typical example is the question of the optimal upper bound on the gap in the spectrum of twists in a compact 2d CFT. There is a simple argument [53,54] that shows the twist gap cannot exceed c−1 12 , which is saturated by the noncompact Liouville CFT. Numerical approaches cannot improve on this bound without a novel mechanism demanding the presence of a normalizable ground state and/or a discrete spectrum of local operators (see [53,55] for discussions on this). Discreteness of the spectrum implies that Λ(1−s) Λ(s) f c (s) must not have any other poles in the half-plane to the right of the critical line, as the existence of such a pole would lead to a continuous contribution to the counting function N 0 . The existence of a scalar gap also implies that f c (s) has certain asymptotic properties as s is taken to infinity, for example in the right half-plane. If we define g c (s) by rescaling then if the scalar gap is ∆ * , we learn that g c (s) must fall off as s → ∞ in the right half s-plane as follows If this is the case, then for any ∆ < ∆ * we can deform the s-contour and get N 0 (∆ < ∆ * ) = 0. Then the question is: for Narain CFTs at fixed central charge, how large can ∆ * be?
To get a feeling for how this works, it is instructive to consider some cases for which we already know the optimal bound on the gap. For example, in the c = 1 case, we know from (3.12) that g 1 (s) = 2ζ(2s − 1) r 2s−1 + r 1−2s s→∞ ≈ 2 r 2s−1 + r 1−2s . (3.54) The bound on the gap is optimized when this quantity is minimized, corresponding to r = 1. For this choice of r, g c is asymptotically constant as s is taken to infinity, corresponding to an optimal gap of ∆ * = 1 2 , which is indeed saturated by the c = 1 free boson at the self-dual radius. 21 Similarly, in the c = 2 case, we know from (3.26) that g 2 (s) = 2ζ(2s)E s (ρ)E s (σ). (3.55) Let us assume ρ, σ are in the usual fundamental domain of H/SL(2, Z) (which maximizes the imaginary part over the SL(2, Z) orbits). Then as Re s is taken to infinity, g 2 is approximated by Comparing to (3.53), this tells us that in a given Narain lattice CFT with T 2 target space, provided − 1 2 < ρ 1 , σ 1 ≤ 1 2 and |ρ|, |σ| ≥ 1. Since ρ and σ are valued in the fundamental domain, we know ρ 2 , σ 2 ≥ √ 3 2 . Therefore the optimal gap is ∆ * = 2 3 . This is saturated by the SU (3) 1 WZW model [21,53], corresponding to the complexified Kähler and complex structure moduli at the Z 3 point, ρ = σ = e More generally for c > 2, we can make statements about the scalar gap as a function of the O(c, c; Z)\O(c, c; R)/O(c) × O(c) moduli. We conjecture that g c (s) at large Re s will take the simple analytic form of 1 2(G −1 )cc when written in variables that minimize (G −1 ) cc (i.e. the T -duality fundamental domain is chosen to minimize (G −1 ) cc ). The scalar gap would then be optimized at a cusp point in the target space moduli, corresponding to a specific rational CFT. It would be very interesting to have more explicit expressions at higher c, and to compare to candidate optimal Narain theories found by scanning moduli space in Table  3.1 of [21].

Application to general CFTs
We now explore the role of spectral decomposition in general CFTs.

Rendering the partition function square-integrable
Unlike the Narain case, there is an immediate obstruction to applying the spectral decomposition to generic, i.e. irrational, CFT partition functions. For a CFT with extended chiral algebra A, we may define the quantity c currents ≥ 1 as the effective central charge in the high-temperature asymptotics of the vacuum character of A: This quantity counts the number of currents modulo non-trivial null states. Due to the identity operator, the primary partition function of the CFT near the cusp behaves as (suppressing a power-law prefactor) Whereas Narain CFTs obey c = c currents , a generic CFT obeys c > c currents , so (4.2) diverges exponentially. Indeed, any light primary operator, defined by the condition renders Z p (τ ) / ∈ L 2 (F); moreover, those contributions strictly below the threshold are not even of "slow growth" near the cusp y → ∞, in the sense of Zagier [22].
We henceforth take the CFTs in question to be compact, with Virasoro symmetry alone and c > c currents = 1, leaving implicit the straightforward extension to larger chiral algebras. The primary partition function is (4.4) It will be useful to introduce a primary partition function over light operators only: where each term is the contribution of a Virasoro primary operator of weight (h, h). At finite c, there are a finite number of such contributions. As it stands, (4.4) does not have a Roelcke-Selberg spectral decomposition because Z L (τ ) = 0, due to the vacuum and any other light operators.
However, let us view this problem slightly differently. We can subtract all light primary operators in a modular-invariant way, such that the resulting function will be in L 2 (F). In particular, let us define The quantity Z L (τ ) is defined to be a modular completion of Z L (τ ). That is, given Z L (τ ), one adds states to make it modular-invariant, but without adding any new light states, Subtracting this quantity from Z p (τ ) as in (4.6), the resulting Z spec (τ ) is square-integrable, and therefore admits a spectral decomposition of Roelcke-Selberg type, cf. (2.10).
The modular completion Z L (τ ) of a given Z L (τ ) is not unique. Indeed, mathematically, there are an infinite number of ways to modular complete which differ by "cuspidal functions," i.e. modular-invariant functions which vanish at y → 0. One particular modular completion that seems privileged, and provides insight into the meaning of Z spec (τ ), is to replace each light state by its P SL(2, Z) Poincaré sum: where q γ := exp(2πiγτ ) and q γ := exp(−2πiγτ ). The Poincaré sum of each term adds, upon regularization [59,60], states with h ≥ c−1 24 and h ≥ c−1 24 to the original state. See appendix E for more details on the generalized Eisenstein series that appear when considering the modular completion via Poincaré series of light characters. Part of the appeal of (4.9) is that at large central charge, the Poincaré sum is quite natural from the point of view of quantum gravity in AdS 3 . In particular, given a light state, a Poincaré sum generates contributions to the heavy spectral density that qualitatively reproduce the behavior of AdS 3 gravity in the small-G N expansion. That Poincaré sums "look" gravitational has long been observed [59,[61][62][63]; recent work has augmented this point of view [20,21,60,[64][65][66][67][68][69][70][71][72][73][74][75] in part due to the possibility that AdS 3 /CFT 2 may be understood as involving ensemble averages over CFTs, which assigns a physical interpretation to a continuous density of states.
With that said, there is no clear-cut candidate for a canonical modular completion. For example, a very interesting method of modular completion that leads to a slightly different heavy spectrum than that of the Poincaré sum, based on ideas used in Rademacher expansions, was recently put forth in [64]. It is not obvious to us if the modular completion using the Poincaré or Rademacher formalism is a more "natural" candidate. One may instead wish for a modular completion of the contribution of a given light state to the partition function that preserves discreteness of the accompanying heavy spectrum. However, we are not aware of such a modular completion that also retains square-integrability. 22

Interpretation
We are led to suggest the following perspective on the role of spectral decomposition in general 2d CFTs: given a light spectrum, Z spec (τ ) computes a deviation from average of the primary partition function Z p (τ ), where the role of the "average" is played by Z L (τ ).
This dovetails with our previous treatment of Narain CFTs, where "average" is taken to mean the literal ensemble average over Narain moduli space. Recognizing E c 2 (τ ) as the average primary partition function (3.1) of the U (1) c × U (1) c Narain CFTs, we may rewrite (3.47) as (Z (c) , ν n )ν n (τ ). (4.10) The right-hand side is Z where E c 2 (τ ) is, we emphasize, the Poincaré sum of the identity operator. From this point of view, it is rather interesting that E c 2 (τ ) is the average Narain partition function. Suppose one were to average over Narain moduli space with a measure different from the Zamolodchikov metric. Then Z L (τ ) and Z (c) (τ ) would not necessarily be equal. This gives a novel perspective on why the Zamolodchikov metric is privileged, and motivates the Poincaré sum as a natural modular completion: the average over moduli space, the Rankin-Selberg method, and the Poincaré sum of the identity operator all coincide.
In the general holographic context with Virasoro symmetry, we view Z L (τ ) as an "average" in the sense of universality. For the modular completion via Poincaré sum, for example, Z L (τ ) captures universal contributions of light matter to the black hole spectrum. This takes the form of the Cardy entropy plus an infinite series of corrections from the full family of SL(2, Z) black holes [76]. It encodes the semiclassical gravity approximation of the microstate counts of those black holes that form via collapse of light matter. The quantity Z spec (τ ) therefore accesses the microstructure that lies beneath the coarse-grained approximation, by subtracting these contributions from the full partition function Z p (τ ). Note that, unlike the Narain case reviewed above, we do not know how to ensemble average general Virasoro primary partition functions in the absence of moduli, and different modular completions Z L (τ ) give rise to different Z spec (τ ) for a given theory. The suggestion of the Narain case is this: if there exists a formal notion of "ensemble averaging" over Virasoro CFTs without moduli, a natural definition would be one for which Z spec (τ ) = 0.
If Z L (τ ) is to be interpreted in the above way, it is natural to expect that it should satisfy some physical constraints. For instance, in order to interpret Z L (τ ) as capturing universality of a (putative) consistent gravitational theory in AdS 3 , one would like its inverse Laplace transform to be positive-definite. 23 As currently formulated, this may not hold in all regions of (h, h) because the present application of harmonic analysis is firmly Euclidean: CFT partition functions are finite everywhere in F away from the cusp at y → ∞, so squareintegrability is sensitive to the spectrum of dimensions, ∆, but not to the spectrum of twists, t := 2 min(h, h). As such, the modular completion Z L (τ ) may not capture certain universal properties of twist spectra. For example, if one chooses to compute Z L (τ ) via Poincaré sum, the result will be positive-definite only if Z L (τ ) includes an operator with t ≤ c−1 16 [55]. Also, independently, if a CFT includes an operator lying strictly below this bound, it also includes infinitely many other operators, organized into Regge trajectories of asymptotically large spin, with asymptotic twist less than c−1 12 [77,78]. Neither of these phenomena would be fully captured by the Poincaré sum Z L (τ ), though other modular completions might plausibly do better. This is not a contradiction, but it does motivate the extension of SL(2, Z) harmonic analysis to Lorentzian regimes.

On half-wormholes in 2d CFT
The above discussion suggests an analogy between structures in 2d CFT partition functions and recent observations about saddle points in holography. It has been shown that in a toy version of the SYK model, the partition function contains novel saddle points, dubbed "halfwormholes" [36]. The general picture of [36,79] is that the partition function of the large N SYK model without disorder average is a sum of two saddle points: a disk-type saddle point, dual to a smooth black hole geometry in the bulk, and a half-wormhole, a "noisy" saddle point dual to some bulk geometry which gives small corrections to the black hole.
We can identify parallel structures in 2d CFT partition functions. In particular, at large central charge, Z L (τ ) captures the configurations continuously connected to saddle points, while Z spec (τ ) is a certain 2d analog of the half-wormhole. This follows rather naturally from our earlier discussion, since Z L (τ ) captures black hole universality of semiclassical gravity, while Z spec (τ ) encodes small corrections, i.e. the "noise." The total partition function is the sum of the two. This picture becomes especially sharp for the Narain theories whose partition functions are written, for example, in (3.47). In this case Z L (τ ) is precisely the averaged partition function E c 2 (τ ), while the remaining terms describe Z spec (τ ). As is apparent from (3.47), many of the terms in Z spec (τ ) can be written in a way which suggests their origin as a sum over geometries. For example, the Eisenstein series E s (τ ) is a Poincare series (see equation (A.1)) which can be interpreted as coming from a sum over geometries (handlebodies) labelled by Γ ∞ \SL(2, Z) in the usual way. This suggests, therefore, that we interpret these terms as the analog of half-wormhole contributions in the theory of gravity dual to the Narain ensemble. It would be interesting, of course, to give a more explicit bulk interpretation of these contributions.
One crucial feature of the half-wormhole solutions is that they restore factorization. In particular, in the computation of the two-boundary path integral of individual instantiations in the model of [36] (see also [80]), i.e. before disorder average, the half-wormhole terms combine with the wormhole (present in the disorder-averaged SYK model) in such a way as to restore factorization of the square of the partition function. We can, at least in principle, explore this mechanism explicitly in Narain CFTs. We know from [20] that the two-point function of the torus partition function averaged over Narain moduli space can be written in terms of a degree-two Eisenstein series (see [81] for more details on the averaged two-point function) where Ω = diag(τ 1 , τ 2 ) is a diagonal element of the degree-two Siegel upper half-space, and the rest of the technical details of the above formula are unimportant for present purposes. A natural generalization of (4.10) would be something like where Z (g=2) spec admits an Sp(4, Z) spectral decomposition. The left-hand side is computed by squaring (3.47), while the right-hand side is what is suggested by [36] and our perspective on spectral decomposition, now at genus-two. It is a concrete problem to understand whether such an equality makes sense, and how to perform Sp(4, Z) harmonic analysis, given the expressions in Section 3 of this paper (see [39,82], where the Rankin-Selberg method has been generalized to higher-genus modular functions).

Spectral determinacy
The spectral methods herein shed light on the question of spectral determinacy in compact 2d CFT; that is, whether the complete spectrum is fully determined once part of it is fixed. Indeed, applying these methods to primary partition functions readily gives the following result: The entire spectrum of a 2d CFT is uniquely fixed by the light spectrum, the scalar spectrum, and the spin j = 1 spectrum. This is depicted in a Chew-Frautschi plot in Figure 1 for Virasoro CFTs, but the result applies for any extended chiral algebra, with "light" primaries defined by (4.3). The proofindeed, the algorithm for constructing the spectrum -may be simply stated as follows: i) Given the light spectrum, form Z spec (τ ) defined in (4.6). Being square-integrable, Z spec (τ ) admits a spectral decomposition (2.10).
ii) The j = 0 spectrum of Z spec (τ ) fixes the overlap (Z spec , E s ), via the RS transform (2.11). This in turn fixes all higher-spin data coming from the Eisenstein part of Z spec (τ ). This step hinges on the fact that cusp forms have no scalar support, cf. (A.12).
iii) The j = 1 spectrum of Z spec (τ ), after subtracting the contribution from the Eisenstein part, fixes the overlap (Z spec , ν n ), and hence the remaining cusp form contribution. 24 This proof relies on an important assumption, which is that the cuspidal eigenspectrum is "simple": that is, the multiplicity of cusp forms with spectral parameter R n is no greater than one. This is unproven, but widely held to be true (e.g. [33][34][35]). A direct implication of such non-degeneracy is that all cusp forms are not just eigenfunctions of the Laplacian, but also eigenfunctions of all Hecke operators T j . 25 Consequently, the spin j = 1 coefficients a (n) 1 of the cusp forms are all non-vanishing, the proof of which we review in Appendix A.2. It is suggestive that our spectral determinacy result relies not just on the harmonic analysis of modular functions, but on the number-theoretic structure of these eigenfunctions related to Hecke operators. We suspect that Hecke operators may have an important role to play in future studies of 2d CFT.
In fact, we can derive a somewhat more general result, subject to a further minor assumption: that the entire spectrum of a 2d CFT is uniquely fixed by the light spectrum, the scalar spectrum, and the spectrum of any fixed integer spin j > 0. The argument is exactly as given above, except that one now requires that the coefficients a (n) j are all non-vanishing. When j > 1 this cannot be easily proven, but it is certainly very plausible. Indeed, as reviewed in the next section, the Fourier coefficients a (n) j (for prime spin j) are essentially random real numbers distributed according to the semi-circle law. Thus, although it is not rigorously proven that they are all non-zero, it is almost certainly true.
It is interesting to contrast these results on spectral determinacy with those in narrower classes of CFTs. In holomorphic CFTs, the heavy spectrum h > c 24 is fully determined by its complement because the partition function is a weakly holomorphic modular form of SL(2, Z) [87]. In rational CFTs, the twist spectrum t > c 12 is fully determined by its 24 In order to read off the cusp form contribution, we must invert the modified Bessel function of the second kind. This is done using orthogonality relations given in e.g. equation (3.22) of [83]. In general, if we define the subtracted spin-j spectrum, Z spin-j spec (y) := then we can read off the cusp form support by (assuming a 1 log ∞ dy y 3/2 K iRn (2πjy)Z spin-j spec (y). (4.15) complement, this time due to properties of vector-valued modular forms [32]. Note that spectral determinacy in ∆ also applies to rational CFTs: performing the algorithm with respect to the full partition function Z(τ ) rather than to Z p (τ ), whose form is obfuscated by non-trivial null states, yields essentially the same result, marginally weaker due to the lack of distinction between primaries and descendants.
Placed in a wider CFT context, it is an interesting and curious feature of the above result that all spins j > 0 are on equal footing (at least if the conjecture about the a (n) j non-vanishing holds). The Lorentzian inversion formula and non-perturbative Regge bound of [9] imply that in d-dimensional CFTs, all primary operators of integer spin j > 0 lie on analytic Regge trajectories. (For CFTs that are opaque in the sense of [88], the bound is instead j > 1.) Their OPE data are subtly intertwined: one may not dial dimensions or structure constants of any finite number of operators at will. We are finding a more specific result for Virasoro primary degeneracies in 2d CFTs, at least once all light primaries are accounted for: not only are the spin j > 0 degeneracies intertwined, but the degeneracies of all spins j > 0 are entirely determined by those of a single spin (in addition to the scalar data used to fix the Eisenstein contribution, cf. (4.14)). As for d-dimensional Regge trajectories, the scalar data is treated separately. It would be of great interest to understand 2d CFT spectral determinacy from a conformal Regge theory point of view.
In fact, it may be the case that the nonzero spin data need not be specified as extra input. If two compact CFTs have identical light primaries and scalar primaries, then their difference of spectra is a discrete sum of delta functions which can be written entirely as a linear combination of Maass cusp forms. If one can show that this is impossible, i.e. that no linear combination of Maass cusp forms can give a function whose inverse Laplace transform is a sum of delta functions, this would complete the argument. Similar determinacy arguments emphasizing the strong constraints implied by compactness were given in [32]. As we discuss in the next subsection, this impossibility is a reasonable expectation because cusp forms are, in a precise sense we will articulate in the next subsection, chaotic. We do not know how to prove the above statement and leave it for future study. 26

On chaos and cusp forms
Our discussion of Z spec (τ ) suggests that it is probing a certain fine structure of the spectrum of CFTs, the noise above the background of universal features. Here we will explore the idea that Z spec (τ ) -more specifically, the presence or absence of Maass cusp forms -is a probe of chaos in the spectrum of the CFT. Of course, that cusp forms participate in the spectral decomposition of the Narain partition functions (including at rational points in moduli space) prevents us from taking this idea literally as stated. Nevertheless, both the distribution of cusp form eigenvalues R n , and the Fourier coefficients a (n) j of a fixed cusp form ν n , are known to exhibit certain forms of chaos. This has been explored in the mathematics literature, see e.g. [23][24][25][26][27].
Let us first address the eigenvalues R n . Unlike random matrix ensembles (GUE, GOE, etc.), the eigenvalues at asymptotically large n obey a Poisson distribution [23,24]. The eigenvalues are the (discrete part of the) quantum mechanical energy spectrum of a particle propagating on the fundamental domain F of P SL(2, Z) with Hamiltonian given by the Laplacian −∆ τ , a system that is known to be strongly chaotic. This is known as "arithmetic chaos" [23,24,89], terminology that is due to the existence of an infinite number of operators that commute with the Hamiltonian (the Hecke operators (A.6)) and establish a deep connection with number theory.
The Fourier coefficients a (n) j of the cusp forms themselves also exhibit properties related to chaos. As discussed in Appendix A.2, the Fourier coefficients are the eigenvalues of the cusp forms under the action of the Hecke operators T j , and the cusp forms are conventionally normalized so that the spin-one coefficient is unity, a (n) 1 = 1. Although this normalization of the cusp forms may seem contrived from a physical point of view, it turns out to be quite natural for a number of purposes. For example, the Ramanujan-Petersson conjecture 26 An observation that might suggest an alternate version of spectral determinacy is that the logarithm of the partition function can be made square-integrable without subtracting a modular completion of light states, assuming the partition function is positive everywhere in the fundamental domain. In particular, log Z(τ ) has a linear divergence as y → ∞, which can be subtracted off in a modular-invariant way by an appropriate factor multiplying E 1 (τ ): The meaning and utility of this are unclear. It may nevertheless be interesting to consider its spectral decomposition. Similarly, although the average of the c = 2 Narain primary counting partition function diverges, the average of its logarithm converges. It is not clear to us how to compute this other than numerically.
(as stated e.g. in [19,27]) states that the absolute value of the Fourier coefficients with prime j are bounded |a It turns out that statistical properties of the Fourier coefficients of the cusp forms can also be naturally stated with this normalization. For example, if one considers the sequence of Fourier coefficients {a (n) j } for fixed prime j ordered by increasing eigenvalue R n , then Sarnak has shown that they are equidistributed with respect to the following measure [27] dµ j (t) = (j + 1) Note that as j → ∞, this measure is asymptotically Wigner's semicircle. Moreover, the Sato-Tate conjecture states that one can reverse the limits j → ∞ and n → ∞ and arrive at the same conclusion: for a fixed cusp form, its prime Fourier coefficients are equidistributed with respect to a measure that is asymptotically Wigner's semicircle. This has been extensively checked numerically for the cusp forms with lowest-lying eigenvalues [25,26].
It is tempting to speculate that this notion of chaos is related to spectral chaos in CFTs. It is however not clear how to make this relation precise. As shown previously, the Narain CFTs for c > 1 all have cusp form support, though with a miraculously simple structure at e.g. c = 2 (see (3.30)). We can also look at some examples of rational CFTs and see if there is any pattern in the behavior of their cusp form support. Let us compute the following quantity for the (p, q) Virasoro minimal models: This is somewhat unnatural -|η(τ )| 2 does not count Verma module descendants, due to the non-trivial null states -but we proceed nevertheless. We now recall that partition functions for all Virasoro minimal models, diagonal or not, may be written as linear combinations of Z (c=1) (τ ; r) of different radii [90]. For example, diagonal invariants obey It follows from (3.14) that the above quantity does not have cusp forms in its spectral decomposition. The fact that the cusp forms do not show up for Virasoro minimal models seems to be an accident of these particular CFTs, however. For instance, we have verified numerically that y|η(τ )| 4 times the partition function of the lowest unitary W 3 minimal model does have cusp forms in its decomposition. It remains unclear to us what the precise connection is between the Maass cusp form overlap of the partition function and quantum chaos.

Acknowledgments
We are grateful to Fernando Alday,

A Real analytic Eisenstein series and cusp forms A.1 Real analytic Eisenstein series
The real analytic Eisenstein series are a special class of non-holomorphic modular functions formally defined in terms of a Poincaré series, a sum over images of the modular group P SL(2, Z): where Γ ∞ is the subgroup of P SL(2, Z) of upper triangular matrices 1 n 0 1 , n ∈ Z, that fixes y := Im τ . The sum in (A.1) only converges for Re s > 1, but it admits a meromorphic continuation to the entire s plane, with the following Fourier decomposition where σ n (x) = d|x d n is the divisor function and K is the modified Bessel function of the second kind. The Fourier decomposition (A.2) makes it clear that the Eisenstein series satisfies the following functional equation The Eisenstein series are eigenfunctions of the Laplacian on the upper half-plane, with eigenvalue The Eisenstein series are also eigenfunctions of the Hecke operators T j where the action of the Hecke operators is defined by The Hecke operators satsify the multiplication formula The meromorphic continuation of the Eisenstein series has a simple pole at s = 1 with a moduli-independent residue 3 π = vol(F) −1 . Moreover, the regular part of the Eisenstein series at s = 1 is given by the Kronecker limit formula (see e.g. [19]) cos(2πjx)σ 1 (j)e −2πjy j . (A.8) The regular part is not an eigenfunction of the Laplacian; rather, it satisfies the inhomogeneous equation

A.2 Maass cusp forms
The Maass cusp forms are another important family of modular-invariant eigenfunctions of the Laplacian ∆ τ ∆ τ ν n (τ ) = 1 4 + R 2 n ν n (τ ), (A.10) where R n is a positive real number. The cusp forms are either even or odd under parity, which we denote as ν + n (τ ) and ν − n (τ ) respectively, namely When we write ν n (τ ) without specifying the superscript, we refer to both even and odd cusp forms. The cusp forms decay exponentially at the cusp y = ∞ and admit the following Fourier decompositions: In the math literature, it is often convenient to adopt conventions such that the cusp forms are not unit-normalized, in particular with the spin-one Fourier coefficient set to unity a (n,±) 1 We have listed the eigenvalues and low-lying Fourier coefficients of the cusp forms with smallest eigenvalues in Table 1.     Table 1: Some numerical data for the first five even cusp forms, ν + n (τ ), and the first five odd cusp forms, ν − n (τ ). For more numerical precision, see [47]. For much more numerical precision, see [48].
Under this normalization, the Fourier coefficients a T j ν n (τ ) = a (n) j ν n (τ ). (A.14) The Fourier coefficients thus satisfy the Hecke relations One simple application of this is found by setting k = 1, so that From this we see that a  2 ) 2 − 1, as can be readily checked in Table  1. See section 4.5 for more discussion of properties satisfied by the Fourier coefficients of the cusp forms.

B Resolvent for the c = 1 free boson
Here we will employ the spectral decomposition (3.14) of the primary partition functions of the c = 1 free boson to compute the corresponding resolvent.
The resolvent C j (∆) is a quantity that we define to have simple poles at the spectrum I j of local primary operators of spin j, with residue given by the degeneracy d ∆ i ,j of the associated primary In 2d CFT with c > c currents , the resolvent is not a well-defined quantity when applied to the full primary partition function Z p (τ ), due to the lack of square-integrability from low-dimension operators, and the exponential growth of high dimension operators implied by the Cardy formula. However, Z spec (τ ) does admit a resolvent, as does Z p (τ ) in certain special cases; the latter includes the Narain theories at c = 1, where the analog of the Cardy asymptotic density of primaries behaves like (e.g. [20,21]) In such situations, where ρ j (∆ 1) decays and hence the resolvent is well-defined, we may define the corresponding object, call it Z(τ ), in terms of the resolvent as where γ is a suitable vertical contour in the ∆ plane. We thus extract the resolvent from a Laplace transform of the spin-j partition function where for the purposes of computing the integral we assume Re u < |j|.

Scalar sector
In what follows it will be convenient to define the general quantity so that the contribution of the Eisenstein series in the spectral decomposition to the resolvent is given by In order to exchange the orders of integration we just need to assume Re u < 0. Then we have We now specify to the c = 1 free boson, Z(τ ) = Z In order to reproduce the lattice of poles corresponding to the scalar spectrum of the free boson theory, we would like to write the zeta function above as an infinite sum ζ(−2it) = ∞ n=1 n 2it . In order to do this, we need to shift the t contour so that Im t > 1 2 for the first term above, and Im t < − 1 2 for the second term. Focusing on the first term, in doing so we pick up the residue of the integrand at t = i 2 , in addition to a contribution from a pole that develops at t = 0 due to the fact that we are deforming the contour for the two terms in different directions, which can be dealt with via a principal value prescription. Referring to the new t contour as C, we then have where we have evaluated the integral in the first line by deforming the contour upwards in the complex t plane and summing over residues at t = iZ >0 .
Meanwhile, the contribution of the constant term to the resolvent is given by exactly canceling the first term in (B.9).

Spinning sectors
So far we have seen that the spectral decomposition (3.14) of the c = 1 free boson leads to poles in the scalar resolvent at precisely the locations of local scalar operators. This is not unexpected since the Maass cusp forms have no scalar components. Here we will see how the correct spectrum is generated in the spinning sectors. The contribution to the spinning resolvent from the Eisenstein series is given by Again for the meantime assuming Re(u) < j, we can exchange the integrals to arrive at where we have defined Writing H(t)σ 2it (j)j −it = 4 d|j cos(tL r ) cos(tL d ), where L d := log j d 2 , we then have . (B.14) In the second line we wrote the sine as a difference of complex exponentials, deformed the t contour in appropriate directions for each term, picked up an appropriate residue from a pole at t = 0 according to a principal value prescription (this is the first term), and summed over the residues of the poles of sinh(πt) −1 . What we are left with is precisely the discrete sum over poles corresponding to the states of spin j in the c = 1 free boson at radius r. So the cusp forms must play no role in reconstructing the discrete sum over operators in the c = 1 partition functions. Indeed in appendix C we will prove explicitly that the overlap of the partition function of the c = 1 free boson with the cusp forms vanishes.
C Derivation of cusp form overlap for c = 1 and c = 2 Narain theories In this appendix we will derive the inner product between the primary partition function of the c = 1 (3.8) and c = 2 (3.20) Narain theories and the Maass cusp forms 27 where ρ and σ are respectively the complexified Kahler structure and the complex structure of the target T 2 . In general CFTs, we do not know how to compute the inner product with the cusp forms except by brute-force numerical integration because one does not have access to the unfolding trick. However, if the partition function can be rewritten as a sum over terms that are themselves Poincaré series, then one can apply the unfolding trick to each of those terms. We will show how to do this explicitly for the c = 1 and c = 2 Narain lattices. The starting point is to note that the Narain lattice partition function after Poisson resummation, equation (F.2), is manifestly modular invariant, and moreover that an SL(2, Z) transformation τ → aτ +b cτ +d on the complex modulus τ can be absorbed by a transformation (m i , n i ) → (dm i + bn i , cm i + an i ) on the set of integers m i and n i in the sum. This provides an action of SL(2, Z) on the (m i , n i )s, which lets us group them into irreducible representations. We can then write the total sum over (m i , n i ) as a sum over these irreducible representations, i.e. as a sum over Poincaré series.
We begin with the simpler case of the c = 1 Narain lattice. In this case, every pair (m , n ) can be obtained by a Γ ∞ \P SL(2, Z) transformation acting on (m, 0) where m is the greatest common factor of (m , n ). This fact follows immediately from the general SL(2, Z) transformation acting on (m, 0) → (dm, cm). Therefore, we can compute the overlap of Z (c=1) with a cusp form ν n as follows: where we have used the fact that ν n has no scalar part.
Next, to write the c = 2 Narain partition function in terms of Poincaré series, it is helpful to combine the momentum and winding numbers n 1 , n 2 , w 1 , w 2 into a matrix whose determinant is (minus) the spin of the corresponding primary operator in the sum defining the lattice theta function. In the case that the determinant is unity, this corresponds to a Poincaré series. 28 To move to sectors of higher spin, one applies a generalization of the Hecke operators. Concretely, (3.20) can be rewritten as where Z and T j is a generalization of the Hecke operator (A.6) that acts on τ as well as σ Importantly, these Hecke operators give the same answer acting on either ρ or σ, so we could also write In what follows it will be important that the partition function (C.5) is invariant under the triality exchanging any pair of τ, ρ, σ, provided the action of the Hecke operators T is suitably modified.
To get started, we consider the inner product between an even cusp form ν + n and the Poincaré series Z ∓1 as defined in (C.6) (up to a change of triality frame) −πj 2 σ 2 y so that the inner product (C.9) assembles into To derive the overlap with the remaining parts of the c = 2 partition function, we simply apply the Hecke operators T N , which now rescale ρ → N ρ and sum over σ → aσ+b d : 29 (C. 12) where T N is the conventional Hecke operator defined in (A.6), and we have made use of the fact that the cusp forms are eigenfunctions of the Hecke operators as in (A.14). Note that the difference in normalization between T N and T N was essential for this to work out. 29 We would get the same answer if we took the Hecke operators to rescale ρ → N ρ and sum over τ → aτ +b d . In this case we would be computing , ν + n , which reduces to (C.12) upon recognizing that the ordinary Hecke operators T N are self-adjoint with respect to the Petersson inner product.
An essentially identical calculation shows that

D Clebsch-Gordan coefficients for Eisenstein series and cusp forms
It is often interesting to consider partition functions in the product locus of the Narain moduli space, namely, partition functions in M c 1 +c 2 that can be written as a product of partition functions in M c 1 and M c 2 . For these purposes, one must understand the spectral decomposition of products of eigenfunctions of the worldsheet Laplacian. We are grateful to Peter Humphries for explaining the results of Appendix D.1 to us.

D.1 Computing the Clebsch-Gordan coefficients
We will begin by considering the inner product of a product of real analytic Eisenstein series with another Eisenstein series. This inner product requires regularization, so we will write it as a RS transform, which can be computed using the methods of Section 2.2 Using the RS method as adapted by Zagier (indeed, this example was treated in Section 3 of [22]), after discarding the terms of slow growth at the cusp in the scalar sector of E s 2 E s 3 , this inner product can be written in terms of a Mellin transform By making appropriate assumptions about the real parts of the s i , we can exchange the sum and the integral to arrive at This result is completely symmetric under exchange of s 1 , s 2 , s 3 due to the functional equation satisfied by Λ(s).
Next we will consider the overlap of two real analytic Eisenstein series with an even Maass cusp form 30 The presence of the cusp form means that this does not require regularization in the same sense as the previous case of three Eisenstein series. This can also be written as a Mellin transform Given appropriate assumptions about the real parts of s 1 , s 2 , we can exchange the sum and the integral to arrive at The sum over j can be simplified by making use of the fact that the cusp form Although the above expression only converges for Re s > 1, the L-functions admit a meromorphic continuation to the entire L plane and satisfy a functional equation. In particular, defining and is entire. All together, we then have 30 The overlap of two Eisenstein series with an odd Maass cusp form vanishes.
We will now compute the final "Clebsch-Gordan" coefficient that involves an Eisenstein series and thus can be evaluated used the RS unfolding method, namely the overlap of two Maass cusp forms with an Eisenstein series 31 (2πjy). (D.12) Exchanging the sum and integral to evaluate the Mellin transform as usual, we arrive at The residues of these Clebsch-Gordan coefficients at s = 1 encode the norms of the cusp forms via (ν ± n , ν ± n ) = Although there is no direct way to apply a RS transform in this integral, in the math literature it is known that the square of the average of certain triple products of Maass cusp forms over the fundamental domain can be written in terms of a certain L-function, see for example [93][94][95].

D.2 Two routes to the product locus
The fact that the overlap coefficient involving two Eisenstein series and one cusp form is generically non-vanishing means that even if certain partition functions have spectral decompositions without support on cusp forms, the product partition function will have support on cusp forms. Indeed we can see explicitly that this is true by considering the case of the product of c = 1 free boson partition functions (3.14) and the c = 2 Narain partition functions (3.31) on the product locus. 32 Although the former does not have support on cusp forms, the latter does. Indeed, the equality of the product of partition functions given by (3.14) and (3.31) on the product locus implies some remarkably non-trivial integral identities.
Our spectral decompositions of the c = 1 (3.14) and c = 2 (3.31) imply the following equation: (Since the product locus is invariant under parity, there are no odd cusp forms on the RHS of (D. 19).) We would like to use our results for the Clebsch-Gordan coefficients K to unpack this equation. These Clebsch-Gordan coefficients can be understood as coefficients in the spectral decomposition of the product of eigenfunctions of the worldsheet Laplacian. For example, we can use spectral decomposition to write the product of Eisenstein series appearing on the left-hand side of (D. 19) as  19) and using the explicit form of K n s 1 ,s 2 , we get the following identity by demanding the cusp forms of both sides match. For all r 1 , r 2 , and for all even cusp forms ν + n , we claim:
If s < 1 2 , we can perform a spectral decomposition of E(s, τ, J) by subtracting the finite number of terms in the first sum of (E.5), (E.6) that scale as y 1/2 or faster at large y. For example, for 0 < s < 1 2 , we get E(s, τ, J) + E(s, τ, −J) = 2σ 1−2s (|J|) ζ(2s − 1) E s (τ ) + 1 4πi (E.7) In the math literature it is more conventional to study a different Poincaré series involving a seed with nonzero spin that grows exponentially at the cusp. These are sometimes known as Niebur-Poincaré series, and they are defined as [96] F (s, τ, J) := γ∈Γ∞\P SL(2,Z) e 2πiJx √ yI s− 1 2 (2π|J|y). (E.8) These are convenient objects to study because they are eigenfunctions of the Laplacian ∆ τ F (s, τ, J) = s(1 − s)F (s, τ, J). (E.9) The Fourier decomposition of these modular functions, and the relationship between them and Poincaré series that are more directly related to the modular completion of the characters of light states with spin, is well-known (see in particular [97]).

F Decompactification limit
In this appendix we review and slightly generalize the derivation in [28] of the d-dimensional Eisenstein series in the limit that some of the directions are taken to be large. More specifically, we consider the limit where the Narain lattice factorizes into (F.1) and we take the limit where the metric g At large r, each term in the sum in Γ D is exponentially suppressed due to the first term in the exponent, unless n i = 0 and τ 2 r 2 . 34 Therefore, up to exponentially small (in r) corrections, we can set n i = 0 and just work with the sum on m i ; this is a significant simplification compared to the original (i.e. not Poisson resummed) expression for Γ D , where we would have to include terms both from the sum over momentum modes and winding modes to capture all the power-law terms in r. The basic idea of the decompactification calculation in [28] is simply to combine this Poisson resummation with Zagier's modification of the Rankin-Selberg transform, which tells us exactly how to deal with the non-convergence of the dy integral due to the growth at large y of the vacuum state. Schematically, the important structural aspects of the calculation are that after Poisson resummation, Γ D decomposes into the following three pieces: where the subscripts indicate which terms in the sum from (F.2) are included. The first piece is just a constant,Γ n=0 m=0 = det g (D) . The third pieceΓ n =0 is exponentially suppressed at large r and can be discarded. The second pieceΓ n=0 m =0 vanishes at large r except for the region where y r 2 , so anywhere it appears in the integrand we can take y to be large. In particular, whenΓ n=0 m =0 appears in the integrand, we can exchange the cut-off fundamental domain F T for the cut-off strip without modifying the power-law-in-r pieces.
To start, write the RS transform (2.18) with f = Γ D × Γ d−D in the following form: where E s := Λ(s)E s , ϕ s := Λ(s)ϕ s and ϕ(y) = y d/2 . At large r, the third line is exponentially suppressed and can be discarded. Because ϕ(y) is a pure power, the terms on the last line above sum to zero. The first line is almost det g (D) times the RS transform of Γ d−D , but is missing the last few pieces from (2.18). We can add and subtract these pieces to get and E s ∼ ϕ s . Moreover, because all the integrands in the last line are pure powers of y, we can exchanges the integration regions y ∈ (0, T ) with y ∈ (T, ∞) by adding an overall minus sign. By choosing s appropriately in various terms in the integrand, we can make all the integrals over y ∈ (T, ∞) converge and The remaining integral over y can be done term-by-term in the sum over m i . To go farther, we can restrict to the cases D = 1 and D = 2, where we can do the sums over m i in terms of known functions. For D = 1, the sum over m can be expressed simply in terms of the zeta function, and for D = 2 in terms of Eisenstein series E s . The case D = 1 was already obtained by this method in [28], with the result (F.7) where R 1 := det g. For D = 2, we can use the fact that  (1) ) + E 1 (ρ (2) ) + E 1 (σ (2) ) + 3 π log ρ (1) 2 + γ (F. 10) where γ is defined as in (3.41). We have checked numerically that at large ρ (1) 2 , the coefficients of the cusp forms follows the same pattern as we saw at smaller c, giving (3.40).