Factorisation and holomorphic blocks in 4d

We study N=1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=1 $$\end{document} theories on Hermitian manifolds of the form M4 = S1× M3 with M3 a U(1) fibration over S2, and their 3d N=2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=2 $$\end{document} reductions. These manifolds admit an Heegaard-like decomposition in solid tori D2× T2 and D2× S1. We prove that when the 4d and 3d anomalies are cancelled, the matrix integrands in the Coulomb branch partition functions can be factorised in terms of 1-loop factors on D2× T2 and D2× S1 respectively. By evaluating the Coulomb branch matrix integrals we show that the 4d and 3d partition functions can be expressed as sums of products of 4d and 3d holomorphic blocks.


Introduction
In recent years thanks to the development of a new method to formulate SUSY gauge theories on curved spaces initiated by [1] and to the application of Witten's localisation technique to the path integral of theories defined on compact spaces, a plethora of new exact results for SUSY gauge theories in various dimensions have been obtained.
The focus of this note is on 4d theories defined on Hermitian manifolds of the form M 4 = S 1 ×M 3 where M 3 is a possibly non-trivial U(1) fibration over the 2-sphere, and their 3d reductions. These 4-manifolds can preserve 2 supercharges with opposite R-charge and a holomorphic Killing vector generating the torus action on M 4 [2][3][4]. 1 General results [6,7] state that partition functions on these spaces do not depend on the Hermitian metric but are holomorphic functions of the complex structure parameters and of the background gauge fields through the corresponding vector bundles. Similar results hold for the 3d N = 2 reductions of these theories.
For these spaces it has also been observed that the partition function can be expressed in terms of simpler building blocks. It turns out that for 3-manifolds M 3 g , which can be realised by gluing two solid tori D 2 × S 1 with an element g ∈ SL(2, Z), and likewise for 4-manifolds M 4 g constructed from the fusion of two solid tori D 2 × T 2 with appropriate elements in SL (3, Z), the geometric block decomposition is very non-trivially realised also at the level of the partition functions.
This phenomenon was first observed for 3d N = 2 theories on M 3 S = S 3 and M 3 id = S 2 id × S 1 which were shown in [8] and [9] (see also [10][11][12]) to admit a block decomposition where the 3d holomorphic blocks B 3d c are solid tori D 2 × S 1 partition functions. The two blocks are glued by the appropriate SL(2, Z) element S or id acting on the modular parameter of the boundary torus and on the mass parameters. The sum is over the supersymmetric Higgs vacua of the theory which remarkably are the only states contributing to the sums in (1.1), even though these partition functions, although metric independent, are not properly topological objects. In fact, in the case of M 3 S = S 3 , the factorisation was proved to follow from a stretching invariance argument [13]. Indeed in [13] it is shown that it is possible to deform the S 3 geometry into two cigars D 2 × S 1 connected by a long tube, which effectively projects the theory into the SUSY ground states, without changing the value of the partition function.
In [9] it was developed an integral formalism to compute the holomorphic blocks which builds on the fact that they are solutions to a set of difference equations. The 3d blocks are obtained by integrating a meromorphic one-form Υ 3d , consisting of the mixed Chern-Simons, vector and chiral multiplet contributions on D 2 × S 1 , on an appropriate basis of middle-dimensional cycles in (C * ) |G|

