Circular quiver gauge theories, isomonodromic deformations and $W_N$ fermions on the torus

We study the relation between class S theories on punctured tori and isomonodromic deformations of flat SL(N) connections on the two dimensional torus with punctures. Turning on the self dual $\Omega$-background corresponds to a deautonomization of the Seiberg-Witten integrable system which implies a specific time dependence in its Hamiltonians. We show that the corresponding $\tau$-function is proportional to the dual gauge theory partition function, the proportionality factor being a non trivial function of the solution of the deautonomized Seiberg-Witten integrable system. This is obtained by mapping the isomonodromic deformation problem to $W_N$ free fermion correlators on the torus.


Introduction
A major problem in modern Quantum Field Theory is that of understanding its non perturbative formulation. While this issue is somehow accessible in low space-time dimensions (d = 0, 1, 2), in higher dimensions this turned out to be achievable only for particular classes of models, namely supersymmetric ones. In these cases, due to a sophisticated analysis of the quantum measure and of the Feynman path-integral, it is possible to perform exact computations of BPS saturated sectors of the theory [1], that are reduced essentially to matrix models. A crucial aspect of these results is that special functions and transcendental functions show up as basic building blocks. This is indeed an expected feature from several general view points, first of all from the analysis of the asymptotic nature of the power series in the coupling constants arising in perturbative QFT [2].
A particular set of results in this wider framework, were started by the analysis of [3], where a link between Painlevé transcendents and multi-instanton counting in N = 2 d = 4 SU (2) SUSY gauge theories in self-dual Ω-background [4] was noticed. Further analysis has shown the natural identification to be between partition functions and solutions of Painlevé equations in τ -form.  Figure 1. Circular quiver gauge theory corresponding to the torus with n punctures: for every puncture z i we have a hypermultiplet of mass m i sitting in the bifundamental representation of two different SU (N ) gauge groups. The case n = 1 is special, as the hypermultiplet is in the bifundamental representation for the same SU (N ) gauge group, so that it is an adjoint hypermultiplet and the theory is the N = 2 * theory.
This was not the first time in which Painlevé transcendents arose in gauge theory. Indeed Painlevé functions show up already in d = 0 gauge theory, namely matrix models. The most famous example appears in the analysis of the Hermitian matrix model with cubic potential of Kontsevich and Painlevé I equation [5]. As an important fact, the full matrix model partition function has been identified with the KP τ -function in [6].
In this paper we will analyse how the identification between gauge theory partition function and the τ -function of a suitable isomomonodromy deformation problem (of which Painlevé equations constitute the simplest instance) arises for a A N −1 class S theories on the torus, a typical example of which is a circular quiver N = 2 d = 4 SU (N ) SUSY gauge theory, depicted in Figure 1, in a self-dual Ω-background and which are the integrable systems involved, generalizing the result of [7], where the simplest of such theories, namely the SU (2) N = 2 * gauge theory, was shown to be related to the elliptic form of the Painlevé VI equation [8].
In order to understand the correspondence between isomonodromy deformations and four-dimensional N = 2 supersymmetric gauge theories a central object is the Hitchin system [9], in terms of which it is possible to formulate Seiberg-Witten theory, describing the Coulomb branch of the theory [10]. The appearance of such an object is best understood within the context of class S theories [11][12][13][14][15]: one obtains theories in this class by compactifying the A N −1 six dimensional (2, 0) superconformal field theory on a Riemann surface Σ g,n of genus g with n punctures, with punctures carrying also additional information given by singular boundary conditions for the fields. The basic reason for the appearance of Hitchin systems is that the four dimensional theory preserves N = 2 supersymmetry iff the internal fields (A, φ) on Σ g,n satisfy Hitchin equations: F + [φ,φ] = 0, ∂φ = 0, (1.1) with singular behavior at the punctures specified by the boundary conditions. On the one hand, the moduli space of these equations is a hyperkähler manifold given by the total space of a torus fibration, whose base space can be identified with the Coulomb branch of the four-dimensional gauge theory; on the other hand, this space is known to be an algebraic integrable system. In the I complex structure the Hitchin system reduces to a Higgs bundle whose spectral curve Σ SW : det(φ − λ) = 0, (1.2) can be identified with the Seiberg-Witten curve. The "Higgs field" φ of the Higgs bundle defined by (1.1) is the Lax matrix of the integrable system. The question of how this picture gets modified when one tries to follow the physics from the deep IR of the Coulomb branch was asked since the early days of Seiberg-Witten theory, and the answer to this question was found to be that one has to split the times of the integrable system into "slow" and "fast" times, effectively deautonomizing the system in a consistent way: this corresponds, in the language of integrable system, to the so-called Whitham deformations [16,17]. However, the procedure to study Whitham deformations is very involved, and with this method it is only possible to reconstruct the physics order by order in the deformation. Actually it turns out to be more convenient to start from the UV physics, which is described by instanton counting in terms of Nekrasov partition functions [4,18]. First, an expression for the tau function of isomonodromic deformations of Higgs bundles corresponding to theories in class S associated to Riemann surfaces of genus zero has been found as a Fourier transform of Virasoro [19,20] or W N conformal blocks [21,22] on the sphere. By using the AGT correspondence [23] one can show that this object is essentially identified with the Nekrasov-Okounkov dual partition function (modulo some known proportionality factor) for linear quiver gauge theories in class S [3,24]: where the Nekrasov-Okounkov dual partition function is a discrete Fourier transform of the full Nekrasov partition function with respect to the Cartan parameters. In the cases where we have only one isomonodromic flow and two-dimensional monodromy manifold, the deformation equations are Painlevé equations, and the degeneration of one Painlevé equation into another is precisely mapped to the decoupling of hypermultiplets in the corresponding gauge theory, or in some cases to taking the limit to an Argyres-Douglas fixed point [24][25][26][27]. These equations have the natural interpretation of exact, nonperturbative renormalization group equations for the asymptotically free gauge theories, since the deformation times are given by the dynamically generated scale, or as conformal manifold equations, since in the conformal case the times are given by the exactly marginal deformations of the theory. This picture has been generalized in [7] to the case of Gaiotto curves of genus one by considering the specific case of the torus with one puncture. This corresponds to the N = 2 * gauge theory with SU (2) gauge group. It was there shown that beyond genus zero the above picture is slightly modified, since now where η(τ ) is Dedekind's eta function and Q(τ ) solves the particular case of Painlevé VI equation in elliptic form [8] (2πi) 2 d 2 Q dτ 2 = m 2 ℘ (2Q). (1.5) Thus in this case the proportionality factor is not just a simple function, but a highly transcendental one. These results show that the integrable structure underlying the UV theory (in the self-dual omega background) is not the Higgs bundle itself, but rather its isomonodromic deformation, which corresponds to the oper limit of the Hitchin system in the complex structure J [24]. This realizes in an exact way the original idea of using Whitham deformation to describe the physics outside of the deep IR regime. Further, given the appearance not just of Nekrasov partition functions, but rather of their dual version, it seems more natural to reformulate the CFT solution by using free fermion conformal blocks [28], that naturally yield a Fourier series structure from the sum over fermionic charges in the Fock space. In fact, it was shown in [7] that as soon as one goes beyond genus zero, this reformulation is not just more natural, but actually necessary, so that it really seems the correct framework for this problem.
Another feature of working with free fermions is that there is a natural connection of free fermions with the theory of topological strings, where they appear in various contexts [29][30][31][32][33][34]. The topological strings in turn engineer theories of class S when formulated on certain toric Calabi-Yau manifolds [35,36]. In fact, it turns out that these isomonodromic deformations underlie topological strings only in the geometric engineering limit, where we have a theory of class S. The full topological string partition function itself, as computed with the (unrefined) topological vertex [37], are instead related to tau function of q-Painlevé equations [38][39][40][41], and q-Virasoro conformal blocks [42][43][44][45]. In fact, the connection with isomonodromy problems goes beyond the perturbative setting of the topological vertex, making contact with the nonperturbative proposal of [46] for the Topological String partition function (see also [47] for recent developments).
Our main result is the generalization of (1.4) to the case of an SL(N, C) isomonodromic problem on the torus with an arbitrary number of punctures, i.e. to class S circular quiver theories with SU (N ) gauge groups obtained by compactifying the six-dimensional A N −1 (2, 0) superconformal field theory on a genus one surface with n regular punctures at positions z 1 , . . . , z n . We show that the expression (1.4) is generalized to this case in the following way: , (1.6) where Q i are again the dynamical variables of the isomonodromic system. These solve a system of coupled nonlinear differential equations corresponding to an elliptic version of the Schlesinger system, in which the times are the punctures' positions z 1 , . . . , z n and the elliptic modulus τ [48], and Z D is a Fourier transform of free fermionic conformal blocks, of the form J 0 are charges under the Cartan of a twisted gl(N ) 1 algebra and η their fugacities. σ, ρ are the U (1) charge and fugacity of this gl(N ) 1 . When the vertex operators V 1 . . . V n are semi-degenerate fields of W N , through the AGT correspondence Z D is identified with the dual partition function of a circular quiver gauge theory, while for more general values of their W-charges the derivation, while formally holding at the level of CFT, does not have a known gauge theory counterpart, and thus an explicit combinatorial expression in terms of Nekrasov functions [4,18,49]. Note that while the representation (1.7) corresponds to the dual partition function of a circular quiver gauge theory, by applying fusion transformations on the vertex operators it is possible to obtain the other class S theories corresponding to the same number of punctures on the torus. The corresponding tau functions will differ by connection constants determined by the fusion kernels, as it happens in the case of the sphere [27,[50][51][52]. The construction contains additional U (1) parameters over which the tau function does not depend. We show however that the zeroes of the dual partition function in these additional variables are exactly the solutions Q i of the nonautonomous system. The condition Z D = 0 is therefore shown to be the nonautonomous generalization of the algebro-geometric solution of the Calogero-Moser model [53]. Moreover, the fact that the tau function does not depend on σ, ρ can be made explicit by decomposing the trace in (1.7) into different sl N sectors, labeled by j = 1, . . . , N . We can then rewrite the relation (1.6) as 1 where now Z D j , j = 0, . . . , N − 1 are N different dual partition functions for the SU (N ) quiver theory, with different shifts in the Fourier series over the Coulomb branch parameters, and Θ j are Riemann theta functions given by equation (7.20).
The paper is structured as follows: in Section 2 we define the rank N isomonodromic problem on the torus with n regular singularities; in Section 3 we introduce N -component complex free fermions and their related vertex operators, that we then use in Section 4 to provide an expression for the kernel and tau function of the isomonodromic problem. In section 5 we provide an alternative proof of the statements of section 4 by using the technique of Verlinde loop operators: while less general than that of the preceding section, this proof has the upside of being less formal, and to every quantity is provided an explicit expression. In section 6 we discuss the CFT solution to the linear system defined by Krichever's approach to isomonodromic deformations [54], which we also briefly discuss. In section 7 we use our results to find an explicit formula for the solutions of the elliptic Schlesinger system as zeros of the dual partition function, generalizing the algebro-geometric solution of the Elliptic Calogero-Moser integrable system [53] to the nonautonomous case with arbitrary number of singular points. In Appendix A we provide our notations about elliptic and theta functions, while in Appendix B we briefly recall some generalities about W N algebras and their (semi-) degenerate fields.

