5d Partition Functions with A Twist

We derive the partition function of 5d ${\cal N}=1$ gauge theories on the manifold $S^3_b \times \Sigma_{\frak g}$ with a partial topological twist along the Riemann surface, $\Sigma_{\frak g}$. This setup is a higher dimensional uplift of the two-dimensional A-twist, and the result can be expressed as a sum over solutions of Bethe-Ansatz-type equations, with the computation receiving nontrivial non-perturbative contributions. We study this partition function in the large $N$ limit, where it is related to holographic RG flows between asymptotically locally AdS$_6$ and AdS$_4$ spacetimes, reproducing known holographic relations between the corresponding free energies on $S^{5}$ and $S^{3}$ and predicting new ones. We also consider cases where the 5d theory admits a UV completion as a 6d SCFT, such as the maximally supersymmetric ${\cal N}=2$ Yang-Mills theory, in which case the partition function computes the 4d index of general class ${\cal S}$ theories, which we verify in certain simplifying limits. Finally, we comment on the generalization to ${\cal M}_3 \times \Sigma_{\frak g}$ with more general three-manifolds ${\cal M}_3$ and focus in particular on ${\cal M}_3=\Sigma_{\frak g'}\times S^{1}$, in which case the partition function relates to the entropy of black holes in AdS$_6$.


Introduction and summary
There has been tremendous progress in obtaining exact results for supersymmetric gauge theories in various numbers of spacetime dimensions. These computations typically involve protected observables, which may be studied using non-renormalization theorems or, in the case of partition functions on compact manifolds, the localization technique [1,2]. These results have opened new windows on quantum field theories and dualities between them. Moreover, they have shown how theories in different dimensions are intricately interrelated. Often, subtle properties of a theory, such as its dual descriptions or space of marginal parameters, can become obvious when we embed this theory into a higher-dimensional framework.
In this paper, we extend the list of exact observables by computing the partition function of arbitrary 5d N = 1 gauge theories on manifolds of the form M 3 × Σ g , i.e., a product of a three-manifold and a genus-g Riemann surface. We will focus mainly on the case M 3 = S 3 b , the "squashed sphere," but we also discuss other cases. This is an interesting observable for a variety of reasons. First, five-dimensional quantum field theories are a fascinating arena with many counter-intuitive properties, and thus exact results can lead to valuable new insights. Although 5d gauge theories are infrared trivial, in many cases they are believed to arise as a relevant deformation of nontrivial UV SCFTs, which we may probe by computing suitable quantities protected under RG flows. In particular, there have been many such exact results for partition functions of these theories on closed manifolds; see [3,4] for recent reviews and many examples and references. These results can be used to study interesting and subtle properties of these theories, such as the appearance of enhanced global symmetries at the SCFT point [5]; see, e.g., [6]. Then we expect the exact partition function on S 3 b × Σ g to lead to further probes into these 5d theories.
However, the observable Z S 3 b ×Σg in particular is interesting because of its various connections to quantum field theories in other spacetime dimensions. In the remainder of this Introduction, we briefly review some of these features and summarize our main results.
The higher dimensional A-model and 2d TQFT. The first important connection is to two-dimensional QFT, and it is this connection which makes the computation of the partition function possible. Specifically, the background we consider involves a topological twist along Σ g . Higher-dimensional theories compactified on Σ g with a partial topological twist have been well-studied in recent years [7][8][9][10][11][12][13]. These computations can be expressed as observables in a certain 2d topological quantum field theory (TQFT), namely the topological A-twist [14] of the effective theory obtained by compactification of the higher dimensional parent theory.
Here we take a similar approach, and study the effective 2d N = (2, 2) theory obtained by compactifying a 5d N = 1 theory on M 3 × R 2 . As described in Section 2, the result for M 3 = S 3 b takes the form of a sum over supersymmetric "Bethe vacua" of this 2d theory, 1 Z where the objects are refered to as the "flux operator" and "handle-gluing operator," respectively, and are built in terms of the effective twisted superpotential, W S 3 b ×R 2 , and the effective dilaton, Ω S 3 b ×R 2 , controlling the low energy effective theory on the 2d Coulomb branch. Finally, the set of supersymmetric Bethe vacua of the theory, S BE , is defined as the solutions to certain Bethe-Ansatz-type equations, which may be written as One novel feature of the five-dimensional computation, relative to lower-dimensional setups, is that the effective action controlling the 2d TQFT includes nontrivial nonperturbative corrections. That is, we may write the effective twisted superpotential as W S 3 b ×R 2 (u, ν, γ) = W pert S 3 b ×R 2 (u, ν, γ) + W inst S 3 b ×R 2 (u, ν, γ) , (1.4) and similarly for the effective dilaton Ω S 3 b ×R 2 . In particular, these depend on the gauge coupling, g 5 , through a parameter γ = − π(b+b −1 ) g 2 5 , with the perturbative piece dominating for small g 5 .
Let us first state our result for the perturbative contribution, for definiteness. Consider a 5d N = 1 gauge theory with gauge group G, hypermultiplets in a representation R = i R i , and with a 5d CS term corresponding to the gauge-invariant functional Tr CS (·) on the Lie algebra of G. Then we may write the various operators above to perturbative accuracy as: Π pert a ma Π pert i n i e 2πi(g−1)Ω pert = e −πiTr CS (mu 2 )+2πiγTr(mu) 1) , (1.5) which are expressed in terms of the double sine function [15,16], and we define Q = 1 2 (b + b −1 ). 2 The above result is very reminiscent of the integrand of the S 3 b partition function of a 3d N = 2 theory [16], and we comment on this relation below.
However, as mentioned above, there are also non-perturbative contributions from instantons. To compute these, we take a detour into equivariant localization on the space S 3 b × S 2 . This is an uplift of the S 2 1 × S 2 2 partition function of [17], which receives contributions from point-like instantons. This allows us to extract the non-perturbative contributions to the effective action. We find that the full twisted superpotential and dilaton can be written in terms of the Nekrasov-Shatashvili (NS) limit of the 5d instanton partition function [18]. Namely, the latter has the following asymptotic behavior as we take one of the equivariant parameters to zero [19]: (1.6) Then we may write the full, non-perturbative twisted superpotential and dilaton of the theory on S 3 b × R 2 as: Although in principle this gives the complete answer, in practice it is difficult to compute the non-perturbative corrections in a useful form, and so we will mainly focus on various simplifying limits where the instanton contributions can be explicitly characterized. Finally, we comment that the form of (1.7) as a sum of two contributions is closely related to the factorization of the S 3 b partition function of 3d N = 2 theories into two holomorphic blocks [20], which are associated to the solid tori in the Heegard decomposition of S 3 . Our result then naturally generalizes to the case of M 3 × Σ g for arbitrary lens spaces, M 3 = L(p, q). In Section 5 we briefly comment on this generalization in the case of M 3 = S 2 × S 1 , with a topological twist on S 2 , and point out an interesting relation to the 5d prepotential.
Large N limit and universal RG flows to 3d. As we discuss in detail in Section 3, the large N analysis of the matrix model computing the S 3 b × Σ g partition function reveals an interesting structure. In particular, we will show that to leading order in N the twisted superpotential W described above as well as the free energy, F = −Re log Z, are specified by the S 5 partition function of the same theory. In particular, we find the large N relation where the function F κ (n) is given explicitly in (3.45) and generically depends on the theory under consideration. The case of the universal twist, however, is special [21]. This corresponds to a topological twist along the exact superconformal R-symmetry in the UV, in this case the Cartan of SU (2) R , which amounts to setting n = 0. In this case, and setting κ = −1, the relation above becomes universal: (1.10) These large N results have an interesting interplay with holography. Indeed, the relation above was predicted in [21] (for the round sphere, Q = 1) to hold for any 5d N = 1 theory with an AdS 6 dual using properties of 6d supergravity. Our result is a field theory derivation of this relation. For nonzero flavor fluxes, the relation is no longer universal and one must consider specific theories. The holographic description of the twisted compactification of the Seiberg theory with flavor flux was recently constructed in [22]. Specifying the above formula to this case we recover the results of this reference as well.
Similar universal relations hold for the case Σ g 1 × Σ g 2 × S 1 , which is described holographically by black holes in asymptotically locally AdS 6 . We discuss this case in Section 5.
The interplay with holography goes both ways. While the twisted partition functions can be computed exactly by the localization methods we describe, these are not always well suited to answering dynamical questions, such as the existence of interacting fixed points in the IR. The explicit construction of holographic RG flows such as the ones described above then indicate the existence of interacting IR fixed points, at least at large N .
5d −→ 6d −→ 4d. One of the surprising features of QFTs in five dimensions is that there are examples of 5d effective theories whose ultraviolet completion is not itself a 5d QFT, but rather a 6d theory where one of the dimensions has been compactified on a circle, S 1 β , with radius β. Here one identifies, roughly, β ∼ g 2 5 . (1.11) In particular, the KK excitations of this compactified theory, with action proportional to β −1 , can be naturally identified with instanton configurations in the low energy -5 -5d gauge theory. The prototypical example of this phenomenon is the maximally supersymmetric N = 2 super Yang-Mills theory in 5d for a gauge group of ADE type, which is believed to be equivalent to the S 1 compactification of the N = (2, 0) SCFT associated to the corresponding Lie algebra. Given the above discussion, we expect that the 5d partition function on S 3 b × Σ g computes the partition function of the corresponding 6d UV theory on S 3 b × Σ g × S 1 β . Then, compactifying the 6d theory on Σ g with flavor fluxes n, we may obtain a 4d theory, T (4d) Σg,n , and then we may also interpret this partition function as computing its S 3 b ×S 1 β partition function, better known as the "supersymmetric index," 3 of this theory, (1.12) Here the precise mapping of parameters is given in (4.7) below. There has been much work on understanding the compactification of 6d SCFTs on a compact Riemann surface, and the 4d N = 1 and N = 2 SQFTs that one obtains as a result. This began with the work of Gaiotto on the compactification of the A-type N = (2, 0) theory on a punctured Riemann surface, with a twist preserving N = 2 supersymmetry in 4d, leading to the celebrated theories of class S [23]. Subsequently this has been generalized in many directions, including compactifications of D and Etype N = (2, 0) SCFTs, compactifications preserving only 4d N = 1 SUSY [24,25], and, more recently, compactifications of 6d N = (1, 0) theories, leading to new classes of 4d N = 1 theories and dualities [26,27]. Many of these 4d theories have the property that they do not have known Lagrangian descriptions, and so more indirect methods are required for studying their properties and computing observables, such as their supersymmetric index.
However, these 5d QFTs, which are believed to be low energy descriptions of the 6d SCFTs on a circle, typically do have Lagrangian descriptions, and so we may, in principle, directly compute their S 3 b × Σ g partition function by the methods outlined above. In practice, we will perform these computations in certain simplifying limits, namely, large N , and large gauge coupling. By (1.11), the latter limit corresponds to large radius β. In the 4d index, the large β limit is dominated by the "Casimir energy" of the vacuum state of the 4d theory quantized on S 3 b . In these limits the instanton contributions are under better control, and so analytic evaluation of the index is possible. In addition, in the case of the maximal N = 2 SYM theory, there is a special limit of parameters with additional supersymmetry, and where the instanton contributions are greatly simplified, and we will also be able to evaluate the index analytically in this limit. This turns out to be closely related to the "Schur" [28] and "mixed Schur" [29] limit of the superconformal index.
In all of these cases, we will find strong consistency checks of our computations by comparing to expected properties of the 4d index of the above theories. We stress that our computation in principle gives a new approach to computing the index of 4d theories without a known Lagrangian description. The form of the computation is in terms of the 2d TQFT dual to the 4d index of these theories, and so manifestly exhibits various 4d dualities, such as S-duality.
Outline. The paper is organized as follows. In Section 2 we provide the derivation of the exact partition function by localization methods, as described above. In Section 3 we study the large N limit of the S 3 b ×Σ g partition function, its relation to the partition function on S 5 in this limit, and discuss universal RG flows and holography. In Section 4 we consider theories with a 6d UV completion and compute the 4d superconformal index of theories obtained by reduction on the Riemann surface. Finally, in Section 5 we discuss the partition function on more general manifolds, including S 2 × S 1 × Σ g , and discuss the counting of black hole microstates in AdS 6 .
Note added: In the final stages of this work we learned about the work [30], which has some overlap with our discussion in Section 5.
2 Derivation of partition function on S 3 b × Σ g In this section, we derive the exact partition function of 5d N = 1 gauge theories on S 3 b × Σ g , with a partial topological twist on Σ g . We discuss different ways of carrying out the computation, which are complementary to each other and offer different points of view on this observable.

