Conformal perturbation theory and higher spin entanglement entropy on the torus

We study the free fermion theory in 1+1 dimensions deformed by chemical potentials for holomorphic, conserved currents at finite temperature and on a spatial circle. For a spin-three chemical potential \mu, the deformation is related at high temperatures to a higher spin black hole in hs[0] theory on AdS_3 spacetime. We calculate the order \mu^2 corrections to the single interval Renyi and entanglement entropies on the torus using the bosonized formulation. A consistent result, satisfying all checks, emerges upon carefully accounting for both perturbative and winding mode contributions in the bosonized language. The order \mu^2 corrections involve integrals that are finite but potentially sensitive to contact term singularities. We propose and apply a prescription for defining such integrals which matches the Hamiltonian picture and passes several non-trivial checks for both thermal corrections and the Renyi entropies at this order. The thermal corrections are given by a weight six quasi-modular form, whilst the Renyi entropies are controlled by quasi-elliptic functions of the interval length with modular weight six. We also point out the well known connection between the perturbative expansion of the partition function in powers of the spin-three chemical potential and the Gross-Taylor genus expansion of large-N Yang-Mills theory on the torus. We note the absence of winding mode contributions in this connection, which suggests qualitatively different entanglement entropies for the two systems.


Introduction
The emergence of holographic descriptions [1,2] of quantum field theories (QFTs), and the subsequent development of the remarkably elegant proposal for holographic entanglement entropy [3,4], has led to enormous progress and effort aimed at understanding this fundamental physical observable in QFTs. A first principles field theoretic approach to calculating entanglement entropy (EE) has largely been limited to free field theories [5] because the calculation of the reduced density matrix in an interacting QFT presents a significant technical challenge. Conformal field theories (CFTs) in 1+1 dimensions provide tractable examples where this calculation can be performed explicitly by implementation of the replica trick [6][7][8][9], and where powerful universal results can be inferred using the tool of conformal invariance. The effect of interactions on entanglement entropy can then be studied within conformal perturbation theory [10].
The aim of this paper is to study and calculate the effect of perturbing free CFTs in two dimensions, at finite temperature and on a spatial circle, by deformations that decompose into a sum of holomorphic and anti-holomorphic pieces. Such 'chiral' deformations of the free fermion CFT have received some attention within the context of the large-N expansion of Yang-Mills theory in two dimensions [11,12]. More recently, CFT deformations of this type have been related by holographic duality to higher spin black hole solutions [13][14][15][16][17] in Vasiliev's hs[λ] theory [18] in AdS 3 spacetime. This holographic connection is the main motivation behind our work, falling within the broader theme of higher spin holography relating CFTs with higher spin currents to higher spin theories of gravity in AdS spacetimes [19][20][21][22]. However, our results are purely field theoretic and therefore should be of wider interest as analytically calculable corrections to Rényi and entanglement entropies in chiral deformations of CFTs in two dimensions.
In recent work [23,24], we have shown that for any CFT with a W ∞ [λ] symmetry, when formulated on the infinite spatial line, the lowest nontrivial correction to the single interval Rényi entropy (and EE) in the presence of a spin-three deformation, is a universal function of temperature and interval size. In [23], explicit calculations within the free boson and free fermion CFTs unexpectedly agreed with each other, accompanied by equally unexpected agreement with a holographic proposal for EE due to [25,26] applied to the higher spin black hole solution of [13] 1 . Subsequently in [24], universality of the spin-three current correlator on the multi-sheeted cover of the cylinder was proven based only on W ∞ [λ] symmetries and then used to establish the universal result above for Rényi entropy. These results have recently been extended to include deformations by any higher spin current [29] 2 . It is natural to ask if the above calculations of EE and RE can be extended to include finite size corrections for the CFT on a spatial circle, yielding concrete predictions for finite-size (nonuniversal) corrections to EE/RE in higher spin gravity.
Our primary focus in this paper is the free fermion CFT, deformed by the holomorphic (plus anti-holomorphic) spin-three current in this theory. With a view towards extracting all thermal and finite size effects at any given order in conformal perturbation theory, we study the field theory on a circle of circumference L, at a temperature β −1 , corresponding to a torus with complex structure parameter τ = iβ/L. The reason for picking this theory is that the branch point twist fields, necessary for implementing the replica trick [7], have explicit representations in this case. Importantly, this explicit representation is available upon bosonization of the free fermion theory. The free fermion CFT has an infinite number of integer spin conserved currents with spin s ≥ 1, furnishing a representation of the W 1+∞ algebra [31][32][33][34]. The dual holographic interpretation in terms of hs[λ] theory with λ = 0 requires a truncation of W 1+∞ to W ∞ [0] by removing the spin-1 current. We will not address this issue in this work.
As remarked above our approach is to treat the deformation by such currents within conformal perturbation theory in the Lagrangian formulation: (1.1) Physically, the deformation can be viewed as a chemical potential for the corresponding spin-three charge in the Hamiltonian language, and the deforming parameter/chemical potential can be thought of as a constant background higher spin gauge field. Whilst one may be tempted to conclude that this picture is completely analogous to the standard situation with a chemical potential for a global U(1) symmetry, there are subtleties associated to chemical potentials for higher spin charges. As pointed out in [12], and more recently clarified in [35] with the holographic picture in mind, passing between Hamiltonian and Lagrangian pictures in the presence of higher spin chiral deformations (and separate anti-chiral ones), typically involves redefinition of the deformation parameters (and potential mixing of the two sectors due to contact terms).
This brings us to one of the important points of our paper. Based on dimension counting, the higher spin deformations (with s > 2) are irrelevant operators, and therefore one would expect to see uncontrolled UV divergences in perturbation theory. However, this is not the case; the integrals of holomorphic correlators over the torus, which determine perturbative corrections to the partition function (and RE/EE) for (1.1), are finite except for ambiguities involving contact term singularities that require a choice of integration prescription. Although surprising at first sight, the absence of conventional divergences signalling non-renormalizability due to irrelevant perturbations is in line with field theoretic intuition. In particular, one expects that chemical potentials for conserved charges should correspond to altering boundary conditions in some way and should not change the UV divergence structure of the theory 3 . We employ a prescription for treating the contact term singularities which is essentially an i -prescription on the torus. The results using this approach exhibit precise, non-trivial agreement with thermal corrections computed using the canonical or Hamiltonian approach (see e.g. [14]). Our prescription differs from the "covariant" prescription proposed in [11,12] by finite local counterterms involving higher spin currents. The latter picture involves cutting discs around contact points and applying Stokes' theorem. Perhaps the most clear difference between the two prescriptions for computing integrals over the torus is that our prescription yields 3 On the other hand, the holographic duals to such states which are the spin-three black holes of [13] appear to display an RG flow from an IR AdS 3 geometry with W ∞ [λ] symmetry [36,37] to a UV AdS 3 with different (non-principal) asymptotic W-algebra symmetry [38]. Several works have pointed out both the intriguing consequences of this picture [39,40], and possibly the complete absence of an RG flow interpretation [41]. results holomorphic in τ , whilst the prescription of [12] necessarily introduces nonholomorphic dependence on τ .
The universal results of [23,24] on the finite temperature cylinder, which displayed highly non-trivial agreement with the holographic EE proposal of [25,26] were based on precisely the same integration prescription that we adopt in the present work on the torus. It appears that different choices of integration prescriptions accompanied by their specific counterterms are related to different possible thermodynamical interpretations of the higher spin black holes dual to deformed W-algebra CFTs [35,42,43].
In conformal perturbation theory, the corrections to the thermal partition function are determined by multi-point correlators of W -currents on the torus, while for the Rényi entropies one needs the correlators in the presence of branch-point twist fields on the torus. In particular, the order µ 2 correction to the partition function for the deformed theory (1.1) is controlled by the two-point correlator of spin-three currents in the presence of twist fields. The bulk of our work is aimed at correctly pinning down this correlation function. In order to work with an explicit representation for the twist fields we use the bosonized formulation of free fermions. The main source of complication in the computation is that one must separately account for the contributions from both the quantum fluctuations and classical, nonperturbative sectors corresponding to winding modes of the compact bosons on the torus.
The presence of winding modes ensures that crucial contributions are accounted for and delicate cancellations occur at certain stages. Perhaps most significant amongst these is a complete cancellation of non-hololomorphic dependence on the torus modular parameter τ which appears (via powers of 1/Im(τ )) in the intermediate stages of the calculation. The reason for its appearance can be traced to the background uniform charge on the torus required to makes sense of the free boson propagator on the torus. Remarkably, all non-holomorphic dependence originating from the quantum propagators precisely cancels agains identical contributions from the winding mode sectors. Furthermore, the winding mode contributions are crucial for ensuring that the final result for entanglement entropy correctly reproduces the thermal entropy when the interval spans the entire system. In the absence of the winding modes the EE would vanish in this limit.
Our final results for EE and thermal entropy corrections satisfy several nontrivial consistency checks that we describe in detail. Together they provide evidence in favour of the integration prescription adopted and the relevant correlators on the torus. The Rényi entropies are controlled by a quasi-elliptic function of the interval length with quasi-modular weight six, which we determine in closed form.
The results for the order µ 2 corrections to the thermal partition function and the Rényi entropies on the torus can be used to extract predictions for finite size effects in the bulk higher spin gravity dual. We find that thermal corrections at this order, both for free bosons and free fermions, are determined by weight six quasi modular forms.
As in the case of the standard BTZ solution in AdS 3 , the classical thermodynamics of the Gutperle-Kraus black hole yields the high temperature limit (β −1 L) → ∞ of the CFT partition function. The holographic, classical gravity description which is applicable in the limit of large central charge c 1, captures the high temperature Cardy growth of states. Finite size corrections to this emerge from the quantum corrections to the classical gravity saddle point. In the presence of sources (chemical potential deformations) for higher spin currents, these will be accompanied by further corrections induced by the deformations, which are non-trivial and yet to be understood.
In the absence of higher spin hair, the leading finite size corrections to entanglement/Rényi entropy can be extracted from one-loop determinants evaluated on bulk handlebody solutions which serve as bulk duals for the replicated CFT [44,45]. These corrections evaluated from the bulk have been shown to match those of the free fermion and boson CFTs [46]. It is indeed an interesting future problem to investigate how handlebody geometries can be realized in the Chern-Simons formulation of higher-spin gravity and how finite size corrections can be evaluated therein.
The paper is organized as follows: In section 2 we calculate free fermion current correlators (for spin-1, spin-2 and spin-3 currents) on the torus (without twist fields) with the goal of using them to compute thermal corrections in conformal perturbation theory. We further cast the correlators in a form that makes direct contact with the bosonized formulation to be employed for RE calculations. In section 3 we explain our prescription for integrating holomorphic current-correlators on the torus. Subsequently, in section 4 the current-correlators are integrated over the torus using the integration prescription. The results are found to be in perfect agreement with exact expectations from other methods for studying deformations of the free fermion theory by the U(1)-current, the stress tensor and the spin three current. We also review and match with the known results of the large-N expansion of Yang-Mills theory in two dimensions. In section 5 we employ our methods to examine corrections to the thermal partition function of the free boson theory with spin-three deformation, and we demonstrate exact agreement with the results of [14]. Sections 6 and 7 are devoted to the evaluation of the Rényi and entanglement entropies for spin-one, spin-two and spin-three deformations along with a number of nontrivial consistency checks along the way. Appendix A lists the W ∞ -algebra OPEs for reference. In appendix B we collect a large number of useful identities for elliptic functions and modular forms. We also relegate the details of the calculation of correlators in the presence of twist fields from first principles to appendix C. All integrals necessary for evaluating the Rényi entropies are derived in detail in appendix D.