General Fuchsian system on the torus
We are going to study monodromy preserving deformations of linear systems on the torus of the form where L, Y are N × N matrices and L, the Lax matrix, has n simple poles located at {z 1 , . . . , z n }, also called Fuchsian singularities. Differently from what happens on the sphere, L(z)dz is not a single-valued matrix differential, but rather has the following twist properties along the torus A-and B-cycles [48,[55][56][57]: As can be seen from (2.1), these twists will act on the solution Y of the linear system on the left, in addition to the usual right-action by monodromies. Note that, while the monodromies are left invariant by the isomonodromic flows z 1 , . . . , z n , τ , this is not true for the twists. In fact, as was already discussed in [7], the twists are essentially parametrized by the dynamical variables of the isomonodromic system, of which z 1 , . . . , z n , τ are the times. The analytic continuation of Y along the generators γ 1 , . . . , γ n , γ A , γ B of π 1 (Σ 1,n ) is then Together with the singular behavior of Y around z 1 , . . . , z n , which are its branch points, these conditions fix completely Y (z|τ ). As discussed in [48], for the group SL(N, C) there are N inequivalent Lax matrices of this kind characterized by the commutation relation of the twists: where c 1 = 0, . . . , N − 1 is the first Chern class of the bundle having the centre of SL(N, C) as structure group. It is possible to relate Lax matrices characterizing inequivalent bundles by means of singular gauge transformations, called Hecke modifications of the bundle [58]. Another possible approach, as in [54], is to consider instead a single-valued Lax matrix with additional simple poles at the so-called 'Tyurin points'. We will discuss the CFT solution to the problem defined by this latter Lax matrix, and its relation to our approach, in Section 6.
Because of (2.3), it is possible to define the following kernel: where Ξ is defined so that it has one simple pole at z = z , and transforms as in such a way that its transformation cancels the twists of Y . We also included the possibility for Ξ to introduce further U (1) factors, which will be useful to compare with the free fermion description. Because of this, along a closed cycle γ, K transforms as follows is the GL N representative of γ in the monodromy group, while M γ is its SL N representative (the monodromy of the solution Y ). Keeping in mind the aforementioned fact that we can straightforwardly change from one bundle to another by means of a (singular) gauge transformation, from now on we consider the case c 1 = 0 of a topologically trivial bundle, for which the Lax matrix has the form where the parameters S (k) ii are subject to the constraint so that we have the correct quasi-periodicity properties (2.2). The monodromy preserving deformations of (2.1) involve moving the singular points z 1 , . . . , z k (one of which can be fixed using the automorphisms of the torus), and the modular parameter τ . These flows are generated by the Hamiltonians, given by the trace of the Lax matrix squared where E 1 , E 2 are the Eisenstein functions (see Appendix A for their definition), C k 2 is the Casimir at the orbit of z k , while H k , H τ generate the flows with times z k and 2πiτ respectively, and can be computed by performing contour integrals: These Hamiltonians can all be obtained as usual from the logarithmic derivative of a single tau function [48,[55][56][57]:

N -component free fermions
In [7] it was shown that to describe SL(2, C) isomonodromic deformations on the torus it is not sufficient to consider representations of Virasoro algebra, but we have to extend our space to include also a Fock space F σ with vacuum charge σ. This generalizes to the SL(N, C) case by considering representation of W N algebra, rather than Virasoro, as in [21,22]. In turn, this makes contact, rather than with the usual AGT correspondence [23], with a four-dimensional limit of topological strings, that are more naturally connected to free fermions [29,31,34,59]. Due to the extra Fock space, the system that is needed in the end is that of N -component complex free fermions, which we define in this section without introducing degenerate fields of W N . The more "traditional" approach to isomonodromy involving degenerate fields and Verlinde loop operators is described in Section 5. The approach that we will adopt is very close to that of [28]: we define N -component free complex fermions, collecting them in two vectors ψ,ψ, by their Fourier expansion in cylindrical coordinates: Here a is in the Cartan of sl N , and the Fourier modes of the components ψ α (z), ψ β (z) satisfy the usual canonical anticommutation relations The fermionic bilinear operators generate a twisted gl(N ) 1 algebra, whose Cartan subalgebra can be used to define a W N ⊗F subalgebra. Its generators are given as elementary symmetric polynomials of the Cartan currents: where n = 1, . . . , N , and These generators can be split into W N and F a generators by the replacement where j(z) is identified with the U (1) current of F, while after the replacement J α = 0. We will however, for convenience consider directly the original gl(N ) 1 currents.
As a consequence of what we just said, the fermionic Hilbert space H can be decomposed in sectors with definite gl(N ) 1 charge given by a vector n ∈ Z N : From the free fermions we can also define vertex operators in an axiomatic way by their braiding relations involving free fermions, i.e. as intertwiners (for more details, see [28]): if one analytically extends a matrix element involving ψ(z) along a contour γ that interchanges its time-ordering with a vertex operator V θ going counterclockwise above the insertion of the vertex operator, then Although our discussion will be fully general, the explicit form of B is known, for SL N , only for the specific semi-degenerate case, that we will discuss in detail in Section 5. Let us denote byB the braiding matrix defined by whereγ follows the same orientation as γ, but goes below the insertion of the vertex operator: see the second and third step in Figure 4. Then we can compute the monodromies around any punctures by iterating these two moves, noting thatγ • γ represents a noncontractible contour around the point of insertion of the vertex: (3.12) The monodromy as composition of braiding operation is represented pictorially in Figure  2. To be able to compute all the monodromies, we also need a further ingredient: when the fermion is inserted near zero, its monodromy is diagonal, and given by 2 In fact, this is not only true for the primary state |a but also for all descendants labeled by the coloured Maya diagram Analogous statements hold if the fermion is inserted instead near infinity. These last points follows from the solution of the problem on the three-punctured sphere: by repeated insertions of the identity (3.16) we can reduce the problem of computing monodromies around arbitrary punctures to a repeated use of the rules described above.
Finally, as shown in Figure 3, let us note that the braiding matrix B can be explicitly written in terms of the fusion matrix of the fermions with the vertex operators as by decomposing the four-point braiding move into two fusion and one three-point braiding moves 3 . From this it is clear that the parameters θ characterizing the vertex operators are the monodromy exponents of the linear system, since the monodromy around the vertex insertion has the form M =BB = F −1 e 2πiθ F, (3.18) so that by choosing different θ's for the vertex operators we can realize monodromies in arbitrary conjugacy classes. Further note that an explicit form ofB, B is not actually needed to arrive to this conclusion: we will obtain in Section 5 the explicit form of the braiding matrix for the semi-degenerate case, which is given by equation (5.33).

Kernel and tau function from free fermions
We now show that the kernel (2.5) has the following expression in terms of free fermion conformal blocks: where 2) x being the Lamé function defined in Appendix A. The notation . . . stands for where H is our free fermionic Hilbert space (3.9), J i 0 are the gl(N ) 1 Cartan charges and η i their fugacities. The insertion of (−) F shifts the periodicity condition of our fermions around the B-cycle of the torus, and will be relevant in the computation of the B-cycle monodromy. As discussed in Section 2, we included the U (1) charge and fugacity in the definition of Ξ, that we denoted by It will be also useful to introduce sl n projections of the charge vectors The motivation behind the matrix Ξ is the following: it gives the LHS of the equation a simple pole, that in the RHS is due to the OPE of the free fermions, while also producing the U (1) part of the monodromies, absent in Y but present by construction in the CFT. Further and most importantly, it cancels both the twists of the solution Y , so that the kernel K has monodromies acting from both left and right as in equation (2.8). Our goal will be to show that the vertex operators can be defined in such a way that the RHS has given monodromies acting in exactly such a way with prescribed conjugacy class, which together with the identical singular behavior around z, z ∼ z k , z ∼ z coming from the OPE of the free fermions with the vertex operators shows that the two objects coincide.
In this section we compute the monodromies following the method explained in Section 3: the vertex operators are defined through their action on free fermions, so it is possible to realize a monodromy with prescribed conjugacy class at every puncture. Operationally, if one wants to compute the monodromy around the cycle γ n , for example, the operation is the following (we are summing over repeated indices): so that the monodromy around z n is Following the same idea, one can compute the monodromy around an arbitrary puncture z α : one perform a braiding around every puncture from z n to z α+1 , then twice around z α , then again around z α to z n in the opposite direction as before. The operation is represented graphically in Figure 4 for the puncture z 1 in the two-punctured torus. The result is that the monodromy around an arbitrary puncture z α is given by (4.8) The monodromy around the A-cycle is fixed by our choice of gluing: it is given by Finally, the monodromy around the B-cycle can be computed in the following way. First we go once around every z k : (4.10) Now, to go around the B-cycle we have to bring the fermion back to the original position without crossing again the other operators. This is done by using the cyclicity of the trace, but in fact in doing so we also have to take into account the insertion of (−) F e 2πiη·J 0 in the trace: The two sides of equation (4.1) have prescribed monodromies and singular behavior, and so they coincide. To compute the tau function we have to expand the trace of equation (4.1) for z ∼ z . By expanding the LHS, we get a term involving the Lax matrix and two terms from the expansion of the matrix Ξ: 14) Here we introducedQ On the RHS, the expansion consists of the OPE for the fermions, yielding The O(t) term relates the expectation value of the energy-momentum tensor to the trace squared of the Lax matrix: We see that, as in [7], in the genus one case there is a correction to the relation that one has in genus zero [20,22,28], encoded in t(z).
We wish now to determine the expression for the tau function by computing contour integrals of (4.18) and comparing with (2.15) and (2.16). From (4.18) we see that we can split the tau function in two parts: 19) which are defined by the following equations: The first term would be there also in the genus zero case, while the second term is a new feature appearing in higher genus. T 0 is computed by applying the Virasoro Ward identity: yielding We now turn to computing the contour integrals of t(z): since we have when z k lies in the fundamental domain. Then, the only contribution to the τ -derivative of T 1 will be −2πi∂ τ logT 1 = tr p θ 1 (Q) (4.25) Therefore where f ({z k }) is an arbitrary function of the punctures' positions, left undetermined by the integration. In fact, let us show that f ({z k }) = 1: computing the residues of t(z) yields At first sight, the RHS doesn't look like a total z k -derivative. However, let us consider the p-dependent part of the corresponding Hamiltonian: ii . Therefore Therefore in (4.26) f ({z k }) = const, and we can put without loss of generality f ({z k }) = 1, as promised. The isomonodromic tau function is Let us remark that the CFT arguments used above are valid for general vertex insertions. However, in order to have explicit calculable expressions one needs to consider the insertion of (semi-) degenerate fields. In this case, the fermionic correlator is identified with the dual partition function of a circular quiver gauge theory with gauge group U (N ) n and n hypermultiplets in bifundamental representations of the gauge groups, as encoded in the conformal block diagram. Therefore, the above equality can be rewritten as where we made explicit the dependence on all the intermediate channel charges a k , k = 1, . . . n, together with their duals entering in the Fourier transform η k , and set a ≡ a 1 .