5d N = 1 theories on curved backgrounds
Let us first review some basic properties of 5d N = 1 supersymmetric gauge theories in flat, Euclidean space, in preparation for studying them on curved backgrounds. The 5d N = 1 Yang-Mills action can be obtained by dimensional reduction from 6d N = 1 on R 5,1 , and is given by [3] is the gauge field strength, σ is a real scalar, Λ I is the symplectic Majorana gaugino, and D IJ is an auxiliary scalar field. The indices I, J = 1, 2 correspond to the SU (2) R symmetry, and we impose the symplectic Majorana condition, -7 -where α = 1, ..., 4 is the spinor index, which corresponds to the fundamental representation of U Sp(4) ∼ = Spin(5).
As will be important below, these theories are closely related to 4d N = 2 theories, which are obtained upon dimensional reduction, and as for 4d N = 2 theories their actions can be written in terms of a holomorphic prepotential, F(A). In a notation adapted to reduction to 4d, this can be written as where W i and A i are the usual 4d N = 1 chiral superfields making up the 4d N = 2 vector multiplet, and the complex scalar in the 4d vector multiplet can be identified with where A 5 is the fifth component of the 5d gauge field. Then the most general action in 5d can be written in terms of a cubic prepotential [5,31], where g 5 is the 5d gauge coupling, and the cubic term defines a 5d Chern-Simons term, which may be included for certain choices of gauge group G.
In addition to the vector multiplet, we may include hypermultiplets. Their field content consists of complex scalars q A I and spinors ψ A , where I is the SU (2) R index, as above, and A is a gauge or flavor index, for which we assume the matter is in a psueudoreal representation, R = i R i . These are taken to satisfy reality conditions, These give rise to 4d N = 2 hypermultiplets upon dimensional reduction. We may also turn on background vector multiplets coupled to flavor symmetries, and including a background value, m i , for the real scalar in these multiplets gives a supersymmetric real mass for hypermultiplets charged under this symmetry. Integrating out these massive hypermultiplets gives rise to a simple correction to the prepotential (2.5) [5,31], where the latter expansion may be made for different asymptotic directions on the Coulomb branch, and defines the effective gauge coupling and Chern-Simons terms which are generated there.
-8 -5d N = 1 supersymmetry on curved spacetimes. There has been much work on placing 5d supersymmetric theories on curved spacetimes and computing their partition functions by localization. Some examples include S 5 [32][33][34], CP 2 × S 1 [35], Y p,q [36], and S 4 ×S 1 [6]; see [3,4] for recent reviews, and many additional references. In addition, maximally supersymmetric 5d Yang-Mills theory was studied on S 3 × Σ g in [37][38][39], although our result appears to differ from theirs. 4 To write supersymmetric actions on such manifolds, we can employ the philosophy of [40] and consider a rigid limit of 5d N = 1 supergravity. Such an approach was studied in [41][42][43]. In particular, in [43] it was shown that we may define a supersymmetric background for a 5d N = 1 theory on any manifold, M 5 , admitting a transversally Hermitian structure. This means we may write a metric on M 5 of the form Here ψ is a coordinate generating an isometry of the metric, i.e., K = ∂ ψ is a Killing vector. The transverse directions admit a complex structure, and ds 2 4 is a Hermitian metric. With this structure, we may find solutions to the Killing spinor equations, which allow us to write actions on M 5 preserving some supersymmetry.
Let us note that the above classification is very similar to that of [44] for coupling 3d N = 2 supersymmetric theories to three-manifolds. Namely, in that case the necessary structure is a transversally holomorphic foliation. Then it is straightforward to check that, given a three-manifold M 3 with background gravity fields, we may define a supersymmetric background on M 3 × R 2 with for any constant . In particular, in the case where M 3 is a Seifert manifold [44], we may preserve one supercharge, ζ (3d) , of R-charge 1 and another,ζ (3d) , of R-charge −1, and so on M 3 × R 2 we may preserve four supercharges. Let us consider the algebra satisfied by the supercharges. First, in 3d, we have [44] {δ ζ , δ ζ } = {δζ, δζ} = 0 , where z is the central charge of the field being acted on, ∆ is its R-charge, H is a scalar in the background supergravity multiplet, and L K is the modified Lie derivative, which is covariant under R-and central-charge symmetry gauge transformations, acting along the Killing vector, Returning to the 5d superalgebra, let us define δ ± andδ ± as the transformations associated to ζ ⊗ ± andζ ⊗ ± , respectively, where we define ± as the ±1 eigenvectors of σ 3 . Then, for example, we may compute We can repeat this for the remaining supercharges. Then, if we identify Q + = δ + , Q − = δ − ,Q + =δ + , andQ − = δ − , one can check that Q α andQ α generate the N = (2, 2) superalgebra, with a central charge given by the operator In other words, the 5d N = 1 theory compactified on M 3 gives rise to an effective 2d N = (2, 2) theory, whose central charge is determined by the operatorZ above, which depends on the KK momentum along M 3 , R-charge, and real mass parameters, which contribute to the central charge, z. Finally, to construct a background on the compact manifold, M 3 × Σ g , we may perform a partial topological twist along Σ g . From the 5d point of view, this amounts to turning on a flux, g−1, on Σ g for the background gauge field coupled to the U (1) R ⊂ SU (2) R symmetry. From the point of view of the effective 2d N = (2, 2) theory, this is simply the topological A-twist [14]. We then expect the partition function to be an observable in an appropriate 2d topological quantum field theory (TQFT), which constrains the form of the answer. We review this structure in the next subsection.
In the rest of the paper, we will mostly focus on the case M 3 = S 3 b . 5 Specifically, we will take the supersymmetric background of [45], which exhibits S 3 b as an S 1 fiber bundle over the round metric on S 2 , i.e., This preserves an SU (2) × U (1) isometry, and the Killing vector appearing in the superalgebra is K = ∂ ψ . Then, in this background we have [44], and so the central charge in the N = (2, 2) algebra (2.15) is which defines a variable, σ, valued in the complexification of the Cartan subalgebra of the flavor symmetry, which is a holomorphic combination of the background real scalar, z, and component, A ψ , of the background gauge field along the direction K, as discussed in more detail in [11]. 5 We will return to consider more general lens spaces in Section 5.

The 2d A-twist and Bethe Ansatz equations
As observed above, the supersymmetric background on S 3 b × Σ g , when considered along the Σ g directions, takes the form of a 2d topological twist. Such setups, where a ddimensional gauge theory is placed on a manifold of the form M d−2 ×Σ g , and subjected to a topological twist along the Riemann surface, have been studied in many examples recently-see, e.g., [7][8][9][10][11][12][13]. These works are related to the gauge-Bethe correspondence of [46], and can be described as a "higher dimensional A-twist" [11].
On general grounds, we expect such an observable to be computed by an appropriate 2d TQFT, which tightly constrains the form the result may take. In fact, by studying the effective action of the low energy theory compactified to 2d, we may express the full answer in terms of two functions, the "effective twisted superpotential," W(σ) and the "effective dilaton," Ω(σ), which are functions of the twisted chiral field strength multiplet, Σ, associated to the 2d vector multiplet, V, Then the effective action can be written in terms of these objects as [7] Here, σ may denote both dynamical and background vector multiplets associated to the gauge group, G, and flavor group, G F , respectively, expanded in a Cartan basis. For the rest of the paper, we set the notation defining the gauge and flavor symmetry parameters, u and ν, respectively. Using this low energy action, we may construct the partition function of this effective theory on a Riemann surface Σ g with the topological A-twist background, where we include twisted masses ν and background magnetic fluxes n for the flavor symmetry. We find [7,11] Z where which we refer to as the "flux operator" and "handle-gluing operator," respectively, and S BE is the set of supersymmetric "Bethe vacua" of the theory, defined by -11 -where we quotient by the action of the Weyl group, W G , of G and discard any solutions on which it does not act freely. This result may often be alternatively derived by direct UV localization. There, one arrives at an expression of the form where we sum over gauge fluxes, m, in the lattice, Λ G , of coweights of G, and C JK is the so-called "Jeffrey-Kirwan contour" [47,48]. Roughly speaking, we may define this contour by removing a small neighborhood of any singularities or boundaries at infinity in the integrand, leaving a non-singular region,M, of the complexified Cartan of G, and then the contour runs over those portions of ∂M with where η a is an auxiliary parameter valued in the Cartan of the gauge group. In addition, we discard contributions from the neighborhood of points with enhanced Weyl symmetry. Then, if we choose η a ∝ m a with a positive constant, one can check the sum over m a is a convergent geometric series on the JK contour, and after performing it we find The poles in this integrand are precisely at the solutions to (2.23) (appearing with multiplicity |W G |, which cancels the prefactor), and taking their residues we recover the formula (2.21), demonstrating the equivalence of these two approaches. We refer to [11] for more details on this argument and the JK contour. Thus, to derive the partition function on M d−2 × Σ g for general Σ g , it suffices to compute the effective objects, W(u, ν) and Ω(u, ν), describing the low energy theory obtained after compactifying on M d−2 , which in the case of present interest is S 3 b . In the next subsection we attempt to carry out this procedure directly by expanding the 5d fields in KK modes on S 3 b . However, the result we obtain in this way turns out to encode only the perturbative contribution to Z S 3 b ×Σg . We then describe, in Section 2.4, another approach which captures the full non-perturbative twisted superpotential and dilaton.

Reduction on S 3
b and the perturbative partition function Let us consider a 5d N = 1 theory on S 3 b × R 2 . As discussed above, this may be described by an effective 2d N = (2, 2) theory with infinitely many fields, arising from the KK modes on S 3 b . We begin by describing this in the case of a free 5d N = 1 hypermultiplet.
-12 -Hypermultiplet. To write the effective twisted superpotential and dilaton generated by a hypermultiplet, we will first need to describe how its modes on S 3 b × R 2 decompose into 2d fields on R 2 . Recall that the dimensional reduction of a 5d hypermultiplet to three dimensions is a 3d N = 4 hypermultiplet, or equivalently, a pair of 3d N = 2 chiral multiplets in conjugate representations. Thus, if we restrict to a point, x, on R 2 , the field content of the 5d hypermultiplet on the three transverse directions is that of a 3d N = 4 hypermultiplet. We may then understand the 2d field content by expanding this 3d hypermultiplet in modes on S 3 b .
-13 - The above analysis was carried out at a single point, x ∈ R 2 . In general, we obtain 2d superfields Φ ± ,n (x) which, as discussed above, form multiplets of the 2d N = (2, 2) superalgebra. Specifically, it is easy to see that each mode gives rise to an independent 2d chiral multiplet, and from (2.32) and (2.17), we can see that these chiral multiplets have twisted massesm ± ,n = + 1 ±σ . (2.33) In addition, we have modes which contribute long multiplets in 2d, which have unprotected masses, and which do not contribute to protected observables. We may now compute the effective twisted superpotential contributed by integrating out this compactified 5d hypermultiplet. Recall that the contribution of a single 2d chiral multiplet of twisted massm is [50] The full twisted superpotential from summing over all the short multiplets appearing in (2.33) is After suitable regularization (see (2.42) below), this infinite sum may be explicitly evaluated to give

