Defects and quantum Seiberg-Witten geometry

We study the Nekrasov partition function of the five dimensional U(N) gauge theory with maximal supersymmetry on ℝ4 × S1 in the presence of codimension two defects. The codimension two defects can be described either as monodromy defects, or by coupling to a certain class of three dimensional quiver gauge theories on ℝ2 × S1. We explain how these computations are connected with both classical and quantum integrable systems. We check, as an expansion in the instanton number, that the aforementioned partition functions are eigenfunctions of an elliptic integrable many-body system, which quantizes the Seiberg-Witten geometry of the five-dimensional gauge theory.


Introduction
Supersymmetric gauge theories provide a rich source of inspiration for various branches of mathematics. From a practical viewpoint, they can also provide a powerful set of techniques to solve challenging mathematical problems using physics. The interplay between supersymmetric gauge theories and mathematics is enhanced by introducing defects that preserve some amount of supersymmetry.
In this work, we study 5d U(N ) N = 2 supersymmetric gauge theories with codimension two and codimension four defects and how they are connected to the quantization of the integrable system associated to its Seiberg-Witten geometry [1,2]. We focus on a class of codimension two defects preserving N = 4 supersymmetry in three dimensions. They can be described either as Gukov-Witten monodromy defects [3,4] or by coupling to a class JHEP05(2015)095 of 3d N = 4 supersymmetric gauge theories. We will concentrate on the surface defect obtained by introducing the most generic monodromy for the gauge field, or alternatively by coupling to the 3d N = 4 theory T [U(N )] [5]. The codimension four defects are described by supersymmetric Wilson loops.
As a preliminary step towards understanding and computing with surface defects, we will first find a reformulation of the twisted chiral ring of a canonical deformation of the T [U(N )] theory on S 1 × R 2 , building on the work of [6]. We will show that the twisted chiral ring relations are equivalent to the spectral curve of an associated classical N -body integrable system, known as the complex trigonometric Ruijsenaars-Schneider (RS) system. In addition, this provides a reformulation of the equivariant quantum K-theory of the cotangent bundle to a complete flag variety, via the Nekrasov-Shatashvili correspondence [7,8]. We will also explore the connection with quantum K-theory for more general linear quiver gauge theories. This classical integrable system can be quantized by turning on an equivariant parameter for rotations in R 2 , otherwise known as the three-dimensional Omega background S 1 × R 2 [9]. As it is technically simpler, we will first consider the squashed S 3 partition function of T [U(N )] theory using results from supersymmetric localization [10,11]. The partition functions on S 1 × R 2 can then be obtained by factorization of the S 3 partition function [12,13]. We show that these supersymmetric partition functions are eigenfunctions of the quantized trigonometric Ruijsenaars-Schneider system with the Planck constant proportional to . The corresponding eigenvalues are given by supersymmetric Wilson loops for background U(N ) flavor symmetries. The twisted chiral ring relations, or equivalently the spectral curve of the classical integrable system, are reproduced in the semi-classical limit → 0.
In coupling the three-dimensional theory T [U(N )] theory as a surface defect in 5d U(N ) N = 2 gauge theory, the twisted chiral ring relations are deformed by an additional complex parameter Q, which is related to the 5d holomorphic gauge coupling. According to [14] it is expected that this deformation provides a presentation of the Seiberg-Witten curve of the 5d theory on S 1 × R 4 . The Seiberg-Witten curve of the 5d U(N ) N = 2 supersymmetric gauge theory is known to correspond to the spectral curve of the N -body elliptic Ruijsenaars-Schneider system [15]. This is indeed a deformation of the trigonometric RS system by an additional complex parameter Q.
In order to test this relationship, we will compute the 5d Nekrasov partition function of N = 2 U(N ) supersymmetric gauge theory on S 1 × R 4 1 , 2 in the presence of surface defects wrapping one of the two-planes S 1 × R 2 1 . This computation is performed by treating the surface defect as a monodromy defect and applying the orbifolding procedure introduced in [16,17]. In order to check that the Gukov-Witten monodromy defect is reproducing the same surface defect as coupling to T [U(N )] theory, we check that this computation reproduces the S 1 × R 2 1 partition function of T [U(N )] theory in the limit Q → 0 where the coupling to the 5d degrees of freedom is turned off. In particular, we note that the Gukov-Witten monodromy parameters are identified with the Fayet-Iliopoulos parameters of the 3d gauge theory supported on the defect.

JHEP05(2015)095
After performing this preliminary check, we study the full Nekrasov partition function on S 1 × R 4 1 , 2 as an expansion in the parameter Q. In the the Nekrasov-Shatashvili limit 2 → 0, we will show that the expectation value of the most generic surface defect is formally an eigenfunction of the elliptic RS system. Furthermore, we find that the corresponding eigenvalues are given by the expectation values of supersymmetric Wilson loops wrapping S 1 in the 5d gauge theory. This computation provides a quantization of the Seiberg-Witten geometry.
We will also study another type of codimension two defect by coupling directly to 3d hypermultiplets [18,19]. We focus on the simplest example where two free hypermultiplets of U(2) flavor symmetry are coupled to the bulk gauge field of the 5d U(2) N = 2 gauge theory. We will show that the partition function of this coupled system solves an eigenfunction equation of the so-called two-body dual elliptic Ruijsenaars-Schneider system. Indeed, the S-transformation of the 3d theory in [20] relates this partition function to the partition function of the U(2) gauge theory with a monodromy defect.
The paper is organized as follows. In section 2 we will relate the twisted chiral ring of T [U(N )] to the spectral curve of the classical trigonometric Ruijsenaars-Schneider system and discuss connections to equivariant quantum K-theory. In section 3 we show that partition functions on squashed S 3 and S 1 × R 2 are eigenfunctions of the corresponding quantized integrable system. Then in section 4 we explain how to compute the expectation values of surface defects in N = 2 U(N ) gauge theory on S 1 × R 4 and demonstrate that they are eigenfunctions of the elliptic RS system. Later in section 5 we present a cursory discussion of various limits and degenerations of the results presented in this paper. Finally, in section section 6 we summarize the connections of this work to integrable systems and discuss areas for further research.

Twisted chiral rings
In this section, we will study 3d N = 4 linear quiver gauge theories on S 1 ×R 2 , deformed by hypermultiplet masses, FI parameters, and with the canonical N = 2 * mass deformation. It was observed by Nekrasov and Shatashvili [7,8] that the equations determining the supersymmetric massive vacua on S 1 × R 2 , or the twisted chiral ring relations, can be identified with Bethe ansatz equations for a quantum XXZ integrable spin chain.
We will focus for the most part on the triangular quiver gauge theory: T [U(N )]. We will reformulate the statement of its twisted chiral ring in terms of the spectral curve of a classical N -body integrable system known as the complexified trigonometric Ruijsenaars-Schneider system. Alternatively, it can be viewed as a Lagrangian correspondence that diagonalizes this classical integrable system. This reformulation will be important when we come to couple this theory as a codimension two defect in five-dimensions.
We will explain how the corresponding statements for more general linear quivers can be obtained by a combination of Higgsing and mirror symmetry, and demonstrate this in a simple example. We will also briefly discuss connections to results in the mathematical literature on the equivariant quantum K-theory of the cotangent bundles to partial flag manifolds.  Figure 1. 3d N = 4 quiver gauge theory of type A L with gauge group U(N 1 ) × · · · × U(N L ) and M i fundamental hypermultiplets at i-th gauge node.

The Nekrasov-Shatashvili correspondence
Three-dimensional theories with N = 4 supersymmetry have SU(2) H ×SU(2) C R-symmetry and flavor symmetries G H × G C acting on the fields parametrizing the Higgs and Coulomb branches respectively. For the purpose of this paper, it is important to turn on a canonical deformation preserving only N = 2 supersymmetry. The corresponding U(1) R is the diagonal combination of Cartan generators of SU(2) H × SU(2) C . The anti-diagonal combination becomes an additional flavor symmetry U(1) with real mass parameter . Furthermore, we turn on real deformation parameters by coupling to N = 2 vectormultiplets for G H × G C and giving a vacuum expectation value to the real scalar. In a UV description, these deformation parameters enter as real hypermultiplet masses denoted typically by m and FI parameters denoted by t. We refer to this setup as N = 2 * supersymmetry. We refer the reader to [6] for a more complete description of this setup.
Here, we focus on theories with a UV description as a linear quiver with unitary gauge groups. Our notation is summarized in figure 1. It is convenient to introduce a U(1) symmetry acting trivially such that the Higgs branch symmetry is given by U(M 1 ) × · · · × U(M L ). The corresponding mass parameters are denoted by {m M j }. Similarly, we introduce an additional topological U(1) so that the Coulomb branch symmetry manifest in the UV description is U(1) L+1 with corresponding parameters {t 1 , . . . , t L+1 }. The physical FI parameter at the j-th gauge node is t j+1 − t j . This symmetry can be enhanced by monopole operators up to a maximum of U(L + 1) in the IR.
We will focus on he twisted chiral ring of the effective 2d N = (2, 2) theory obtained by compactifying on a circle of radius R. In this case, the real deformation parameters are complexified by background Wilson lines wrapping the circle and behave as twisted masses in the language of N = (2, 2) supersymmetry.
For generic deformation parameters there is a discrete set of massive supersymmetric vacua on S 1 ×R 2 each with an associated effective twisted superpotential W (i) (m, t, ). This is a holomorphic function that is independent of superpotential and gauge couplings. In the UV theory one can integrate out three-dimensional chiral multiplets to find an effective twisted superpotential W(m, t, , s) for the dynamical vectormultiplets. The supersymmetric vacua are then solutions to exp 2πR ∂W ∂s i = 1 , (2.1)

JHEP05(2015)095
which can be identified with the twisted chiral ring relations of the effective twodimensional theory. The effective twisted superpotential of the generic linear quiver shown in figure 1 is given by (2. 2) The first term includes contributions from the FI parameters at each node together with phase δ i = M i + N i−1 + N i + N i+1 − 1. 1 The second term includes the 1-loop contributions from the KK tower of chiral multiplets. The basic building block of the 1-loop contributions is the contribution (m) from a three-dimensional chiral multiplet of mass m, which is a solution of the differential equation 2πR ∂ m (m) = log(2 sinh πRm). We refer the reader to [6] for an explicit expression. The final term is included to ensure that mirror symmetry acts straightforwardly in the presence of the spurious U(1) symmetries.
As the imaginary components of the twisted mass parameters are periodic, it is convenient to introduce exponentiated parameters (2.3) With this notation, the equations for the supersymmetric vacua are (2.4) for all i = 1, . . . , L. It was observed by Nekrasov and Shatashvili [7,8] that these equations can be identified with the Bethe equations of a quantum integrable XXZ spin chain. A complete dictionary for linear quivers can be found in [6].
In order to write down the twisted chiral ring it is necessary to introduce a generating function for the gauge invariant combinations of the σ (i) α 's. For this purpose, we introduce an auxiliary parameter u and monic polynomials The equations for supersymmetric vacua (2.4) can be expressed in terms of these polynomials as where the polynomials are understood to be evaluated at u = σ (i) dimensions of monopole operators charged under i-th gauge group. The superscripts on the polynomials are shorthand for multiplicative shifts of the arguments by η, for example In what follows, it will be useful to introduce another slightly less familiar reformulation of the twisted chiral ring. 2 We first rescale the FI parameters by τ i = τ i η i−1 j=1 ∆ j to absorb the dependence on ∆ j . Then we introduce the polynomial equations where Q i (u) are auxiliary polynomials of rank To recover equations (2.6) for the supersymmetric vacua we shift the argument this polynomial equation by η ± and evaluate both at roots σ Dividing one equation by the other, the combination ( τ i+1 − τ i ) and the auxiliary polynomials Q i (u) cancel out and we reproduce (2.4). The twisted chiral ring relations are given by expanding equations (2.7) in u.
Finally, 3d N = 4 theories have a remarkable duality known as mirror symmetry [21,22]. This can be understood from brane constructions in Type IIB String theory [23], where it is realized as the S-duality. Mirror symmetry acts in quite a non-trivial manner on the data (N i , M i ) of the linear quiver, which is spelled out in reference [6]. Mirror symmetry interchanges mass parameters and FI parameters of the quivers and also acts non-trivially on the N = 2 * mass deformation. Schematically, we have. 3 where the check symbol designates parameters of the dual theory.

Quantum/classical duality
As mentioned above, the equations for supersymmetric vacua can be identified with the Bethe equations for a quantum integrable spin chain. Remarkably, the same system of equations are related to a second, classical integrable system of interacting relativistic particles in one dimension -the complexified trigonometric Ruijsenaars-Schneider system [6]. This correspondence is most straightforward to understand in the case of the triangular quiver T [U(N )] (see figure 2) -this will be our main example throughout this paper.

JHEP05(2015)095
The effective twisted superpotential (2.2) of this theory is given by where δ j = j − 1, 4 and we define s = m α and t N +1 = 0 to simplify notation. For this theory, the Higgs and Coulomb branch symmetries are both U(N ) and we have corresponding exponentiated mass µ j and FI parameters τ j with j = 1, . . . , N . This theory is invariant under mirror symmetry with the transformation µ j ↔ τ j , η ↔ η −1 .
By introducing the conjugate momenta to µ j and τ j we provide canonical coordinates on two copies M µ and M τ of the cotangent bundle to (C * ) N with the following holomorphic symplectic forms This is the phase space of our complex classical integrable system. The defining equations for the conjugate momenta (2.10) sweep out a complex Lagrangian in the product L ⊂ M µ × M τ with holomorphic symplectic form Ω µ − Ω τ and generating function given by the on-shell twisted effective superpotential W(m i , t j , ). It is straightforward to find an explicit description of the Lagrangian L for T [U(2)] theory. The supersymmetric vacua equations read as follows The conjugate momenta for the FI terms are as follows and for the masses (2.14)

