Decomposing Nekrasov decomposition

AGT relations imply that the four-point conformal block admits a decomposition into a sum over pairs of Young diagrams of essentially rational Nekrasov functions — this is immediately seen when conformal block is represented in the form of a matrix model. However, the q-deformation of the same block has a deeper decomposition — into a sum over a quadruple of Young diagrams of a product of four topological vertices. We analyze the interplay between these two decompositions, their properties and their generalization to multi-point conformal blocks. In the latter case we explain how Dotsenko-Fateev all-with-all (star) pair “interaction” is reduced to the quiver model nearest-neighbor (chain) one. We give new identities for q-Selberg averages of pairs of generalized Macdonald polynomials. We also translate the slicing invariance of refined topological strings into the language of conformal blocks and interpret it as abelianization of generalized Macdonald polynomials.


Conformal blocks and characters
Conformal blocks are best described by the version of Dotsenko-Fateev (DF) conformal matrix model, introduced and investigated in [80][81][82][83][84][85] where B U(1) is an explicit function representing the contribution of an extra free boson. We find it most convenient to use the number k of independent integration contours as 1 For recent developments on the 6d generalizations of the AGT relations see [62][63][64][65][66].
JHEP02(2016)098 a parameter -then what we get is a (k + 2)-point conformal block, while the number of bifundamentals in the gauge theory description below will be k − 2. The parameters of conformal block can be conveniently summarized in a diagram, such as one shown in figure 1.
The next important fact [87] is that the inter-screening coupling is reduced to a square of to separate concepts from technicalities, putting simplified general considerations before exact, but overloaded, formulas. After q-deformation (which in the Seiberg-Witten theory framework means going from 4d to 5d Yang-Mills theories [57][58][59]), the integral remains basically the same, only the integration is replaced by Jackson q-integration 2 [91]: Most importantly, now it acquires additional, refined decomposition -which for k + 2 = 4 is not bi linear, but rather quadri linear: -and this is the decomposition which is related to topological vertex [67][68][69][70][71][72] and geometric engineering [92,93]. The origin of two extra Young diagrams is simple: summation over them substitutes integration over x and y variables in the definition of averages in (1.6)this appears to be the right way to interpret the multiple Jackson integrals/sums in (1.7) (see appendix E for technical details).

Seiberg-Witten theory and topological string pattern
To better understand the origin of the multi-character decomposition let us investigate the structure on the gauge theory side of the AGT duality. Conformal blocks correspond to instanton partition functions of quiver gauge theories which are given by Nekrasov formulas. The comb-like (k + 2)-point conformal blocks on a sphere correspond to linear quiver theories, in which the gauge group is a product of (k − 1) U(N ) factors and the matter content is encoded in the quiver diagram as, e.g. in figure 2.
Here a circle is a gauge group, a box denotes a collection of matter hypermultiplets, a outgoing (resp. incoming) link connecting a circle with a box indicates that the corresponding hypermultiplets transform as a fundamental (resp. antifundamental) under the gauge group. The structure of the corresponding Nekrasov function is modelled after the quiver diagram above:

JHEP02(2016)098
where the definitions of the rational factors z fund,vect,... are given in appendix A. The structure of each term in the decomposition is linear, in particular for a (k + 2)-point conformal block there are k − 1 vector multiplet contributions and k − 2 bifundamental matter hypermultiplets. Such quiver or chain decomposition of the conformal block is obtained by inserting a special basis of states |∆, Y labelled by a pair of Young diagrams in the intermediate channels of the block: (1.10) In the language of DF integrals this corresponds to the decomposition of the measure µ DF (x) in sets of orthogonal polynomials as in eq. (1.4). Each matrix element in eq. (1.10) is then given by the Selberg average of a collection of orthogonal polynomials as in eq. (1.6). For c = 1 the special basis which reproduces the corresponding factor in the Nekrasov function (1.9) is given by Schur polynomials. We will compute the most general matrix element using q-Selberg averages and show that it is indeed given by the Nekrasov expression. For 5d gauge theories compactified on a circle of radius R 5 the structure of Nekrasov function remains basically the same. The only change is that all the monomial factors in the rational functions z fund,vec,... are transformed into q-analogues roughly as x → q x − 1, where q = e − 2 R 5 . However, quite remarkably in this case Nekrasov partition function -or conformal block -turns out to have yet another interpretation. Gauge theory in five dimensions can be obtained by compactification of M-theory on a toric Calabi-Yau threefold. Partition function of the resulting theory is equal to the (refined) topological string partition function, which can be computed by the topological vertex technique as follows.
One first draws the toric diagram of the CY threefold and assigns to each internal edge the complexified Kähler parameter Q of the corresponding two-cycle. One also assigns a Young diagram to each internal edge, and an empty diagram to each external edge. There are in general only trivalent vertices in the diagram, and to each of them one assigns a certain function C Y 1 Y 2 Y 3 (q) -the topological vertex [67,68] -depending in a cyclically symmetric way on three Young diagrams Y a residing on the adjacent edges and also on the parameter q = e − 1 R 5 : where by q C+ρ we mean the infinite set of variables The partition function is computed by summing up over all the Young diagrams with weights given by the product of all topological vertices and the "propagators" of the form (−Q) |Y | f Y (q) n where n is the framing factor depending on the relative orientation of the edges adjacent to the given edge. The toric diagram corresponding to a gauge theory with a product of k U(N ) groups is drawn using the recipe of geometric engineering. It is the crossing of N horizontal and k vertical lines, which intersect as shown e.g. in figure 3.