Squashed sphere
The above computation is generalized in a straightforward manner to S 3 b for general b by expanding the fields in spherical harmonics, following [45]. 8 One finds, A more general R-charge, ∆, can be obtained by shifting, in our convention,σ → σ + 1 − ∆. 7 More precisely we should introduce a dynamical scale, µ, and write the logarithm as log m µ , but this would drop out of the computation below. 8 Here we find it convenient to use a slightly non-standard normalization of the scalarσ. Our normalization is related to the usual scalar, σ, on S 3 b by σ = −iQσ, where Q is as in (2.41). We will comment more on this relation below.
-14 -As above, each of these modes corresponds to a 2d chiral multiplet, with twisted massesm ± ,n = + 1 + Then, the twisted superpotential obtained by integrating out these chirals reads which, after suitable regularization, defines a function g b (σ). We regularize this sum as follows. Note that, using e 2πi∂σW R 2 (σ) =σ −1 , we may formally write where we have defined and s b (x) is the double sine function [15,16], which can be rigorously defined as a meromorphic function of σ. We may then set Next consider the effective dilaton. This depends on the choice of R-symmetry used to twist the theory on the Riemann surface, Σ g , and the contribution of a hypermultiplet will depend on its charge, r, under this R-symmetry. We stress that r, which is in general integer-quantized due to the nontrivial flux, g − 1, through Σ g for the R-symmetry background gauge field, is distinct from the R-charge appearing in the coupling to S 3 b , which we denote ∆, and which in general is a real number. Then the contribution of a single 2d chiral multiplet to the effective dilaton is: and proceeding as above, we find: Below it will often be natural to take r = 1, as this is the R-charge obtained by twisting by the U (1) R ⊂ SU (2) R symmetry appearing in the N = 1 superalgebra, and in this case the hypermultiplet has vanishing contribution to the effective dilaton. We now have all the elements we need to compactify the R 2 factor to Σ g using the 2d A-twist. Namely, from (2.21) above we have, for a flux m on Σ g , General gauge theory. It is straightforward to generalize this result to a set of hypermultiplets living in a representation R = ⊕ i R i of a gauge group G. As above we takeσ →ũ andν for the gauge and flavor symmetry (real mass) parameters, respectively. Then we have where we have introduced massesν i and R-charges r i for the hypermultiplets. In addition to the hypermultiplets, we expect a contribution to the 2d A-model from the vector multiplets and the classical action. For the former, we write 2πi log 2 sin (πbQα(ũ)) 2 sin πb −1 Qα(ũ) . (2.50) where the sums are over the set, Ad(G), of roots of G, and the primes denote that we include only the non-zero roots in the sum. This can be motivated as follows. Given a N = 1 5d vector multiplet and an adjoint hypermultiplet of R-charge zero, we may give the latter an expectation value, without breaking R-symmetry, and completely Higgsing the gauge group. At low energies this leaves no degrees of freedom for either the vector or hypermultiplet and thus their contributions should cancel out in the partition function. This leads to the expression above. We will also derive this by an alternate method in Section 2.4 below. Finally, the classical contribution to W(u) and Ω(u) can in principle be computed directly, but we can also take a more indirect approach and compute them on the background S 3 b × Σ g . The contribution of the Yang-Mills term was computed in [39], -16 -and we may similarly evaluate the CS contribution and find: where we defined 9γ = − 2πi g 5 2 . (2.52) From this and the general form of (2.21), we can read off (2.53) Putting these pieces together, we arrive at the following result for the twisted superpotential of a 5d N = 1 theory 54) and similarly for Ω pert S 3 b ×R 2 , where, with foresight, we have labeled these as the perturbative contributions, for reasons that will be clear below.
We may nevertheless proceed as in the discussion above in Section 2.2 and write the answer for the (perturbative) partition function on S 3 b × Σ g . Before doing this, it will be convenient to define rescaled variables, which are normalized in a way which will look more natural in the context of S 3 b partition function, namely, Then we can write the perturbative contribution to the S 3 b × Σ g partition function as
(2.58) 9 The 5d Yang-Mills coupling naturally appears in a complex combination with the 5d theta angle, θ 5d , and we may naturally extend the definition ofγ asγ = 2πi g5 2 + θ 5d 2π . However, we will mostly restrict our attention to θ 5d = 0 in this paper, and do not write the theta angle explicitly below.
-17 -Alternatively, we may write this in terms of an integral over the JK contour, as in (2.24), (2.59) Alternative perspective: A direct sum of 3d theories. Before moving on to evaluate the validity of this formula more closely, let us mention an alternative perspective on the above result. Let us again return to the case of a single hypermultiplet on S 3 b × Σ g . Then, rather than expanding in modes on S 3 b , we may expand in modes on Σ g . After the topological twist we expect many of the modes to cancel, with the number that remain determined by the total flux felt by the chiral multiplet.
The 2d index theorem states that for a Dirac fermion, χ, the difference in the number of right-and left-moving fermionic zero modes on Σ g is given by where t χ is the charge of the corresponding fermion in the background F = T dvol(Σ g ), where T R,I are the R-symmetry and other possible background symmetry generators, respectively, and κ = {1, 0, −1} for g = 0, 1, and g > 1, respectively. Applying this to a fermion with R-charge (r − 1) and gauge charge 1, and denotingm ≡ m + (r − 1)(g − 1), with m an integer-quantized gauge flux, gives the reduction rule 5d hyper of charge 1 → |m| 3d chirals of charge 1 form > 0 |m| 3d chirals of charge −1 form < 0 . (2.61) Thus, since each chiral multiplet contributes a factor of s b (u) to the S 3 b partition function, the latter may be written as (using also which is precisely what we found in (2.46).
More generally, given a gauge theory, we may consider the effective 3d field content obtained for each choice of flux, m ∈ Λ G , on the Riemann surface, Σ g . This matter content describes an effective 3d N = 2 theory, which we may denote T (3d) Σg,m . Then we expect that, schematically, the full 5d theory compactified on Σ g × R 3 can be written as a direct sum of 3d theories Σg,m .
(2.63) -18 -If we take this relation literally, then we may also compute the S 3 b ×Σ g partition function as We claim this is precisely the interpretation of the formula (2.59). Namely, each summand in that formula takes the form of the integral of a product of double sine functions, and such an integral describes the S 3 b partition function of a particular 3d N = 2 theory, which we claim is precisely T (3d) Σg,m .

Reduction to 4d and the instanton partition function
While the above two perspectives nicely complement each other, they also suffer from an important shortcoming. In both approaches we considered the compactification of the manifold from d = 5 to d = 2 (in the first case) or d = 3 (in the second). This compactification can be viewed as studying the theory in a limit where the compactified manifold is very small, and deriving the effective dynamics on the directions that remain large. While this is valid for any finite relative size of the S 3 b and Σ g factors, owing to the topological invariance along Σ g , the strict limit relevant to the compactification may not commute with the inclusion of non-perturbative effects, since in 5d these are associated to codimension-4 field configurations, namely, instantons. As we will see below, instantons do indeed modify the dynamics of the compactified theory, and are important for describing the full effective twisted superpotential and dilaton which compute the S 3 b × Σ g partition function. In this section, we describe an alternative method, based on reduction to 4d, which captures these non-perturbative contributions. We obtain a perturbative piece which matches the result above but which is supplemented by an instanton contribution, which we write below.
To start, let us consider a 5d N = 1 theory on R 4 × S 1 . This gives an effective 4d N = 2 theory on R 4 , with towers of KK modes corresponding to the Fourier modes of S 1 . For example, a 5d N = 1 hypermultiplet, Φ, with real mass, m, gives rise to a tower of 4d hypermultiplets, Φ n , with complex masses where r is the radius of S 1 , and A 5 is the holonomy of the background gauge field along the S 1 . Below we will mostly work in units with r = 1, but it will sometimes be important to keep it as a free parameter. For the purpose of computing the S 3 b × Σ g partition function, we may realize the S 3 b factor as an S 1 fibration over S 2 . Then the partition function on this five-manifold is equivalent to a partition function on S 2 × Σ g , where we insert one unit of flux on S 2 for the U (1) KK symmetry, corresponding to translations along the S 1 fiber.
For the rest of this subsection, let us restrict our attention to the case of Σ g=0 = S 2 , so that the underlying four-manifold is S 2 × S 2 . The partition function of 4d N = 2 gauge theories on this space was considered in [17], and so we may apply their results to gain another perspective on our computation.
The 4d computation. Let us briefly review the computation of the partition function on S 2 × S 2 , following [17]. Consider the following vector field on S 2 × S 2 , which generates an infinitesimal isometry where z i are the complex coordinates on each S 2 factor. Then we may consider the equivariant deformation of the Donaldson-Witten topological twist on S 2 × S 2 [1]. The partition function can then be computed by equivariant localization, and reduces to a contribution from the four fixed points of the U (1) 1 × U (1) 2 isometry above, namely, at the products of the poles of the two S 2 factors. More precisely, one finds that the path integral localizes to the locus where Φ and F are the complex scalar and field strength, respectively, in the N = 2 vector multiplet. The first conditions imply we may take Φ,Φ, and F in the same Cartan subalgebra of the gauge group, G, with rank r G . The second and third then imply that we may write, in this Cartan basis, whereũ a ∈ C parameterizes the allowed profiles of Φ, m i,a ∈ Z label the GNO fluxes of the gauge field on the two S 2 factors, and ω i and h i are the volume forms and height functions, respectively, on the two S 2 factors, i.e., ω i = 1 4π sin θ i dθ i dφ i and h i = cos θ i in the usual coordinates on S 2 . In addition, the path integral receives contributions from point-like instantons localized at each of the fixed points.
Let us consider a 4d N = 2 theory with gauge group G and hypermultiplets in the representation R = s i=1 R i . Then the partition function is given by an integral over the BPS locus above Here τ is the complexified gauge coupling,ũ = (ũ a ) andν = (ν i ) are complex scalar parameters associated to the gauge and flavor symmetry, respectively, m 1,2 and n 1,2 are the corresponding fluxes through the two S 2 factors, the index runs over the four fixed points, ∈ {nn, ns, sn, ss}, sitting at the north (n) and south (s) poles of the two spheres, and we have defined is the partition function on R 4 in the Ω-background [18], which describes the contribution in the local neighborhood of each fixed point. It can be decomposed as Let us analyze each of these pieces in turn. First, the classical contribution comes from the Yang-Mills term, and is given by where we define Tr(ũ 2 ) = K abũ aũb , with K ab the Killing form. Taking the contribution from the four fixed points using (2.70), we find For the perturbative and instanton part, it is useful to first write the contribution to the corresponding equivariant indices [34,51]. The appropriate index for the vector multiplet is that for the so-called self-dual complex, and for the hypermultiplet it is the Dirac complex, where both are twisted by the vector bundle, V , in which the fields take values. These can both be related to the index of the Dolbeault complex for V , ind(∂ V ), namely, Thus, we first consider the Dolbeault index, ind(∂ V ). This may be decomposed into a perturbative piece and an instanton contribution, The former can be written for an arbitrary representation R of an arbitrary gauge group G as .
The form of the instanton contribution is more subtle, and depends in a detailed way on the representation and gauge group, with explicit expressions typically known only for the classical gauge groups. For example, for the adjoint representation of G = U (N ), and working in the k instanton sector, we have [34,52] ind where φ are the equivariant parameters for the U (k) symmetry acting on the k-instanton moduli space. The 1-loop determinant in a given instanton background is given by making the Let us focus on the perturbative contribution first. Let us choose δ i ∈ {±1} so that |e i i δ i | < 1 (we always assume i ∈ C\R). Then the natural expansion of the index of the Dolbeault complex is (taking a charge 1 representation of U (1) for simplicity) and so the corresponding 1-loop determinant is, using (2.78), If we consider instead the Dirac complex, corresponding to a hypermultiplet, we find, using (2.74) Returning to S 2 1 × S 2 2 , we may use the above result to compute the contributions from the four fixed points, identifying parameters as in (2.70). Let us assume now for concreteness that |e i i | < 1. Then one finds many of terms in the infinite products above cancel, and we are left with where we defined We can simplify this using We note for later convenience that in the limit of vanishing equivariant parameters, The perturbative contribution for a more general hypermultiplet is then computed by For the vector multiplet, a similar argument, using (2.74), gives Then the full perturbative contribution is 89) The full nonperturbative expression is obtained by including the contribution from the remaining terms in (2.77), which correspond to the instanton contribution. The detailed form of the instanton contribution will depend on the gauge group and matter representation, but has the general form where we defined z = e 2πiτ , the classical contribution from the instanton action, and Z is the contribution to the 1-loop determinant in the k-instanton background. 10 Here we have chosen a convenient overall phase, which was ambiguous in the above infinite products. We similarly fix several such phases below. It would be desirable to fix these phases more rigorously from first principles, perhaps by careful consideration of the 4d 't Hooft anomalies and the 5d parity anomaly, as discussed in [53,54].
For example, in the U (N ) case, it is given by integration over the U (k) equivariant parameters appearing in (2.77), and can be expressed in some cases as a sum over N -colored Young diagrams [18]. We will discuss an explicit example when we consider the 5d uplift below.
Putting these ingredients together, we may write (2.91) Uplifting to 5d. We may now uplift this result to our desired background, S 3 b × S 2 , by applying this computation to the effective 4d N = 2 theory,T (4d) , obtained by dimensional reduction of our chosen 5d theory, T (5d) , as outlined above.
More precisely, our strategy will be to exhibit S 3 b as an S 1 fibration over the topologically twisted S 2 . Let us first describe the case b = 1. Then it was shown in [11] that the usual supersymmetric background on the round sphere is an S 1 fibration over the topological A-twist background on the 2-sphere. Here we must include one unit of flux for the connection fibering the S 1 . Then this background may be equivalently obtained by considering the effective 2d theory obtained by dimensional reduction, which has a U (1) KK global symmetry corresponding to translations along the S 1 direction, and inserting a unit flux on S 2 for this global symmetry. We will employ the same strategy here, this time with an additional S 2 factor in the geometry. In other words, we consider the effective 4d N = 2 theory obtained by dimensional reduction along the S 1 fiber. Here we perform an ordinary topological twist along each S 2 factor, which corresponds to the 1 , 2 → 0 limit of the equivariant background discussed above. Finally, we must turn on a unit flux for the U (1) KK symmetry along one of the S 2 factors.
In the case of a non-round sphere, b = 1, we will argue below that this can also be exhibited as an S 1 fibration over S 2 , but now with a nonzero Omega-background on the S 2 [55]. This will again fit into the framework described above, but now rather than taking both 1 and 2 to zero, we will keep a nonzero 1 , specifically, we find that the appropriate value is where r is the S 1 radius, which we will often set to 1 below. Note this vanishes when we set b = 1. Thus, we arrive at the following schematic relation whereT (4d) is the effective 4d theory. Here the arguments of the partition functions correspond to the mass and fluxes for flavor symmetries. On the RHS, there is an -24 -additional flavor symmetry, the U (1) KK symmetry corresponding to translations along S 1 , which we have assigned a mass 1 r and a unit flux on the first S 2 factor, which gives rise to the Hopf fibration of S 3 described above. We will also see in a moment that the flux n 1 can be absorbed into a shift ofν, as expected since there is no nontrivial 2-cycle on S 3 on which to support a flux. We will also demonstrate that the partition function can be written in terms of the 5d Nekrasov partition function, or more precisely, of the Nekrasov-Shatashvili limit of this partition function.
Let us now make these statements more precise. As above, the integrand of the partition function factorizes into contributions from the perturbative (classical and 1loop) piece, and the instanton contribution. First, the classical contributions on S 3 b ×Σ g were already presented above in (2.51), and we may use that result in the present case, g = 0, as well.
Next we have the perturbative and instanton contributions. To compute these, let us return to the contribution to the Dolbeault index in 4d from a single fixed point, Then when we add a tower of KK modes with masses n r , n ∈ Z, the index is modified to and similarly for the vector and hypermultiplet indices. Then we expect that when we construct the 1-loop determinants on R 4 × S 1 , these will be related to those in 4d by, schematically, This holds for both the perturbative contribution and the 1-loop contribution in an instanton background, as discussed in [34] in the context of the S 5 partition function. To see how this works in more detail, let us consider the perturbative contribution for a single hypermultiplet. Recall that the perturbative contribution of the hypermultiplet on R 2 1 × R 2 2 is given by (2.81), namely, Note this is naturally a function of the parameters We will sometimes emphasize this by writing the 5d partition function as where the meaning of the subscripts and arguments should be clear from context. Now we may glue four copies of this function with parameters identified as in (2.70), and one finds that the infinite product simplifies to (2.102) This result may also be obtained by directly uplifting the perturbative contribution, The above computation represents the 1-loop determinant on the background S 2 1 × S 2 2 × S 1 , where the S 1 appears as as trivial product. We will return to this case in Section 5 below, but our present interest is in the partition function on S 3 b × S 2 . Then we must include a magnetic flux for fields charged under the U (1) KK symmetry. Recall that the magnetic flux enters the fixed point contributions on S 2 1 × S 2 2 by shifting the eigenvalues by m i i 2 . Thus, including a unit U (1) KK flux, the perturbative contribution of the hypermultiplet in (2.98) is modified to (2.105) This is the same function we obtained in (2.98) above, but now evaluated at the arguments Now to construct the full S 3 b × S 2 partition function, we must include the contribution from the four fixed points, that is (writing this now as a function of x and the where the parameters at the four fixed points can be read off from (2.70) and (2.106), and we find, for vanishing fluxes, and renaming 2 → as in (2.93), We can then introduce fluxes, as above, by shifting . We will describe the dependence on fluxes in more detail below.
Perturbative contribution and holomorphic blocks. We now evaluate this perturbative contribution for the hypermultiplet explicitly using two methods. First, we may directly uplift the perturbative contribution on S 2 1 × S 2 2 , as in (2.103), but now including the U (1) KK flux. We find where we used (2.86) to take the → 0 limit. Defining = |m 1 + n|, this may be further rewritten as (2.111) Finally, after substituting the definition of b and defining j = −1+2k 1 , k = −1−2k 1 , which take values in Z ≥0 , and comparing to (2.40), we see that We may take another approach to this computation which will give another useful perspective on this partition function. Let us consider the contribution from the fixed points = nn and = ns. We also take |q| = |e −2πib 2 | < 1 for concreteness. Then one finds the infinite products over k 2 in (2.104) reduce to a finite product, and we can -28 -take a finite → 0 limit, where q and x are as in (2.109), and we introduced the q-Pochhammer symbol A similar argument for the contribution from the fixed points = sn and = ss gives (2.115) Then, using the relation [13,20] where the parameters are as in (2.109), we again arrive at This method demonstrates that the partition function of the hypermultiplet naturally factorizes into a contribution from the fixed points at the north and south poles of the S 2 base of S 3 b . Note that the dependence on the flux m 1 can be absorbed into a shift of u, as expected since the S 3 b factor cannot support a topologically nontrivial flux. Thus we will henceforth set m 1 = 0, and rename the flux on S 2 by m 2 → m. Then we see that this agrees with the result (2.46) derived above by KK reduction, where in the present case we are implicitly taking R-charge one for the hypermultiplet. We may also define, as in Section 2.3, the rescaled parameters We will sometimes work in terms of these parameters below.
-29 -It is straightforward to extend the argument above to a hypermultiplet in a general representation, giving Similarly, for the vector multiplet we find We note this perturbative piece precisely agrees with what we found by the naïve KK reduction of Section 2.3. This confirms our claim that the previous computation only reproduced the perturbative contribution to the S 3 b × Σ g partition function, and missed the instanton corrections. The latter can be seen in the present approach, and we will discuss them below.
The factorization of the perturbative contribution noted above also holds for the general hypermultiplet and vector multiplet in (2.119) and (2.120). This is closely related to the factorization of the S 3 b partition function of 3d N = 2 theories into holomorphic blocks [20]. It is therefore natural to expect that a similar approach as the one here applies to the spaces L(p, q) b × S 2 for arbitrary (squashed) lens space L(p, q), as such lens spaces can be constructed by gluing two such holomorphic blocks. Indeed, we have seen this already in the case of S 2 × S 2 × S 1 , and will return to this example in Section 5 below. We also note that 3d holomorphic blocks have also appeared in 5d partition functions in other contexts -see, e.g., [56,57] -and it would be interesting to understand the relation to their appearance here. As we will see in the next subsection, this factorization continues to hold at the non-perturbative level.
Instanton contribution and the Nekrasov-Shatashvili limit. The argument above extends to the 1-loop determinant of a general hypermultiplet or vector multiplet in a general instanton background. Specifically, we may similarly uplift the contribution in the background of point-like instantons on R 2 1 × R 2 2 , which are now configurations supported on loops wrapping the S 1 factor. Thus, we may write q 2 ×S 1 is the perturbative contribution from vector and hypermultiplets, and Z (k) also defined the classical contribution to the instanton action, which is now integrated over S 1 , (2.122) This 5d instanton partition function was originally defined in [18], and plays an important role in many of the 5d partition functions mentioned at the beginning of this section. We see the same object controls the S 3 b × S 2 partition function. To form the integrand of the S 3 b × S 2 partition function, we take the product of the contributions from the four fixed points, where the arguments of the instanton partition functions at the four fixed points are x ( ) and q ( ) i , defined as in (2.108), and y ( ) and z ( ) , defined analagously. Explicitly, = sn or ss .
(2.124) The expression (2.123) involves taking the limit of the instanton partition function where one of the equivariant parameters is sent to zero. This limit has been widely studied, beginning with [19], and is known as the Nekrasov-Shatashvili limit of the instanton partition function. As shown in [19], the leading behavior of the instanton partition function in this limit can be expanded as (considering the 4d case first) which implicitly defines functions, W N S (ũ, 1 ) and Ω N S (ũ, 2 ), which depend on the theory under consideration. 12 We may similarly define, for the 5d instanton partition function, adapted to the notation above (and setting r = 1 from now on), (2.126) The notation we have chosen anticipates the role these functions will play as the twisted superpotential and effective dilaton below.
Let us consider again the expression (2.123) in light of this expansion. If we again consider the product of the = nn and = ns terms, we find (suppressing the dependence onν andγ from the notation) Similarly, the other two fixed points contribute .
Putting this together, we see these objects behave in precisely the same way as we expect the twisted superpotential and effective dilaton to behave in the context of the Thus, we see the factorization of the perturbative contribution continues to hold at the non-perturbative level. We can now write, e.g., (2.131) Then we have seen the perturbative piece is given by (2.54), and can in principle be further factorized into W , although we do not write those expressions here. The instanton contribution is thus determined implicitly by studying the Nekrasov-Shatashvili limit of the instanton partition function.
Integration contour and Bethe sum. Having finally written an expression for the integrand of the S 3 b × S 2 partition function, we can now write the partition function itself as an integral over a suitable contour and sum over gauge fluxes on S 2 , i.e., We have so far not been careful to specify the precise contour of integration in the above integral. However, it is natural to conjecture that this contour is such that, by a similar manipulation as described above and in [11], we may evaluate this contour integral and perform the resulting geometric series over m a , and obtain a "Bethe sum" formula, where S BE is defined as in (2.23), and we have defined Finally, although the above formula has only been motivated for genus zero, it is very natural to conjecture the generalization to arbitrary genus, g, using the general A-twist formalism described above, namely, In fact, this form is essentially determined by topological invariance on Σ g , which means this observable must be computed by a 2d TQFT. This represents our result for the full, non-perturbative partition function on S 3 b × Σ g .

Summary.
We have computed the S 3 b × Σ g partition function by two methods. First, we performed a naïve reduction to 2d, leading to the perturbative result for the twisted superpotential in (2.54). However, this missed the contribution of instantons, and we then recovered the full non-perturbative result by a reduction to 4d, where we conjectured the answer is expressed in terms of the Nekrasov-Shatashvili limit of the instanton partition function, as in (2.129). From the twisted superpotential (and effective dilaton), we may then construct the full S 3 b × Σ g partition function as in the general discussion of Section 2.2, leading to the formulae (2.56) for the perturbative partition function, and (2.136) for the non-perturbative result.
While the latter method in principle gives the complete answer, in practice the instanton contributions may be difficult or impossible to compute analytically. For the remainder of this paper, we will therefore consider various simplifying limits in which their contribution is suppressed, or otherwise under control. Specifically, it is well-known that their contribution is subleading in N when we take a large N limit, and in the next section we consider this limit in several examples, utilizing only the perturbative contribution to the partition function. In the following section, we will specialize to theories which we expect to have a 6d UV completion. For such theories we will argue that in the limit of large gauge coupling, corresponding to large radius of the emergent S 1 direction, the instantons contribute a simple factor to the partition function, which can be interpreted as computing the Casimir energy in this limit. Finally, in the special case of the maximal 5d N = 2 SYM theory, we will see there exists a limit with enhanced supersymmetry, where the instanton contribution is very simple.

Large N limit and holography
In this section, we study the large N limit of the S 3 b × Σ g partition function for a large class of 5d quiver gauge theories. We distinguish two classes of quivers; those leading to an N 5/2 scaling of the free energy and those leading to an N 3 scaling. The latter class of theories (which are expected to have UV completions as 6d theories on a circle) are discussed in detail at finite N in Section 4. For the former class, we find that the matrix model determining the partition function exhibits an interesting structure at large N , becoming closely related to the matrix model determining the S 5 partition function [32,33,[58][59][60]. Precisely, we will establish the large N relations where the sum α is over the vector multiplets and ρ is over various hypermultiplets and F is the free energy of the theory on the corresponding manifold. 13 Thus, although the matrix models computing the partition functions on S 5 and on S 3 b × Σ g are distinct at finite N , they are closely related at large N .
As we discuss in detail below, the universal twistn ρ =ν ρ = 0 is special [21]. This corresponds to a topological twist purely along U (1) R ⊂ SU (2) R . Combining the expressions above it follows that 14

2)
13 See Sections 3.1 and 3.3 for notation and details. 14 As shown in Section 3.3, for this class of quivers α c α = ρ c ρ and the universal relations follow.
-34 -for any 5d N = 1 theory with a universal twist on Σ g at large N . The second relation above for Q = 1 is in agreement with the supergravity prediction of [21], valid for the compactification of any 5d N = 1 theory with a universal twist. We will discuss holography in Section 3.4.

Useful formulas
Before we proceed to the computation, let us collect the relevant results of Section 2 for ease of reference. For a general theory with gauge group G and hypermultiplets in gauge representations R I , and collecting the terms from (2.56), (2.57), the perturbative partition function is given by where H denotes the Hessian contribution to the handle-gluing operator in the second line of (2.57) and we have written the flavor flux as n I =n I (g − 1), withn I integerquantized. The Bethe equations are given by with the twisted superpotential (2.54), given by where the classical contribution is given in (2.53), and for the theories considered in this section the Hessian contribution, H, given in (3.3) is subleading in the large N limit. Since instanton corrections are suppressed at large N , and to avoid clutter, in the remainder of this section we shall always omit the label "pert." To study the large N limit, we will need the following asymptotic behaviors: where we have assumed thatν ∈ R and |ν| ≤ 1, and took the principal branch. We note also the expansion Figure 1. The 5d Seiberg theory. The node represents a U Sp(2N ) gauge group, the solid line N f hypermultiplets in the fundamental representation and the dashed line an antisymmetric hypermultiplet.

Seiberg theory and its orbifolds
The Seiberg theory [5] (see also [31]) consists of a single 5d N = 1 vector multiplet in the adjoint of the gauge group Sp(N ) U Sp (2N ) 15 , N f < 8 hypermultiplets in the fundamental representation of the gauge group, and one hypermultiplet in the antisymmetric representation (see Figure 1). The global symmetry of the theory is 16 The antisymmetric hypermultiplet transforms as a doublet of SU (2) M and as a singlet of SO(2N f ). We turn general flavor fluxes along the Cartan of SU (2) M and SO(2N f ), denotedn M andn I , I = 1, . . . , N f , respectively.
The fundamental representation of U Sp(2N ) has weights ±e i , where e i are unit vectors of R N . The antisymmetric representation has weights ±(e i − e j ) and ±(e i + e j ) with i < j. The adjoint has the same weights as the antisymmetric and also ±2e i . Then, the twisted superpotential (3.5) reads where we have omitted the classical piece W classical S 3 b ×R 2 since one can check that it is subleading in N . To analyze the large N behavior of this quantity we follow the approach 15 Since the terminology regarding symplectic groups differs in the literature, let us clarify the one followed here. The group of real 2N × 2N matrices U such that U T ΩU = Ω, with Ω 2 = −1, is denoted Sp (2N, R). The group of such complex matrices is denoted Sp (2N, C). If one adds to the later the condition that U is unitary, one obtains the group U Sp(2N ) ≡ Sp(2N, C) ∩ U (2N ), also denoted Sp(N ). It is useful to know that SU (N ) × U (1) ⊂ U Sp(2N ) ⊂ SU (2N ). 16 The U (1) top is a topological symmetry which together with the SO(2N f ) is expected to combine into an enhanced E N f +1 at the conformal fixed point [5].
where α > 0, x is a continuous variable of order O(N 0 ), and ρ(x) is the eigenvalue density, normalized as dx ρ(x) = 1. Using the largeũ expansion (3.6) and then going to the continuum variables, we have 17 For this function to have a nontrivial saddle at large N requires both terms to be of the same order in N and hence α = 1 2 , which we set in what follows. We note that, to this order in N , only the mixing parameter for the antisymmetric hypermultiplet,ν AS , is visible while the parameters for the fundamental fields,ν I , are not. We also note there has been a cancellation of the nonlocal cubic terms |x ± y| 3 among the vector multiplet and the antisymmetric hypermultiplet. The same cancellation occurs for the free energy of this theory on S 5 [62]. In fact, by a simple rescaling of the coordinates and a corresponding inverse rescaling of ρ to preserve its normalization, we have 18 We note the quantity inside the brackets is precisely the free energy functional of this theory on S 5 (see Eq. (3.4) in [62]). Thus, we find the simple relation (3.14) 17 Due to the structure of roots and weights for U Sp (2N ) and SU (2N ), only the real part of g b (z) contributes from the expansion (3.6) and W S 3 b ×R 2 is real. The same holds for b (z) appearing in the free energy. 18 We have used the symmetry of the integrand to replace y<x dxdy → 1 2 dxdy, where now both integration variables x, y are integrated over their full domain.
Since this is a functional relation in the eigenvalue density ρ(x), extremization of the Bethe potential is equivalent to the extremization of F S 5 . As shown in [62] the saddle configuration is given by with x ∈ [0, x * ] and at the extremum Now let us evaluate the free energy on S 3 b × Σ g in this Bethe vacuum. Taking the logarithm of (3.3) for this theory it is easy to see that the Hessian is subleading in this vacuum and only the flux operators contribute, which using the expansion (3.7) and vacuum (3.15) becomes As we will show in Section 3.3 the relations (3.14) and (3.17) are not particular to the Seiberg theory but can be generalized to a large class of quiver gauge theories. This is rather nontrivial as it requires a number of special cancellations in the Bethe potential. We note that relations analogous to these hold for 3d N = 2 theories on S 1 × Σ g ; in that case the relations are among the topological twisted index, corresponding Bethe potential, and the free energy on the round S 3 [63,64]. Before discussing the general case we prove these relations for orbifolds of the Seiberg theory.
Orbifolds. These theories are obtained as Z n orbifolds of the Seiberg theory discussed above and consist of linear quivers with SU (2N ) nodes, in addition to U Sp(2N ) nodes [65]. There are three classes of quivers: class (A) for n = 2k + 1 odd and; (B), (C) when n = 2k is even, shown in Figure 2. The Seiberg theory corresponds to class (A) with k = 0.
Analyzing each class separately one finds that the Bethe equations for each quiver can be obtained from the following Bethe potentials: 19 19 To avoid clutter we denote W S 3 b ×R 2 = W in what follows.
-38 - Figure 2. The 5d quiver gauge theories of discussed in [65]. Black nodes represent SU (2N ) gauge groups and white ones U Sp(2N ) gauge groups. Solid lines denote bifundamental hypermultiplets and dashed lines hypermultiplets in the antisymmetric representation. In addition, at any given node, a, one may have N a f number of fundamental hypermultiplets, which we have not depicted.
where each term is given by To write the above expressions, we start with fundamental weights in the R 2N basis subject to the constraint 2N A=1ũ A = 0 for SU (2N ) group andũ i = −ũ N +i with i = 1, · · · , N for U Sp(2N ) group, as explained in [62]. To extremize the Bethe potentials, we chose the same Ansatz forũ's corresponding to different nodes, i.e.,ũ i a ≡ũ i . The final result in terms ofũ i then follows for all representations straightforwardly. The continuum limit now follows as before withũ i → iN 1/2 x and using the largeũ expansion (3.6). Let us work out the coefficients of different terms at various orders of N in W (A) (ignoring overall signs and factors): where we defined N f = a N a f . Note that the field content is such that the terms at O(N 7/2 ) cancel leaving the expected terms at O(N 5/2 ) to be dominant. This happens for classes (B) and (C) as well as can be easily checked. In fact, for all the three classes, the cubic term has the same coefficient as the Seiberg theory and only the coefficient of the nonlocal linear term changes depending on the precise matter field content. Repeating the same extremization procedure done for the Seiberg theory for each class, we obtain the following Bethe potentials: [62]. The free energy calculation is similar to what was done for the Seiberg theory. We turn on flavor fluxes for all the U (1) (a,a+1) and U (1) AS global symmetries of the quiver theories. This leads to the following free energies (3.28) -40 -We note that for the universal twist,n =ν = 0, the formulas above reduce to W = 4Q 2 27π F S 5 and F S 3 b ×Σg = −6π(g − 1)W for all classes of orbifolds. We will see this observation generalizes to a large class of quivers with an N 5/2 scaling in Section 3.3.

Extremization
We recall that when Z S 3 b ×Σg is viewed as direct sum of 3d theories, the fugacity parametersν are associated to the 3d R-charge, ∆ = 1 −ν, of the 3d N = 2 chiral fields obtained by reduction of the hypermultiplets on Σ g . Since the theory is topological on Σ g we can shrink it to zero size and F S 3 b ×Σg = F S 3 b coincides with the free energy of the 3d effective theory on S 3 b . In view of F -maximization [66,67] it is thus natural to propose that in order to obtain information about the 3d IR fixed point (assuming such fixed point exists), the fugacities must be set to those values extremizing the free energy: 20 (3.34) 20 We are assuming there are no accidental flavor symmetries in the IR. 21 Just as in the Seiberg theory, the fugacities for all fundamental fields are not visible at this order in N and thus are not fixed by extremization.
Depending on the values of the flavor fluxes, one of the roots in (3.30) may be discarded by the requirement |ν I | ≤ 1 (i.e., 0 ≤ ∆ I ≤ 2), which we have assumed.
Note that for the universal twistn =ν = 0 this reduces to (3.2) for all classes. For non-universal twists the relation among free energies depends on the theory under consideration. Specifying (3.34) for the case of the Seiberg theory with a nonzero flux for its SU (2) M flavor symmetry matches the supergravity result recently found in [22] where the relevant supergravity solution was constructed.

General quivers
Consider a 5d quiver gauge theory with a number N • V and N • V of symplectic and unitary gauge groups, respectively, and matter fields in the fundamental, bifundamental, antisymmetric, or adjoint representations of the gauge groups. The perturbative Bethe potential (3.5) receives contributions from all these fields, but the scaling with N of each contribution depends on the particular weights of the representations. We recall that for U Sp(2N ) gauge group, the fundamental representation has weights ±e i , where e i are unit vectors of R N . The antisymmetric representation has weights ±(e i − e j ) and ±(e i + e j ) with i < j. The adjoint has the same weights as the antisymmetric and also ±2e i . For U (N ) gauge group the fundamental has weights e i , the antisymmetric ±(e i + e j ) and the adjoint ±(e i − e j ) with i < j. We refer to weights with two nonzero entries as "nonlocal weights" as in the continuum limit they lead to nonlocal terms in the Bethe potential. Since a given representation may have both kinds of weights we introduce the continuum notation ρ(u) → ρ(x, y) for the nonlocal terms and ρ(u) → ρ(x) for the local ones, 22 and similarly for the roots α(u). With this notation, using the expansion (3.6) and rearranging the various terms that appear, the Bethe potential reads We see that the various terms have different scalings in N : 1 + 2α, 2 + 3α, 2 + α, 1 + 3α, 1 + α. In order to have a nontrivial saddle at large N both a quadratic and linear term in the eigenvalue density must appear at a given order in N . Although in principle there seem to be six cases, demanding α > 0 there are in fact only two scalings that provide a nontrivial saddle point: (I) 2 + α = 1 + 3α ⇒ α = 1 2 ⇒ N 5/2 Higher order to cancel: N 2+3α=7/2 (II) 2 + α = 1 + 2α ⇒ α = 1 ⇒ N 3 Higher orders to cancel: N 2+3α=5 and N 1+3α=4 In each case the cancellation of higher orders is required to avoid a trivial saddle point, which would otherwise render the large N method used here inapplicable. We consider each case in turn.
where c α and c ρ are numerical constants for each vector and hypermultiplet that appear when collecting all the contributions to the integral shown above. For instance, c • V = 1, c • V = 2 for each vector multiplet in the quiver and c Ad = 1, c AS = 1, c BF = 2, c f = 0 for each hypermultiplet. Thus, a constraint is imposed on the number of various fields present in the theory. We have already seen an example of such a relation for type (A) quiver theory in (3.22), where ρ c ρ = 1 + 2k = N AS + 2N BF , which is also equal to α c α = N • V + 2N • V for this quiver. Thus, the Bethe potential for these theories with 23 It should be possible to study quivers with different ranks but we do not consider this here.
-43 -an N 5/2 scaling is given by 24 By comparison with the free energy functional on S 5 for the same theory, it follows that , which is extremized for We now evaluate the on-shell free energy. Taking the logarithm of (3.3) one can see that the Hessian part of the handle-gluing operator does not contribute to leading 24 We note that due to (3.36), the − 1 6 (1+4Q 2 ) part in the terms of order N 2+α in (3.35) also cancels.
-44 -order in N and one finds 25 which using (3.39) can also be written as (3.42) Finally, extremizing with respect to the fugacities gives ρ and evaluating at the extremum, Since F S 5 is negative and F S 3 should be positive, we see that for g > 1, the solution with + sign should be chosen above and for g = 0, the solution with − sign. This sign then suggests the introduction of κ, the normalized curvature of Σ g defined below (2.60), by rescalingn ρ →n ρ κ , giving One can also make sense of the above expression for κ = 0 (as in [22] for the Seiberg theory) by considering the limit g−1 κ → −4π,n ρ →n ρ 2π , resulting in the relation (II) Theories with N 3 scaling gauge groups and k bifundamental hypermultiplets. The maximal theory is obtained for k = 1 when the bifundamental multiplet turns into an adjoint one. We also note a linear quiver with k SU (N ) gauge groups and k − 1 bifundamentals, and an additional adjoint matter on one node (see Figure 3) satisfies (3.36) and (3.46). An example with U Sp(2N ) group is the Seiberg theory with N f = 8 or E-string theory. In addition, all the three classes of orbifold theories studied above with N f = 8 also give rise to N 3 scaling of the free energy.

Holography
On general grounds, we expect the gravity dual of a 5d SCFT on S 3 × Σ g with a partial topological twist on Σ g to be given by a supersymmetric solution interpolating between asymptotically locally AdS 6 at infinity (with an S 3 × Σ g boundary) and an AdS 4 × Σ g geometry for small values of the radial coordinate. 26 In the case of a universal topological twist (n = 0) it was argued in [21] that such a solution, originally found in [68,69], is given by an extremal 2-brane solution in minimal 6d F (4) gauged supergravity, with metric of the form which is supported by a nontrivial magnetic flux for a U (1) ⊂ SU (2) graviphoton on Σ g and a nontrivial scalar ϕ(r). 27 The interpolating solution, which exists only for g > 1, preserves four real supercharges and can be found numerically. As the radial coordinate goes to r → ∞ the metric is locally asymptotic to AdS 6 with unit radius and as r → 0 it is of the form AdS 4 × Σ g , with sizes e 2f (r) = 1 r 2 2 3/2 3 −3/2 and e 2g(r) = 2 1/2 3 −3/2 , and the free energy given by [21] F sugra S 3 ×Σg = − where F S 5 is the free energy of the 5d field theory on S 5 . The crucial point, emphasized in [21], is that upon uplift to massive IIA on topologically S 4 , the solution (3.47) describes the twisted compactification of any 5d N = 1 theory with a gravity dual and thus (3.48) holds for any such compactification. 28 Indeed, this is corroborated by our field theory results; setting Q = 1 for the round S 3 , κ = −1, and n ρ = 0 in (3.45) we see this exactly matches (3.48). The existence of this holographic flow is thus strong evidence for the existence of a large class of 3d SCFTs arising from compactification of 5d N = 1 theories, at least at large N , for the universal twist. We emphasize that the free energy of these 3d theories scales as N 5/2 rather than the more standard N 3/2 or N 5/3 scaling of 3d theories with gravity duals. The general result (3.45) suggests that a larger class of such holographic flows should exist, whose endpoint is described by a discrete family of 3d SCFTs labeled by the integers n ρ for each 5d parent theory. The simplest example is the Seiberg theory with a nonzero flux for the Cartan of SU (2) M . The explicit holographic RG flow in this case was constructed for Q = 1 in [22]. Indeed, specifying (3.45) for this case exactly matches the supergravity result (see Eq. (1.1) in [22]). It would be interesting to construct the analogous holographic RG flows for the orbifold theories considered in detail in Section 3.1, which now have a number of flavor symmetries visible at large N and whose free energy is given by (3.34). In general, one should be able to do this for arbitrary values of Q, which would be interesting.
These holographic checks give strong support for the existence a novel class of 3d SCFTs. The results of this paper provide a method for computing the exact partition function of such theories, in principle at finite N .

5d theories, 6d SCFTs, and the 4d index
As reviewed in the Introduction, some 5d gauge theories are believed to be low energy descriptions of certain 6d SCFTs compactified on a circle, S 1 β . The radius of the 6d circle is related to the 5d gauge coupling constant by , (4.1) 28 See also [71] and [72] for similar discussions in other dimensions.
-47 -where λ is a numerical factor which depends on the specific theory under consideration. The prototypical example of this phenomenon, which we will discuss in detail in Section 4.1, is that of the maximally supersymmetric Yang-Mills theory in 5d with an ADE gauge group, which is expected to have a UV completion as the circle compactification of the corresponding N = (2, 0) SCFT. There are also other examples of this phenomenon with N = (1, 0) supersymmetry, including theories obtained by orbifolding the maximal theory, and the E-string, which uplifts to the 6d E-string theory. When one computes protected observables in these 5d theories on a compact manifold, M 5 , one generally expects that these may be interpreted as observables in the "parent" 6d theory on M 5 × S 1 β . Indeed, this philosophy was applied in the case of M 5 being the squashed five-sphere to study the superconformal index, or S 5 × S 1 β partition function [34,35], as well as other examples; see [4] for a review. In the case of the S 3 b × Σ g partition function, we expect this to compute the partition function of the 6d SCFT on This leads to another perspective on this object, as follows. By compactifying the parent 6d N = (1, 0) theory on the Riemann surface instead leads to a class of 4d offspring theories labeled by the compactification manifold, Σ g , 29 and flavor fluxes, n, which we denote here by T (4d) Σg,n . Then our computation can be interpreted as giving the partition function of these 4d theories on S 3 b × S 1 β (see Figure 4), i.e., The latter is closely related to the 4d supersymmetric index as [73] where the 4d index may be defined as a trace in radial quantization [74,75], where j 1 and j 2 are Cartan generators for the SO(4) ∼ = SU (2) 1 × SU (2) 2 rotation symmetry, and F i run over a basis of the flavor symmetries. The quantity E Casimir , to which we will return to more detail in Section 4.2.1, is the Casimir energy of the 4d theory quantized on S 3 b [73]. The identification of parameters to those appearing naturally in the S 3 b × S 1 β partition function is [45,76]  where ν i are the effective real mass parameters on S 3 b . Using (4.1) we find these are related to the parameters of the S 3 b × Σ g partition function by where γ = − 2πQ g 5 2 . To summarize, this chain of reasoning leads us to identify In this section, we study this relation in more detail. Although in principle this is an exact result, valid for any choice of parameters appearing in (4.8), in practice we are only able to compute the LHS in certain simplifying limits, where the contributions from instantons are under control. We first consider in detail the case of the maximal, N = 2 SYM theory. Due to the extra supersymmetry, this admits a limit where the instanton contribution is very simple, and the partition function can be computed exactly. Then we study the partition function in the "Casimir limit," β ∼ g 5 2 → ∞. Although naïvely the instantons are important in this limit, we find their contribution can be explicitly characterized.

The 5d N = 2 Yang-Mills theory
Let us start by considering the S 3 b × Σ g partition function for the maximally supersymmetric 5d N = 2 Yang-Mills theory with simply laced gauge group G. 30 We will often specialize to the case G = SU (N ) for concreteness, but will keep the discussion general when possible. This theory contains an adjoint hypermultiplet, acted on by an SU (2) F flavor symmetry, 31 for which we include a mass ν and flux n. Then the S 3 b × Σ g partition function of this theory can be written as a sum over Bethe vacua as These operators can be constructed out of the twisted superpotential , (4.10) in the notation of Section 2.4, and similarly for the effective dilaton. We may alternatively decompose this into a perturbative and instanton contribution, and we may write an explicit expression for the first term, as in Section 2.3: In general it is difficult to evaluate the non-perturbative contribution analytically. However, we will describe some simplifying limits below.
To see what the S 3 b × Σ g partition function of this theory corresponds to in 4d, we recall that the 6d UV completion of this 5d theory is the N = (2, 0) theory compactified on a circle of radius . (4.13) In other words, (4.1) holds with λ = 1 in this case. The compactification of the 6d SCFT on a Riemann surface with a topological twist gives rise, in general, to a class of 4d N = 1 SCFTs, which were described as the A N −1 case in [25]. The specific theory depends on the choice of R-symmetry used to perform the twist. If we mix the U (1) R ⊂ SU (2) R symmetry used to perform the topological twist on Σ g with the maximal torus of the SU (2) F flavor symmetry with a coefficientn, this is equivalent to inserting a flux, 32 n =n(g − 1) , (4.14) on Σ g . In the special casen = ±1 , (4.15) 31 Specifically, we have SU (2) R × SU (2) F ⊂ U Sp(4), where the latter is the full R-symmetry group for this theory, and SU (2) R is the 5d N = 1 R-symmetry. 32 In [25] the parameter we calln was denoted by z.
-50 -the twist preserves N = 2 supersymmetry in 4d, and gives rise to the theories of class S [23]. Let us denote the theory for general choices of flux, n, by T (4d) Σg,n . As a special case of the 4d-2d correspondence, we may relate the index of this 4d theory to the partition function of a suitable 2d TQFT [77,78]. Then it is clear from the logic above that this TQFT is precisely the A-twist of the effective 5d N = 2 theory compactified on S 3 b . In other words, we have where the RHS may be interpreted as a TQFT living on Σ g . In particular, in writing the RHS as a sum over Bethe vacua, as in (4.9), we exhibit this TQFT structure explicitly. While we expect the relation (4.16) to hold for general parameters, it is in general difficult to evaluate the S 3 b × Σ g partition function explicitly due to the nontrivial instanton contributions. Thus we first consider a special limit, where their contribution simplifies significantly. We will see this limit turns out to be related to the "Schur limit" of the 4d N = 2 superconformal index [28]. We then briefly comment on the general case.
The Schur limit. Let us first consider the perturbative contribution to the (ungauged) partition function in more detail. Using (4.12), and working in terms of the untilded variables, we have 33 Then, using the following identities of the double sine function, 20) 33 Here we recall the product with the prime includes only the non-zero roots, while the unprimed product includes all roots. 34 In [79] this limit of the S 3 b partition function was shown to correspond to the dimensional reduction of the Schur limit of the supersymmetric index.
-51 -we find the perturbative contribution simplifies to where we simplified the Cartan contribution of the adjoint hypermultiplet using In particular, we see the dependence on the gauge flux m, and hence also the perturbative Bethe equations, are very simple.
Next, we consider the instanton contribution, which can be written as Here the parameter, y ( ) , for the flavor symmetry is given by, using (2.108),  Let us now specialize to the case G = SU (N ). Then we note the following simplification of the instanton contribution to the Nekrasov partition function of the N = 2 theory: This is derived in Appendix B, and was also noted in the context of the S 5 [34] and CP 2 × S 1 [35], partition functions. Then we see that if we set n = 1 we have (4.28) On the other hand, we expect the instanton contribution to the integrand of the S 3 b ×S 2 partition function to be equal to (4.29) Equating these expressions for n = ±1, we deduce that (up to a sign) The last relation also implies that there is no instanton contribution to the Hessian determinant appearing in the handle-gluing operator. It will be convenient to rewrite the η functions appearing in the handle-gluing and flux operators to relate them to the index parameters in (4.7), Namely, using the modular properties of the η functions, we have We may now write the full, non-perturbatively complete operators for the S 3 b × Σ g partition function in the limit (4.18). We have 2 sinh (πb −1 α(u)) 2 sinh (πbα(u)) , (4.33) Note that the Hessian determinant contributes a factor of γ N −1 , which precisely cancels against the factors of γ from (4.32), and similarly the factor of b −(N −1) from the Cartan component of the adjoint hypermultiplet precisely cancels the factors of b from (4.32).
It is now trivial to write the solutions to the Bethe equations, Π a = 1, which are given byû where λ a ≡ K −1 ab n b runs over the coroot lattice of G as we vary over n b ∈ Z. Without loss of generality, we may restrict to coroots in the interior of the fundamental Weyl -53 -chamber, 35 or equivalently, those which can be written as δ + λ, for λ a dominant coroot, and δ the Weyl vector of G. Then the set of Bethe vacua is It remains to compute the partition function by evaluating the flux and handlegluing operators at the above Bethe vacua. First we observe 37) and similarly where R λ is the representation with highest weight λ, where we have identified the coroot and weight lattices using the Killing metric, and dim p R is the "quantum dimension" of a representation R of G. Here we have made the identification to the parameters of the 4d index in (4.31). Finally, V (p) is the polynomial (here we specialize again to SU (N ), but the generalization is straightforward) Putting this together, we see that the S 3 b × Σ g partition function for the N = 2 SU (N ) theory, in the limit (4.18), is given by (4.40)

