Topologically twisted indices in five dimensions and holography

We provide a formula for the partition function of five-dimensional $\mathcal{N}=1$ gauge theories on $\mathcal{M}_4 \times S^1$, topologically twisted along $\mathcal{M}_4$ in the presence of general background magnetic fluxes, where $\mathcal{M}_4$ is a toric K\"ahler manifold. The result can be expressed as a contour integral of the product of copies of the K-theoretic Nekrasov's partition function, summed over gauge magnetic fluxes. The formula generalizes to five dimensions the topologically twisted index of three- and four-dimensional field theories. We analyze the large $N$ limit of the partition function and some related quantities for two theories: $\mathcal{N}=2$ SYM and the $\mathrm{USp}(2N)$ theory with $N_f$ flavors and an antisymmetric matter field. For $\mathbb{P}^1 \times \mathbb{P}^1 \times S^1$, which can be easily generalized to $\Sigma_{\mathfrak{g}_2} \times \Sigma_{\mathfrak{g}_1} \times S^1$, we conjecture the form of the relevant saddle point at large $N$. The resulting partition function for $\mathcal{N}=2$ SYM scales as $N^3$ and is in perfect agreement with the holographic results for domain walls in AdS$_7 \times S^4$. The large $N$ partition function for the $\mathrm{USp}(2N)$ theory scales as $N^{5/2}$ and gives a prediction for the entropy of a class of magnetically charged black holes in massive type IIA supergravity.


Introduction
In this paper we will consider the partition functions of five-dimensional N = 1 gauge theories with an SU(2) R-symmetry on M 4 × S 1 , partially topologically twisted on the toric Kähler manifold M 4 [1,2], with a view to holography. In particular, we are interested in evaluating through localization [3] the topologically twisted index of a five-dimensional theory on M 4 × S 1 , which is defined as the equivariant Witten index In three and four dimensions, the topologically twisted index has proven useful in checking dualities and in the microscopic counting for the entropy of a class of asymptotically AdS 4/5 black holes/strings [4,5]. Since one of the goals of this work is to extend the above analyses to higher dimensions, let us briefly review what is known in lower dimensions.

The three-and four-dimensional indices
The topologically twisted index of three-dimensional N = 2 and four-dimensional N = 1 gauge theories with an R-symmetry is the supersymmetric partition function on Σ g 1 × T d , partially topologically A-twisted along the genus g 1 Riemann surface Σ g 1 , where T d is a torus with d = 1, 2, respectively. The index can be computed in two different ways. It has been first derived by topological field theory arguments in [6][7][8][9]. In this approach, further discussed and generalized in [10][11][12][13][14][15][16][17], the index is written as a sum of contributions JHEP11(2018)119 coming from the Bethe vacua, the critical points of the twisted superpotential of the twodimensional theory obtained by compactifying on T d . The index has been also derived using localization in [4,18] and can be written as the contour integral Z(s I , y I ) = m ∈ Γ h C Z int (m, x; s I , y I ) , (1.2) of a meromorphic differential form in variables x parameterizing the Cartan subgroup and subalgebra of the gauge group, summed over the lattice of gauge magnetic fluxes m on Σ g 1 .
Here s I and y I = e i∆ I are, respectively, fluxes and fugacities for the global symmetries of the theory. One remarkable application of the topologically twisted index is to understand the microscopic origin of the Bekenstein-Hawking entropy of asymptotically anti de Sitter (AdS) black holes. In particular, the microscopic entropy of certain four-dimensional static, dyonic, BPS black holes [19][20][21][22][23], which can be embedded in AdS 4 × S 7 , has been calculated in this manner [5,24], by showing that the ABJM [25] twisted index, in the large N limit, agrees with the area law for the black hole entropy -S BH = A/(4G N ) with A being the horizon area and G N the Newton's constant. Specifically, the statistical entropy S BH as a function of the magnetic and electric charges (s, q) is given by the Legendre transform of the field theory twisted index Z(s,∆), evaluated at its critical point∆ I : This procedure was dubbed I-extremization in [5]. These results have been generalized to black strings in five dimensions [26][27][28], black holes with hyperbolic horizons [18,29], universal black holes [30], 1 black holes in massive type IIA supergravity [31,32], M-theory black holes in the presence of hypermultiplets [33], Taub-NUT-AdS/Taub-Bolt-AdS solutions [34], and N M5-branes wrapped on hyperbolic three-manifolds [35]. 2 Another interesting general result is the Cardy behaviour of the topologically twisted index of fourdimensional N = 1 gauge theories that flow to an infrared (IR) two-dimensional N = (0, 2) superconformal field theory (SCFT) upon twisted compactification on Σ g 1 [26]: where c r (s, ∆) is the trial right-moving central charge of the N = (0, 2) SCFT [45] and τ is the modular parameter of the torus T 2 . 3 This result is valid at high temperature,

JHEP11(2018)119
τ → i0 + , and is a consequence of the fact that the index computes the elliptic genus of the two-dimensional CFT. Furthermore, it has been shown in [5,26] that, in the large N limit, one particular Bethe vacuum dominates the partition function. It has also been found in [26,46] (see [47] for examples) that the topologically twisted index of three-and four-dimensional field theories, at large N or high temperature, can be compactly written as a(∆ I ), for d = 2 , (1.5) where W d (∆ I ) is the effective twisted superpotential, evaluated on the dominant Bethe vacuum, F S 3 (∆ I ) is the S 3 free energy of 3D N = 2 theories, computed for example in [48][49][50], and a(∆ I ) is the conformal anomaly coefficient of 4D N = 1 theories. Here (and throughout the paper) ≈ denotes the equality at large N . 4 Based on (1.5) it has been conjectured in [46] that W d (∆ I ) ∝ F sugra (X Λ ) , I-extremization = attractor mechanism , (1. 6) where F sugra (X Λ ) is the prepotential of the effective N = 2 gauged supergravity in four dimensions describing the horizon of the black hole or black string. We refer the reader to section 4.1 for details on the attractor mechanism in gauged supergravity.

The five-dimensional index
In this paper we take the first few steps in generalizing the above analysis to five dimensions. We will consider the case of a generic N = 1 gauge theory on M 4 × S 1 , where M 4 is a toric Kähler manifold and S 1 a circle of length β. 5 One main complication compared to three and four dimensions is that, in the localization computation for five-dimensional gauge theories, there are non-perturbative contributions due to the presence of instantons. The topologically twisted index is still given by the contour integral Z M 4 ×S 1 (q, s I , y I ) = ∞ k=0 {m}|semi-stable C q k Z (k-instantons) int (m, a; q, s I , y I ) , (1.7) of a meromorphic form in the complex variable a, which parameterizes the Coulomb branch of the four-dimensional theory obtained by compactifying on S 1 . Here q = e −8π 2 β/g 2 YM is the instanton counting parameter with g YM being the gauge coupling constant, and m are a set of gauge magnetic fluxes that depend on the toric data of M 4 .
We find it useful to work first on an Ω-deformed background specified by equivariant parameters 1 and 2 for the toric (C * ) 2 action on M 4 , for which we write explicitly 4 The relation (1.5) is only valid when we use a set of chemical potentials such that W d (∆I ) is a homogeneous function of the ∆I (and a similar parameterization for the fluxes), which is always possible [26,46]. Otherwise, (1.5) should be replaced by log Z Σg 1 ×T d ≈ (1 − g1)D ∂∆ I for g1 = 1. 5 See [51,52] for another localization computation on P 2 × S 1 .

JHEP11(2018)119
the supersymmetry background, the Lagrangian and the one-loop determinant around the classical saddle point configurations. The non-perturbative contribution is given by contact instantons that, with the equivariant parameters turned on, are localized at the fixed point of the toric action on M 4 and wrap S 1 . There are χ(M 4 ) fixed points and each of these contributes a copy of the five-dimensional Nekrasov's partition function Z C 2 ×S 1 Nekrasov (a, 1 , 2 ) on C 2 × S 1 , so that the partition function on M 4 × S 1 is given by the gluing formula 1 , where a (l) , 1 and (l) 2 are determined by the toric data near each fixed point and encode the dependence on the fluxes m. For brevity, we suppressed the dependence on the flavor fluxes and fugacities s I and y I that can be easily reinstated by considering them as components of a background vector multiplet. This formula is the five-dimensional analogue of a similar four-dimensional expression that has been successfully used to evaluate equivariant Donaldson invariants [53][54][55][56].
In this paper we will be interested in the non-equivariant limit 1 , 2 → 0. Despite the fact that Z C 2 ×S 1 Nekrasov (a, 1 , 2 ) is singular in the non-equivariant limit, Z M 4 ×S 1 is perfectly smooth. Moreover, with an eye to holography, we will be mostly interested in the large N limit and therefore we will neglect instanton contributions, since they are exponentially suppressed in this limit. As we will see, the classical and one-loop contributions to the non-equivariant partition function still yield a non-trivial and complicated matrix model. As for the topologically twisted index in three dimensions, we can interpret the result as the Witten index of the quantum mechanics obtained by reducing the N = 1 gauge theory on M 4 in the presence of background magnetic fluxes s I . This index receives contributions from infinitely many topological sectors specified by the gauge magnetic fluxes m.
We will also initiate the study of the large N limit of the topologically twisted index in five dimensions and of other related quantities, leaving a more complete analysis for the future. We will focus on two five-dimensional N = 1 field theories. The first is the USp(2N ) theory with N f flavors and an antisymmetric matter field, which has a 5D ultraviolet (UV) fixed point with enhanced E N f +1 global symmetry [57]. The theory is dual to AdS 6 × w S 4 in massive type IIA supergravity [58]. The second theory is N = 2 super Yang-Mills (SYM), which we consider as the compactification of the N = (2, 0) theory in six dimensions on a circle of radius R 6 = g 2 YM /(8π 2 ) [59][60][61]. 6 Using this interpretation, the index of N = 2 SYM can be considered as the partition function of the N = (2, 0) theory on M 4 × T 2 . The topologically twisted index at large N for the USp(2N ) theory should then contain information about black holes with horizons AdS 2 × M 4 in massive type IIA supergravity, while the index for N = 2 SYM should contain information about AdS 7 × S 4 black strings in M-theory.
An interesting object to study in the large N limit is the Seiberg-Witten (SW) prepotential F (a) of the four-dimensional theory obtained by compactifying on S 1 , which 6 An analogous argument has been used in [51,52,62] in order to study the superconformal index of the 6D N = (2, 0) theory.

JHEP11(2018)119
receives contributions from all the Kaluza-Klein (KK) modes on S 1 [63]. F (a) is expected to play a role similar to the twisted superpotential W in three and four dimensions. We therefore study the distribution of its critical points in the large N limit and we find that its critical value, as a function of the chemical potentials ∆ ς (ς = 1, 2), 7 is given by where F S 5 (∆ ς ) is the free energy on S 5 of the corresponding N = 1 theory, in perfect analogy with (1.5). One of the reasons for analysing the critical points of F (a) is the expectation that they play a role similar to the Bethe vacua for the five-dimensional partition function, and, in particular, one such critical point dominates the large N limit of the index. We have no real evidence that this is the case but we will see that working under this assumption leads to interesting results. Some motivations for this conjecture are discussed in section 3. We will consider the particular example of an N = 1 field theory on P 1 × P 1 × S 1 . With no effort, we can generalize all results to the non-toric manifold Σ g 1 × Σ g 2 × S 1 , where Σ g 1 and Σ g 2 are two Riemann surfaces of genus g 1 and g 2 , respectively. We denote by s ς and t ς (ς = 1, 2) the background magnetic fluxes on Σ g 1 and Σ g 2 . We will be able to define an effective twisted superpotential W for the three-dimensional theory that we obtain by compactifying the five-dimensional N = 1 theory on Σ g 2 . We refer for details to section 3. We will find that the value of W, evaluated at the combined critical points of F and W, as a function of the chemical potentials ∆ ς and fluxes t ς , satisfies . (1.10) Here F Σg 2 ×S 3 (t ς , ∆ ς ) is the S 3 free energy of the three-dimensional N = 2 theory obtained by compactifying the USp(2N ) theory on Σ g 2 , recently computed holographically in [64], and a(t ς , ∆ ς ) is the conformal anomaly coefficient of the four-dimensional N = 1 theory obtained by compactifying the N = (2, 0) theory on Σ g 2 , computed in [65,66]. We verified the statement for the USp(2N ) theory only upon extremization with respect to ∆ ς , but we expect it to be true for all values of the chemical potentials. 8 We shall also consider the large N limit of the topologically twisted index itself. The matrix model is too hard to compute directly even in the large N limit. The main difficulty compared to the three-and four-dimensional cases is the quadratic dependence on the gauge and background fluxes that do not allow for a simple resummation in (1.8). The case of P 1 × P 1 × S 1 is technically simpler, since there are two sets of gauge fluxes, one for each P 1 , but still too hard to attack directly. By resumming one set of gauge magnetic fluxes 7 The ∆ς parameterize the Cartan of the SU(2) R-symmetry and the SU(2) flavor symmetry of the USp(2N ) theory and the Cartan of the SO(5) R-symmetry of the N = (2, 0) theory, respectively. They satisfy the constraint 2 ς=1 ∆ς = 2π. Similarly, in the case of Σg 1 × Σg 2 × S 1 discussed below, the fluxes fulfill the constraints 2 ς=1 sς = 2(1 − g1), 2 ς=1 tς = 2(1 − g2). With such a choice, all expressions in (1.9), (1.10) and (1.11) are homogeneous functions of ∆ς , sς and tς . Details are given in section 3. 8 This was confirmed in [67] that appeared after the completion of this work.