JHEP05(2015)095
Given the above definitions of conjugate momenta vacua equation (2.12) can be presented in two equivalent ways. First, as 15) and, second, as In (2.15) the combinations appearing on the left are the Hamiltonians of the complex trigonometric RS system for two particles with positions τ 1 , τ 2 and momenta p 1 τ , p 2 τ . The right hand sides are independent of the momenta p 1 µ , p 2 µ so the Lagrangian correspondence L diagonalizes the system. From this perspective, W(m a , t a , , s α ) evaluated on supersymmetric vacua are solutions of the relativistic Hamilton-Jacobi equation. The evident symmetry under µ j ↔ τ j and η ↔ η −1 means this Lagrangian also diagonalizes the same system with the coupling inverted η → η −1 .
To eliminate dynamical vectormultiplet scalars σ α from the supersymmetric vacuum equations in favor of the conjugate momenta p j µ or p j τ in the case N > 2 is rather non-trivial task. Below we demonstrated that one can do this in two equivalent ways. First as and, second, as In both relations above is the Lax matrix for the N -body complex trigonometric RS system. One can clearly see that (2.17) and (2.18) are related to each other by mirror symmetry map (2.8). Therefore, somewhat artificially, we can refer to the former relation as written in the 'electric' frame, where eigenvalues of L are related to masses µ j , and to the latter relation as presented in the 'magnetic' frame, in which, using mirror frame variables, the eigenvalues of L are identified with FI parameters τ j . As we mentioned above, in order to understand why (2.17) and (2.18) are true it is convenient to re-formulate the supersymmetric vacuum equations arising from this twisted superpotential. We introduce monic degree-j polynomials Q j (u), Q j (u) for each node j = 1, . . . , N of the quiver. Note that we treat the matter polynomial in a uniform manner,

JHEP05(2015)095
that is we define m a = σ (N ) a and hence P (u) = Q N (u). With this definition, we have Q Q equations (2.7) Note that in this case ∆ j = 0 and there is no need to redefine τ j . The original supersymmetric vacuum equations are obtained by shifting arguments in the above by η ± , evaluating at the roots σ (j) α of Q j (u) and eliminating the auxiliary polynomials Q j (u). They can be expressed uniformly as τ j τ j+1 α .

Electric frame
Firstly, we explain how to eliminate the σ (j) α in favor of the momenta conjugate to the FI parameters (2.17). For this purpose, we will set up an inductive procedure to solve the Q Q equations recursively node by node. We first note that by the definition (2.10) and hence by evaluating the Q Q equation at u = 0 we can immediately solve for the constant terms in the polynomials Q j (u) andQ j (u) as follows (2.23) Now, given the polynomials Q i (u) and Q i (u) for i ≤ j we can determine Q j+1 (u) from the QQ equation (2.20). Then, by shifting j → j + 1 in the same equation and evaluating it on the j roots σ (j) α of Q j (u) we have just enough data to determine the j unknown coefficients in Q j+1 (u).
To illustrate this process, let us perform the first interation explicitly. It is convenient to introduce the monic degree one polynomials q i = u − p i τ . Then from equation (2.23) we have Q 1 (u) = q 1 (u) and Q 1 (u) = q 2 (u). Then, from equation from (2.20) with j = 1, we find Now, evaluating equation (2.20) with j = 2 on the root of the polynomial Q 1 (u) it is straightfoward to compute the coefficient of the linear term in Q 2 (u) and hence find We can now immediately compute the polynomial Q 3 (u) using equation (2.20) with j = 2

JHEP05(2015)095
We have implemented this procedure to many orders in j and found experimentally that the solution can be expressed as follows. We introduce the following j × j matrices where we define q i = u−p i τ and we remind the reader that superscripts are not exponentials but shifts of the argument by η. Then the solution is given by a ratio of Vandermonde-like determinants Solutions of this form for similar functional equations have appeared in the integrability literature. We expect that these techniques could be used to prove the solution we have found (see e.g. [24]). Since all polynomials q i are monic of degree one the above ratios can be simplified and by inverting the matrix M (0) 1,...,N , the ratio of determinants can be reexpressed as a single spectral determinant is the Lax matrix of the N -body complex trigonometric RS system. At the final stage of the recursion, the polynomial Q N (u) becomes the matter polynomial P (u) = N j=1 (u − µ j ), providing us with the required relation (2.17). By expanding both sides of (2.17) in u we find explicitly the Hamiltonians and their eigenvalues Thus we can explicitly write the full set of conserved charges for trigonometric RS system T r (τ i , p i τ , η) = χ r (µ i ), or, more explicitly as where r = 0, 1, . . . , N .

Magnetic frame
Let us now look at the other presentation of twisted chiral ring (2.18). Now we want to eliminate σ (j) α in favor of the momentum conjugate to the masses, p µ j . In this case, it will not be possible to provide an argument that lands directly on the Lax matrix formulation of the complex trigonometric RS model. Instead, we attempt to verify the mirror equations I⊂{1,...,N } |I|=r related to those above by τ j ↔ µ j and η ↔ η −1 . Let us first consider the first independent Hamiltonian with r = 1. The momentum conjugate to the masses (2.10) can be expressed in terms of the polynomials Q j (u) as follows where we remind the reader that σ It is now straightforward to see that the first Hamiltonian can be expressed as a contour integral N α=1 β =α where the contour C N surrounds the roots of Q N (u) i.e. the masses µ α . Our proposition is that this contour integral evaluates to τ 1 + · · · + τ N . We prove this proposition by induction. To perform the inductive step, we contract the contour C N such that it surrounds the roots σ N −1 α of Q − N −1 (u), u = 0 and u = ∞, then eliminate the dependence on Q N (σ (N −1) α ) using the supersymmetric vacuum equations (2.21), and then express the result once again as contour integral. Performing these steps, we find as required. In the second line above contour C N −1 surrounds only roots of Q N −1 (u). The argument for the Hamiltonian appearing at order u r proceeds in a similar manner. We first express the Hamiltonian as a contour integral I⊂{1,...,N } |I|=r . (2.37) where the contour C N surrounds the poles arising from the denominators Q N (u m ). Note the critical role of the numerator factor m =n (u m −u n ) in ensuring that the non-zero residues are labelled by sets i 1 < · · · < i r . This contour integral is the path integral of a supersymmetric gauged quantum mechanics on the circle, an observation we explain further below. Our claim is that this contour integral evaluates to To prove this statement, we again proceed by induction. The inductive step depends on the following contour integral identity We expect that this expression as well as (2.35) can be interpreted as partition functions of quantum mechanics on the 1d supersymmetric defect on S 1 coupled to the 3d gauge theory on S 1 × R 2 . The integral relation (2.39) can be interpreted as an identity between the partition functions of 1d defects coupled to neighboring nodes of the quiver. This observation requires further study.

Line operators and interfaces in N = 4 SYM
Many of the computations presented in the preceding section, in particular the connections to classical integrable systems, have a useful interpretation in terms of interfaces between copies of four-dimensional U(N ) N = 2 * theory.
The starting point for this construction is the moduli space of vacua M of U(N ) N = 2 * theory on S 1 × R 3 . There is always a region at infinity in the moduli space where the gauge group is broken to the maximal abelian subgroup U(1) N and complex coordinates (α i , p α i ) valued in (C * ) 2N corresponding to complexified electric and magnetic Wilson lines in each abelian factor, complexified by vectormultiplet scalars. Classically, we would have M cl = (C * ) 2N , which is the phase space of the complex trigonometric RS system [6].

JHEP05(2015)095
The quantum corrected moduli space M in the appropriate complex structure is given by the space of GL(N ) flat connections on a torus with puncture. This can be described by the holonomies A and B around the two cycles of the torus, which must obey ABA −1 B −1 = E where E has eigenvalues η −2 , . . . , η −2 , η 2N −2 . Remarkably, these equations can be solved in terms of coordinates (α i , p α i ) such that (2.40) In particular, there is a choice of gauge where B becomes the Lax matrix of the complexified trigonometric RS system. It can be confirmed by localization computations that Tr Λ r (A) and Tr Λ r (B) correspond respectively to BPS Wilson and 't Hooft loops in the anti-fundamental representations of U(N ) wrapping the S 1 .
Interfaces between two theories with moduli spaces M L and M R correspond to Lagrangian submanifolds L ⊂ M L × M R . Let us recall that the three-dimensional T [U(N )] theory can be identified with the S-duality interface for the U(N ) N = 2 * theory. In this context the complex parameters of the three-dimensional theory (µ i , p i µ ) and (τ i , p i τ ) are identified with the Darboux coordinates for the moduli space on either side of the interface. The corresponding Lagrangian submanifold L is then described precisely by the equations (2.17) and (2.18). These relations are interpreted as Ward identities for line operators at the interface: a 't Hooft loop approaching from one side is equivalent to a Wilson loop approaching from the other. This is expected since Wilson loops and 't Hooft loops are interchanged under S-duality (cf. [25]).
Similarly, the contour integral relations in equation (2.39) can be interpreted as boundary Ward identities for 't Hooft loops at an interface between N = 2 * theories with gauge groups U(N ) and U(N − 1). This interpretation are discussed further in section 3.3.

Quantum equivariant K-theory
From the work of Nekrasov and Shatashvili [7,8] it is known that the twisted chiral ring of 3d N = 4 quiver gauge theories on S 1 × R 2 represent the equivariant quantum K-theory ring of the Higgs branch. For generic linear quivers the Higgs branch is a quiver variety introduced by Nakajima [26][27][28]. For our main example T [U(N )] this is the cotangent bundle to the N -dimensional complete flag variety.
It is also known from the work of Givental and collaborators [29][30][31] that there is a deep connection between equivariant quantum cohomology/quantum K-theory and classical many-body integrable systems. The results of this sections can be interpreted in this light: the equivariant quantum K-theory of the cotangent bundle to a N -dimensional complete flag is determined by the N -body trigonometric RS integrable system. Later in [32] the results of Givental and Lee were proved using different methods which utilize the action of quantum groups. This method is also applicable to affine quiver varieties of type-A. We can therefore formulate the following

JHEP05(2015)095
The T -equivariant quantum K-ring of the cotangent bundle to the complete N-dimensional complex flag variety is given by where ideal I is given by relations (2.32) and T is the maximal torus of U(N ) × U(1) with equivariant parameters µ 1 , . . . µ N for U(N ) and equivariant parameter η for U(1). The correspondence between physical and geometrical parameters is summarized in table 1.
Note that we have kept equivariant parameters appropriate for U(N ) (rather than SU(N )) global symmetry. For SU(N ) symmetry one needs to add additionally impose the conditions p 1 τ . . . p N τ = µ 1 . . . µ N = 1 so that one equivariant parameter and one generator are excluded. In the limit η → 1 twisted chiral ring relations (2.32) have the simple solutions p i τ = µ σ(i) for any permutation σ. In terms of trigonometric RS model, this limit describes N non-interacting relativistic particles. In terms of 3d gauge theory, this describes the point in the parameter space where the supersymmetry is enchanted from N = 2 * to N = 4.
Recently we became aware of reference [33] where quantum K-rings of flag varieties were discussed. The conjecture the authors make about the quantum K-ring is in agreement with Proposition 2.1.

More genetic quiver varieties
So far we have considered only the triangular quiver T [U(N )] which has the property of being self-dual under three-dimensional mirror symmetry. We now briefly discuss how aspects of more general linear quivers can be studied through a combination of Higgsing and mirror symmetry.
For generic hypermultiplet masses and FI parameters, there are only discrete massive supersymmetric vacua on S 1 × R 2 . However, by tuning the mass parameters m a (or FI parameters t a in the mirror frame) one can open up a Higgs branch. Moving out onto this branch and flowing to the infrared we can partially Higgs the theory to obtain a new quiver.
Using Type IIB brane constructions one can develop an algorithm for constructing a generic quiver from T [U(N )] by repeating this procedure together with mirror symmetry. In terms of the parameter space of hypermultiplet mass deformations, Higgsing corresponds to restriction to a certain subvariety specified by the Higgs branch locus of the original quiver theory (see [6] for examples). Below we shall illustrate the idea using couple of simple examples. The twisted chiral ring relation of T [U(2)] theory is equivalent to the spectral curve of the 2-body trigonometric RS model as presented in equation (2.15). These equations reproduce the Bethe equations upon inserting the on-shell values of the momenta (2.13). In order to Higgs theory we impose we impose the condition from which we find p 1 τ = p 2 τ = µ from the definition of the momenta (2.13). Equivalently, inserting the condition (2.42) into the spectral curve (2.15) we find which determines p 1 τ = µ. After Higgsing T [U(2)] theory becomes free, hence its chiral ring relations are trivial.

