Free partition functions and an averaged holographic duality

We study the torus partition functions of free bosonic CFTs in two dimensions. Integrating over Narain moduli defines an ensemble-averaged free CFT. We calculate the averaged partition function and show that it can be reinterpreted as a sum over topologies in three dimensions. This result leads us to conjecture that an averaged free CFT in two dimensions is holographically dual to an exotic theory of three-dimensional gravity with U(1)c×U(1)c symmetry and a composite boundary graviton. Additionally, for small central charge c, we obtain general constraints on the spectral gap of free CFTs using the spinning modular bootstrap, construct examples of Narain compactifications with a large gap, and find an analytic bootstrap functional corresponding to a single self-dual boson.


Introduction
Among the simplest conformal field theories in two dimensions are those with a U(1) c left × U(1) c right current algebra, where c is the central charge. These CFTs are theories of c free bosons, familiar from toroidal compactifications in string theory.

JHEP01(2021)130
In this paper we will revisit an old problem: mapping the landscape of torus partition functions for free CFTs. In the first part of the paper, we undertake a systematic analysis of constraints on the spectrum using techniques from the modular bootstrap [1][2][3][4]. In [5] it was shown that the modular bootstrap for free CFTs is related to the sphere packing problem. However, this relation holds only for the spinless version of the modular bootstrap, which in terms of the torus modulus is restricted to τ = −τ . Here we will apply the full modular bootstrap, with independent τ andτ , which does not appear to be related to sphere packing in general.
Instead, the full modular bootstrap for free CFTs is related to the geometric problem of constructing Narain lattices with a large spectral gap, which is a special case of sphere packing. A Narain lattice is an even self-dual lattice in R c,c , which famously defines a theory of c compact bosons [6]. The spectral gap is the scaling dimension ∆ 1 of the first nontrivial primary state in the CFT defined by this lattice, and a Narain lattice is optimal if it maximizes this gap among all such lattices with a given central charge.
The modular bootstrap places an upper bound on the gap as a function of c. We compute this bound numerically for c ≤ 15, compare the bounds to explicit Narain lattices, and discuss cases where the numerical bound is saturated. We analytically solve the case c = 1, where the optimal theory is a self-dual boson, by exhibiting a suitable bootstrap functional. This is an interesting example for the bootstrap because while some spinless bootstrap problems are analytically tractable [7], there are relatively few exact results with spin (see, however, recent progress in [8,9]).
In the second part of the paper, we use methods of Siegel [10][11][12][13] to study free boson partition functions averaged over Narain moduli. These methods provide an ensembleaveraged formula for the density of states in a free CFT, where the ensemble is defined by the natural measure on the moduli space provided by the Zamolodchikov metric (which in this case agrees with the Haar measure for O(c, c) up to scaling). 1 In particular, the formula provides information about the spectrum of an average Narain lattice in a large number of dimensions, and we use it to prove that as c → ∞, there are Narain lattices with ∆ 1 ≥ c/(2πe) + o(c).
This formula for ∆ 1 motivates the search for a holographic duality. To explain why, let us first step back to review the status of holographic duality for pure gravity in three dimensions, and the corresponding search for a dual CFT. A holographic dual for pure 3d gravity would be a CFT with Virasoro chiral algebra and ∆ 1 /c finite and nonzero in the limit as c → ∞. No such CFT has been found. Indeed, to find or exclude such a theory is one of the primary motivations of the modular bootstrap program. The interpretation of such a CFT, if it exists, is that the Virasoro descendants of the vacuum are dual to Brown-Henneaux boundary gravitons in AdS 3 , and the primaries with dimension of order c are dual to black holes or other non-perturbative states.

JHEP01(2021)130
where χ Vir 0 is the Virasoro vacuum character, γτ is an image of τ under SL(2, Z), and the other notation will be explained in section 5.2. This sum over images under the modular group is known as a Poincaré series. 2 In the gravity theory, it is a sum over topologies of the BTZ black hole. Maloney and Witten computed the sum and found that the result does not make sense as a CFT, because the density of states is continuous and non-unitary. There have been various steps toward fixing the unitarity problem [21][22][23][24], most recently by including conical defects in the path integral, but the resulting spectrum is still continuous and the status of pure 3d gravity as a quantum theory is as yet unresolved.
Another wrinkle in this story is the recent discovery that pure gravity in two dimensions, where it is known as Jackiw-Teitelboim (JT) gravity, is holographically dual to random matrix theory [25][26][27][28]. This duality provides a beautiful interpretation for a theory with a continuous spectrum as an ensemble average over ordinary theories with discrete spectra. Since JT gravity is the dimensional reduction of 3d gravity [29,30], it seems increasingly likely that averaging could also play a role in a putative dual to pure 3d gravity. On the other hand, the notion of a random CFT in two dimensions is rather mysterious: what is the ensemble? There is a natural measure on the moduli space of CFTs connected by exactly marginal deformations, but a CFT dual to pure 3d gravity would have no marginal operators. It would be isolated in the space of CFTs. Therefore even if we had a large class of theories to average over, it would be unclear how to define a measure.
We will show that if the Virasoro algebra is replaced by the U(1) c current algebra, then the sum over three-dimensional topologies can be carried out, and it has a consistent interpretation as an average over Narain lattices. We will refer to the bulk theory in three dimensions as U(1) gravity. It is perturbatively equivalent to U(1) c × U(1) c Chern-Simons theory, with the action (1. 2) We emphasize that this action is not supposed to define the non-perturbative theory, and it is provisional in the sense that we will only check it on the torus. For comparison, ordinary 3d gravity is perturbatively equivalent to an SL(2, R) × SL(2, R) Chern-Simons theory [31][32][33], with a boundary condition inherited from gravity that differs from the usual one in gauge theory (see, for example, [30]). In addition to the perturbative action (1.2), U(1) gravity comes with a prescription to sum over three-dimensional topologies. This is part of the definition of the theory. We will not attempt give a complete non-perturbative definition in this paper, but for torus boundary conditions, the sum over topologies is taken to be a sum over torus handlebodies, as in the Maloney-Witten path integral (1.1) for ordinary 3d gravity. The theory of U(1) gravity is certainly not an ordinary gravitational theory in three dimensions, so the lessons learned from this theory do not necessarily carry over to more realistic theories. We do not expect it to have black holes that dominate the canonical ensemble at O(1) temperature. On the other hand, U(1) gravity does have excitations JHEP01(2021)130 equivalent to the Brown-Henneaux boundary gravitons in ordinary 3d gravity. They are composites built from the U(1) gauge fields, mimicking the Sugawara construction in the boundary CFT. There are also higher spin composites, built from higher products of the gauge fields, so U(1) gravity has some similarities to higher spin gravity. 3 The one-loop partition function for U(1) gravity on a solid torus is the U(1) c × U(1) c vacuum character, denoted χ 0 (τ )χ 0 (τ ). Therefore the full partition function for U(1) gravity on a torus is the Poincaré series We will compute the sum and show that the resulting spectrum agrees exactly with Siegel's measure on random Narain lattices for any c > 2. The agreement between these two calculations is in fact a special instance of the Siegel-Weil formula relating Eisenstein series to integrated theta functions [11,12,39,40]: the bulk calculation reduces to an Eisenstein series, and the CFT calculation is an averaged theta function. Thus, we conjecture that an averaged Narain CFT for c > 2 is holographically dual to a theory of U(1) gravity. We have demonstrated that this duality holds at the level of the torus partition function, but we have not given a fully non-perturbative definition of the bulk theory, which would require an understanding of how to sum over topologies when the boundary condition is a union of Riemann surfaces of arbitrary genus. If the duality is correct, then it should also be possible to calculate ensemble-averaged quantities such as Z(τ 1 ,τ 1 )Z(τ 2 ,τ 2 ) from multi-boundary wormholes in the bulk, as in the JT/random matrix duality [27]. The connection to the Siegel-Weil formula also suggests a way to generalize the calculations to higher genus.
Higher topology contributions to the gravitational path integral have played a key role in recent efforts to address Hawking's information paradox [41,42]. Whether these wormholes correspond to an ensemble average is unknown, but in [43], it was argued that spacetime wormholes in averaged theories can be reinterpreted by doing the path integral with a boundary condition that selects an individual member of the ensemble. It would be interesting to explore these alpha states in U(1) gravity, where both sides of the duality are tractable.
In section 2 we review background material on partition functions with U(1) c × U(1) c symmetry. In section 3, we study bootstrap constraints and explicit Narain compactifications in low dimensions. Finally, in sections 4-5 we explore averaging over Narain lattices and the holographic duality. The bootstrap section is largely independent of the later sections, except as motivation, so it can be read independently.
As this work was nearing completion, we learned that related ideas regarding averaging over Narain lattices were arrived at independently by Maloney and Witten [44].