JHEP11(2015)155
Later on, in [14], block integrals were derived from localisation on D 2 × S 1 . Curiously the integrand Υ 3d turns out to be the "square" root of the integrand appearing in the Coulomb branch partition function on the compact space, so that by combining (1.1) and (1.2) one finds where the gluing rule can be g = S, id. The first term of the equality is a smart rewriting of the partition function on the Coulomb branch, where the localising locus may contain a continuous and a discrete part. As observed in [9] this suggestive chain of equalities hints that factorisation commutes with integration. The factorisation of partition functions has been observed also on lens spaces L r [15], on S 2 A × S 1 with R-flux (3d twisted index) [16], in 4d N = 1 theories on S 3 × S 1 (4d index) [17][18][19] and on the ellipsoid [20], and in 2d N = (2, 2) theories on S 2 , [21][22][23]. In fact for all these cases the block factorisation can be incorporated in the general analysis of 2d, 3d and 4d tt * geometries [24,25]. An alternative perspective on the factorisation is the localisation scheme known as the Higgs branch localisation considered in [21,22,26,27].
The goal of this note is to elucidate the block decomposition of partition functions for theories defined on L r , L r × S 1 , S 2 A × S 1 and S 2 × T 2 . The Coulomb branch partition functions on these spaces have been computed in [16,37,38] and [39][40][41].
Our main result in 3d is the extension of the remarkable identity in (1.3) to the lens space M 3 r = L r and to the twisted index M 3 A = S 2 A × S 1 , which are respectively obtained through the r-gluing implementing the appropriate SL(2, Z) transformation on the boundary of one solid torus to obtain the lens space geometry, and through the A-gluing which realises the topological A-twist on S 2 .
We then move to 4d, where for M 4 S = S 3 × S 1 , M 4 r = L r × S 1 and M 4 A = S 2 × T 2 we are able to prove an identical relation (1. 4) In the case of the index S 3 × S 1 and lens index L r × S 1 , the factorised form of the integrand emerges after we perform a modular transformation on the complex structure parameters by means of the remarkable property of the elliptic Gamma function discovered in [42]. This transformation generates a term which can be identified with the 4d anomaly polynomial and represents an obstruction to factorisation. However, for anomaly free theories this factor is one and we can express the integrand as Υ 4d 2 r . It is then fairly easy to check that the S 2 ×T 2 integrand can also be expressed in terms of the same meromorphic function Υ 4d 2 A . The second step in (1.4) is the actual evaluation of the Coulomb branch sum and integral on a suitable integration contour yielding the factorisation into 4d holomorphic blocks B 4d c which we compute in some explicit cases. The last step in (1.4) introduces the 4d block integrals. In general determining the integration contours Γ c is harder than the JHEP11(2015)155 3d case, here we give a prescription in few examples based on physical considerations such as periodicity/invariance under large gauge transformations.
The paper is organised as follows. We begin section 2 with the study of N = 2 theories on the lens space where, thanks to a new identity for the generalised double Sine function, we can prove the integrand factorisation. We then show the block factorisation for two interacting cases. We take a small detour to discuss the T [SU (2)] theory. In this case, thanks to the transformation properties of the holomorphic blocks, we are able to prove that partition functions on generic 3-manifolds admitting a block decomposition are invariant under mirror symmetry. In section 3 we discuss the 3d twisted index. In section 4 we introduce the lens index partition function and show that the integrand can be expressed in a factorised form after cancelling the anomalies. We then show two examples of block factorisation. We check the analogue factorisation of S 2 ×T 2 partition functions in section 5. Finally in section 6 we introduce the 4d block integrals. The paper is supplemented by several appendices where we discuss many technical details and computations.
2 3d N = 2 partition functions on S 3 /Z r We consider the free orbifold S 3 /Z r of the squashed 3-sphere S 3 The resulting smooth 3-manifold is the squashed lens space L r . The partition function of N = 2 theories on L r has been first obtained in [37] and revised in [38]. The localising locus is labelled by the continuous variables Z in the Cartan of the gauge group G and discrete holonomies in the maximal torus. The integer variables 0 ≤ 1 ≤ . . . ≤ |G| , n ∈ [0, r − 1], parameterise the topological sectors. The holonomy is non-trivial since the fundamental group of the background manifold is π 1 (L r ) = Z r and breaks the gauge group to 2 where the subgroup G k has rank given by the number of n = k. We also turn on continuous Ξ and discrete H variables for the non-dynamical symmetries.
The partition function reads where |W k | is the order of the Weyl group of G k . The classical terms is given by the mixed Chern-Simons action (CS where we have considered a background holonomy θ also for the topological U(1). The 1-loop contribution of matter multiplets is given by where i runs over the chiral multiplets, ρ i , φ i , are respectively the weights of the representation of the gauge and flavour groups and ∆ i the Weyl weight. For convenience we will absorb the Weyl weight into the mass parameter, and we will be denoting the squashing parameter by b = ω 2 = ω −1 1 , with Q = ω 1 + ω 2 . The 1-loop contribution of the vector multiplet is given by where the product is over the positive roots α of G and we set Z α = α(Z), α = α( ). The functionŝ b,H is the projection of the (shifted) double Sine function defined as the ζ-regularised product In appendix A we have derived a new expression forŝ b,−H in terms of ordinary double Sine functionŝ This expression allows us to easily evaluate the asymptotic, locate zeros and poles, take the residues and express it in a factorised form was introduced by [15] to fix the sign ambiguity among the different holonomy sectors contributing to the partition function. The factorisation of the partition function was used as a criterion to determine the sign, which can be naturally introduced by looking at the block factorisation of non-gauge theories, collections of chiral multiplets and Chern-Simons couplings. The non-trivial point is then to verify that the introduction of these sign factors leads to the block factorisation also for interacting theories. Preliminary checks were given in [15], in this paper we fully confirm this prescription.

Factorisation
We will now show that by using our expression (2.10) the partition function of theories with integer effective CS couplings (parity anomaly free) can be expressed in terms of a suitable set of holomorphic variables and factorised in 3d holomorphic blocks. We begin with the simplest parity anomaly free theory, the free chiral with −1/2 CS unit The subscript ∆ is due the fact that, in the context of the 3d-3d correspondence relating 3d N = 2 theories to analytically continued CS on hyperbolic 3-manifolds, this theory is associated to the ideal tetrahedron [44]. In this context the fundamental Abelian mirror duality relating the anomaly free chiral to the U(1) theory with 1 chiral and 1/2 CS unit is interpreted as a change of polarisation. At the level of lens space partition functions this duality reads We prove this equality in appendix B.1. 4 The half CS unit in (2.12) has the effect to cancel the quadratic factor in (2.10) so that the anomaly free result can be written in a block factorised form 5 in terms of holomorphic variables is the partition function on D 2 × τ S 1 of the tetrahedron theory defined in [9]. Notice that when |q| < 1 we have |q| > 1 and Basically blocks in x, q, andx,q, share the same series expansion but they converge to different functions. This is actually a key feature of holomorphic blocks which has been JHEP11(2015)155 extensively discussed in [9] and will play a crucial role in the example we discuss in section 2.3. The two blocks are glued through the r-pairing acting as where τ is to be identified with the modular parameter of the boundary T 2 , while the flavour fugacity and holonomy transform as This gluing rule as expected coincides with ther ∈ SL(2, Z) element (composed with the inversion) realising the L r geometry from a pair of solid tori. CS terms at integer level and FI terms can be expressed in terms of periodic variables as r-squares of Theta functions defined in (A.47) by means of (A.49) 6 Similarly, the vector multiplet can be factorised as The ∝ means that we are dropping background contact terms depending on ω 1,2 and r only. From now on we will assume equalities up to these constants.
Obviously the factorised expressions are not unique. As pointed out in [9] the ambiguity amounts to the freedom to multiply the blocks by "q-phases" (elliptic ratios of Theta functions with unit S, id, r-squares). For example another possibility is to factorise the vector multiplet contribution as in [9] These observations imply that on parity anomaly free theories, where the total effective CS couplings are integers, we can replace each 1-loop vector multiplet with (2.21), each chiral contribution with B 3d ∆ (x; q) 2 r and then factorise the remaining integer CS units using (2.20). This procedure allows us to rewrite the partition function as (2.23) 6 For the improved CS term proposed in [15] we simply have e − iπ The vector multiplet factorised form in [9] differs from ours by a sign factor (−1) . Notice that Θ(−q 1 2 sα; q) 2 r = (−1) α Θ(q 1 2 sα; q) 2 r .

JHEP11(2015)155
with exactly the same integrand Υ 3d appearing in the analogous factorisation observed in [9] for S 3 and S 2 id × S 1 . The three cases differ only for the integration measure which can include also a summation over a discrete set and for the gluing rule. The prefactor e −iπP is the contribution of background mixed CS terms which can have half-integer coupling preventing their factorisation.
The integrand Υ 3d appears also in the definition of 3d blocks via block integrals proposed in [9] where Γ c is an appropriate basis of middle-dimensional cycles in (C * ) |G| . Recently block integrals were rederived via localisation on D 2 × S 1 by [14]. In their analysis the B 3d ∆ (x; q) block corresponds to imposing Dirichlet (D) boundary conditions  [14], the Theta functions represent the elliptic genus of a Fermi multiplet on the boundary torus. We are then able to extend to the lens space the remarkable Riemann bilinear-like relation discovered for S 3 and S 2 id × S 1 [9]: (2.28) The intermediate step, the block factorisation of the partition function, is checked for two specific examples in the next subsections, for earlier results see [15]. Notice that, while the parity anomaly cancellation condition is a sufficient condition to factorise the integrand in the first step, in the second step it is only a necessary condition. The actual evaluation of the integral might require additional conditions to ensure convergence. However as we already mentioned, there are other ways to prove factorisation besides explicit integral evaluation. For example, Higgs branch localisation, stretching/projection arguments or the existence of a commuting set of difference operators in x, q andx,q acting on the partition functions.

SQED
We now consider the U(1) theory with N f charge +1 and N f charge −1 chirals (SQED), for which we turn on masses X a ,X b , and background holonomies H a ,H b . We also turn on the FI ξ and the associated holonomy θ. The L r partition function reads where in the last step we simply sent Z → −Z and used the reflection property (A.43). In order to evaluate the integral we can close the contour in the upper half-plane (assuming ξ > 0) and take the sum of the residues at the poles of the numerator The details of the computation and notations are given in appendix B.2, the result is where we introduced the notation where we used (2.20). Therefore, we finally obtain are the same SQED holomorphic blocks derived for S 3 and S 2 id × S 1 .

T [SU(2)]
As an application of the result obtained in the previous section we consider the mass deformed T [SU (2)] theory. This is a U(1) theory with 2 charge +1 and 2 charge −1 chirals and a neutral chiral. We turn on vector and axial masses m 2 , µ 2 , the FI parameter ξ and their respective holonomies H V 2 , H A 2 , θ ∈ Z r . The T [SU (2)] theory is part of a family of theories T [G] introduced in [45] as boundary field theories coupled to the bulk 4d N = 4 SYM with gauge group G for which they provide S-dual of Dirichlet boundary conditions. T [G] are 3d N = 4 theories with G × G L global symmetry rotating the Coulomb and Higgs branches. 3d mirror symmetry acts by exchanging Higgs and Coulomb branches hence swapping In [46] it was shown that the S 3 partition function of the mass deformed T [SU(2)] theory (the axial mass m coincides with the mass of the 4d adjoint breaking the 4d SYM to N = 2 * ) coincides with the S-duality kernel in Liouville theory acting on the torus conformal blocks. It was also explicitly proved that the S 3 partition function is invariant under the action of mirror symmetry. Actually, as we are about to see, the self mirror property can be proved on generic 3-manifolds that can be decomposed in solid tori. This result follows from the highly non-trivial tranformations of holomorphic blocks across mirror frames.
The lens space partition function of T [SU(2)] reads and is the contribution of background CS terms. 8 We introduced the index I to distinguish the theory from its mirror as it will be clear later.

JHEP11(2015)155
Mirror symmetry acts by exchanging Higgs and Coulomb branches, correspondently the vector mass and the FI parameter are swapped while the axial mass is inverted, and similarly for the associated holonomies so that the partition function in the mirror frame reads where we used that P is invariant under the mirror map and obtained the blocks in phase II from the ones in phase I by applying the mirror map (2.45) At this point proving that the partition function is invariant under mirror symmetry amounts to prove the following equality (2.46) As we already mentioned the two sets of blocks inside an r-square (with |q| > 1 if |q| < 1) share the same series expansion but converge to different functions which crucially have different transformation properties. which ensures (2.46). The transformations of the blocks across mirror frames has the characteristic structure of a jump across a Stokes wall. The interplay between mirror symmetry and Stokes phenomenon for 3d blocks and its relation to analytically continued CS theory has been extensively discussed in [9]. Notice that our proof relies only on the blocks transformation properties and makes no reference to the specific gluing rule, hence it can be extended to all the cases in which the partition function can be block factorised.

SQCD
We now continue our examples with the SU(2) theory with N f fundamentals and N f antifundamentals chirals (SQCD). The partition function reads

JHEP11(2015)155
where we defined In this form the matter sector reads formally the same as the previous Abelian theory with the replacements a → a , b → b . In fact also the vector multiplet contribution is equivalent to a pair of charge ±2 chirals. Therefore, there is a canonical Abelian theory Z SQCD [ξ, θ] associated to the SU(2) theory, for which we also turn on an FI coupling e 2πi r Zξ e 2πi r θ . Since the vector multiplet does not bring any pole, the residue computation proceeds exactly as in the SQED case and the SU(2) partition function can be obtained from the limit

3d twisted index
We now consider N = 2 theories with R-symmetry on S 2 A × S 1 with a topological Atwist on S 2 . This background has been recently reconsidered in [16]. The topological twist is performed by turning on a background for the R-symmetry proportional to the spin connection with a quantised magnetic flux, as a consequence R-charges are integers. Magnetic fluxes are also turned on for all the flavour symmetries.
The path integral on this space localises on BPS configurations labelled by continuous variables Z in the Cartan and discrete variables in the maximal torus of the gauge algebra. The integer variables parameterise the magnetic flux while z = e 2πiZ is the holomorphic combination of the S 1 holonomy and of the real scalar. We also turn on analogous continuous and discrete variables for the non-dynamical symmetries. The partition function reads The integration contour is prescribed by the Jeffrey-Kirwan residue [47]. The contributions to the classical part come from (mixed) CS terms. In particular, a pure CS and FI read z κ , z θ ξ , where ξ, θ, are the holonomy and flux associated to the topological U(1) symmetry. The contribution of a chiral multiplet with R-charge R is given by where the shifted R-charge B = − R + 1 is quantised. Finally the vector multiplet contribution is given by where we used the usual shorthand notation . We refer the reader to [16] for a detailed analysis of the integration contour in (3.1). Geometrically, the twisted index background is realised by gluing two solid tori twisted in the same direction so to realise the A-twist on S 2 . We then expect that also in this case the partition function can be expressed in terms of the universal blocks B 3d c . We begin by studying the free chiral with R-charge 0 and −1/2 CS unit (the tetrahedron theory). It is easy to see that by defining the A-gluing acting as we obtain the twisted index of the tetrahedron theory by A-fusing two 3d blocks with the factor z B/2 contributing the +1/2 CS unit. CS terms at integer level and FI terms can also be expressed as A-squares of the same blocks appearing in (2.20) where u = q θ/2 ξ. Finally also the vector multiplet can be factorised as in (2.21) (3.10) 9 Up to a factor (−1) α , see discussion in [16].

JHEP11(2015)155
From eqs. (3.6), (3.7), (3.8) and (3.9) it follows straightforwardly that for parity anomaly free theories the integrand is factorised Clearly one expects the result of the contour integral to take factorised form too. Indeed in [16] it has been observed that this is the case. For example it is an easy exercise to show that the SQED partition function can be written in terms of the 3d holomorphic blocks (3.12) We will not show the details of the computation because we will perform an almost identical computation for the S 2 × T 2 case in section 5.
In the end we can extend also to the twisted index case the identity suggesting that factorisation commutes with integration.

4d N = 1 lens index
In this section we consider N = 1 theories formulated on L r × S 1 . The lens index of a chiral multiplet of R-charge R and unit charge under a U(1) symmetry is [43] with where w is the U(1) fugacity and H the holonomy along the non-contractible circle of L r . I 0 (w, H) is the zero-point energy and the sign factor σ(H) is defined in (2.11). For a chiral multiplet in a given representation of a gauge group G and global flavour group, the lens index reads ρ,φÎ where z, ζ, are respectively the gauge and global fugacities associated to the Cartan, ρ, φ, the weights of the gauge and flavour representations, while , H, are respectively the gauge and background holonomies in the maximal torus, which can be represented by vectors with components in Z r . The gauge theory lens index is then obtained by summing over the JHEP11(2015)155 and integrating the matter contribution with integration measure given by the vector multiplet of the unbroken gauge group where α denote the gauge roots, and we defined with and zero-point energy If the gauge group has an Abelian factor we can introduce an FI term which contributes to the partition function as where we turned on also a background holonomy θ for the topological U(1) symmetry. As argued in [48] the 4d FI parameter ξ 4d r needs to be quantised. This allows the index, which is independent on continuous couplings, to actually depend on the FI parameter.
In the following we will show that by performing a modular transformation and cancelling the anomalies it is possible to express the lens index integrand in a very neat factorised form.

Chiral multiplet
Let us consider the index of a single chiral and introduce the following parametrisation where Q = ω 1 + ω 2 , and ω 3 = 2π β measures the (inverse) S 1 radius β. For convergence, we also assume Im > 0. Also, since it is going to appear quite often, we define the combination By using the modular transformation (A.61) and the reflection properties of the elliptic Gamma function (appendix A) we can rewritê The cubic polynomial Φ 3 (X) is defined in (A.11). As we will see in section 4.3, these polynomials contribute to the 4d gauge and global anomalies. In the above expression we introduced the function 10 and which can be factorised as where the 4d r-pairing acts according to rH , Notice that in the 3d limit ω 3 → +∞ R (or q σ → 0), we have with the quadratic polynomial Φ 2 (Q − X) in (4.13) contributing the correct half CS unit in 3d. The functionẐ 4d compatible with a superpotential term W ∝ Ψ 1 Ψ 2 for two chiral superfields Ψ 1,2 , which disappear from the IR physics. In the case r = 1,Ẑ 4d χ can be shown to reduce to the result for a chiral multiplet found in [39,50]. 11 We see that there are two natural ways to rewrite the lens index for a chiral where, in analogy with the 3d case, we defined the 4d holomorphic blocks for the anomaly free chiral We interpret the 4d blocks as partition functions on D 2 × τ T 2 σ , where = τ /R 1 is the cigar equivariant parameter and σ is the torus modular parameter. From (4.22) and (4.23) we see that the polynomials Φ 3 , Φ 2 , which we will identify with anomaly contributions, are obstructions to factorisation, while the anomaly free chiral indexes have a neat geometric realisation as 4d blocks glued through the 4d r-pairing (4.18), which implements the gluing of two solid tori D 2 × τ T 2 σ to form the L r × S 1 geometry. Similarly to the 3d case, 4d holomorphic blocks are annihilated by a set of difference operators which can be interpreted as Ward identities for surface operators wrapping the torus T 2 σ and acting at the tip of the cigar. For example for B 4d D we find 12 is the q-shift operator acting on x. The lens index is annihilated also by another equation for the tilde variables and similarly for B 4d . The existence of two commuting sets of difference operators annihilating the lens index indicates that it might be expressed in a block factorised form. Indeed we will shortly see that anomaly free interacting theories can also be factorised in 4d holomorphic blocks. We also expect that our 4d holomorphic blocks will be the building blocks to construct partition functions on more general geometries through suitable pairings. For example, in section 5 we will discuss the S 2 × T 2 case. 12 For the free chiral case, there is an apparent symmetry between qσ and qτ , for example we also have However there is a profound difference between qσ and qτ . This clearly visible if we realise these 4d theories as defects in 6d theories engineered on elliptic Calabi-Yau's. In that setup qσ corresponds to a Kähler parameter while qτ is related to the topological string coupling.

JHEP11(2015)155
We close this section by observing that our definition of the blocks B 4d D and B 4d N via factorisation or as solutions to difference equations suffers from an obvious ambiguity. It is clear that we have the freedom to multiply our blocks by q τ -phases c(x; q τ ) satisfying The first condition ensures that the c(x; q τ ) is a q τ -constant passing through the difference operator while the second condition ensures that these ambiguities disappear once two blocks are glued. 4d blocks for more complicated theories will be defined up to q τ -phases as well, which can be expressed as elliptic ratios of Theta functions.

Vector multiplet
Repeating the steps we have done for the chiral multiplet, we can also bring the vector multiplet contribution to the following form Z . Also in this case the prefactor of (4.30) is an exponential of a cubic polynomial contributing to the anomaly, which we will discuss in subsection (4.3). In the 3d limit ω 3 → +∞ R we havê matching the 3d vector contribution (2.7) with the identifications α(Z), α( ) = (iZ α , α ). It the case r = 1,Ẑ 4d V reduces to the contribution of the vector multiplet in [50]. By using the factorised form of the G function we can expressẐ 4d V aŝ In this form we immediately see that in the 3d limit q σ → 0,Ẑ 4d V matches the 3d vector contribution (2.21) (notice that Θ(x; 0) = 1 − x). We then define

JHEP11(2015)155
Other choices of B 4d vec are clearly possible. For example we can also writê which in the 3d limit q σ → 0 reduces to the 3d block (2.22).
Finally, we observe that the FI terms can also be naturally factorised as in 3d (2.20)

Anomalies and factorisation
We now return to the polynomials Φ 3 , Φ 2 appearing in the modular transformations (4.12), (4.30). We will see that their total contribution reconstructs the 4d anomaly polynomial. This interplay between modular transformations and anomalies was first observed in [49] (see also [50,51]).
Collecting the contributions of the chiral multiplets we find where we introduced the exponentiated flavour fugacities ζ = e 2πi ω 3 Ξ . Similarly, the vector contributes with a factor e −iπ α Pα , where In total we find where in the last step we further distinguished between local (gauge (G)) and global (flavour (F), R-symmetry (R) and gravity (g)) contributions.

JHEP11(2015)155
Gauge and mixed gauge anomalies. Collecting the various powers of Z we get GGG : GRR : GRF : Ggg : All these terms have to vanish on physical theories, leading to conditions on the R-charges and on the flavour fugacities.
Global anomalies. For the Z independent terms we have FFF : Fgg : Rgg : In [52] it was observed that partition functions on M 3 ×S 1 β have a divergent limit when the S 1 radius β shrinks to zero. The leading term is Tr where m is a real mass for the U(1) symmetry and r 3 the S 3 b scale. By using the asymptotics of Φ 3 , Φ 2 , it is not difficult to verify that (4.59) reproducing the expected universal divergent factor with the identifications β = 2π , the volume being rescaled by 1/r. Finally we consider the extra exponential quadratic terms appearing in the definition ofẐ 4d χ in (4.13). We already observed that in the 3d limit ω 3 → +∞ R , these polynomials contribute the expected half CS units. These polynomials are actually ω 3 independent, and for convenience we refer to their total contribution as 3d anomaly. Each chiral of weights where the sign ∓ depends on the choice (4.22) or (4.23) respectively. In total we find On physical 4d theories, where the 4d gauge anomaly is cancelled, the would be 3d parity anomaly is also automatically cancelled, namely in the 3d limit e −iπP 3d loc would contribute integer CS units. This implies that the factor e −iπP 3d loc can always be factorised in Theta functions as in (2.20).
We arrive at the conclusion that, on physical theories where there is no obstruction from anomalies, the lens index integrand can be expressed in terms of the holomorphic variables and arranged in the factorised form up to prefactors due to the non-dynamical anomalies. As we will see in some explicit case, for anomaly free theories we also have We are thus led to try to use the integrand Υ 4d to define 4d blocks via block integrals as in the 3d case. We will return to this in section 6.

JHEP11(2015)155
In [50] it was pointed out that the anomaly cancellation conditions are necessary to express the partition function on Hopf surfaces H p,q S 1 ×S 3 in terms of periodic variables (under S 1 shifts) consistent with the invariance under large gauge transformations.
To understand the effect of large gauge transformations at the level of the blocks, it is useful to look first at the semiclassical limit τ = R 1 → 0, where we remove the Ωdeformation on the disk by turning off the equivariant parameter ( → 0). In this limit the theory is effectively described by a twisted superpotential obtained by summing over the KK masses i R 1 and iσ R 1 due to the torus compactification of the 4d theory [53]. The contribution of a chiral multiplet to the twisted superpotential is given by This sum needs to be regularised, in appendix B.3 we briefly review how one can do that, the result is We can immediately identify in (4.65) the semiclassical limit of the anomaly free chiral (4.67) while P 3 contributes to the anomaly polynomial on R 2 × T 2 σ . As it will become important later on, we observe that while the twisted superpotential as defined in (4.64) is invariant under large gauge transformations being manifestly doubly periodic on the torus T 2 σ , i.e. invariant under a → a + i R 1 (σn + m), the regularisation produces polynomial terms which explicitly break the periodicity. Therefore the semiclassical analysis shows that anomalies represent an obstruction to the periodicity/gauge invariance of the superpotential. 13 We then see that the block integrands of anomaly free theories defined in (4.62), in the semiclassical limit are doubly periodic on the torus. In section 6 we will return to this point and see that at the quantum level the invariance under large gauge transformation will be preserved only up to q τ -phases.

SQED
We will now study two interacting theories to illustrate the general mechanism of factorisation. Our first example will be the U(1) theory with N f chirals and N f antichirals, with R-charge R and an FI terms (SQED). In this case the lens index reads where we parametrise the fugacities as with associated holonomies , H a ,H b . It is also useful to introduce the combinations We evaluate the lens index by taking the sum of the residues inside the unit circle at the poles where j, k ∈ Z ≥0 . The detailed computation is performed in appendix B.4, here we report the key steps. We first perform the modular transformation using (4.22) for the fundamentals and (4.23) for the antifundamentals, and we get a,bÎ (R) . (4.73) As we discussed, the modular transformation produces polynomials contributing to the global and local anomalies. The dynamical part of the 4d anomaly (P loc ) must vanish on this physical theory. In fact, as this theory is non-chiral, the GGG anomaly vanishes automatically, while the cancellation of the GGF anomaly requires the balancing of the U(1) flavour charges of fundamentals and antifundamentals

JHEP11(2015)155
In order to cancel the GGR anomaly the condition is 14 which fixes R = 1. For the vanishing of the GFF anomaly we must require The other anomalies also vanish without imposing any further constraint. What is left of the 4d anomaly is the global part (P gl ), which reduces just to the FFF term.
Since we used (4.22) for the fundamentals and (4.23) for the antifundamentals, the Z 2 terms in P 3d loc are automatically cancelled. We could have also used (4.23) (or (4.22)) for both fundamentals and antifundamentals as well. This would have led to a different but of course equivalent form of the integrand. Altogether the 3d anomaly contributions yield the global factor P 3d gl and a renormalisation of ξ 4d , θ, which are however trivial once we impose (4.74), (4.75), (4.77) and (4.78).
Finally we find as in 3d. Notice the integrand Υ 4d SQED in (4.80) could have been assembled by adding a 4d block B 4d D for each chiral and a block B 4d N for each antichiral plus the FI contribution. In this case the polynomial P 3d loc defined in (4.61) vanishes. Finally by taking the sum of the residues at the poles (4.72), we obtain 84) where the elliptic series N E N −1 is defined in (A.67). For r = 1 our result agrees with [18] (after a modular transformation). Notice that the cancellation of the GGF anomaly is related to the balancing condition (A.68) of the elliptic series, while the GFF anomaly cancellation to its modular properties (A.73). The sum over c runs over the supersymmetric vacua given by the minima of the the twisted superpotential discussed in the previous section.
It is easy to write down a difference operator for these blocks. We find that the elliptic hypergeometric series (A.67) is annihilated by the operator where for convenience we denoted we see that the blocks B 4d c are annihilated by the difference operator for c = 1, . . . , N f . As we have already noticed in the case of the free chiral, if we define the blocks B 4d c as solutions to this difference equation, with the additional requirement that their r-square reproduces the partition function (4.83), we still have the q τ -phases ambiguity. For example we can multiply the blocks by the elliptic ratio of Theta functions which satisfies c(q τ u 4d ; q τ ) = c(u 4d ; q τ ) and has unit r-square when the anomaly cancellation conditions (4.74), (4.75), (4.77), (4.78) are imposed. It is also easy to check that since Θ(q , eq. (4.90) has a trivial semiclassical limit. Indeed in general q τ -phases are not visible in the the semiclassical asymptotics.

JHEP11(2015)155
We conclude by checking the 3d limit of our results. At the level of the 4d blocks this amounts to take q σ → 0, yielding with the obvious identifications Notice that the 3d mass parameters are still restricted to satisfy the 4d anomaly cancellation conditions. As explained in [54], the reduction of the 4d index to 3d generates theories with the same gauge and matter content of the original theory but with a compact Coulomb branch and with non-trivial superpotential terms enforcing the restriction on the masses [54]. Moreover the relation between 4d and 3d FI parameters is consistent with a continuous 3d FI.

SQCD
We now move to the SU(2) theory with N f chirals and N f antichirals. The lens index reads We can collect the flavour fugacities and background holonomies into We also define where M a = (M a , −M b ) = −M b . In this notation the matter sector reads exactly the same as the SQED theory with the replacements a → a and b → b , the only differences being the different R-charge and the "reality" constraints X a = −X b , H a = −H b . The set of poles inside the unit circle we will sum over is also formally unchanged with respect to the Abelian case (4.72) because the vector does not bring any pole. The first step is to perform the modular transformation, which upon imposing the anomaly cancellation allows us to factorise the integrand as The GGF cancellation parallels the Abelian case. The GGR anomaly cancellation for SU(N c ). All other anomalies vanish without imposing further conditions. Also in this case we observe that the integrand Υ 4d SQCD in (4.98) can be obtained by adding a 4d block B 4d D/N for each chiral/antichiral plus the vector multiplet contribution. In this case however we need to take into account the polynomial P 3d loc which, once the 4d anomaly cancellation conditions are imposed, contributes a factor s 2 2 r to the partition function.
We then take the sum of the residues at the poles. The detailed computation is performed in appendix B.5, here we give the final result in the fully factorised form where we introduced the very-well-poised elliptic hypergeometric series defined in (A.74). For r = 1 our result agrees with [18] (after a modular transformation).

N = 1 theories on S 2 × T 2
We now turn to the manifold S 2 × T 2 which supports N = 1 supersymmetric theories with R-symmetry. To preserve supersymmetry the theories need to be topologically twisted on S 2 and the R-charges need to be quantised. This background has been studied in [39,40] and more recently in [16,41] and [55]. As in the twisted index case reviewed in section 3, the localising locus is parameterised by continuous variables Z in the Cartan and discrete variables in the maximal torus of the gauge algebra. The integer variables parameterise the quantised magnetic flux while z = e 2πiZ is a combination of the two holonomies on the torus. We also turn on analogous continuous and discrete variables for the non-dynamical symmetries. The partition function reads The contributions to the classical part come only from possible FI terms for U(1) factors

JHEP11(2015)155
The contribution of a chiral multiplet with R-charge R, U(1) fugacity z and flux h is given by 15 where we used the definition of Θ-factorials in (A.58) and defined B = h − R + 1. The vector multiplet contribution is given by 16 In the above expressions q σ = e 2πiσ is identified with the torus complex modulus and q τ = e 2πiτ with the angular momentum fugacity. By using that Θ(x; 0) = 1 − x, it is immediate to check that in the q σ → 0 limit the 1-loop contributions (5.3) and (5.4) tend to their counterpart on S 2 A × S 1 (up to the zero-point energy factor). Geometrically, the S 2 × τ T 2 σ background is realised by gluing two solid tori D 2 × τ T 2 σ twisted in the same direction yielding the A-twist on S 2 . We then expect that also in this case the partition functions can be expressed in terms of the universal blocks B 4d c fused with the A-gluing defined by As clear from our discussion on anomalies, the free chiral alone is not expected to factorise, we need instead to look at an anomaly free object, for example where we identified the holomorphic variable x with the combination x = z −1 q −h/2 τ . As expected showing that we need to multiply the anomaly free chiral by the factor z B/2 , which in the 3d twisted index limit we identified with a half CS unit, and by the zero-point energy. FI terms can also be expressed as A-squares as in (3.8). Similarly, the vector multiplet contribution can be obtained by fusing two 4d blocks B 4d vec (4.35) with The relation between our Theta function Θ(x; qσ) and the theta function ϑ1(x; qσ) appearing in [16,[39][40][41] is ϑ1(x; qσ) = iη(qσ)q 1 12 σ x − 1 2 Θ(x; qσ), η(qσ) = q 1 24 σ (qσ; qσ)∞. 16 Up to a zero-point energy contribution η(qσ) 2|G| α q 1 12 σ which can be absorbed in the integration measure. In [16] an extra (−1) α appears in the definition of the vector multiplet.

JHEP11(2015)155
So we arrive at the conjectured relation (5.10) The first equality states the factorisation of the integrand of the Coulomb branch partition function. This follows from the above discussion on chiral and vector multiplets. For anomaly free theories, the induced effective half CS units either cancel between chirals and antichirals or add up to integer values and can be factorised as in (3.8).
The second non-trivial equality states the factorisation of the S 2 ×T 2 partition function in terms of the very same 4d blocks B 4d c found in the L r × S 1 case. Let us explicitly check this relation in the SQED case. The partition function is given by where In this case the anomaly cancellation conditions are By using the definition of Θ-factorials in (A.58) it is easy to show that we can equivalently rewrite the partition function as with the SQED integrand defined in (4.80) with the identifications and The integration contour is prescribed by the Jeffrey-Kirwan residue which in this case simply amounts in taking the contribution from the simple poles associated to the fundamental matter (mod q Z σ ). Such factors have poles only for B c = + h c + 1 > 0, which are then at , Substituting s * = q /2 z * = q k 1 τ x c ,s * = q − /2 z * = q −k 2 τx c into (5.18), with the help of (A.58), (A.59), one can finally show that with the very same B 4d c defined in (4.84). This is result agrees perfectly with the expected result following our analysis. 17 The SU(2) case is essentially the same, since the vector multiplet does not bring new poles to the integrand. We define and with the same parametrisation as in (5.15). The anomaly cancellation requires As expected also the SQCD can be expressed in terms of the blocks B 4d c given in (4.102) (5.23)

4d holomorphic blocks
In this section we would like to develop a formalism to compute the holomorphic blocks from first principles by extending to 4d the 3d formalism introduced in [9]. We tentatively define 4d blocks via block integrals as where Υ 4d is the "square root" of the compact space integrand. As we have seen in sections 4.3 and 5, when there are no obstructions from anomalies it is always possible to factorise the compact space integrand. Alternatively one can assemble directly Υ 4d . For 17 In [55] it has been observed that by choosing an alternative set of integration contours the sum over fluxes truncates and, in certain special cases, only one term survives. In these special cases the S 2 × T 2 partition functions can be identified with the elliptic genera of N = (0, 2) theories.

JHEP11(2015)155
each chiral multiplet we insert a factor B 4d D or B 4d N and add the ratio of Theta functions associated to P 3d loc , to cancel the induced mixed CS units. We then add B 4d vec for each vector multiplet and in presence of U(1) gauge factors, we multiply by the FI contributions given in (4.39).
Before discussing the integration contour it is important to make the following observation. In section 4.3 we pointed out that as a result of invariance under large gauge transformations, block integrals are semiclassically doubly periodic on the torus T 2 σ . As we anticipated, at the quantum level there is a mild modification, that is under the shift s → sq σ the blocks are multiplied by q τ -phases with unit r, A-square, representing the intrinsic ambiguity in their definition.
For example consider the SQCD block integrand .
It is easy to check that the effect of the shift s → sq σ is simply to multiply the integrand by the q τ -phase To see this we observe that thanks to the anomaly cancellation condition a (Q − 2X a ) = 4Q we have for a ζ a = 1, a h a + 2N f − 4 = 0. As q τ -phases have trivial semiclassical limit, the doubly periodicity is indeed restored in the semiclassical limit. This observation will guide us in the definition of the integration contour. For example the SQCD block integrand (6.2) has poles at s = x c q k τ q n+1 σ and s =x c q −k τ q −n σ , k, n ∈ Z ≥0 . However our discussion indicates that we should restrict to a q σ period. Indeed a shift by q n σ (where n may be negative) would only multiply the integrand and the integrated result by a q τ -phase. We then suggest that the proper integration contour Γ c will encircle the poles located at s = x c q k τ coming from the fundamental chirals. Indeed it is easy to check that

JHEP11(2015)155
and integrating over Γ c we recover the SQCD blocks defined in (4.102) In general determining convergent contours could be quite delicate. For example the analogy with the 3d case suggests that by moving in the moduli space we could encounter Stokes walls where contours jump [9]. We leave the general discussion of integration contours to future analysis. However, we can check that our prescription works also in the SQED case, where blocks can be obtained by integrating the SQED integrand (4.79) along the contour Γ c encircling the poles located at z = x c q k τ Γc ds 2πis with B 4d c defined in (4.84). Notice that also in this case we are using the prescription to restrict to a q σ period. However, in this case the FI term explicitly breaks the periodicity already at the semiclassical level. Nevertheless we find that also in this case a q σ -shift has a trivial effect . (6.10) Indeed the second factor is a q τ -phase once we impose all the anomaly cancellations. The first factor also has unit square 12) since ξ 4d /r is integer on the lens index.
Summarising we have argued that for L r × S 1 (which includes S 3 × S 1 ) and S 2 × T 2 we have the following remarkable Riemann bilinear-like relations This identities seem to be quite ubiquitous for these backgrounds and it would be important to have a deeper understanding of their geometrical meaning. Riemann bilinear-like

JHEP11(2015)155
identities appear also in the analytic continuation of Chern-Simons theory [56] and in the the study of tt * geometries [24]. While 3d holomorphic blocks have been relatively well studied, here we have only initiated the study of 4d blocks and there are various directions to explore. For example it would be interesting to study the behaviour of 4d blocks under 4d dualities. It should be also fairly simple to re-derive our 4d block integrand prescription via localisation on D 2 × T 2 , however the general definition of integration contours seems quite challenging. Another aspect to investigate is the relation of 4d blocks to integrable systems and to CFT-like correlators. 3d block integrals have been identified with q-deformed Virasoro free field correlators in [57,58]. The possibility to interpret 4d block integrals as free field correlators in an elliptic deformation of the Virasoro algebra will be investigated in [59].

Acknowledgments
SP would like to thank T. Dimofte for collaboration on related topics. FN and SP would like to thank G. Bonelli and F. Benini for discussions. The work of FN is partially supported by the EPSRC-EP/K503186/1.

A.1 Bernoulli polynomials
The quadratic Bernoulli polynomial B 22 is Useful properties are We define the combination We also have The cubic Bernoulli polynomial B 33 is

JHEP11(2015)155
Useful properties are We define the combination We also have

JHEP11(2015)155
We can rewrite S 2,h in terms of the ordinary S 2 as follows. First of all, we can resolve the constraint n 2 − n 1 = h mod r as where [h] denotes the smallest non negative number mod r. 19 Then we can write (A.29) as where in the last step we used that in the denominator s ∈ [0, r − 1] < r so that s/r = 0. Substituting the actual expression (A.32) for f s,k , we finally get where we used the definition (A.17) of S 2 and repeatedly used the relation (A.15). It is easy to check the following reflection property From (A.34) we see that zeros and poles are located at zeros : poles : (A.36) for k, n ∈ Z ≥0 , which are all simple and distinct as long as ω 1 ω 2 is irrational. Using (A.26) we can obtain the factorised form exchanging ω 1 , ω 2 and reflecting the holonomy variable, so that S 2,h can be compactly represented as

JHEP11(2015)155
Notice we may remove the [·] inside the q-Pochhammer symbols because of the periodicity. Moreover, the asymptotic behaviour of S 2,h for X → ∞ can be deduced from (A.27) (A. 40) In the main text we need also to introduce an improved S 2,h , defined bŷ where σ(h) is a sign factor, namely σ(h) = ±1 depending on the value of h. Also, it is convenient to introduce the improved s b function In the particular case r = 1 (and hence h = 0), we obtain an interesting identity for the ordinary S 2 . In fact, for r = 1 the product in (A.29) is not actually restricted, and we obtain the relation 44) or, in terms of the modular parameter τ = ω 2 where we rescaled χ = X/ω 1 . This identity already appears in eq. (3.38) of [61], where 46) in their notation.