Higgsing T [U(3)]
The twisted chiral ring of T [U(3)] theory computes the equivariant quantum K-ring of T * F 3 .
In what follows we shall study vacua of T [U(3)] theory subject to a Higgsing condition similar to (2.42) and compute quantum K-ring for the Nakajima quiver variety corresponding to the Higgsed theory. From 3d mirror symmetry it can be shown that the quantum K-ring of the latter variety is canonically isomorphic to the quantum K-ring T * P 2 .
The T [U(3)] theory corresponds to the three-particle trigonometric RS model which is described by the Hamiltonians given in (2.32). As we Higgs the 3d theory we impose (see figure 3) where σ 1 is one of the Coulomb branch parameters for the U(2) gauge group (second node of the quiver). The theory is therefore reduced to the A 2 quiver with labels (1, 1)(1, 1); its mirror is A 1 quiver with labels (1, 3), or in other words (which lead to T * P 2 ), the U(1) theory with three flavors.
Let us first describe the chiral ring relations for the A 2 quiver. Constraint (2.44) affects the r.h.s. of (2.32) by imposing the relationship between the masses and the l.h.s. by restricting some of the conjugate momenta p τ as follows (2. 46) which are consistent with the definition of the conjugate momenta for (1, 1)(1, 1) quiver, where µ = ηµ 2 is the mass of the hypermultiplet on the first node of the quiver. Therefore Using the twisted effective superpotential we can compute conjugate momenta to mass parameters where we have substituted σ 2 = σ 2 . We can see that the above expressions reproduce the corresponding conjugate momenta for the A 2 quiver with labels (1, 1)(1, 1) µ . Note that −A provides a contribution of the free fundamental hypermultiplet of mass m 3 − m 2 to the effective twisted superpotential. We can interpret contact term (2.51) as coming from the global symmetry of the Higgs branch of T [U(3)] theory. After Higgsing the dependence on µ 1 (the position of particle 1 on the right of figure 3) and its momentum disappears.
Let us now explicitly describe the quantum K-ring of T * P 2 using vacua equations. Since A 2 quiver with labels (1, 1)(1, 1) is mirror dual to U(1) theory with three flavors we can use vacua equations of the latter theory to derive the desired chiral ring relations. In the mirror variables one gets together with momenta conjugate to the FI parameters and hence p 2 p 3 = τ 1 τ 2 τ 3 . We can expand the vacuum equations in powers of σ and then eliminate σ using p 2 := p. By doing so (2.52) becomes where we defined and χ a stand for characters of the a-th antisymmetric tensor representation of sl N (for the trivial representation s 0 = 1). Interestingly, the above formula provides the classical limit of an N -th order difference equation for the q-hypergeometric series N F N −1 . Indeed, if we promote p to a shift operator (2.56) is nothing but the functional equation for quantum N F N −1 function. It is also well known that holomorphic blocks of the U(1) theory with N flavors obey exactly the same equation. 5 We can therefore make the following JHEP05(2015)095 where ideal I is given by relation (2.56).
Note that in the limit when Kähler parameter vanishes µ → 0 we have [µ] a−1 → η a−1 . Therefore, by redefining p a → η 1−a p a we obtain that the ideal given in (2.56) is reduced to which is in the agreement with the known result about classical K-rings and cohomology rings of complex projective spaces. Note also that the dependence on η drops out suggesting that the action of U(1) η is trivial in this case; which confirms the known fact that equivariantly T * P N retracts to P N .

3d partition functions
In section 2, we explained how twisted chiral ring of T [U(N )] theory is encoded in the spectral curve of a classical integrable system of N interacting relativistic particles called the trigonometric RS system. In this section, we will quantize this classical integrable system by studying T [U(N )] theories on a curved three-dimensional background. For most of this section, we concentrate on squashed S 3 , where the quantization parameter is identified with squashing parameter traditionally denoted by b (and, as we explain below, also b −1 ). In this background, the conjugate momenta to τ i and µ i are promoted to difference operators p i τ and p i µ and the spectral curve becomes an operator equation, which annihilates the partition function. From the squashed S 3 partition function, we will obtain the partition function of T [U(N )] on S 1 × R 2 by factorization.

S 3 partition function
Let us begin by summarizing the supersymmetric partition function of 3d N = 4 gauge theories on squashed S 3 , as computed using supersymmetric localization in [10,11,34]. This partition function depends on a squashing parameter b > 0 and real mass parameters valued in the Cartan subalgebra of the global symmetry group G. The latter are introduced by coupling to a background N = 2 vectormultiplet for G and giving a vacuum expectation value to the real scalar. For the most part we consider U(N ) flavor symmetries and use shorthand notation m = (m 1 , . . . , m N ).
As in the previous section, it is convenient to introduce exponentiated mass parameters. The conjugate momenta now become elementary difference operators. For a U(N ) global symmetry we define in this section They obey the following relation

JHEP05(2015)095
where q = e 2πib 2 . We will also introduce a second set of exponentiated mass parameters whose variables denoted by µ j , p j µ and q. They are defined in exactly the same fashion except we replace b → b −1 .
The partition function can also depend on real FI parameters for U(N ) gauge groups. The real FI parameter t associated to a U(N ) gauge group is a real mass parameter for the topological U(1). The corresponding exponentiated FI parameters τ , τ and momenta p τ , p τ are defined as above.
As in section 2, it will be important to turn on a real mass parameter m for the diagonal combination U(1) ε ⊂ U(1) H × U(1) C breaking to N = 2 * supersymmetry in three dimensions. It is convenient to introduce the notation together with the exponentiated parameters We will not need to consider the conjugate momentum for this symmetry.
Let us now summarize the building blocks of the squashed S 3 partition function of 3d N = 2 * quiver gauge theories. They are built from bifundamental hypermultiplets, vectormultiplets and FI parameters, Turning off the N = 2 * mass deformation ε → b + , the contributions from the adjoint N = 2 chiral multiplet cancel in pairs and we recover the familiar N = 2 vectormultiplet measure involving only the hyperbolic sine function. It is important to include these contribution when m = 0.

JHEP05(2015)095
Here we are using the double sine function S(z) = S 2 (z|b, b −1 ) −1 . This is meromorphic in z with simple poles at z = mb + nb −1 for n, m ≤ 0 and simple zeroes for n, m ≥ 1. The most important properties we will need are The S 3 partition function is related to a quantization of the Lagrangian submanifold L of section 2.2. The relevant quantization parameter is related to the squashing parameter by = 2πb 2 (for the parameters µ, p µ ,. . . ) and = 2πb −2 (for the parametersμ,p µ ,. . . ). In the semi-classical limit b → 0, the S 3 partition function schematically has asymptotic behavior where W(σ) is the effective twisted superpotential with the radius R replaced by the squashing parameter b. In this limit, the conjugate momenta become p µ = e 2πb∂mW and hence matching their semi-classical counterparts.

't Hooft operators
The building blocks for 3d N = 4 quiver gauge theories have an interesting interplay with a system of commuting difference operators, which quantize the classical Hamiltonians studied in section 2. We will consider two sets of operators acting on the mass parameters m = (m 1 , . . . , m N ) of a U(N ) symmetry. The first set is defined by where r = 1, . . . , N . The second set, which we denote by T r (m), is obtained by replacing b → b −1 in the first line or replacing the exponentiated parameters by their tilded counterparts in the second line. It can be shown that the two sets of operators commute among themselves. Note that T r (m) is expressed as a sum over the states of the anti-symmetric tensor representation of U(N ) of rank r where the mass parameters (m 1 , . . . , m N ) are shifted by an amount proportional to the corresponding weight. Similarly, the operators with reversed masses T r (−m) are associated to the conjugate anti-symmetric tensor representation of U(N ) of rank r.
This is no coincidence. The same difference operators appear in the computation of the expectation value of supersymmetric 't Hooft loops in N = 4 SYM theory with gauge group JHEP05(2015)095 U(N ) on squashed S 4 [35]. 6 For general squashing, the supersymmetric 't Hooft loops can be supported on two Hopf-linked circles corresponding to the operators T r (m) and T r (m) respectively. As shown in references [37,38], the expectation value of a supersymmetric 't Hooft loop in the r-th anti-symmetric representation of U(N ) can be massaged into the form with a similar equation for T r (m).
The wavefunction G(m, , τ ) is expected to be the partition function of U(N ) N = 4 SYM on a hemisphere of squashed S 4 with Dirichlet boundary conditions at the boundary. There is a global U(N ) symmetry at the boundary whose real mass parameter is m. The boundary is identified with the squashed S 3 geometry we consider in this section. The supersymmetric partition function on S 4 is computed by including contributions from each of the hemispheres, reintroducing a 3d N = 4 vectormultiplets with partition function ν N (m) and gauging.
The operators T r (m) obey some remarkable properties in the way they interact with the S 3 partition function of 3d N = 4 vectormultiplets and bifundamental hypermultiplets. Each of these properties can be understood in terms of the action of 't Hooft loops on interfaces in 4d N = 4 SYM.

Interfaces
The first important property of the difference operators is that they are self-adjoint with respect to the measure ν N (m) on the Cartan subalgebra of U(N ) defined by the N = 4 vectormultiplet contribution. As a preliminary step we show that the vectormultiplet measure obeys the difference equation together with the same equation for the tilded variables. Let us now pick two functions f (x) and g(x) and assume that they have no poles in the region −b < Im(x) < b. Then by deforming the contour integration x i → x i − b for each mass parameter in the set i ∈ I and using the above result, a short calculation shows that This relation can be used to 'integrate by parts' inside the contour integral expressions for partition functions, provided no poles are crossed in deforming the contour.