Free fermion current correlators
The free fermion CFT provides a realization of the W 1+∞ algebra [32,33] generated by currents with spins s ≥ 1. Specifically, the theory of M complex free fermions {ψ a } (a = 1, 2, . . . M ) in the U (M )-singlet sector, has an infinite set of integer spin conserved currents. The holomorphic currents J, T (the stress tensor) and W with spin one, two and three respectively, are where the spin-three current has been normalised to match the conventions of [14,23] for the leading singularity in the W W OPE (A.1). The elementary fermions have the OPE and other operator products being trivial.

U(1) current correlator
Current correlators on the torus C/Γ with Γ 2ω 1 Z ⊕ 2ω 2 Z, can be readily deduced by making use of the free fermion correlator on the torus [47] Here ν = 2, 3 for periodic (R) and anti-periodic (NS) boundary conditions, respectively, on the fermions around the spatial circle of the torus. The periods of the torus, 2ω 1 = L and 2ω 2 = iβ, are determined by the spatial extent and inverse temperature respectively with τ = ω 2 /ω 1 = iβ/L. In order to avoid cluttering the notation, in all subsequent formulae, unless explicitly specified, theta-functions will be evaluated at vanishing argument.
Using the free fermion correlators on the torus we obtain where ν = 2, 3 depending on the choice of spin structure. We will now rewrite this formula in a way that will allow us to readily integrate it over the torus. Unlike the fermion Green's function the current correlator is a doubly periodic function on the torus with a second order pole at z 12 = 0. Non-trivial identities involving elliptic functions (e.g. (B.13)) allow us to rewrite the above expression as Here E 2 (τ ) is the second Eisenstein series, a holomorphic, almost modular form with modular weight 2. Under a general SL(2, Z) transformation on τ , it transforms as We will see subsequently that this representation of the current correlator is natural in the bosonized formulation of the free fermion theory. The first term in (2.5) arises from taking two derivatives of the free (compact) boson propagator on the torus whilst the second term is the outcome of the sum over winding number sectors of the compact boson.

Spin-2 and spin-3 current correlators
The spin-two and spin-three current correlators can also be readily evaluated following Wick contractions and the resulting elliptic functions can be re-expressed in a form that facilitates direct connection to the bosonized approach we will adopt later. The two-point function for the stress tensor on the torus is Similarly, the spin-three current correlator is The transformation rule (2.11) can be derived by working in the bosonized language (in terms of a chiral boson ϕ) on the plane so that W = −i γ √ 6 : (∂ϕ) 3 : and J = i∂ϕ. Under the coordinate transformation w(z), using ∂ϕ(z) = w (z)∂ w ϕ(w), and defining the current W on both the z-plane and the w-plane using point-splitting regularization of operator products, one directly obtains the result (2.11). Taking account of this mixing with the U(1)-current, for the map to the cylinder z(w) = β ln w/(2π), we obtain eq.(2.10) for the two point function of the spin-three current.
At high temperatures, it therefore appears that the spin-three current correlator, appropriate for the W ∞ theory is .
The one-point function for the stress tensor on the cylinder is determined by the Schwarzian which can also be obtained by taking the coincidence limit of the U(1) current correlator (2.5) at high temperature. This manner of extracting W ∞ answers from the W 1+∞ theory is clearly ad hoc. Indeed, while there is a natural and automatic generalisation of the above subtraction to the torus, we do not have independent evidence to suggest that the resulting expression is the appropriate one for the W ∞ [1] theory on the torus. A systematic method along the lines proposed by [50] and attempted in [23] would be to extract correlation functions from the free fermion theory with the U(1)-current projected out by a cosetting procedure. We leave this for future work and focus attention primarily on the W 1+∞ theory.

Integrating over the torus
The first non-trivial correction to the thermal partition function of the CFT perturbed by a chemical potential for one of the currents above, is obtained by integrating the correlators over the torus (eqs. (2.5), (2.8) and (2.9)). Since the correlators contain singularities, we must have a definite prescription for dealing with these. For the spin-three current in particular, Figure 1: Left: Using prescription-1, integration along the A-cycle is performed first, avoiding any poles along the integration path. The integral along C is finite and independent of any smooth deformations of the path. The integral along C and C , differ by any non-zero residue around a pole (red dot). Right: Using prescription-2, we apply Stokes' theorem to the integral over the torus after excising disks D 2 centred around singular contact points (in red).
where F (2) is the order µ 2 correction. The integrals are actually tractable and finite because the integrand is holomorphic. However, the calculation is not without subtleties. It is well appreciated that such integrals are potentially ambiguous due to singularities from contact terms [11,12,17,23,24] when z 1 → z 2 5 . We will evaluate them using two different prescriptions: • Prescription-1: Perform the integrals along Re(z) first, followed by Im(z), or the A-and B-cycles of the square torus respectively, and in that order (see fig.(1)). Singularities from contact points along the integration path are avoided using what is effectively an i -prescription. This prescription matches the correction to the canonical thermal partition function.
• Prescription-2: Apply Stokes' theorem to the torus with infinitesimal disks centred around the contact points excised out. This method was also used in [11,12], and whilst yielding a result differing from the correction to the canonical partition function, the result is closely related to that of prescription-1, and exhibits nice modular properties.
In order to integrate an elliptic (holomorphic) function along a cycle of the torus, one only needs to know the coefficients of the simple and double poles of the elliptic function. This immediately follows from a theorem (B.15) (see [51] for details) which 5 Note that we have tacitly omitted correlators between the holomorphic and anti-holomorphic currents W (z 1 )W (z 2 ) . These are zero up to contact singularities [35] which can be dealt with using the prescriptions that we discuss. The net result is that contact term singularities between holomorphic and anti-holomorphic currents do not contribute since the prescriptions always excise the contact points from the integration domain.
states that every elliptic (doubly periodic) function can be expanded as a sum involving the Weierstrass ζ-functions and its derivatives, where the coefficients in the expansion are determined from the Laurent series around each of the singularities.
The Weierstrass ζ-function is a quasi-periodic function on the torus satisfying ζ (z) = − ℘(z) (see appendix(B)). Any elliptic function with poles of order r j at z = a j , (j = 1, 2 . . .) can be written as Crucially, ellipticity requires that the sum of simple pole residues vanishes 3) The main advantage of this representation is that the function may be immediately integrated, and since all ζ (s) (z) with s > 1 integrate to give doubly periodic functions, only the simple and double poles of f (z) influence its integral over a cycle of the torus. Therefore, if the integration contour is chosen to avoid the poles, keeping all simple poles to one side of the contour, then integration along the A(B)-cycle yields, where we have used (B.7). When simple poles lie both sides of the contour, we must keep track of any additional contributions from the residues at these poles. Simple poles do not arise for thermal corrections at the order we work in, whilst for the Rényi entropy they appear due to twist operator insertions on the real (spatial) axis.