A.4 Elliptic functions
The short Jacobi Theta function is defined by where m ∈ Z ≥0 . We will be using the generalised modular transformation property of the

A.5 Elliptic series
Let us consider the elliptic hypergeometric series [63] This series is usually considered to be balanced, namely We now introduce the parametrisation q τ = e 2πiτ , q σ = e 2πiσ , x i = e 2πiX i , y j = e 2πiY j , (A.69)

JHEP11(2015)155
and study the modular properties of the series under Using the modular transformation property Θ(e 2πiX i ; e 2πiσ , e 2πiτ ) n Θ(e 2πiY j ; e 2πiσ , e 2πiτ ) n Once the balancing condition (A.68) i,j (X i − Y j ) = 0 is imposed, the series can be made modular invariant either by imposing or by a suitable transformation of the expansion parameter u.
Next, let us consider the very-well-poised elliptic hypergeometric series [63] N +1 E N (t 0 ; t; q τ , q σ ; subject to the balancing condition In this case, proceeding as above, it is easy to see that the series is automatically modular invariant.

B.1 Fundamental Abelian relation
The free chiral theory with −1/2 Chern-Simons units has a mirror given by the U(1) theory with 1 chiral and 1/2 Chern-Simons units (also for the holonomies). At the level of lens space partition functions the duality reads (up to a trivial proportionality constant)

JHEP11(2015)155
where we have also turned on the FI and θ terms. To prove this identity we evaluate the l.h.s. integral by closing the contour in the lower half-plane (assuming ξ > 0) and taking the sum of the residues at the poles of Z ∆ . By using (A.36) we can see that there are two sets of poles located at The integral is then given by The sum of the residues at the second set of poles is simply obtained by ω 1 ↔ ω 2 and ↔ r − , θ ↔ r − θ. Combining the two sums we see that the original integral (B.3) has the schematic form f r− +kr+j,j . (B.5) Since +kr runs from 0 to ∞ while r − +kr runs from 1 to ∞, we can replace r − → +1, set j = j + + kr, and write so that we find as expected

B.2 SQED lens space partition function
Here we compute the residues at the poles given in eq. (2.30) of the partition function Using (q n x; q) ∞ = (x;q)∞ (x;q)n , we get

B.3 Twisted superpotential
In this appendix we briefly review how the double sum defining the twisted superpotential (4.64) can be regularized in two steps, first regularizing the sum over m, and then JHEP11(2015)155 over n. 22 In order to regularise the sum over m, let us consider the exponential derivative  We regularize the other infinite sums by means of Hurwitz ζ-function 23 and we get 1 2πR 1 n≥1 π 2 3 + 2π 2 (nσ − iR 1 a) + 2π 2 (nσ − iR 1 a) 2 + n∈Z πR 1 2 a + i R 1 nσ 2 = P 3 (iR 1 a) . (B.25)

JHEP11(2015)155
The first line represent the global prefactor e −iπP 3d gl . In the second line the dynamical term e − 2πi (B.32) 24 It is understood that we are taking the residue of the a = c term.