JHEP05(2015)095
This can be interpreted in terms of a trivial interface. Namely, the partition function of U(N ) N = 4 theory on a four-sphere can be built from two copies of the hemisphere partition function with Dirichlet boundary conditions by introducing a 3d N = 4 vectormultiplet on the equator. The partition function is constructed by taking f (m) = G(m, , τ ) and g(m) = G(m, , τ ). The equation says that the 't Hooft loop is unchanged on passing through the boundary.
The second property states that the partition function of a U(N ) × U(N − M ) bifundamental hypermultiplet intertwines a difference operator with its decomposition under the symmetry breaking pattern U(N ) → U(N − M ). In this case we proceed by example before stating the general result.
Let us begin by considering a bifundamental U(N ) × U(N ) hypermultiplet. The partition function obeys together with an isomorphic equation involving T r (m). Firstly, acting on the partition function of bifundamental hypermultiplets with the momenta p i µ (1) and p i µ (2) and using the difference equation obeyed by the double sine function we have (3.15) Using these results the first line of equation (3.14) is a consequence of the rational function identity I⊂{1,...,N } | I |=r i∈I j / ∈I 16) This has been proven for precisely the same purpose in reference [39]. An isomorphic argument applies for the equation involving the operators T r (m). Thus we see that the partition function of U(N ) × U(N ) hypermultiplets intertwines the quantum hamiltonians associated with the fundamental and anti-fundamental representations of U(N ).
We now consider the more interesting case of U(N ) × U(N − 1) bifundamental hypermultiplets. The partition function obeys together with an isomorphic equation involving T r (m). This equation is a consequence of JHEP05(2015)095 the identity I⊂{1,...,n} | I |=r i∈I j∈{1,...,n}/I which can be obtained from equation (3.16) by replacing µ N γ and take the limit γ → ∞ + . This corresponds to making N of the hypermultiplets very heavy and integrating them out to recover the bifundamental of U(N ) × U(N − 1). The partition function now intertwines a hamiltonian with the conjugate of its decomposition under U(N ) → U(N −1). In terms of representations of U(N ) we have where we have denoted r-th anti-symmetric tensor power of the fundamental representation by Λ (N ) r and the conjugate representation byΛ (N ) r . Although we will not need it for the triangular quiver T (U(N ) it is interesting to study the partition function of U(N ) × U(N − M ) bifundamental hypermultiplets. The argument proceeds by induction and the details can be found in [39]. The result of the computation is that is the quantum dimension of the representation Λ (M ) s of U(M ) with quantum parameter η and in the formula we have defined χ Λ (x 1 , . . . , x M ) to be the Schur polynomial for representation Λ of U(M ). In the limit η → 1 the quantum dimension becomes the ordinary dimension. An example is the hamiltonian associated to the fundamental representation of U(N ),

JHEP05(2015)095
Summarizing, we have found that the partition function of U(N ) × U(N − M ) bifundamental hypermultiplets intertwines a difference operator associated to a antisymmetric tensor representation of U(N ) with the conjugate of its decomposition under U(N ) → U(N − M ). The coefficients in the expansion are the quantum dimensions associated to the number of times that representation appears in the decomposition with quantum parameter η.
This equation has an interpretation in terms of an interface between two copies of the N = 2 * theory with gauge groups U(N ) and U(N − j) respectively. The hemisphere partition functions are coupled by adding three-dimensional bifundamental hypermultplets of U(N )×U(N −M ) and gauging these symmetries on the interface. We can then interpret the intertwining property as the mathematical statement of how a 't Hooft loop of U(N ) decomposes into 't Hooft loops of U(N − j) on passing through the interface.
That the 't Hooft loops should decompose in the same way that characters of the corresponding representations of U(N ) decompose under U(N − 1) is perhaps clearer in an S-dual picture where the theories are coupled by a reduction of symmetry due to a Nahm pole boundary condition. The S-dual of a 't Hooft loop is a Wilson loop whose contribution is a character. From this perspective, it is clear that a Wilson loop will decompose according to the decomposition of the characters of representations under U(N ) → U(N − M ) when brought to the interface. 7

T [U(N )]
Let us now consider the partition function of T [U(N )], which we denote by Z U(N ) (m, t). It depends on mass parameters m = (m 1 , . . . , m N ) for the Higgs branch symmetry U(N ) H and FI parameters t = (t 1 , . . . , t N ) for the Coulomb branch symmetry U(N ) C . As before, the FI parameter associated to the U(j) gauge group is t j − t j+1 .
This theory arises on an interface between two copies of the N = 2 * theory in four dimensions with gauge groups U(N ) and holomorphic couplings related by the S-duality transformation τ → −1/τ . The coupling between the bulk and interface degrees of freedom is performed by gauging the U(N ) H symmetry on one side of the interface and the U(N ) C symmetry on the other. Therefore the mass parameters m and FI parameters t are identified with the vacuum expectation value of the vectormultiplet scalar of the bulk theory on either side of the interface.
It is expected that Wilson loops and 't Hooft loops are interchanged by the S-duality transformation τ → −1/τ . Therefore, we expect that acting with a 't Hooft loop one one side of the interface is equivalent to acting with a Wilson loop on the other. Concentrating on the minuscule representations, this can be turned into the mathematical statement (3.24) 7 We thank Davide Gaiotto for suggesting this interpretation.

JHEP05(2015)095
In words, the partition function should be an eigenfunction of the 't Hooft loop difference operators whose eigenvalue if the expectation value of a Wilson loop. This is the quantized counterpart of the 'gauge invariant' formulation of the Bethe equations for supersymmetric vacua which we have found earlier. As always, in the context of the S 3 partition function there is an isomorphic statement for the tilde parameters. We shall prove this conjecture by induction on the rank of U(N ) following an argument presented in [39]. The initial condition is the three-sphere partition function of T (U(1)). This is simply an FI parameter t for a background U(1) vectormultiplet with mass parameter m, It is immediate that this partition function obeys the difference equations p µ = τ and p µ = τ as required. The partition function of T [U(N )] is now defined recursively by where we use shorthand notation m = {m 1 , . . . , m N }, t = {t 1 , . . . , t N } for mass parameters of the U(N ) symmetries and s = {s 1 , . . . , s N −1 } for the mass parameters of the U(N − 1) symmetry. The contour is a small deformation away from the imaginary axis.
Let us now act with the difference operator T r (x). This passes through the exponential prefactor leaving behind a phase τ r N . It now acts on the bifundamental hypermultiplet contribution Q N,N −1 (m, s) and can be exchanged for the sum of difference operators T r (−s) + T r−1 (−s) according to the intertwining relation (3.20). Finally, we integrate by parts inside the integral to find the sum of difference operators T r (s) + T r−1 (s) acting on the partition function Z U(N −1) (s, {t 1 − t N , . . . , t N −1 − t N }) which is an eigenfunction by assumption. Combining these factors we find that Z U(N ) (m, t) is an eigenfunction of T r (m) with eigenvalue = m j . They are mass parameters for the nodes of a triangular quiver. We also introduce FI parameters t j with j = 1, . . . , N . The solution is then given by the formula where again the choice of the contour is explained later in section 3.5.

JHEP05(2015)095
Finally, we note that this mathematical argument has a pleasing interpretation in terms of interfaces. We can think of T [U(N )] as obtained by colliding a series of symmetry breaking interfaces between a sequence N = 2 * theories with gauge groups U(j), j = 1, . . . N − 1 together with boundary FI parameters. Our argument simply brings the 't Hooft loop through the sequence of interfaces one-by-one.
T [U(N )] is self-dual under mirror symmetry. A more precise statement is that the S 3 partition function obeys the symmetry property This symmetry is extremely non-trivial from the integral expression that we have presented and we will not attempt to prove it directly. However, we note that it is equivalent to saying that the partition function is simultaneously an eigenfunction of Hamiltonians acting on the masses and FI parameters, The classical limit of trigonometric RS relations in the electric (2.17) and magnetic (2.18) frames is reproduced from the above relations in the q → 1 limit.

Holomorphic blocks
The squashed S 3 partition function of T [U(N )] is simultaneously an eigenfunction of two sets of difference operators T r (m) and T r (m) related by the transformation b ↔ b −1 . On the other hand, asking for an eigenfunction of a single set of difference operators, say T r (m), leads to a basis of solutions called holomorphic blocks [12,13]. Let us denote the holomorphic blocks by B j where the index j = 1, . . . , N ! labels the supersymmetric vacua of the theory on S 1 × R 2 . i.e. the number of solutions of the Bethe equations. The S 3 partition function can be reconstructed from the holomorphic blocks as follows The holomorphic blocks can be computed a priori, up to some non-perturbative ambiguities, by systematically building formal solutions of the relevant difference equations and finding a basis of contours C j for the integrals.
Here we follow a less sophisticated approach and derive the holomorphic blocks from the Coulomb branch integral expression for the S 3 partition function by explicitly evaluating the integral by residues in a certain regime of small FI parameters. This leads to an alternative Higgs branch representation of the partition function involving the vortex partition function. Here we will concentrate on T [U(N )] leaving the notationally more complicated case of T [U(N )] ρ in appendix B.

T [U(2)] theory
Let us start with the simplest example, the partition function of T [U (2)]. The partition function is The integrand has two sets of simple poles at The integral contour can be chosen to enclose either set of poles, but the result is independent of this choice. We take residues from the first set of poles. The residue sum is Using the identity (B.6), one can evaluate the residue of the double sine function Plugging this residue and using the identities (B.6) we find The result takes the form of the Higgs branch representation which is given by sum over the contributions from two supersymmetric vacua labelled by i = 1, 2. Also, the second line shows the factorization into the vortex and anti-vortex partition functions.

T [U(N )] theory
Now we turn to the partition function of the T [U(N )] theory. We shall perform the integral recursively starting with the recursive expression . This partition function differs by a prefactor e 2πt N N i=1 m i from the true partition function of the T [U(N )] theory defined in the previous section. We shall multiply this prefactor to the last expression after integration.
The contour integrand has infinite simple poles and zeros from various contributions and also from the function Z U(N −1) . We should first ask how the integral contour goes JHEP05(2015)095 around those poles. We choose the contour along the real axis assuming that the mass parameters m as well as the squashing parameter b are real parameters. We then take residues from the poles above the real axis. One can also pick up the poles in the other side but the result will be the same.
Although pole structure seems to be complicated as they can be developed by various terms, it turns out that the relevant poles can arise only from the contributions of the bifundamental hypermultiplets Q N,N −1 . Indeed, we find that poles from Z U(N −1) are completely cancelled by zeros of the vector multiplet contribution and poles from the vector multiplet are also cancelled by zeros of Z U(N −1) and Q N,N −1 . Namely ν N −1 Z U(N −1) has no relevant pole inside the contour. We will see this after computing Z U(N −1) explicitly. However, before we get Z U(N −1) , we first assume that this is the case and evaluate the integral by picking up poles only from the hypermultiplet.
The contribution Q N,N −1 has simple poles at Summing over residues from these poles we obtain and similarly for k. Here s * stands for the integral variables s i evaluated at each pole and they replace the mass parameters in the partition function Z U(N −1) . In this expression, the (semi-)positive integer numbers k i and k i correspond to the vortex and anti-vortex numbers of the U(N − 1) gauge group, which will become clearer later when we write the full partition function as a factorized form. There is the summation over σ in the Weyl group W N and an overall factor 1/(N − 1)! corresponding the the Weyl factor of the U(N − 1) gauge group. Combining these two, one notices that the number of supersymmetric vacua added to each recursion step is N . Therefore the total number of supersymmetric vacua of the T [U(N )] partition function is N ! which is in a perfect agreement with the quaternionic dimension of the Higgs branch.
We can use the above formula to compute the function Z U(N −1) at s * . Using the Weyl group W N −1 , one can set σ (N −1) = 1 and obtain

JHEP05(2015)095
Here we have redefined the vortex numbers of the U(N − 2) gauge group as k = {k The second line and the residues in the third line can be further simplified using the equations in (3.34) and (B.6) as follows: We can consecutively apply this procedure and evaluate the partition functions Z U(n) (s * ) for lower n < N − 2 in the similar manner. Upon the redefinition of the vortex numbers for U(n − 1) gauge group as k (n) = {k i } one can see that the partition function takes the same form as Z U(N −1) but just the rank is reduced to n − 1.
Finally we combine all integrated subpartition functions and find where |k (N ) | = | k (N ) | = 0. Here we have multiplied the prefactor e 2πt N N i=1 m i which we omitted in (3.36). This is the Higgs branch representation of the S 3 partition function of the T [U(N )] theory. We note that the partition function is factorized by the vortex and anti-vortex partition functions, Z V and Z AV respectively, as well as the perturbative contributions.
We still need to check the our assumption that the vector multiplet and the function Z U(N −1) do not develop nontrivial poles in the contour integral. To see this, it is convenient to first fix σ = 1 in Z U(N −1) using the Weyl group of the U(N − 1) gauge symmetry and perform the contour integral starting with s 1 and so on. We then noticed that the 1-loop contribution in Z U(N −1) (s) of the form is completely cancelled by the vector multiplet contribution ν N −1 (s) of the U(N − 1). Thus the function Z U(N −1) (s) can have poles only from the vortex and anti-vortex series. Furthermore, we find that possible poles from the vortex series are s i = m j + i ε * 2 + inb + imb −1 with n, m > 0 and they are also cancelled by zeros of the vector multiplet contribution at s i = s j + inb + imb −1 for i > j. The remaining poles are at s i = s j + iε + ipb + iqb −1

JHEP05(2015)095
with p, q ≥ 0 and i > j in ν N −1 (s), which are also cancelled by zeros of Q N,N −1 (s) at s i = m j − i ε * 2 + inb + imb −1 . Therefore the integral contour involves no pole from the vector multiplet contribution and the function Z N −1 . This proves that the relevant poles can come only from the contributions of the bifundamental hypermultiplets, and therefore the Higgs branch representation of the partition function (3.37) is correctly derived.

Givental J-functions
Since the Higgs branch of 3d N = 2 * quiver theories can be identified with the cotangent bundle of the corresponding Nakajima quiver varieties, the vortex partition function thereof, which is the generating function of the BPS states on Higgs branch, gives the Givental J-function of the corresponding variety [31,40].
The corresponding quiver variety for T [U(2)] theory is T * P 1 . According to (3.35) the corresponding vortex partition function of the T [U (2)] theory in one of the vacua (when, say, i = 1) reads where we used the definition of the Q-hypergeometric function (see appendix A.1).

Difference equations in electric frame
It is instructive to explicitly demonstrate that holomorphic blocks, which we have computed above, satisfy difference relations in the electric frame (i.e. second relation in (3.30)). We shall demonstrate this fact for 3d vortex partition functions (3.37) for T [U(2)] and T [U(3)] theories.

T [U(2)] theory
We can explicitly check that (3.39) satisfies the following difference relation and where momenta operators act as p i τ τ j = q δ ij τ j p i τ . Note that the operator in the left hand side of the above equation differs from T 1 for trigonometric RS model (2.15) by prefactors which depend on µ 1 , µ 2 and η. We can remove those factors by redefining where θ(a, q) = (a, q) ∞ (qa −1 , q) ∞ is one solution of the difference equation p a θ(a, q) = −a −1 θ(a, q). Our theta function conventions are given in appendix A.3. Then Z V obeys JHEP05(2015)095 the following set of eigenfunction difference equations Note that the prefactor in (3.42) is not unique. For example, one may replace the factor θ(η −1 τ 1 )/θ(µ 1 τ 1 ) by another one θ(τ 1 )/θ(µ 1 τ 1 η) that obeys the same difference equation. They correspond to factorizations of mixed Chern-Simons terms (or FI terms) for the 3d theory living on the surface defect, i.e. e πiε * t 1 +2πt 1 m 1 in this case. In the classical limit b → 0 (or b → ∞), this prefactor reproduces the classical FI terms up to proper rescaling of the parameters.
At this step let us make the following observation. Vortex partition functions which were computed in (3.37) are infinite series in FI parameters. Note, however, that for some values of the coefficients these series truncate and become polynomials. Remarkably, if we combine them with the corresponding prefactors containing theta-functions, like (3.42), we can reproduce the so-called Macdonald polynomials, which recently appeared in many different contexts in mathematical physics. For example, if in (3.42) one puts q −k = η 2 µ 1 /µ 2 for k = 0, 1, 2 the series become degree-k symmetric Macdonald polynomials in τ 1 and τ 2 with parameters q and η. In [41] it was shown that Macdonald polynomials with proper normalization are eigenfunctions of difference operators of tRS type.

T [U(3)] theory
The vortex partition functions of T [U(3)] theory are slightly cumbersome, so we shall only specify difference operators which they satisfy. There are 3! = 6 vacua in the T [U(3)] theory, meaning that there are as many different vortex partition functions which are related to each other by interchanging mass parameters µ 1 , µ 2 and µ 3 between each other. Thus in one of the vacua the partition function satisfies the following difference equation (3.44)

JHEP05(2015)095
Again, in order to convert the above equation into the momentum conservation of the three-particle trigonometric RS model we redefine the vortex partition function as The prefactors again correspond to factorization of the FI terms.
We have checked in the series expansion in the FI parameters that (3.44) with the above redefinition is the true eigenfunction of the tRS model. We have also verified that it is an eigenfunctions of the quadratic tRS operator T 2 . Interestingly, one can reproduce the entire vortex partition function using the perturbation theory in FI parameters given the difference relations of the form (3.44).

5d/3d partition functions
The three-dimensional T [U(N )] theory can be coupled to maximally supersymmetric U(N ) Yang-Mills theory in five dimensions to form a surface defect. Following references [14,42], if the surface defect is supported on the subspace S 1 × R 2 ⊂ S 1 × R 4 , we expect that the twisted chiral ring of T [U(N )] is deformed by an additional parameter that we denote by Q. This parameter is related to the dimensionless combination of the five-dimensional gauge coupling g 2 and the radius R of S 1 by the formula This deformed twisted chiral ring of the defect theory is expected to provide a representation of the Seiberg-Witten curve of the five-dimensional theory on S 1 × R 4 . The 5d gauge coupling can be considered as the scalar field in the background vector multiplet coupled to the topological instanton charge. When the 5d gauge theory is compactified on a circle, we can turn on a background holonomy in the vector multiplet and it complexifies the 5d gauge coupling. The Higgs branch U(N ) symmetry of T [U(N )] is gauged in coupling to five-dimensional maximal SYM. In particular, the twisted masses µ j of the three-dimensional theory are identified with the vacuum expectation value of the five-dimensional real vectormultiplet scalar (complexified by the holonomy around S 1 ). Furthermore, the three-dimensional N = 2 * deformation η can be identified with the five-dimensional N = 1 * deformation. The FI parameters τ j are additional parameters associated to the remaining U(N ) symmetry of the defect. We claim that the twisted chiral ring of T [U(N )] is deformed as follows I⊂{1,...,N } |I|=r i∈I j / ∈I and hence that the twisted chiral ring of T [U(N )] is reproduced in the limit Q → 0 where we turn of the coupling to the five-dimensional degrees of freedom. The combinations appearing on the left are the Hamiltonians of a classical integrable system: the complexified elliptic RS system. This reduces to the complex trigonometric RS system in the limit Q → 0. The same integrable system describes the Seiberg-Witten geometry of five-dimensional maximal SYM. In particular, the expectation values of supersymmetric Wilson loops χ r (µ 1 , . . . , µ N , Q) can be taken to parametrize the Coulomb branch of the five-dimensional theory on S 1 ×R 4 , over which equation (4.2) defines a family of elliptic curves. The Seiberg-Witten differential is identified with the symplectic potential λ = j log p τ j ∧ d log τ j for the phase space of the elliptic RS system. The classical integrable system can be quantized by studying this coupled 3d -5d system in a curved background preserving some supersymmetry. A natural extension of our discussion in section 3 would be to study the partition function on S 5 with the surface defect supported on an S 3 . This provides a formidable technical challenge. However, in the absence of defects, there is much evidence to suggest that the partition function on S 5 can be reconstructed from knowledge of the Nekrasov partition function in the Omega background S 1 × R 4 1 , 2 . Recently, there is some evidence that the same conclusion can be reached in the presence of a surface defect by enriching the set of building blocks to include the Nekrasov partition function in the presence of a surface defect supported on S 1 × R 2 1 . We focus solely on this case in what follows.
In principle, one should be able to perform an exact localization computation for the coupled 5d/3d system. This computation is beyond the scope of the current paper. 8 Instead, we will use an alternative description of the surface defect as a monodromy defect labelled by the partition [1 N ], whose partition function can be computed using ramified instanton counting [16,17]. We emphasize that this equivalence has a conjectural status. Therefore, we first check that the partition function in the presence of a defect holomorphic blocks of T [U(N )] in the limit Q → 0, The monodromy defect of type [1 N ] has Gukov-Witten parameters τ 1 , . . . , τ N which are identified with FI parameters of T [U(N )] in the decoupling limit. The leading term is independent of the equivariant parameter 2 in the plane orthogonal of the defect. The complete partition function depends on two quantization parameters, 1 and 2 . At finite Q we will consider the Nekrasov-Shatashvili limit 2 → 0 of the normalized JHEP05(2015)095 expectation value of the defect We will be able to check to a finite order in the instanton expansion in Q that (4.5) form a basis of solutions to the quantum elliptic RS Hamiltonians. We should emphasize that these are so far formal solutions: we have neither specified a measure nor checked normalizability with respect to it. This point is discussed further below. We shall momentarily discuss the construction of expectation values (4.5), but first we need to build up the necessary ingredients for instanton calculus in the presence of monodromy defects.

Instanton counting
Below we review only essential ingredients for our computations further in this section. We refer the reader to [44][45][46].
Let us consider the hyper Kähler quotient construction for the instanton moduli space M N,k with gauge group U(N ) and instanton number k. We introduce vector spaces V = C k and W = C N and matrices A, B ∈ Hom(V, V ), P ∈ Hom(W, V ) and Q ∈ Hom(V, W ). An element g ∈ U(k) acts on these matrices by (A, B, P, Q) → (gAg −1 , gBg −1 , gP, Qg −1 ) . (4.6) The hyperkahler moment maps are which are valued in Hom(V, V ). The instanton moduli space M N,k is then given by the hyper Kähler quotient construction. As a complex manifold, the instanton moduli space can be constructed as a Kähler quotient by discarding the real moment map in favor of a stability condition and dividing by the complex group GL(k, C). Consider the following action of (C * ) 2 × GL(N, C) on the matrices where t 1 , t 2 ∈ C * and f ∈ GL(N, C). Note that (C * ) 2 corresponds to rotations in the two coordinate planes. This commutes with the action of GL(k, C) and preserves the stability condition, therefore it descends to an action on the instanton moduli space M N,k . The fixed points of M N,k under this action are labelled by an N -tuple of Young tableaux λ = (λ 1 , . . . , λ N ) where the total number of boxes is k. Let us introduce the equivariant parameters 1 , 2 and a = (a 1 , . . . , a N ) that are valued in the Cartan subalgebra of the symmetry group action, i.e. such that t 1 = e 1 and t 2 = e 2 and f = diag(e a 1 , . . . , e a N ). Then the equivariant character for the action of the global JHEP05(2015)095 symmetry (C * ) 2 × GL(N, C) on the vector spaces W and V at a fixed point λ is (4.9) The summation (i, j) ∈ λ I refers to a sum over the boxes of Young tableaux λ I . For example, the Young tableaux has three boxes with the labels (1, 1), (1, 2) and (1, 3). Next we introduce equivariant Chern character (4.10) Using we can now consider the equivariant character of the tangent space to the universal bundle over the instanton moduli space at a fixed point λ, (4.11) and the operation * corresponds to reversing the sign of all of the equivariant parameters. The second line is the perturbative contributions to the Nekrasov partition function. The third line is the equivariant character of the tangent space to the instanton moduli space, that is ignoring the universal bundle. They provide the instanton contributions to the Nekrasov partition function. This is the relevant character for pure N = 1 U(N ) gauge theory in five dimensions.
Let us now consider the maximally supersymmetric N = 2 U(N ) gauge theory in five dimensions. This corresponds to an N = 1 U(N ) vectormultiplet together with an adjoint hypermultiplet. Due to the presence of the adjoint matter we must now consider a vector bundle on the instanton moduli space. The relevant character is therefore where m is a mass parameter for the adjoint hypermultiplet. The equivariant character can always be written in the following form where we sum the exponents of the weights at all the fixed points. From this we compute the five-dimensional instanton partition function (4.14) In what follows we use exponentiated parameters µ j = e a j , e 1 = q and e m = η −2 q. Since we will mainly be interested in the limit 2 → 0 we will not need to introduce a parameter for 2 . The coefficients in the expansion are then rational functions of these exponentiated parameters.

Ramified instantons
Let us now consider ramified instanton counting, namely we want to compute instanton partition function in the presence of a monodromy defect [3]. It was shown in [16,17] that the desired answer can be obtained by applying a simple orbifolding procedure to the above computation. The possible monodromy defects are labelled by a partition ρ = [n 1 , n 2 , . . . , n s ] where we choose to order n 1 ≥ n 2 ≥ . . . ≥ n s and s i=1 n i = N . This determines the subgroup L = U(n 1 ) × U(n 2 ) × · · · × U(n s ) of U(N ) gauge group which is left unbroken by the defect. The gauge field has a singularity 9 in the complex plane orthogonal to the defect which can be described as follows , · · · , m s · · · , m s ns ) .

(4.16)
There is an additional label σ which determines how L is embedded into U(N ). Each σ corresponds to permutation of the monodromy parameters m that are not simply permutations within each block, that is σ ∈ W/W L where W L is the Weyl group of L. The number of such permutations is clearly N ρ = N !/(n 1 ! . . . n s !).
To compute the ramified instanton partition function, we quotient the standard construction of the instanton moduli space we have reviewed earlier in section 4.1 by a Z saction where s is the length of the partition ρ. The Z s -action is embedded inside the (C * ) 2 × GL(N, C) symmetry of the instanton moduli space. The component in (C * ) 2 acts on the complex coordinates by (z 1 , z 2 ) → (z 1 , ωz 2 ) where ω s = 1. The component in GL(N, C) acts on the vector space W such that it decomposes into eigenspaces of the Z s -action. Our convention is that the generator of Z s acts on the vector space W j by W j → ω j W j . In the sector with instanton number k, we must make an additional choice of the decomposition of the other vector space Each of these choices corresponds to a distinct topological sector and hence to a distinct ramified instanton moduli space M ρ,k 1 ,...,ks . In summary, the ramified instanton moduli

JHEP05(2015)095
space M ρ,k 1 ,...,ks can be obtained as a Z s quotient of the standard instanton moduli space M N,k with N = s j=1 n j and k = s j=1 k j . Let us now explain how to compute the answer. The first statement is that each fixed point λ of the standard instanton moduli space M N,k is also a fixed point of one and only one ramified instanton moduli space M ρ,k 1 ,...,ks . The hardest part of the computation is to identify which sector {k 1 , . . . , k s } a given fixed point λ contributes to. It is clear that the total number of boxes in λ must add up to k = s j=1 k j . Introduce the following labels for the Young tableaux λ = {λ j,α } , j = 1, . . . , s , α = 1, . . . , n s . Then the boxes in the i-th column of λ j,α contribute to the instanton number k i+j−1 . If i + j − 1 > N then we count modulo N . We can denote the sector associated to a fixed point λ by k j ( λ). For example, let us consider U(2) theory in the two-instanton sector k 1 + k 2 = k = 2, so we need to describe three spaces M 2,1,1 , M 2,2,0 , M 2,0,2 . They are correspondingly generated by the following tuples of Young tableaux Let us now compute the equivariant character of the tangent space to the ramified instanton moduli space at a fixed point T λ M ρ,k 1 ,...,ks . Let us denote this character by χ ρ, λ ( a, 1 , 2 ), whilst the character of unramified case is as above χ λ ( a, 1 , 2 ). According to the decomposition of space W we have introduced the following notation for the equivariant parameters a = {a j,α } , j = 1, . . . , s , α = 1, . . . , n s . Then we compute the character of the ramified moduli space of instantons via averaging over the orbifold action, therefore the answer is automatically invariant, which we can always write using a summation over weights χ ρ, λ ( a, 1 , 2 ) = 1 s s r=1 χ λ a j,α − 2 + 2πir s j, 1 , 2 + 2πir s = α n α e wα .

(4.22)
Analogously to the unramified case we define In addition, for N = 1 * theories there is the additional equivariant mass parameter m. We claim that this mass parameter is invariant under the orbifold action. Finally, the ramified instanton partition function is given by

JHEP05(2015)095
Note that the product of instanton parameters for each sector is equal to the unramified instanton parameter Q 1 · · · · · Q s = Q , (4.25) which is also implied by the last equality in (4.18).

U(2) theory
We shall consider N = 1 * theory with gauge group U(2) in great detail. In this case, there is only one non-trivial monodromy defect labelled by the partition ρ = [1, 1], which is expected to correspond to the surface defect obtained by coupling to T [U (2)]. The additional label σ corresponds to permutations ± of the monodromy parameters, corresponding to the two massive supersymmetric vacua of T [U (2)]. It is convenient to make the following replacements in order to satisfy (4.25). We shall immediately see physical meaning of both choices. As we have already mentioned, variable Q can be identified with the holomorphic scale the five-dimensional bulk theory while z can be understood as a ratio of the FI parameters of the 3d defect theory coupled to the bulk 5d theory z = τ 2 τ 1 . Let us compute the instanton contributions to the Nekrasov partition function (4.24) and send Q → 0 in order to decouple the five-dimensional degrees of freedom. The first few terms are Z (+) [1,1] where we identify q = e 1 . Note that the dependence on the equivariant parameter 2 in the plane orthogonal to the defect has dropped out in this limit. The two expressions are related by µ 1 ↔ µ 2 . It is straightforward to recognize them as q-hypergeometric series

JHEP05(2015)095
These are indeed the equivariant vortex partition function of U(1) theory with two flavors, evaluated in each of the supersymmetric vacua. Alternatively they are the non-perturbative contributions to the two independent holomorphic blocks. We can now see that Z (+) [1,1] exactly matches with the vortex partition function of the T [U (2)] theory in one of the vacua (3.39), whereas Z (−) [1,1] coincides with the the vortex partition function in the other vacuum. Recall that both expressions are related merely by interchanging µ 1 and µ 2 .

Wilson loops
An essential ingredient of our construction is the computation of the vacuum expectation values of supersymmetric Wilson loops wrapping S 1 . Using the language of equivariant characters we can easily modify formula (4.14) in order to insert the fundamental Wilson loop operator inside The additional character χ (E) λ (4.10) in the numerator represents the contributions from a heavy charged BPS particle propagating around S 1 . It turns out that the numerator has the same universal divergence as the denominator in the limit 2 → 0. Thus the expectation value is finite and we can denote it by Remember that this is the Wilson loop expectation value of U(N ) gauge group, which differs from that of the SU(N ) gauge group by the overall U(1) contribution. The overall U(1) contribution can be interpreted as a contribution from a heavy free BPS particle and one can compute it using the Wilson loop expectation value of unit charge in the abelian gauge theory [47]. The U(1) contribution is given by The fundamental Wilson loop expectation value of SU(N ) gauge group is then given by In order to insert a Wilson loop in the r-th skew symmetry power of the fundamental representation of U(N ) we must modify the computation. It will be discussed elsewhere.

U(2) theory
Turning on the parameter Q, the partition function in the presence of the defect is no longer finite in the limit 2 → 0. The divergence exponentiates and the anomalous dimension is universal, that is, it is the same divergence without the defect. The saddle point equations arising from the anomalous dimension will fix the mass parameters µ 1 and µ 2 to be some discrete solutions. For now we will ignore this issue and concentrate on the normalized expectation value of the surface defect with unconstrained µ 1 and µ 2 . As the divergence is universal, the normalized expectation value of the monodromy defect is well defined in the limit 2 → 0. We introduce the notation D (±) [1,1] The first few terms of the expansion are (4.39) One may check that the above expressions reduce to the vortex partition functions in the limit Q → 0. It is very important that we have a regular expansion in Q 1 and Q 2 and hence at higher orders in the Q expansion there are negative powers of z = τ 2 /τ 1 . It appears that D (+) and D (−) are related by interchanging the mass and FI parameters (µ 1 , τ 1 ) ↔ (µ 2 , τ 2 ).

JHEP05(2015)095
As a regular expansion in Q 1 and Q 2 we have checked up to order O(Q n 1 1 Q n 2 2 ) with n 1 + n 2 = 5 that the above normalized expectation values obey the following difference equations As before, we can define new partition functions [1,1] , which obey the same difference equations (4.42) The same non-uniqueness caveats as before holds also here. One should also check that the perturbative contributions obtained from orbifolding factorize nicely into contributions from the defect and the bulk. At this point we claim to have found formal eigenfunctions and eigenvalues of the two-body elliptic (complexified) Ruijsenaars-Schneider integrable system, at least as a series expansion.

U(3) theory
The generalization to many-body system is straightforward -one needs to compute We are interested in the normalized partition function in the presence of a monodromy defect in the limit 2 → 0. As discussed in the previous sections, this limit is well defined JHEP05(2015)095 and we end up with a finite expression. The partition function is expanded as + (µ 1 , µ 2 , µ 3 and z 1 , z 2 , z 3 cyclic permutations) + · · · , (4.43) where We have also assumed that |z 1 |, |z 2 |, |z 3 | < 1 in the expansion. In the decoupling limit Q → 0, this partition function precisely reproduces the vortex partition function of the T [U(3)] theory in (3.37) in one of the vacua, after a relabelling (µ i , τ i ) → (µ −1 i , τ −1 i ). Let us define a new function as

Comments on normalizability of wavefunctions
The complexification plays a crucial role here. Indeed, normally one may expect that elliptic system has a discrete spectrum, whereas our eigenfunctions are parametrized by parameters variables µ 1 and µ 2 . The point is that we have found only formal eigenfunctions in that they may not be normalizable wavefunctions. In solving the additional Bethe equations arising from the saddle point analysis of the effective twisted superpotential W of the defect theory coupled to the 5d theory in the divergence log Z → 1 2 W + O(1) we will fix the parameters µ 1 and µ 2 to discrete set of values. It is possibly the case that for these values we obtain normalizable wavefunctions and hence obtain a discrete spectrum.
The quantum elliptic Ruijsenaars-Schneider model in connection with supersymmetric gauge theories has been discussed in the the literature before. For instance, in [48], some approximate solutions to the elliptic RS eigenvalue problem are labeled by a discrete parameter. We therefore expect that extremization of eigenfunctions (4.38) with respect to the mass parameters µ i (putting the solution on shell) will resolve the normalizability issues. We plan to discuss it elsewhere.

Connection to 4d index of class S
The elliptic RS system also arises in the study of the superconformal index of 4d theories of class S [48]. The hamiltonians act on the superconformal index by introducing a surface defect and the eigenfunctions are the wavefunctions associated to a so-called 'maximal' puncture in the TQFT that computes the superconformal index. In fact the wavefunctions appropriate for the superconformal index are eigenfunctions of a pair of elliptic RS sytems and are labelled by a dominant integral weight λ.
In reference [47] two of the author's have conjectured that the eigenfunctions appropriate for the 4d superconformal index are equivalent to the superconformal index of the (2, 0) theory on S 1 β × S 5 in the presence of a codimension 2 defect of 'maximal' type wrapping S 1 β × S 3 and a codimension 4 defect labelled by the dominant weight λ wrapping S 1 β × S 1 where the S 3 and the S 1 are Hopf-linked inside S 5 . The 6d superconformal index is computed by the partition function of 5d SU(N ) maximal SYM on S 5 together with a monodromy defect on S 3 and a Wilson loop in the representation λ on S 1 . The parameters of the 4d and 6d superconformal index are identified according to equation (5.2) of reference [47]. This conjecture was checked explicitly in the 'Schur' limit where only a single parameter of the superconformal index is turned on. Now, in the localization computation of the S 5 partition function, the integrand factorizes into contributions from 3 fixed points in the base of the fibration S 5 → CP 2 . In the presence of a monodromy defect wrapping S 3 , the contributions from 2 of the fixed points are two copies of the Nekrasov partition function on S 1 × R 4 with a monodromy defect wrapping S 1 × R 2 . The identification of parameters given in equation (5.2) of [47] realizes the NS-limit for these Nekrasov partition functions in the planes transverse to the defect. Thus we arrive at the partition functions studied in this paper.
The results of this paper imply that the S 5 partition function with a monodromy defect on S 3 is an eigenfunction of a pair of RS systems, one associated to each fixed point on CP 2

JHEP05(2015)095
intersected by the S 3 . The additional parameter λ is incorporated by adding a Wilson loop at the remaining fixed point. This provides some further evidence of the conjecture made in [47]. However, it should be emphasized that evaluating the Coulomb branch integral of the S 5 partition function and checking the result takes the form of a superconformal index remains a formidable challenge.

5d theory coupled to 3d hypermultiplets
We now consider a different type of co-dimension two defect in five dimensions. We shall couple 3d hypermultiplets to the 5d maximal supersymmetric SU(N ) gauge theory. The 3d hypermultiplets have U(1) × SU(N ) flavor symmetry and we couple this SU(N ) symmetry to the bulk gauge symmetry. Our motivation is that the U(2) gauge theory with this type of defect turns out to be related to the U(2) gauge theory with a monodromy defect of type ρ = [1 2 ] by bispectral duality.
In this section, however, we carry out the computation using U(N ) and we set N i=1 µ i = 1 to get the results for SU(N ). Naively U(N ) and SU(N ) are the same under the constraint N i=1 µ i = 1 as the diagonal U(1) part decouples in the field theory limit. However, this is no longer true in the instanton computation. The subtle issues related to the U(1) part in the 5d partition functions are discussed in [49][50][51]. Here we assume that the U(1) part does not affect the gauge theory dynamics and its contribution to the partition function can be subtracted by hand.
In order to compute the partition function in the presence of this 3d defect we shall follow the prescription given in [19]. The defect introduces an additional three dimensional vector bundle on the instanton moduli space of the 5d gauge theory. The 3d fields of the defect theory are in the fundamental and anti-fundamental representations of the SU(2) bulk gauge group and thus the corresponding bundles are the universal bundle and its conjugation, respectively. The equivariant characters of the 3d hypermultiplets can be computed using the equivariant character χ (E) of the universal bundle at k instantons. We get where χ chiral and χ anti are the equivariant characters of the 3d chiral and anti-chiral multiplets respectively, and x is the equivariant parameter for the U(1) flavor symmetry. These characters are expressed in term of the equivariant parameter e φ i for the auxiliary gauge group U(k) of the k instanton moduli space. Due to the 3d contribution the saddle point value of φ i is not fully classified by the N -tuple of Young tableaux. We note that the path integral on the instanton moduli space has extra saddle points from the 3d factors other than the previous saddle points labeled by Young tableaux.

JHEP05(2015)095
We find from the above character formulae the extra contribution of the 3d fields to the k instanton partition function in the integral expression. It is given by There are subtleties in the perturbative contribution related to the boundary condition on ∂(S 1 × R 2 1 ) ∼ = T 2 due to the presence of the Omega background. The superpotential and the Chern-Simons term in the 3d theory are in general not invariant under the supersymmetry in the presence of a boundary [52,53]. We will discuss the latter in the next subsection when we gauge the 3d flavor symmetry.
Let us focus on the standard N = 4 superpotential. For being supersymmetric with boundary we should impose the relevant boundary conditions for the fields. For the adjoint chiral multiplet in the N = 4 vector multiplet, we impose the Dirichlet boundary condition. The boundary conditions for the hypermultiplets, we impose the Neumann boundary condition on the chiral multiplets and the Dirichlet boundary condition on the anti-chiral multiplets, or vice versa. This choice guarantees the supersymmetry invariance of the superpotential in the presence of the boundary.
The partition function of 3d theories on solid torus S 1 × D 2 with specified boundary conditions was recently computed in [54] using localization. We will compute the 1-loop determinant for the 3d hypermultiplets using character formula (4.47) and the appropriate boundary conditions. The terms independent of the instanton number k give the perturbative contributions. See appendix C for detailed 1-loop computations. The 1-loop determinant of the 3d hypermultiplets is given by (4.49) The prefactor comes from regularization. Note that this 1-loop contribution includes the prefactor e mx 1 which amounts to the mixed Chern-Simons term between the background U(1) flavor gauge field and R-symmetry current.
The full partition function of the N = 1 * theory in the presence of the 3d hypermultiplets is given by without the 3d fields, . (4.51) One can obtain the instanton part using the quantum mechanics on the instanton moduli space. For the N = 1 * theory with U(N ) gauge group, the Witten index of the N = (4, 4) ADHM gauged quantum mechanics gives the instanton partition function, which was computed in [55] using localization. When we couple the 3d fields, the supersymmetry reduces to N = (2, 2) and one can deduce from (4.48) that there would be extra degrees of freedom, a chiral and an anti-chiral multiplets, added to the quantum mechanics.
The contour integral (4.50) over ρ i can be evaluated using the Jeffrey-Kirwan (JK) residue prescription introduced in [56,57]. The JK prescription has also been applied to the localization of the index in quantum mechanics, which we will briefly review now. See [51,58,59] for more detailed explanations.
We can first define a hyperplane in the φ plane for each charge vector Q i ∈ R k of the multiplets where the integrand in Z k (4.50) becomes singular (4.52) Here z denotes other chemical potentials (or log of fugacities). Let us then consider when n ≥ k hyperplanes meet at a point φ = φ * and denote by Q(φ * ) ≡ {Q i φ ∈ H i } a set of n charge vectors at the point. The residue at the singular point can be computed using the JK prescription. The integrand of Z k is Laurent expanded around the singular point φ * in negative powers of Q i (φ − φ * ). Among others, the JK residue yields nonzero result only at simple poles of the form where Q i 1 , · · · , Q i k are in Q(φ * ). We will choose a reference vector η arbitrarily in R k . This vector η should not be confused with N = 1 * mass parameter. The JK residue defined in [56] is: where 'Cone' denotes the cone formed by the k independent charge vectors. The result turns out to be independent of the choice of η. The JK prescription can be applied when

JHEP05(2015)095
the projective condition is satisfied [56]. This turns out to be the case with our Z k . The partition function now takes the form of where W is the Weyl group of the U(k) gauge group. For the 5d U(N ) gauge theory without coupling the 3d fields, the JK prescription reproduces the Young tableaux sum rule of the instanton partition function. To check this, we need to choose the reference vector like η = (1, 1, · · · , 1). However, after coupling the 3d fields, the residue prescription implies that there would be nontrivial contributions at the extra poles developed by the 3d factors as well as the Young tableaux summation.
For instance, at the single instanton sector, we should pick up all the poles from the fields of positive charge which give the factors of the form with Q i > 0. From the formula for Z k=1 given above one can see that the poles at {ρ 1 = µ 1 , ρ 1 = µ 2 , ρ 1 = pητ } are inside the contour. Note that the first two poles are from the 5d factors which were labeled by the N -tuple of Young tableaux, whereas the last pole is the new pole arising from the 3d factors. The JK residue at the last pole is nontrivial and should be involved in the Z k=1 computation. At two instanton sector, we have nontrivial poles due to the 3d factors at (ρ 1 = pητ, ρ 2 = µ 1 ), (ρ 1 = pητ, ρ 2 = µ 2 ), (ρ 1 = pητ, ρ 2 = q −1 ρ 1 ), (ρ 1 = pητ, ρ 2 = pη 2 ρ 1 ) (4.56) apart from the poles in the Young tableaux classification. Summing over all JK residues at the these poles, one can compute the two instanton partition functions Z k=2 in the presence of the 3d matter fields. We expect that the Jeffrey-Kirwan method also works for higher instanton sectors Z k>2 .
Let us now define the normalized partition function of the 3d-5d coupled system and take the limit 2 → 0 Here we turned on the classical mixed Chern-Simons term e − mx 1 to cancel the induced Chern-Simons term. This normalized partition function obeys the difference equation where, as before, we denoted by p τ the difference operator satisfying p τ τ = qτ p τ so that p τ becomes the conjugate momentum of τ . The factor N (1) is given in (4.35) and E (1) is the Wilson loop expectation value in (4.36). We have checked this relation by expanding both sides up to two instanton order. One can also recast the above difference equation as an eigenfunction equation

JHEP05(2015)095
To verify this equation we should expand both sides first in Q and later in 1 η . We have checked for some lowest orders in these expansions. Therefore we have computed the spectrum of the two-body dual elliptic Ruijsenaars-Schneider Hamiltonian (l.h.s. of (4.59)), whose eigenvalue is the expectation value of the Wilson loop (4.36) and the eigenfunction, up to a normalization, is the partition function of the 5d N = 1 * theory coupled to two free 3d hypermultiplets (4.57).

S-transformation
We will now show that S-transformation which is an extension of the S-duality in three dimensions can relate two different types of defects in five dimensions: a monodromy defect and a defect of 3d hypermultiplets. More precisely, we will act the S operation on the partition function Z 3d/5d of (4.50) and show that the result agrees with the partition function of the U(2) gauge theory in the presence of a monodromy defect.
Let us first review the S transformation in three dimension. There is a natural SL(2, Z) action on 3d CFTs with U(1) symmetry [20]. This action maps a theory to other theories which could be inequivalent to the original theory. It is sufficient to understand two generators T and S in the SL(2, Z) action. The T transformation simply shifts by one unit the Chern-Simons level of the background gauge field A for the U(1) symmetry. The S transformation is more complicated. Firstly we gauge the U(1) global symmetry and make the background gauge field A as a dynamical gauge field. The theory then has a new global symmetry whose conserved current is the magnetic flux of A. Secondly we introduce a mixed Chern-Simons term AdB at unit level with background gauge field B for the new global symmetry.
When the theory is on the manifold with boundary, the S transformation should be carefully taken. If there exists the effective Chern-Simons term of the background gauge field A, the naive gauging procedure fails to work due to the gauge anomaly. The Chern-Simons term makes the gauge invariance anomalous on the boundary. To keep the gauge invariance one need to couple relevant boundary degrees of freedom such that the flavor anomaly of the 2d theory compensates the gauge anomaly on the boundary. In addition, the mixed Chern-Simons term introduced by the S transformation also breaks the gauge invariance. The 2d theory should be chosen to cancel this anomaly as well.
In the partition function, the gauge invariance is associated to the periodicity of the holonomy parameter, a ∼ a + 2πi. The Chern-Simons coupling induces the terms violating this periodicity. To cancel these gauge non-invariant terms, we should multiply the elliptic genus of the proper 2d theory. We will now see this with our example.
Let us first consider the S transformation on the 3d partition function of the defect after decoupling the 5d theory. The 3d theory consists of free hypermultiplets of the SU(2) doublet. The S transformation acts on the U(1) flavor symmetry with parameter x. We turn off all the classical background Chern-Simons terms. However, the 1-loop effect generates the nontrivial effective mixed Chern-Simons term between the U(1) flavor symmetry and the U(1) R-symmetry. In the 3d partition function (4.49), the prefactor e Chern-Simons term AdB in the S transformation adds a term like e − yx 1 where y is the holonomy parameter for the new U(1) flavor symmetry, which also violates the periodicity of x. These gauge non-invariant terms must be canceled. In the previous section, we cancel the former anomalous factor by turning on the classical Chern-Simons term corresponding to e − mx 1 . In this section we couple instead boundary N = (0, 2) multiplets and cancel the anomalous boundary terms.
The N = (0, 2) theory on the boundary T 2 consists of two fermi and one chiral multiplets. We refer the reader to [52,60] for details of elliptic genera of the N = (0, 2) theories. The regularized elliptic genus is summarized in appendix C. We introduce the boundary theory whose the elliptic genus is given by with u = e y . One can check that the prefactor precisely cancels the gauge non-invariant terms of the 3d theory on the boundary. We now gauge the U(1) symmetry parametrized by τ . Then the S transformation on the 3d partition function can be written as [13] Z 3d where the prefactor is F = πim − πi 1 /2 + π 2 /3 − 2 /12 / 1 and τ = e x . The integral can be evaluated using the residue theorem with an appropriate pole prescription. We propose that the integral contour encloses the poles at τ = q −k η −1 µ I , k ≥ 0 which come from the 1-loop determinant of the 3d fundamental chiral multiplet. It may be possible to justify this pole prescription by the JK-like residue prescription, but we will not attempt to do it. Let us focus on the residues at poles of τ = q −k η −1 µ 1 . Applying the residue theorem, we obtain .

(4.63)
Apart from Z 0 , this S transformed partition function reproduces the holomorphic block of the 3d U(1) gauge theory with 2 flavors in one of the supersymmetric vacua. The qhypergeometric series 2 F 1 is precisely the vortex partition function Z residues at the poles τ = q k η −1 µ 2 yields the same result with µ 1 and µ 2 exchanged which corresponds to the holomorphic block in the second vacuum.
The S transformation can be promoted to five dimensions. It acts on the U(1) flavor symmetry of the 3d theory on the defect as we did above in the decoupling limit. The S transformation on the surface defect partition function is defined as in [19] The contour is chosen to enclose the poles at τ = q −k η −1 µ I , k ∈ Z. We note that the instanton contribution also has poles at τ = q k η −1 µ I for negative integer k < 0 and the contributions from the residues at these poles are crucial to compare with the partition function of the dual theory.
We sum over all residues of the poles at τ = q −k η −1 µ 1 and find The instanton partition function after S transformation is expanded in u and Q/u and the first few terms are given by Remarkably, having identified the parameter as u = τ 2 /τ 1 , this instanton partition function reproduces the ramified instanton partition function Z , (4.68) which is independent of the mass and FI parameters. 10 We have confirmed this relation up to u 2 (Q/u) 2 order. This result provides a strong evidence that the two types of defects, the monodromy defect and the defect of 3d hypermultiplets, are dual to each other under the S transformation: i.e. bispectral dual. One can also obtain the second ramified partition function Z (−) [1 2 ] from the sum over residues at the second set of poles τ = q −k η −1 µ 2 . The S transformation exchanges the mass parameter and the corresponding momentum as follows: obeys the difference equation which is in perfect agreement with the eigenfunction equation of the 2-body elliptic Ruijsenaars system in (4.42).

Gauge theories with chiral matter and 4d reduction
In this section we discuss chiral limits of our 5d/3d construction. Gauge theories in three dimensions which we have considered so far included both chiral and antichiral matter fields whose masses were split via the twisted mass of the axial U(1) subgroup of the N = 4 Rsymmetry. Since the supersymmetry is already broken down to N = 2 by this axial mass, nothing prevents us from examining the possibility of more extreme mass splitting when some of the mass parameters become large. This is the goal of the current section where we shall study chiral limits of three-dimensional theories and their 5d/3d completions along the lines of the previous sections.

Complete flags and open Toda chains
The chiral version of the quiver theory from figure 2 is formulated using complete Ndimensional complex flag variety F N : 0 ⊂ C ⊂ C 2 ⊂ · · · ⊂ C N . We start with the connection of equivariant quantum K-theory of complete flags and twisted chiral rings of the corresponding 3d gauge theories along the lines of section 2.4. In physics literature complete N-flags arise as target spaces of supersymmetric sigma models with chiral matter (see figure 4).
In order to see how the vacua equations for chiral quivers arise form vacua equations of T [U(N )] theories let us rewrite equation (2.4) as follows and then take the limit 3)