Integration on T 2 : Prescription-1
We now perform the integral over the torus by first integrating along the A-cycle (or spatial axis) and subsequently along the B-cycle. For simplicity, we take all simple poles to lie on the real axis, to avoid issues arising from the contours threading between poles, and we find One may check that performing the integrals in the reverse order yields a different result. Before attempting to understand the physical interpretation of this prescription, let us recast the expressions in terms of L, β and τ . For this we use the identity, to obtain Interpretation: The prescription for the calculation we have adopted above can be understood as follows. The current-current correlator W (z 1 )W (z 2 ) only has a singularity when z 1 = z 2 . This cannot be a simple pole on the torus, since an elliptic function cannot have only one simple pole. Our prescription requires performing the spatial integrals first, taking care to avoid any pole(s) along the integration path (z 1,2 = σ 1,2 + it 1,2 ): We can now use the definition of the conserved charge which is actually independent of time, to rewrite the integral as This is precisely the O(µ 2 ) contribution to the canonical partition function. The interpretation in terms of conserved charge expectation values is also supported by the fact that upon doing the σ 1 integral first we get a result independent of the Euclidean times, t 1 and t 2 . The same prescription has already been used to calculate the integrals relevant for thermal and Rényi entropies on the thermal cylinder (τ → i0 + ) in [23,24].

Integration on T 2 : Prescription-2
We now discuss the second method based on the prescription given in [11,12]. For this method we first note that the deformation by a holomorphic operator can be viewed as the integral of an exact 2-form on the torus: where D 2 (a k ) is an infinitesimal disk centred at z = a k and {a 1 , a 2 , . . . a n } is the set of poles in the operator product of W (z) with any other insertions (denoted as " . . . "). Applying Stokes' theorem, we reduce the integral to a line-integral of the one-form along the boundary of the torus (with the excised discs).
Here ω is defined only up to an additive holomorphic one-form g(z)dz. This choice was originally made by Douglas in [11] and it leads to a nice physical interpretation, related to the prescription-1 discussed above. When applied to the two-point correlator of the W -currents, noting that the only singularity of the two-point function of the two Wcurrents is when z 1 − z 2 = 0, we find that the boundary integral ( fig.(1)) simplifies to The first term on the right hand side is the correlator integrated along the A-cycle whilst the second is a contour integral around the infinitesimal circle centred at z 1 = z 2 . The result of the first term (since σ 1 = z 2 ) is identical to that obtained using prescription-1. The contour integral in the second term involves a non-holomorphic function so one should be careful in evaluating it. It can receive non-vanishing contributions from both simple and double poles in the current-current correlator. However since an elliptic function cannot have a solitary simple pole, the only contribution from the excised disc is from the double pole at z 1 = z 2 . In particular, where the coefficients c s are the expectation values of operators contained in the OPE of two W -currents (A.1). Therefore, we obtain This matches the general prescription quoted in [12]. Hence the two prescriptions we have discussed differ by the one-point function of the spin-four operator appearing in the OPE of W (z 1 )W (z 2 ). The difference between the two prescriptions (at order µ 2 ) can be viewed as a local counterterm proportional to the spin-four operator: −βF where U is the spin-four current of the W-algebra. The final result for the free energy correction using the second prescription can be written compactly in terms of the non-holomorphic but modular form E 2 which is obtained by a slight modification of .
Remarkably, the effect of prescription-2 is to simply replace the explicit factor of E 2 (τ ) in eq.(3.7) with E 2 (τ,τ ), ensuring that the result has good modular properties.
In the calculation above there were only double poles contributing to the final result. Simple poles in operator products become relevant when considering three and four-point functions and therefore affect the correction terms at higher orders in µ and other physical observables such as the Rényi and entanglement entropies.

Thermal corrections for free fermion theory
We now apply the integration prescriptions discussed above to calculate the corrections to the thermal partition function for the free fermion theory in perturbation theory. The current-current correlator (2.8) for M free fermions is expressed in terms of powers of the function H(z 12 ) which is the "perturbative" contribution to the twopoint function of the U(1) current (2.5). Here we use the term "perturbative" with reference to the bosonized formulation of free fermions which will be reviewed at a later stage. In the bosonized language, free fermion current correlators have both perturbative and non-perturbative or winding mode contributions, and in this sense H is the perturbative piece. The correlation function is a doubly periodic function of z 12 = z 1 − z 2 as expected. In order to integrate it over the torus, as explained above, we must first use the Laurent series (B.6) for the ℘-function and apply the expansion of elliptic functions in terms of the Weierstrass ζ-function and its derivatives (B.15).
The two non-trivial expansions we require are for H 2 and H 3 which appear in the correlators for the stress tensor and the spin-three current: It is both a useful exercise and a valuable check to first focus attention on the simple examples involving deformations by the U(1) current and the stress-tensor. In either case, since we can deduce the exact partition sum we can compare these expectations with the perturbative expansion employing the integration prescription introduced above.

Perturbation by the U(1)-current
Let us first consider the well understood example of the CFT with a chemical potential for the U(1) current J(z): 3) The first correction to the free energy (assuming that J = J = 0 at the conformal point) appearing at quadratic order in ε 2 is Using the expression (2.5) for the current correlator and employing our prescription-1 to perform the integrals, we find We may now check this against the exact grand canonical partition sum for the free fermion CFT with a U(1) chemical potential. Following the relevant steps laid out in [14], the partition function for the deformed CFT is (with periodic boundary conditions around the spatial circle), where the m = 0 modes have been separately accounted for as we are in the Ramond sector. The exercise can be repeated, with half-integer moding, in the NS sector. Both partition sums then lead to the closed form expression, (4.7) The R and NS sectors correspond to ν = 2, 3 respectively. This matches our perturbative result upon expanding to order ε 2 . We have used the fact that ϑ ν /ϑ ν = 0 and that the partition function in each sector is real valued for τ = iβ/L.

Perturbation by the stress tensor
Perturbing the CFT by the stress tensor should have the effect of simply rescaling the background temperature (whilst keeping the spatial circle fixed). Let us now see how this works out, This situation is interesting because the stress tensor also has a non-vanishing onepoint function on the torus. Therefore we have two potential checks to satisfy. The corrections to the free energy at order ε and ε 2 are respectively given by Here we have taken account of the fact that the holomorphic and anti-holomorphic sectors contribute equally. The one-point function for the stress tensor can be computed using the derivative of the fermion propagator (2.3) and taking a coincidence limit for the two points Let us now compare this with the change in the free fermion partition sum upon infinitesimally changing the temperature, In a sector with fixed spin structure, we then have .
For a rectangular torus with τ = iβ/L all functions above are real valued. The heat equation (B.12) for theta-functions and the identity 24 ∂ τ ln η = 2πiE 2 together then yield This matches eq.(4.10) and the temperature variation can be identified as δβ = −2πεβ. Therefore, perturbing the CFT by the stress tensor can be viewed as a marginal deformation that rescales the temperature.
We now turn to the second order correction to the partition function. The stress tensor correlator (2.7) along with the expansion (4.1) of H 2 can be used to readily evaluate the necessary integrals so that (4.14) Once again, making use of the heat equation and the Ramanujan identity E 2 (τ ) = 2πi(E 2 2 − E 4 )/12, it immediately follows that this is precisely the correction at order (δβ) 2 to the free fermion partition function in eq.(4.12), as a consequence of an infinitesimal rescaling of the inverse temperature β.

Spin-three chemical potential
Having seen how holomorphic perturbation theory on the torus works with our integration prescription (prescription-1), we now apply this to the case with spin-three chemical potential. The order µ 2 correction to the partition function is formally We use the expansions (4.1) and (4.2) to evaluate the integrals and find that The term in parentheses without any theta-functions, in the first line of the above expression, is a weight six quasi-modular form and was also obtained by [11] within the context of 2D Yang-Mills theory. The additional contributions appearing with theta-functions arise from winding modes (in the bosonized language) which were not relevant for the application considered in [11]. We will return to this point shortly.
Note that the entire expression is a quasi-modular form of weight six. Furthermore, the q-expansion of the modular form with q = e 2πiτ has positive integer coefficients: Although it is not obvious a priori, this expansion precisely matches a direct calculation of the grand partition sum closely along the lines of Kraus and Perlmutter [14]. The partition function of the free fermion theory with a spin-three chemical potential, and without any constraint on the U(1) charge, is Expanding to order µ 2 , the partition sum is The q-expansion of the second term reproduces eq.(4.17). This confirms the validity of our perturbative approach and the associated integration prescription. It also makes clear that Lagrangian perturbations involving holomorphic currents have an equivalent, simple interpretation in the Hamiltonian framework.