JHEP02(2016)098
There is a natural decomposition of the toric diagram depicted on figure 3 which leads to the same quiver structure as in figure 2 and the Nekrasov expression (1.9). One should perform the sums over all Young diagrams except those residing on the horizontal edges marked with Q B,i , which are related to positions of the vertex operators in the conformal block and the gauge theory couplings Λ i . In this way one obtains a sum over a chain of pairs of Young diagrams of certain rational factors, which turn out to coincide with z vect,fund,... for t = q (we introduce t = q β ). The resulting expression has exactly the form of Nekrasov function (1.9). Moreover, each term in the Nekrasov decomposition can now be decomposed into an infinite sum of simpler building blocks Z R AB , related to the four-point topological string amplitude on resolved conifold. In the language of CFT this leads to the decomposition and we show that the r.h.s. is nothing but the q-deformed version of DF integral expression for the matrix element in the l.h.s. Another natural decomposition of the toric diagram -cutting along the vertical edges marked with Q F,i (related to Coulomb moduli of the gauge theory and intermediate dimensions in the conformal block) -corresponds to the spectral dual Nekrasov function. The gauge theory origin of this dual description is that in 5d instantons are BPS particles as are the gauge bosons. Spectral duality exchanges these two sets of BPS objects and therefore leads to a nontrivial identification between two gauge theories. We will show JHEP02(2016)098 that the spectral dual decomposition of the toric diagram has a natural interpretation in terms of DF integrals of q-CFT -it is the sum featuring in the discrete Jackson integrals, each vertical leg corresponding to a separate integration contour in (1.1). Therefore, the spectral dual decomposition over horizontal lines of the diagram corresponds to the DF integrals themselves, while the original Nekrasov decomposition is the sum over a complete set of intermediate basis states in the CFT: (1.13) Our goal in this paper is to explain the relation between eq. (1.7), eq. (1.9), and figure 3. We will learn that the identification between conformal block and Nekrasov function requires a nontrivial rewriting of the Vandermonde determinant (which is the product of all-with-all form) into the sum of Nekrasov form (which is of nearest-neighbour form). We first clarify the relation of the toric diagram and the DF integral schematically in the simplest case of the four-point conformal block (k = 2). Extension to arbitrary k involves an a priori non-trivial star-chain identity, which is in fact the key to understanding DF description of conformal blocks and relies upon the basic properties of representation theory. Another crucial property is Selberg factorization -a mysterious conspiracy between the integrands and integration measure in DF theory, between what is averaged and how it is done. This property guarantees that the averages of certain polynomials over the q-Selberg measure factorize into products of linear factors depending on the parameters of the integral. The last mystery is that the elementary building block in the quadrilinear decomposition of conformal blocks, i.e. the topological vertex, is closely related to the modular kernel and therefore to certain knot polynomials.

Refinement and slicing invariance
The calculation we have just described yields the Nekrasov function of the 5d gauge theory with the particular choice of Ω-deformation parameters, i.e. 1 = − 2 , or equivalently t = q, which corresponds to c = 1 in CFT. To obtain the partition function in a general Ω-background, one has to use refined topological vertex 3 [69,70]: (1.14) 3 There is a slight historical mismatch of notations between the refined and unrefined vertices. Reducing the refined vertex (1.14) back to the unrefined case to compare with eq. (1.11) one needs to transpose all the diagrams and add some simple factors CABC (q, q) = (−1) |A|+|B|+|C| q κ(A)+κ(B)+κ(C) 2