JHEP05(2015)095
such that εη = 1 to get the following For flag manifold we have N j = j, so, after additional scaling we get We have just described how to obtain a chiral theory which lives on a complete flag from the theory supported on T * F N . In order to derive other chiral theories corresponding to non complete flags one needs start from theories of type T [U(N )] ρ (see appendix B, where we complete the corresponding vortex partition functions) and take a limit similar to (5.3).

Chiral limit of T [U(2)]
The simplest example of a complete flag variety is P 1 . Let us see how to describe its quantum cohomology starting from T * P 1 . From [6] we get The set of the above three equations can be rewritten as Performing scaling limits in (5.2) and (5.5) we get for (5.7) where Λ is the dynamically generated scale. By expanding the quadratic expression in σ in the l.h.s. of the above expression and using the definition of the momenta we arrive at where we put p 1 τ = p. One can recognize in the above equation equivariant quantum K-ring relation for P 1 (cf. (2.56) for N = 2).

Effective twisted superpotential
Equivalently we can derive the above equations from the first principles by considering N = 2 supersymmetric gauge theories in three dimensions built around a triangular quiver. Let us fix and integer N ≥ 2. Similarly to (2.9) we introduce real mass parameters s The effective twisted superpotential for theory in figure 4 reads Each line of the above formula corresponds to chiral multiplets, vectormultiplets, FI terms and Chern-Simons terms respectively, which become manifest in this form of the twisted superpotential. 11 The vacuum equations can be readily derived from (5.13) and read as These equations describe (5.4) for the complete N -flag. As in the T [U(N )] case they may appear to be slightly complicated, but it is favorable to express them the in functional form similarly to (2.20). Using the recursive nature of conjugate momenta p 1 1 , and so on it is easy to see that they are recovered from the following functional equations where Q j (u) is monic monomial of degree one. As before, these equations serve as a powerful toll for deriving the Lax matrix of Toda systems from the vacuum equations.