JHEP11(2018)119
(call them m), we obtain a set of Bethe equations for the eigenvalues a i (these are just the Bethe vacua of the effective twisted superpotential W of the compactification on Σ g 2 ). The result still depends on the second set of gauge magnetic fluxes (call them n). We expect that, in the large N limit, one single distribution of eigenvalues a i and one single set of fluxes n i dominate the partition function. At this point we shall pose the conjecture that the extremization of F (a) provides the missing condition for determining both a i and n i . Under this conjecture we obtain where we generalized the result to Σ g 1 × Σ g 2 × S 1 . It is remarkable that (1.11), which is based on a conjecture, is completely analogous to the three-and four-dimensional result (1.5). Even more remarkably, we can compare (1.11) with the existing results for the twisted compactification of the 6D N = (2, 0) theory on Σ g 1 × Σ g 2 [68]. Eq. (1.11) is expected to compute the leading behaviour, in the limit τ → i0 + , of the elliptic genus of the two-dimensional CFT obtained by the twisted compactification. We find that (1.11) indeed leads to the correct Cardy behaviour where c r (s ς , t ς , ∆ ς ) precisely coincides with the trial central charge of the two-dimensional CFT computed in [68]. Moreover, we will show in section 4 that (1.11) is equivalent to the attractor mechanism for the corresponding black strings in AdS 7 . All this is in complete analogy with the four-dimensional results (1.4) and (1.6). It would be very interesting to see if the conjectured result for the USp(2N ) theory matches the entropy of magnetically charged AdS 6 × w S 4 black holes in massive type IIA supergravity, which are still to be found. Work in this direction is in progress [69].

Overview
The structure of this paper is as follows. In section 2 we analyse the conditions of supersymmetry and the Lagrangian for a five-dimensional N = 1 gauge theory on M 4 × S 1 , where M 4 is a toric manifold, in a Ω-background for the torus action (C * ) 2 . We determine the classical saddle points and compute explicitly the one-loop determinants. We finally write an expression for the (equivariant) topologically twisted index as a gluing of various copies of the K-theoretic Nekrasov's partition function, one for each fixed point of the toric action. We then study in detail the non-equivariant limit in the sector with no instantons. We also write explicitly the SW prepotential F (a) that will play an important role in the rest of the paper. In section 3 we discuss the large N limit of the topologically twisted index and of related quantities. We first motivate the importance of finding the critical points of F (a). Then we consider the partition function on Σ g 1 × Σ g 2 × S 1 of two theories, N = 2 SYM, which decompactify to the N = (2, 0) theory in six dimensions and the USp(2N ) theory
Special attention will be devoted to the 6D N = (2, 0) theory where we can compare the results with the existing holographic literature about domain walls and black strings. For this theory, in section 4 we will be able to interpret our results as the counterpart of the attractor mechanism in four-dimensional N = 2 gauged supergravity.
We conclude in section 5 with discussions and future problems to explore. Some details regarding toric varieties, conventions, computation of anomaly coefficients in twisted compactifications, and polylogarithms are collected in four appendices.
Note added: while we were writing this work, we became aware of [67] which has some overlaps with the results presented here.
2 Localization on M 4 × S 1 In this section we evaluate the twisted indices of five-dimensional N ≥ 1 theories, i.e. the partition function on M 4 ×S 1 , using localization. We begin in section 2.1 by describing the geometry of the toric Kähler manifold M 4 . Although the twisted theory is semi-topological, i.e. does not depend on the metric on M 4 , we find it useful to have a canonical set of coordinates and a canonical metric. In section 2.3, we describe the rigid supergravity background to which we couple the theory in order to produce the twist and the Ω-deformation. We describe the relevant supersymmetry algebra and supersymmetric actions in section 2.4. The localization procedure is carried out in section 2.5. In section 2.6 we present the relevant expression for the K-theoretic Nekrasov's partition function. Finally, in section 2.7 we present the complete partition function on M 4 × S 1 .

Geometry of M 4
We review the construction of a canonical invariant metric for a toric Kähler manifold M 4 in symplectic coordinates [70,71].
A Kähler manifold M 2n is a complex manifold of real dimension 2n with an integrable almost complex structure It is also a symplectic manifold with symplectic form ω, satisfying a compatibility condition on the metric defined by the bilinear form which states that g is symmetric and positive definite. A toric Kähler manifold is a Kähler manifold with an effective (faithful), Hamiltonian, and holomorphic action of a real n-torus T n . Given a Hamiltonian action, there exists a vector fieldṽ for each element of the Lie algebra of T n and a smooth function µ, the moment map, such thatṽ = ω −1 dµ .

JHEP11(2018)119
The moment map should be thought of as an equivariant map from the Lie algebra of T n to the space of smooth functions on M 2n . It is defined only up to the addition of a constant. The image of the moment map, the orbit space is a convex n-dimensional polytope called the moment polytope. It can be written as for an appropriate set of data Its vertices are located at the fixed points of the torus action and ∆ is the convex hull. The moment polytope is related to the combinatorial description of M 2n as a toric variety with an associated toric fan, dual to ∆, which constructed out of the vectors n j (see appendix A). It will be important in the following that the number of vertices d of the polytope, or equivalently the number of vectors n j of the fan, is equal to the number of fixed points of the toric action. It is also equal to the Euler characteristic of M 2n , d = χ(M 2n ).
One may describe all three structures appearing in the definition of M 2n explicitly using symplectic coordinates: x i for ∆ and y i for T n . Define the functions and an auxiliary potential function The function h (x) must be such that there exists a smooth, strictly positive function δ (x) The complex structure, symplectic (Kähler) form, and T n invariant Kähler metric are then given by Note that det g = 1.
All smooth symplectic toric manifolds are simply connected [72]. Compact simply connected topological four-manifolds are mostly classified by their intersection form. Note, in particular, that b + 2 = 1 , (2.11) for any symplectic toric four-manifold. One can check with the metric above that 9 ω = ω .
(2.12) 9 The orientation for which this is true is such that ε x 1 y 1 x 2 y 2 = 1.

Nekrasov's conjecture
There is a standard way, reviewed in the next section, of putting any four-dimensional N = 2 Lagrangian field theory on a smooth four-manifold while preserving supersymmetry. This is done using the Witten twist [1]. The resulting computations are insensitive to, or at least piece-wise constant under, variations of the metric. This is an example of a cohomological topological quantum field theory (TQFT), usually called the Donaldson-Witten TQFT. The relevant observables reside in the cohomology of the preserved supercharge. Nekrasov has introduced a generalization of this TQFT which is valid when the fourmanifold admits a metric with an isometry [53]. 10 The toric manifolds described in the previous section are prime examples of this construction. The construction can be seen as a generalization of the computation of the equivariant partition function for theories on R 4 , that can be used to recover the exact effective prepotential [73,74]. The latter can be defined as [73] F 0 (Λ, a) ≡ lim where Z C 2 Nekrasov is the so-called Nekrasov's partition function, coinciding with the partition function on R 4 in the presence of the Ω deformation with parameter = ( 1 , 2 ). Λ is the dynamically generated scale, and a represents the vacuum expectation value for the scalar field in the vector multiplet at a specific point on the Coulomb branch. Moreover, h ∨ (G) is the dual Coxeter number of the gauge group G and k(R) is the quadratic Casimir normalized such that it is 2h ∨ (G) for the adjoint representation.
It has been argued in [53] that the analogous partition function on a compact toric manifold M 4 takes the form 2 ; q . (2.14) In the equation above we have chosen to disregard insertions of operators and the dependence on characteristic classes for non-simply connected gauge groups, both of which are not relevant for our purposes. The main new ingredient in this formula, in comparison to the formula on R 4 , is the appearance of a sum over a set of fluxes p l . These are associated with equivariant divisors on M 4 , and thus with vectors in the toric fan. The deformation parameters 2 are also given by the data in the fan. Note that the modulus a is now integrated over, as should be the case on a compact space. The result presented in [53] is a conjecture. Specifically, the exact form of the sum over the integers p l and the contour for the integral over the modulus a are not known.
It is expected that the results for the Donaldson-Witten theory are recovered in the non-equivariant limit, 1,2 → 0. Nekrasov conjectured that this limit is given by 11 (2.15)

JHEP11(2018)119
The L i are line bundles supported on two-cycles of M 4 , which do not have a flat space analogue, and c 1 (L i ) their first Chern class. χ(M 4 ) is the Euler characteristic of M 4 and σ(M 4 ) its signature. The additional terms in the exponential, relative to the usual effective action on R 4 , come from subleading terms in Z C 2 Nekrasov : The authors of [54][55][56] have began to verify (2.14) using localization. Our twisted indices are a generalization of the partition functions on M 4 , and we will follow closely the arguments used in these papers. We will not have anything to add regarding the part of the calculation involving the sum over fluxes. However, we will comment on the similarities between the present setup and the calculation using localization of the twisted indices in three and four dimensions, in which a similar contour integral arises and is given by an explicit prescription.

Supersymmetry on M 4 × S 1
Supersymmetric theories can sometimes be coupled to a curved background while preserving some supersymmetry. This was originally achieved by twisting the theory -identifying a new euclidean rotation group with a diagonal subgroup of rotations and R-symmetry transformations. A subset of the supercharges become scalars under the new rotation group, and are conserved on an arbitrary curved manifold, as long as the coupling to the metric is implemented using this new group. As a bonus, the energy momentum tensor turns out to be the supersymmetry variation of a scalar supercharge Q. The twisted theory, where observables are restricted to be Q-closed operators, then becomes a TQFT of cohomological type [1].
A more general procedure for preserving supersymmetry, initiated in [75] and continued for four dimensions in [76,77], is to couple the theory to rigid supergravity and to search for backgrounds which are fixed points of the supersymmetry transformations. Technically, this means choosing a configuration for the bosonic fields in the supergravity multiplet such that the supersymmetry variation of the gravitino vanishes for some spinor. The vanishing of the gravitino variation yields a linear differential equation known as a generalized Killing spinor equation whose solutions are known as generalized Killing spinors. A variation using these spinors constitutes a rigid supersymmetry.
One can expand the scope of this construction by considering superconformal tensor calculus instead of a specific Poincare supergravity [77,78]. In superconformal tensor calculus, the gravitino is part of the Weyl multiplet which includes another fermion, the dilatino, whose supersymmetry variation must also vanish. The resulting solutions are generalized Killing spinors which generate an action of a subalgebra of the superconformal algebra on the dynamical fields. In order to use this algebra to localize, one should avoid including transformations which are not true symmetries of the theory such as dilatations.
To the best of our knowledge, this is the most general context in which this program of preserving rigid supersymmetry on curved backgrounds has been pursued.