4d interpretation
As described above, we expect this observable to compute the 4d superconformal index of the theory T (4d) Σg,n . Specifically, using the map (4.7), we can see that the limit (4.18) corresponds to setting the fugacity µ corresponding to this flavor symmetry in 4d as µ = p . In the case of N = 2 class S theories, µ is usually referred to as t, and is the fugacity for the U (1) r symmetry in the 4d N = 2 algebra. This limit of the index was first studied for the N = 2 class S theories in [28], where it was referred to as the "Schur limit" of the index. It was later generalized to the 4d N = 1 theories corresponding to a more general choice of flux, n, in [29], where it was referred to as the "mixed Schur index." The general result they found for the 4d index can be written in our notation as (4.42) where the sum is over representations, R λ , of SU (N ), labeled by weights λ, p and q are the parameters of the index, and Comparing to (4.40), we see these agree for general choices of genus g and flux n, up to an overall factor of 36 Using (4.6), we may rewrite the powers of p and q appearing here as As we show in Appendix A this prefactor precisely matches the Casimir energy of the 4d theory (see (A.20)) and thus we precisely recover the expected relation (4.4) between the S 3 b × Σ g partition function and the 4d index of these 4d N = 1 theories. This serves as a strong consistency check of our calculation. We discuss the Casimir energy for general parameters and more general theories in Section 4.2.1.
General parameters. Above we considered the partition function in a very special limit of parameters, where it drastically simplified, leading to an explicit evaluation formula. A natural and (as far as the authors are aware) open question is to compute the 4d index of class S theories for more general choices of the parameters, and in particular, find the dual TQFT that describes it.
In principle the results derived above imply that the answer to this question is controlled by the Nekrasov-Shatashvili limit of the 5d instanton partition function of 36 The terms proportional to N −1 24 in the exponents arise due to the relation between the Dedekind eta function and the q-Pochhammer symbol, i.e., η(q) = q 1 24 (q; q).
-55 -the maximal N = 2 SYM theory. That is, the TQFT in question is governed by the twisted superpotential Then the equations determining the supersymmetric vacua of the effective 2d theory, and hence the states of the 2d TQFT, are given by solving the Bethe equations, By the gauge-Bethe correspondence, it is known [19] that the vacuum equations associated to the NS-limit of the instanton partition function are equivalent to the Bethe equations of a certain integrable system. In the case of the 5d N = 2 theory, this system is a quantization of the relativistic Calogero-Moser system, also known as the Ruijsenaars-Schneider (RS) model [80]. The relation between the 4d index and this integrable system was already pointed out in [81], where they observed that the indices of class S theories are naturally eigenfunctions of certain difference operators associated to the RS model. We expect this relation can be naturally understood in the above framework. Moreover, it would be interesting to explore whether the perspective above allows one to practically compute the 4d index of non-Lagrangian class S theories, which is a long-standing open problem. 37 We hope to return to this in future work.