JHEP05(2015)095
Again, let us consider N = 2 for simplicity. There is a single equation By evaluating the equation at u = 0 it is straightforward to see that Q 1 (u) = u − p 1 τ and Q 1 (u) = u − p 2 τ and therefore (5.17) Thus we have recovered the Q-Toda Hamiltonians. Now we can graduate on to N = 3 case. We have two equations We can recycle the information from the N = 2 case so that Q 1 (u) = u − p 1 τ and Q 1 (u) = u−p 2 τ . Furthermore, by evaluating the second equation at u = 0 we find that Q 2 (u) = u−p 3 τ . Recall that Q 2 (u) is the matter polynomial of the N = 2 example. Thus we have 19) which are Hamiltonians of the three-body relativistic Toda system.

Open Toda Lax matrix
Now we systematize the above computation in the general case N > 2 to find the Lax matrix of the open relativistic Toda chain. We should find the matrix L(u) with non-zero components and then M (u) = det(L(u)) analogously to (2.17). Thus we have constructed the limit when trigonometric Ruijsenaars-Schneider model is reduced to relativistic Toda lattice using gauge theories.

Pure super Yang Mills theories with defects and closed Toda chains
Thus far we have identified parameter space of supersymmetric vacua of quiver theories with chiral matter with global symmetry of rank N and the phase space of the (complexified) JHEP05(2015)095