High temperature limits and
At zero temperature, when τ → i∞, the free energy corrections vanish since q → 0. It is important that the correction to the thermal partition function is not exactly a modular form due to the anomalous transformation laws for E 2 and the derivatives of ϑ ν ; this ensures that the high temperature limit is non-vanishing. The high temperature behaviour, when τ → i0 + , is obtained as usual by first applying the modular transformation τ → −τ −1 and subsequently taking the limit τ → i∞. The anomalous modular transformation rules play a crucial role in this limit and we find whose leading term does not match the high temperature universal result at order µ 2 in [23,24]. This is because the free fermion theory has a W 1+∞ symmetry and we have neither cosetted out the U(1)-current (as in [23,50]), nor have we worked in the sector with vanishing U(1)-charge. The method of [14] which involved the introduction of a Lagrange multiplier imposing the zero U(1)-charge condition on the ensemble average, is expected to be correct only at high temperatures.
We can, however, use our observations in section 2.3 and verify that the high temperature behaviour (4.20) differs from the universal result for W ∞ [λ] theory, precisely due to a shift by the correlator of the U (1) current: Evaluating these two terms separately using our integration prescription, The first of these two integrals reproduces the universal high temperature correction for W ∞ [λ] theories with any λ, perturbed by the spin-three chemical potential, and the sum of these two contributions yields the corresponding high temperature result (4.20) for the W 1+∞ theory. It would be very interesting to understand how to extract the correct torus partition function for the W ∞ [0] CFT from free fermions at any temperature.