5d N = 1 theories
We now consider the case of N = 1 theories with a 6d N = (1, 0) UV completion. We consider two known examples in detail. The first example is a set of 5d circular quiver gauge theories whose UV completion is a Z k orbifold of the 6d A N −1 theory, and which give rise, upon compactification of the 6d theory, to the 4d theories of class S k [84]. The second example is the Seiberg theory in the special case N f = 8, whose UV completion is the so-called E-string theory [5,85]. The twisted compactifications of these two classes of theories were considered in [26] and [27], respectively. Then, as for the maximal theory above, we expect that the S 3 b × Σ g partition function of these 5d theories computes the 4d index of the corresponding 4d theories.
We also expect the S 3 b × Σ g partition function of these 5d theories, and therefore the supersymmetric indices of the corresponding 4d theories, to be related to an appropriate integrable system, through the gauge-Bethe correspondence for the Nekrasov-Shatashvili limit of the 5d instanton partition function [19]. Indeed, a connection of the corresponding 4d models to integrable systems was observed in these two examples, namely, to a generalization of the RS model discussed in [84,[86][87][88] for the class S k case, and to the van Diejen model in the E-string case [89]. It would be interesting to use the computation above to shed more light on the connection between these gauge theories and integrable systems. As in the N = 2 case discussed above, this requires a detailed understanding of the instanton corrections to the partition function.
In the present work, we will limit ourselves to a simplifying limit where we may evaluate the S 3 b × Σ g partition function analytically. Specifically, we will consider the partition function in the strong coupling limit, g 5 → ∞. Although naïvely in this limit we expect the contributions from instantons to be large, we will see that in fact their contribution in this limit can be simply characterized, and so we may compute the leading behavior of the partition function analytically.
We first study the general behavior of 5d theories with 6d completions in the strong coupling limit in Section 4.2.1. We then describe the instanton corrections arising in this limit, and in the process conjecture a general condition for 5d theories to admit such 6d completions in Section 4.2.2. Finally, we compute the S 3 b ×Σ g partition function this limit for the N = 2 theory, as well as two examples mentioned above, and compare to the corresponding 4d computations, in Section 4.2.3.

Casimir energy
We begin by showing that for generic theories with a 6d UV completion, the strongcoupling limit g 5 → ∞ of the partition function exhibits the behavior where β is the radius of the 6d circle, related to g 5 via (4.1). The quantityÊ Casimir appearing here has the following interpretation. In theories with a 6d UV completion, the limit g 5 → ∞ corresponds to the β → ∞ limit of the 6d partition function on S 3 b × Σ g × S 1 β . Since in this limit the partition function is dominated by the vacuum state,Ê Casimir denotes the vacuum energy of the 6d theory quantized on S 3 b × Σ g . Equivalently, by shrinking Σ g to zero size, it also corresponds to the Casimir energy of the 4d theory thus obtained, quantized on S 3 b . On the other hand, this Casimir energy can be independently computed from the anomaly polynomial, I 8 , of the parent 6d theory (see Appendix A for details) by performing the topological twist, integrating over the Riemann surface, and applying the method of equivariant integration of [90], i.e., (4.49) -57 -For consistency, the two quantities obtained from (4.48) and (4.49) should coincide: E Casimir = E Casimir . We have already seen an example of this in (4.45) for the Schur limit. In the case of N = 1, however, to make the computation feasible we limit ourselves to the perturbative partition function in (4.48). Thus, we expect the Casimir energy extracted from there to differ from the exact result (4.49). Nonetheless, the difference can be easily characterized. Namely, decomposing I 8 = I 8,free + I 8,int , where I 8,free is the contribution from all the free multiplets in the tensor branch of the theory, and I 8,int is the remaining part, each term gives a corresponding contribution to (4.49).
Then, we will find that the perturbative result matches exactly the latter and thus, for consistency, the instanton contribution must be given by the former: The analogous observation for the case of S 5 was already made in [90], suggesting a deeper understanding of this fact. We now proceed with the explicit computation.
Computation of the S 3 b × Σ g partition function in the g 5 → ∞ limit. To study this limit, it will be useful to go to the Bethe sum formulation of the partition function. Let us consider a general 5d theory, with gauge group G and hypermultiplets in a representation R = i R i of G. 38 Then recall the Bethe equations are given by where Π inst a is the contribution from instantons, and we recall (4.52) Then the limit (4.48) corresponds to taking γ → 0, so we consider the solutions to (4.51) in this limit. More precisely, we expect the partition function to be divergent in this limit, so we are interested in the solutions which contribute to the leading divergence. Let us first ignore the contribution of the instantons. Then we see that, for any solutions at finite u, the exponent in the first factor of (4.51) becomes negligible as γ → 0. Then we expect these solutions to have a finite contribution to the partition function as γ → 0. Since we are interested in extracting the leading divergence in the limit (4.48), we instead look for solutions at large u, scaling with γ −1 . These can arise due to competition between this exponential factor and the double sine functions in (4.51).
Since we are working at large u, it will be useful to recall the expansion of the double sine function, as in (3.8), where Q = 1 2 (b + b −1 ). At this point we must determine the sign of ρ(u) for each weight ρ. Without loss of generality we may take u to lie in the fundamental Weyl chamber. For certain representations, such as the adjoint, this fixes the sign of ρ(u) for all weights ρ. In this case we will call a weight "positive," and write ρ > 0, if ρ(u) > 0 for u in the chosen fundamental Weyl chamber, generalizing the notation for weights of the adjoint representation. For general representations, we may need to say more about the region where u lies before making this split into positive and negative weights, but we will not consider such representations here. 39 We also restrict to representations that are self conjugate, and then we may group the weights into pairs, (ρ, −ρ), where ρ > 0. Then let us define, for a general such representation R of G, For example, for R = Ad, the adjoint representation, C a Ad = δ a , where δ = 1 2 α>0 α is the Weyl vector of the group.
With this background, and using (4.53), we may approximate the LHS of the Bethe equations by Generically, the term quadratic in u will dominate the first term at large u, and then the solutions will not scale with γ −1 as γ → 0. However, suppose we consider a theory with field content such that 40 39 For example, for the fundamental representation of SU (N ), specifying we are in the fundamental Weyl chamber, with u 1 > ... > u N does not specify the sign of all u i ; there are still N − 1 regions in this chamber where the separation into positive and negative weights are distinct. 40 We note the same relation can be derived from the conditions (3.36) and (3.46) discussed in Section 3 as the condition to obtain N 3 scaling of the free energy.
-59 -then (4.55) simplifies to (after using ν = −iQν) . (4.57) The solutions in this limit are then found by setting the exponent equal to −2πin a , n a ∈ Z, and we havê and we indeed find the expected scaling with γ −1 . Here we must choose the n a such that u lies in the interior of the fundamental Weyl chamber, as in the Schur limit discussed above. So far we have ignored the contribution of instantons to the Bethe equations. As we will argue in Section 4.2.2 below, we expect these to have a subleading contribution at large u, and so we assume now that we may ignore their contribution in the Bethe equations above.
It now remains to evaluate at the Bethe vacua (4.58). Since we are interested in extracting the leading divergence as γ → 0, we will look for the vacuum which has the dominant contribution in this limit. As before, we first consider the perturbative contribution Expanding these at large u using (4.53), we find (definingn i = n i g−1 as in the previous subsection) For γ → 0, the contribution from the Hessian factor is subleading, and we may approximate the contribution from the Bethe vacuum, (4.58), as (4.64) The final step is to determine the vacuum,û (n) , which has the leading contribution to the Bethe sum. Recall that we assume u lies in a fundamental Weyl chamber, and so we may choose the n b to take u arbitrarily large within this chamber. For concreteness, let us take the basis, e a , of the Cartan to be dual to the fundamental weights, so that c a e a spans the interior of the fundamental Weyl chamber as we take c a > 0. Then we see that, in this basis we must impose otherwise, by taking an appropriate n a large we can arrange the RHS of (4.64) to be arbitrarily large, and we do not find a well-defined γ → 0 limit. With this assumption, we can see the dominant contribution comes from taking the n a as small as possible, while keeping u in the fundamental Weyl chamber. In the basis above, this is achieved by setting n a = 0, and so we finally arrive at the leading behavior of the partition function, . (4.66) Given the relation (4.52) and identification (4.1) we see this has the expected behavior (4.48). Specifically, we find , (4.67) where the label "pert" denotes that this has been computed using the perturbative approximation to the S 3 b × Σ g partition function. We turn to consider the instanton contributions next.

Instantons, the 5d prepotential, and a 6d uplift condition
So far we have ignored the contribution of instantons in the above analysis, and only used the perturbative approximation to the partition function. We argue that these have a subleading contribution to the twisted superpotential in the regions of large u. Therefore we expect they will not modify the analysis of the Bethe solutions obtained using the perturbative twisted superpotential above.
To motivate this claim, note that taking large u is equivalent to exploring the asymptotic region of the Coulomb branch, where we expect the theory to be weakly coupled, and dominated by the perturbative calculation. In fact, we claim that the large u behavior of the twisted superpotential, which controls the flux operator Π a appearing in the Bethe equations, is related to the effective 5d prepotential, F ef f , which is known to be perturbatively exact. Namely, using (4.53) we may write This means the behavior of the perturbative twisted superpotential of the theory at largeũ is given by 41 But the quantity in parentheses is precisely the effective prepotential of the 5d theory [5], as in (2.7). A similar relation was noted for the integrand of the S 5 partition function in [62]. Given that the prepotential of a 5d theory does not receive nonperturbative corrections, it is then natural to make a similar assumption for the large |ũ| behavior of the twisted superpotential, and hence for the Bethe equations. In light of the relation above, the condition (4.56) can be equivalently phrased by saying that, in the notation of (2.7), i.e., the effective CS term vanishes for every direction in the Coulomb branch of the 5d theory. As we saw above, when this condition is satisfied, we find the partition function has a leading divergence with log Z ∼ γ −1 as γ → 0, which is the expected Casimir behavior of a theory with an emergent circle of radius β ∼ γ −1 . Thus we may conjecture that the condition (4.56) (or equivalently (4.70)) is the relevant condition for the 5d theory to admit a 6d UV completion. We will see in examples below that this is indeed satisfied in several examples where a 6d UV completion is expected to exist. It would be interesting to explore this conjecture further. In addition to the Bethe equations, we did not include instanton contributions when substituting the Bethe solutions into the sum over vacua in (4.59). In fact, we will see below that these do have a nontrivial contribution, but they can be explicitly characterized in terms of free fields of the 6d theory as already mentioned above (4.50).

Examples
Let us now consider some examples of the Casimir energy computation in 5d theories that are believed to admit a 6d UV completion.
Maximal theory. We begin with maximal 5d N = 2 super Yang-Mills with gauge group G, consisting of an N = 1 vector and an adjoint hypermultiplet, with massν. In this case (4.66) gives where d G and h G are the dimension and and dual Coxeter number of G, respectively. For example, for G = SU (N ), we have Using (4.52) and (2.41) we thus have Now, with the identification β = g 2 5 2π (i.e., λ = 1) we see that the partition function has the expected behavior (4.48), witĥ This may be compared to the exact Casimir energy, computed from the anomaly polynomial of the 6d theory in Appendix A.1. As discussed there, separating the contribution from free fields to the anomaly polynomial and the remaining part one can write -63 - where is the parameter controlling the mixing of R-symmetry with the flavor symmetry acting on the (adjoint) hypermultiplet; see (A.3). We see that identifyingν = , the perturbative localization calculation (4.75) coincides with (4.76). Thus, for consistency, the instanton contribution to the partition function should match the remaining free field contribution (4.77), as claimed at the beginning of Section 4.2.1. Next, we provide more examples of the same phenomenon.
Class S k Theories. These theories have k SU (N ) vector multiplets and k bifundamental hypermultiplets, forming a circular quiver [84]. Let us assume that all the u a 's have the same solution. In this case each bifundamental contribution to the BAE is essentially that of an adjoint in which case we simply obtain k times the contribution of maximal theory in the Casimir limit, Again, identifyingν = and the 6d radius with λ = k, i.e., , (4.79) we see that the perturbative Casimir energy readŝ which precisely matches (A.30). Thus, we see that the missing instanton part (A.31) is again identified with the contribution of free fields to the anomaly polynomial (A.32).
E-string. Next, we consider the 5d E-string theory, a 5d N = 1 U Sp(2N ) theory with N f = 8 fundamental hypermultiplets and an antisymmetric hyper. First we will need to compute the quantities C abc R and C a R for the various representations. We find, working with u = (u a ), a = 1, ..., N , in the fundamental representation Then note that C abc and thus (4.56) is satisfied precisely for N f = 8 fundamental hypers. In this case, plugging these into (4.66), we have . (4.84) We may simplify this using which gives We may further expand this, using which matches (A.37) provided λ = 2. This means the 6d radius is identified, as in [90], to be . (4.90) Thus, once again, the instanton part (A.38) missing from the above calculation is identified with the contribution of free fields to the anomaly polynomial (A.39).
Summary. We have argued that computing the S 3 b × Σ g partition function for theories with a UV completion as 6d N = (1, 0) theories is equivalent to computing the S 3 b ×S 1 partition function (or index, up to the Casimir energy), of the corresponding 4d N = 1 theories obtained by compactification of the 6d theory on Σ g . We have checked this explicitly for the case of 5d maximal SYM and the corresponding 4d N = 1 and N = 2 class S theories of [23][24][25] in the mixed Schur limit, finding perfect agreement with [29]. We then considered examples of 5d N = 1 theories. In this case we do not have an explicit handle on instanton contributions and we limited ourselves to computing the partition function asymptotically on the Coulomb branch, where instanton contributions are suppressed and the partition function is expected to be dominated by the Casimir energy, which we extracted. We find an exact match with an independent calculation of the Casimir energy from anomaly polynomials, up to the expected instanton corrections which, for consistency, should be identified with the contribution of free fields to the corresponding 6d anomaly polynomials, as noted in the case of S 5 in [90].
5 Twisted partition function on S 2 × S 1 × Σ g and AdS 6 black holes Although the main focus of this paper has so far been the partition function on S 3 b × Σ g , we observed in Section 2.4 that there is a natural generalization of the above computation to M 3 × Σ g for M 3 a general lens space, L(p, q), using the factorization of the twisted superpotential into "holomorphic block"-like contributions, as in (2.129). In this section we briefly consider the simplest example, that of the space M 3 = S 2 × S 1 , corresponding to the topological index in 3d [8].
After writing the result for the partition function on S 2 × S 1 × Σ g according to the above framework in Section 5.1, we conjecture a natural generalization for the partition function on Σ g 1 × Σ g 2 × S 1 , which we claim is valid perturbatively, and so also in the large N limit. Based on this conjecture, we reproduce in Section 5.2 the microscopic entropy of an infinite class of black holes in AdS 6 .

Partition function on
Let us first consider the case where M 3 corresponds to the "refined" topological index, S 2 q 1 × S 1 , with a fugacity q 1 for the angular momentum. 42 Then we may build the integrand of the full S 2 q 1 × S 2 × S 1 partition function by including the contribution of the 5d Nekrasov partition function at the four fixed points, as in (2.123), namely, where now the parameters can be identified by a straightforward modification of the argument leading to (2.108), giving = ns or ss Then, using (2.126) and arguing as before, we find that the twisted superpotential controlling the partition function on S 2 q 1 × S 1 × Σ g is given by and similarly for the effective dilaton, Ω S 2 q 1 ×S 1 ×R 2 (ũ,ν,γ) m 1 ,n 1 . An important difference from the S 3 b case is that the dependence on the fluxes, m 1 , n 1 , on S 2 q 1 cannot be absorbed into a shift ofũ andν. As a result, we obtain a direct sum of 2d theories indexed by the gauge flux, m 1 ∈ Λ G . Then we may write the full partition function as 43 The subscript "1" denotes this S 2 sits as the first factor in the manifold, to avoid confusion below. 43 Here we denote the fluxes on Σ g with a subscript "2" to distinguish them from those on S 2 q1 .
Let us now focus on the unrefined limit, q 1 → 1, corresponding to the ordinary Atwist background on S 2 . We first discuss the perturbative contribution to the partition function in this limit. For a single hypermultiplet, we have, by taking the 1,2 → 0 limit of (2.101) using (2.86), where we introduced a function (5.8) The perturbative contribution for a general hyper and vector multiplet can be obtained similarly. Equivalently, these can be obtained as in Section 2.3 by reduction on Σ g to a 3d theory on S 2 × S 1 . In either case, we find the perturbative approximation to the integrand of the S 2 × S 1 × Σ g partition function is given by where the index I runs over the hypermultiplets in the theory, in gauge representations R I . Then the perturbative partition function is given by the integral formula Equivalently, we may write this as a Bethe sum associated to the 2d theory obtained by compactification on S 2 × S 1 as in (5.4), where now, to perturbative accuracy, ∂ ∂ũ b log Π pert a (ũ,ν,γ) m 1 ,n 1 is the Hessian factor.
5d prepotential and the Bethe equations. We can gain another perspective on this calculation, and characterize the instanton contributions, by observing the leading behavior of the Nekrasov-Shatashvili limit of the twisted superpotential in the → 0 limit [19], where F R 4 ×S 1 (ũ,ν,γ) is the effective prepotential of the 5d theory compactified on a circle [91]. Then we have, from (5.3), that the flux dependence of the twisted superpotential on S 2 × S 1 × R 2 is governed by the 5d prepotential, via We can see this dependence on the fluxes explicitly at the perturbative level. For example, for a hypermultiplet, we have Z pert,U (1),hyp 14) where w(ũ) is the perturbative contribution to the effective prepotential of a 5d N = 1 hypermultiplet. Then we indeed observe that the dependence on fluxes for the full perturbative contribution is governed by the perturbative prepotential w(α(ũ)) . (5.15) Namely, one can check that the gauge flux operator in (5.11) is given by 16) and similarly for the flavor flux operator.
We expect that the instanton corrections to the S 2 × S 1 × Σ g partition function are given by replacing the perturbative expression for the prepotential above by the full, non-perturbative result, as discussed, e.g., in [91]. However, we will not require these instanton corrections when we consider the large N limit below, and leave a detailed discussion of them to future work.
Before moving on to discuss the large N limit, let us conjecture a generalization to the perturbative result above where S 2 is replaced by Σ g 1 (and correspondingly we -69 -rename Σ g → Σ g 2 ). This can be motivated as in Section 2.3, by reducing the theory on Σ g 2 and considering the Σ g 1 × S 1 partition function of the resulting theory. This leads us to propose Since the reduction to 3d gave us the correct perturbative contribution to the 1-loop determinant in the genus zero case, it is natural to conjecture the same holds here. However, we do not have a direct localization derivation of this claim, nor do we make any claims about the non-perturbative contribution.