Open Toda from decoupling limit
Analogously to section 4.3 we discuss the decoupling limit first, so we send Q → 0 and decouple the five-dimensional degrees of freedom. 12 In this limit we expect to find contributions that can be accounted for by degrees of freedom supported on the defect. The answer should be consistent with chiral limits (5.3), (5.5) of holomorphic blocks and vortex partition functions which we have computed earlier in the paper. Indeed, this turns out to be the case. For example, in order to find the vortex partition function for P 1 sigma model we can start with Givental J-function (3.39) for T * P 1 and perform the chiral limit in order to see that , (5.26) which leads us to the formula for equivariant K-theoretic J-function for P 1 from [31]. At the last step we rescaled z → z/µ 2 . The above result can be understood as hypergeometric series of type 0 F 1 . Equivalently, from the computation of the ramified instanton partition functions in the Q → 0 limit using notations (5.25) we get (5.27) which are related by interchanging µ 1 ↔ µ 2 . The above solutions represent the nonperturbative contributions to the two independent holomorphic blocks of U(1) theory with two chiral multiplets.
It is straightforward to prove that expansions (5.27) obey the following difference equations [1,1] , [1,1] . (5.28) The second equations in each line impose that the answer depends only on the ratio τ 2 /τ 1 . In order to remove the dependence on µ 1 and µ 2 on the left we must include contributions to the classical action from FI parameters. These are exactly the same ambiguities we have addressed in (3.42). We could choose, for example 12 One can also study 'chiral' version of section 3, namely study 3d partition functions of chiral quivers and prove that they satisfy Q-Toda difference equations. This approach (albeit without reference to gauge theories in three dimensions) was pursued in [61].

JHEP05(2015)095
where is the vacuum expectation value of the Wilson loop. We now multiply R (±) by the same factors as in (5.29). From a three-dimensional perspective they were contributions to classical action from FI parameters. The final result is that both functions obey Thus we can see how turning on the parameter Q in the difference equation controls the five-dimensional instanton corrections. We have found formal eigenfunctions of the twobody closed Q-Toda Hamiltonians. Note that the spectrum should be discrete, whereas we have continuous parameters µ 1 and µ 2 . Again, as in the non chiral case, they should be fixed by Bethe equations coming from the divergent prefactor. It could be that this is related to normalizability of the wavefunctions.

Kapustin and Willett
As we know these are quantum ring relations for T * (Gr(M, N )). For simplicity let us consider N = 1 and M = 3 first. The variables in the above equation then can be rescaled as follows to get which is the chiral ring relation for T (3, 2, 1).

4d/2d construction
For completeness we exhibit 2d analogues of some properties of 3d theories we have used in the main text. Quantum cohomology of complete flag varieties and their cotangent bundles in connection with monodromy defects were discussed in [65]. Here we discuss chiral limit of the twisted chiral ring of (2, 2) * theory in two dimensions.

JHEP05(2015)095
Supersymmetric vacua equations can be obtained from (2.4) and read as follows We now take the limit → ∞ combined with m is kept fixed. In order to keep the whole expression finite the FI couplings have to run thereby generating a scale Λ j for each gauge group, so we have the following chiral ring relations which is the quiver generalization of a CP N sigma model. We can also write the above equation in Baxter form where For a complete flag case only M 1 = Q 0 is nonzero, the rest M i vanish and vacua equations (5.44) can be written as using auxiliary polynomial Q i . It is assumed that Q N = 1. Following [14] we rewrite the above equation using Toda Lax matrix L where and it also follows that Interestingly the momenta in Toda are the auxiliary polynomials Q i and the coordinates are dynamical scales Λ i at each gauge group.