Partition functions
The partition function of a compact, unitary 2d CFT is where q = e 2πiτ ,q = e −2πiτ , h andh are non-negative conformal weights of each state, and τ and −τ are independent complex numbers in the upper half-plane. In a theory with U(1) c left × U(1) c right current algebra, the partition function can be expressed as a sum over primaries via , and the degeneracy d h,h is the number of primaries with conformal weights h andh. There is a unique vacuum state with h =h = 0 and d 0,0 = 1.
We assume the partition function is modular invariant. In other words, Z satisfies the identity for all γ ∈ SL(2, Z), where γ = p q r s ∈ SL(2, Z) acts as The group SL(2, Z) is generated by S and T , where The scaling dimension and spin of a state are respectively. Invariance under T requires that ∈ Z. Thus, we can also write the partition function as The density of states ρ (∆) is a sum of delta functions with positive integer coefficients, and the unitarity bound h ≥ 0,h ≥ 0 implies that ρ (∆) has support only for ∆ ≥ | |.

Spinning modular bootstrap
The modular bootstrap is a version of the conformal bootstrap applied to 2d partition functions. Following [1][2][3][4], we write the condition Z(τ,τ ) where we symmetrize h andh to obtain Suppose ω is a linear functional acting on functions of (τ,τ ), such that and which contradicts the crossing equation (2.10). This method can be applied to any chiral algebra. Our focus is on theories with U(1) c × U(1) c symmetry, for which the space of functionals can be found by the usual logic with some minor adjustments. Under S, the U(1) c characters transform by a Fourier transform in R c : for x ∈ R c , (2.15) Thus, S acts on the product χ h (τ )χh(τ ) as a Fourier transform in R 2c with the identifications h = 1 2 |x| 2 andh = 1 2 |x| 2 for (x,x) ∈ R c 2 = R 2c . It follows that under these identifications, the function ω(Φ h,h ) is always an eigenfunction of the Fourier transform in R 2c with eigenvalue −1. Furthermore, every −1 eigenfunction that is invariant under exchanging x andx occurs as ω(Φ h,h ) for some ω, as one can check using the derivative basis given in (2.16) below.
In principle, the best bootstrap bound on ∆ 1 is obtained by optimizing over this space of functionals. This is usually difficult, so it becomes necessary to truncate the problem and use a computer to search over a finite dimensional space. We restrict to the space spanned by the derivative functionals

JHEP01(2021)130
with m + n ≤ K. The resulting eigenfunctions are spanned by m (x) a generalized Laguerre polynomial, m > n ≥ 0, m + n ≤ K, and m + n odd. For each (m, n), these functions have one discrete label h −h, which we can take to be a non-negative integer, and one continuous label ∆ = h +h.

Narain compactifications
A Narain lattice Λ is an even, self-dual lattice of signature (c,c). For a review of the role of Narain lattices in conformal field theory and string theory, see [45,46]. We consider Narain lattices of signature (c, c), where for (x, y), (x , y ) ∈ R c,c = (R c ) 2 the inner product is (x, y) · (x , y ) = x · x − y · y . A Narain lattice defines a CFT of c free bosons, with the partition function The condition that Λ is even ensures that the CFT states have integer spin, i.e., the partition function is invariant under T . Then the condition that Λ is self-dual implies that Z Λ is also invariant under S and therefore under the full modular group. The primary fields correspond to vectors (x, y) ∈ Λ, with scaling dimension and spin ∆ = 1 2 (|x| 2 + |y| 2 ) and = 1 2 (|x| 2 − |y| 2 ). In the sigma model, this moduli space is parameterized by the metric and flux on the target torus. Consider c = 1, the theory of a single compact boson of radius R. The partition function is The theory is invariant under the T -duality R → 2/R. The spectrum of primary operators is

JHEP01(2021)130
so the optimal Narain compactification for c = 1 -i.e., the CFT with the largest gap between the vacuum state and the first nontrivial primary -is the self-dual boson, with R = √ 2. It has ∆ 1 = 1/2 for its spectral gap. 4 More generally, the spectral gap of a Narain lattice Λ is given by In other words, we can form a sphere packing in ordinary Euclidean space by centering spheres of radius √ 2∆ 1 at the points of Λ, with one sphere per unit volume in space because all Narain lattices have determinant 1. Maximizing ∆ 1 amounts to maximizing the packing density. Thus, CFTs consisting of free bosons correspond to a special case of the sphere packing problem, in which the spheres must be centered at the points of a Narain lattice.

Numerical bootstrap bounds
We use the spinning modular bootstrap method described in section 2.2, together with standard computational tools such as the semidefinite program solver SDPB [49], to place an upper bound on the spectral gap ∆ 1 in theories with U(1) c × U(1) c current algebra. More details of our implementation are in appendix A.
We denote the bootstrap bound at central charge c and truncation order K by ∆ shows various values of K, so that it can be used to judge whether the bound has converged. Some values have converged better than others, and even some of the low-lying results may not have converged. In particular the bounds around c ∼ 1.5 and c ∼ 3 are still changing appreciably at K = 25, so the actual bounds could be significantly stronger. Note that larger values of the central charge require a higher K to get a strong bound, so it is not computationally feasible to find useful bounds from this method for c much larger than 15.
In figure 3, we compare to the spinless bootstrap bound for U(1) c × U(1) c obtained in [50]. For c = 4, the spinning bound is strictly stronger in this range.
In figure 2 we see that there are three points where the spinning bound appears to converge to a known CFT, all sitting on the line ∆ = c+2 6 . The following upper bounds are obtained at truncation order K = 19: At rational values of R 2 there are additional conserved currents, so the chiral algebra is enhanced.
The same happens at special values of the moduli for any c. However we can still decompose states under U(1) c × U(1) c , and we will do this throughout the paper, so that the chiral characters are independent of the moduli.