JHEP02(2016)098
where ||A|| 2 = i A 2 i and M (q,t) C (x) are Macdonald polynomials. Notice that one of the legs in the diagram is marked with a double stroke and the other two bear t and q labels on them. This is to indicate the right order of the indices and arguments of the refined vertex, which depends on two deformation parameters and is not cyclically symmetric as was the case for t = q.
The calculations generally get more technically involved, though the strategy remains the same. The only essentially new feature in this case is the naive loss of rotation symmetry of the diagram: the vertical and horizontal lines are no longer equivalent. However, it turns out that the symmetry in fact survives even for general t and q, though the individual vertices and propagators are not symmetric. This statement came to be known as the slicing invariance hypothesis. For toric geometries, which we consider, slicing invariance is also equivalent to spectral duality [75][76][77][78] of the corresponding Nekrasov partition functions, since the two sides of the duality are related to the π 2 rotation of the whole toric diagram including the choice of preferred direction. We look at different choices of "slicing" of the toric diagram and relate them to different choices of the basis in conformal field theory. One slicing direction corresponds to the "naive" basis of Schur polynomials χ A , the other -to the basis of generalized Macdonald polynomials M AB . The first set of polynomials does not have factorized q-Selberg averages and does not reproduce the Nekrasov factors, while our calculations indicate that the second one does. Schematically The last equality is a new generalization of the "factorization of averages" type of identities, studied in [74,[88][89][90].
We investigate the connection between the two sets of polynomials and introduce generalized Kostka functions K CD AB transforming one basis into the other: These functions are effectively performing the π 2 rotation of preferred direction. In more algebraic terms they are related to the abelianization map [98] acting on the basis in Ktheory of instanton moduli space.
The paper is partitioned into a set of sections with increasing level of detail and complexity. After reviewing the basic steps of the construction at the simplified level in section 2 we fill in the details and provide full-fledged formulas for the unrefined case in section 3. We then treat the refined case in section 4. We provide a summary and point out future directions in section 5.

Basic steps
In this section we introduce our approach to Dotsenko-Fateev integral expansion without q-deformation. We consider first the most simple example of four-point conformal block

JHEP02(2016)098
and show how decompose the integrand in terms of Schur polynomials. Next we consider the multi-point block and observe that a nontrivial star-chain duality is required in this case. We demonstrate this duality explicitly using skew Schur functions.

Four point conformal block, no q-deformation
In the case of four-point conformal block there are two contours of integration: C 1 stretching from 0 to 1 and C Λ stretching from 0 to Λ −1 . Therefore, the variables in the integration in eq. (1.1) are divided into two groups: x i and y i and the inter-screening pairings are decomposed into a product The vertex operator contributions also decompose into a product of two factors: Making a change of variables y i → y i Λ we can write the cross terms which we denote by µ cross (x, y) as follows: Employing the Cauchy completeness identity (1.4) we get the expansion of the cross contributions in terms of Jack polynomials: After this decomposition the DF integral becomes the double Selberg average of Jack polynomials where the averages are taken with respect to the measure µ(x|u a , v a , N a , β) . For general β the averages (2.1) do not give the Nekrasov expansion of the conformal block (a more refined basis of generalized Jack functions J AB depending on a pair of diagrams is required [88][89][90]). However, for the special case β = 1 when Jack polynomials turn into Schur functions the structure of Nekrasov sum is indeed reproduced [80][81][82][83][84][85].
Thus, from the four-point case without q-deformation we learn that decomposing the inter-screening pairings in the DF integral in terms of characters and then taking the Selberg averages produces Nekrasov representation of the conformal block. We now move to the multi-point case where the star-chain duality is required to obtain Nekrasov decomposition.

An apparent paradox
If one approaches the multipoint case in a naive way one arrives at what seems to be a paradox. The DF representation contains a product of all pairings between screening operators, i.e. an expression of the form However, the gauge theory corresponding to the multipoint comb-like conformal block is a linear quiver of the form depicted in figure 2, and its Nekrasov partition function contains only the nearest neighbour pairings: Thus the multilinear decomposition of the DF integral should also have the nearestneighbor structure. In the four-point case there are only two term in the product, so that all-with-all (star) type interaction is the same as nearest-neighbour (chain) one. But how can one decompose the multi-point product (2.3) into a sum of nearest-neighbour products, how can star become equivalent to a chain?

Skew characters
The resolution of the paradox is technically based on the properties of skew characters, where c A BC are the Littlewood-Richardson coefficients, describing multiplication of representations:

Resolution of the star/chain problem. From chain to star. Bifundamental kernel
We claim that the chain of skew characters indeed reproduces the star-like structure of the DF integrand. The basic building block of the chain decomposition is the bifundamental kernel ]. Two such kernels, averaged over the Selberg measure like N AB [y]N CD [y] , correspond to a single bifundamental field in Nekrasov partition function of the gauge theory depending on two pairs of diagrams (A, B) and (C, D). Observe that 4

JHEP02(2016)098
We start with the case of five-point conformal block. Using the identities from the previous section, we can rewrite the chain answer into the Dotsenko-Fateev (star) form: Similarly for a general (k + 2)-point conformal block: (2.15)

From star to chain
Inverting this short derivation, we see that it is an iteration of the two-step procedure, which starts from and ends at m = 2 with x = y 0 . In obvious notation: (2.16) Underlined piece goes directly to the chain-side of the identity, while the remaining multicharacter is combined with the next product (2.17)

JHEP02(2016)098
Since, whatever are the sets u and w, we get: and we are ready for the next iteration. At k = 3 this can be pictorially represented as . Dots here stand for characters, which have labels according to the points at which they are evaluated, and arrows point from χ to χ * . The arrows are labeled by the Young diagram, over which the sum is taken. The two encircled characters are evaluated at the same point, and can be transformed into one using eq. (2.6), thus fusing the two dots. The resulting trivalent vertex represents the Littlewood-Richardson coefficients, which depend on three Young diagrams. Note that only dots at the same place which are both either starting or end-points of the arrows can be merged in this way. Likewise at k = 4: The main secret behind this derivation is that the structure constants in (2.6) are always the same -do not depend on the number of "Miwa variables" y i in χ[y 0 , . . . , y m ] -which allows to merge entire collections of points and parallel arrows in the examples above. This conspiracy between characters and the structure constants adds to associativity of multiplication and together they provide the star-chain equivalence.