A large N conjecture and AdS 6 black holes
In this final section, we propose a conjecture on the large N behavior of the partition function (5.17), motivated by holography and the entropy of black holes in AdS 6 .
AdS 6 black holes. On general grounds, we expect the gravity dual of a 5d N = 1 SCFT on M 4 × S 1 with a topological twist on M 4 to be given by a supersymmetric solution interpolating between asymptotically locally AdS 6 (with an M 4 ×S 1 boundary) and an AdS 2 × M 4 geometry for small values of the radial coordinate, i.e., an extremal black hole in locally AdS 6 . Such a background was considered in 6d F (4) minimal gauged supergravity in [69], with metric of the form ds 2 BH = e 2f (r) (−dt 2 + dr 2 ) + e 2g(r) ds 2 (M 4 ) , (5.18) and a nonzero flux for the graviphoton through 2-cycles in M 4 , which is Kähler. Since the graviphoton is the only nontrivial 1-form potential, and is dual to the R-symmetry of the field theory, it was argued in [21] that such a background should describe the IR behavior of generic 5d N = 1 theories with AdS 6 gravity duals, with a universal topological twist on M 4 . Taking M 4 = Σ g 1 × Σ g 2 , a product of two negatively curved Riemann surfaces, i.e., g 1 > 1, g 2 > 1, the Bekenstein-Hawking entropy of the black hole reported in [69] can be written as 44 where F S 5 is the free energy on S 5 of the UV 5d SCFT. 44 However, see the comment at the end of this section, which was added in v2 of this paper.
A large N conjecture. In light of the recent success in accounting for the microscopic entropy of AdS 4 black holes from 3d twisted partition functions, initiated in [92] and followed up in [63,64,72,[93][94][95][96], it is natural to ask whether the entropy of AdS 6 black holes is similarly captured by the 5d partition function, i.e., S BH = log Z M 4 ×S 1 , which can be addressed with the results presented here for the case M 4 = Σ g 1 × Σ g 2 . The basic observation we make is the following. Recall that in Section 3, we argued the dominant vacuum contributing to the S 3 b × Σ g partition function was determined by extremizing the Bethe potential, W S 3 b ×R 2 . In the present case (and specializing first to g 1 = 0), we can also attempt to extremize W S 2 ×S 1 ×R 2 , however, in this case we have seen the twisted superpotential and vacuum equations depend on the flux, m 1 , through S 2 . Then we must also extremize over this choice of flux. Given the form of (5.16), which implies this flux dependence is controlled by the prepotential, we will conjecture that at large N the dominant vacuum is found by extremizing the prepotential, F R 4 ×S 1 , itself. As we discuss below, this leads to the expected behavior of the partition function at large N . To fully justify this would require a detailed analysis of the matrix model (5.17) and the corresponding vacua arising from performing the double sum over magnetic fluxes m 1 , m 2 and the contour integral over the Coulomb branch. This is an interesting problem, which lies beyond the scope of this paper.
Let us evaluate the prepotential in the large N limit, where it is dominated by its perturbative contribution. Then we simply need the expansion where we defined Cν ≡ 1 6 +ν(1 +ν). Let us consider the Seiberg theory (the extension to the orbifold theories is straightforward). The manipulations are very similar to those of Section 3 and thus here we are more concise. Adding the contributions to the prepotential (5.15) from the vector, antisymmetric and fundamental hypers (with corresponding real masses, which we denote byν I = −∆ I ), and using the Ansatzũ i → iN α x for the eigenvalue distribution we see that α = 1 2 is required to have a nontrivial extremum, hence an N 5/2 scaling of the prepotential, and the classical term in (5.15) is subleading. After a convenient rescaling of the coordinate, x → 2 3 ∆ AS (1 − ∆ AS )x, and corresponding inverse rescaling of the density ρ, we find where all integrals run from 0 to x * . Note that to this order in N this depends only on the real mass ∆ AS for the antisymmetric field, but not on the one for the fundamental fields and that the quantity inside the brackets is precisely the free energy functional on S 5 for the theory, with saddle point configuration (3.15). An analogous calculation can be done for the (A, B, C) orbifolds of the Seiberg theory, with the same conclusion. Given the similarity of the discussion in Section 3 for S 3 b × Σ g this leads us to conjecture, as mentioned above, that at large N the partition function is dominated by the eigenvalue distribution that extremizes the 5d prepotential.
Next, to determine the value of the partition function on the eigenvalue distribution above, one should determine the dominant contribution in different gauge flux sectors, m 1 , m 2 . Let us now observe that the zero gauge sector, m 1 = m 2 = 0, reproduces the RHS of (5.19). Indeed, setting n 1 = n 2 = 0 in (5.17) for the universal twist, performing the rescaling of the coordinate mentioned above (5.21), and evaluating the zero gauge flux partition function on the configuration (3.15), we obtain 45 log Z m=0 Then, extremizing this expression with respect to the real mass parameter (or fugacity, ∆ AS ), as in [92], sets ∆ AS = 1 2 , with value at the extremum log Z m=0 which coincides with the RHS of (5.19).
Comment added in version 2: In light of the new paper [97], noting that the black hole reported in [69] needs to be corrected, 46 and, correspondingly, its entropy (5.19), we discuss how the results above relate to this observation. To summarize, the main points emphasized in v1 (and which are unchanged in v2) are as follows: a) We have proposed that the eigenvalue configuration dominating the large N behavior of the partition function is obtained by extremizing the 5d prepotential, and showed (after appropriate rescalings) that this coincides with the configuration extremizing the free energy of the same theory on S 5 . 45 Here we used the expansion s(z) ≈ −π|z| for z real and large, |z| 1. Additionally, as in the case of the S 3 b × Σ g partition function, we expect the contribution from the Hessian determinant to be subleading at large N , which we assume. 46 We thank Minwoo Suh for sharing this result with us prior to publication.
-72 -b) Evaluating the partition function on this extremum, and keeping only the zero gauge flux sector, reproduces the entropy of the AdS 6 black hole described in [69].
Due to the exact match of (5.23) with (5.19), this suggests that the zero gauge flux sector completely accounts for the entropy of the black hole described in [69], as noted in v1 of this paper on the arXiv. However, as mentioned above it was recently pointed out in [97] that the background of [69] may not be valid, as it assumed the vanishing of the two-form gauge field, B µν = 0, which is inconsistent with the equations of motion. Instead, it was shown that by solving for B µν from the equations of motion, that the corrected supersymmetric solution has twice the entropy [97]: Indeed, we note that this new result is consistent with first reducing from 5d to 3d via the universal relation F S 3 ×Σg 1 = − 8 9 (g 1 − 1)F S 5 of Section 3 and then reducing from 3d to 1d via the universal relation F Σg 2 ×S 1 = −(g 2 − 1)F S 3 discussed in [72]. Then, composing these two relations leads to F Σg 1 ×Σg 2 ×S 1 = 8 9 (g 1 − 1)(g 2 − 1) F S 5 , consistent with (5.24) and the expected identification S BH = log Z Σg 1 ×Σg 2 ×S 1 .
Assuming this new solution to be correct, the zero gauge flux sector (5.23) then accounts for only half the entropy of the corrected solution. Thus, it seems that to account for the full entropy one must also include contributions from non-zero gauge flux sectors. An interesting proposal on how to do so is discussed in [30] and, indeed, following the procedure described there one obtains the remaining half of the entropy, matching (5.24) and clarifying an initial numerical mismatch. It would be interesting to have a first-principles understanding of this proposal purely in field theory.