JHEP01(2021)130
(c + 4)/8 (c + 2)/6 ∆    At c = 1, the CFT that saturates the bound is a compact boson at the self-dual radius, discussed in section 2.3. This theory is equivalent to the SU(2) 1 WZW model. At c = 2, the bound is saturated by the SU(3) 1 WZW model. This theory has a realization as two bosons compactified on a 2-torus at the three-fold symmetric point in moduli space. At c = 4, as discussed in [4,50], it is saturated by 8 free fermions with the diagonal GSO projection, or equivalently the SO(8) 1 WZW model. The sharp bound for c = 4 follows automatically from the known bound using the spinless modular bootstrap [5], and we will prove the bound for c = 1 below. That leaves  the c = 2 case as an open problem for the analytic bootstrap. It seems conceptually similar to the sharpness of the spinless bound for c = 1, and both of these cases resist all known techniques.
The line ∆ = c+2 6 has appeared in previous modular bootstrap studies [4,51]. It is the gap to the first primary in the WZW models for respectively. We have already encountered these theories at c = 1, 2, 4. The other theories on the list are consistent with our bound. Their partition functions can be found in [52,53].
When c is not an integer, this algebra does not even make sense, but we can still ask whether the partition function can be expanded as in (2.2) with positive coefficients. In the (G 2 ) 1 theory it cannot, so the bound does not apply. The (E 6 ) 1 and (E 7 ) 1 theories do have the required current algebra. These theories have gap ∆ 1 = c+2 6 with respect to the full chiral algebra, but gap ∆ 1 = 1 with respect to the U(1) c left × U(1) c right subalgebra, because there are additional currents in the vacuum module that are primary under this subalgebra. Therefore they fall below our bound. The situation for (F 4 ) 1 is similar. (This theory has no U(1) c left × U(1) c right subalgebra, because c is not an integer, but does have a positive expansion of the form (2.2) with fractional coefficients.)

Analytic functional for the self-dual boson
We will now construct an analytic functional to prove that every compact, unitary 2d CFT with c =c = 1 and current algebra U(1) × U(1) has a non-vacuum primary state with ∆ 1 ≤ 1 2 . In other words, the self-dual boson is optimal for this problem. This result may be obvious, but the method is novel and may lend insight into more complicated bootstrap problems with nontrivial spin dependence.
We can restate the requirements of section 2.2 for the spinning modular bootstrap in terms of Fourier eigenfunctions as follows. To prove an upper bound of For a rigorous proof, f should decay quickly enough; for example, a Schwartz function suffices. Without loss of generality, we can assume that f (x,x) depends only on |x| 2 and |x| 2 and is invariant under exchanging x andx.
The optimal choice of f will have f (0, 0) = 0. We conjecture that replacing the condition f (0, 0) > 0 with f (0, 0) ≥ 0 is enough to obtain ∆ 1 ≤ ∆ gap as long as f is not identically zero, but we do not know how to prove it. We will first construct a function satisfying f (0, 0) = 0 and ∆ gap = 1 2 exactly, and then we will approximate it with functions satisfying f (0, 0) > 0 and ∆ gap > 1 2 to obtain a rigorous proof. To construct f , we begin with a convex subset R of R 2 that is symmetric about the origin (in other words, −R = R). Let χ R be the characteristic function of R, i.e., (3.4) and let g = χ R * χ R be the convolution of χ R with itself, so that g has support in 2R. Then g = χ R 2 , which is nonnegative everywhere because χ R is real-valued (which holds since R = −R). These functions satisfy g(0, 0) = vol(R) 2 and g(0, 0) = vol(R), where here volume means area in R 2 .
We also want f to satisfy f (x,x) ≥ 0 whenever x 2 +x 2 ≥ 1 and x 2 −x 2 ∈ 2Z. We know that f (x,x) ≥ 0 whenever (x,x) ∈ 2R, because g vanishes outside 2R and g is always nonnegative. Thus it suffices to find R such that and vol(2R) ≥ 4. We can satisfy these conditions by taking R to be a square, namely the convex hull of (±1/ √ 2, 0) and (0, ±1/ √ 2), as shown in figure 4. Thus, we have obtained an optimal eigenfunction f , which in fact satisfies f (x,x) ≥ 0 for far more points (x,x) than required.
We can write down g and g, and hence also f , in closed form by rotating 45 • and separating variables, to take advantage of decomposing the square R as a product of two intervals. We find that  and (3.7) The function f = g − g does indeed vanish at all the points (x,x) = 1 √ 2 (m + n, m − n) with m, n ∈ Z, as it should by (2.21).
If we wish to achieve f (0) > 0 while relaxing the constraint x 2 +x 2 ≥ 1 to x 2 +x 2 ≥ (1 + ε) 2 with ε > 0, we cannot simply replace R with (1 + ε)R, because the enlarged set 2(1 + ε)R would overlap with the hyperbolas x 2 =x 2 = ±2. Instead, we can shave off the corners of (1 + ε)R at 45 • angles to obtain on octagon S ε such that 2S ε strictly avoids the hyperbolas, as shown in figure 5. The decrease in area from shaving the corners is quadratic in ε, and thus vol(S ε ) > 4 when ε is small. This construction therefore comes arbitrarily close to ∆ gap = 1 2 while keeping f (0, 0) > 0. The only remaining issue is that f decays slowly. To fix this issue, we can use a standard mollification argument, as in the proof of Lemma 2.2 in [54]. Specifically, for Then the eigenfunction f δ − f δ has all the desired properties when δ is small enough.
Our construction of an optimal eigenfunction for c = 1 is essentially equivalent to the optimal auxiliary function for the one-dimensional sphere packing bound from [55, p. 695]: g consists of two orthogonal copies of the auxiliary function, at 45 • angles from the coordinate axes. This relationship raises the question of whether the c = 2 eigenfunction might be related to an auxiliary function for 2-dimensional sphere packing in a similar way. It seems plausible that they are related somehow, but we cannot pin down a specific relationship.

Seeking optimal Narain lattices
As discussed in section 2.3, there is a unique Narain lattice for each c, up to the action of the orthogonal group O(c, c). Therefore we can try to find optimal Narain lattices by optimizing over moduli. This optimization problem is highly non-convex, with many local optima. We implemented a simple heuristic numerical algorithm, which starts from an arbitrary element of O(c, c) and obtains a local optimum via hill climbing under small, random perturbations. This algorithm does not perform well when c is large, but it gives good results for c ≤ 8. We used it to generate a tentative list of optimal (c, c) Narain compactifications, shown in table 1.
For c ≤ 5 the best lattices we found are equivalent to WZW models at level one. At c = 6 or 8, they turn out to be the Coxeter-Todd and Barnes-Wall lattices, respectively. These lattices are scaled to have irrational scaling dimensions, so they do not correspond to any WZW model. They also happen to be the best sphere packings known in dimensions twelve or sixteen, which means these cases cannot be improved without setting a new record for the sphere packing density. The best Narain lattices match the spinning modular bootstrap for c = 1, 2 (conjecturally), and 4, but seemingly not for 3 or 5 through 8. See appendix B for further details and discussion of the Coxeter-Todd and Barnes-Wall lattices.