Factorization of Selberg averages
The "chain" decomposition of DF integrals (2.15) is also tied with the structure of the Selberg averages. More concretely, the averages of the bifundamental kernels (2.13) are given by the factorized formulas: . This factorization means that expansion of the DF integrand in terms of the bifundamental kernels N AB indeed reproduces the Nekrasov decomposition.
In the next section we will compute the q-deformed averages and show how to decompose them even further to obtain topological vertices.

Complete formulas for t = q
In this section we flesh out the basic formulas introduced in the previous section and incorporate q-deformation into our framework. After q-deformation, we obtain the natural identification of DF integral decompositions with topological vertices. We start with especially symmetric example of the four-point conformal block of q-Virasoro algebra and then consider multi-point blocks. We calculate q-deformed Selberg averages of the skew characters and identify the elements of the multilinear decomposition with topological string amplitudes.

Four point conformal block (t = q)
The origin of the quadrilinear expansion of the four point conformal block is straightforward to see: two diagrams come from the character decomposition and two more represent the two integration contours in the DF integral (which becomes a sum in the q-deformed case [74]). The corresponding toric diagram is depicted in figure 4 and the four diagrams are denoted by A, B, R + and R − . The DF representation is given by the sum over DF poles labelled by two partitions R ± [94-96] 5 (see appendix E for details):