JHEP11(2018)119
A five-dimensional N = 1 theory with R-symmetry group SU(2) can be formulated while preserving supersymmetry on any five-manifold as long as the holonomy group is contained in SO(4). The necessary supergravity background is simply a twist. We derive the rigid 5D N = 1 supergravity background corresponding to the Ω-background on a manifold with topology M 4 × S 1 , where M 4 is a toric Kähler four-manifold. Supersymmetry is preserved using a five-dimensional uplift of the Witten twist on M 4 augmented to include the Ω-deformation. The rigid supergravity background for a twisted four-dimensional N = 2 theory, with the background corresponding to the Ω-deformation, was explicitly constructed for any toric Kähler manifold in [79]. These backgrounds can be lifted to the 5D N = 1 theory on M 4 × S 1 in a straightforward manner, implicitly described in [80,81]. We review this below. Our spinor and metric conventions are spelled out in appendix B.
We consider X ≡ M 4 × S 1 and choose coordinates such that the S 1 is parameterized by x 5 ∈ [0, β). The construction of a T 2 invariant Kähler metric g for M 4 was reviewed in section 2.1. Let us defineṽ The associated spin connection still has U(2) holonomy. The Weyl multiplet of five-dimensional superconformal tensor calculus is described, for instance, in [82]. Along with the vielbein, it contains the following independent bosonic fields: an SU(2) R-symmetry gauge field which we denote A (R) m , and an anti-symmetric tensor T mn , a vector b m , and a scalar D. The remaining bosonic fields are determined in terms of these, and of the fermions, by constraints. We will turn off T mn and b m . After some renaming, the variation of the gravitino in the remaining background can be written as We perform the twist by setting One can easily check that the spinor

23)
12 Throughout this paper, Dm will denote a generic covariant derivative. The covariance is with respect to the spin, R-symmetry, gauge, and background flavor symmetry connections. We will specify the concrete form of the derivative when appropriate.

JHEP11(2018)119
is a solution. Note that the components of both ω and A (R) in the x 5 direction vanish in the non-equivariant limit, 1,2 → 0. One may verify explicitly that ξ satisfies the dilatino equation with an appropriate value of D.

Supersymmetry transformations and Lagrangian
We record the supersymmetry transformations for the vector and hypermultiplets, following the conventions of [83,84]. For the purposes of localization it is simpler to use twisted fields defined using the Killing spinor ξ. Note that ξ satisfies (2.24) For consistency of notation with [85], we define Note that κ = dx 5 is not a contact form for M 4 × S 1 .

Vector multiplet
The five-dimensional N = 1 vector multiplet has 8 + 8 off-shell components. It comprises a connection A m , a real scalar σ, an SU(2) Majorana spinor λ α I , and a triplet of auxiliary fields D IJ satisfying the reality condition all in the adjoint representation of the Lie algebra g. We use the physics convention where all gauge fields are hermitian. We define the gauge covariant derivative acting on fields in the adjoint representation and the field strength as (2.27) A gauge transformation with parameter α reads In order to ensure convergence of the actions in section 2.4.3, we will preemptively rotate both D IJ and σ into the imaginary plane The new reality conditions are such that The supersymmetry transformations read [83] δA m = iξ I Γ m λ I , δσ = −ξ I λ I ,

JHEP11(2018)119
The spinorξ is defined asξ (2.32) and therefore vanishes in the present context. Following [86], we define the twisted fields 13 where The two projection operators appearing in the definition of F + split the two-forms on M 4 × S 1 into vertical and horizontal forms. The latter are further split into self-dual and anti-self-dual forms on M 4 : The supersymmetry algebra now takes the standard cohomological form, up to the addition of the equivariant deformation (2.36) The square of the transformation δ contains a translation and a gauge transformation where L is the Lie derivative on forms and (2.38) Note that δΦ = 0.

Hypermultiplet
A hypermultiplet comprises a pair of complex scalars q A I and a fermion ψ A satisfying where The orientation here is the opposite of that used in [86], and corresponds with the one used in [85].
Due to this choice, some forms which were anti-self-dual in [86] are now self-dual.

JHEP11(2018)119
is the invariant tensor of USp(2N ), which is a symmetry group of N free hypermultiplets. A, B, C, . . . indices are raised and lowered using Ω. The gauge group is a subgroup of USp(2N ) whose indices we sometimes suppress. The supersymmetry transformations read where D m is covariant with respect to A m and SU(2) R , and both A m and σ act in the appropriate representation After twisting, the field q A I becomes a spinor This spinor is actually pseudo-real, and contains only 4 degrees of freedom Its variation includes only the part of ψ given by the projection (2.45) The supersymmetry transformations can be closed off-shell by introducing a superpartner F for the component 14 (2.46) The twisted supersymmetry transformations are then given by The action for twisted theories is a covariantized version of the flat space action. This is in contrast to the additional terms which appear, for instance, in the superconformal index, on the five sphere, and on a general contact manifold. Such actions are still supersymmetric because the Killing spinor is covariantly constant. The flat space Yang-Mills term is given by [83] 48) where D m is the covariant derivative with respect to the connection A m , see (2.27). The action on M 4 × S 1 can be written as where D m is covariant with respect to A m , the spin connection and the SU(2) R-symmetry.

JHEP11(2018)119
In order to evaluate the Euclidean path integral with action we must choose a contour for the bosonic fields. An appropriate contour which ensures convergence of the integral reads Integration of fermionic fields is an algebraic procedure and does not require such a choice of contour. Note the change in reality conditions for the auxiliary field D IJ . In the rotated variables, appearing in the supersymmetry transformations and in the rest of the paper, The action for a hypermultiplet is similarly given by where the matrices σ A B , λ A I B , and D A B act in the representation R. This action is convergent with the contour implied by the reality condition (2.39).

Localization onto the fixed points
The actions in the previous section are invariant under the fermionic transformation δ. By a standard argument, expectation values of δ-closed observables, and in particular the partition function, are invariant under δ-exact deformations of the action provided we choose the fermionic functional V in such a way that δ 2 V| bosonic = 0, δV| bosonic ≥ 0, and all configurations which yield a finite result when evaluated using S total also yield a finite result when evaluated using S. In order to localize the theory with Euclidean measure exp (−S total ) , (2.55) we take the limit t → ∞. All configurations with δV| bosonic = 0 have infinite action in this limit and the theory localizes onto the moduli space δV| bosonic = 0. The semi-classical approximation around this moduli space yields the exact result for the functional integral. In order to localize the five-dimensional N = 1 twisted theories, we can add the following localizing terms (2.56)

JHEP11(2018)119
The bosonic parts of which are (2.57) The field H acts as a Lagrange multiplier, setting The rest of the condition δV gauge | bosonic = 0, then requires A similar procedure for the hypermultiplet localizing term yields where in the last term we have made explicit use of the fact that by summing i ∈ {1, . . . , 4}. These equations may admit solutions for certain representations of the gauge group, which would indicate that there are moduli coming from the hypermultiplets. However, we will consider the situation in which the hypermultiplets are also coupled to background vector multiplets frozen to supersymmetric configurations which effectively give all hypermultiplets a generic mass. In this situation, there are no solutions to (2.60). In what follow, we consider only solutions of the vector multiplet equations.

Bulk solutions
An obvious set of solutions to (2.59) is given by flat connections and covariantly constant σ. The topology of our spacetime satisfies Flat connections are therefore parameterized by the holonomies around the S 1 factor, restricted only by large gauge transformations. Using an appropriate gauge transformation, these can be brought to the form of a constant Cartan subalgebra valued connection A (0) :

Large gauge transformations identify
where j is an index in the Cartan subalgebra. At generic values of the holonomy, a covariantly constant scalar is then also constant and Cartan valued, i.e.
Note that the equivariant action acts as (2.67) In principle, the localization calculation includes an integral over the rank g cylinders parameterized by a. Later on we will find it more convenient to move to exponentiated coordinates on this space, whereby the integration region becomes (C * ) rk(g) .

Fermionic zero modes
The quadratic approximation of δV gauge around a bulk configuration specified by a allows fermionic zero modes for both χ and Ψ. In the presence of such zero modes the functional integral naively vanishes. However, following [54][55][56], we will take this as an indication that the localizing term needs to be improved to include a fermion mass term which will soak up the zero modes. Since the additional term is by definition δ-exact, the value of the coefficient with which it is added, as long as it is nonzero, does not change the final result.
The Ψ zero mode can be read off from the Ψ kinetic term which is proportional to The zero mode is a constant profile for the Cartan part of Ψ given by It is the superpartner of the holonomy. The zero mode for χ is also Cartan valued and can be identified using the projection operator π : with a multiple of the pullback of the Kähler form on M 4 : We can construct a nowhere vanishing off-diagonal mass term by pairing the two sets of zero modes using where we have defined

JHEP11(2018)119
Note that the mass is nowhere vanishing due to the property We add to the localizing V the term −isV (0) . Note that the reality conditions on H and σ require s to be real.

Fluxes
As shown in [55], the four-dimensional equations defined on M 4 admit Abelian solutions corresponding to equivariant line bundles supported on H 2 (M 4 ). Specifically, the flux is viewed now as a symplectic form for the torus action represented byṽ, and φ represents the moment map for the symplectic action. The addition of δV (0) to the localizing action relaxes the constraint imposed by the Lagrange multiplier in (2.59) from F + = 0 to where j is some element of the Cartan subalgebra. The combined equations are five-dimensional versions of those analyzed in [55], with A 5 playing the role of φ. To make the connection, use indices i, j, . . . for M 4 and write the equation for an Abelian field strength in 4+1 notation as If we set ∂ 5 A j = 0, then the first equation is the symplectic moment map condition. The second equation follows from the first after applying iṽ. The solutions above correspond to solutions of the moment map equation (2.77) and define equivariant cohomology classes. The resulting equivariant line bundles are associated to the equivariant divisors on M 4 . The relationship between these divisors and the description of M 4 using the toric fan is explained in appendix A. In particular, there is an equivariant divisor D l for each vector in the fan, and therefore for each fixed point of the torus action. The total flux is then associated with a linear combination of divisors d l=1 p l D l , where p l lives in the Cartan subalgebra. We denote the resulting field strengths F (0) . Note that for some two-form F 4 on M 4 . Notice that, due to (2.81), the field a acquires a nonzero profile on the manifold M 4 . Near the fixed points of the torus action, the field becomes where the identification of the parameters 2 is given in appendix A.

Instantons
Near the fixed circles of v, the complex determined in section 2.4 coincides with the one considered by Nekrasov [73]. We therefore conjecture, in the spirit of [3,83,86], that these points support point-like instantons which are accounted for by the five-dimensional or K-theoretic version of the Nekrasov's partition function described in section 2.6. The parameters appearing in this partition function can be read off from the classical action, the toric geometry, the metric, the fluxes, and the mass parameters. Specifically, the identification of the parameters 1 , 2 and a is given in appendix A and corresponds to the values appearing in (2.83). The authors of [86] identified a class of solutions to the equations on any contact five-manifolds with contact structure determined by a one-form κ. These solutions were dubbed contact instantons. Although the one-form κ defined in (2.25) is not a contact form, the instantons appearing in our partition function are the same solutions.

Gauge fixing
As discussed in [3], one can add a BRST-closed term to the action in order to gauge fix without disturbing the localization procedure. A convenient gauge for our calculation is the background gauge d † where A (0) represents the value of A at a point in moduli space. This gauge is part of the definition of the Atiyah-Hitchin-Singer complex for the instanton moduli space [88]. We will, in addition, gauge fix the scalar moduli such that their non-Cartan elements vanish.
The modulus a will be Cartan valued Doing so incurs a determinant in the matrix model which is, however, already taken into account in the one-loop determinant described below. An additional factor of the inverse volume of the Weyl group, |W| −1 , is also present.

Integration
Localization takes effect when the coefficient t of the localizing action is taken to be very large. The value of s is up to us. Following [55], we choose to take a limit In order to keep the moduli finite, we rescale