Outlook
In this work, we have considered five dimensional N = 1 gauge theories and computed their exact partition function on various manifolds with partial topological twists using localization. As discussed, this is a fruitful vantage point from which we can also access the physics of field theories of various dimensions, from 1d up to 6d, arising at either the IR or UV end of RG flow. There are a number of possible directions for future work.
As discussed in Section 2, one can consider partition functions on M 3 × Σ g with more general M 3 . Our formalism already suggests the result for M 3 a lens space, and we discussed the example of S 2 × S 1 in Section 5, but in principle one can consider arbitrary Seifert manifolds [13]. It would also be interesting to better understand -73 -the relation of our computation to partition functions on more general five-manifolds considered in the literature, such as S 5 , CP 2 × S 1 , S 4 × S 1 , and Y p,q , as well as studying new geometries. For example, Y p,q is topologically an S 1 fibration over S 2 × S 2 , and may be related to our results by introducing a suitable "fibering operator," as in [11][12][13].
For a given M 3 , the partition function of the 3d theory obtained by reduction on Σ g is computed by an appropriate 2d TQFT, in what may be called a "3d-2d correspondence." We described these 3d theories as a direct sum of ordinary 3d theories in Section 2.3, however the full, non-perturbative computation suggests they are something more exotic. The results of Section 3, in particular (3.34), suggest that a large class of novel 3d N = 2 SCFTs exist, arising as the IR fixed point of the orbifolded Seiberg theories in 5d, compactified on a Riemann surface. These are labeled by the discrete flavor fluxes n and their free energy scales as N 5/2 . It would be worth investigating whether some of these theories can be understood purely in terms of simpler building block three-dimensional theories, analogous to T N theories for four-dimensional class S.
The results of Section 4 provide a new method for computing the superconformal indices of non-Lagrangian theories in 4d, by Lagrangian methods in 5d. Our results coincide with those which have been previously computed and in principle provide a powerful tool to compute superconformal indices of these theories, for which very few methods are currently available. In practice, the feasibility of this calculation will depend on whether the instanton contribution is explicitly computable. Conversely, in cases where the 4d theory is Lagrangian, the exact 4d index is computable, and so gives a prediction for the S 3 b × Σ g partition function, which we may use to help characterize the instanton contributions. We may similarly compute the generalized indices of these 4d theories [12,98] by studying the M 3 ×Σ g partition function for more general M 3 . Another obvious generalization is to include punctures on the Riemann surface, which correspond to insertions of local defect operators in the TQFT, and give access to more general 4d theories. Finally, this computation gives a new entry in the gauge-Bethe correspondence dictionary [19], and it would be very interesting to understand in more detail and generality the relation between 4d compactifications of 6d theories and integrable systems, as discussed in some examples in Section 4.
The results of Section 5 and their relation to entropy of black holes in AdS 6 deserve a better understanding. On the field theory side, one should rigorously extend the exact computation of the S 2 × Σ g × S 1 partition function to the case Σ g 1 × Σ g 2 × S 1 , including instanton corrections. It would also be interesting to have a first-principles understanding on the proposed conjecture that the dominant eigenvalue distribution at -74 -large N is given by that extremizing the 5d prepotential. On the supergravity side, it would be interesting to construct extremal black hole solutions with an AdS 2 ×Σ g 1 ×Σ g 2 near-horizon geometry, for generic g 1,2 and flavor fluxes. In particular, nonzero flavor fluxes may allow for solutions with g 2 = 0, in which case we have provided an expression for the full non-perturbative partition function, determined implicitly by studying the Nekrasov-Shatashvili limit of the twisted superpotential. This could allow for precision tests of the ideas presented here, including subleading corrections to the black hole entropy.
We plan to return to some of these questions in future work. by the National Science Foundation under Grant No. NSF PHY11-25915. PMC is supported by Nederlandse Organisatie voor Wetenschappelijk Onderzoek (NWO) via a Vidi grant and is also part of the Delta ITP consortium, a program of the NWO that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DJ thanks the hospitality of ICTS, Bangalore during the visits to two programs: Kavli Asian Winter School 2018 (ICTS/Kaws2018/01) and Quantum Fields, Geometry and Representation Theory (ICTS/qftgrt/2018/07), where part of this work was done. DJ also thanks the hospitality of IMSc, Chennai where a part of this work was done and presented.