JHEP02(2016)098
The contribution of the q-Selberg measure µ(x|u, v, N, can be evaluated explicitly and is written as follows: j=1 y n j and we have employed the Cauchy identity and the identity Collecting all the contributions one obtains Using the identities where is the open topological string amplitude for the resolved conifold. Pictorially S AB (Q) is given by one corner of the toric diagram from figure 4. It is also equal to the Chern-Simons (or WZW) S-matrix. Figure 4. Toric diagram corresponding to the four-point q-deformed conformal block and 5d U(2) gauge theory with four fundamentals.

JHEP02(2016)098
Using the AGT relations (A.5) one immediately obtains the identification between the Kähler parameters of the toric Calabi-Yau, CFT and the gauge theory parameters: Let us state once more the result for the four-point q-deformed conformal block for t = q. This block can be simultaneously decomposed in two ways: DF integral and the decomposition in terms of the complete basis of states. Using the simplest choice of basis states (Schur functions) one gets a symmetric quadri linear decomposition in terms of characters. Moreover, this decomposition is naturally identified with the corresponding topological string amplitude, computed using the topological vertex technique. We now move on to describe the multipoint case.

Multipoint (t = q)
In section 2.2.3 we understood the star-chain transformation for ordinary DF integrals. The q-deformed case goes along the same lines. Also, as in the four-point case above, we obtain a natural interpretation of the objects featuring in the decomposition from the point of view of the topological strings.
Using the star-chain relation we rewrite the Vandermonde measure in the multipoint DF integral as a sum over chains of skew Schur functions. We consider the corresponding expansion of the k-point DF integral in terms of k q-deformed Selberg averages of skew Schur functions (cf. eq. (2.15)): Figure 5. Toric diagram corresponding to bifundamental field in the Nekrasov function. It is also equal to q-deformed Selberg average of two bifundamental kernels as in eq. (3.8).
where . . . ua,va,Na,q,q denotes the q-Selberg average with the corresponding parameters and Y 0 = Y k = (∅, ∅). Each average depends on two pairs of Young diagrams Y a−1 , Y a and corresponds to the element of the toric diagram depicted on figure 5. Notice that a certain U(1) factor appears in the left hand site. It can be nicely eliminated in the four-point case, though not for higher multipoints.
In the next section we show that each average in eq. (3.8) indeed reproduces the bifundamental part of the Nekrasov function. The whole sum thus becomes the Nekrasov function for linear quiver gauge theory, of the form depicted in figure 2.

Factorization of averages
Let us check that the DF averages of the bifundamental kernel N AB [x] indeed factorizes. To do it we use the loop equations, which are given in appendix B. We obtain a formula for the average of four Schur polynomials:

Identification with topological strings
We would like to further decompose the q-Selberg average in eq. (3.9) to observe the structure of the corresponding topological string amplitude from figure 5. Notice that each average contains a product of two bifundamental kernels N AB [x]. This corresponds to the product of two four-point functions each having the form: where Q 2 = q N . Recall the expression for the q-deformed Selberg measure (3.3), which consists of two Schur polynomials. The product of two four-point amplitudes (3.13) therefore gives exactly the product of q-Selberg measure with two bifundamental kernels as in the average (3.8). More explicitly, gluing two amplitudes (3.13) one obtains the amplitude from figure 5, which is given by: where Q 1 = q −N −v , Q 2 = q N , Q F = q u+v+N −1 and S u,v,N,q,q is the q-Selberg integral without character insertions. Notice how in the last equality we have used the fact that the q-Selberg averages can be calculated as sums over partitions R with the measure given JHEP02(2016)098 Figure 6. Toric diagram corresponding to "half" of the DF integrand for the five-point conformal block. It also give the spectral dual Nekrasov expansion of the corresponding linear quiver gauge theory with gauge group U(2) 2 .
by the product of two Schur functions, as in eqs. (3.1), (3.3) (see also appendix E for details). Thus the sum over R is replaced with the q-Selberg average in the last line of eq. (3.14). Thus, the DF average of four Schur functions is the same as the topological string amplitude on two resolved conifold geometries glued together. Moreover, we explicitly identify the sum over intermediate states residing on the vertical edge of the diagram on figure 5 with the DF q-integration.
What corresponds to the whole DF integrands on the topological string side? One uses the star-chain relation (2.14) to glue together a chain of bifundamental kernels and obtain the Vandermonde determinant, the main constituent of the DF integrand. This corresponds to gluing the topological string amplitudes (3.13) together as depicted in figure 6.
Performing the sums one gets the following expression for the glued amplitude: Eq. (3.15) gives exactly half of the terms in the DF integrand evaluated at discrete points (for details see appendix E). The whole integrand consists of the q-Selberg measure (3.3), which includes two Schur functions, and the "cross term" (3.4), which is given by a square of the Vandermonde determinant. The other half of the terms arises from the lower half of JHEP02(2016)098 the toric diagram, so that the total integrand is obtained as in figure 3: (3.16)

Refinement
In this section we lift the previous results to the case of t = q. In this setting topological string theory requires refinement. There exist two essentially equivalent forms of the refined topological vertex, IKV [69,70] and AK [71,72]. The two versions are related by a simple change of basis, so that the answer for any closed string amplitude is the same in both computations. However, open string amplitudes must be transformed by matrices, attached to each external leg of the diagram. We use IKV vertex throughout this paper since it seems to be more convenient for comparison with the results in the unrefined case. Refinement introduces a preferred direction and breaks the cyclic (rotation) invariance of each individual topological vertex. However, slicing invariance hypothesis states that the whole closed string amplitude remains invariant under rotations of the diagram, or equivalently under the change of the preferred direction.
In this section we elucidate the mechanism of slicing invariance by computing the partition function for vertical and horizontal slicings. We set the preferred direction to be vertical. We observe that while the horizontal slicing indeed reproduces the DF sum (and the corresponding spectral dual Nekrasov decomposition [75][76][77][78]), the vertical slicing does not give the factorized terms of the Nekrasov function. It requires a further change of basis from Schur functions to generalized Macdonald polynomials. Moreover, unlike the change of basis, which transforms the two types of refined topological vertices, this change of basis is "nonlocal", i.e. it does not factorize into a product of matrices each rotating its own external leg of the diagram. The matrix depends on the whole array of states on the parallel external legs of the diagram as well as on the distances (Kähler parameters) between the legs.
The total matrix of the transformation is a certain triangular matrix depending on the Kähler modulus for each external line. It is natural to call this matrix generalized Kostka function by analogy with the ordinary Kostka polynomials, which are the transition coefficients between Schur and Macdonald polynomials. We therefore explicitly identify the transformations corresponding to the change of preferred direction. Algebraic meaning of these transformations will be investigated elsewhere.

q-Selberg measure
Let us first write down the refinement of eq. (3.4), i.e. express the q-Sleberg measure for t = q as a product of Macdonald polynomials. We recall [74] that the Jackson q-integral is JHEP02(2016)098 in fact a sum with x i taking discrete values x R,i = q R i +1 t N −i where R i are the columns of a Young diagram. The q-Selberg measure µ(x|u, v, N, evaluated at x i (R) can be nicely expressed through Macdonald polynomials: (4.1) Notice the following useful symmetry We will use this form of the Selberg measure to identify the DF integrals of the qdeformed CFT with the amplitudes of the topological string on toric CY backgrounds.

Generalized bifundamental kernel
Having understood the measure of the q-Selberg integrals in terms of Macdonald polynomials, we now proceed to describe what is being averaged in the Nekrasov decomposition of the conformal block. Recall that to obtain the chain or quiver-like decomposition of the block one needs to choose a special basis of intermediate states, so that the matrix elements reproduce the individual terms of the Nekrasov partition function. For the unrefined case this basis was simply given by the product of Schur polynomials, and the matrix elements were give by q-Selberg averages of two bifundamental kernels N AB [x] (as in eq. (3.9)). For the refined case the basis is more elaborate: it is given by generalized Macdonald polynomials, which depend on two Young diagrams and do not factorize into products of two polynomials. The relevant matrix elements are given by the q-Selberg average of what we call generalized bifundamental kernel N AB,CD , a convolution of two generalized Macdonald polynomials:

JHEP02(2016)098
where ||M (q,t) is the norm of Macdonald polynomials and generalized skew Macdonald polynomial is given by 6 M (q,t) AB (Q|p n ,p).
One can immediately notice that for t = q N (q,q) exactly reproducing the unrefined case (3.9). Generalized Macdonald polynomials are obtained from the kernel by forgetting about one of the two pairs of Young diagrams: One can also get the product of two ordinary Macdonald polynomials by setting the two "cross-wise" diagrams to be empty: The most remarkable property of the generalized bifundamental kernel is that its q-Selberg average is factorized into a product of simple monomials (B.10). More concretely, it is given by the bifundamental contribution to the Nekrasov function (hence the name of the kernel). Schematically . (4.7) Averages of this kind can be obtained by using the loop equations for q-Selberg integral (or (q, t)-matrix model). The full form of the average (4.7) and technical details are summarized in appendix B. Thus, we prove that generalized bifundamental kernel is indeed the relevant object to be averaged to get the chain-like decomposition of the DF integral. Let us now try to find similar objects in refined topological strings.

Vertical slicing
We start from the refinement of the basic building block, i.e. the four-point amplitude (3.13) and set preferred direction to be vertical. The general refined amplitude depending on four Young diagrams is given by eq. (C.1). For our purposes we need the following specializations: and To make contact with DF integrals we make the identification We immediately notice that two Macdonald polynomials in eqs. (4.8) and (4.9) each give precisely one "half" of the q-Selberg measure (4.1).

JHEP02(2016)098
Skew Schur functions in eqs. (4.8), (4.9) can be rewritten through the discrete q-Selberg "integration" variables x R,i = q R i +1 t N −i in the following way: (4.11) Let us glue two four-point functions (4.8) and (4.9) to obtain the q-Selberg average: where S u,v,N,q,t is the q-Selberg integral without insertions. We have used the identity (4.1) to obtain the q-Selberg measure evaluated at discrete points labeled by R from the product of two Macdonald functions, and made the identification Q F = q u+v+ 1 2 t N − 3 2 . The sum over representations R corresponds to the q-Selberg average as shown in appendix E. Notice also that the two pairs of Schur functions under the average are skew, just as in the definition of the bifundamental kernel (2.13), and should be summed over the "intermediate" representations E and F .
At this point one observes that the expression under the average is not the generalized bifundamental kernel (4.3), which would give the bifundamental contribution as an average. Instead it is simply a product of two pairs of Schur polynomials. However, closer look reveals that the arguments of the Schur polynomials exactly match (up to the factors 1−t n 1−q n ) the arguments of the generalized bifundamental kernel after the elementary transformation as can be seen e.g. from eq. (B.11). If we could expand the generalized Macdonald polynomials in terms of Schur polynomials with the same arguments, this would produce a transformation between the expression under the average in eq. (4.12) and the average of generalized bifundamental kernel (4.3). This average (but not the original one in eq. (4.12)) in turn is given by the bifundamental Nekrasov function, as shown in eq. (4.7) and in appendix B.
Going further, we notice that the bifundamental Nekrasov contribution is given by the refined topological amplitude with horizontal preferred direction, whereas the preferred direction is vertical in the diagrams (4.8), (4.9) and thus in the average (4.12). This leads us to the relation between horizontal and vertical slicing of the refined amplitude. To get this relation we will need to introduce generalized Kostka functions, which are the expansion coefficients of the generalized Macdonald polynomials in terms of Schur polynomials.

Generalized Kostka functions
The basis of generalized Macdonald polynomials can be reexpanded in terms of Schur polynomials: 14)

JHEP02(2016)098
where the coefficients K AB CD (Q, q, t) can naturally be called generalized Kostka functions by analogy with the ordinary Kostka polynomials, 7 defined as As an explicit example we give here generalized Kostka functions for the first level: We would like to use generalized Kostka functions to transform the two pairs of Schur polynomials inside the average in eq. (4.12) into two generalized Macdonald polynomials and thus obtain the bifundamental kernel. The Schur functions in eq. (4.12) are skew and are summed over the "intermediate" representations E and F , so we use the following identity, which is the consequence of the Cauchy completeness theorem, to transform the sum over Schur polynomials into that over Macdonald ones: . 7 Our definition of generalized Kostka functions can be modified slightly to turn them into polynomials. This is achieved by using a different normalization of generalized Macdonald polynomials, called M (q,t) AB in eqs. (19), (20) in [74].

JHEP02(2016)098
Eventually, we obtain the connection between refined topological string amplitude with vertical slicing and bifundamental Nekrasov function: .

(4.19)
Note that generalized Kostka functions in this formula depend on the "distance" (in the sense of Kähler parameters) between the pairs of horizontal external legs of the toric diagram. Let us also point out that our Kostka functions are q-deformation of the coefficients of the abelianization map acting on the instanton moduli space.

Horizontal slicing. DF representation and spectral dual Nekrasov function
Let us glue three pieces (4.8) together horizontally to obtain the DF integrand for five-point conformal block and its AGT dual -U(2) 2 quiver gauge theory. The resulting amplitude is equal to "half" of the total DF measure µ DF (x (1) , x (2) , x (3) ) evaluated at discrete points x a,i = q R a,i +1 t Na−i . We get: where Z ∅ (Q) = Z ∅ ∅ ∅ ∅ Q, q, t . This is a manifestation of the spectral duality for Nekrasov functions [75][76][77][78]: while vertical slicing of the toric diagram gives Nekrasov function for U(2) 3 quiver gauge theory, the horizontal slicing yields its spectral dual -gauge theory with a single U(3) gauge group. In the language of conformal blocks [74] this means that both the Jackson integral and the sum over complete basis of generalized Macdonal polynomials have the form of Nekrasov decompositions, which are spectral dual to each other. For refined topological strings only one Nekrasov decomposition can be obtained for a given choice of preferred direction -the cut should dissect the preferred edges. If one cuts along a different direction the amplitudes do not reproduce the Nekrasov  be seen in eq. (4.12). However, there is still a way to see the dual decomposition: preferred direction can be changed with the help of generalized Kostka functions (4.16), (4.17).

Conclusions and discussion
We have investigated the connection between q-deformed conformal blocks and topological strings. This connection arises in the following way. Due to the AGT relation conformal blocks are equal to Nekrasov partition functions, which can be obtained by the geometric engineering technique, as compactifications of type IIA strings (or, more generally, Mtheory) on toric CY threefold. String partition function on the threefold is equal to partition function of topological strings. We obtain an explicit dictionary between the objects in CFT and elements of the corresponding toric diagram, summarized in table 1. For the case of t = q we introduce the bifundamental kernel (2.13), compute its q-Selberg averages (2.20) and show that they reproduce Nekrasov partition function. We also study spectral duality of conformal blocks and generalize the statements of [74] to multipoint blocks. Most importantly, we study the ever-troublesome case of t = q, where we introduce generalized bifundamental kernel (4.3). We compute the average of the generalized kernel -it satisfies the most general of all the so far encountered "factorization of averages" type identities (B.10) -and is again given by Nekrasov function. We interpret the change of preferred direction of refined topological strings as a change of basis between generalized Macdonald and Schur polynomials, which is performed by generalized Kostka functions (4.13), (4.14).
Of course the expansion we have considered is not limited to the case of U(2) gauge theories and Virasoro conformal blocks. U(N )/W N story goes along the same lines. In this setting q-Selberg integrals are replaced by the A N q-Selberg integrals, their measure being given by the product of several basic building blocks (C.1). Generalized Macdonald polynomials, bifundamental kernels and Kostka functions can also be found for the U(N ) case.
It would be extremely interesting to understand the relation of the character/topological string decomposition of conformal blocks from the point of view of Seiberg-Witten integrable systems. One relation is provided by the quantum spectral curve for DF integrals [97], which in Nekrasov-Shatashvili limit reproduces the quantum spectral curve (Baxter TQ equation) of the relevant Seiberg-Witten system, the XXZ spin chain. Of course, a general method to obtain quantum spectral curves from the toric data is desir-

JHEP02(2016)098
able. Let us also mention that in this way one can study the mirror symmetry between the B-model CY, encoded in the spectral curve and the A-side toric CY described by the topological vertex formalism.
In the four dimensional limit generalized Kostka polynomials coincide with the coefficients of the abelianization map acting on the fixed points in the cohomology of the instanton moduli space. Explicit combinatorial expressions for these coefficients were obtained in [98]. It would be interesting to understand these formulas from the point of view of refined topological strings.
The product of generalized Kostka matrices turns out to be an interesting algebraic object. We can reason in the following way. Let us first expand generalized Macdonald polynomials in terms of products of Schur polynomials using the Kostka matrix. Then we exchange the two Schur polynomials and apply the reverse Kostka transformation. Thus we obtain another set of generalized Macdonald polynomials. However the two sets are clearly related. Recall that generalized Macdonald polynomials are eigenfunctions of the operator H gen 1 = ∆(H 1 ), which is given by the Ding-Iohara coproduct, acting on trigonometric Ruijsenaars Hamiltonian H 1 . The second set of generalized Macdonald polynomials is obtained by acting on the same Ruijsenaars Hamiltonian with the opposite coproduct ∆ op . As in any quasitriangular Hopf algebra, there is an R-matrix performing the transformation from one coproduct to the other. The two sets of generalized Macdonald polynomials are therefore also related by the same R-matrix. This is the K-theoretic version of the instanton R-matrix [99,100] with spectral parameter being the parameter of generalized Macdonald polynomials. The implications of this observation and the relation between toric CY and integrable systems will be studied elsewhere.

JHEP02(2016)098
We will write a instead of a = (a, −a) for N = 2. The AGT relations for N = 2 are: where a 1 = −a 2 = a. Masses m a , vevs a i , radius R 5 of the fifth dimension and 1,2 all have dimensions of mass. In this paper we set the overall mass scale so that 1 = −b 2 , 2 = 1 and q = e −R 5 . The t parameter in Macdonald polynomials is related to q by t = q β with β = b 2 . More generally, one can consider quiver gauge theories with gauge groups U(N ) k and bifundamental matter hypermultiplets as shown in figure 2. The corresponding Nekrasov function is where the bifundamental contribution is given by

B Loop equations for matrix elements
We would like to compute the q-Selberg average of a function f (p n ) which is polynomial both in p n and p −n . To do this we use an improved version of the loop equations obtained in [74]. Concretely, we use the fact that the q-integral of a total q-derivative vanishes:

JHEP02(2016)098
if g(1) = g(0) = 0. We write down the following judiciously chosen total derivative: 2) The difference with [74] is that we assume f (p n ) to be a Laurent polynomial, i.e. the function of p n for n both positive and negative. Writing down the action of the q-derivative in eq. (B.2) we get the following identity: The expression in the average in eq. (B.3) looks complicated and not too suitable for explicit calculations. However, expanding in powers of z and taking f (p n ) to run over products of p n (with n both positive and negative) one gets the recurrence relations determining the averages of any symmetric function. Let us note that the expansion in positive and negative powers of z lead to the same recurrence relations as it should. In addition to the usual factorized formulas for the generalized Macdonald polynomials these equations give the averages of the products of two Macdonald polynomials, one in p n the other in p −n , e.g.:

JHEP02(2016)098
One can also transform the averages of positive power sums p n to negative ones p −n and vice versa: which leads to We remind the result from [74]: . (B.8) We also give an alternative average of generalized Macdonald polynomial (notice the difference in shifts of the power sums p n ) . (B.9) Finally, we were able to find the most general factorized formula for the average of two generalized Macdonald polynomials (or generalized bifundamental kernel N (q,t) AB,CD (u, v, N |x)), which gives all the averages above as special cases: 8 8 We have checked this formula up to the third level.

C Open topological string amplitude on resolved conifold
In this appendix we write down the basic building block of the toric diagrams related to 5d quiver gauge theories. It is given by an open refined topological string amplitude in the resolved conifold background depicted in figure 7.
Using the IKV refined topological vertex one gets the following answer for this amplitude: is the closed refined string amplitude on the conifold.
One can perform a flop transformation on the conifold geometry. We employ the following symmetry of the closed string amplitude: (C. 2) The flopped open string amplitude is related to the original amplitude with Kähler parameter reversed: where in the right hand side the original Kähler parameter of the conifold is reversed and the Kähler parameters of the two-cycles adjacent to the flopped conifold are shifted by Q.

D Useful identities
One has the following identity for the power sum symmetric functions p n (x) = i≥1 x n i : where ρ i = 1 2 − i and Y is a Young diagram. Macdonald polynomials satisfy the following "transposition" identities:

JHEP02(2016)098
where the contour C a encircles the points x i = z a q m t n for n, m ≥ 0, and t = q β , (E.2) and N = M a=1 N a . As shown in [94][95][96], the poles of the integrand are labeled by M -tuples of Young diagrams R a , a = 1, . . . , M , i.e. x a,i = x a,i ( R) = z a q R a,i t Na−i , i = 1, . . . , N a so that the integral is reduced to the sum over residues. One can compute the ratio of the residues corresponding to the given set of diagrams R a and the set of empty diagrams {∅, . . . , ∅}: (E. 3) The first term is an inessential normalization constant N , which can be calculated separately. One can evaluate the ration of the residues by simply evaluating the integrands at the poles: Since there are only N a variables x a,i ( R), the sum in eq. (E.4) is actually over the partitions R a having at most N a columns. The ratio of the integrands turns out to be given by the Nekrasov formula for the SU(M ) gauge theory with 2M fundamental hypermultiplets depending on the M -tuple of partitions R [94][95][96]. The vacuum moduli and masses of the gauge theory are related to the momenta of the primary fields in the conformal block, which can be expressed in terms of u, v a and N a . In particular, since N a are integers, the gauge theory is at a particular point in the vacuum moduli space, where a k + m i are integers. At this point the contributions of the fundamental hypermultiplets vanish for all partitions R a having more than N a columns, which conforms with the DF result. Now we consider the Jackson integral version of the DF representation: The Jackson integral is defined as follows We assume that the parameters β = ln t ln q , u and v a are positive integers, so that the integrand turns into a (Laurent) polynomial: (E.7)