Torus monodromies with Verlinde loop operators
In this section we show an alternative proof of formulas (4.1) and (4.30) for the kernel and tau function respectively, using Verlinde loop operators acting on (semi-) degenerate representations of W N algebras, along the lines of [22]. The necessary definitions about degenerate fields and W N algebras are collected in Appendix B.

General setup
We wish to study the monodromy properties of the torus conformal block with insertions of two W N completely degenerate fields, φ andφ, and n semi-degenerate W-primaries V : In this formula the operators V ν k are semi-degenerate W-primaries with W-charges given by θ k = ν k ω 1 , where ω 1 is the first fundamental weight of A N −1 . Operators φ i andφ j are Figure 5. Toric conformal blocks with n = 2 semi-degenerate and 2 degenerate fields.
completely degenerate fields with W-charges given by ω 1 and ω N −1 , respectively. Indices i and j label fusion channels. The normalization of V ν k is given by: .

(5.3)
We also fix normalization of the completely degenerate field by 4 As in equation (B.10), P σ k is the projection operator onto the W-algebra representation with charge σ k , expressing the fact that the conformal block has fixed intermediate charges.
It is useful to expand the trace of (5.1) as a sum of diagonal matrix elements: where vector of Young diagrams Y labels W-algebra descendants, and we defined the matrix element between descendants We remind one of the the main results of [22, Theorem 5.1]: the Fourier transformation of Ψ (Y ) over all internal W-charges has number-valued (not operator-valued as generically happens) monodromies around 0, ∞ and the insertion points z 1 , . . . , z n , as a function of z and z 0 , independent from Y . The Fourier transform is defined by where Q A N −1 is the sl N root lattice. Moreover, for the case Y = ∅ the function Ψ 0;D gives the solution of the n + 2 point Fuchsian system on the sphere. So using the results of [22] we get automatically the following statement: the function Ψ D , given by the formula 5 has number-valued monodromies M k around all z k , and also number-valued A-cycle monodromy M A = e 2πiσ 0 , since after taking trace we identify A-cycle with the loop around 0 or ∞ on the initial sphere. The problem now is to find a linear combination of Ψ D that has number-valued monodromy around the B-cycle.