JHEP11(2018)119
In taking the limit, the fermion zero modes acquire a large mass can be trivially integrated out. In addition, σ (0) drops out of all terms except (2.74). Following [55], we write the remaining integral over the scalar moduli as where we have used H 0 to mean The fact that the integrand is a total derivative inā should also follow from the algebra of supersymmetry of the zero mode supermultiplet [4,89]. The integral, being a total derivative inā, reduces to a contour integral. After the integral over H 0 , which takes the residue at H 0 = 0, we will be left with the contour integral of a meromorphic function of a. Following [4,[89][90][91] we expect that the interplay between a proper regularization of the integrand and the use of the zero mode H 0 as a regulator will lead to the determination of the correct contour of integration. We also expect that the appropriate contour is given by some Jeffrey-Kirwan prescription [92]. In related contexts, this prescription appears in the calculation of the instanton partition function [91,93]. It also makes an appearance in the calculation of the partition functions of the two-dimensional A-model [4,89] and the three-and four-dimensional topologically twisted indices [4], which are lower-dimensional analogues of the partition function on M 4 and the five-dimensional twisted index. We postpone to future work the determination of the correct contour of integration.

Classical contribution
Classical contributions to the localization calculation come from evaluating (2.52) and (2.53) on the moduli space identified above. Since all hypermultiplet fields vanish on the moduli space, there is no contribution from (2.53). Moreover, the bulk moduli do not contribute even to (2.52). This is in contrast to the contact manifold case [85]. The contribution of instantons will be discussed when we discuss the Nekrasov's partition function. All that is left is the contribution of the fluxes and the auxiliary field to (2.52). Recall that the evaluation of the classical action is on the configurations such that the right hand side of the fermion transformations vanish. Specifically, this implies that H = 0, regardless of the reality conditions of D IJ . In fact, H appears alone on the right hand side of the transformation of χ, see (2.36), meaning that we are free to add an arbitrarily large quadratic term for it in the localizing action. The equation H = 0 imposes the relation Similar relations involving fluxes appear in the three-dimensional computations of the twisted indices [4,18]. The relevant part of the classical action is Due to the properties of F (0) , we can rewrite this as and we have used (2.92). Given the relationship between the field strength and the differential representative of the first Chern class the classical contribution can be written as The factor c (p) can be evaluated for any given fan and choice of p l using the techniques in appendix A. We will give explicit examples in section 2.7.

One-loop determinants via index theorem
We can compute the one-loop determinant from the equivariant index theorem. We follow the derivation in [3,94]. The fields appearing in the supersymmetry algebra ( where ϕ e ,φ e are bosonic and ϕ o ,φ o are fermionic. The expression above is meant to represent the δ-complex linearized around a point in the moduli space. We can identify (2.98) The localizing functional contains a term of the form According to [94], the result of the Gaussian integral around a point in moduli space is given by (2.100) Using (2.56) and the supersymmetry algebra, we can identify The operator D vector is the projection of the covariantized exterior derivative operator on M 4 , acting on one-forms, to the self-dual two-forms. One should take into account the gauge fixing. Together with D vector , this forms the self-dual complex (2.104) The computation of this index is described in [95]. We will follow the exposition in [96]. Let E be a G-equivariant complex of linear differential operators acting on sections of vector bundles E i over X: The equivariant index of the complex E is the virtual character of the G action on the cohomology classes H k (E): If the set of fixed points of G is discrete, the index can be determined by examining the action of G at those points, denoted X G : .
The numerator in this expression encodes the action of G on the bundles, while the denominator is the action on the tangent space of X. We refer the reader to [94] for more information, and to [95] for a complete treatment.
The index and the one-loop determinant can be computed using the equivariant index theorem on M 4 . There is one fixed point at the origin of every cone in the fan which determines M 4 . The copy of C 2 associated to the cone is acted upon by the equivariant JHEP11(2018)119 parameters, and feels the flux from equivariant divisors associated to the two neighboring vectors, as determined in appendix A. All that is needed to construct the character for M 4 is to add up the contributions. The subtleties in the calculation involve the use of the right complex for the index theorem, and the necessity of regularizing the infinite products that it yields.
The complex identified above for the vector multiplet is the self-dual complex. Following the discussion in [97], we use the Dolbeault complex (the "holomorphic projection of the vector multiplet") and find a match to the gluing calculation in section 2.7. The two complexes are related on a Kähler manifold (see e.g. of [98, section 2.3.1]). The relevant index for the twisted Dolbeault operator∂ on C 2 × S 1 is given by where we have incorporated the free action of the rotation on S 1 and denoted by p 1,2 the coefficients of the two divisors. Here, α are the roots of the gauge group G and the 1,2 are arbitrary complex deformation parameters, which we will take to zero at the end. The complete index reads where d is the number of cones in the fan determining M 4 and R (l) signifies the use of the coefficients and equivariant parameters relevant to that cone. We will explicitly evaluate the one-loop determinant resulting from (2.109) only in the non-equivariant limit. Define the degeneracy (2.110) Our flux conventions are those in [96]. The limit reduces the equivariant index to the Hirzebruch-Riemann-Roch theorem where E corresponds to d l=1 p l D l . We will give explicit examples of degeneracies in section 2.7.
The one-loop determinant for a vector multiplet is then given by . (2.112) The infinite product above requires regularization. A physically acceptable regularization is given by

JHEP11(2018)119
This choice has simple transformation properties under parity and correctly accounts for the induced Chern-Simons term when used in the three-dimensional calculations [4]. See also [91] for an example of its use. We thus obtain . (2.114) The index for a hypermultiplet is based on the twisted Dirac complex instead of the Dolbeault complex. It also incorporates background scalar moduli and fluxes, which we denote ∆ and t l respectively. Given the relation on M 4 between these two complexes, one needs to change the index for the vector multiplet by an overall flux corresponding to the square root of the canonical bundle and take into account the opposite grading between the two complexes [96]. The canonical bundle is minus the sum of all the equivariant divisors. In addition, there is an dependent choice of the origin of the flavor mass parameter. The choice corresponding to the superconformal fixed point in five dimensions was discussed in [99][100][101], following the correction to the four sphere partition function found in [102]. The authors of [55] found a match with the results derived by Vafa and Witten in [103] for the N = 4 theory with yet another choice. If the manifold M 4 is not spin, there may be other complications related to the choice of spin c structure. Specifically, we have made no attempt to identify the canonical spin c structure associated with the almost complex structure of M 4 since this choice can be shifted by background fluxes. For notational convenience we choose a common shift of the mass parameter for all manifolds Incorporating both of these leads to where R is the representation under the gauge group G, ρ the corresponding weights, and ν is the weight of the hypermultiplet under the flavor symmetry group. The complete result can then be written as

The Nekrasov's partition function
In this section we collect the expressions for the K-theoretic Nekrasov's partition function: As we will discuss in the next section, the topologically twisted index on M 4 × S 1 can be obtained by gluing copies of the Nekrasov's partition functions in the spirit of (2.14).

Perturbative contribution
The perturbative part of the partition function on C 2 × S 1 consists of a classical and a one-loop contribution.
Classical contribution. The classical contribution to (2.118) is given by [104,105] where k is the Chern-Simons level of G and Tr F is the trace in fundamental representation. 15 One-loop contribution. We will use the perturbative part of the partition function on C 2 × S 1 as defined in [106]. For a gauge group G the contribution of a vector multiplet to the perturbative part is given by .
With this definition of the perturbative part of the partition function, the authors of [106] derived a formula for the partition function for the blowup of C 2 at a point, which is just an example of the gluing procedure we will discuss in section 2.7. This expression is written in the conventions of [106] and also includes what we already defined as the classical contribution. One can swap between the conventions by The one-loop contribution from a vector multiplet in our conventions is given by (2.123) 15 The generators Ta are normalized as Tr R (TaT b ) = k(R)δ ab with k(F) = 1/2 for the fundamental representation of SU(N ).

JHEP11(2018)119
Here, we defined the double (p, t)-factorial as The contribution of a hypermultiplet to the one-loop determinant instead reads (2.125) Putting everything together, the perturbative part of the Nekrasov's partition function can be written as (2.126)

Instantons contribution
The localization calculation for a five-dimensional gauge theory conjecturally includes nonperturbative contributions from contact instantons [83,86]. With the equivariant deformation turned on, these configurations are localized to the fixed points of the action on M 4 and wrap the S 1 . Their contribution to the matrix model is given by the five-dimensional version of the Nekrasov's instanton partition function, which we describe below. Nekrasov's instanton partition function, [73,74], is the equivariant volume of the instanton moduli space on R 4 with respect to the action of (2.127) The three factors correspond to constant gauge transformations and to rotations in two orthogonal two-planes inside R 4 , respectively. The five-dimensional version of the partition function counts instantons extended along an additional S 1 factor in the geometry, of circumference β. The four-dimensional partition function can be recovered by letting the size of this S 1 shrink to zero. As with the perturbative contribution, there is an ambiguity related to the regularization of the KK modes on the extra circle. Different looking expressions are found in [100].

JHEP11(2018)119
The K-theoretic instanton partition function for gauge group U(N ) in our conventions, as derived from [106][107][108], is given by (2.128) We have where for a box s = (i, j) ∈ Z ≥0 × Z ≥0 we defined the functions The rest of the symbols above are defined as follows.
-Y is a vector of partitions Y i . A partition is a non-increasing sequence of non-negative integers which stabilizes at zero -For a box s ∈ Y l with coordinates s = (i, j), we define the leg length and the arm length where T stands for transpose.

JHEP11(2018)119
-a is a complex Cartan subalgebra valued scalar of framing parameters associated with the gauge group action.
-∆ is a flavor symmetry group vector of mass parameters for the hypermultiplets.
-q is a counting parameter coming from the one instanton action (2.134)

Effective Seiberg-Witten prepotential
In this section we provide the general form of the perturbative Seiberg-Witten (SW) prepotential for a 5D N = 1 theory with gauge group G, coupling constant g YM , and Chern-Simons coupling k. For a theory with hypermultiplets transforming in the representation R I of G, the effective prepotential is related to the Nekrasov's partition function Z C 2 ×S 1 Nekrasov as follows [73,74,106]: whose perturbative part can be explicitly written as where the function g 3 (a) is defined in (E.4). The first term in (2.136) comes from the classical action while the Li 3 factor is the one-loop contribution of the infinite tower of KK modes on S 1 as discussed in [63]. The other polynomial terms come explicitly from the limit of the perturbative contribution in [106]. We interpret them as effective Chern-Simons terms coming from a parity preserving regularization of the path integral, as also discussed in section 2.5.8.

Partition function on
The functional integral under consideration is to be computed in an exact saddle point approximation around the moduli space which comprises the bulk moduli, the fluxes, and the instantons. We will assume as in [54][55][56] that the complete partition function is given by gluing d copies of Z C 2 ×S 1 Nekrasov , one for each fixed point of the toric action. At each fixed point, the parameters a, ∆, 1 , 2 in (2.118) are replaced with their equivariant version a (l) , ∆ (l) , 2 , whose explicit form is explained in appendix A and given, for simple cases, in examples 2.1-2.3. In particular, as in [55], the gauge magnetic fluxes are incorporated into this expression through a (l) = a + (l) (2.137)

JHEP11(2018)119
The reason for this replacement is discussed in section 2.5.3 and it is also easy to see in the index theorem discussed in section 2.5.8. Furthermore, the equivariant chemical potential is given by (see the discussion around (2.115)) (2.138) As we will see this gluing is consistent with the classical and one-loop contributions determined in sections 2.5.7 and 2.5.8. The topologically twisted index of an N = 1 theory on M 4 × S 1 then reads 16 1 , 2 , β, q; ∆ (l) . (2.139) Here, following [53][54][55][56], we restrict the sum in (2.139) to fluxes p l corresponding to semi-stable bundles. It was argued in [54][55][56] that the sum should be extended to all semi-stable equivariant bundles. These are classified by a set of fluxes p l , one for each divisor, 17 subject to stability conditions that have been studied by mathematicians [112]. These conditions are already quite complicated for N = 2. Summing over all semi-stable equivariant bundles, the authors of [54][55][56] found perfect agreement with known Donaldson invariant results. In this paper we have not determined either the correct contour of integration or the correct conditions to be imposed on the fluxes. We expect that the two aspects are related.
Notice that formula (2.139) is consistent with and generalizes the blowup formula derived in [106], which just corresponds to the case where M 4 is the (non-compact) blowup of C 2 at a point. 18 In this paper we will be interested in theories with gauge group U(N ) or USp(N ). Moreover, we want the partition function in the large N , non-equivariant limit 1,2 → 0. The appropriate large N limit is defined in the next section. We will assume that the instanton contribution to the free energy, defined by decays exponentially in any such limit. This is supported by the appearance of the factor q | Y| in (2.128). In the following sections, all partition functions are written only for the zero instanton sector.

The non-equivariant limit
The Nekrasov's partition function (2.118) is singular for 1 , 2 → 0 but the product in (2.139) is perfectly smooth in this limit. By performing explicitly the limit, we can

JHEP11(2018)119
write the classical and perturbative part of the localized partition function in the nonequivariant limit as . (2.141) As one can see, the results from gluing (and taking the non-equivariant limit) precisely match the classical contributions (2.96) and the one-loop determinants evaluated using the index theorem (see (2.114) and (2.117)). We may also expect some simplification in the sum over fluxes compared with the equivariant formula (2.139). We expect that, in the non-equivariant limit, the fluxes p l should just correspond to the set of non-equivariant bundles on M 4 . Formula (2.141) has a natural interpretation in terms of the quantum mechanics obtained by reducing the five-dimensional theory on M 4 . In the reduction on M 4 in a sector with gauge and background fluxes p l and t l , we will obtain a set of zero modes whose multiplicity is given by the Hirzubruch-Riemann-Roch theorem and coincides with d or d hyper . They will organize themselves into a set of Fermi or chiral multiplets according to the sign of d and d hyper . Eq. (2.141) is then precisely the sum over all sectors of gauge magnetic fluxes of the localization formula for the corresponding quantum mechanics partition functions, as derived in [91]. This is in complete analogy with the structure of the three-and four-dimensional topologically twisted indices [4].
Some examples of the calculation of the degeneracy are given below. We refer to appendix A for details and notations. (2.142) (2.143)
We can compare the previous result with the expectations for the case P 1 × P 1 × S 1 , where the computation, in principle, can be done by an explicit expansion in modes. By an obvious generalization of the results in [4], we expect the following partition function

JHEP11(2018)119
where m/n (and s/t) are the gauge (and background) magnetic fluxes on two spheres. The degeneracies come from the Hirzebruch-Riemann-Roch theorem and the classical action comes from an explicit computation along the lines of section 2.5.7. We see that the result coincides with (2.141) with the replacements The integral in (2.141) indeed only depends on such combinations. We also expect that, in the non-equivariant limit, the sum over semi-stable equivariant fluxes reduces to a sum over the two standard fluxes m and n on P 1 × P 1 . Such set of non-equivariant fluxes was indeed used in [54], where the four-dimensional partition function on P 1 × P 1 has been studied. Notice that, in the conventions that we are using for the background fluxes, what we will call universal twist [113,114] in section 3 corresponds to s = t = 1.

Large N limit
In this section, we analyze the large N limit of some of the topologically twisted indices and other related quantities, finding an interesting structure.
In the large N limit we may expect some simplifications. In particular, instantons are suppressed and the perturbative contribution to the topologically twisted index of 5D N = 1 theories discussed in section 2 becomes exact. Moreover, we may also expect that the choice of integration contour and the stability conditions on fluxes become simpler at large N . In particular, we will work under the assumption that, in the large N limit, the fluxes become actually independent.
In the topologically twisted index of 3D N = 2 theories on Σ g 1 × S 1 [4, 8, 13, 18] a distinguished role was played by the twisted superpotential W of the two-dimensional theory obtained by compactification on S 1 (with infinitely many KK modes). In particular, the partition function can be written as a sum over the set of Bethe vacua of the twodimensional theory, which corresponds to the critical points of W [8,13]. Moreover, in the large N limit, one particular Bethe vacuum dominates the partition function [5]. The natural quantity to consider for the 5D topologically twisted index is the SW prepotential F (a) of the four-dimensional theory obtained by compactification on S 1 . There are two reasons to expect that the critical points of F (a) play a distinguished role in five dimensions. First, the partition function of the topologically twisted N = 2 theories in four dimensions can be split into two contributions, one coming from the integration over the Coulomb plane (usually called the u plane), and the other from the locus where monopoles and dyons become massless, corresponding to the critical points of the prepotential F [115]. The integral over the u plane also often reduces to boundary contributions from all the singular points in the moduli space. Secondly, in the integrable system obtained by placing the four-dimensional theory on a Ω-background on R 4 with 1 = and 2 = 0, the Bethe vacua read [116] exp i ∂ W (a) ∂a j = 1 , j = 1, . . . , rk(G) , (3.1)

JHEP11(2018)119
where W (a) is the twisted superpotential for the two-dimensional effective theory obtained by reducing on the Ω-deformed copy of R 2 . We expect that these conditions play a role in the equivariant partition function with 1 = and 2 = 0. Since W (a) has the following expansion as → 0, we also obtain, in the limit → 0, the quantization conditions (cf. It is possible that, in taking the non-equivariant limit of the index, the information about the pole configurations of the integrand is partially lost and we need to impose extra conditions following from (3.3). For all these reasons, we may think that the critical points of F (a) may play a role in the evaluation of the index. In particular, in analogy with the 3D index, we may expect that, in the large N limit, one particular critical point of F (a) dominates the partition function. We will provide some evidence of this picture by evaluating various quantities in the large N limit at the critical point of F (a) and showing that they nicely agree with holographic predictions. Independently from these considerations, the problem of finding the distribution of critical points of F (a) in the large N limit is interesting in itself and deserves to be studied. We will then consider the large N limit of the distribution of critical points of the functional F (a) focusing on two 5D theories, N = 2 SYM, which decompactifies to the N = (2, 0) theory in six dimensions and the N = 1 USp(2N ) theory with N f flavors and an antisymmetric matter field, which corresponds to a 5D UV fixed point. In both cases we find that the value of F (a) at its critical points, as a function of flavor fugacities, precisely coincides, in the large N limit, with the partition function of the same theory on S 5 . This is in parallel with what was found for the twisted superpotential of 3D N = 2 theories in the large N limit [46], thus re-enforcing the analogy between the two quantities.
We shall then study the large N limit of the topologically twisted index of 5D N = 1 theories on P 1 × P 1 × S 1 . With no effort, we can replace P 1 × P 1 × S 1 with the more general manifold Σ g 2 × Σ g 1 × S 1 and we will consider this more general case in the following. The interest of this model is that we can formally dimensionally reduce on Σ g 2 and obtain a three-dimensional theory. In three dimensions we can guess the form of the partition function in the large N limit and use the results in [4,8,13,18]. We expect the partition function of the three-dimensional theory to be given as a sum over topological sectors on Σ g 2 . We will denote the gauge/flavor magnetic fluxes on Σ g 1 and Σ g 2 by m/s and n/t, respectively. We also denote by ∆ a complexified chemical potential for the flavor symmetry. In each sector of gauge magnetic flux n on Σ g 2 we have a twisted superpotential for the compactified theory satisfying [119] ∂ W(a, n, ∆, t)

JHEP11(2018)119
One way to determine W is to compare the 5D partition function for P 1 × P 1 × S 1 given in section 2 with the structure of the topologically twisted index in three dimensions. This is given by localization as a contour integral of a meromorphic quantity [4,13,18] where Γ h is the lattice of gauge magnetic fluxes for the gauge group G. By generalizing (2.148) from P 1 ×P 1 to Σ g 1 ×Σ g 2 as in [18], and choosing a convenient parameterization for the fluxes, we expect the integrand Z 3D int (a, m, n) to be .

(3.6)
We can therefore read off the twisted superpotential that indeed satisfies (3.4). The topologically twisted index can then be computed as follows [8,18] Z pert Σg 2 ×(Σg 1 ×S 1 ) (s, t, ∆) = As we will see below, these BAEs (3.9) fix the value of the gauge magnetic fluxes n i in the large N limit, hence, one needs an extra input in order to fix the value of the Coulomb branch parameter a i . Assuming that the right condition to be imposed in the large N limit is (3.3), we will be able to compute the index for both N = 2 SYM and the USp(2N ) theory. 19 In particular, in the case of N = 2 SYM, thought of as compactification of the

JHEP11(2018)119
6D N = (2, 0) theory on a circle, the index computes the elliptic genus of the 2D CFT obtained by compactifying the 6D theory on Σ g 2 × Σ g 1 . And, indeed, we find the correct Cardy behaviour of the index in the high-temperature limit. This is in parallel with what was found in [26] for the topologically twisted index of 4D N = 1 SCFTs on Σ g 1 × T 2 .
Finally, we will also consider the large N limit of the twisted superpotential (3.7) and the distribution of its critical points. We expect the on-shell value of W pert to compute some physical quantities of the intermediate compactification on Σ g 2 . We find indeed that this is the case. For N = 2 SYM, the critical value of W pert is precisely the trial central charge of the 4D SCFT obtained by compactifying the 6D (2, 0) theory on Σ g 2 , computed both in field theory and holographically in [65,66]. Quite remarkably, the identification holds for an arbitrary assignment of R-charges for the trial central charge. For the USp(2N ) theory, the critical value of W pert , extremized with respect to ∆, coincides with the S 3 free energy of the 3D theory, obtained by compactifying the 5D fixed point on Σ g 2 , recently computed holographically in [64]. 20 3.1 N = 2 super Yang-Mills on Σ g 2 × (Σ g 1 × S 1 ) A decoupling limit of type IIB string theory on asymptotically locally Euclidean (ALE) spaces predicts the existence of interacting 6D, N = (2, 0) theories labelled by an ADE Lie algebra g = (A n≥1 , D n≥4 , E 6 , E 7 , E 8 ) [120]. The A N −1 type can also be realized as the lowenergy description of the worldvolume theory of N coincident M5-branes in M-theory [121]. A direct formulation of the (2, 0) theory has been a long standing problem. However, it has been argued in [59][60][61] that the (2, 0) theory on a circle S 1 (6) of radius R 6 is equivalent to the five-dimensional N = 2 supersymmetric Yang-Mills (SYM) theory, whose coupling constant is identified with the S 1 (6) radius by We are interested in computing the partition function of the (2, 0) theory on Σ g 2 × (Σ g 1 × T 2 ), partially topologically twisted on Σ g 2 × Σ g 1 . Given the above relation between the (2, 0) theory and 5D maximally SYM, and considering the torus T 2 = S 1 × S 1 (6) , this is equivalent to compute the twisted partition function of N = 2 SYM on Σ g 2 × (Σ g 1 × S 1 ). A further reduction on S 1 gives a four-dimensional theory. Recalling that the length of S 1 is β, we see that the (complexified) gauge coupling of the four-dimensional theory can be correctly identified with the modular parameter of the torus T 2 = S 1 × S 1 (6) , The twisted compactification of the (2, 0) theory on Σ g 1 ×Σ g 2 gives rise to an N = (0, 2) SCFT in two dimensions [68]. The holonomy group of Σ g 1 × Σ g 2 is SO(2) 1 × SO(2) 2 . In order to preserve N = (0, 2) supersymmetry in two dimensions we turn on a background

JHEP11(2018)119
Abelian gauge field coupled to an SO(2) 2 subgroup of SO(5) R , embedded block-diagonally. The right-moving trial central charge c r (∆) and the gravitational anomaly k = c r − c l for this class of theories were computed in [68] and, at large N , they can be rewritten as (see also appendix C) where we introduced the democratic chemical potentials and fluxes for the SO(2) 2 subgroup of SO(5) R symmetry (3.13) The partition function of the (2, 0) theory on Σ g 2 × (Σ g 1 × T 2 ) is just the elliptic genus of the two-dimensional CFT. Thus we expect, in the high-temperature limitβ → 0, wherẽ β ≡ −2πiτ is a fictitious inverse temperature, 21 the partition function to have a Cardy behaviour log Z(s, t, ∆) ≈ iπ 12τ c r (s, t, ∆) . (3.14) We will work in the 't Hooft limit for which the instanton contributions to the partition function are exponentially suppressed. The high-temperature limit of the partition function corresponds to large λ.

Effective prepotential at large N
The effective SW prepotential (2.136) of N = 2 SYM can be written as (3.16) 21 The torus partition function at a given τ corresponds to a thermal ensemble while the elliptic genus is only counting extremal states. Therefore, the temperature represented by Im τ is fictitious.

JHEP11(2018)119
The BAEs (3.3) are then given by (3.17) In the strong 't Hooft coupling λ 1 the eigenvalues are pushed apart, i.e. | Im(a i −a j )| 1, and (3.17) can be approximated as The sign function could be replaced by sign(i − j) if the eigenvalues a i are ordered by increasing imaginary part. We thus find the solution It is also interesting to see what the value of the effective SW prepotential (3.16) at the solution (3.19) is. In the strong 't Hooft coupling λ 1 we find that (3.20) In order to get the last equality we used the relation Plugging the solution (3.19) back into (3.20), we obtain (3.22)

Effective twisted superpotential at large N
The effective twisted superpotential of the theory reads (3.24) Let us try to find a solution to the BAEs (3.9). For the twisted superpotential (3.24), they are given by 23 (3.25) In the strong 't Hooft coupling limit, i.e. λ 1, (3.25) can be approximated as sign (Im(a i − a j )) .
(3.26) 22 One needs to set ∆1 = π 1 + 2i 3 m there and ∆2 = π 1 − 2i 3 m there . 23 The BAEs actually read ∂ W pert ∂a j = 2πlj where lj ∈ Z are angular ambiguities. Since lj's are generically of order one they are negligible in the final solution and we set them to zero in the following.

JHEP11(2018)119
The sign function in (3.26) could be replaced by sign(i − j) if the eigenvalues a i are ordered by increasing imaginary part. We thus find that Note that the above result is neither real nor integer. This is peculiar to the limit λ 1. Since the n k 's are large we treat them effectively as a continuous variable. We also consider the above result as a complex saddle point contribution to the partition function.
The twisted superpotential (3.24) at strong 't Hooft coupling limit can be approximated as (3.28) This can be further simplified to (n i − n j ) sign (Im(a i − a j )) .

(3.29)
Plugging (3.27) back into (3.29), all the dependence on a i goes away and we are left with

(3.30)
This can be more elegantly rewritten as where F (∆) is given in (3.22).
W(∆, t) and the 4D central charge. Remarkably, we find the following relation between the twisted superpotential (3.30) and the conformal anomaly coefficient a(∆, t) of the four-dimensional N = 1 theory that is obtained by compactifying the 6D N = (2, 0) theory on Σ g 2 [65,66], where τ is the four-dimensional coupling constant.

JHEP11(2018)119
Indeed, the central charge of the 4D theory, at large N , can be written as where we used∆ ς = β∆ ς /π, satisfying∆ 1 +∆ 2 = 2, to parameterize a trial R-symmetry of the 4D N = 1 theory. Eq. (3.33) can be easily derived from the results in [65,66] (cf. for example [66, eq. (2.22)]). It can be also more straightforwardly derived as in appendix C. Curiously, the same relation between the twisted superpotential and the central charge in (3.32) was found for a class of N = 1 gauge theories on S 2 ×T 2 , with a partial topological twist along S 2 [26].

Partition function at large N
The topologically twisted index of 5D N = 2 SYM on Σ g 2 × (Σ g 1 × S 1 ) reads .

(3.34)
This can be evaluated using (3.8). We can write . (3.35) We are interested in the logarithm of the partition function in the strong 't Hooft coupling limit. The only piece which survives in this limit is given by (3.36)

JHEP11(2018)119
In the strong 't Hooft coupling limit it can be approximated as where we assumed that the eigenvalues a i are ordered by increasing imaginary part, and used the relation  In writing the second equality we used the relation (3.32). In [26], the very same Cardy behaviour (3.40) of the partition function in the high-temperature limit has been proved for a class of N = 1 gauge theories on S 2 × T 2 , with a partial topological twist along S 2 .

Counting states and the I-extremization principle
The topologically twisted index of the 6D (2, 0) theory on Σ g 2 ×Σ g 1 ×T 2 can be interpreted as a trace over a Hilbert space of states on Σ g 2 × Σ g 1 × S 1 : where q = e 2πiτ , y = e iβ∆ and the Hamiltonian H L on Σ g 2 × Σ g 1 × S 1 explicitly depends on the magnetic fluxes s ς , t ς (ς = 1, 2). The number of supersymmetric ground states d micro with momentum n and electric charge q under the Cartan subgroup of the flavor symmetry

JHEP11(2018)119
commuting with the Hamiltonian -in the microcanonical ensemble -is then given by the Fourier transform of (3.41) with respect to (τ, ∆): whereβ = −2πiτ and the corresponding integration is over the imaginary axis.
In the limit of large charges, we may use the saddle point approximation. Consider for simplicity q = 0. The number of supersymmetric ground states d micro with charges (s, t, n) can be obtained by extremizing with respect to ∆ andβ, i.e. 44) and evaluating it at its extremum log d micro (s, t, n, 0) = I crit (s, t, n) .

(3.45)
Given (3.40), we see that the extremization with respect to ∆ is the c-extremization principle [45,68] and sets the trial right-moving central charge c r (s, t, ∆) to its exact value c CFT ≈ c r ≈ c l in the IR. For the case at our disposal, (3.12) has a critical point at , (3.46) and its value at∆ reads Extremizing I(β, ∆) with respect toβ yields β(s, t, n) = π c CFT (s, t) 6n . (3.48) Plugging back (3.46) and (3.48) into I(β, ∆), we find that This is obviously nothing else than Cardy formula [123]. This procedure corresponds to the I-extremization principle used for BPS black holes (strings) [5,24,26,27] in the context of the AdS 4(5) /CFT 3(4) correspondence and contains two basic pieces of information: 1. extremizing the index unambiguously determines the exact R-symmetry of the SCFT in the IR; 2. the value of the index at its extremum is the (possibly regularized) number of ground states.
We will apply this counting to supergravity black strings and black holes in section 4.

JHEP11(2018)119
3.2 USp(2N ) theory with matter on Σ g 2 × (Σ g 1 × S 1 ) In this section we focus on gauge theories with a conjectured massive type IIA dual [124] (see also [57,58,125,126]) and compute their partition function at large N . The dual supergravity backgrounds have a warped AdS 6 × S 4 geometry. The stringy root of this theories is in type I' string theory as strongly coupled microscopic theories on the intersection of N D4-branes and N f D8-branes and orientifold planes. The worldvolume theory on the N D4-branes plus their images is a USp(2N ) gauge theory with N f hypermultiplets in the fundamental representation and one hypermultiplet A in the antisymmetric representation of USp(2N ). In addition to the SU(2) R-symmetry the theory has an SU(2) M × SO(2N f ) × U(1) I global symmetry: SU(2) M acts on A as a doublet, SO(2N f ) is the flavor symmetry associated to the fundamental hypermultiplets, and U(1) I is the topological symmetry associated to the conserved instanton number current j = * Tr(F ∧F ). At the fixed point, the SO(2N f ) × U(1) I part of the symmetry is enhanced non-perturbatively to an exceptional group E N f +1 , due to the instanton which becomes massless at the origin of the Coulomb branch of the fixed point theory [57]. Finally, in the large N limit the free energy of the USp(2N ) theory on S 5 reads [127] The Cartan of USp(2N ) has N elements which we denote by u i , i = 1, . . . , N . We normalize the weights of the fundamental representation of USp(2N ) to be ±e i (so they form a basis of unit vectors for R N ). The antisymmetric representation thus has weights ±e i ± e j with i > j and N − 1 zero weights, and the roots are ±e i ± e j with i > j and ±2e i . As we shall see below, at large N , u i = O(N 1/2 ) (see (3.52) with α = 1/2). Hence, the contributions with nontrivial instanton numbers are exponentially suppressed in the large N limit.
We set the length of S 1 to one, i.e. β = 1, throughout this section.

Effective prepotential at large N
The effective prepotential of the theory is then given by (2.136): 51) where the index K labels all the matter fields in the theory. Here, we introduced the notation F (±a) ≡ F (a) + F (−a). Notice that the contribution of the last term to the large N prepotential is of O(N 2 ) and thus subleading. Let us analyze the effective prepotential (3.51) assuming that the eigenvalues grow in the large N limit. We restrict to Im a i > 0 due to the Weyl reflections of the USp(2N ) group. We consider the following JHEP11(2018)119 large N saddle point eigenvalue distribution ansatz: for some number 0 < α < 1 to be determined later. At large N , we define the continuous function t j = t(j/N ) and we introduce the density of eigenvalues normalized so that dtρ(t) = 1. In the large N limit the sums over N become Riemann integrals, for example, Consider the first line in (3.51): The second line is of O(N 2α+1 ) and thus subleading in the large N limit (as we see below). Using the ansatz (3.52) we may write where Θ(t) is the Heaviside theta function. Now, let us focus on the second line of (3.51). Consider the following terms

JHEP11(2018)119
At large N , we obtain (3.58) Next, consider Its contribution can be simply obtained by, see (E.5), We thus find The next term that we shall consider is the following Li 3 (e i(a i +a j +∆m) ) + Li 3 (e −i(a i +a j −∆m) ) (3.62) The first term in the first line is exponentially suppressed in the large N limit (since Im a i > 0 , ∀i). We then get (3.63)

JHEP11(2018)119
The last term that we shall consider reads (3.64) Its contribution can be simply obtained by, see (E.5), (3.65) We thus find that (3.67) where we added the Lagrange multiplier µ for the normalization of ρ(t). α will be determined to be 1/2 by the competition between the first and the last term in (3.67), and therefore F ∝ N 5/2 . Remarkably, the effective prepotential (3.67) equals the large N expression of the S 5 free energy computed in [127, eq. (3.4)] (see also [128, eq. (3.14)]). This is in complete analogy with the observation made in [46]. There, the effective twisted superpotential of a three-dimensional N = 2 theory on A-twisted Σ g 1 × S 1 was shown to be equal to the S 3 free energy of the same N = 2 theory, both evaluated at large N .
Extremizing (3.67) with respect to the continuous function ρ(t) we find the following saddle point equation On the support of ρ(t) the solution reads 24 F (∆m) = 2 5 µ(∆m) due to a virial theorem for the large N prepotential (3.67).

JHEP11(2018)119
Finally, let us rewrite (3.70) as for later use. Here we introduced the democratic chemical potentials

Effective twisted superpotential at large N
We are interested in the large N limit of the effective twisted superpotential (3.73) We consider the following ansatz for the large N saddle point eigenvalue distribution Consider the first line in (3.73): (3.75) The g 2 terms are of O(N 2 ) and thus subleading in the large N limit. Hence, Now, let us focus on the second line of (3.73). Consider the following terms (3.77)

JHEP11(2018)119
At large N , we obtain where we used the democratic chemical potentials and fluxes The similar contribution coming from the vector multiplet can be obtained by using (3.81) We thus find that (3.82) The next term we shall consider is given by (3.83) In the large N limit it can be approximated as

JHEP11(2018)119
Putting (3.76), (3.82), and (3.84) together we obtain the final expression for the effective twisted superpotential at large N : (3.85) where we added the Lagrange multiplier γ for the normalization of ρ(t). In order to have a non-trivial saddle point we need to set 1 + 3α = 2 + α, implying that α = 1/2. The twisted superpotential thus scales as N 5/2 . Setting to zero the variation with respect to ρ(t), we get the equation .

(3.86)
On the support of ρ(t) the solution is given by This can be more elegantly rewritten as where F (∆) is given in (3.71).

JHEP11(2018)119
W and the free energy on Σ g 2 × S 3 . Remarkably, we find the following relation between the twisted superpotential (3.89) and the S 3 free energy of the 3D N = 2 theory that is obtained by compactifying the 5D theory on Σ g 2 with fluxes t ς : where W(∆ m , t) is evaluated at its extremum Indeed, the S 3 free energy was very recently computed holographically in [64] and it reads where κ = 1 for g 2 = 0 and κ = −1 for g 2 > 1 and the variable z parameterizes the fluxes t ς . In the special case of the torus, g 2 = 1, the above expression should be replaced by It is now a simple exercise to check that (3.90) holds identically for all g 2 upon identifying We expect that (3.90) holds also off-shell where F Σg 2 ×S 3 (∆, t) is the free energy as a function of a trial R-symmetry. Eq. (3.90) would correspond then to the statement that the S 3 free energy of the 3D theory is obtained by extremizing F Σg 2 ×S 3 (∆, t) with respect to ∆ [129]. 26

Partition function at large N
The topologically twisted index of the USp(2N ) theory with matter on Σ g 2 × (Σ g 1 × S 1 ) reads The free energy on Σg 2 × S 3 as a function of ∆ was explicitly computed in field theory in [67] after the completion of this work. The result in [67] perfectly agrees with (3.95).

JHEP11(2018)119
. (3.96) The products N i=1 are of O(N 2 ) and thus subleading in the large N limit. Then we consider the last line in (3.96): (1) where we introduced the democratic fluxes The similar contribution coming from the vector multiplet can be obtained by using (3.101) We thus find that log Z

JHEP11(2018)119
The terms coming from the roots e 1 + e 2 and −e 1 − e 2 are treated as in (3.98). They can be approximated at large N as log Z (2) vector + log Z (2) hyper ≈ (3.103) Putting everything together we obtain the following functional for the logarithm of the partition function at large N : (3.104) Finally we take the solution to the BAEs (3.87), plug it back into (3.104) and compute the integral. We obtain (3.105) Remarkably, this can be rewritten as where W(t, ∆) and F (∆) are given in (3.88) and (3.71), respectively. In analogy with [5,24], we expect that the extremization of the topologically twisted index (3.106) reproduces the entropy of asymptotically AdS 6 black holes in massive type IIA supergravity with magnetic fluxes t m and s m , and horizon topology AdS 2 × Σ g 1 × Σ g 2 . Unfortunately, such black holes are still to be found. The only known example is the black hole dual to the universal twist, i.e. t m = 1 − g 2 and s m = 1 − g 1 , whose entropy was computed in [114], using gauged supergravity in six dimensions and elaborating on the results in [130]. The result for the entropy [114, eq. (4.36)] has been recently corrected by a factor of two in [131]. Our index (3.106) for the appropriate values of the chemical potentials for the universal twist, i.e. ∆ 1 = ∆ 2 = π, predicts and correctly matches the result in [131]. 27 27 We thank P. Marcos Crichigno, Dharmesh Jain and Brian Willett for pointing out a numerical mistake in our computation in the first version of this paper.

4D black holes from AdS 7 black strings
Our primary interest in this section is to understand the I-extremization principle (3.43) for the topologically twisted index of the 6D N = (2, 0) theory in terms of holography and, in particular, in terms of the attractor mechanism [132,133] in N = 2 supergravity. We shall consider the supergravity dual of two-dimensional N = (0, 2) SCFTs obtained by compactifying a stack of M5-branes on Σ g 1 × Σ g 2 . These solutions were constructed in [68] and can be viewed as black strings in seven dimensions, interpolating between the maximally supersymmetric AdS 7 vacuum at infinity and the near-horizon AdS 3 ×Σ g 1 ×Σ g 2 geometry. This leads to a natural holographic interpretation of these black strings as RG flows across dimensions -we have a flow from the 6D N = (2, 0) theory in the UV to a 2D N = (0, 2) SCFT in the IR. The BPS black strings in AdS 7 ,á la Maldacena-Nuñez [134], preserve supersymmetry due to the topological twist on the internal space Σ g 1 × Σ g 2 .
Let us briefly review these solutions. We work with a U(1) 2 consistent truncation [135] of the SO(5) maximal (N = 4) gauged supergravity in seven dimensions [136], obtained by reducing the eleven-dimensional supergravity on S 4 [137,138]. It contains the metric, a three-form gauge potential S 5 , two Abelian gauge fields A I in the Cartan of SO(5) and two real scalars λ I (I = 1, 2). The solution can then be written as 28 e 2gσ(r) ds 2 Σσ , where ds 2 Σ = dθ 2 + f 2 κ (θ)dϕ 2 defines the metric on a surface Σ of constant scalar curvature 2κ, with κ = ±1, and The volume of Σ σ is given by Moreover, F I = dA I and f (r), g σ (r), λ I (r) are functions of the radial coordinate only. In the AdS 3 region the scalars are fixed in terms of the magnetic charges: (4.5) As shown in [68] the holographic central charge c sugra (s, t) can be computed,á la Brown-Henneaux [139], as and it matches the CFT result (3.47).
If we now add a momentum n along the circle inside AdS 3 and do a compactification along this circle, we obtain a static black hole in six-dimensional gauged supergravity. By a standard argument, the entropy of such black hole is given by the number of states of the CFT with momentum n, and is therefore given by the Cardy formula (3.49) As discussed in section 3.1.4, the entropy S BH (s, t, n) is the result of extremizing the functional I SCFT (β, ∆). Both for dyonic BPS black holes in AdS 4 [5,24,31,32] and BPS black strings in AdS 5 [26,27,41] the I-extremization principle has been identified with the attractor mechanism in 4D N = 2 gauged supergravity [19,20]. We thus expect that the Iextremization principle (3.43) corresponds to the attractor mechanism in six-dimensional gauged supergravity. Unfortunately, not much is known about such mechanism in six dimensions. Therefore, our strategy is to first reduce the seven-dimensional gauged supergravity on Σ g 2 down to five dimensions and then do a further reduction on the circle inside AdS 3 to four-dimensional N = 2 gauged supergravity, where the attractor mechanism for static BPS black holes is well-understood. An analogous argument has been used in [140] to explain the extremization of the R-symmetry in the two-dimensional CFT.

Attractor mechanism
In 4D N = 2 gauged supergravity 29 with n V vector multiplets (Λ = 0, 1, . . . , n V ) the Bekenstein-Hawking entropy of a static BPS black hole with horizon topology Σ σ , with a charge vector Q = (p Λ , q Λ ), can be be obtained by extremizing [20] I sugra ( 8) 29 We refer to [141] and the appendices of [43] for notations and more details about gauged supergravity in five and four dimensions.

JHEP11(2018)119
with respect to the symplectic sections X Λ such that its value at the critical point is real. Here, with F sugra (X Λ ) being the prepotential, G = (g Λ , g Λ ) is the vector of magnetic g Λ and electric g Λ Fayet-Iliopoulos (FI) parameters, and G N is the four-dimensional Newton's constant. 30 In general, in gauged supergravity, F sugra (X Λ ) is a homogeneous function of degree two, so we can equivalently defineX Λ ≡ X Λ /(g Λ X Λ − g Λ F Λ ) and extremize The critical value of (4.10)X Λ determines the value of the physical scalars z i at the horizon, and the entropy of the black hole is then given by evaluating the functional (4.10) at its extremum S BH (p Λ , q Λ ) = I sugra (X Λ ) .

(4.11)
This is the so-called attractor mechanism [132,133], stating that the area of the black hole horizon is given in terms of the conserved charges and is independent of the asymptotic moduli.
In a general gauged supergravity with n H hypermultiplets, in addition to the gravitino and gaugino BPS equations, one needs to impose the BPS equations for the hyperino. Altogether these equations become algebraic in the near-horizon limit and fix the horizon value of the scalars in the vector multiplets z I = X I /X 0 and the hyperscalars q u , u = 1, · · · , 4n H . The full set of equations can be found in [142]. In general, the hyperino equations at the horizon just yield a set of linear constraints on the sections X Λ . In simple models, this can be used to integrate out all massive fields at the horizon and write an effective theory with only massless vectors to which we can directly apply (4.10). This approach has been used in [31,32] to reproduce the entropy of AdS 4 × S 6 black holes in massive type IIA supergravity and, as we will see below, also works here.

Localization meets holography
In order to use the attractor mechanism (4.10), we need to determine the matter content and the prepotential of the four-dimensional N = 2 gauged supergravity. This can be done in two steps, by first reducing on Σ g 2 , and then on a circle. Fortunately, both reductions have been worked out in the literature, respectively in [143] and [141], and we can use the results reported there.
The consistent truncation of seven-dimensional N = 4 SO(5) gauged supergravity reduced on a Riemann surface has been discussed in [143]. It contains two vector multiplets and a charged hypermultiplet. The vector multiplet scalars in 5D N = 2 supergravity are 30 The magnetic and electric charges are defined as Σσ F Λ = vol(Σσ)p Λ and Σσ GΛ = vol(Σσ)qΛ where GΛ = 8πG (4) N δ(L dvol4)/δF Λ . In a frame with purely electric gauging gΛ, the charges are quantized as ησgΛp Λ ∈ Z and ησqΛ/(4G where the symmetric coefficients c IJK can be identified with the 't Hooft cubic anomaly coefficients [144], and for the model at hand c 123 = 1 is the only nonzero component. The prepotentials and Killing vectors associated to the hypermultiplet can be found in [143] but we will not need the explicit form of them here. We can proceed further by adding a momentum n along S 1 ⊂ AdS 3 . The near-horizon geometry of the 5D black string is then BTZ × Σ g 1 , where the metric for the extremal BTZ reads [145] (4.13) Here, the parameter ρ is related to the electric charge n. This is locally equivalent to AdS 3 , since there exists locally only one constant curvature metric in three dimensions, and solves the same BPS equations; however, they are inequivalent globally. Compactifying the 5D black string on the circle [141] we obtain a static BPS black hole in four dimensions, with magnetic charges (s 1 , s 2 ) and electric charge n. It can be thought as a domain wall which interpolates between an AdS 2 × Σ g 1 near-horizon region and an asymptotic non-AdS 4 vacuum. The 4D N = 2 gauged supergravity is the STU model (n V = 3) coupled to a charged hypermultiplet [141]. It has the prepotential (4.14) The new vector multiplet corresponds to the isometry of the compactification circle and is associated with Λ = 0. The physical scalars z I = X I /X 0 are now complex. Their imaginary part is proportional to the five-dimensional real scalars L I and the real part is given by the component of the gauge fields along the compactified direction. In the near-horizon region, the hyperscalars have a nonzero expectation value and, consequently, one of the gauge fields 31 becomes massive. The only physical role of the hypermultiplet is indeed to Higgs one of the gauge fields leaving an effective theory with only two massless vector multiplets. We can write down the effective theory as follows. The hyperino BPS equation can be obtained by reducing to four dimensions equation [143, eq. (A.22)]. After setting the massive gauge field to zero and considering constant scalars at the horizon, we find that 32 We see that the hyperino BPS equation only imposes a linear constraint among the sections, which can be used to write an effective prepotential for the sections X 0 , X 1 , X 2 corresponding to the massless vectors at the horizon. 31 This vector is called cµ in [143]. 32 We are using [143, eqs. (23) and (36)]. The relations between parameters are the following: −4η2pI = tI and L I here = X I there . Note that, in the black string of [68], the 7D gauge coupling has been fixed as m = 2.

JHEP11(2018)119
We can now use (4.10). In our case, the vector of FI parameters reads [141] G = (0, 0, 0, 0, g, g) . (4.17) The charge vector of the 4D black hole is also given by N n, 0, 0 , (4.18) so that (4.10) can be written as We may fix the constant g = 4 in the following. Upon identifyinĝ 20) and using the relations between field theory and gravitational parameters 33 at large N we find that the attractor mechanism (4.19) elegantly matches the field theory result (3.43). Explicitly, we can write where W is given in (3.30).
We also see that the I-extremization principle for the topologically twisted index of the 6D N = (2, 0) theory correctly leads to the microscopic counting for the entropy of the six-dimensional black holes obtained by compactifying on a circle the black string solutions of [68].

Discussion and future directions
In this paper we took the first few steps towards the derivation and evaluation of the topologically twisted index of five-dimensional N = 1 gauge theories. There are countless aspects that we have just briefly addressed in this paper.
In particular, the structure of the index at finite N needs to be studied in more details. It was argued in [54][55][56] that the equivariant partition function is summed over a set of magnetic fluxes that satisfy complicated semi-stability conditions. These conditions have been studied by mathematicians [112] but they become increasingly complicated with N and are almost intractable already for N = 3 or N = 4. A related problem is the choice of 33 The reduction in [143] and [141] is done on a Riemann surface and a circle of volume 2πη2 and 2π, respectively.

JHEP11(2018)119
integration contour. This is selected by supersymmetry, but it is not determined so simply in our approach. We expect, in analogy with three and four dimensions, that some sort of Jeffrey-Kirwan prescription [92] is at work. It would be very interesting if the correct determination of the contour allows to simplify the final expression for the matrix model and also the semi-stability constraints on the fluxes.
In the paper we conjectured that the Seiberg-Witten prepotential F (a) in five dimensions should play the role of the twisted superpotential in three and four dimensions and, in particular, its critical points should be relevant for the evaluation of the topologically twisted index. In three and four dimensions, a large set of partition functions, not only the twisted indices, can be written as a sum over Bethe vacua [12,13,16,17]. It would be interesting to see if F (a) plays, at least partially, a similar role in five dimensions. For this reason, it would be interesting to evaluate explicitly the index for simple theories in five dimensions and compare the results for dual pairs [146,147].
Also our computations at large N is based on the assumption of the importance of the critical points of F (a). The large N results can be explicitly tested against holographic predictions. It would be particularly interesting, from this point of view, to find a class of AdS 6 black holes depending non-trivially on a set of magnetic fluxes [69]. This would allow to test the results in section 3 and compare with possible alternatives (like, for example, the one discussed in appendix D).
In the large N analysis we considered for simplicity two particular theories, N = 2 SYM and the USp(2N ) UV fixed point. We expect that our formalism and our general results (1.9), (1.10) and (1.11) extend to other theories, with no particular complications. We also considered just the case of P 1 × P 1 × S 1 (which can be trivially generalized to Σ g 1 × Σ g 2 × S 1 ). The main reason is that, for a factorized manifold, we can perform a dimensional reduction to three dimensions and use the results for three-dimensional topologically twisted indices, which are well developed. One main ingredient of the analysis was the twisted superpotential of such compactification, defined for each sector of the gauge magnetic flux on Σ g 2 . However, let us notice that, even for a compactification on M 4 × S 1 , we can formally define a twisted superpotential. This can be defined through (3.4), by considering the theory on the equivariant background with 1 = and 2 = 0 and by gluing the corresponding Nekrasov's partition functions, or just by analogy with (3.7). Once we have this twisted superpotential W(a, n), that depends on the Coulomb variables a i and gauge fluxes n i , we can extremize both F (a) and W(a, n) with respect to a i and n i . A generalization of (3.8) would then give an expression for the topologically twisted index. We do not know if this approach leads to the correct result, but we have reasons to expect that, in the large N limit, the result for different M 4 should be very similar. In particular, one can easily see from appendix C that the two-dimensional trial central charge of the compactification of the N = (2, 0) theory on M 4 depends on M 4 only through the topological factor p 1 (M 4 ) + 2χ(M 4 ). It would be very interesting to investigate further this issue.
We plan to came back to all these points in the near future.
A manifold M 4 of complex dimension two is toric if it admits a (C * ) 2 action and (C * ) 2 itself is dense in M 4 . Smooth toric surfaces can be obtained by gluing together copies of C 2 [72]. In this appendix we briefly review this construction focusing on the aspects used in the paper.
A compact toric variety M 4 of complex dimension two is described a set of d integer vectors n l in the lattice N = Z 2 such that the angle between any pair of adjacent vectors is less than π, as in figure 1. We order the vectors such that n l and n l+1 are adjacent and we also identify n d+1 = n 1 . The variety is smooth if n l and n l+1 are a basis for the lattice N = Z 2 . We will assume from now on that our varieties are smooth.
Consider also the dual lattice M = N * , equipped with the natural pairing m, n = 2 i=1 m i n i ∈ Z for m ∈ M , n ∈ N . Points in N are associated with one-parameter subgroups of (C * ) 2 and points in M with holomorphic functions on (C * ) 2 . In particular, we associate points m ∈ M with monomial functions z m 1 1 z m 2 2 and define a natural (C * ) 2 action on the variables z i .
Each pair of adjacent vectors ( n l , n l+1 ) defines a two-dimensional cone σ l in the real vector space N R = N ⊗ Z R, We can associate an affine variety V σ l (which in the smooth case is a copy of C 2 ) to each σ l as follows. Consider the dual coně The lattice of integer points inσ l are generated by the primitive integer vectors m l normal to the faces of σ l and pointing inwards. 34 We define V σ l as the affine 34 A vector is primitive if its components are relatively prime. variety whose set of holomorphic functions is {z µ 1 1 z µ 2 2 } for all integer vectors (µ 1 , µ 2 ) ∈σ l . V σ l is just isomorphic to C 2 . For example, consider the case n 1 = (1, 0) and n 2 = (0, 1). The dual cone is then generated by m 1 = (1, 0) and m 2 = (0, 1) and contains all the integer points in the first quadrant. The corresponding set of functions z µ 1 1 z µ 2 2 with µ 1 ≥ 0, µ 2 ≥ 0 are precisely the holomorphic functions on C 2 . We also associate the vector n 1 with the open dense subset where z 2 = 0 and the vector n 2 with the open dense subset where z 1 = 0. Since n l and n l+1 are a basis for N = Z 2 , the generic case can be always reduced to the previous one by a change of lattice basis. Explicitly, we can just replace in the previous example z 1 and z 2 with local coordinates z that parameterize a copy of C 2 , where m l and m l+1 are the primitive integer vectors orthogonal to n l+1 and n l and pointing inwards in σ l , respectively.
The smooth toric variety M 4 is then constructed by gluing together the d affine varieties V σ l , isomorphic to C 2 , by identifying the dense open subset associated with n l in V σ l−1 and V σ l . This is completely analogous to the construction of P 1 as a gluing of two copies of C. The action of the torus (C * ) 2 on the variables z 1 and z 2 extends naturally to a global action on V . Each chart V σ l contains a special point, the origin (0, 0) ∈ C 2 , which is invariant under the torus action. These are the only invariant points and each of these belongs precisely to one chart. We then see that there exactly are d fixed points under the torus action (C * ) 2 , one for each of the two-dimensional cones σ l .
Each vector n l determines a divisor D l in M 4 and a corresponding line bundle. 35 There are precisely two relations among them given by where m 1 = (1, 0) and m 2 = (0, 1) is a basis for M . This means that there are d − 2 independent two-cycles in M 4 . The intersection number of D l and D l , with l = l , is one if n l and n l are adjacent and otherwise is zero. As we saw, the partition function on M 4 × S 1 localizes at the d fixed points of (C * ) 2 . Each contributes a copy of the Nekrasov's partition function of the corresponding chart 35 In a local chart corresponding to n1 = (1, 0) and n2 = (0, 1), D1 restricts to z1 = 0 and D2 to z2 = 0.

JHEP11(2018)119
V σ l , twisted by the magnetic flux. The total magnetic flux is given by a divisor d l=1 p l D l in M 4 , but the fixed point in the chart V σ l will only feel the contribution of the flux coming from the divisors D l and D l+1 . In the case of the chart C 2 , specified by the vectors n 1 = (1, 0) and n 2 = (0, 1), the local variables z 1 and z 2 parameterize the tangent space around the fixed point z 1 = z 2 = 0. In this case we write a copy of the Nekrasov's partition function with equivariant parameters 1 and 2 and Coulomb variable a given by a + 1 p 1 + 2 p 2 . (A.4) The replacement for a generic chart V σ l is then easily obtained. The equivariant parameters are replaced by the action of (C * ) 2 on the local parameters z

B Metric and spinor conventions
We work in Euclidean signature in five dimensions. We use m, n, p, . . . for spacetime and a, b, c, . . . for tangent space indices. Spacetime indices are lowered and raised by g mn and its inverse g mn . Tangent space indices are lowered and raised by δ ab and δ ab . Repeated indices are summed. The two sets of indices are related using a vielbein e a m , such that g mn = e a m e a n . The spin group is Spin(5) USp(4). A spinor is a section ζ α of the pseudo-real 4 representation of USp(4) with α ∈ {1, . . . , 4}. The Clifford algebra is generated by Γ a with a ∈ {1, . . . , 5} and Γ a , Γ b = 2δ ab . (B.6) The Γ matrices have index structure (Γ a ) α β . We define the Pauli matrices

JHEP11(2018)119
We define the Γ matrices with multiple indices using permutations as Γ a 1 a 2 ...ap ≡ 1 p! σ∈perm(p) We also define σ ij ≡ 1 2 (σ iσj − σ jσi ) ,σ ij ≡ 1 2 (σ i σ j −σ j σ i ) . We also define a spinor Lie derivative along a Killing vector field v as 14) The Γ a satisfy (Γ a ) † = Γ a , (B. 15) where † denotes the conjugate transpose. We define a charge conjugation matrix The R-symmetry group of the five-dimensional N = 1 super-algebra is SU(2) R with invariant antisymmetric tensor ε IJ such that If the manifold M 4 is not spin, all spinors are valued instead in an appropriate bundle associated with the choice of a spin c structure. This choice can be made canonically for an almost complex manifold, but doing so may require a redefinition of certain background fluxes. See [148] for examples in the context of localization and [149] for a complete reference.