JHEP02(2016)098
In this case all the integrals are well-defined geometric progressions, and evaluating them amounts to evaluating the integrand at discreet points x a,i (n a,i ) = z a q n a,i with n a,i ∈ N: B M +2 · B U(1) = n a,i ≥0 ∆ (q,t) (x( n))V u (x( n), 0)V va (x( n), z a ), (E.8) One immediately notices that some terms in the sum vanish, e.g. if n a,i = n a,j , then ∆ (q,t) (x) = 0. More generally, for ∆ (q,t) not to vanish, the corresponding n a,i and n a,j should differ at least by β. This gives rise to the following form of n a,i for nonvanishing terms: x i,a (R a ) = z a q R a,i +(Na−i)β , (E.9) where R a are Young diagrams (we have used the symmetry of the integrand and chosen a particular ordering of x a,i ). The sum in eq. (E.8) is reduced to the sum over M -tuples of Young diagrams. Of course one can rewrite this sum using the same trick as in eq. (E.3): . (E.10) We arrive at the same sum over Young diagrams R a (each with no more than N a columns) as in eq. (E.4), obtained from contour integrals. Thus, the two approaches to the DF integrals give exactly the same decomposition, leading to a sum over Young diagrams. In the main sections of the paper we relate this sum to the sum in the topological vertex formalism.