Modular properties of full 5D SYM partition function

We study properties of the full partition function for the $U(1)$ 5D $\mathcal{N}=2^*$ gauge theory with adjoint hypermultiplet of mass $M$. This theory is ultimately related to abelian 6D (2,0) theory. We construct the full non-perturbative partition function on toric Sasaki-Einstein manifolds by gluing flat copies of the Nekrasov partition function and we express the full partition function in terms of the generalized double elliptic gamma function $G_2^C$ associated with a certain moment map cone $C$. The answer exhibits a curious $SL(4,\mathbb{Z})$ modular property. Finally, we propose a set of rules to construct the partition function that resembles the calculation of 5D supersymmetric partition function with the insertion of defects of various co-dimensions.


Introduction
The 5D supersymmetric gauge theories provide a nice testing ground for the study of higher dimensional gauge theories. By themselves the 5D supersymmetric Yang-Mills theories are not renormalizable, however one can study their UV completions. Some of the 5D supersymmetric Yang-Mills theories are closely related to N " 1 superconformal field theories which are believed to be consistent quantum field theories. The N " 2 5D supersymmetric Yang-Mills theory is unique and it is believed that its UV completion is the superconformal p2, 0q theory in six dimensions. By compactifying the p2, 0q theory on a circle of radius R 6 , the theory reduces to the five dimensional maximally supersymmetric Yang-Mills theory [1,2].
In such case the coupling constant can be expressed as , (1.1) this relation follows from the identification of the Kaluza-Klein modes in the p2, 0q theory with the instanton particles in the five dimensional theory as was suggested in [3,4]. Nonperturbative effects of the 5d theory provide nontrivial information about the 6d theory compactified on the circle. In this paper we study the N " 2˚5D supersymmetric Yang-Mills theory which corresponds to a vector multiplet plus a hypermultiplet in the adjoint representation with arbitrary mass M. We concentrate on the abelian version of the N " 2o n toric Sasaki-Einstein manifolds.
The simplest example of toric Sasaki-Einstein manifold is S 5 . The partition function on S 5 can be calculated via the supersymmetric localization technique pioneered in [5] and the result was obtained in [6,7,8]. In [7,9] the calculation of the partition function on S 5 for N " 2˚5D gauge theory has been discussed in the context of the p2, 0q theory on S 5ˆS1 . It is believed that the partition function on S 5 for N " 2˚5D gauge theory corresponds to a supersymmetric index counting BPS states of the p2, 0q theory on C 3 in the radial quantization. The corresponding supersymmetric index is known as the superconformal index, for six dimensional superconformal theories it was defined in [10].
The localization calculation for the five-sphere has been used afterwards for a variety of purposes. For instance, in the context of AdS/CFT this has been used to obtain the N 3 behavior of the free energy of the (2,0) theory [11]. Another interesting development has been the study of the structure of the 5d partition functions through the holomorphic blocks as in [12,13]. Finally, the authors of [14] proposed a definition of the non-perturbative topological string through the analysis of the five-sphere partition functions.
The study of the 5d partition function on other curved backgrounds was initiated in [15], in which the partition function for a family of five dimensional Sasaki-Einstein manifolds denoted Y p,q was calculated. Further calculations [16] show that the answer can be factorised in certain building blocks extending the results in [12,13]. Actually, Y p,q is just an example of a larger class of five dimensional manifolds known as toric Sasaki-Einstein (SE) manifolds. It is possible to define and calculate the partition function of a 5d theory on any toric SE manifold. This was done in [17] and also in that case the answer has a factorised form extending all the previously results on S 5 and Y p,q . Let us stress that all these results about factorisation are only checked for the perturbative sector and on simply connected manifolds. As for the instanton sector, in the literature the factorisation is taken as the definition and a first principle computation is absent.
Let us outline schematically the main idea. The building blocks mentioned above are associated with the so called closed Reeb orbits in the contact manifold X. In a neighborhood of such orbits, the geometry looks like C 2ˆǫ S 1 , whereˆǫ means that one imposes a twisted periodic boundary condition along the S 1 . The twisting is given by two Up1q's acting on the two factors of C with two equivariant parameters ǫ, ǫ 1 . In this notation, the factorisation has the structure (more precise formula will come later) where Z pert C 2ˆǫ S 1 is the perturbative part of the Nekrasov partition function computed on C 2ˆǫ S 1 , and β i is the radius of the S 1 . We denote by σ P h the Coulomb branch parameter i.e. the weight of the action by the maximal torus of the gauge group, we can take as a working definition for the perturbative part of the Nekrasov partition function the following infinite product 8 ź p,q"0`1´e 2πiβpσ`pǫ`qǫ 1 q˘, (1.2) but ǫ, ǫ 1 must be given a small imaginary part for the product to converge, a more careful definition is given in (A.36). The next step is based on a crucial observation by [14] where the authors express the perturbative part as a special function known as triple sine function and then use the known factorisation property proven in [18]. At the same time the perturbative part for general toric SE manifolds is expressed as a newly constructed generalized triple sine function, which can be written as a product within a lattice where C µ is a cone in R 3 , which is the image of the moment map of the torus action on the manifold, and Cμ is the interior of C µ . This infinite product can be regulated using Riemann zeta function, provided that the real part of ω is within the dual cone C _ µ . Then one can prove that S Cµ 3 factorises similarly into perturbative Nekrasov partition functions. Notice that, at least in the perturbative case, this factorisation follows roughly from the localisation property of certain differential operators, even though in this way, one misses some important Bernoulli factors.
The goal of this work is to extend the observed factorisation property of the partition function beyond the perturbative case. We limit ourselves to the case of a Up1q theory with an adjoint hypermultiplet of the mass M. The case with non-abelian theory is complicated and we present some short speculative comments in the conclusion. The full partition function in the abelian case can be calculated explicitly and recasted as the ratio of two double elliptic gamma functions. For the five-sphere case this observation was made in [14], here we can extend their result for all toric SE manifolds. We can write our result in a concise way as with the same notation used before. This result has been obtained through the introduction of another new special function called the generalized double elliptic gamma function. The factorisation property for this new function as well as other useful properties that are relevant for the present paper have been proved in [19]. The generalized double elliptic gamma function can be written as while a more precise definition is given in (A.37). This formula can be interpreted as product of ordinary double elliptic gamma functions associated to a subdvision of the cone. In this way, also for the case of the complete partition function we reach a factorised form expressed in terms of simple elementary blocks associated to the geometry of the cone. The fact that we can write the final answer in terms of generalized double gamma function is consistent with the 6D interpretation. Namely the generalized double elliptic gamma function can be written as infinite product where the product over k corresponds to the infinite tower of the Kaluza-Klein modes coming from the reduction on a circle and the identification of such modes with instantons.
Finally, we present another way to construct the full partition function which we interpret as a way to obtain a five dimensional toric SE manifold by gluing together a number of five-spheres after some appropriate surgeries. This was observed experimentally using the properties of the special functions. However the construction is also motivated by geometry and physics considerations. Gluing five-spheres together requires that we accounted for the degrees of freedom living on the co-dimension 2 and 4 locus where the gluing happens, indeed our rules for the construction involve some factors which look like supersymmetric indices for lower dimensional theories. This is very familiar in the context of supersymmetric defects, we will comment about some similarities with the structure found in the recent paper [20].
The paper is organized as follows: in section 2 we review the explicit form of the Nekrasov partition function for abelian N " 2˚theory on C 2ˆS1 . Section 3 presents the construction of the full non-perturbative partition function for the same theory on any toric Sasaki-Einstein manifold. In section 4 we study the properties of this partition function and suggest a set of rules to construct the answer, that suggests the geometrical interpretation mentioned above. In section 5 we give a summary of our results and list some open problems. We supplement the paper by two appendices: appendix A contains the summary of the properties of the special functions and appendix B collects the explicit formulas for the Nekrasov partition function for abelian N " 2˚theory on C 2ˆS1 .
2 The 5D full abelian partition function on C 2ˆǫ S 1 The main subject of this paper is the five-dimensional Up1q N " 2˚theory, i.e. the theory with a Up1q vector multiplet and one massive adjoint hypermultiplet of mass M. At a perturbative level the theory is free, i.e. there are no interactions at all and the perturbative partition function is reduced to a simple Gaussian matrix model. Nevertheless, there is non-trivial information in the non-perturbative sector, where we see the appearance of small instantons in the quantum dynamics of the theory that correct the behavior of the partition function. These small instantons have a stringy origin [21] and they are crucial for, say, the S 5 case, where there are no smooth Up1q instantons, thus these small instantons provide a UV completion for the 5d theory.
As explained in [22] the 5D N " 2˚theory can be obtained through a compactification of the 6d p2, 0q theory on an elliptic curve with twisted boundary conditions. Or from the M5 brane point of view, one imposes twists on both the worldvolume of the M5 brane and the directions transverse to it. The worldvolume then has four noncompact dimensions living in the Euclidean space R 4 « C 2 , where the coordinates 1234 are twisted by the parameters pq 1 , q 2 q, while the transverse R 5 « C 2 ' R 1 has coordinates 56789 twisted by the parameters pm{ ? q 1 q 2 , m´1{ ? q 1 q 2 q ' 1. The parameters q 1 , q 2 , m are eventually written in terms of the equivariant parameters ǫ, ǫ 1 and the mass M of the gauge theory.
The partition function for this theory can be computed with various techniques. In the language of geometric engineering, the theory is associated to a toric diagram where two external legs has been identified along one direction. The toric diagram for this theory (shown in figure 1) was introduced in [23], and the topological string partition function for the theory was computed in [24]. From the gauge theory point of view, the partition function for this theory on C 2ˆS1 was described in [25,26] and computed via equivariant localization in [27]. A mathematical proof of these results was recently established in [22]. The instanton part of the partition function was found to be Z inst C 2ˆS1 pm, Q, q 1 , q 2 q " exp « 8 ÿ n"1 Q n nm n pm n´qn 1 qpm n´qn 2 q p1´Q n qp1´q n 1 qp1´q n 2 q ff , (2.5) with q 1 " e 2πiǫ , q 2 " e 2πiǫ 1 , ǫ, ǫ 1 being the equivariant rotation parameters of C 2 mentioned previously. The parameter m is related to the physical mass of the adjoint M through m " e 2πiM . As is usual with instanton partition functions the quantity Q " e´2 πiβ , where β is the radius of the S 1 , plays the role of the instanton counting parameter. The expression (2.5) must be supplemented by a perturbative contribution, which is Q-independent. The perturbative partition function is given by 1 The full partition function Z full C 2ˆS1 " Z pert Z inst is the same as the index where J ij denote the rotation generators of SOp6q and R 1 and R 2 denote the two Cartans of Spp4q, the R-symmetry group, in an orthogonal basis. Equation (2.7) represents the superconformal index of the free p2, 0q six dimensional theory computed as a trace over the Hilbert space H obtained by quantization on C 2ˆǫ S 1 .
The full partition function can be written in terms of infinite products, or in terms of multiple elliptic gamma functions and multiple q-factorials. We describe this rewriting and other details about special functions in appendices A and B. We can write where we dropped certain pre-factors compared to (2.5), which consist of a product of ηfunctions. This is because the partition function suffers from some inherent ambiguity (which at the moment we do not know how to fix from the first principles 2 ), while dropping or keeping these additional η-functions does not affect the message of our paper.
In this formula the numerator corresponds to the contribution of the vector multiplet while the denominator is the contribution of the hypermultiplet. The numerator has a zero mode that needs to be removed or regularized, which is what we mean by writing the prime on G 2 . For technical reasons related to the presentation of the factorisation formulae used here, instead of removing the zero mode directly, we introduce a parameter δ to regulate the zero mode and write Formula (2.8) was already presented in [14], and up to some ambiguities concerning the prefactor of η-functions, which in our notation is the q-factorial, we find the same answer.