Free fermions and the 2D Yang-Mills connection
A fascinating aspect of the free fermion CFT on the torus, deformed by the spinthree current, is its relation to the large-N expansion of Yang-Mills theory in two dimensions (YM 2 ). This is well known and there is extensive literature on the subject, e.g. see [11,12,52]. Thus our computation of higher spin corrections to the partition function of the W 1+∞ CFT is related to the QCD-string genus expansion in 2D Yang-Mills theory at large-N . For this reason it is interesting to review this connection briefly and to highlight significant differences.
Yang-Mills theory in two dimensions is an exactly solvable system and can be reformulated as a string theory in two dimensions [53]. In the 't Hooft large-N limit, the chiral partition function of YM 2 with U (N ) gauge group, on the square torus with area A, can be formally expressed as a genus expansion, where λ is the dimensionless combination of the 't Hooft coupling and the area A, Thus λ is essentially the dimensionless area of the torus, with the strong and weak coupling limits corresponding to the large and small area limits, respectively. The functions F g (λ) are generating functions counting maps without folds from a genus g Riemann surface to the target spacetime torus [53]. They have the remarkable property [12,[54][55][56] that they are quasi-modular functions of The strong coupling expansion of F g (λ) encodes a sum over maps with winding number n, with an action given by the exponential of the area The power laws λ j arise from the integrating over the positions of branch-points and collapsed handles for these maps. The (non-negative) coefficients ω n,j g are the Hurwitz numbers which count the number of maps (without folds) with winding number n, and a certain number of branch points and collapsed handles.
The g = 1 contribution, from genus one worldsheets, is dictated by the c = 1 torus partition function, which counts maps of the torus onto a torus, where η(τ ) is the Dedekind eta function. The absence of theta-functions associated to free fermion spin structures is indicative of the fact that, in the bosonized language, the winding modes are irrelevant for the application to large-N YM 2 and can be systematically eliminated as discussed in [11]. The g = 2 term is the correction to the Yang-Mills free energy at order N −2 . Ignoring all winding mode contributions (in the bosonized language), the second order correction to the free fermion partition function using our integration prescription yields, instead of eq.(4.16) Note the appearance of powers of 1/Im(τ ) which were absent in eq.(4.16). The dependence on powers of 1/Im(τ ) is natural when winding modes in the bosonized picture are ignored, and only the perturbative contributions to the correlation functions are included. We refer the reader to the discussion in appendix C for further clarification. The correspondence between free fermion theory with the spin-three deformation and large-N Yang-Mills leads us to make the identifications, where the numerical factors in the second expression originate from the normalization of our spin-three current. With these identifications eq.(4.27) agrees with the corresponding expression in [11] for the order µ 2 ∼ N −2 correction to the partition function 6 . The strong and weak coupling expansions in YM 2 can be viewed as the low and high temperature expansions, respectively, of the free fermion CFT. The low temperature q-expansion of (4.27) yields the instanton-like expansion of the genus two contribution to the Yang-Mills free energy: .
Here q = e 2iπτ = e −λ . The coefficient of λ 2 counts the number of maps with two branch points whilst the terms proportional to λ are associated to maps with one collapsed handle. The quasi-modular property of F 2 produces a similar expansion in powers of e −1/λ at high temperature, but additional new terms appear which ensure the correct high temperature thermodynamics. These additional terms in the high temperature expansion, which is a weak coupling expansion in the language of YM 2 , can also be given a geometric interpretation as in [52].
As already alluded to above, an important general property of F g (λ) is that it must be a quasi-modular form with modular weight 6g − 6. In particular, the g = 2 contribution which we have evaluated has modular weight 6. We expect therefore that when we compute the entanglement entropy of a spatial interval of length ∆ in the free fermion theory, it will yield a function of ∆ with modular weight 6 at order µ 2 . On general grounds we also expect this function to be a quasi-elliptic function of ∆. It would be extremely interesting to understand if the EE contributions can also be given a precise geometric interpretation in terms of maps from genus g Riemann surfaces to a torus with two marked points. We note that the Rényi entropies for YM 2 on the torus have already been investigated in [57] and [58] and, due to the topological nature of 2D Yang-Mills theory, have been argued to be independent of the interval lengths. This is certainly not what we expect from the free fermion theory as we see below. It would be worth investigating the reason for this fundamental difference between the two theories, given that the two systems are closely related (on the torus).

Thermal correction for W ∞ [1] or free bosons
It is interesting to compare and contrast the thermal correction at order µ 2 for different CFTs on the torus. We can perform this excercise quite easily for M free complex bosons Φ a , (a = 1, 2, . . . M ). This theory has central charge 2M . The spin-three current in the free boson theory, adopting the normalizations of [14], is Applying Wick contractions, and using the Green's function for free bosons on the torus we obtain where z 12 = z 1 − z 2 . Since this is an elliptic function, we can express it in terms of the Weierstrass ζ-function and its derivatives with coefficients Integrating the two-point function over the torus T 2 using prescription-1 and including the contributions of both holomorphic and antiholomorphic sectors, we find the order µ 2 correction to the free energy , Calculating the integrals using prescription-2 leads to the same result with E 2 replaced by E 2 .
As in the case of the free fermion theory we can compare this result with the canonical partition function at order µ 2 from the Hamiltonian approach of [14]. Accordingly, the partition function of the free boson CFT with a spin three chemical potential (including both holomorphic and anti-holomorphic sectors) is Expanding this exact partition sum to quadratic order in µ we have leading to precise agreement between the grand canonical partition sum and eq.(5.5) obtained by the integration method using prescription-1. Therefore the correction to the free energy is an anomalous modular form of weight six. The leading high temperature asymptotics, obtained after performing a modular transformation, matches the expected universal answer for W ∞ [λ] theories [23,24], with exponentially subleading corrections, Note that the central charge of the theory is 2M . The coefficients of the low temperature q-expansion are non-negative integers, and constitute predictions for solutions with spin-three hair in hs[λ = 0] theory:

Single interval Rényi entropies
We will now adapt the prescriptions and method for evaluating the integrals over holomorphic current correlators to compute the singe interval Rényi and entanglement entropies in the free fermion theory on the torus. The standard route for this calculation is via the implementation of the replica trick using branch point twist fields [7][8][9]. The partition function of the QFT is evaluated on an n-sheeted Riemann surface R n , branched along the interval, first yielding the so-called Rényi entropies S RE (∆, n), and subsequently taking the n → 1 limit to obtain the entanglement entropy, Here Z (n) and Z are the QFT partition functions on the branched Riemann surface and the torus respectively. The Rényi and entanglement entropies are formally related to the reduced density matrix ρ ∆ for a spatial interval of length ∆ as, As pointed out in [7], the calculation of Z (n) may be achieved by evaluating the partition function in the presence of twist and antitwist fields σ n and σ n inserted at the end-points of the interval, so that in a perturbative expansion in µ we have with y 1 , y 2 ∈ R and |y 2 − y 1 | = ∆. Note that Z is the partition function of the deformed CFT and can itself be expressed in a perturbative expansion in µ. Therefore, to compute the Rényi and entanglement entropies at order µ 2 we need the threeand four-point functions involving a twist-antitwist pair and one or two spin-three current insertions, on the n-fold branched cover of the torus.
To implement the replica trick we take both the CFT Lagrangian density and the chemical potential deformation as a sum over n independent copies Note that the deforming operator is also replicated 7 . Focussing on the system of M fermions {ψ a } a=1,...M for concreteness, the action of the twist fields on the replicas is via cyclic permutation of the n-copies or branches {ψ The different sheets or branches are glued along a branch cut that coincides with the entangling interval.
In general, one is then faced with the difficult task of calculating the partition function of the QFT on the n-sheeted Riemann surface. For CFT's with generic deformations turned on this can be complicated. However, in the case at hand, a crucial simplification results from the fact that all the higher spin currents in the free fermion theory, including the spin-three operator W , are bilinears in the fields [23,32,33]. The deformed theory continues to be Gaussian and therefore it is natural to transform to a Fourier basis which diagonalizes the permutation action of the twist fields: The action of the twist fields onψ a,k is given by a phase factor e ±2πik/n acquired when taken around one of the two branch points. The theory on the n-sheeted surface is then recast in terms of n decoupled free fermions, and the QFT partition function is expressed as the correlation function of the product of n-pairs of twist-antitwist fields, Z (n) = k σ k,n (y 1 )σ k,n (y 2 ) . (6.6) In the presence of a deformation away from the conformal point, evaluation of the partition function in conformal perturbation theory is easier when there is an explicit representation for the twist operators. This is possible in the free fermion theory, upon bosonization. On the other hand, for the free boson CFT, there is no such explicit representation and correlators of twist operators with other currents have to be reconstructed from their short distance properties as was done on the cylinder in [23]. The situation on the torus is more involved and so we will content ourselves with studying the simpler case of free fermions in this paper.

Bosonization
In order to work with an explicit representation of the twist fields for the Rényi entropy calculation, we will use the bosonized representation of free fermions in terms of M free chiral bosons {ϕ a }, ψ a (z) = : e iϕa(z) : (6.7) satisfying the operator product expansion (OPE) Crucially, the {ϕ a } must each be viewed as a compact chiral boson with unit radius. The sum over the non-trivial winding sectors is then responsible for reproducing the correct fermion partition function and spin structure [47]. We proceed to outline the key ingredients required for the calculation in the bosonized language, accompanied by consistency checks where necessary.
In the free fermion theory, each replica fieldψ a,k (in the Fourier basis) corresponds to a compact chiral boson ϕ a,k , and the twist fields can be explicitly represented as : e −i k n (ϕa,k(z)−φa,k(z)) : (6.9) 1). Now, the corrections to the partition function (as a power series in µ) can be computed once the correlators involving these twist fields with any number of current insertions are known.
On the plane and the cylinder such correlators follow immediately from Wick rules, but the torus is more subtle and involves extra contributions from 'instanton' sectors as we discuss below. We explain the resulting modified Wick rules in appendix (C).

Twist field correlator on T 2
In the absence of any other operator insertions, the two-point function of a twistantitwist pair on the square torus with τ = iβ/L and |y 2 − y 1 | = ∆ ∈ R, in the undeformed theory, is given by The normalisations have been fixed so that in the short distance limit (∆ L, β) the correlator approaches |y 1 − y 2 | 2M k 2 /n 2 . Depending on whether the fermions have anti-periodic (NS) or periodic (R) boundary conditions around the spatial circle, ν takes the values 3 and 2 respectively. A derivation of the twist correlator in the bosonized description is presented in appendix C. It has already been demonstrated in [59] that the correlator (6.10) eventually leads to the single interval RE and EE in the free fermion CFT and, in particular, satisfies the non-trivial requirement that S EE (∆ = L) should match the thermal entropy of the CFT.

Free boson propagator on T 2
To calculate the effect of operator insertions in the presence of twist fields, we need to understand both quantum and classical or nonperturbative contributions to the correlations functions. The quantum pieces are encoded in the free boson propagator on the torus which is one of the main ingredients in the calculation. Recall that the Green's function for a free (real) boson Φ(z,z) ≡ ϕ(z) +φ(z) on the complex plane G(z 1 , z 2 ) = Φ(z 1 ,z 1 ) Φ(z 2 ,z 2 ) = − ln |z 1 − z 2 | 2 . (6.12) Naively, the Green's function on the torus C/Γ, Γ 2ω 1 Z⊕2ω 2 Z, should be obtained by a sum over images where Ω m,n ≡ 2nω 1 + 2mω 2 , with 2ω 1 = L and 2ω 2 = iβ being the periods of the torus. However, this is not the complete result since the torus is compact and we cannot have a source for the Green's function equation without a sink, so we need the following modification where the second term on the right hand side can be viewed as a negative unit charge distributed uniformly on the torus with area (2ω 1 ) 2 Im(τ ) = βL. Integrating the left hand side gives zero on T 2 and the same now holds on the right hand side. Including the effect of the sink term above, up to an additive constant, the free boson Green's function is This is a standard result (e.g. [11,49]). In particular this implies that the correlator of the holomorphic current ∂ϕ, up to an additive constant, is The function H was defined in eq.(2.5) for the current correlator in the fermionic picture. Comparing with (2.5) we see two potential sources of disagreement. The first of these is the dependence on 1/Im τ which is absent in (2.5) and the second is the absence of theta-function dependent terms in eq.(6.16). Both discrepancies are resolved by the inclusion of the winding mode contributions.

Deformation by the U(1) current
Following the route taken in our calculation of thermal corrections, we will begin by examining simple examples of chiral deformations before addressing the spin-three chemical potential. The simplest case is the spin-1 current which, in the bosonized theory, is given by As a warmup towards understanding the structure of the perturbative corrections to the twist-antitwist correlator due to deformations of the type (6.3) , we will examine the basic structure of correlation functions involving insertions of the holomorphic U(1) current alongside the twist fields. Although the theory is free, calculation of correlators in the bosonized description is subtle. This is because correlation functions in the bosonized framework receive both perturbative and semiclassical winding mode contributions (see appendix(C) and [47]). Specifically, in a sector with winding numbers w, w ∈ Z, we have ∂ϕ a (z) w,w = ∂ϕ a; cl + ∂ϕ a; qu (z) , w, w ∈ Z , (6.18) The quantum contribution ϕ a; qu is a free field with vanishing one-point function.
Following the steps laid out in appendix C, the three-point function involving two twist fields and one insertion of the U(1) current is given as, σ k,n (y 2 )σ k,n (y 1 ) ∂ϕ a,k (z) CFT = σ k,n (y 2 )σ k,n (y The functionζ(z) is the logarithmic derivative of Jacobi's ϑ 1 -function defined in eqs.(B.8),(B.11). It is quasi-elliptic and a simple modification of the Weierstrass ζ-function.
Here G(z) is the one-point function for ∂ϕ a,k in the presence of a positive and negative point charge pair on the torus. As explained in appendix C, the twist operator insertions act as point sources for the chiral bosons on the torus giving rise to a classical one-point function for the fields. This also follows from straightforward Wick contractions of the current with the twist operators. The constant additive piece K (1) is a classical or instanton contribution from the winding modes of the compact boson ϕ a,k . It is interesting to check how these two terms combine and approach the correct high temperature limit β L → 0. As usual, this limit is obtained by performing a modular transformation, and subsequently taking L β → ∞ keeping ∆ β fixed, and we find G(z) → π β coth π β (z − y 1 ) − coth π β (z − y 2 ) , (6.20) This agrees with the correlators evaluated directly on the cylinder in [23]. For the two-point function of two insertions of the operator ∂ϕ a,k in the presence of twist operators we similarly obtain, σ k,n (y 2 )σ k,n (y 1 ) ∂ϕ a,k (z 1 )∂ϕ a,k (z 2 ) CFT = σ k,n (y 2 )σ k,n (y 1 ) CFT × (6.21) Here H(z 1 − z 2 ) is the function defined in (2.5) in the absence of any twist fields. When k = 0, we recover the U(1) current-correlator encountered in (2.5) within the fermionic formulation. Therefore the factors of 1/Im τ we saw in eq.(6.16) cancelled against similar contributions from the winding modes, which also introduced new theta-function dependent terms that contain information on the spin structure. The expression 8 above illustrates precisely how the Wick contraction rules are modified by winding mode contributions as explained in appendix C.

Rényi entropies for spin-1 deformation
As a warmup excercise we will now calculate single interval Rényi entropy for the free fermion CFT with a chemical potential for the U(1) charge. The Rényi entropy in the presence of twist fields and U(1) current perturbation is The CFT partition function in the absence of deformations is simply the twistantitwist correlator, Z (n) CFT = σ n (y 2 ) σ n (y 1 ) . At order ε 0 , it has already been explicitly verified in [59], that the twist field correlators satisfy all necessary checks required of the entanglement entropy of the CFT on the torus. In particular, the CFT partition function Z (n) CFT on the n-fold cover of the torus is given explicitly by the twist-field correlation function (6.11). Upon taking the limit n → 1, this yields the entanglement entropy, S EE (∆), which was shown in [59] to have the property that it yields the thermal entropy of the free fermion CFT when ∆ = L.
We have omitted from eq.(6.24) a putative one-point function for J in the presence of the twist fields, because it vanishes identically at the conformal point. The definition of the current operator involves a sum over both the fermion flavour index and the replica Fourier index: Recall from our previous discussion that the Fourier label ranges from k = −(n−1)/2 to (n − 1)/2. Explicitly, the current-current correlator on the n-sheeted Riemann surface is Any terms involving the functions G(z) vanish before integration due to independent sums over a pair of replica Fourier indices. In addition, the integration prescription we have adopted straightforwardly implies Therefore, the order ε 2 correction to the Rényi entropy is There are various checks that this formula for the Rényi entropy satisfies. It vanishes identically when the interval length ∆ shrinks i.e.in the limit ∆/L → 0. Applying modular transformation properties of the Jacobi-theta functions, for fixed ∆/L, we find that in the high-temperature limit, β/L → 0, the RE correction vanishes exponentially ∼ e −πL/β . Therefore, at high temperatures, the entanglement entropy correction S (2) EE (∆) also vanishes exponentially with temperature. This is consistent with the behaviour of the thermal entropy correction at this order. The U(1) chemical potential does not alter the partition sum (4.6) at high temperatures. The most non-trivial check of the RE correction evaluated above, comes from the requirement that when ∆ = L, the entanglement entropy should reduce to the thermal entropy for the deformed theory. For the undeformed theory (ε = 0), this check has already been done in [59]. We need only to verify that it is also satisfied by the correction at second order in ε. The thermal entropy correction at order ε 2 is To show that the Rényi entropy correction (6.27) yields this result in the limit n → 1 with ∆ = L, we first need to pick a specific spin structure, say ν = 3 for simplicity. Then we use the identity Although one may be tempted to set z = kπ/n at this stage, the sum over k is not well defined in the limit n → 1. To circumvent this, we first perform a modular transformation ϑ 3 (z|τ ) = (−iτ ) −1/2 exp(−iz 2 /πτ ) ϑ 3 (z/τ | − 1/τ ), then make use of the identity (6.29) and finally perform the sum over k. The exercise is straightforward and explicitly leads to the required condition: thermal . (6.30)

Stress tensor deformation
The second example we touch upon briefly is the deformation of the CFT by the stress tensor as in eq.(4.8). The corrections to the Rényi entropies at order ε 2 are determined by both the one-and two-point functions of the stress tensor on the n-sheeted cover of the torus. For simplicity, it suffices to focus explicit attention on the first order correction: Here we have also expanded the deformed CFT partition function on the torus Z in powers of the parameter ε (see eq.(4.9)). In the bosonized, replicated theory, the stress tensor operator is : (∂ϕ a,k ) 2 : . (6.32) The quickest way to obtain the one-point function of the stress tensor in the presence of branch-point twist fields is to take the coincidence limit (z 1 → z 2 ) of the correlator of two U(1)-currents ∂ϕ a,k (z 1 ) and ∂ϕ a,k (z 2 ) given in (C. 16). Integration of the first order correction over the torus is achieved by making use of eqs.(6.26) and (D.27) and the order ε correction the Rényi entropy is The terms within the first set of parentheses are periodic under ∆ → ∆ + L due to the periodicity properties of ϑ 1 whilst this is not the case for the Jacobi-theta functions with ν = 2, 3. The stress tensor perturbation should directly correspond to a rescaling of the temperature. Indeed, using the heat equation for theta functions, we see that S (1) iβ L ∂ τ ln σ n (y 2 )σ n (y 1 ) . (6.34) This confirms that the correlators we have computed in the bosonized picture yield the expected results. Since our correction to the Rényi entropy is purely the effect of a temperature rescaling in the CFT, the resulting entanglement entropy (n → 1) is guaranteed to satisfy all necessary checks. In particular it was shown in [59] that the CFT partition function Z (n) CFT in the presence of the branch point twist fields on the torus reproduces the thermal entropy of the free fermion CFT when ∆ = L and for any temperature. Therefore any rescalings of the temperature (infinitesimal or otherwise) will preserve this relationship.
The order ε 2 correction to the Rényi entropy requires the use of the stress tensor correlator in the presence of twist fields (C. 19) and integrating over the torus. We will not present any further details of this calculation as it is straightforward and the corrections are once again perfectly consistent with the effect of rescaling the temperature at this order.

Rényi entropies with spin-three chemical potential
We finally turn to the evaluation of the Rényi and entanglement entropies for the W 1+∞ theory with a chemical potential for the spin-three current. After bosonization, the spin three current in the free fermion CFT is [33] in terms of the chiral bosons ϕ a , where the normalizationγ has been fixed to match the conventions of [14,23] for the leading singularity in the W W OPE (A.1).

The O(µ 2 ) correction to Rényi entropy
For the calculation of the Rényi entropy, the spin-three current in the replica theory is Formally, the first correction to the partition sum on the n-sheeted torus is set by the one-point function for W i.e. σ n (y 2 )W (z)σ n (y 1 ) . Unlike the stress tensor, however, the operator W (z) does not acquire a one-point function in the presence of twist fields. While there is a non-vanishing correlator σ k,n (y 2 )W k (z)σ k,n (y 1 ) in each sector labelled by the integer k, it is an odd function of k and vanishes upon performing the sum over k.
The first non-vanishing correction to the Rényi and entanglement entropies of the deformed theory appears at order µ 2 . This is determined by the correlation function (C.20) involving two spin-three current insertions in the presence of the branch point twist fields, integrated over the torus. The steps leading to (C.20) are involved and explained in in appendix C. Despite the lengthy final form of eq.(C.20), a number of terms do not contribute upon integrating over the torus due to the vanishing integrals Therefore, introducing the shorthand notation, The summation ranges over k = −(n−1)/2, −(n−3)/2, . . . (n−1)/2. The first term ∼ H 3 in the integral above is purely a correction to the thermal partition function at this order and cancels against an identical contribution to n ln Z in the first line. All thermal corrections can be removed by subtracting out the W W correlator (2.8).
The integrals necessary for the explicit form of this expression have been evaluated in appendix D. Schematically, there are five distinct integrals that appear above: (7.6) Of these, I 1 and I 2 are directly related to the high temperature cylinder limit. They are generalizations to the torus of the integrals encountered in [23,24] which are responsible for the high temperature universality of the entanglement entropy for W ∞ [λ] theories, at this order in µ. The remaining integrals I 3 , I 4 and I 5 are accompanied by coefficients whose origin can be traced to the winding mode sectors in the bosonized framework. This is also the origin of all the constant terms in the W W correlator. Technically, the evaluation of I 1 and I 2 is the most involved. While the complete expression for the Rényi entropy is not particularly illuminating, we write down the explicit forms of the two terms I 1 and I 2 which are directly connected to the high temperature cylinder limit: and These are quasi-elliptic functions of ∆ with modular weight six. The functionsζ(∆) are only quasi-periodic under ∆ → ∆ + iβ. Interestingly, they are singly periodic functions of ∆, under the shift ∆ → ∆ + L. . Therefore I 1 and I 2 vanish both at ∆ = 0 and ∆ = L. The winding mode contributions are responsible for spoiling this periodicity and reproducing the correct physics of entanglement entropy, as we will see later.

High temperature cylinder limits
The first test that we will subject our result for the Rényi entropy (7.5) to, is to take the high temperature limit. The high temperature calculations in [23], later shown to be universal in [24], demonstrated that the order µ 2 Rényi entropy corrections are universal for all theories with a W ∞ [λ] symmetry (for any λ). The free fermion theory with W 1+∞ symmetry is somewhat of an exception to this due to the presence of the additional U(1) current. In particular, we saw in section 4.3.1 that the high temperature thermal corrections in this theory can be empirically separated out into a W ∞ [0] piece and the U(1)-current contribution. Our task is to repeat this exercise for the much more complicated Rényi entropies.
The Rényi entropy correction at order µ 2 is obtained by first removing the k = 0 piece in (7.5) which is the thermal correction to the partition sum at this order. To extract the high temperature limit β/L → 0 we must perform a modular transformation first and then take L/β → ∞. Careful examination of this limit reveals that only three terms survive when L/β is taken to infinity: The high temperature limiting forms of the three terms are while the final term surviving in this limit becomes The non-trivial limits for I 1 and I 2 coincide 9 with the corresponding objects found directly on the high temperature cylinder in [23,24]. This should be viewed as a stringent test of our integration prescription on the torus. In addition to these two terms which lead to the universal entanglement entropy correction in the limit n → 1, we have a new contribution from (7.12) whose origin lies in a sum over winding modes of the compact boson.
In this limit, the sum over the replica Fourier index k is rendered trivial. Using the identities and taking the limit n → 1 to get the entanglement entropy, we can view the high temperature correction to the entanglement entropy as the sum of two parts, 14) The first term on the right hand side, labelled as the W ∞ portion, is universal [23,24]: The high temperature entanglement entropy needs to satisfy another important test. For large interval size (relative to the inverse temperature), the entanglement entropy must be extensive in the interval length ∆, and approach the thermal entropy. The high temperature limit of the thermal entropy correction for free fermions inferred from eq.(4.20) is, 16) The corresponding large interval limit, ∆/β 1, for the entanglement entropies yields, This precisely mirrors the behaviour of the thermal entropies from (4.21). It is quite remarkable that a priori very different and complicated looking contributions, from the perturbative and winding sectors in the bosonized theory, conspire to give rise to the correct high temperature behaviour as expected on physical grounds.
Equally noteworthy is the fact that, unlike the thermal calculation we have seen earlier, for the high temperature RE/EE on the torus it is not so straightforward to interpret the difference between W 1+∞ and W ∞ as a shift involving the U(1)current. Such an interpretation may still possible given the origin of the term (7.12) as it can be related to an operator of the type ∼ (∂ϕ k, cl ) 2 T k 2 , but it is unclear at the moment how this connects up with a direct calculation on the high temperature cylinder. In particular, if we had taken the cylinder limit before doing the integrals, at the level of the correlation function of the W -currents (C.20), we would have found all winding mode contributions to be suppressed leaving behind terms of the type, H(z 12 ) 2 G(z 1 )G(z 2 ), H(z 12 )G 2 (z 1 )G 2 (z 2 ) and H(z 12 )G 2 (z 1 ). The first two are the result of standard Wick contraction rules (on the plane or the cylinder) between two W -currents and twist fields considered in [23]. The third contribution ∼ HG 2 can be related to the correlator of the spin-three and spin-one currents W J in the W 1+∞ theory. Such a cross term arises naturally and is the only new contribution to the Rényi entropy at this order in µ if the spin-three current is shifted in accordance with eq.(2.11). Indeed, this interpretation works in a very precise sense and calculation of the relevant integrals on the cylinder yields exactly (7.12) as the new contribution to EE/RE. This is remarkable because the integral of the term HG 2 on the torus vanishes identically. Thus there is a subtle sense in which the large L (or high temperature) limit does not commute with integration, and yet gives rise to the same final result. It would be worth understanding this somewhat mysterious behaviour better.