JHEP01(2021)130 4 Averaging over Narain lattices
In this section, we review how Siegel computed the expected number of primary states with specified scaling dimensions and spins in a random Narain CFT [11]. 5 Let Λ 0 be a Narain lattice in R c,c , so that the space of all Narain lattices in R c,c is the orbit The canonical measure on moduli spaces of CFTs is the Zamolodchikov metric [56]. For Narain CFTs, this measure is invariant under O(c, c) and therefore agrees with the Haar measure on O(c, c)/O(Λ 0 ), up to scaling (see, for example, [14] for a detailed discussion). Thus, we can normalize to obtain a canonical probability measure on Narain lattices if O(c, c)/O(Λ 0 ) has finite volume under the Haar measure. When c = 1, the volume is infinite, 6 but it turns out to be finite for c ≥ 2. This finiteness can be checked directly by building a fundamental domain; it is also a special case of the theorem of Borel and Harish-Chandra [57] that an arithmetic subgroup of a semisimple algebraic group has a finite volume quotient (note that the identity component of O(c, c) is semisimple iff c ≥ 2). Thus, the notion of a uniformly random Narain lattice makes sense for c ≥ 2 but not c = 1.
Narain lattices also behave unusually for c = 2: the number of primary states in a Narain CFT with spin 0 and scaling dimension at most ∆ grows like a multiple of ∆ c−1 as ∆ → ∞ when c > 2, but there is an extra factor of log ∆ when c = 2 (see Theorem 7 in [58]). In other words, Narain CFTs have excess spin 0 states when c = 2, which leads to certain divergences. Siegel's theorem therefore assumes c > 2.
Theorem 4.1 (Siegel). If c > 2, then the density of non-vacuum primary states of spin and scaling dimension ∆ in a random Narain CFT of signature (c, c) is given by for ∆ ≥ | | and 0 otherwise. In other words, for each measurable subset A of [| |, ∞), the expected number of non-vacuum primary states in a random Narain CFT with spin and scaling dimension ∆ ∈ A is Here σ 1−c ( ) is the sum of m 1−c for all positive integers m dividing , and we define and this divergence comes from the excess spin 0 states. Theorem 4.1 is implicit in [11], and it is made explicit in Theorem 8 in chapter 4 of Siegel's TIFR lecture notes [13] (with somewhat cumbersome notation). In the rest of this section, we will explain how one can compute these densities, while omitting technicalities. First, we lay the groundwork by analyzing averaging over Euclidean lattices.