B-cycle monodromy operator
The main ingredient in the computation, as in the case of free fermions, is the braiding move exchanging two insertions in a four-point conformal block, as in Figure 6, where we see how the braiding can be expressed in terms of the fusion matrix B, given below in equation (5.10). Figure 6. Fusion transformation of conformal blocks.
It is a local transformation of conformal blocks, and maps a conformal block to a linear combination of other conformal blocks with different intermediate dimensions. Since it is local, it can be studied for conformal blocks with one degenerate, one semi-degenerate and two arbitrary fields: in this case the conformal block is given by a generalized hypergeometric function N F N −1 , so the computation of the fusion matrix F is equivalent to re-expansion of hypergeometric function around zero in the vicinity of infinity, see [22] and references therein. The analytic continuation between these two region is performed around a semidegenerate field insertion in the counterclockwise direction. These conformal blocks can be obtained directly from geometric engineering in topological string theory, as in [61,62]. We perform the sequence of braiding transformations that correspond to the B-cycle monodromy pictorially, exemplified in the case of two punctures, in Fig. 7.
From the figure we can see that after analytic continuation along the B-cycle, the intermediate charges are shifted: in other words, we have an operator-valued monodromy matrixM B , containing shift operators. The main problem, as in [20,22] will be to turn this matrix into number-valued matrix M B . Before going through the whole computation let us make the following observation: while in the spherical case all monodromies led to shifts in the A N −1 root lattice (generated by h i − h j ), in the toric case the single B-cycle monodromy also simultaneously shifts all the charges by a single h i . Therefore the arbitrary shift vector, which appears here and will have to appear in the Fourier transform, has the form (w 0 + ω k , w 1 + ω k , . . . , w n−1 + ω k ), where w l ∈ Q A N −1 are the elements of A N −1 root lattice. To get the proper kernel for the Riemann-Hilbert problem it will be necessary to sum over this set: the essential difference from the naive expectation is the presence of the extra shift by the fundamental weight ω k . Now we perform the precise computations along the lines of [22]. The explicit formula for the fusion kernel is given by (5.9) where the last factor comes from the renormalization of the structure constants (5.4) between [22] and the present work. The latter formula can be rewritten in a more compact form: The main advantage of the normalization (5.4) is that the new braiding matrix is periodic under σ i → σ i + 1 or σ i → σ i + 1.
In matrix notation, the braiding of Figure 6 takes the form Another basic operation is the permutation of a degenerate field and a projector: Here ∇ σ is a diagonal matrix with entries given by the shift operators: (∇ σ ) ii P σ = P σ+h i . The appearance of such operators makes monodromy matrices operator-valued. The transformation of the conformal block (5.1) when we analytically continue in z along the B-cycle is expressed as a sequence of these operations: in order to write it down, it is convenient to introduce the column vectors Ψ j (z) = (Ψ 1,j , . . . , Ψ N,j ) T , (5.13) constructed from the lines of Ψ. In terms of these, we can write the monodromy transformation as 15) To compute braiding of two degenerate fields we used the simple identity To further simplify the form of the monodromy matrixM B we do some manipulations in order to make all shift operators act only on the conformal blocks, but not on the other matrices. We will denote a shift operator that acts only on the conformal block by∇. This can be done with the help of the following identities: and their obvious consequence: Naively one might think thatM T B acts differently on different rows of Ψ, but due to (5.17) this dependence disappears. Simplified form of the monodromy matrix iŝ
We can thus construct a Fourier transformation of the fundamental solution in order to (almost) diagonalize all shift operators simultaneously: The shift operators act on this expression as follows: This means that one can replace where the operator T shifts the index k ∈ Z/N Z: Thanks to this, the B-cycle monodromy matrix of Ψ D is given bŷ 25) The A-cycle monodromy can be computed in the obvious way, but the problem is that it is different in the sectors with different shifts ω k : To fix this issue it is necessary to introduce an extra U (1) boson ϕ(z) with the OPE Using this boson we turn W-degenerate fields into N-component fermions: (5.28) After analogous, but quite simpler considerations w.r.t. the ones reported above, we arrive at the result that, for the U (1) factor, the B-cycle monodromy is just the charge-shifting operator for U (1) charge, and the A-cycle monodromy is just some number, different in the different sectors:M where the U (1) shift operator is defined as We are finally able to construct the following object, which is invariant under the action of T · T U (1) : that has number-valued monodromies: giving a solution to the Riemann-Hilbert problem.
Finally, let us note that from this we can read the explicit form of the fermion braiding matrix B k used in the previous section: (5.33)