JHEP11(2018)119
C Large N 't Hooft anomalies of 4D/2D SCFTs from M5-branes In this appendix we provide a simple formula, at large N , in order to extract the 't Hooft anomaly coefficients of four-dimensional N = 1 (or two-dimensional N = (0, 2) field theories) that arise from M5-branes wrapped on a Riemann surface Σ g 2 (or a fourmanifold M 4 ). The trial 't Hooft anomaly coefficients of this class of theories can be extracted by integrating the eight-form anomaly polynomial I 8 of the 6D N = (2, 0) theory over Σ g 2 or M 4 [65,66,68,150]. The anomaly eight-form of the 6D theory of type g = (A n≥1 , D n≥4 , E 6 , E 7 , E 8 ) reads [151][152][153]  where I 8 [1] is the anomaly eight-form of one M5-brane [154], N W is the SO(5) R-symmetry bundle, and p 2 (N W ) is its second Pontryagin class. Here we have denoted the rank, the dimension, and the Coxeter number of the Lie algebra g by r g , d g and h g , respectively. For the A N −1 theory, in the large N limit, the anomaly eight-form is simply given by where e ς (ς = 1, 2) are the Chern roots of N W . Let us first consider the compactification of 6D theories on a Riemann surface Σ g 2 . The prescription in [65,66] for computing the anomaly coefficient a(∆) of the 4D SCFT amounts to first replace the Chern roots e ς in (C.2) with e ς → − t ς 2(1 − g 2 ) x +∆ ς c 1 (F ) , (C.3) implementing the topological twist along Σ g 2 , and then integrate the I 8 [A N −1 ] on Σ g 2 : Here x is the Chern root of the tangent bundle to Σ g 2 , c 1 (F ) is a flux coupled to the R-symmetry, t ς are the fluxes parameterizing the twist and∆ ς parameterize the trial Rsymmetry. They fulfill the following constraints t 1 + t 2 = 2(1 − g 2 ) ,∆ 1 +∆ 2 = 2 . (C.5) On the other hand, the anomaly six-form of a 4D SCFT, at large N , reads The 't Hooft anomaly coefficient a(∆), at large N , where c = a, can then be read off by expanding I 8 [A N −1 ] at first order in x, using (C.4) -Σg 2 x = 2(1 − g 2 ) -and comparing the result with (C.6). It is simply given by This is (3.33) in the main text.