Averaging over lattices
Before he proved Theorem 4.1, Siegel dealt with the easier case of Euclidean lattices of determinant 1 in R d . The space of such lattices is the orbit of Z d under the action of SL(d, R), i.e., the quotient space SL(d, R)/SL(d, Z). This homogenous space has finite volume under the Haar measure for SL(d, R), and thus we have a canonical probability measure on the space of lattices. Siegel [59] found that the density of nonzero points in such lattices is 1 if d > 1. In other words, for every measurable subset A of R d , the expected number of nonzero points in A for a random lattice of determinant 1 is vol(A). (This assertion is clearly false for d = 1, because there is a unique lattice of determinant 1 in R, namely Z.) Setting aside technicalities, it is not hard to arrive at this answer. Let µ be the measure on R d for which µ(A) is the expected number of lattice points in A. Then µ must be invariant under the action of SL(d, for d > 1 and preserves Lebesgue measure, the measure µ must be of the form αδ 0 + βλ, where δ 0 is a delta function at the origin, λ is Lebesgue measure on R d , and α, β ≥ 0, since the invariant measure on each orbit is unique among regular measures. We must have α = 1, since the origin occurs once in every lattice, and the only remaining question is what β is. Because every lattice of determinant 1 has 1 point per unit volume on a large enough scale, we conclude that β = 1, as desired. To make this argument rigorous, one must check several things. The most important omissions are that the quotient SL(d, R)/SL(d, Z) has finite volume, that µ is a locally finite measure and in fact regular, and that we have enough uniformity to justify the interchange of limits needed to obtain the averaged assertion β = 1 from facts about individual lattices. All of these obstacles can be overcome; see [59] or, for example, [60] or [61] for a modern perspective. We will omit such issues below, and simply refer to [11] and [13] for a rigorous proof of Theorem 4.1.

Geometry of Narain lattices
Let µ be the density measure for points in Narain lattices. In other words, for A ⊆ R c,c , the expected number of points in A for a random Narain lattice is µ(A). As in the previous case, every orbit of O(c, c) has a unique invariant measure, up to scaling, and the only question is which scaling occurs for each orbit.
By definition, O(c, c) preserves the inner product (x, y) · (x , y ) = x · x − y · y , if we represent elements of R c,c as pairs of vectors in R c with the usual inner product in R c , and it acts transitively on each hyperboloid , all the information in these measures is contained in the distribution of spins and scaling dimensions, i.e., a measure on Z × [0, ∞). We can compute this measure as follows. The homogeneous metric on the hyperboloid |x| 2 − |y| 2 = 2 is proportional to with |x| = √ 2 cosh α, |y| = √ 2 sinh α, and dΩ 2 c−1 , dΩ 2 c−1 each a line element on a unit (c− 1)-sphere. This formula is derived by parameterizing the hyperboloid as x = z √ 2 cosh α, y =z √ 2 sinh α, with z andz each unit vectors in R c , and plugging into the line element |dx| 2 − |dy| 2 . The corresponding volume element on the hyperboloid is proportional to (|x||y|) c−1 dα. Because |x| 2 = ∆ + and |y| 2 = ∆ − , the density of scaling dimensions ∆ for spin is proportional to (∆ 2 − 2 ) c/2−1 for ∆ ≥ | |, and of course it vanishes otherwise, since no state can have ∆ < | |.
Thus, the subtle content of Theorem 4.1 is the constants used to scale these measures, while the general form follows from the O(c, c) symmetry. In the Euclidean case, there was only one missing constant, which was easily determined, but here we must obtain infinitely many constants. Fortunately, the same sort of argument works: every Narain CFT with c > 2 has the same asymptotic number of primary states of fixed spin and scaling dimension at most ∆, namely such states as ∆ → ∞, which agrees with the Siegel density. All that remains is to explain this formula.

Counting states
To obtain the missing constants, we need to count states in a Narain CFT. A closely related counting problem was treated in [14]. 7 To simplify the analysis, we choose null coordinates so that our quadratic form of signature (c, c) is given by Q(x, y) = 2(x · y) for (x, y) ∈ (R c ) 2 . Then (Z c ) 2 is a Narain lattice (see appendix B), and we will focus on this specific lattice before generalizing to all Narain lattices. The question is how many vectors in (x, y) ∈ (Z c ) 2 have x · y = and |x| 2 + |y| 2 ≤ r 2 as r → ∞. The Hardy-Littlewood circle method gives an answer when c > 2: the number of such vectors is asymptotic to 7 One of the main results of [14] is the volume of moduli space for symmetric product CFTs with N copies of a seed CFT. The calculation and final result are essentially the same as in this subsection and appendices, with the replacement → N . The result of [14] was interpreted as evidence that CFTs with a weakly coupled holographic dual are rare. Our ensemble and our interpretation are different, but not in disagreement with this conclusion since our bulk theory is not standard 3d gravity. where B r is the ball {(x, y) ∈ (R c ) 2 : |x| 2 +|y| 2 ≤ r 2 } of radius r, σ ∞ is the singular integral defined by for A ⊆ (R c ) 2 , and σ p is defined by The product p σ p is called the singular series. The intuition here is that we are counting integral solutions to the equation x · y = , and each factor measures a different constraint: σ ∞ measures how many real solutions there are, and σ p measures how many solutions there are modulo high powers of p. There is no reason to expect such an elegant answer in general, but it works here (see, for example, [63] or [58] for the circle method, or [64][65][66][67] for other approaches to these sorts of counting problems). We will give a high-level description of the method here, with some additional details in appendix C. We begin by writing the lattice point count as a Fourier integral, namely We would like to approximate this integral for large r, which requires understanding where the integrand is large. The integrand is largest when w = 0, in which case it simply counts the lattice points in B r without regard for whether x · y = . It turns out that the dominant contributions to the integral come from intervals around rational numbers with small denominators, as illustrated in figure 6. We will omit the estimates needed to prove this assertion, as well as to bound the error terms throughout the argument; instead, we will outline the calculations JHEP01(2021)130 without fully justifying them. Asymptotically, the dominant contributions come from w in the major arcs for rational numbers a/b in lowest terms with 1 ≤ b ≤ r ε , where 0 < ε 1 (strictly speaking, we should wrap around and consider w modulo 1 to deal with the endpoints), and the remaining minor arcs turn out to contribute a negligible amount. 8 Note that the major arcs do not overlap, and thus we can treat them independently. The remaining calculations amount to approximating the integral over each major arc by an exponential sum times the singular integral, and then factoring the sum of the resulting terms to obtain the singular series. See appendix C for more details.
It is not hard to derive a recurrence for #{(x, y) ∈ (Z/p n Z) c 2 : x · y ≡ (mod p n )} (see appendix D), and we find that if p k is the largest power of p dividing , where if = 0, we take k = ∞ and therefore p −(c−1)(k+1) = 0. A little manipulation then shows that p prime Furthermore, rescaling (x, y) and t shows that dx dy e 2πi(x·y)t , (4.14) and one can compute that Setting ∆ = r 2 /2 yields the desired asymptotics for the Narain lattice (Z c ) 2 . All that remains is to generalize this calculation to other Narain lattices. Using the Iwasawa decomposition for O(c, c), we can reduce to the case of lattices where A ∈ GL(c, R) and M ∈ R c×c is antisymmetric (see Proposition B.2 and the discussion following it). We have and so the general problem amounts to counting solutions of x · y = with The only difference in this calculation is in the value σ ∞ (B r ), but σ ∞ is an O(c, c)-invariant measure. Because B r is the image of B r under an element of O(c, c), we obtain the same constant for any Narain lattice, which completes the informal derivation of Siegel's theorem.

Modular invariance
It is instructive to rephrase this derivation in terms of the partition function. Doing so amounts to a weighted version of the circle method, and it highlights the role of modular invariance in dealing with the major arcs. In this calculation we takeτ = τ * . Define the reduced partition function by where the |η(τ )| 2c factor removes the denominator from the characters while the (Im τ ) c/2 factor restores modular invariance. Its leading behavior as Im τ → ∞, the vacuum contribution, is Our goal is to show that this vacuum term is responsible for the asymptotics (4.6) using modular invariance. We will again break up an integral into contributions from major arcs, and dealing with them will require asymptotics for Z(τ, τ * ) near rational numbers a/b, or equivalently cusps of SL(2, Z). Specifically, suppose gcd(a, b) = 1, and we wish to approximate Z(τ, τ * ) for τ near a/b, i.e., τ = a/b + x + yi with x and y small. By choosing integers f and g with af + bg = −1, we obtain a matrix in SL(2, Z), which maps a/b to i∞. It maps nearby points a/b + x + yi to whose imaginary part tends to infinity as we approach a/b. When x and y are both small, we conclude from modular invariance and (4.20) that (4.23) We will use this approximation in a manner similar to Cardy's calculation of the total density of states in a CFT [68], but refined to project onto an individual spin. 9 By an inverse Fourier transform, the density of primaries ρ (∆) obeys (4.24) The asymptotic density of primaries is encoded in the behavior of Z (y) as y → 0. The dominant contribution to the integral in this regime comes from the major arcs and can be described as follows (see, for example, [58]). Let B be a bound depending on y, with

JHEP01(2021)130
B → ∞, B 3 y → 0, and B 4 y → ∞ as we take y → 0. Using the major arcs, we approximate Z (y) by Within the range of integration in (4.25), our assumptions on B imply that we can use (4.23) to estimate Z. The phase e −2πi x under the integrand is approximately constant, and so Now our assumption that B 3 y → 0 implies that the integral converges to an integral over the entire line, which we can evaluate using the beta function as Thus, we have found that from which we conclude that as y → 0.
In terms of the density of states, as y → 0, and the inverse Laplace transform of the right side is as ∆ → ∞, which gives precisely the constant in Siegel's theorem.

Spectral gap
Theorem 4.1 proves the existence of Narain CFTs with spectral gap as c → ∞. The reasoning is simple: the expected number of non-vacuum primary states with ∆ ≤ αc is which is at most a constant times Stirling's formula shows that this bound is as c → ∞. If α < 1/(2πe), then the expected number of states tends to 0 as c → ∞. Because the number of primaries with ∆ ≤ αc is always an integer, it must vanish for some Narain CFTs, in fact almost all of them. Letting α → 1/(2πe) as c → ∞ shows that we can obtain ∆ 1 = (1 + o(1))c/(2πe), as desired. This sort of averaging argument cannot prove any better bound for the spectral gap: if α > 1/(2πe), then the expected number of states grows exponentially, and we cannot rule out the possibility that every Narain CFT has at least one non-vacuum primary in this range. In sphere packing terms, α = 1/(2πe) corresponds to the Minkowski-Hlawka lower bound for the sphere packing density (namely, a lower bound of 2 −d in R d ), which is the best lower bound known up to subexponential factors. Because all Narain lattices yield sphere packings, any improvement on 1/(2πe) would yield exponentially denser sphere packings and thus solve a longstanding open problem in discrete geometry.

Holographic duality
In this section we setτ = τ * , so that the CFT partition function is equal to the Euclidean path integral on a torus with modulus τ .

Warm-up: the U(1) c Cardy formula
The conclusion that averaged Narain lattices have ∆ 1 ∼ c/(2πe) suggests a holographic interpretation. First we will aim to provide some intuition for this connection, while postponing the more careful analysis to the next subsection.
Before turning to the U(1) c case, consider a CFT with only Virasoro symmetry. We specialize to zero angular potential, i.e., τ = −τ = iβ with β the inverse temperature. At high temperature, or equivalently β → 0, the partition function can be approximated by doing an S transformation and keeping only the vacuum state in the dual channel, which yields Re-expressed in the original channel, this approximation corresponds to the Cardy [68] density of states where we have kept only the exponential dependence. In a general CFT, this formula controls the average asymptotic density of states as ∆ → ∞, and applies only for ∆ c. However, in a holographic CFT dual to pure gravity in three dimensions, the Cardy regime is extended. In these theories, (5.2) applies for ∆ c 12 , and this formula should be viewed as a large-c limit rather than a large-∆ limit [75]. 10 In the gravitational theory, (5.2) is interpreted as the density of states of the BTZ black hole [77].
In a theory of pure 3d gravity, we may expect the first nontrivial primary state to be a black hole microstate, so that ∆ 1 ∼ c 12 (although it could be lower; see [22][23][24]). In fact, quite generally the physics of pure gravity in three dimensions is captured by the contribution of the vacuum conformal block in different channels [75,78,79]. The conclusion is that in the CFT dual, we can estimate the spectral gap to be the value of ∆ at which the Cardy density of states becomes large. Now let us repeat this analysis for a theory with the chiral algebra U(1) c . The situation is summarized in figure 7, along with numerical and analytic upper bounds on the spectral gap. The analogue of the Cardy formula [50] for U(1) c is which has support down to ∆ = 0. However, that does not mean the spectral gap is zero, because for small ∆ there is on average less than one state. To estimate the spectral gap we set ρ Cardy (∆ 1 ) ≈ 1 and take the c → ∞ limit. The result is . (5.4) This calculation agrees with the spectral gap of an average Narain lattice from section 4.5.
In other words, an average Narain lattice saturates the Cardy estimate for ∆ 1 .  The green and blue marks show upper bounds on ∆ 1 from linear programming, i.e., the modular bootstrap. The numerical upper bounds were estimated for Virasoro in [80] and for U(1) c in [50]. The analytic result for U(1) c is the Kabatyanskii-Levenshtein bound [81,82], and the analytic bound for Virasoro was derived in [5].
This coincidence suggests looking for a holographic dual. This argument is certainly not conclusive, though. In particular, we would not expect the holographic dual to have black holes that dominate the canonical ensemble at finite temperature. In other words, other modular images of the vacuum under SL(2, Z) can be equally important. To check whether the holographic interpretation survives a more careful analysis we will now examine these other contributions.

Bulk partition function
Let us calculate the partition function of the three-dimensional theory of U(1) gravity described in the introduction. As we have stressed, we do not have a full non-perturbative definition of this theory. In the introduction we have only specified its perturbative excitations on a torus, and now we will give a prescription to calculate the genus-one partition function by a sum over topologies.
The first step is to calculate the perturbative contribution in thermal AdS 3 . The theory is topological, so the metric makes no difference, but we will nevertheless refer to these manifolds in the language of AdS/CFT to make the analogy clear. Thermal AdS 3 is a hyperbolic 3-manifold with a torus conformal boundary and the topology of a solid torus. To describe it, let z be a coordinate on the boundary torus, with the identifications Thermal AdS 3 is by definition the hyperbolic manifold filling in this torus with the cycle z ∼ z + 1 contractible in the bulk. The 1-loop partition function of U(1) gravity in thermal AdS 3 is by design equal to the U(1) c × U(1) c vacuum character,

JHEP01(2021)130
This formula is derived in [83] from the 1-loop determinant of the Chern-Simons fields (including the contributions from gauge fixing). It is also easy to understand from a Hamiltonian point of view, because the bulk theory has asymptotic symmetries corresponding to the U(1) c × U(1) c affine algebra. The theory is quadratic, so the result is exact in perturbation theory. 11 The full partition function is a sum over topologies with the boundary condition τ at infinity: We will sum over the solid tori obtained by filling in different cycles of the boundary torus, as in [15]. In gravity language, we sum over the Euclidean BTZ black holes. It is not obvious why this is the right thing to do, and it is a provisional choice motivated by the analogy to 3d gravity. The different ways of filling in the boundary torus are related by the action of SL(2, Z), so roughly speaking we must sum (5.6) over SL(2, Z) images. However, Z tAdS is invariant under τ → τ + 1, so these contributions are not distinct. The distinct contributions are labeled by elements of SL(2, Z)/Γ ∞ , where Γ ∞ is generated by T . Thus where in the second equation we used the fact that the combination (Im τ ) 1/2 |η(τ )| 2 is modular invariant. This sum is proportional to a non-holomorphic Eisenstein series. That is, where the Eisenstein series is defined by For c > 2, the sum converges. Siegel proved that in this case Z(τ,τ ) agrees with the CFT partition function averaged over moduli [11][12][13]. 12 To reproduce his result, we will extract the spectrum ρ (∆) from Z(τ,τ ) by comparing to the general form (2.8). We first do a Fourier transform to organize by spin , then an inverse Laplace transform to find ρ (∆). The Fourier expansion of the non-holomorphic Eisenstein series is (see, for example, [84, The perturbative calculation is insensitive to the global structure of the gauge group, so we can take it to be non-compact. In other words, we are not performing an additional sum over nontrivial gauge configurations.

JHEP01(2021)130
with τ = x + yi, K ν the modified Bessel function, and σ t ( ) = n| n t (5.12) the divisor function. Taking the inverse Laplace transform of the first two terms in (5.11) and comparing to (2.8) gives the scalar density of states The delta function at zero is the vacuum state. 13 After an inverse Laplace transform, the spinning terms in (5.11) lead to 14) The results (5.13)-(5.14) agree exactly with the density of states of an averaged Narain lattice from Theorem 4.1.

Origin of the agreement
We have reproduced Siegel's result relating the Eisenstein series to an integrated partition function by explicitly calculating both sides and comparing term by term. A more conceptual explanation is as follows. In the derivation of the Siegel measure on random Narain lattices in section 4.4, we argued that there is unique modular invariant partition function that is homogenous on each hyperboloid |u| 2 − |v| 2 = 2 with (u, v) ∈ (R c ) 2 . That is, any modular-invariant spectrum with ρ (∆) ∝ (∆ 2 − 2 ) c/2−1 and a unique vacuum state will necessarily agree with a random Narain lattice. The circle method calculation to determine the prefactors for each spin orbit depends only on the asymptotics of the partition function, and these asymptotics are fixed by modular invariance. The Eisenstein series is modular invariant by construction for c > 2, so we only need to check that ρ (∆) has the correct dependence on ∆. To this end, we will use the fact that the Eisenstein series is a Maass form, i.e., an automorphic eigenfunction of the hyperbolic Laplacian on the upper half-plane. Let where τ = x + yi. This operator is invariant under SL(2, Z) and satisfies It follows that the Eisenstein series is also an eigenfunction, with (5.17) 13 We use the convention ∞ 0 d∆ δ(∆) = 1.

JHEP01(2021)130
Now we examine the consequences for the partition function The eigenvalue equation (5.17) implies 19) and the expansion of Z in U(1) c × U(1) c characters yields The key identity is where ∂ ∆ denotes differentiation with respect to ∆. The operator c∆∂ ∆ + ( (4.4), acting on a function of |u| or equivalently ∆ = 1 2 (|u| 2 + |v| 2 ) = |u| 2 − . Specifically, the Laplacian acts on such functions by Here |G| ∝ (|u||v|) c−1 is the volume factor on M obtained below equation (4.4). 14 Using (5.21) in the eigenvalue equation (5.19) and projecting onto an individual spin gives Integrating by parts now yields where By acting on (5.24) with ∂ y + 2π| |, we can remove the first term and obtain is proportional to the volume factor (∆ 2 − 2 ) c/2−1 , which is exactly what we needed to conclude that the full spectrum agrees with the average Narain CFT.
To summarize, the fact that the Eisenstein series is an eigenfunction of the Laplacian on the upper half plane implies that the spectrum for each is proportional to the volume element on the hyperboloid M , and then modular invariance fixes the full spectrum.

Comments
The density of states we have obtained is manifestly positive, unlike the analogous result in pure gravity [15]. We interpret the continuous spectrum as a consequence of ensemble averaging. The spectrum extends all the way down to the unitarity bound ∆ = | |, with the low-energy contributions on the CFT side coming from the decompactification limit in the Narain moduli space. Note, however, that at large central charge, it is very rare to find primary states with ∆ c other than the vacuum. Non-compact, non-averaged CFTs also have a continuous spectrum. However it seems impossible to interpret (5.13) in this way, because of the delta function corresponding to the vacuum state. The vacuum is not present as a normalizable state in a non-compact CFT, but is present in an averaged compact CFT.
In [88] Witten established an exact equivalence between Chern-Simons gauge theory and rational CFT. With an abelian gauge group, Witten's correspondence gives a threedimensional realization of a Narain CFT at rational points in moduli space (see [89][90][91]). The dictionary for this duality differs from that of AdS/CFT, so it is not a holographic duality in the usual sense. A direct connection to AdS/CFT was made in [92], where a compact abelian Chern-Simons theory in AdS 3 was related to a rational Narain CFT following the usual holographic dictionary. It is not clear exactly how either of these results is related to the duality conjectured in the present paper. Note that before doing the sum over topologies, U(1) gravity is not dual to an individual member of the ensemble of Narain CFTs, while the construction of [92] does provide such a duality. Perhaps this construction can be used to define alpha states of U(1) gravity in the sense of [43,93,94].

JHEP01(2021)130
practice, a functional satisfying all the constraints can be obtained even if we truncate to a finite set of spins, such as for some large L 1 , L 2 . That is, once ∆ gap is tuned to its optimum, the resulting functional is found to automatically obey the higher spin constraints that were not included in this list. The computational problem now takes the standard form of a semidefinite program that can be optimized by a numerical solver. We use SDPB v1.0 [49], which is designed to take advantage of the special structure in a semidefinite program organized by spin. We fix ∆ gap and run SDPB to determine whether the constraints can be satisfied; we then adjust ∆ gap by bisection to find the optimal bound at truncation order K. We have generated bounds at K = 17, 19, 21, 23, and 25 for 1 ≤ c ≤ 15. To generate functionals that obey all of the positivity conditions requires many bisection steps. To save computational time, we ran only K = 19 at a high level of rigor: in this case we set L 1 = 50, L 2 = 100, and ran a large number of bisections. The resulting functionals obey all of the constraints. For other values of K, we set L 1 = 20, L 2 = 30, and ran fewer bisections. The resulting functionals do not obey all of the constraints at high spin, but from experience we expect them to be accurate nonetheless. The numerical functionals at K = 19 can be downloaded from https://hdl.handle.net/1721.1/125646.
The spinning bootstrap is much more computationally intensive than the spinless bootstrap. This is partly because we are now optimizing over a two-dimensional space of functionals, and partly because at present there is no algorithm based on forced roots to bypass linear programming. We therefore find a good estimate of the bound only for c 10, as compared to c 1000 for the spinless bounds in previous work [50,80].
The SDPB settings we used are listed in table 2. SDPB also requires a normalization condition and a set of sampling points. Our normalization condition sets the coefficient of f 1,0 to 1, and the sampling points are the defaults in the Mathematica package provided with SDPB.

B Details of optimal Narain lattices
Let ·, · denote the Euclidean inner product on R 2c , and let [·, ·] denote the usual bilinear form of signature (c, c); i.e., x, In this notation, a Narain lattice is an even unimodular lattice under [·, ·], which is uniquely determined up to the action of O(c, c) but can look very different under ·, · .
When one envisions a Euclidean lattice, one typically thinks about it up to isometries, i.e., up to the action of O(2c). From this perspective, it is not obvious which Euclidean lattices Λ satisfy the Narain condition: the issue is whether the O(2c)-orbit of Λ intersects the O(c, c)-orbit of the even unimodular lattice for [·, ·]. For comparison, the Leech lattice in R 24 does not have this property, because the spinning modular bootstrap rules it out, and it is a noteworthy fact that the Coxeter-Todd and Barnes-Wall lattices do. We can verify it using the following technique, which we will describe more generally in terms of verifying the output of our computer program.  The output is a floating-point basis b 1 , . . . , b 2c for the lattice Λ, which we would like to convert to an exact description of Λ. There is no reason to expect the entries of these vectors to be recognizable numbers, but the Gram matrix is generally more understandable. Let B be the matrix with b 1 , . . . , b 2c as its columns. Then the Gram matrix of the basis with respect to the Euclidean inner product is and the Gram matrix with respect to [·, ·] is where D is the diagonal matrix with diagonal entries 1, . . . , 1, −1, . . . , −1, each repeated c times. By the Narain condition, the entries of H must be integers, and we can round the floating-point values to obtain the exact matrix H. A priori, there is no reason to expect G to be a pleasant matrix, but for the best cases we have found with c ≤ 8 it turns out to be proportional to an integer matrix, and the constant of proportionality is determined by det(G) = 1. Thus, we can exactly identify G and H in practice. Now the question is whether there is still a lattice corresponding to these exact matrices, or whether rounding the matrices has destroyed the lattice. The following lemma shows that the existence of a lattice basis amounts to checking that (GH −1 ) 2 = I, where I is the identity matrix.

JHEP01(2021)130
Proof. By the hypotheses on G and H, there exist invertible matrices X, Y ∈ R 2c×2c such that G = X t X and H = Y t DY . Furthermore, these equations are preserved by acting on X on the left by O(2c), or on Y by O(c, c). The question is whether the O(2c)-orbit of X and the O(c, c)-orbit of Y intersect. If we can take Y = X, then For the converse, suppose (GH −1 ) 2 = I. This equation is equivalent to and conjugating by X t shows that If we let Z = XY −1 , we find that (ZDZ t ) 2 = I. The matrix ZDZ t is symmetric, and thus by the spectral theorem there exists U ∈ O(2c) such that ZDZ t = U D U t , where D is a diagonal matrix with only 1 and −1 on the diagonal. By Sylvester's law of inertia, D and D must have the same signature, and so we can take D = D without loss of generality.
In the rest of this appendix, we develop a more conceptual framework for the Coxeter-Todd and Barnes-Wall lattices as well as more general Narain lattices. First, we need some notation. We will write vectors in R 2c as (x, y) with x, y ∈ R c , which we interpret as column vectors for matrix multiplication. The group O(c) × O(c) acts on the two components of vectors in R 2c , and it preserves the inner products of signatures (2c, 0) and (c, c). We will use ·, · to denote the Euclidean inner product on R c . Then the dual lattice Λ * of a lattice Λ in R c is defined by Equivalently, if the columns of a c × c matrix B form a basis for Λ, then those of (B t ) −1 form a basis of Λ * . The following proposition is a standard result about the Narain condition. It essentially amounts to the Iwasawa decomposition for O(c, c), but we will give a proof for the convenience of the reader.
where Λ is a lattice in R c and M is a c × c antisymmetric matrix (i.e., M t = −M ).

JHEP01(2021)130
In the CFT interpretation, M is the flux of the toroidal compactification, while the choice of metric is absorbed into Λ and Λ * . It is not hard to check that such a lattice satisfies the Narain condition (the key observation is that M v, v = 0, because M t = −M ), while the converse is trickier. Both directions follow from the proof given below.
Note that the action of the 2c × 2c block orthogonal matrix and vice versa. We will work in these coordinates, because the expressions involve fewer symbols. (B.14) The lattice Z 2c is an even unimodular lattice under this bilinear form, and thus all that remains is to determine the orbit of Z 2c under G. We can do so using the following lemma.

Lemma B.3. Every element of G can be factored as
where U, V ∈ O(c) and A and M are c × c matrices with det A = 0 and M t = −M .
Each of the three factors comes from a subgroup of G. In particular,  is an element of G. In other words, First, we deal with the case C = 0.
We conclude that our group element is given by as desired. In this case, we have only two factors; in other words, the missing factor is the identity matrix. All that remains is to show we can make the lower left block of vanish through multiplying on the left by a group element of the form The lower left block of the product is and so we would like to find U, V ∈ O(c) such that (U − V )A + (U + V )C = 0.
Because A t C + C t A = 0, we can obtain U and V such that (U − V )A + (U + V )C = 0 by taking U = A t + C t and V = A t − C t , but these matrices are generally not orthogonal. In particular,

JHEP01(2021)130
and We can repair U and V as follows. No nonzero vector can be annihilated by both A and C, because otherwise the matrix would not be invertible. Thus, the symmetric matrix A t A+C t C is strictly positive definite, and so it can be written in the form X t X for some invertible matrix X.
and similarly V V t = I. Thus, U, V ∈ O(c), as desired.
One consequence of this characterization of Narain lattices is a lower bound for the spectral gap, which comes within a factor of 2 of the bound obtained in section 4.5:

Proposition B.4. For every positive integer c, there exists a Narain CFT with spectral gap
as c → ∞.
In physics terms, this bound comes from averaging over Narain CFTs with zero flux.
Proof. To prove this proposition, we will take M = 0 in Proposition B.2 and average over the choice of Λ. Taking M = 0 yields a lattice that is isometric to Λ × Λ * under the Euclidean metric, and thus The existence of a lattice Λ that makes ∆ 1 ≥ (1 + o(1))c/(4πe) follows from an averaging argument using the Siegel mean value theorem; in fact, Λ can even be chosen to be a self-dual integral lattice (see Theorem 9.5 in [48, chapter II]).
For comparison, the lattices in table 1 with 2 ≤ c ≤ 8 cannot be isometric to lattices of the form Λ × Λ * , because ∆ 1 is too large: one of Λ or Λ * would violate the linear programming bound for sphere packing in R c . The only way to circumvent this obstacle is to use a nonzero antisymmetric matrix M , and the averaging argument in section 4.5 takes advantage of M as well as Λ.

JHEP01(2021)130
The Coxeter-Todd and Barnes-Wall lattices can be obtained through Proposition B.2, but the prettiest constructions we have found use a variant of this construction: the lattice is a Narain lattice if and only if M v, v ∈ Z for all v ∈ Λ * . This equivalence follows immediately from the formula [T (x, y), T (x, y)] = 2 x, y . If M is antisymmetric, then M v, v = 0 automatically, while otherwise it is a matter of compatibility between M and Λ * . If Λ * is a rescaling of an integral lattice, then taking M to be a corresponding multiple of I works, and we can of course add to it any antisymmetric matrix.
To obtain the Barnes-Wall lattice, we start with the E 8 root lattice, which is an even unimodular lattice in R 8 . It has the structure of a module over the Gaussian integers Z[i]; in other words, there exists J ∈ O(8) such that J 2 = −I and multiplication by J preserves E 8 . If we let M = (I + J)/ √ 2, then is a Narain lattice, and one can check that it is isometric to the Barnes-Wall lattice (rescaled to have determinant 1). One can compute ∆ 1 as follows. If we set u = 2 1/4 x and v = 2 −1/4 y with x, y ∈ E 8 , then checking that ∆ 1 = √ 2 amounts to showing that x + I + J 2 y 2 + 1 2 |y| 2 ≥ 2 (B.32) unless x = y = 0. If y = 0 or |y| 2 ≥ 4, then the inequality trivially holds, and therefore the interesting case is |y| 2 = 2. In that case, (I + J)y is a vector of norm 4 in E 8 since |(I +J)y| 2 = |y| 2 +|Jy| 2 = 4, and therefore (I +J)y/2 is a deep hole of E 8 (see [96, p. 121]), which is at distance 1 from the nearest points of E 8 . Similarly, the Coxeter-Todd lattice (again rescaled to have determinant 1) is given by (B.35) In the above constructions, we built the Coxeter-Todd and Barnes-Wall lattices using rescalings of E 6 and E 8 , respectively, but taking M to be a linear combination of the identity matrix and an antisymmetric matrix. In fact, the use of the identity matrix is unnecessary: one can use exactly the same c-dimensional lattices, and replace M with an antisymmetric matrix.

C The Hardy-Littlewood circle method
The remaining circle method calculations work as follows, in the notation of section 4.3. Recall that we are trying to approximate the integrand and integrate it over the major arcs, which consist of the w satisfying for rationals a/b with 1 ≤ b ≤ r ε . If w = a/b + u with u small, we can decompose our sum into residue classes modulo b and write the integrand as Aside from justifying the quality of these approximations, 15 we have shown that #{(x, y) ∈ B r ∩ (Z c ) 2 : x · y = } is asymptotic to b≥1 1≤a≤b gcd(a,b)=1 as r → ∞. 15 Recall that the result is not even true when c ≤ 2.

JHEP01(2021)130
Note that this scaling is sensible, since we are putting one constraint modulo p n on 2c variables, but the constant of proportionality σ p will depend on p and . We will show that #V (p n , ) satisfies the recurrence relation #V (p n , ) = p cn − p c(n−1) p (c−1)n + p c #V (p n−1 , /p), where we interpret #V (p n−1 , /p) as 0 if is not divisible by p. Once we have the recurrence, we find that #V (p n , ) p (2c−1)n = 1 − p −c + p −(c−1) #V (p n−1 , /p) p (2c−1)(n−1) , (D. 4) and it follows immediately that when is divisible by p k but no higher power of p, where we take k = ∞ and p −(c−1)(k+1) = 0 if = 0.
To prove the recurrence, we divide into two cases. Suppose first that x ≡ 0 (mod p). Every integer not divisible by p is a unit modulo p n (i.e., it has a multiplicative inverse modulo p n ), and so some coordinate of x is a unit, say x i . Then we can choose the other coordinates y j of y arbitrarily, and achieve x · y ≡ (mod p n ) through a unique choice for y i , namely x j y j (mod p n ). (D. 6) There are p cn − p c(n−1) choices of x that are not divisible by p, and each of them has p (c−1)n choices of y that work with it. Thus, there are p cn − p c(n−1) p (c−1)n solutions to x · y ≡ (mod p n ) with x ≡ 0 (mod p). The remaining case is when x ≡ 0 (mod p). In that case, let x = px , where x is defined modulo p n−1 . The only way we can have x · y ≡ (mod p n ) is if is divisible by p. If so, for each y modulo p n−1 satisfying x · y ≡ /p (mod p n−1 ), (D. 7) there are p c choices of y modulo p n that reduce to y modulo p n−1 (namely, y + p n−1 z for any vector z modulo p), and there are therefore p c #V (p n−1 , /p) solutions with x ≡ 0 (mod p). Thus, the recurrence relation holds.
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.