Relation to Krichever's connection
We wish now to connect the solution we found in the previous sections to the solution of the linear system defined by the Lax matrix obtained following Krichever's construction [54,63], which is a different approach to the construction of Lax matrices on elliptic curves, that also extends to algebraic curves of higher genus.
Recall that Riemann-Roch theorem forces, in the g > 0 case, the introduction of twist factors that we discussed in Section 2. More specifically, a Lax matrix is a meromorphic matrix-valued differential with poles specified by a divisor on the Riemann surface. The space of r × r matrix functions with degree d divisor of poles has dimension r 2 (d − g + 1). Besides the Lax pair matrices L, M , the Lax equation involves also their commutator: if n, m are the degrees of the divisors of L, M respectively, the degree of their commutator is n + m. We thus have r 2 (n + m − g + 1) equations, but only r 2 (n + m − 2g + 1) unknown functions modulo gauge equivalence. Unless g = 0, this results in an overdetermined system of equations. One way of dealing with this is tensoring with some other bundle, which is technically what we do when we introduce twists: our Lax matrix was not a meromorphic differential but rather a section of some other bundle, so we cannot straightforwardly apply Riemann-Roch theorem as above.
There exists another way to handle this problem, which is to consider the linear system as defining a vector bundle of degree rg, instead of a degree zero bundle as in the construction with twists. Then the determinant bundle will vanish at rg points, and one can show that the Lax matrix L(z) for such a linear system will have additional simple poles at extra points, the so-called Tyurin points. These simple poles have residue one, so that from the point of view of the linear system they are apparent singularities around which the solution of the linear system ∂ z Y Kr (z|τ ) = L Kr (z|τ )Y Kr (z|τ ) (6.3) will have no monodromies. The Riemann-Hilbert problem for Y Kr is modified as following: instead of having (2.3), we have with Lax matrix given by (6.1).
To make contact with our fermionic construction, first recall that in Section 2 it was mentioned that starting from the original Lax matrix (2.10) it is possible to go to a description involving a different one by means of a singular gauge transformation, so that to find the CFT description of this approach we should find a g(z|τ ) such that For the one-punctured torus with a single pole at zero, the Lax matrices are so that the gauge transformation is relatively easy to find, and is given by To generalize this to the case of many punctures, it is convenient instead to consider the Riemann-Hilbert Problem (6.4). Such solution, that we will from now on denote by Y Kr , can be constructed from Y (z) in the following way: We see that det Y Kr (z 1 − Q i ) = 0 in all points Q i , and also all its singular exponents in the point z 1 are shifted. One way to obtain this solution is the following: consider first the kernel (4.1): and then send z 0 → z 1 : This formula has clear CFT interpretation: near z 1 the behavior of the solution is where G 1 (z) is holomorphic and invertible around z = 0. Therefore (6.14) Because of the limit z 0 → z 1 , in the CFT we have to consider the OPE of the fermion ψ α (z 0 ) with the primary field V θ 1 (z 1 ): Now comparing (6.15) with (6.12) we can identify We see that up to normalization (which is not actually fixed) Krichever's solution has the nice CFT interpretation of the expectation value of the single fermion in the presence of all the vertex operators. The expression of the two-fermionic correlator in terms of Krichever's solution can be obtained by applying the gauge transformation (6.10): Y Kr (z).