A Casimir Energy on
Here we provide some general formulas for the Casimir energy for the 4d theories obtained by twisted compactification of 6d N = (1, 0) theories. The expression is obtained by twisting the 6d anomaly polynomial, I 8 , integrating over the Riemann surface to obtain the anomaly polynomial of the 4d theory, and then using the results of [90,99], i.e., where Σg is a regular integral over the Riemann surface, ε is an equivariant integral. We give an explicit expression below (namely (A.8)) for a rather general 6d N = (1, 0) -75 -theories and consider in detail the examples of the 6d N = (2, 0) theory, its orbifolds, and the E-string theory. As discussed in Section 4.2.1 this quantity matches with the one extracted from the corresponding S 3 b × Σ g partition function. We begin by assuming the untwisted 6d anomaly polynomial is of the form 47 Here A, B run over all global symmetries of the theory (both R-symmetry and flavor symmetries), C 2 are their corresponding second Chern classes, and k AABB = k BBAA the anomaly coefficients. p 1,2 (T M ) are Pontryagin classes for the tangent bundle T M , and k 1,2 are the corresponding gravitational anomaly coefficients. Performing a topological twist on Σ g by U (1) R ⊂ SU (2) R and a generic U (1) F subgroup of the flavor symmetry amounts to the replacements where the sum over j is over all simple commutants of U (1) F in the full flavor group, and F controls the amount of mixing of the R-symmetry with the flavor symmetry along the flow to the IR. We now implement the twist (A.3) in I 8 and integrate over the Riemann surface, normalized as Σg t g = 1 2π Vol(Σ g ) = η Σ , with η Σ = 2|g − 1| for g = 1 and η Σ = 1 for g = 1, to obtain a six-form anomaly polynomial. Comparing this to the anomaly polynomial for a 4d theory, where ellipses denote contributions involving the flavor symmetries, we read off the 4d R-symmetry anomaly coefficients: where we have defined R =n R = 1 to write the expressions in a compact form.
We may now use these to compute the Casimir energy of the 4d theory on S 3 b . Recall this is generally given in terms of the R-symmetry anomaly coefficients by [90,99,100] where ω 1,2 are the squashing parameters of the S 3 b , which in our conventions are given by Plugging the anomaly coefficients (A.5) into (A.6) then gives the desired expression E Casimir = 8π(g − 1) k AAn A A + 16π(g − 1) This represents the full Casimir energy for the theories at hand. It can be viewed as the Casimir energy of the 6d N = (1, 0) theory, quantized on S 3 b × Σ g or as the Casimir energy of the 4d theory obtained by reduction on Σ g , quantized on S 3 b . As we discuss in the main text, this should coincide exactly with the expression derived from the non-perturbative partition function on S 3 b × Σ g . However, since in practice we can often only evaluate the perturbative part explicitly, it is convenient to decompose this as where E pert is, by definition, the quantity extracted from the perturbative S 3 b × Σ g partition function and E non−pert is the remaining part. As we shall show below, in all the examples we study the remaining part is due to the contribution to the 6d anomaly polynomial from free multiplets. That is, decomposing I 8 = I 8,int + I 8,free where I 8,free is the contribution from all the free multiplets in the tensor branch of the theory and I 8,int is the remaining part, we find The analogous observation for the case of S 5 was already made in [90]. 48 The new examples we provide suggest there should be a deeper understanding of this fact, which we do not address here.

A.1 5d maximal theory and class S
The simplest example is 5d N = 2 SYM theory, consisting of an N = 1 vector and a hypermultiplet in the adjoint representation of the gauge group G. This theory is believed [101] to correspond to the 6d N = (2, 0) theory on a circle S 1 β , with radius β = g 2 5 2π , (A.11) with g 5 the gauge coupling constant of the 5d gauge theory. The anomaly polynomial of the 6d (2, 0) theory is given by where A 8 (1) is the anomaly polynomial of one free tensor multiplet, Then, comparing the anomaly polynomial to (A.2) we read off the corresponding anomaly coefficients, and using these in (A.8) gives E Casimir = π 6 (g − 1)(N − 1)(1 +n ) where we have specified G = SU (N ) and used d G = N 2 − 1 , r G = N − 1 , h G = N . We wish to compare this to the quantity extracted from the 5d localization computation. With this in mind, let us split the quantity above into the two pieces: E non−pert = π 6 (g − 1)(N − 1) 1 +n + 2n ( 2 − 1)Q 2 . (A.17) As discussed in the main text one can easily check that the perturbative Casimir energy matches the contribution from the last term in (A.12), while the remaining nonperturbative part is entirely due to the free part, In general, we expect instantons in the 5d computation to contribute r G ε Σg A twisted We note this has a very similar form to (A.12). 53 Indeed, from the 5d localization calculation we find the perturbative part of the Casimir energy arises entirely from the terms in the second line of (A.29), and is given by while the remaining part, E non−pert = π 6 (g − 1)(N − 1) 2 − k 2 + k 2n + 2k 2n (  We thus see once again that the instanton correction to the Casimir energy is encoded in the 6d anomaly polynomial of free fields.

A.3 E-string theory
This is the 5d Seiberg theory in the special case N f = 8. The twisted compactification of this theory on a Riemann surface was considered in [27]. The anomaly polynomial before twisting reads [103]  This anomaly polynomial coincides with the one in [27], apart from the contribution I (1,0)tensor from a free tensor which we have included. We now perform the twisted reduction on the Riemann surface following this reference. In addition to the R-symmetry flux there are nine possible Abelian flavor fluxes; eight along the Cartan of E 8 and one for the Cartan of SU (2) L . For simplicity we consider only two flavor fluxes, picking a generic U (1) F ⊂ E 8 and one along U (1) L ⊂ SU (2) L . Twisting amounts to where ξ ≡ 2ξd E 8 , with d E 8 = 30 the Dynkin index for the fundamental of E 8 and ξ is numerical constant that depends on the choice of U (1) F inside E 8 . The sum over j is over all simple commutants of U (1) F in E 8 . See [27] for details. To write things in a compact form, let us write the anomaly polynomial in the form The coefficients for the E-string theory are easily read off by comparing this expression to (A.34). We subtract the contribution of the free fields from the full expression (continuing the pattern from above) to get and must be generated entirely due to instanton corrections in the 5d partition function. We have thus shown by explicit computation of the perturbative piece that the instanton corrections to the 4d Casimir energy arise from the free anomaly polynomial of the 6d theory in all the examples we have considered (for class S, class S k , and the compactification of the E-string theory). It would be interesting to have a better understanding of whether this is always the case and, if so, the reason behind this.
B Instanton partition function for N = 2 U (N ) and SU (N ) SYM Here we consider the instanton partition function for the maximal SYM theory with gauge group U (N ) or SU (N ). This consists of an adjoint vector multiplet (as always) and an adjoint hypermultiplet, which we assign a massν. Then, taking into account the extra factors needed to pass between the Dolbeault, self-dual, and Dirac complexes, we may write the total equivariant index for the fields of this theory as, first in the 4d case, We are interested here in the 5d case, and for this we need to incorporate the KK modes, n, as in Section 2.4. One additional subtlety is that, for the Dirac complex determining the hypermultiplets, the quantization of the KK momenta are shifted by n → n + 1 2 [34]. Then we find 55 (B.2) where we write the equivariant parameters as q i = e 2πi i , as in Section 2.4.