Matching thermal entropy at ∆ = L
Perhaps the strongest test of the RE/EE calculation comes from the requirement that when the entangling interval spans the entire system, the entanglement entropy should precisely equal the thermal entropy. It is already known to be true explicitly at the conformal point [59]. Verifying this property for the higher spin correction (7.5) appears to be an arduous task at first sight. However, we encounter a significant simplification due the fact that when y 2 − y 1 = L, all terms in the correlator that depend on the function G(z) vanish identically since The Rényi entropy correction at order µ 2 , with ∆ = L, can then be represented relatively compactly after integration on the torus: Note that Jacobi-theta functions without a specified argument should be understood as being evaluated at vanishing argument. We emphasize that the RE at ∆ = L is completely determined by contributions from the winding mode sectors of the compact chiral bosons. Their presence, captured by the theta-functions, is precisely what guarantees that the RE (for any ∆) is not a periodic function of ∆ under ∆ → ∆ + L. Had we not included the winding modes we would have found vanishing Rényi entropy and entanglement entropy at ∆ = L which would not be consistent with thermodynamical expectations.
The thermal entropy correction can be obtained from the free energy correction eq.(4.16) or from its elegant q-expansion (4.19) as (7.20) Demonstrating the matching of the entire q-expansion with the n → 1 limit of the Rényi entropy at ∆ = L is an interesting and challenging exercise that we leave for the future. We can nevertheless demonstrate the extremely non-trivial agreement between S (2) thermal and S (2) EE (∆ = L) at high temperature. The high temperature limit of eq.(7.19) is obtained as usual after a modular transform and then taking L/β → ∞. Up to exponentially suppressed terms, we find In the limit n → 1 we then have which agrees precisely with the high temperature thermal entropy of the W 1+∞ theory.