JHEP11(2018)119
Consider now the compactification of 6D field theories on Σ g 1 × Σ g 2 [68]. We first need to replace e ς → − s ς 2(1 − g 1 ) x 1 − t ς 2(1 − g 2 ) x 2 +∆ ς c 1 (F ) , (C. 8) where x ς are now the Chern roots of the tangent bundles to Σ gς , and t ς /s ς the fluxes on Σ g 2 /Σ g 1 , with t 1 + t 2 = 2(1 − g 2 ) , s 1 + s 2 = 2(1 − g 1 ) . (C.9) Then we integrate I 8 [A N −1 ] over Σ g 1 × Σ g 2 using Σg ς x = 2(1 − g ς )δ ς . The result should be compared with the four-form anomaly polynomial of the two-dimensional SCFT that, in the large N limit, where c l = c r , reads This time only the term proportional to x 1 x 2 in (C.2) contributes and we obtain This is (3.12) with the identification β∆ ς /π =∆ ς . For completeness, we also study the compactification of 6D field theories on a fourmanifold M 4 with a single flux on M 4 . Denoting with x 1 and x 2 the Chern roots of the tangent bundle to M 4 , the topological twist can be implemented by [68] e ς → −r ς (x 1 + x 2 ) +∆ ς c 1 (F ) , We see that the 't Hooft anomaly coefficients of 4D (or 2D) field theories, which are obtained by wrapping M5-branes on Σ g 2 (or M 4 ), can always be written as (multiple) applications of operators of the form 2 ς=1 r ς ∂∆ ς to the function (∆ 1∆2 ) 2 , appearing in the eight-form anomaly polynomial through the term p 2 (N W ).