(6.17)
We thus see that Krichever's solution becomes less natural than Y (z) if we wish to express the two-fermionic correlator, because it contains a more involved diagonal matrix between Y Kr (z 0 ) −1 and Y Kr (z). On the other hand, contrary to what happens in the twisted formulation, the solution itself can be obtained from the CFT, not only the kernel.

Solution of the elliptic Schlesinger system
As a further application of our results we will now show how, starting from equations (4.30), (4.31), one can obtain a formula for the solution of the Calogero-like variables Q i of the elliptic Schlesinger system. This formula generalizes the algebro-geometric solution of the elliptic Calogero-Moser model found in [53] to the nonautonomous case with many punctures, and suggests a double role of the dual partition function from the point of view of integrable systems: on the one hand, being proportional to the tau function, its vanishing locus includes the Malgrange divisor, where the Riemann-Hilbert problem is no longer solvable [64][65][66]. On the other hand, we have an extra vanishing locus, which generalizes the Riemann theta divisor of the Krichever/Seiberg-Witten curve, whose points are the solution to the equations of motion of the isomonodromic system. Note that this is essentially a consequence of our choice of twists, or analogously of the choice of Calogerolike dynamical variables. As a byproduct, we will also obtain a direct link between the isomonodromic tau function and the SU (n), rather than U (n), gauge theory. However, note that in the case of more than one puncture, the Calogero-like variables Q i do not specify the whole system: there are additional spin variables satisfying the Kirillov-Kostant Poisson bracket for sl(N ) [57] that will not enter in the following discussion: while it may be that there is some further connection between Z D and these remaining dynamical variables, this does not seem evident at the moment.
In order to obtain the aforementioned result, we first split Z D in various components having different types of gl N shifts: where we denoted by V the whole string of vertex operators. To perform the splitting, it is convenient to decompose η as and ω k are the fundamental weights of sl N , normalized as We also decompose n as n = (n 1 , . . . , n N ) ≡ñ + N k + j N e, (7.5) where we separated the traceless part from the U (1) factor with j = 0, . . . , N − 1. The space H n analogously decomposes into a W N highest weight module plus a Fock space, with U (1) charge given by where we shifted the U (1) charge σ by 1/2 to get consistent signs in the monodromy, as in the 2 × 2 case. Then, where we encoded the fermion number operator into a shift of ρ by 1/2. However, we must note that j is not independent of the W N charge shift. In fact, if we parametrize n = (n 1 + k, n 2 + k, . . . , n N −1 + k, k), (7.9) the U (1) charge is indeed but we also have n 1 + . . . n N −1 N = n · ω N −1 , (7.11) so that j/N is the shift in the W N weight along the ω N −1 direction. Then, We should now compare with First of all, from this expression we see that στ + ρ = Q i are zeros of Z D . In other words, the solutions of the nonautonomous system are given by This is a generalization to the nonautonomous case of the condition θ(Q) = 0, expressing the solution of the autonomous integrable system as the vanishing theta divisor of the Seiberg-Witten curve, which is the autonomous limit of our description. Further, the decomposition (7.12) is a deformation of the one expressing the Riemann theta function associated to the Seiberg-Witten curve as a sum over N −1 Jacobi theta functions with characteristics shifted by j [53]. We can further write the isomonodromic tau function in a way that is manifestly independent from the U (1) charges. By writing all the theta functions in their q-series representation, we have  We decompose, similarly as before, n =ñ + N (n + j/N )e, (7.17) and find j/N 0 (N ((σ + 1/2)τ + ρ + 1/2)) .