Geometry of the cone
In order to discuss the abelian partition function on toric Sasaki-Einstein manifolds we need to introduce some well known facts about these manifolds, for more detailed explanations the reader may consult [29,30].
Let X be a 5-manifold, the metric cone of X is given by CpXq " XˆR ŋ0 , with metric G " dr 2`r2 g X , r being the coordinate of the R factor. If CpXq is Kähler, then X is called Sasaki, and if CpXq is also Calabi-Yau, then X is Sasaki-Einstein (SE). A Sasaki manifold has in particular a so called K-contact structure, with a Reeb vector R which is obtained by applying the complex structure to rB r , the vector that scales r. On X there exists a transverse Kähler structure transverse to R which allows one to define a transverse Dolbeault operator, denotedB H . The orbits of R are generically not closed with the exception of a few isolated closed ones. In the neighbourhood of such closed orbit the geometry looks like C 2ˆǫ S 1 , with R along the S 1 direction. If there is an effective, holomorphic and Hamiltonian action of T 3 on CpXq, such that the Reeb vector is given by a linear combination of the torus actions, then X is called toric.
Let µ be the moment map of the three torus actions. The image of µ, i.e. C µ pXq " µpCpXqq will be a rational cone in R 3 , called the moment map cone. Many geometrical properties of CpXq as well as X can be read off directly from C µ pXq.
The moment map cone can be specified by giving its inwards pointing normals t v 1 , . . . , v n u, which we assume to be primitive (i.e. gcdp v i q " 1 @i). One can reconstruct X from C µ pXq, as shown by Lerman [31]. For X to be smooth C µ pXq must be good. The condition can be stated as follows [17]: For a cone in m dimensions, at every codimension 0 ă k ă m face of the cone, the inwards facing normals of the (hyper) planes intersecting along it, t v i 1 , . . . , v i k u, can be completed into an SLpm, Zq matrix. In particular, for 5D manifolds X, one needs to check the goodness at the intersections of two codimension 1 faces. That X being SE (or CpXq being CY) also translates to the so called 1-Gorenstein condition on the moment map cone. One way of stating this condition is that if there exists an integer vector ξ such that ξ¨ v i " 1 @i, then CpXq is Calabi-Yau.
A useful way of thinking about CpXq is as a T 3 fibration over the interior of the moment map cone, i.e. T 3 Ñ X Ñ C µ pXq˝. As we approach the 2d (resp. 1d, 0d) faces of C µ pXq, one (resp. two, three) of the torus fibers degenerate. The weight of the torus degenerating at a face is given by the norm(s) of the face.
The Reeb vector R is a linear combination of the three torus actions, so we can naturally represent it as a vector R P R 3 , i.e. R gives the weights of R. Then we obtain the actual manifold X by restricting C µ pXq to the plane R¨ y " 1 2 . We call this the base of the cone, and if R is within the dual cone of C µ pXq, then B µ is a compact polygon, and X is given by a T 3 fibration over the interior of the base, T 3 Ñ Bμ. An example, shown in figure 2 is the base of the so called X p,q manifold, where the different torus fibers degenerate as one moves towards the faces of the polygon, and at its vertices, only one S 1 remains. Figure 2: The polygon base of a polytope cone. Over the interior of the polygon there is a T 3 fiber, but over the faces the T 3 degenerates into T 2 , which further degenerate over the vertices to S 1 , drawn as the circles in the figure. These circles are the only generic closed Reeb orbits.
For a generic Reeb (by generic, we mean that the ratios of the components of R are irrational) its only closed orbits will be precisely located at the vertices of B µ pXq. As said already the neighborhood of each closed Reeb orbit can be identified with a solid torus C 2ˆS1 , which is twisted, i.e. we can present it as C 2ˆr 0, 2πβs{ ", with the identification where z 1 , z 2 are coordinates on C 2 . The twisting parameters of the solid tori are βǫ and βǫ 1 , β being the radius of the closed orbit. The parameters β, ǫ and ǫ 1 all depend on the Reeb vector, and appear in the factorised form of the partition function.
We proceed to explain how to extract certain SLp3, Zq matrices out of the moment map cone, and in particular, how to extract β, ǫ, ǫ 1 for each closed Reeb orbit. Consider one of the vertices of B µ pXq (corresponding to a 1d face of C µ pXq). At the vertex i, the two 2D faces with inward normals v i , v i`1 intersect, and we can order the two normals of the two 2d faces intersecting there such that detr x, v i , v i`1 s ą 0, where x is the generator of the 1d face. With this ordering and using the goodness of the cone, we can find a vector n i such that detr n i , v i , v i`1 s " 1, meaning that these three vectors form an SLp3, Zq basis. The two vectors v i and v i`1 , being the normal to the two faces, represent the torii has degenerated whereas n i represents the weight of the remaining non-degenerate circle. Expressing the Reeb vector in terms of this basis gives us where physically β i represents the radius of the S 1 and ǫ i , ǫ 1 i are the equivariant rotation parameters. This equation directly gives us the relation where we defined for vertex i of the base B µ pXq, an SLp3, Zq matrix, Written out explicitly