D An alternative large N saddle point for the USp(2N ) theory
In this appendix, for completeness, we discuss a possible alternative method for evaluating (3.8) in the saddle point approximation. Solving (3.9) in the large N limit gives a JHEP11(2018)119 relation between a (i) and n i . Eliminating a (i) , we can write (3.8) as a sum over the fluxes n i : Z pert Σg 2 ×(Σg 1 ×S 1 ) (s, t, ∆) = (−1) rk(G) |W| n∈Γ h Z pert m=0 (a(n), n) det ij ∂ 2 W pert (a(n), n) ∂a i ∂a j g 1 −1 , (D.1) where a (i) (n) is the large N solution to (3.9). Each term in the sum is an exponentially large function of N , and we can use again the saddle point approximation to find the dominant contribution to the partition function. While for N = 2 SYM this method fails since (3.9) completely fixes the values of n i , it works for the USp(2N ) theory. For completeness, we quote the result for the partition function evaluated with this approach log Z(∆ m , t m , s m ) = 4N 5/2 5 8 − N f (∆ 1 t 2 + ∆ 2 t 1 )(∆ 1 s 2 + ∆ 2 s 1 )(s 1 t 2 + s 2 t 1 ) .

(D.2)
Notice that this is different from (3.106). It coincides with (3.106) only in the case of the universal twist, t m = 1 − g 2 and s m = 1 − g 1 . It would be very interesting to compare the two alternative results with the entropy of asymptotically AdS 6 black holes in massive type IIA supergravity, with magnetic fluxes t m and s m [69].

E Polylogarithms
Polylogarithms Li s (z) are defined by where B s (a) are the Bernoulli polynomials. In this paper we need, in particular, One can find the formulae in the other regions by periodicity. Let us also mention that g s (2π − a) = (−1) s g s (a) . (E.5) Finally, assuming 0 < ∆ < 2π, we find that Li s (e t+i∆ ) ∼ i s−2 g s (−it + ∆) , as t → ∞ . (E.6) 36 The inversion formulae in the domain −2π < Re a < 0 are obtained by sending a → −a.