Discussion
In this paper we have performed an analytical computation of the perturbative corrections to the single interval Rényi and entanglement entropies (RE/EE) for the free fermion CFT on the torus, deformed by a chemical potential for the spin-three current. At quadratic order in the chemical potential our computation captures all finite size corrections to the higher spin entanglement entropy for this CFT. The RE and EE are controlled by quasi-elliptic functions of the interval length, which we have determined in closed form. The two main ingredients that made the calculation possible are -the spin-three current correlator in the presence of branch-point twist fields on the torus, and a prescription for integrating holomorphic correlators over the torus. Both these ingredients have been shown to satisfy several consistency checks.
A significant outcome of our calculation is a detailed understanding of the intricate interplay between perturbative and winding mode contributions to higher point correlation functions (involving twist fields) in the bosonized description of free fermions. In fact, we have seen that internal consistency requires inclusion of both contributions. Discarding the winding modes on the torus leads to a formula for EE that does not reduce to the thermal entropy when the interval in question spans the system. It would be interesting to understand whether this feature manifests itself within the context of large-N Yang-Mills theory on the torus whose large-N expansion has been argued to be equivalent to the W 1+∞ theory with spin-three deformation, but without inclusion of winding modes [11,12].
Our calculation was motivated primarily by higher spin holographic duality, and existing proposals for entanglement entropies therein, between W-algebra CFTs and Vasiliev's hs[λ] theories. Since higher spin holography is a duality between systems that can both be tractable (or weakly coupled) simultaneously, perturbative results in the the QFT are intrinsically valuable.
Our explicit results for thermal corrections in the Lagrangian formulation for the free boson theory (on the torus) with spin-three deformation agree with the results of [14]. These can be viewed as predictions of finite size effects for black hole solutions carrying spin three charge in hs [1] theory. Furthermore, it should be possible to carry out RE/EE calculations for the free boson theory by extending the results of [46,61] to obtain the two point function of spin-3 currents in presence of twist operators on the torus for this theory. Then performing the integrals over the torus on this correlator would lead to results for the Rényi entropy for the W ∞ [1] theory.
For the free fermions on the torus, understanding how to extract W ∞ [0] answers from the W 1+∞ results on the torus holds the key to making predictions for holographically dual higher spin black holes. At present, we have been able to see how to do this at high temperatures (the cylinder limit) for both EE and thermal entropy allowing us to match with the universal high temperature results for W ∞ [λ] theories in [23,24]. It should be possible to do this consistently at any temperature.
Finally, both spin-one (the U(1)-current) and spin-two (stress tensor) chemical potentials have natural interpretations in terms of transformations acting on the original partition function -the first as a type of 'twisting' or modification of boundary conditions around the thermal circle, and the second as a temperature rescaling. It would be interesting to see if our results for the RE and thermal entropy can be interpreted as some transformation on the respective partition functions due to the spin three chemical potential. .
Here U is the spin-4 current. For the W 3 algebra, U is replaced by a composite operator since there is no spin-4 current:

B Some properties of elliptic functions and modular forms
We provide some details of the properties of elliptic, quasi-elliptic functions and modular forms that are useful for our calculations. For a more complete treatment we refer the reader to [51] and [62]. An elliptic function is a function on the complex plane, periodic with two periods 2ω 1 and 2ω 2 . Defining the lattice Γ = 2ω 1 Z ⊕ 2ω 2 Z and the basic period parallelogram as the Weierstrass ℘-function is analytic in D except at z = 0, where it has a double pole. ℘(z) is an even function of z, defined via the sum where Ω mn = 2mω 1 + 2nω 2 with (m, n) = (0, 0) and g 2 , g 3 are the Weierstrass invariants.
• Under a modular transformation, of the complex structure parameter τ = ω 2 /ω 1 of the torus, the ℘-functions transforms with weight two: • The following formula can be used to infer the behaviour of ℘(z) in the limit Im(τ ) 1 [51] ℘(z; ω 1 , ω 2 ) = π (B.5) • The Weiserstrass ℘-function has a Laurent series expansion around z = 0 with modular forms as coefficients: where ζ R is the Riemann-zeta function.
• The Weierstrass ζ-function is a quasi-elliptic function, analytic in D but with a simple pole at z = 0 The σ-function is also only quasiperiodic, with a simple zero at z = 0. Both σ(z) and ζ(z) are odd under z → −z.
• A slight modification renders the Weierstrass ζ-function periodic along one of the periods of the torus C/Γ The new function is periodic along the A-cycle, but only quasiperiodic along the B-cycle.ζ where we have used the identity • The quasiperiodic functionζ(z) is the logarithmic derivative of the Jacobi theta functionζ • The Jacobi-theta functions satisfy the heat equation: • A useful relation between the Weierstrass ℘-function and Jacobi theta functions can be obtained using where r = 1, 2, 3 and ω 3 = ω 1 + ω 2 and η r = ζ(ω r ) .
Representation of any elliptic function in terms of the ζ-function and its derivatives [51]: Let f (z) be any elliptic function on D. Let a 1 , a 2 . . . a n be isolated poles of the function in D and let the singular terms near z = a k be Then it can be shown that provided also that k c k,1 = 0 i.e. the sum of simple pole residues must vanish.
This is a particularly useful theorem which allows us to integrate elliptic functions along the cycles of the torus C/Γ. The theorem can be used to deduce the following set of identities:

B.1 The Eisenstein series
There are a number of ways to introduce the Eisenstein series (see [62]) where τ is the complex structure parameter of the torus defined by C/Γ and (m, n) denotes the greatest common divisor. Each series has a q-expansion where σ j (n) is a sum over each positive integral divisor of n raised to the j th power. Under the S-transformation τ → −1/τ , the modular forms with the exception of E 2 (τ ), transform covariantly with a specific modular weight The anomalous transformation of E 2 (τ ) can be fixed by a shift. .
This is a modular form of weight two, although it is not holomorphic. Further useful relations include

C Twist field correlators on the torus
Correlation function involving twist fields on the torus are somewhat subtle due to the presence of winding mode sectors [47]. The reason for this is that bosonization relates a free fermion field ψ to a compact chiral boson ϕ with unit radius in our convention: ψ = : e iϕ : (C.1) The free boson partition function in the presence of twist and antitwist fields, can be formally written as The chiral and anti-chiral bosons are together packaged into the boson Φ: Since Φ is compact, it contains a non-perturbative classical piece characterized by the winding number around the target space circle. Taking z = x + iy and the torus periods to be 2ω 1 = L and 2ω 2 = iβ with τ = iβ/L, we can split the field into a classical and quantum part. The classical portion contains the winding modes and the background field generated by the point charge sources on the torus due to the insertion of the twist operators: (C.6) Substituting the classical solutions into the action and summing over the winding numbers w, w (after careful Poisson resummation over w ), the twist field correlator on the square torus is σ k,n = : e ikΦ/n : ,σ k,n = : e −ikΦ/n : (C.7) σ k,n (y 1 )σ k,n (y 2 ) = ϑ 1 (0) When the fermions are periodic around the spatial circle we take ν = 2, whilst when they satisfy anti-periodic boundary conditions we must set ν = 3.
The primary object of our interest is the correlator of currents in the free fermion theory in the presence of twist fields. The correlators of holomorphic currents in the bosonized theory are built from the two-point function of the U(1) current operator ∂ϕ k , which can be split in the manner indicated above, into three pieces ∂ϕ k (z) = ∂ϕ k;w,w + ∂ϕ k,source + ∂ϕ k,qu . (C.8) The quantum fluctuation ϕ k,qu has vanishing one-point function. Its two-point function for operators located at two different points z 1 , z 2 is given by ∂ϕ k,qu (z 1 )∂ϕ k,qu (z 2 ) = H(z 1 − z 2 ) + π L 2 Imτ (C.9) Note here the presence of the 1/Imτ term, which originates from the background negative charge on the torus (6.14). However if the location of the operators ϕ k,qu are coincident one has to allow for self contractions. This is due to the fact that the normal ordering constant does not vanish on the torus and must be taken into account. Therefore we have Note that this is the constant term that occurs in the two point function in (C.9). Self contractions do not have any singular terms since those have been already subtracted while defining the operator. The first two pieces in (C.8) are entirely classical in the sense described previously, and are given by In the winding number sector with integers (w, w ), the classical effective action in the presence of twist operators (the exponent of eq.(C.2)) where y 12 = y 1 − y 2 . The insertion of ∂ϕ k;w,w , into the partition can be re-expressed in terms of a derivative of this classical action (with respect to y 12 ), so that the one-point function of the full operator ∂ϕ k in the presence of the twist fields is ∂ϕ k (z) σ k,n (y 1 )σ k,n (y 2 ) σ k,n (y 1 )σ k,n (y 2 ) This expression is obtained after performing the sum over all winding number sectors (accompanied by Poisson resummation as an intermediate step). Here which is periodic under the shift y 2 → y 2 + 2ω 1 with 2ω 1 = L.
The two-point correlator of two U(1) currents is also computed similarly by splitting each current insertion into quantum and classical pieces and then performing the sum over the winding number sectors. We find, ∂ϕ k (z 1 )∂ϕ k (z 2 ) σ k,n (y 1 )σ k,n (y 2 ) σ k,n (y 1 )σ k,n (y 2 ) = H(z 12 ) + π L 2 Imτ + ik n 2 G(z 1 ) G(z 2 ) A remarkable feature of this result is that all factors of 1/Im τ cancel. The first line of the above equation has such a factor due to correlator for the quantum fluctuations given in (C.9). The last line also contains a factor of 1/Im τ which arises when terms of the kind (∂ϕ k;w,w ) 2 are re-expressed in terms of the derivatives of the classical action due to the winding modes. It is noteworthy that such factors of 1/Imτ consistently cancel between the quantum contributions and the classical winding number sectors. We will continue to observe such cancellations for the two point functions of the stress tensor as well as that of the spin-3 current in presences of the twists. We observe that the above correlator at k = 0 reduces to the two point function of the U (1) currents evaluated using the free fermion description of the theory given in (2.5) as expected . We can use this result to evaluate the U(1) correlator in the presence of twist operators which appears in the correction to the Rényi entropy due to a perturbation by a U (1) current. This is given by k,k (∂ϕ k (z 1 )∂ϕ k (z 2 )) k,k σ k,n (y 1 )σ k ,n (y 2 ) k,k σ k,n (y 1 )σ k ,n (y 2 ) Here the sum over k, k runs over the values k, k = − 1 2 (n − 1), − 1 2 (n − 3), · · · 1 2 (n − 1). In obtaining the above answer we have also set all the terms which involve sums of odd functions in k to zero. Note that the last term in the above equation arises from a careful consideration of the k = k term in the double sum.
We now consider the two point function of the stress tensor in presence of the twist operators. Defining for this we obtain, ∂ϕ k (z 1 ) 2 ∂ϕ k (z 2 ) 2 σ k,n (y 1 )σ k,n (y 2 ) σ k,n (y 1 )σ k,n (y 2 ) Note that all terms with the 1/Imτ cancel and the terms due to the self contractions contribute in this cancellation. In the above formula x = k n π∆ L . On simplification we see that the correlator can be written as The last term in the above expression can be seen to arise from the disconnected diagram ∂ϕ k (z 1 ) 2 ∂ϕ k (z 2 ) 2 . We see that on subtracting this term, the k = 0 limit of the above correlator agrees precisely with that obtained in the free fermion description of the theory in (2.7) after taking into account the factor of 4 which appears in the definition of the stress tensor. We now quote the result for the correlator which appears in the correction to the Rényi entropy on deformation by the stress tensor.
k,k (∂ϕ k (z 1 ) 2 ∂ϕ k (z 2 ) 2 ) k,k σ k,n (y 1 )σ k ,n (y 2 ) k,k σ k,n (y 1 )σ k ,n (y 2 ) = k 2 (H(z 12 )) 2 + (C. 19) The terms in the last lines which contains a double sum over k, k is due to the disconnected contributions to the stress tensor correlator with x = k n π∆ L . In evaluating the Rényi entropy these terms should simply be removed.
Note that if one just retains the k = 0 term in the above expression, we obtain the two point function of the spin-three currents in the fermionic description given in eq.(2.8) as expected. This completes the evaluation of all the correlators required to compute the deformation of the Rényi entropies by the chemical potentials considered in this paper.
For the purposes of integration and keeping track of different contributions we find it useful to split G(z) as G(z) = g(z) + κ 2 , (D.3) g(z) = ζ(z − y 2 ) − ζ(z − y 1 ) ; κ 2 = π 2 3L 2 E 2 (τ ) (y 2 − y 1 ) . The integrals are evaluated on the torus C/Γ with the lattice Γ ω 1 Z ⊕ ω 2 Z. Although the computation of the integrals is tedious, it is rendered relatively straightforward by the fact that the integrands are elliptic (doubly periodic) functions of the integration variables z 1 and z 2 .

D.2 Evaluation of I 2 (∆|τ )
We can also see that the integrals in I 2 can be related to the ones we have already calculated for I 1 . We recall I 2 = d 2 z 2 d 2 z 1 H(z 1 − z 2 ) (g(z 1 ) + κ 2 ) 2 (g(z 2 ) + κ 2 ) 2 . (D.23) Next, we make use of the theorem (B.15) to write (g(z) + κ 2 ) 2 = ℘(z − y 1 ) + ℘(z − y 2 ) − 2ζ(∆) g(z) + κ 3 ∆ = y 2 − y 1 , where we have made use of the fact thatζ(∆) = ζ(∆) − κ 2 . The integral can be organized into six separate terms: Inserting the complete expressions for these integrals we obtain 35) In the Rényi entropy this term is accompanied by a factor of ϑ ν /ϑ ν (x) which yields (quasi)modular weight six for this contribution. A non-trivial consistency check satisfied by this expression is that it is periodic under ∆ → ∆ + L. This periodicity is necessarily spoilt by the Jacobi-theta functions multiplying it in (7.5).

D.4 I 4 (∆|τ )
It is easily shown that the integral is determined in terms of integrals that we have already evaluated. In particular Explicitly, we find, We find