(7.18)
Comparing the two expressions, we see that

Conclusions and outlook
In this paper we showed how the isomonodromic tau function for a linear system on the torus with n regular singularities can be expressed as a Fourier transform of conformal blocks in a free fermionic CFT, where the Fourier transform is obtained by summing over all the fermion charges under the Cartan of a twisted gl(N ) 1 algebra. Through the AGT correspondence, these are related in the usual way to dual partition functions of a circular quiver gauge theory, so that this results extends the Painlevé/gauge theory correspondence [3,24] to the case of circular quiver theories in class S with gauge groups SU (N ) and their S-duals, obtained by wrapping a stack of N M5-branes on a punctured torus with an arbitrary number of punctures. Let us remark that as a consequence of this identification we get a relation between the solution of the multi particle integrable deautonomized system and the gauge theory dual partition functions Z D j , which can be regarded alternatively as equations for the gauge theory partition functions given the solution of the integrable system (7.19).
An interesting direction for further studies is the relation to surface operators in gauge theory: in class S theories there are two ways of constructing surface operators [67]: from intersecting another set of M5 branes with the original ones wrapping the Riemann Surface that define the theory (codimension 2 defects) or from M2 branes with endpoints on the original M5s (codimension four defects). This latter type of surface operator is localized at one point on the Riemann surface: in the context of the AGT correspondence the partition function in the presence of such a surface operator is realized by the insertion of a Virasoro degenerate or W N completely degenerate field in the conformal block that yields the usual instanton partition function [68,69]. As we show in the appendix, our fermions are constructed from such degenerate fields just by adding a U (1) boson: as such, the kernel (4.1) is naturally related to such objects. The other possible surface operator instead has dimension four in the six-dimensional theory, and wraps the whole Riemann surface: the relation between these two types of surface operators, also from the CFT viewpoint, has been discussed in [70]. In the 2d CFT, this amounts to changing the theory itself, and the partition function in the presence of such a surface operator is given by a conformal block of a sl(N ) k algebra with an insertion of a certain twist operator K -see [71], with level k related to the equivariant parameters by requiring that the original Virasoro algebra of the Liouville theory is recovered upon quantum Drinfeld-Sokolov reduction, i.e.
Because of this, the partition function in the presence of a codimension four surface operator is a solution of KZB equations [72,73], which are known to be a quantization of isomonodromy deformation equations [74,75]. In fact it is expected [76] that the classical k → ∞ limit of the partition function with codimension four surface defect reproduces the formula identifying the tau function with the dual gauge theory partition function. On the one hand, it would be interesting to investigate how the extra factors present in our formulas arise when doing such a procedure on a circular quiver theory, or even more simply in the N = 2 * theory. On the other hand, it should be noted that we already have a (twisted ) Kac-Moody algebra in our construction, but with fixed level one. The relation between the appearance of a twisted KM algebra at level one and that of the classical limit of an untwisted KM algebra with the additional insertion of a twist operator K certainly needs further elucidation. Moreover, it would be interesting to lift our analysis to 5d SUSY gauge theories and group Hitchin systems [77], but on elliptic curves, in which case discrete Painlevé equations should play a central role.