Factorisation of the perturbative partition function
In this section we write down the perturbative partition function for a simply connected 5D toric SE manifold X. These manifolds have a canonically associated Reeb vector R, and we also denote by ξ the 3-vector such that ξ¨ v i " 1 for all inwards pointing normals v i of the moment map cone C µ pXq. The partition function for the Abelian theory coupled to an adjoint hypermultiplet can be calculated using the procedure outlined in [17] based on supersymmetric localization, and the result can be expressed in a concise way as where S C 3 is the generalized triple sine function associated to a good cone C, and the prime means that we remove the zero mode. The generalized triple sine associated to C can be written as a product over all integer points inside C: where C˝is the interior of C and the product is understood to be ζ-regulated, see [17,19] for details. Notice that for S 5 , the moment map cone is R 3 ě0 and S C 3 becomes the usual triple sine function as we expect from [14].
The generalised triple sine function comes from the fact that in the localization computation we compute a super determinant of the operator´iL R`σ over theB H -complex. Here L R stands for Lie derivative along the Reeb vector. This operator shows up as the square of supersymmetry of cohomology complex for the vector multiplet. For the hypermultiplet the operator´iL R`σ is shifted by the mass iM and also ξ¨ R{2 arising from the difference of spin of the hyper complex compared with the vector complex. Notice that in the Abelian theory one sets the Coulomb branch parameter σ to zero, and´iL R`σ has a zero mode which must be excluded by hand. This explains the prime on S CµpXq 1 3 p0| Rq in (3.13). In what follows, instead of excluding the zero mode we set σ " δ and use δ as a regulator. Non-zero δ allows us to write our results in a simple factorised form, without the complications introduced by excluding a zero mode. Presumably we can think of non-zero δ as turning on a some sort of background field in order to regularize the theory.
The partition function (3.13) is shown in [17] to factorise: where we used the definition (3.13) for the various parameters contained in the expression. Here B Cµ 3,3 are the so called generalized Bernoulli polynomials, which are defined in appendix A. They are third order polynomials of their first argument, and depend on the geometry of the cone (and thus of the 5d manifold X). We introduce the notation where we use the abbreviation pe 2iπz |e 2iπa , e 2iπb q 8 Ñ pz|a, bq 8 to keep it more readable when the arguments get a bit too lengthy. Here, the group element g P SLp3, Zq acts on pz| Rq as a modular transformation.
With this notation and the matrices (3.11) defined from the cone, we can write the perturbative partition function (3.15) in a more suggestive form: (3. 16) This emphasizes that the various Nekrasov blocks are multiplied together with an appropriate SLp3, Zq transformation, read off from the geometry of the cone.
As a simple example, consider S 5 . The cone is the first octant in R 3 , and the three normals are r1, 0, 0s, r0, 1, 0s and r0, 0, 1s. Thus at vertex 1, the matrix is 17) and the corresponding block reads The other two blocks are permutations of this, and we find the usual factorisation property of the regular multiple sine function [18].

Constructing the full partition function
Starting from the rewriting that we made in equation (2.8) we know that the full partition function on flat space is, up to some ambiguities, given by G 2 functions: Inspired by the factorisation result in the perturbative case, to get the full partition function we would like to multiply together copies of Z full C 2ˆǫ S 1 , one coming from each distinct closed Reeb orbits in the geometry. For this we embed the matrices (3.11) into the SLp4, Zq through The element S together with SLp3, Zq generate all of SLp4, Zq. We let SLp4, Zq act as a fractional linear transformation on the parameters pz|ω 1 , ω 2 , ω 3 q in the following way. Introduceω " pω 1 , ω 2 , ω 3 , 1q as an embedding of ω into P 3 , and then define the group action where gω denotes ordinary matrix multiplication, and p q i denotes the i th component. We also let pg˚G 2 qpz| Rq " G 2`g¨p z| Rqb e the pull back of G 2 by the map induced by the g-action. Now we propose the following full partition function where the missing Bernoulli polynomials of the first factor will be determined shortly. The physical idea behind such a factorisation is that we can interpret each block as contributions from widely separated pointed instanton particles propagating along the closed Reeb orbits. Unfortunately, at the moment, we are not able to derive this statement from first principles.
As a guiding example, we consider S 5 again. At the vertex 1, the matrix K 1 is extended from (3.17), and so and the remaining factors of (3.20) are obtained by cyclic permutations. Now we invoke an important modularity property the double elliptic gamma functions G 2 enjoys: Guided by this relation , which we view as the factorisation result for the standard cone, we propose that the missing Bernoulli factor in (3.20) in the case of S 5 is e iπ 12 pB 4,4 pδ|ω 1 ,ω 2 ,ω 3 ,´1q´B 4,4 piM` ξ¨ R{2|ω 1 ,ω 2 ,ω 3 ,´1qq , where B 4,4 is a Bernoulli polynomial. Consequently Z full S 5 is also written in terms of G 2 : where ξ¨ R " pω 1`ω2`ω3 q{2. This is of course a previously known result of Lockhart and Vafa [14], which we now will go on to generalize.

Properties of the full partition function
The information contained in equation (3.20) can be repackaged into a new special function which generalizes the double elliptic gamma function to take into account the geometry of the cone where we want to study our theory. This function was called generalized double elliptic gamma function in [19] and we can think about it in the same way as we think about the generalized the triple sine (3.14), i.e. as a product over the cone: Due to the need to regulate the infinite product, we require Im ω to lie within the dual cone C _ . Taking the cone C to be the first octant in R 3 , corresponding to S 5 , one recovers the standard G 2 . This new G C 2 has the factorisation property where BĈ 4,4 is the Bernoulli polynomial associated with a 4-dimensional coneĈ, whose normals are tp v i , 0q, p 0, 1q| i " 1,¨¨¨, nu, where v i are the normals of C, i.e.Ĉ " CˆR ě0 . The proof of (3.23) is worked out in [19] and summarized in appendix A. It is quite curious that the parameters inside the various blocks, that we need to multiply together to get the full answer, enjoy the use of SLp4, Zq matrices instead of the SLp3, Zq ones. It would be nice to understand if there is any physical meaning about this observed modularity property.
For a simply connected toric SE manifold X, with moment map cone C, the full partition function for the N " 2 theory can be written in the very concise form Given that the full abelian partition function on the five-sphere is related to the superconformal index of the theory living on the worldvolume of a single M5 brane, it would be nice to understand if also the Sasaki-Einsten case might have an index interpretation.
Let us comment on the possible explanation for the appearance of B 4,4 factor. In the perturbative sector one has B 3,3 that leads to a σ 3 term in the Coulomb branch. This matches the 1-loop generation of the Chern-Simons term CS 5 (see e.g. [32]). More precisely, one finds the σ 3 term amongst the supersymmetric completion of CS 5 on curved space, with coefficients given by that of B 3,3 . If we naively replace σ 3 with ř n pσ`nq 3 , i.e. we sum over Kaluza-Klein modes, then ř n pσ`nq 3 " σ 4 matching the coefficient of BĈ 4,4 .

Gluing rules
We have shown that the full partition function is given by some G 2 's associated with certain cones as in (3.24), and it is therefore just a weighted product over all lattice points inside the said cone. In this section we present another way to construct the full partition function in terms of elementary blocks glued together according to a set of rules. We state upfront that combinatorially these rules are tautological : in that a weighted product taken in a cone can equally be done by first subdividing the cone into smaller ones and taking the product in each sub-cone. Overcounting can arise since lattice points on shared boundaries are counted multiple times, and our set of rules is just a way to keep track of such overcounting. As the construction pivots on subdivision of cones, we would like to start by clarifying a possible confusion in this regard. As is typical in the literature, for instance see [34], toric CY 3-folds are represented by the toric fans (see [35] for a fuller exposition), which are made of cones fulfilling certain conditions. The generators of the cones, which are primitive vectors of Z 3 can be chosen so that their first component is 1. Thus one often draws only the 2nd and 3rd components of generators. For example for CpY p,q q, the generators are v 1 " r1, 0, 0s, v 2 " r1,´1, 0s, v 3 " r1,´2,´p`qs, v 4 " r1,´1,´ps (4.25) see figure 3. In this presentation, resolution of singularity amounts to subdividing the cones and one often uses the trivalent vertex to represent the toric diagram in e.g. the topological p0,´2, 1q p3, 1, 1q p1, 1,´1q p0, 0,´1q Figure 4: The left panel is the base B of the moment map cone of Y 2,1 , the four normals are given in (4.25). A point pm, nq in the grid represents a vector p1, 0, 0q`mp1, 1, 0q`np1, 0, 1q. The right panel gives a subdivision of the cone. vertex formulation. We want to stress that the subdivision of this paragraph is not to be confused with the subdivision which we discuss later. To be more precise, for this paper we always work with the moment map cone, whose faces have normals v i . The subdivision of the moment map cone corresponds to gluing toric contact manifolds together along their common boundary which are represented by the added faces.

Subdivision of the cone and gluing construction of toric 5d manifolds
It is always possible to subdivide a good 3D cone C such that each smaller cone has three faces and the three normals form SLp3, Zq basis [35], furthermore, two such cones intersect at a collection of lower dimensional faces common to both (put more simply, the subdivision leads to a simplicial subdivision of the base of the cone). We call these cones good simplicial cones. Since we constantly draw the cone C by drawing its base B, the subdivision looks like figure 4. Recall that the G C 2 function is a weighted product over lattice points of the cone C. If C is a good simplicial cone, then it can be turned into the first octant of R 3 by an SLp3, Zq transformation and so the product gives the standard G 2 with some transformed parameters. For a general C, we subdivide it into good simplicial cones tC i u and the product (3.22) within C i gives a G C i 2 for each i. The overcounting mentioned above arises when, say, C i , C j share a 2D face, and so the lattice points on this face are counted twice, and must be corrected. Similarly the overcounting will also arise when a number of cones share a 1D face. The following set of rules gives us a systematic way of removing the overcounting.
We draw only the base B of the cone C, and the subdivision of C leads to a simplicial subdivision of B, which we represent using tri-valent graphs, see fig.5. In this figure each 2-simplex is dual to a tri-valent vertex, each 1-simplex is dual to an edge and an internal 0-simplex will be dual to a loop. We borrow a terminology from the topological vertex [34] Figure 5: Triangulation of the cone of Y 2,1 and the dual 3-valent graph. We warn the reader that this is not related to resolution of singularity, see the beginning of section 4. and describe a set of rules for the gluing procedure • To every trivalent vertex we associate a vertex factor • To each internal edge connecting two vertices, we associate a propagator factor P pM|ω p q " • Finally if the tri-valent graph has closed loops, we insert for each of them a loop factor LpM|ω l q " G 0 pδ|ω l q G 0 piM`R¨ξ{2|ω l q . (4.28) The parameters ω v , ω p , ω l are given as follows. Each edge of a trivalent vertex has an associated normal vector (the normal of the face this edge 'pierces'), and there is an ordering such that the normals form an SLp3, Zq matrix A´1 v " rv 1 , v 2 , v 3 s. The parameters associated to this vertex are then ω v " A v R. Equivalently, one can let x 1 , x 2 , x 3 be the three generators of the cone associated to the trivalent vertex, then one may write The propagators (internal edges) are dual to 2d cones, each such cone has two associated generators, say, x 1 , x 2 , then ω p is given by Finally for the loop factor, which is dual to a shared internal 1d face with generator x l , and the corresponding parameter is given by ω l " x l¨R . Putting together the V, P, L factors, one removes all the overcounting and each lattice point in the cone contributes exactly once to the product in G C 2 . Indeed, referring to the first picture of fig.6 where n good simplicial cones conjoin at an internal 1D cone, then the shared faces are double counted and the contribution (4.27) cancels the double count, as all the shared faces are dual to internal edges. In this process, the 1D cone in the middle is counted n times in (4.26), also removed n times by (4.27), and finally (4.28) restores it, since internal 1D cone are dual to loops. By contrast, in the second picture of fig.6 where n good simplicial cones conjoin along a 1D cone which is in the face of the original cone. Then the two outer faces are not overcounted, but we do not assign (4.27) to these two faces since they are not dual to internal edges. The shared 1D cone is counted n times by (4.26) but removed n´1 times by (4.27) and hence counted correctly. Indeed we do not assign (4.28) since this 1D cone is not dual to a loop. The third picture of fig.6 is treated in the same way. As said, these rules are quite tautological in itself, but we can also view the subdivision as a cutting, by means of an appropriate surgery, of the 5d manifold into pieces of topology S 5 . Each S 5 contributes 4.26, since as we recall the moment map cone of CpS 5 q " C 3 is a good simplicial cone. At the level of the path integral, the cutting is achieved by adding defects along the shared boundaries, with its own degrees of freedom that contribute factors of (4.27) and (4.28). We will comment briefly about this possibility in section 4.3.

Partition function for some simple Y p,q
In section 3.4 we constructed the full partition function by essentially reversing the factorisation of G C 2 into Nekrasov partition functions associated to C 2ˆǫ S 1 . In section 4.1 we give a reconstruction of G C 2 from some gluing rules. In this section we carry out the calculation on some simple Y p,q 's in detail, including the factorisation, as an atonement for not giving a self-contained rigorous proof about the factorisation property of G C 2 . We first sketch a proof of the factorisation of G C 2 . From the rules of previous section, one associates a G C i 2 factor to C i . With C i being good simplicial, one can factorise G C i 2 according to (A.38) into 3 standard G 2 's associated with the three 1D faces of the cone. We assemble these numerous G 2 's by grouping them according to the 1D cone they associate with. In this process massive cancellations will occur. In fact in the situation that a number of cones share a 1D cone we can list the following possibilities 1. The shared 1D cone is in the interior of the original cone C.
2. The shared 1D cone is contained in a 2D face of C.
3. The shared 1D cone is also a 1D face of C.  Figure 6: A number of good simplicial cones conjoining along a 1D cone. The first picture, the 1D cone is in the interior of C; in the second, it is on a 2D face of C; and at a 1D face of C in the third picture.
In each of these situations, one has a product of G 2 's associated with the 1D cone. In the first two situations the net contribution cancels that of (4.27), (4.28). While for the third situation, the product gives the factors of (3.23), one for each 1D cone of the original cone. This is essentially the proof of the factorisation (3.23), and is the strategy used in [19] applied to cones associated to simply connected toric SE manifolds. In the proof there, the 1-Gorenstein condition is used, but the proof can also be extended to the case of all good cones, with an ingenious use of the integral representation of G C m . This will be published separately [33].

Y 1,0
The moment map cone over Y 1,0 has the following inward pointing normals: v 1 " r1, 1,´1s , v 2 " r1, 1, 0s , v 3 " r1, 0, 1s , v 4 " r1, 0, 0s . This choice of normals are equivalent to (4.25) up to a cyclic permutation and an SLp2, Zq matrix r´2,´1;´1,´1s acting on the 2nd and 3rd entries of v i . As usual one has ξ¨ v i " 1 with ξ " r1, 0, 0s. Let the Reeb be given by R " rω 1 , ω 2 , ω 3 s. The subdivision of the cone into two good simplicial ones is done by adding another plane, either as in case A or as in case B indicated in figure 7.  Figure 8: The dual diagram of figure 7 showing the two different triangulations.
If we pick case A, the plane we add can be found to have the normal vector v 5 " r0, 1,´1s , (4.30) one obtains V IV that in the left panel of fig.6 there are exactly three good simplicial cones conjoining. Then the claim follows from (4.33). This kicks off an induction that will finish the proof. See the proof of prop.5.9 in [19] for the detail of the induction. Finally we are left with the G 2 's the likes of III, V I, and they fall into the case of the right panel of fig.6, which is already treated in the Y 1,0 case, and so will not be repeated here. They eventually contribute to the G 2 's associated with the southeast and northeast corners respectively. In conclusion, once we have treated all eight cones, we prove the factorisation formula The four G 2 's correspond to Nekrasov partition functions of C 2ˆǫ S 1 at southeast, northeast, northwest and southwest corner in fig.9 respectively.

Gluings and defects
In this section we make an attempt at explaining the geometric meaning of the subdivision that we used to construct the full partition function. This corresponds to gluing together a number of S 5 's through some surgery. This pattern has been inspired by the calculation of the five-sphere partition function. Recall that it is always possible to view a toric contact manifold as torus fibration over the base B µ pXq, and that the faces of B µ pXq correspond to S 3 or lens spaces S 3 {Z p . Also as the various tori must degenerate at the faces of the base, subdividing by adding lines introduces loci in the interior of the base where some tori degenerate. This essentially means that, when gluing together two triangles (S 5 's), along their common face (S 3 and the like), one removes from each DˆS 3 , and glue the boundaries together with a twist that exchanges the tori. This process is an analogue of the 'symplectic cut' for the toric symplectic manifolds [36], see also [37]. When we take the product over the cone we have to account for the now loci that appears in the interior of the cone using the prescription described in section 4.1. The result of the products over these loci can be expressed as a ratio of special functions with less parameters indicating the fact that they account for a lower dimensional system. It is quite curious that this objects are related to the object that appears when computing BPS indices of lower dimensional field theories. This lower dimensional field theories are new degrees of freedom localized at the various loci in the interior of the base. For this reason we conjecture that our construction has an interpretation in terms of supersymmetric defects.
Recently, there has been a proposal for computing the superconformal index of the p2, 0q theory with defects on the five sphere [20], see also the interesting discussion about codimension 2 defects in N " 2˚theories in [38]. Notice that these constructions are not the same as what we did, because we never inserted supersymmetric defects in our theory, instead we understand them as emerging from the type of geometry that we consider. Nevertheless it is quite interesting that the authors of [20] found that the 5d theory on the sphere can support two kinds of defects: those with codimension 2 and with codimension 4. The contributions that they account for the defect in codimension 2 and 4 are respectively very similar to the one that we found respectively for the propagator and the loop contributions. It would be nice to understand if there is any relationship with their construction.

Conclusion
In this paper we constructed the full partition function for the 5D Up1q N " 2˚theory for any toric Sasaki-Einstein manifold. The partition function is expressed in terms of the generalised double elliptic function G C 2 associated to the moment map cone C of the corresponding toric Sasaki-Einstein manifold. The construction is based on the factorisation properties of the perturbative partition function and the explicit form of the Nekrasov partition function for 5D Up1q N " 2˚theory on C 2ˆS1 . The full partition functions on toric Sasaki-Einstein manifolds have an intriguing SLp4, Zq modular property. Moreover we propose a set of gluing rules to obtain the partition function by cutting the corresponding toric Sasaki-Einstein manifold into pieces with S 5 topology and gluing them back together. This way of calculating the 5D partition function corresponds to the insertion of defects of various codimensions.
The most important result of this paper is that we have obtained the explicit form of the full partition functions for 5D supersymmetric gauge theories on an infinite family of manifolds with different topology. We believe that we have observed only the tip of the iceberg and further study is required, especially on the structures of the partition function and the different possible surgeries of 5D manifolds. This may open the possibility to calculate the corresponding partition functions also on manifolds without the full toric symmetry.
In the flat space C 2ˆS1 the 5D Up1q N " 2˚theory is the reduction of abelian 6D (2,0) theory. The partition function on S 5 can be interpreted as the superconformal index for abelian 6D (2,0) theory in radial quantization of C 3 . In this case C 3 is non-singular cone over S 5 . For a general toric Sasaki-Einstein manifold the corresponding cone is a singular Calabi-Yau cone (actually we do not consider the tip of the cone as a part of geometry). It is very suggestive to think that our calculation is related to the index calculation of abelian 6D (2,0) theory on this Calabi-Yau cone. Although due to the singular nature of the cone it is not entirely clear how to perform the radial quantization.
Finally let us present some highly speculative comments about the non-abelian theory. At the moment it is not possible to sum up the different instanton contributions for nonabelian theories and present the result as some nice special function. However we believe that many structures presented in this paper will persist, especially the gluing procedure which involves S 5 pieces, in light of some results of [39]. The geometrical manipulations should be consistent with the factorisation properties of the partition function. However in non-abelian case it is natural to expect more complicated fusion rules.

A Special Functions
We give all necessary definitions of the special functions we employ, but we do not list all their properties and functional equations. For more details, we refer the reader to [18,19].
The q-shifted factorial is a function defined as where the infinite product converges absolutely when Im ω j ą 0 @j. Note that we here use an abbreviation and write pz|ωq 8 instead of the more common notation pe 2πiz |e 2πiω 0 , . . . , e 2πiωr q 8 . For other regions of parameters ω i , it is defined differently, when Im ω 0 ,¨¨¨, Im ω k´1 ă 0 and Im ω k ,¨¨¨, Im ω r ą 0, we define pz|ωq 8 " tpz´ω 0´¨¨¨´ωk´1 |´ω 0 ,¨¨¨,´ω k´1 , ω k ,¨¨¨, ω r q 8 u p´1q k " # 8 ź j 0 ,¨¨¨,jr"0 p1´e 2πiz e 2πip´ω 0 pj 0`1 q´¨¨¨´ω k´1 pj k´1`1 q`ω k j k`¨¨¨ωr jrq q This function satisfies a variety of different functional equations, for details see [18,19]. From the multiple q-factorial we define the multiple elliptic gamma functions G r as G r pz|ω 0 , . . . , ω r q " tpx|qq 8 u p´1q r px´1q 0 q 1¨¨¨qr |qq 8 , (A. 37) where x " e 2πiz and q " pe 2πiω 0 , . . . , e 2πiωr q. The hierarchy of G r functions include the well known theta function θ 0 (r " 0) and the "usual" elliptic gamma function. The G r functions satisfy a number of nice functional equations, see [18] for full details. Here we just mention a few most important ones, such as G r pz`ω j |ωq " G r pz|ωqG r´1 pz|ω 0 ,¨¨¨, ω j´1 , ω j`1 ,¨¨¨, ω r q , and the following nice modular property pr`2q! B r`2,r`2 pz|pω,´1qq where B r`2,r`2 is a multiple Bernoulli polynomial, defined below. One other special function that appears in the computation of the perturbative part of the partition function is the multiple sine functions, denoted S r and defined as S r pz|ω 1 , . . . , ω r q " ź nPZ r ě0 pz`n¨ωqpω 1`. . .`ω r´z`n¨ω q p´1q r , (A. 39) where the infinite product is understood as being zeta-regulated. This hierarchy of functions are a generalization of the normal sine, which is included as the r " 1 case, and they also satisfy multiple nice functional equations [18]. For our purposes, the most important property is the factorisation property, where q k " pe 2πiω 1 {ω k , . . . , e 2πiω k {ω k , . . . , e 2πiωr{ω k q. This is of course closely related to the modular property of the G r functions above.
In these formulas, the multiple Bernoulli polynomials show up. These are defined by the generating series z r e zt ś r j"1 pe ω j t´1 q " and of course also satisfies a variety of functional equations.

A.1 Generalized multiple sine and multiple elliptic gamma functions
For a rational convex cone C Ă R r we define the generalized versions of the above functions by taking the product over all integer points inside the cone, rather than over R r ě0 as above. Explicitly, for the generalized multiple sine functions we define where C˝is the interior of the cone, and again the products are understood as being zetaregulated. The mathematical details of this can be found in [19]. Similarly, for the generalized multiple gamma functions associated to C we define them as Comparing with the original definitions one sees restricting the second product to be over the interior of C is the generalization of the shift of ω 1`. . .`ω r that appears in the usual definitions. It is clear that if C " R r ě0 these functions agree with the usual ones. These generalized functions also enjoy some functional relations, see [19].
Most notably, the G C r´1 functions have a modular property with one factor coming from each 1D face of C, G C r´1 pz|ωq " e where SK i are the SLpr`2, Zq matrices associated to the cone as described in section 4, and pSK i q˚acts as a fractional linear transformation on the arguments of G r , according to (3.19). BĈ r`1,r`1 is the generalized Bernoulli polynomial associated to the coneĈ " CˆR ě0 . This equality generalizes the modularity property of the normal G r functions shown in equation (A. 38), and is what gives us the factorisation of the partition function. Similarly, the generalized multiple sine has an infinite product representation with one infinite product coming from each 1d face, as where pz|ωqK i 8 is the multiple q-factorial with transformed arguments defined by pz| Rq g 8 "`z pg Rq 1ˇp g Rq 2 pg Rq 1 , pg Rq 3 pg Rq 1˘8 , g P SLp3, Zq and where the group elementsK i are defined from the cone as in equation (3.11). Again we here abbreviate, writing pz|a, bq 8 instead of pe 2πiz |e 2πia , e 2πib q 8 for readability. Appearing in these formulas are the generalized Bernoulli polynomials defined by generalizing the definition of the usual ones, through the formal generating series p´1q r z r e zt ÿ nPCXZ r e tpn¨ωq " 8 ÿ n"0 B C r,n pz|ωq t n n! .
(A.46) B C r,r in particular is a polynomial of degree r in z, which encodes various geometric information about the cone.
In the final step we use properties of the multiple q-factorials to rewrite it so that the denominator can be recognized as a G 2 -function. Similarly the perturbative part is written as Z pert C 2ˆS1 " exp « 8 ÿ n"1 pq 1 q 2 q n n m n´1 p1´q n 1 qp1´q n 2 q ff "`q 1 q 2 |q 1 , q 2 q 8 mq 1 q 2 |q 1 , q 2 q 8 " pq 1 q 2 |q 1 , q 2 q 8 pm|q 1 , q 2 q 8 pm|q 1 q 8 pm|q 2 q 8 1´m .
We note here that slightly different versions of this expression is found throughout the literature: this reflects an ambiguity in the calculation, that we do not know how to properly fix. Combining the two factors, and applying properties of the q-factorials as well as recognizing the G 2 -functions, we have that the full partition function is given by Z full " pq 1 Q|q 1 , q 2 , Qq 8 pq 2 Q|q 1 , q 2 , Qq 8 G 2 pM|ǫ 1 , ǫ 2 , τ qˆp q 1 q 2 |q 1 , q 2 q 8 pm|q 1 q 8 pm|q 2 q 8 1´m " pm|q 1 q 8 pm|q 2 q 8 p1´mq 1 G 2 pM|ǫ 1 , ǫ 2 , τ q p1|Q, q 1 , q 2 q 8 pQ|Q, q 2 q 8 p1|q 1 , q 2 q 8 pQq 1 q 2 |q 1 , q 2 , Qq 8 pQq 2 |q 2 , Qq 8 pq 1 q 2 |q 1 , q 2 q 8 " pm|q 1 q 8 pm|q 2 q 8 pQ|Qq 8 pq 1 |q 1 q 8 pq 2 |q 2 q 8 p1´mq where q i " e 2πiǫ i , m " e 2πiM and Q " e 2πiτ . Here, we are somewhat careful with the zero modes: up until canceling a single zero mode in the last step (i.e. in writing G 1 2 ), they all cancel between the different functions, making the whole expression well-defined. One can note here that pQ|Qq 8 , pq 1 |q 1 q 8 and pq 2 |q 2 q 8 are usual η-functions, up to an overall exponential factor, and that pm|q i q 8 similarly is kind of a shifted η-function.