Equivariant quantum cohomology
One of the motivating results for this note is the famous theorem by Givental and Kim, which we list below for completeness.
Theorem 5.1 (Givental, Kim 1993) The equivariant quantum cohomology ring of the complete manifold of flags inside C N is isomorphic to where ideal I Toda is generated by the coefficients of the following polynomial (5.52) In the Lax matrix above we have identified momenta p i and (exponential of) relative coordinates between Toda particles τ i = e t i −t i+1 with dynamical scales Λ i and polynomials Q i respectively in (5.48). This theorem can now be viewed as an important limiting case of our construction. In order to obtain the above result from Proposition 2.1 we need to first, shrink the compactification radius R → 0, and, second, take the chiral limit in mass parameters (5.3).
A detailed analysis of twisted chiral rings of (2, 2) and (2, 2) * quiver theories in two dimensions in the context of ramified instanton counting and equivariant quantum cohomology was done in [65]. In particular, two-dimensional vortex partition functions for the theories on two-dimensional defects inside four-dimensional N = 2 and N = 2 * gauge theories were computed, and the identification with Givental J-functions was presented. One can also obtain these expressions by taking the 2d limit of 3d holomorphic blocks (3.37).
Note that currently in mathematical literature all necessary tools for computing quantum cohomology of vector bundles over complex projective spaces and their generalizations is already available. Thus using the results of [66] one can derive quantum J-function for the cotangent bundle to the flag variety in the framework of [67] (see [65] for details).
Further connections to integrability in N = (2, 2) * theories were studied in [68], in particular, Q Q-type relations, similar to (2.7) were examined using cluster algebra methods.

Coupled 4d/2d systems
Using the results of the previous section we can compute twisted chiral rings of two dimensional quiver theories coupled to four dimensional N = 2 * gauge theory by taking the radius of the compact circle in the 5d computation to zero. Classical analysis has been conducted in [14], in particular, the 4d analogue of the deformed twisted chiral ring relation (4.2) was constructed in the cited paper for the SU(N ) N = 2 * theory.
6 Summary and outlook

Integrable systems
In this section we outline how the results of this paper fit into the wider context of integrable many-body systems.
There exists a correspondence between the spectral curves of a family of many-body integrable systems (Calogero-Moser-Sutherland [69][70][71], Ruijsenaars-Schneider [72], and Double-elliptic [73][74][75][76]) and Seiberg-Witten curves of supersymmetric gauge theories with adjoint matter in four, five and six dimensions (see [74] and references therein). These are the examples that we have focussed on in this paper.
Recently, in [77] this correspondence was extended and systematized to a large class four dimensional quiver gauge theories of finite and affine ADE type. Later in [46] the five and six-dimensional versions of the Seiberg-Witten geometry together with its quantum deformation are also discussed. Figure 5 exhibits a family on many-body classical integrable systems and our proposal for how their eigenfunctions are realized by the partition functions of supersymmetric gauge theories in various dimensions. The integrable models are characterized by how the periodicity properties of the coordinates and momenta: each may be rational, trigonometric and elliptic. The most general system studied in this paper is the elliptic RS system (corresponding to 5d N = 2 gauge theory with a 3d surface defect), which has elliptic dependence on positions and trigonometric dependence on momenta. We have indicated how some of the remaining members of the family can be obtained by various limits.

Calogero-Ruijsenaars-Dell family
In figure 5 the first row contains Calogero-Moser-Sutherland (CMS) family, the second row describes Ruijsenaars-Schneider (RS) family, whereas the last row contains models that are bispectrally dual to eCMS, eRS, and, finally, the double elliptic (Dell) system. Blue double arrows describe bispectral dualities between the models in the table. Because the properties of the Dell system are largely unexplored, the anticipated duality between Dell and itself is designated by the dotted blue double arrow. Various limits are shown by arrows. Thus the right column describes elliptic models, whose ellipticity parameter plays a role of the bulk (4,5, or 6-dimensional) instanton fugacity Q. When we send Q → 0 bulk degrees of freedom decouple and we are left with the corresponding defect theories which are located in the middle column. These models are trigonometric in coordinates. Next, one may take a limit when the adjoint mass vanishes. Provided that an appropriate JHEP05(2015)095 Figure 5. Classification of integrable many-body systems according to their periodicity properties in coordinates q (columns) and momenta p (rows).
scaling is chosen (see [6]), one obtains a family of rational models from the → 0 limit. Equivalently, one can take the limits row-wise. First, starting from the Dell model and its descendants in the last row take a limit R → 0 thereby shrinking one of the extra compact direction of the 6d theory. This limit moves us to the RS family. Further on, shrinkage of the other circle (again, with a properly chosen scaling of parameters) R → 0 descends us further to the CMS family. One can use the arrows we described above to navigate through the diagram starting from Dell.
Recall that the classical tRS model was derived from the twisted chiral ring of T [U(N )] theory (2.32). After quantization these relations become operator equations which we solved in (3.30), where the eigenfunctions are written in (3.28) as a partition function on the Coulomb branch of T [U(N )] theory, then in terms of vortex partition functions in (3.37), and finally as a decoupling limit of the 5d/3d partition function in section 4.3. The eigenvalues are characters of antisymmetric tensor representation of U(N ).
Next, we have found the eigenfunctions of elliptic RS system for two and three particles as partition functions of 5d N = 1 * U(2) (4.42) and U(3) (4.45) gauge theories in the presence of monodromy defects of maximal type section 4.5. The eigenvalues in this case can be computed in (4.31) and correspond to VEVs of Wilson loops in the skew powers of the fundamental representation of U(N ).
Finally, we were able to find the spectrum of the two-body dual eRS model using the U(2) 5d gauge theory coupled to 3d free hypermultiplets (4.59 Figure 6. Classification of rational, trigonometric (relativistic) and elliptic Toda integrable systems. Closed Toda chains exhibit affine Lie algebra symmetry, whereas open chain are symmetric under the action of the Lie algebra itself.

Toda family
In section 5 we have discussed 3d quiver gauge theories with chiral matter and pure 5d SYM theories with defects which support chiral quiver theories. We have found quantum spectra of relativistic open (5.30) and closed (5.37) Toda chains. In the limit when the compactification radius of the 3d theory becomes small we recover nonrelativistic Toda chains (see section 5.4). The classification is presented in figure 6. In the last row of the table one can find elliptic Toda systems which were studied in [78].

Gaudin-spin chain family
For completeness we also discuss the quantum integrable models whose Bethe equations reproduce the twisted chiral rings of the supersymmetric gauge theories appearing (after decoupling Q → 0) on codimension two surface defects in the four, five and six-dimensional theories we have discussed above. This is illustrated in figure 7 and can be compared to figure 5.
The spin chain family (XXX, XXZ, and XYZ) in the middle column of figure 7 can be described using the Nekrasov-Shatashvili correspondence using quiver gauge theories in dimensions two, three, and four respectively. The Gaudin family in the first column can be obtained from the spin chain family by turning off the 'Planck constant', which in our construction is represented by the adjoint mass (see [6] for the details about XXX and XXZ models). We refer the reader to [79] and references therein for the discussion about XYZ spin chain and XYZ (elliptic) Gaudin model. The limit → 0 should be supplemented by scaling of anisotropy parameters such that m i remain constant. To the best of our knowledge there are no known quantum models with elliptic dependence on twists which could be consistently placed in the right column of figure 7. Moreover, our analysis involving defects in higher dimensional gauge theories with adjoint matter fields does not immediately suggest any candidates for such models. Their existence, is certainly an intriguing question on its own and should be pursued independently. 14

Open problems
Let us now articulate what we believe to be some important questions unanswered by the present work. We list them below in the random order.
• In this paper we have conjectured the structure of formal eigenfunctions of the elliptic Ruijsenaars-Schneider model and (in the 2-body case) its bispectral dual. We have checked our conjectures by expanding the eigenfunctions (instanton partition functions of 5d theories with codimension two defects) to first several orders. It should be possible to prove these conjectures. We understand that work in this direction is being pursued in [83].
• The Hamiltonians of trigonometric Ruijsenaars-Schneider model form a commutative subalgebra inside double affine Hecke algebras (DAHA) and Cherednik algebras [84]. Further understanding of the role of Cherednik algebras in gauge theories is due.

JHEP05(2015)095
• We have analyzed in this paper five-dimensional theories with defects. An immediate generalization would be to study six dimensional (1, 1) theory with a four dimensional defect and use it to find formal eigenfunctions of the double-elliptic (Dell) model. It would be interesting to understand the action of bispectral duality in this case.
• In the presence of monodromy defects, it is known that the Alday-Gaiotto-Tachikawa [85] correspondence is modified to conformal blocks of affine algebras. Understanding of five-dimensional gauge theories with surface defects might lead to new ideas in quantum affine algebras (see, e.g. [86][87][88][89] for a related study of q-Toda degenerate conformal blocks).
• There is a notion of regular and irregular monodromy defects in gauge theories. In this paper we have only addressed the regular case and computed instanton partition functions in the presence of such monodromy defects. One may wonder what happens in the case of irregular singularities.
• The Calogero-Moser-Sutherland family of integrable models is connected to the Korteweg -de Vries/Benjamin-Ono/Intermediate Long Wave hierarchy [80,81,[90][91][92][93] in the limit of large number of particles. One may study generalizations of the correspondence to the Ruijsenaars-Schneider family. Some work in this direction has already been done in [94][95][96].
• In this paper we discussed the relationship between the many-body trigonometric Ruijsenaars-Schneider system and Bethe ansatz of quantum XXZ spin chains. It is a legitimate question to ask how the correspondence is generalized to the related elliptic many-body system.

JHEP05(2015)095
Our research was partly supported by the Perimeter Institute for Theoretical Physics. Research at Perimeter Institute is supported by the Government of Canada through Industry Canada and by the Province of Ontario through the Ministry of Economic Development and Innovation.

A Conventions of special functions
We summarize our conventions on various functions we have used in the main text.

B Factorization of T ρ partition functions
The T [U(N )] ρ theory is the 3d N = 4 quiver gauge theory with gauge group U(N 1 ) × · · · × U(N L ) and N fundamental hypermultiplets for the last gauge group (see figure 8).
In this appendix we shall compute the Higgs branch representation of the ellipsoid partition function for T [U(N )] ρ theory. The partition function is given by with N L+1 = N and x (L+1) i = m i , the N mass parameters for the flavor symmetry.
The integrand has infinite number of poles and zeros. We suppose that the physically relevant poles are only from the bifundamental hypermultiplets. 15 Then the contour integral can be done by taking residues from the relevant poles. The poles take the form of ij +m ij +ik , Z AV = Z V ((z, µ, η, q) → ( z, µ, η, q)) .

(B.9)
The result consists of the classical and 1-loop determinant and non-perturbative parts and the non-perturbative contribution factorizes into the vortex and anti-vortex series.

C Perturbative 5d partition functions
In this appendix, we briefly discuss perturbative partition functions and regularization issue. We will compute the 1-loop determinants of 5d theory on S 1 × C 2 and 3d theory on S 1 × C where S 1 denotes the time circle. We will also consider the elliptic genus of 2d theory which can arise as a boundary theory of the 3d theory. Let us start with the 1-loop determinants of 5d theories. We can use the equivariant indices for the vector and hypermultiplets where α are the roots and ρ are the weights of the gauge group and m is the equivariant parameter for the flavor symmetry. The denominator factors is understood as a power series expansion in terms of e 1 and e 2 . When we compute the 1-loop determinants using these equivariant indices, there is an issue related to the boundary condition on ∂C 2 , which has not been clarified yet. We will not attempt to clarify this issue in this paper, but we will adopt the following prescription. For the multiplets in the complex representations in the gauge group, we will simply use the above equivariant indices and compute the corresponding 1-loop determinants. However, for the real multiplets, we will first take average of the equivariant index with its charge conjugation and then compute the 1-loop determinant. This prescription respects the invariance of the real multiplets under the JHEP05(2015)095 charge conjugation. We also remind the reader that the equivariant indices implicitly have the factor t∈Z e 2πi β t for the Kaluza-Klein momenta along the temporal circle. In what follows we set β = 1 for convenience, which can be restored by scaling other chemical potentials.

JHEP05(2015)095
where the prefactors induced after the regularization are written as These prefactors encode the 1-loop corrections to the effective action of the 5d gauge theory. We now turn to the perturbative partition functions of N = 2 field theories in three dimensions. The 3d partition function on S 1 × D 2 has been recently computed in [13] and in [54] using localization.
The equivariant index of the chiral multiplet with R-charge ∆ is In the 1-loop computation, we need to take into account a proper boundary condition in supersymmetric and gauge invariant fashion. For the N = 2 chiral multiplet, we can choose either the Neumann or the Dirichlet boundary condition. It appears that the boundary condition determines how to expand the denominator of the equivariant index. The computation in [54] implies that we have to expand it in power series of e − 1 for the chiral multiplet with the Neumann boundary condition, while expand it in power series of e 1 for the chiral multiplet with the Dirichlet boundary condition. If we impose the Neumann boundary condition, the 1-loop determinant of the chiral multiplet becomes (1 − e −ρ(a)−m q ∆/2 q n ) −1 . (C.10) We regularized the infinite products using the Barnes' gamma functions as we did in 5d theories. On the other hand, the chiral multiplet with the Dirichlet boundary condition has the following 1-loop determinant (1 − e ρ(a)+m q 1−∆/2 q n ) . (C.11) The prefactors involve the 1-loop corrections to the (mixed-) Chern-Simons terms by the matter fields.