A Elliptic and theta functions
We consider tori normalized so that their periods are (1, τ ). In our discussion appear two different theta functions: the Jacobi theta function with characteristics and its specification In the following we will also denote q = e 2πiτ . A z-derivative is indicated by a prime, and when the theta function or its derivatives are evaluated at z = 0, we simply omit the z-dependence: θ 1 (0|τ ) ≡ θ 1 (τ ), and so on. The quasi-periodicity properties of the theta functions are so that We also use Weierstrass elliptic functions ℘ and ζ. ℘ is an elliptic function with a single double pole at z = 0. Its expression in terms of theta functions is Weierstrass' ζ function is minus the primitive of ℘. It has only one simple pole at z = 0, with an affine quasi-periodicity along the A-and B-cycle: ζ(z|τ ) = 2η 1 (τ )z + ∂ z log θ 1 (z|τ ), (A.7) ζ(z + 1|τ ) = ζ(z|τ ) + 2η 1 (τ ), ζ(z + τ |τ ) = ζ(z|τ ) + 2τ η 1 (τ ) − 2πi. has the following transformations: x(u, z + 1) = x(u, z), x(u, z + τ ) = e 2πiu x(u, z). (A.14) x(u, z) has the following important property: 2πi∂ τ x(u, z) + ∂ z ∂ u x(u, z) = 0. (A. 15) B W N algebra and degenerate fields W N algebras, first introduced by Zamolodchikov [78], are infinite-dimensional algebras with generators up to spin N [79][80][81]. They are a higher-spin generalization of the Virasoro algebra, which is the particular case W 2 , generated by the energy-momentum tensor T (z) of spin 2. In this Appendix we provide the necessary definitions for the c = N − 1 W N algebra generators, conformal blocks, and degenerate fields, as well as showing the connection between degenerate fields and free fermions. In the following we will use fundamental weights plus zero vector given by

(B.2)
A W N algebra can be embedded in a sl N algebra, and in fact a W N CFT can be represented as a constrained WZNW model through the so-called quantum Drinfeld-Sokolov reduction [82,83]. In particular, for c = N − 1 there is a realization of the W N algebra in terms of free bosons ϕ k , subject to the relation N k=1 ϕ k = 0. (B. 3) The W N algebra generators are defined in terms of the U (1) currents generated by these free bosons: where j = 2, . . . N . In particular, note that W (2) is the Sugawara energy-momentum tensor associated to the current algebra.
Analogously to the case of Virasoro, where we can find a basis of the Verma module V θ labeled by partitions, in the W N case we can find a basis labeled by N − 1-tuples of partitions λ (j) = (λ where k = |λ|, the length of the partition. However, differently from the N = 2 case, a generic matrix element of descendants operators cannot be written solely in terms of primary matrix elements by using the conformal Ward identities. One class of fields for which this is possible is that of quasi-degenerate fields, for which the conformal weight θ is proportional to the weight of the first fundamental representation of sl N : θ = νω 1 . The Verma module defined by this highest weight state has N − 2 null-state decoupling equations, that allow the matrix elements of V νω 1 and its descendants to be expressed in terms of its primary matrix elements θ |V νω 1 |θ ≡ N (θ, νω 1 , θ)z ∆ θ −∆νω 1 −∆ θ , (B.7) where ∆ θ = −e 2 (θ) = θ 2 2 , (B.8) e 2 being the second elementary symmetric polynomial in θ 1 , . . . , θ N . We will employ also the even more special case of completely degenerate fields, for which θ = h 1 = ω 1 (first fundamental representation of sl N ) or θ = −h N = ω N −1 (last fundamental representation of sl N ). In this case there are additional null states that imply further constraints in order for the N 's to be nonvanishing. The fusion of a completely degenerate field with a primary state is It turns out to be convenient to restrict the completely degenerate field to a specific fusion channel by using projectors P θ : φ s,θ ≡ P θ+hs V h 1 P θ ,φ s,θ ≡ P θ−hs V −h N P θ , (B.10) where s = 1, . . . N . These "reduced" fields have just one fusion channel: