1 Introduction

The Seiberg–Witten theory [2, 3] provides an illuminating geometrical description of the Coulomb branch of the moduli space of vacua \(\mathcal {M}_{\text {vacua}}\) of the four-dimensional \(\mathcal { N}=2\) gauge theory: the space \(\mathcal {M}_{\text {vacua}}\) is the base of a certain algebraic integrable system associated to the 4d \(\mathcal {N}=2\) gauge theory [4,5,6,7]. The abelian varieties appearing in the fibers of the algebraic integrable system can be realized as Jacobian (Prym) varieties of certain spectral algebraic curve called Seiberg–Witten curve.

A typical example of an integrable system associated to \(\mathcal {N}=2\) gauge theory is the affine \(\mathsf {n}\)-particle Toda model associated to the pure vector \(\mathcal {N}=2\) \(U(\mathsf {n})\) gauge multiplet. Another example is the classical limit of SU(2) rational r-matrix spin chain, which is associated to \(U(\mathsf {n})\) theory with \(\mathsf {n}_{\text {f}} = 2\mathsf {n}\) fundamental matter hypermultiplets [8].

For \(\mathcal {N}=2\) gauge theory with the gauge group \(\times _{i} U(\mathsf {n}_i)\), and with matter hypermultiplets in the fundamental and bifundamental representations, encoded by a quiver graph \(\Gamma \), the corresponding integrable system is the integrable system of monopoles on \(\mathbb { R}^2 \times S^1\) with gauge group \(G_{\Gamma }\), whose Dynkin diagram is given by the graph \(\Gamma \) [9, 10]. Quantization of this integrable system is described by means of the Yangian algebra \(\mathbf {Y}(\mathfrak {g}_{\Gamma })\), which is also underlying symmetry algebra of rational r-matrix \(\mathfrak {g}_{\Gamma }\) spin chain.

Similarly, the correspondence holds for 5d \(\Gamma \)-quiver gauge theory compactified on \(S^1\), or 6d \(\Gamma \)-quiver gauge theory compactified on \(T^2\): the respective integrable system is the integrable system of \(G_{\Gamma }\)-monopoles on \(\mathbb { R}\times T^2\) (integrable \(\mathfrak {g}_{\Gamma }\)-spin chains with trigonometric r-matrix) or \(G_{\Gamma }\)-monopoles on \(T^3\) (integrable \(\mathfrak {g}_{\Gamma }\)-spin chains with elliptic r-matrix).

The quantization of the algebraic integrable system with Planck parameter \(\hbar \) corresponds to the equivariant deformation \(\mathbb { R}^{4}_{\epsilon _1, \epsilon _2}\) of the space-time of the gauge theory [11, 12] in the limit \((\epsilon _1,\epsilon _2) = (\hbar , 0)\), and the supersymmetric vacua of the gauge theory on \(\mathbb { R}^{4}_{\hbar ,0}\) are identified with the spectrum of quantum integrable system [13, 14].

After quantization the classical spectral curve (Seiberg–Witten curve) is promoted to the Baxter’s TQ-relation (for linear chain quivers), or, more generally, to the equation that states that the q-character [15] evaluated on a certain element of quantum affine algebra is a polynomial function of the spectral parameter  [16]. The polynomiality conjecture of [15] has been proven in [17].

The polynomial equation still holds for generic equivariant parameters \((\epsilon _1, \epsilon _2)\) if the q-character is replaced by a certain algebraic object. This object is called \(q_1q_2\)-character in [18], and in [1] this object was shown to be a generating current of \(W_{q_1, q_2}(\mathfrak {g}_{\Gamma })\) algebra of [19], a generalization of q-Virasoro algebra of [20, 21]. (See also [22] for realization of qq-character as a defect partition function).

The gauge theory construction naturally involves bifundamental mass parameter \(\mu _e\) assigned to each quiver edge \(e \in \Gamma _1\). The cohomology class \([\mu ] \in H^{1}(\Gamma , \mathbb { C}^{\times })\) is a non-trivial parameter of the algebra (not considered in [19]).

The construction of the algebra \(W_{q_1,q_2}(\mathfrak {sl}_{r+1})\) associated to quiver gauge theory with r nodes explains the 5d version [23] of the AGT relation [24] for linear \(sl_{r+1}\)-type quivers, with \(U(n)^{r}\) gauge group, when combined with \(r \leftrightarrow n\) duality [25] of topological string partition function computed by topological vertex [26,27,28,29]. (See also manifestation of the above duality as a spectral duality of integrable systems [30].)

In this paper, we generalize our construction [1] to the case of elliptic W-algebra using a six-dimensional quiver gauge theory compactified on a two-torus \(\check{T}^2\). Equivalently, under the T-duality for an affine ADE quiver \(\Gamma \), this gauge theory is realized on a stack of fractional D3 branes in IIB string theory on \(\mathbb { R}^{4} \times T^2 \times \mathbb { R}^{4}/\tilde{\Gamma }\). Here \(\mathbb { R}^{4} / \tilde{\Gamma }\) is the ADE singularity where \(\tilde{\Gamma } \subset SU(2)\) is McKay associated discrete subgroup, and \(T^2\) is the dual torus to \(\check{T}^2\); see [10] for more details. The complex integrable system remembers only the complex structure of the torus \(T^2\). We denote by \(p = e^{2 \pi \imath \tau }\) the multiplicative modulus of the underlying elliptic curve, so that as a complex variety the compactification torus \(T^2\) is isomorphic to \(\mathbb { C}^{\times }/ p^{\mathbb { Z}}\) or to \(\mathbb { C}/(\mathbb { Z}+ \mathbb { Z}\tau )\). The multiplicative spectral parameter \(x \in \mathbb { C}^{\times }/ p^{\mathbb { Z}}\) is periodic

$$\begin{aligned} x \simeq p x \end{aligned}$$
(1.1)

Our construction is similar to the case of the 5d gauge theory compactified on a circle \(S^1\) [1], and thus is applicable to generic quiver in principle. However, because of the modular anomalies, we find satisfactory physical interpretation only for ‘conformal’ quivers, those are the quivers for which the corresponding 4d \(\mathcal {N}=2\) theory is conformal.

Recently, the elliptic deformation of W-algebra for A-type quivers has been also discussed in the context of topological string and supersymmetric gauge theory in [31, 32] and in  [33,34,35,36]. See also [37,38,39,40] for elliptic generalizations. Our construction generalizes these results to generic quiver.

2 Elliptic quiver gauge theory

2.1 Quiver

We use the notations of [1].

Let \(\Gamma \) be a quiver with the set of nodes \(\Gamma _0\) and the set of edges \(\Gamma _1\). The nodes are typically labeled by \(i, j \in \Gamma _0\). For an edge e we denote its source node by s(e) and its target node by t(e) or write \(e: i \rightarrow j\).

A quiver \(\Gamma \) defines \(|\Gamma _0| \times |\Gamma _0|\) matrix \((c_{ij})\)

$$\begin{aligned} c_{ij} = 2 \delta _{ij} - \#(e : i \rightarrow j) - \#(e : j \rightarrow i) \,, \end{aligned}$$
(2.1)

called the quiver Cartan matrix, which is symmetric. If there are no loops, all the diagonal elements are equal to 2, and such a matrix defines Kac–Moody algebra \(\mathfrak {g}(\Gamma )\) with Dynkin diagram \(\Gamma \).

2.2 Elliptic index

The six-dimensional Nekrasov’s partition function is defined by the elliptic index of the instanton moduli space. Let \(\tau \) be the modulus of the torus on which a six-dimensional theory is compactified, and put \(p = e^{2\pi \iota \tau }\). The elliptic index functor \(\mathbb {I}_p\) converts additive Chern character class to the multiplicative elliptic class

$$\begin{aligned} \mathbb {I}_p \left[ \sum _{i} x_i \right] = \prod _{i} \theta (x_i^{-1};p) \end{aligned}$$
(2.2)

where the short Jacobi theta function is

$$\begin{aligned} \theta (x;p) = (x;p)_\infty (px^{-1};p)_\infty = \exp \left( - \sum _{m \ne 0} \frac{x^m}{m(1-p^m)} \right) . \end{aligned}$$
(2.3)

We assume \(p < 1\) in this paper. Notice that our conventions are different from Ref. [16], which uses another version of theta function

$$\begin{aligned} \theta _1(x;p) = \iota p^{\frac{1}{8}} (p;p)_\infty x^{-\frac{1}{2}} \theta (x;p) . \end{aligned}$$
(2.4)

The index functor behaves under the reflection as follows,

$$\begin{aligned} \mathbb {I}_p \left[ \mathbf {X}^\vee \right] = {\left\{ \begin{array}{ll} \displaystyle (-1)^{{{\mathrm{rk}}}\mathbf {X}} \left( \det \mathbf {X}\right) \mathbb {I}_p \left[ \mathbf {X}\right] &{} (\theta \text {-version}) \\ \displaystyle (-1)^{{{\mathrm{rk}}}\mathbf {X}} \mathbb {I}_p \left[ \mathbf {X}\right] &{} (\theta _1\text {-version})\\ \end{array}\right. } \end{aligned}$$
(2.5)

because of

$$\begin{aligned} \theta (x;p)&= (-x) \, \theta (x^{-1};p) . \end{aligned}$$
(2.6)

In the 5d limit the two versions correspond to the Dolbeault vs Dirac conventions. In this paper we will use the Dolbeault convention.Footnote 1 In the limit \(p \rightarrow 0\), the 6d index is reduced to the 5d index

$$\begin{aligned} \lim _{p \rightarrow 0} \theta (x^{-1};p) = 1 - x^{-1} \,. \end{aligned}$$
(2.7)

For conformal quivers the two versions are equivalent.

To construct W-algebras from quiver gauge theory, we need to incorporate the higher time variables [47], so that the gauge theory partition function becomes a generating function of the observables. The fixed points are labeled by partitions \((\lambda _{i,\alpha ,k})_{\alpha \in [1\ldots \mathsf {n}_i], \, k\in [1\ldots \infty ]}\). We introduce a set of variables

$$\begin{aligned} \mathcal { X}_i = \{ x_{i,\alpha ,k} \}_{\alpha \in [1\ldots \mathsf {n}_i], \, k\in [1\ldots \infty ]} \,, \qquad x_{i,\alpha ,k} = \nu _{i,\alpha } q_1^{k-1} q_2^{\lambda _{i,\alpha ,k}} \,, \qquad \mathcal { X}= \bigsqcup _{i \in \Gamma _0} \mathcal { X}_i\nonumber \\ \end{aligned}$$
(2.8)

where \(\mathsf {n}_i \in \mathbb { Z}_{\ge 1}\) is the rank of gauge group \(U(\mathsf {n}_i)\) assigned to the node \(i \in \Gamma _0\), and \((\nu _{i,\alpha })_{i\in \Gamma _0, \, \alpha \in [1\ldots \mathsf {n}_i]}\) are the exponentiated Coulomb moduli parameters. Let \(\mathsf {i}: \mathcal { X}\rightarrow \Gamma _0\) be the node label such that \(\mathsf {i}(x) = i\) for \(x \in \mathcal { X}_i\). The time variables give rise to the potential term in the partition function

$$\begin{aligned} \exp \left( \sum _{m=1}^\infty t_{i,m}^{(\pm )} \mathbf {Y}_i^{[\pm m]} \right) \end{aligned}$$
(2.9)

where \( \mathbf {Y}_i^{[m]}\) are fundamental observables of the quiver gauge theory [10, 16]

$$\begin{aligned} \mathbf {Y}_i^{[m]} = \frac{1 - q_1^m}{1 - p^m} \sum _{x \in \mathcal { X}_i} x^m \,. \end{aligned}$$
(2.10)

with the notation \(\mathbf {Y}_i^{[-m]} = (\mathbf {Y}_i^{[m]})^\vee \). Notice that we need to introduce twice as many time higher time variables compared to the 5d case [1], which is reflected by the extra plus/minus label. This is the specifics of the elliptic algebras [45, 48].

2.3 Partition function

The extended partition function \(Z_{\mathsf {T}}(t)\) can be computed using the localization formula for the \(\mathsf {T}\)-fixed points in the moduli space \(\mathfrak {M}\), characterized by a set of partitions \(\lambda \) [12]:

$$\begin{aligned} Z_\mathsf {T}(t)&= \sum _{\mathcal { X}\in \mathfrak {M}^\mathsf {T}} \exp \left( - \sum _{(x_L,x_R)\in \Lambda ^2 \mathcal { X}} \sum _{m \ne 0} \frac{1 - q_1^m}{m(1 - p^m)(1 - q_2^{-m})} \left( c^+_{\mathsf {i}(x_L),\mathsf {i}(x_R)}\right) ^{[m]} \frac{x_R^m}{x_L^{m}} \right) \nonumber \\&\quad \times \exp \left( \sum _{x \in \mathcal { X}} \left( \log \mathfrak {q}_{\mathsf {i}(x)} \log _{q_2} \frac{x}{\mathring{x}} + \sum _{m=1}^\infty \left( \frac{1-q_1^m}{1-p^m} t^{(+)}_{\mathsf {i}(x),m} \, x^m + \frac{1-q_1^{-m}}{1-p^{-m}} t^{(-)}_{\mathsf {i}(x),m} \, x^{-m} \right) \right) \right) \end{aligned}$$
(2.11)

where \(\mathfrak {q}_i\) is the coupling constant for the node \(i \in \Gamma _0\), and \(\mathring{x}_{i,\alpha ,k} = \nu _{i,\alpha } q_1^{k-1} \in \mathcal { X}_0\) denotes the ground configuration corresponding to the empty partition \(\lambda =\emptyset \). The factor \(\log _{q_2} \left( x/\mathring{x} \right) \) counts the number of boxes in the partition \(\lambda \). The ‘positive’ part of the Cartan matrix is defined to be

$$\begin{aligned} c_{ij}^+&= \delta _{ij} - \sum _{e:i \rightarrow j} \mu _e^{-1} \end{aligned}$$
(2.12)

where the multiplicative bifundamental mass parameters \(\mu _e \in \mathbb { C}^\times \) are assigned to edges \(e \in \Gamma _1\), and \(\left( c_{ij}^+\right) ^{[m]}\) is obtained by replacing \(\mu _e\) with \(\mu _e^m\), which is the m-th Adams operation. In particular, the vector and bifundamental hypermultiplet contributions are given by

$$\begin{aligned} Z_i^\text {vec}&= \prod _{(x,x') \in \mathcal { X}_i \times \mathcal { X}_i} \Gamma \left( q \frac{x}{x'}; q_2, p \right) ^{-1} \Gamma \left( q_2 \frac{x}{x'}; q_2, p \right) \,, \end{aligned}$$
(2.13)
$$\begin{aligned} Z_{e:i \rightarrow j}^\text {bf}&= \prod _{(x,x') \in \mathcal { X}_i \times \mathcal { X}_j} \Gamma \left( \mu _e^{-1} q \frac{x}{x'}; q_2, p \right) \Gamma \left( \mu _e^{-1} q_2 \frac{x}{x'}; q_2, p \right) ^{-1} , \end{aligned}$$
(2.14)

where the elliptic gamma function is defined

$$\begin{aligned} \Gamma (x;p,q)&= \exp \left( \sum _{m \ne 0} \frac{x^m}{m(1-p^m)(1-q^m)} \right) . \end{aligned}$$
(2.15)

Fundamental matter can be realized by a shift of higher time variables. To add a fundamental factor with mass parameter \(\mu \in \mathbb { C}^\times \) to the node \(i \in \Gamma _0\) one should shift

$$\begin{aligned} t_{i,m}^{(\pm )} \ \longrightarrow \ t_{i,m}^{(\pm )} \pm \frac{\mu ^{\mp m} q^{\pm m}}{m(1-q_1^{\pm m})(1-q_2^{\pm m})} . \end{aligned}$$
(2.16)

As mentioned in Sect. 3.5, this shift of t-variables is equivalent to inserting a vertex operator. See also [31, 49].

In contrast to 4d and 5d theories, the matter content of 6d theory is restricted due to the gauge anomaly, which is directly related to the modularity of elliptic theory. The theory is anomaly free if for all nodes \( i \in \Gamma _0\)

$$\begin{aligned} c_{ij} \mathsf {n}_{j} = \mathsf {n}_{i}^{\text {f}} + \tilde{\mathsf {n}}_i^\text {f} \end{aligned}$$
(2.17)

where \(c_{ij}\) is the Cartan matrix associated with the quiver diagram \(\Gamma \) (2.1), and \(\mathsf {n}_i^\text {f}\) and \(\tilde{\mathsf {n}}_i^\text {f}\) are the numbers of fundamental and antifundamental multiplets for the node i. The phase space of the algebraic integrable system associated to the Coulomb branch of the 6d theory compactified on \(\check{T}^{2}\) is the moduli space of \(G_{\Gamma }\)-monopoles with singularities on \(T^{2} \times S^1\). The Dirac singularities are associated to the fundamental mass multiplets, and the total monopole charge is associated to the rank of the gauge group. On a compact space \(T^2 \times S^1\), because of the vanishing theorem, the total monopole charge is necessarily balanced by the charge of Dirac singularities, and this leads to the balance Eq. (2.17).

We introduce an order \(\succ \) on the set of eigenvalues \(\mathcal { X}\), which is essentially the radial order in CFT. Then the sum over \((x_L, x_R) \in \Lambda ^2 \mathcal { X}\) in the partition function is decomposed into the sum over the pairs \((x_L \succ x_R)\) and \((x_L \prec x_R)\), and the diagonal terms \((x_L = x_R)\). Since the diagonal part gives factors independent of the coupling constant, the Coulomb moduli, and so on, we will omit it. Then, using the reflection relation (2.5), the partition function is presented as a sum over the pairs \((x_L \succ x_R)\)

$$\begin{aligned} Z_\mathsf {T}(t)&= \sum _{\mathcal { X}\in \mathfrak {M}^\mathsf {T}} \exp \left( - \sum _{(x_L \succ x_R)} \left( \left( c_{\mathsf {i}(x_L),\mathsf {i}(x_R)}^+\right) ^{[0]} \beta \, \log \frac{x_R}{x_L}\right. \right. \nonumber \\ {}&\qquad \left. \left. + \sum _{m \ne 0} \frac{1 - q_1^m}{m(1 - p^m)(1 - q_2^{-m})} \left( c_{\mathsf {i}(x_L),\mathsf {i}(x_R)}\right) ^{[m]} \frac{x_R^m}{x_L^{m}} \right) \right) \nonumber \\&\quad \times \exp \left( \sum _{x \in \mathcal { X}} \left( \log \mathfrak {q}_{\mathsf {i}(x)} \log _{q_2} \frac{x}{\mathring{x}}\right. \right. \nonumber \\ {}&\qquad \left. \left. +\sum _{m=1}^\infty \left( \frac{1-q_1^m}{1-p^m} t^{(+)}_{\mathsf {i}(x),m} \, x^m + \frac{1-q_1^{-m}}{1-p^{-m}} t^{(-)}_{\mathsf {i}(x),m} \, x^{-m} \right) \right) \right) \end{aligned}$$
(2.18)

where \(\beta = - \epsilon _1 / \epsilon _2\) and the mass-deformed Cartan matrix is [1]

$$\begin{aligned} c_{ij}&= c_{ij}^{+} + c_{ij}^{-}, \quad c_{ij}^- = q^{-1} (c_{ji}^{+})^\vee , \quad \nonumber \\ c_{ij}&= (1 + q^{-1}) \delta _{ij} - \sum _{e:i \rightarrow j} \mu _e^{-1} - \sum _{e:j \rightarrow i} \mu _e q^{-1} \,, \end{aligned}$$
(2.19)

obeying the transpose relation

$$\begin{aligned} c_{ji} = q^{-1} c_{ij}^\vee \,. \end{aligned}$$
(2.20)

The Cartan matrix (2.1) is reproduced in the limit \(q \rightarrow 1\), \(\mu _e \rightarrow 1\).

3 Operator formalism

3.1 Z-state

The gauge theory partition function \( Z_\mathsf {T}(t)\) (2.18) can be interpreted as a state in the Fock space for the infinite-dimensional Heisenberg algebra \(\mathbf {H}\) generated by \((t_{i,m}^{(\pm )}, \frac{\partial }{\partial t_{i,m}^{(\pm )}})_{i \in \Gamma _0, m \in \mathbb { Z}_{> 0} }\). The Fock space is generated from the vacuum state \(| 1 \rangle \) by the action of the operators \(t_{i,m}^{(\pm )}\). The vacuum state \( |1 \rangle \) is annihilated by the operators \(\frac{\partial }{\partial t_{i,m}^{(\pm )}}\).

The Z-state is presented as an ordered product of vertex operators \( S_{\mathsf {i}(x),x}\) acting on the vacuum

$$\begin{aligned} \left| Z_\mathsf {T} \right\rangle = \sum _{\mathcal { X}\in \mathfrak {M}^\mathsf {T}} \prod _{x \in \mathcal { X}}^\succ S_{\mathsf {i}(x),x} \left| 1 \right\rangle , \end{aligned}$$
(3.1)

where

$$\begin{aligned} S_{i,x} = \ : \exp \left( s_{i,0} \log x + \tilde{s}_{i,0} + \frac{\kappa _i}{2} \left( \log _{q_2}^2 x - \log _{q_2} x \right) + \sum _{m \ne 0} \left( s_{i,m}^{(+)} x^{-m} + s_{i,m}^{(-)} x^{+m} \right) \right) : \end{aligned}$$
(3.2)

The \(\kappa _i\) factor, which plays a similar role to the Chern–Simons term, is needed to obtain the agreement between the gauge theory definition and the operator formalism. As mentioned in Sect. 2.2, we need two sets of time variables for elliptic theory, denoted by \((t^{(+)}_{i,m})_{i \in \Gamma _0, m \in \mathbb { Z}_{>0}}\) and \((t^{(-)}_{i,m})_{i \in \Gamma _0, m \in \mathbb { Z}_{>0}}\). Then we introduce free field modes

$$\begin{aligned} s_{i,-m}^{(\pm )} {\mathop {=}\limits ^{m>0}} \frac{1 - q_1^{\pm m}}{1 - p^{\pm m}} t_{i,m}^{(\pm )} \,, \quad s_{i,0} = t_{i,0} \,, \quad s_{i,m}^{(\pm )} {\mathop {=}\limits ^{m>0}} \mp \frac{1}{m(1 - q_2^{\mp m})} c_{ji}^{[\pm m]} \frac{\partial }{\partial t_{j,m}^{(\pm )}} \,. \end{aligned}$$
(3.3)

The commutation relations are

$$\begin{aligned} \left[ s_{i,m}^{(\pm )} \,, \, s_{j,m'}^{(\pm )} \right] = \mp \frac{1 - q_1^{\pm m}}{m(1 - p^{\pm m})(1 - q_2^{\mp m})} c_{ji}^{[\pm m]} \delta _{m+m',0} , \end{aligned}$$
(3.4)

For the zero mode \(s_{i,0}\) we set by definition \(s_{i,0}^{(\pm )} = s_{i,0}\) and

$$\begin{aligned} \left[ \tilde{s}_{i,0} \,, \, s_{j,m}^{(\pm )} \right] = - \beta \, \delta _{m,0} \, c_{ji}^{[0]} \,. \end{aligned}$$
(3.5)

In the 5d limit \(p \rightarrow 0\), the modes \(s^{(-)}_{i,m}\) become trivial because

$$\begin{aligned} - \frac{1}{1 - p^{-m}} = \frac{p^m}{1 - p^m} \ \longrightarrow \ 0 \qquad (p \rightarrow 0) . \end{aligned}$$
(3.6)

The Z-state (3.1) coincides with the gauge theory definition of the partition function (2.18) evaluated with the coupling constant

$$\begin{aligned} \log _{q_2} \mathfrak {q}_i = \beta + t_{i,0} + \mathsf {n}_j \left( c_{ji}^- \right) ^{[\log _{q_2}]} - \log _{q_2} \left( (-1)^{\mathsf {n}_j} \nu _j \right) \left( c_{ji}^- \right) ^{[0]} \end{aligned}$$
(3.7)

where

$$\begin{aligned} \nu _i = \prod _{\alpha =1}^{\mathsf {n}_i} \nu _{i,\alpha } \,, \qquad \left( c_{ij}^- \right) ^{[\log _{q_2}]} = \delta _{ij} \log _{q_2} q^{-1} - \sum _{e:j \rightarrow i} \log _{q_2} \left( q^{-1} \mu _e \right) , \end{aligned}$$
(3.8)

and the coefficients at all the nodes \(i \in \Gamma _0\) satisfy

$$\begin{aligned} \kappa _i = \mathsf {n}_j \left( c_{ji}^- \right) ^{[0]} . \end{aligned}$$
(3.9)

3.2 Screening charge

The sum over the set of fixed points \(\mathfrak {M}^\mathsf {T}\) in the partition function (3.1) can be replaced by the sum over \(\mathbb { Z}^{\mathcal { X}_0}\) (see [1]):

$$\begin{aligned} \left| Z_\mathsf {T} \right\rangle = \sum _{\mathcal { X}\in \mathbb { Z}^{\mathcal { X}_0}} \prod _{x \in \mathcal { X}}^\succ S_{\mathsf {i}(x),x} \left| 1 \right\rangle . \end{aligned}$$
(3.10)

Define ‘the screening charge operator’ to be:

$$\begin{aligned} \mathsf {S}_{i,\mathring{x}} = \sum _{k \in \mathbb { Z}} S_{i,q_2^{k} \mathring{x}} , \end{aligned}$$
(3.11)

Then the state \( \left| Z_\mathsf {T} \right\rangle \) is obtained by the action of the ordered product of \(\mathsf {S}_i\) on the vacuum state

$$\begin{aligned} \left| Z_\mathsf {T} \right\rangle = \prod _{\mathring{x} \in \mathcal { X}_0}^\succ \mathsf {S}_{\mathsf {i}(\mathring{x}),\mathring{x}} \left| 1 \right\rangle . \end{aligned}$$
(3.12)

The vacuum \(\left| 1 \right\rangle \) of the Heisenberg algebra \(\mathbf {H}\) is represented by a constant function of the time variables \(t_{i,m}^{(\pm )}\), and is annihilated by all the ‘positive’ oscillators \(s^{(\pm )}_{i,m}\) for \(m > 0\). The dual \(\left\langle 1 \right| \) to the vacuum state is the linear form on the Fock space represented by the evaluation of the functions of \(t_{i,m}^{(\pm )}\) at \(t_{i,m}^{(\pm )}=0\).

Thus the non-t-extended partition function can be presented as the correlator of the screening charges [1] (and see also [49,50,51])

$$\begin{aligned} Z_\mathsf {T}(t=0) = \left\langle 1 | Z_\mathsf {T} \right\rangle = \left\langle 1 \right| \prod _{\mathring{x} \in \mathcal { X}_0}^\succ \mathsf {S}_{\mathsf {i}(\mathring{x}),\mathring{x}} \left| 1 \right\rangle . \end{aligned}$$
(3.13)

3.3 Trace formula

Thinking in terms of the q-CFT on the torus, the correlator for 6d theory (3.13) can be written in the trace form in terms of the operators of the 5d theory (up to a normalization factor, which can be absorbed by redefinition of the gauge coupling constant)

$$\begin{aligned} Z_\mathsf {T}(t=0) = {{\mathrm{Tr}}}\left[ p^{L_0} \prod _{\mathring{x} \in \mathcal { X}_0}^\succ \mathsf {S}_{\mathsf {i}(\mathring{x}),\mathring{x}}^\text {5d} \right] . \end{aligned}$$
(3.14)

Here the trace is taken over the Fock space of \(\mathbf {H}\) with respect to the 5d time variables \(\{t_{i,m}\}_{i \in \Gamma _0, i\in \mathbb { Z}_{>0}}\), and the screening charge is also defined with the oscillators used in 5d theory [1]. The energy operator \(L_0\) is

$$\begin{aligned} L_0 = \sum _{i \in \Gamma _0} \sum _{m=1}^\infty m \,t_{i,m} \frac{\partial }{\partial t_{i,m}} \,. \end{aligned}$$
(3.15)

The trace formula (3.14) can be obtained as follows.

Recall that the screening current correlator which gives the 5d gauge theory partition function is [1]

$$\begin{aligned} \Big < S_{i,x}^\text {5d} S_{j,x'}^\text {5d} \Big > = \exp \left( - \sum _{m=1}^\infty \frac{1}{m} \frac{1-q_1^m}{1-q_2^{-m}} c_{ji}^{[m]} \frac{x'^m}{x^m} \right) . \end{aligned}$$
(3.16)

Here we omit the zero modes for brevity. There are two options to deform the 5d index computed by (2.7) to the elliptic 6d index computed by (2.2).

The first option is to modify the oscillator algebra in such a way that the normal ordering produces the elliptic correlation function, as defined in Sect. 3.1,

$$\begin{aligned} \Big < S_{i,x}^{\mathrm {6d}} S_{j,x'}^{\mathrm {6d}} \Big > = \exp \left( - \sum _{m \ne 0}^\infty \frac{1-q_1^m}{m(1-p^m)(1-q_2^{-m})} c_{ji}^{[m]} \frac{x'^m}{x^m} \right) . \end{aligned}$$
(3.17)

The second option is to keep the free field oscillator commutation relations of the 5d theory of the correlator, but change the definition of the correlation function to the trace as follows

$$\begin{aligned} \Big < S_{i,x}^\text {5d} S_{j,x'}^\text {5d} \Big >_\text {torus} = {{\mathrm{Tr}}}\Big [ p^{L_0} S_{i,x}^\text {5d} S_{j,x'}^\text {5d} \Big ] \,. \end{aligned}$$
(3.18)

The proof of the equivalence

$$\begin{aligned} \Big < S_{i,x}^{\mathrm {6d}} S_{j,x'}^{\mathrm {6d}} \Big > = {{\mathrm{Tr}}}\Big [ p^{L_0} S_{i,x}^\text {5d} S_{j,x'}^\text {5d} \Big ] \,, \end{aligned}$$
(3.19)

is in ‘Appendix A’. Then the trace formula (3.14) follows.

Fig. 1
figure 1

Conformal blocks as the partition function of 5d (top) and 6d theory (bottom). The 6d block has two equivalent expressions

The physical meaning is as follows. For the 5d gauge theory we use the cylindrical space-time for the q-Toda to compute the partition function, as shown in the top panel of Fig. 1. For the 6d gauge theory we use the toric space-time for the q-Toda obtained by the identification (1.1), illustrated in the LHS of Fig. 1 (bottom). This corresponds to (3.13), and is actually equivalent to taking the trace with the operator \(p^{L_0}\) inserted. This trace version (3.14) also agrees with the spectral duality for elliptic theory [31, 32, 34] because the dual theory is \(\mathcal { N}=2^*\) theory (or cyclic quiver theory), whose partition function is given by the torus conformal block via the q-version of the AGT relation [24].

3.3.1 Connection to elliptic quantum group

It has been known that the q-deformation of W-algebra has a close connection with the elliptic quantum algebra \(U_{q,p}(\widehat{\mathfrak {g}})\): The screening current of \(W_{q_1,q_2}(\mathfrak {g})\) obeys essentially the same relation to the elliptic currents \(e_i(z)\) and \(f_i(z)\) of \(U_{q,p}(\widehat{\mathfrak {g}})\) [52]. See [53] for the relations for generic \(\mathfrak {g}\). We see from (3.16) that the 5d screening currents yields

$$\begin{aligned} S_{i,x}^\text {5d} S_{j,x'}^\text {5d} = S_{j,x'}^\text {5d} S_{i,x}^\text {5d} \times \exp \left( - \sum _{m \ne 0} \frac{1}{m} \frac{1 - q_1^m}{1 - q_2^{-m}} c_{ji}^{[m]} \left( \frac{x'}{x} \right) ^m \right) \end{aligned}$$
(3.20)

where we omitted the zero mode factors for simplicity. One can rewrite the OPE factor using the theta function (2.3). Swapping \(q_1 \leftrightarrow q_2\) corresponds to swapping the currents \(e_i(z) \leftrightarrow f_i(z)\).

From (3.17), on the other hand, we obtain exactly the same relation for the 6d screening currents

$$\begin{aligned} S_{i,x}^\text {6d} S_{j,x'}^\text {6d} = S_{j,x'}^\text {6d} S_{i,x}^\text {6d} \times \exp \left( - \sum _{m \ne 0} \frac{1}{m} \frac{1 - q_1^m}{1 - q_2^{-m}} c_{ji}^{[m]} \left( \frac{x'}{x} \right) ^m \right) \end{aligned}$$
(3.21)

This coincidence implies that both the q-deformation \(W_{q_1,q_2}(\mathfrak {g})\) and the elliptic deformation \(W_{q_1,q_2,p}(\mathfrak {g})\) belong to the same realization of the elliptic quantum algebra \(U_{q,p}(\widehat{\mathfrak {g}})\).

3.4 \(\mathsf {Y}\)-operator

To construct W-algebras we introduce \(\mathsf {Y}\)-operators, corresponding to the doubled potential term (2.9)

$$\begin{aligned} \mathsf {Y}_{i,x} = \ q_1^{\tilde{\rho }_i} : \exp \left( y_{i,0} - \left( \tilde{c}_{ji} \right) ^{[0]} \kappa _j \log x + \sum _{m \ne 0} \left( y_{i,m}^{(+)} x^{-m} + y_{i,m}^{(-)} x^{+m} \right) \right) : \,, \end{aligned}$$
(3.22)

where \(\tilde{\rho }_i\) is the Weyl vector defined by \(\tilde{\rho }_i = \sum _{j \in \Gamma _0} \tilde{c}_{ji}^{[0]}\), and \(\tilde{c}_{ij}\) is the inverse of mass-deformed Cartan matrix \(c_{ij}\). The affine case with \(\det (c_{ij}^{[0]}) = 0\) will be discussed in Sec. 4.5. In the following, we set \(\kappa _i = 0\) for \(\forall i \in \Gamma _0\) for simplicity.

The oscillators \(y_{i,m}^{(\pm )}\) are defined in terms of \(t_{i,m}^{(\pm )}\) and \(\frac{\partial }{\partial t_{i,m}^{(\pm )}}\)

$$\begin{aligned}&\displaystyle y_{i,-m}^{(\pm )} {\mathop {=}\limits ^{m > 0}} \frac{(1-q_1^{\pm m})(1-q_2^{\pm m})}{1-p^{\pm m}} \left( \tilde{c}^{[\mp m]} \right) _{ji} t_{j,m}^{(\pm )} , \end{aligned}$$
(3.23)
$$\begin{aligned}&\displaystyle y_{i,m}^{(\pm )} {\mathop {=}\limits ^{m > 0}} \mp \frac{1}{m} \frac{\partial }{\partial t_{i,m}^{(\pm )}} , \end{aligned}$$
(3.24)
$$\begin{aligned}&\displaystyle y_{i,0} = - t_{j,0} \tilde{c}_{ji}^{[0]} \log q_2 . \end{aligned}$$
(3.25)

They satisfy the commutation relation:

$$\begin{aligned} \left[ y_{i,m}^{(\pm )} \,, \, y_{j,m'}^{(\pm )} \right] = \mp \frac{1}{m} \frac{(1-q_1^{\pm m})(1-q_2^{\pm m})}{1-p^{\pm m}} (\tilde{c}^{[\mp m]})_{ij} \, \delta _{m+m',0} \,. \end{aligned}$$
(3.26)

In terms of the free field \(s_{i,m}^{(\pm )}\), we have

$$\begin{aligned} y_{i,m}^{(\pm )} {\mathop {=}\limits ^{m \ne 0}} (1 - q_2^{\mp m}) \tilde{c}_{ji}^{[\pm m]} s_{j,m}^{(\pm )} \,, \qquad y_{i,0} = \left( \log q_2^{-1} \right) \tilde{c}_{ji}^{[0]} s_{j,0} \,, \end{aligned}$$
(3.27)

hence the [ys] commutation relations are

$$\begin{aligned} \left[ y_{i,m}^{(\pm )} \,, \, s_{j,m'}^{(\pm )} \right] = \mp \frac{1}{m} \frac{1 - q_1^{\pm m}}{1 - p^{\pm m}} \delta _{m + m',0} \delta _{ij} \,, \qquad \left[ \tilde{s}_{i,0} \,, \, y_{j,0} \right] = - \delta _{ij} \log q_1 \,. \end{aligned}$$
(3.28)

This leads to the normal ordered product (with the ordering \(|x| > |x'|\))

$$\begin{aligned} \mathsf {Y}_{i,x} S_{i,x'} = \frac{\theta (x'/x;p)}{\theta (q_1x'/x;p)} : \mathsf {Y}_{i,x} S_{i,x'} : \,, \quad \mathsf {Y}_{i,x} S_{j,x'} = \ : \mathsf {Y}_{i,x} S_{j,x'} : \quad \text {for} \quad i \ne j \,. \end{aligned}$$
(3.29)

The expectation value of the \(\mathsf {Y}\)-function has infinitely many poles at \(x = x' q_1 p^n\) for \(\forall n \in \mathbb { Z}\) for each configuration \(\mathcal {X} \in \mathfrak {M}^{\mathsf {T}}\) that labels the insertion of the screening currents:

$$\begin{aligned} \left\langle 1 \right| \mathsf {Y}_{i,x} \prod _{x' \in \mathcal { X}}^\succ S_{\mathsf {i}(i),x'} \left| 1 \right\rangle = q_1^{\tilde{\rho }_i} \left( \prod _{x' \in \mathcal { X}_i} \frac{\theta (x'/x;p)}{\theta (q_1 x'/x;p)} \right) \left\langle 1 \right| \prod _{x' \in \mathcal { X}}^\succ S_{\mathsf {i}(i),x'} \left| 1 \right\rangle . \end{aligned}$$
(3.30)

On the other hand, for \(|x| < |x'|\), we have

$$\begin{aligned} S_{i,x'} \mathsf {Y}_{i,x} = q_1^{-1} \frac{\theta (x/x';p)}{\theta (q_1^{-1}x/x';p)} : \mathsf {Y}_{i,x} S_{i,x'} : \,. \end{aligned}$$
(3.31)

Therefore the commutator gives

$$\begin{aligned} \left[ \mathsf {Y}_{i,x} \,, \, S_{i,x'} \right]&= \left( \frac{\theta (x'/x;p)}{\theta (q_1x'/x;p)} - q_1^{-1} \frac{\theta (x/x';p)}{\theta (q_1^{-1}x/x';p)} \right) : \mathsf {Y}_{i,x} S_{i,x'} : \nonumber \\&= \frac{\theta (q_1^{-1};p)}{(p;p)_\infty ^2} \, \delta (q_1 x'/x) : \mathsf {Y}_{i,x} S_{i,x'} : . \end{aligned}$$
(3.32)

The last expression is due to the identity [45]

$$\begin{aligned} \frac{\theta (a z;p)}{\theta (z;p)} = \frac{\theta (a;p)}{(p;p)_\infty ^2} \sum _{n \in \mathbb { Z}} \frac{z^n}{1 - a p^n}\,, \end{aligned}$$
(3.33)

which is obtained by using Ramanujan’s summation formula with the delta function defined

$$\begin{aligned} \delta (x) = \sum _{n \in \mathbb { Z}} x^n \,. \end{aligned}$$
(3.34)

This means that, in the limit \(q_1 \rightarrow 1\), the \(\mathsf {Y}\)-operator commutes with the screening current, and it reproduces a commutative algebra [16].

3.5 \(\mathsf {V}\)-operator

We can incorporate the (anti)fundamental matter contribution in the operator formalism by considering another vertex operator,

$$\begin{aligned} \mathsf {V}_{i,x} = \ : \exp \left( \sum _{m \ne 0} \left( v_{i,m}^{(+)} x^{-m} + v_{i,m}^{(-)} x^{+m} \right) \right) : \,. \end{aligned}$$
(3.35)

To reproduce the t-variable shift (2.16), the oscillators are taken to be

$$\begin{aligned} v_{i,-m}^{(\pm )} {\mathop {=}\limits ^{m> 0}} - \frac{1}{1-p^{\pm m}} \tilde{c}_{ji}^{[\pm m]} t_{j,m}^{(\pm )} \,, \qquad v_{i,m}^{(\pm )} {\mathop {=}\limits ^{m > 0}} \pm \frac{1}{m} \frac{1}{\left( 1-q_1^{\pm m}\right) \left( 1-q_2^{\pm m}\right) } \frac{\partial }{\partial t_{i,m}^{(\pm )}} , \end{aligned}$$
(3.36)

and the commutation relation

$$\begin{aligned} \left[ v_{i,m}^{(\pm )} \,, \, s_{j,m'}^{(\pm )} \right] = \pm \frac{1}{m(1-p^{\pm m})(1-q_2^{\pm m})} \, \delta _{m+m',0} \delta _{ij} \,. \end{aligned}$$
(3.37)

We remark

$$\begin{aligned} v_{i,m}^{(\pm )} = - \frac{1}{\left( 1-q_1^{\pm m}\right) \left( 1-q_2^{\pm m}\right) } y_{i,m}^{(\pm )} \,. \end{aligned}$$
(3.38)

The product of \(\mathsf {V}\) and \(\mathsf {S}\) operators behaves

$$\begin{aligned} \mathsf {V}_{i,x} \mathsf {S}_{i,x'}&= \Gamma \left( \frac{x'}{x}; p, q_2 \right) : \mathsf {V}_{i,x} \mathsf {S}_{i,x'} : \,, \end{aligned}$$
(3.39)
$$\begin{aligned} \mathsf {S}_{i,x'} \mathsf {V}_{i,x}&= \Gamma \left( \frac{x}{x'}; p, q_2 \right) ^{-1} : \mathsf {V}_{i,x} \mathsf {S}_{i,x'} : \,, \end{aligned}$$
(3.40)

which corresponds to the fundamental and antifundamental matter factors, respectively, while the OPE of \(\mathsf {V}\) and \(\mathsf {V}\) does not yield dynamical contribution. The t-extended partition function with the (anti)fundamental matter factors is given by

$$\begin{aligned} \left| Z_\mathsf {T} \right\rangle = \left( \prod _{x \in \mathcal { X}_\text {f}} \mathsf {V}_{\mathsf {i}(x),x} \right) \left( \prod _{\mathring{x} \in \mathcal { X}_0}^\succ \mathsf {S}_{\mathsf {i}(\mathring{x}),\mathring{x}} \right) \left( \prod _{x \in \tilde{\mathcal { X}}_\text {f}} \mathsf {V}_{\mathsf {i}(x),x} \right) \left| 1 \right\rangle \end{aligned}$$
(3.41)

where \(\mathcal { X}_\text {f} = \{\mu _{i,f}\}_{i\in \Gamma _0,f\in [1,\ldots ,\mathsf {n}_i^\text {f}]}\) and \(\tilde{\mathcal { X}}_\text {f} = \{\tilde{\mu }_{i,f}\}_{i\in \Gamma _0,f\in [1,\ldots ,\tilde{\mathsf {n}}_i^\text {f}]}\) are sets of (anti)fundamental mass parameters. This mass parameter characterizes the pole on the elliptic curve at \(x = \mu _{i,f}\), which is added by the vertex operator \(\mathsf {V}_{\mathsf {i}(x),x}\) with \(x \in \mathcal { X}_\text {f}\) and \(\tilde{\mathcal { X}}_\text {f}\).

We again remark that, for the modular invariance of the non-extended partition function \(\left\langle 1 | Z_\mathsf {T} \right\rangle \), which is a conformal block of \(W(\Gamma )\)-algebra, we have to take into account the conformal condition (2.17), although the Z-state (3.41) is not necessarily modular invariant by itself.

4 Elliptic W-algebra

To construct quiver elliptic W-algebras we build holomorphic qq-character currents [1, 18] (see also [54, 55]).

4.1 \(A_1\) quiver

For the simplest quiver \(\Gamma = A_1\), the qq-character is

$$\begin{aligned} T_{1,x}&= \mathsf {Y}_{1,x} + \mathsf {Y}_{1,q^{-1}x}^{-1} \,. \end{aligned}$$
(4.1)

Let us show that \(T_{1,x}\) commutes with the screening charge \(\mathsf {S}_{1,x'}\), which assures the regularity of the qq-character.

Here are the possible terms appearing in the commutation relation between the qq-character and the screening current,

$$\begin{aligned} \mathsf {Y}_{1,x} S_{1,x'}&= \frac{\theta (x'/x;p)}{\theta (q_1 x'/x;p)} : \mathsf {Y}_{1,x} S_{1,x'} : \,, \end{aligned}$$
(4.2)
$$\begin{aligned} S_{1,x'} \mathsf {Y}_{1,x}&= q_1^{-1} \frac{\theta (x/x';p)}{\theta (q_1^{-1} x/x';p)} : S_{1,x'} \mathsf {Y}_{1,x} : \,, \end{aligned}$$
(4.3)
$$\begin{aligned} \mathsf {Y}_{1,q^{-1}x}^{-1} S_{1,x''}&= \frac{\theta (qq_1 x''/x;p)}{\theta (qx''/x;p)} : \mathsf {Y}_{1,q^{-1}x}^{-1} S_{1,x''} : \,, \end{aligned}$$
(4.4)
$$\begin{aligned} S_{1,x''} \mathsf {Y}_{1,q^{-1}x}^{-1}&= q_1 \frac{\theta (q^{-1}q_1^{-1} x/x'';p)}{\theta (q^{-1}x/x'';p)} : S_{1,x''} \mathsf {Y}_{1,q^{-1}x}^{-1} : \,. \end{aligned}$$
(4.5)

As shown in (3.29), the first two terms possibly have infinitely many poles at \(x = x' q_1 p^n\) for \(n \in \mathbb { Z}\), while the last two terms involve poles at \(x = x'' q p^n\). These poles are actually canceled with each other because the screening charge is defined as a sum over the screening current under the \(q_2\)-shift: there is a term \(S_{1,x''}\) with \(x' = q_2 x''\) for every \(S_{1,x'}\). Using the relation

$$\begin{aligned} q_1^{-1} : \mathsf {Y}_{1,x} \mathsf {Y}_{1,q^{-1} x} : \ = \ : S_{1,q^{-1} x} S_{1,q_1^{-1} x}^{-1} : \,, \end{aligned}$$
(4.6)

we can show that the residue of the first term (4.2) at \(x = x' q_1 p^n\) coincides with that of the fourth term (4.5) at \(x = x'' q p^n\) for \(\forall n \in \mathbb { Z}\) with \(x' = x'' q_2\),

$$\begin{aligned} \underset{x \rightarrow x' q_1 p^n}{{\text {Res}}} \Big [ \mathsf {Y}_{1,x} S_{1,x'} \Big ] = \underset{x \rightarrow x' q_1 p^n}{{\text {Res}}} \left[ S_{1,x' q_2^{-1}} \mathsf {Y}_{1,xq^{-1}}^{-1} \right] . \end{aligned}$$
(4.7)

Similarly we have a coincidence of (4.3) and (4.4),

$$\begin{aligned} \underset{x \rightarrow x' q_1 p^n}{{\text {Res}}} \Big [ S_{1,x'} \mathsf {Y}_{1,x} \Big ]&= \underset{x \rightarrow x' q_1 p^n}{{\text {Res}}} \left[ \mathsf {Y}_{1,xq^{-1}}^{-1} S_{1,x' q_1^{-1}} \right] . \end{aligned}$$
(4.8)

This shows that the regularity of the qq-character for elliptic \(A_1\) theory

$$\begin{aligned} \partial _{\bar{x}} T_{1,x} \left| Z_\mathsf {T} \right\rangle&= 0 \,, \end{aligned}$$
(4.9)

which is equivalent to the commutativity of the holomorphic current with the screening charge,

$$\begin{aligned} \Big [ T_{1,x} \,, \, \mathsf {S}_{1,x'} \Big ] = 0 \,. \end{aligned}$$
(4.10)

The commutant of the screening charge is a well-defined conserved current, which provides time-independent modes

$$\begin{aligned} T_{1,x} = \sum _{m \in \mathbb { Z}} T_{1,m} \, x^{-m} \,. \end{aligned}$$
(4.11)

The modes of this conserved current define the elliptic algebra \(W_{q_1,q_2,p}(A_1)\) as the subalgebra of the Heisenberg algebra \(\mathbf {H}\) (the \(A_1\) case was discussed in [31, 32]).

4.2 Higher weight current and collision

We can compute the higher weight current \(T^{[\mathbf {w}]}_{i,x}\) using the free field representation of the vertex operator. For \(A_1\) quiver, the degree two current plays an important role in the definition of the elliptic algebra \(W_{q_1,q_2,p}(A_1)\). The product is given by

$$\begin{aligned} T_{1,w_1 x} T_{1,w_2 x}&= \left( \mathsf {Y}_{1,w_1 x} + \mathsf {Y}_{1,w_1 x q^{-1}}^{-1} \right) \left( \mathsf {Y}_{1,w_2 x} + \mathsf {Y}_{1,w_2 x q^{-1}}^{-1} \right) \nonumber \\&= f(w_2/w_1)^{-1} \Big ( : \mathsf {Y}_{1,w_1 x} \mathsf {Y}_{1,w_2 x} : \nonumber \\&\quad + \mathscr {S}(w_1/w_2) : \mathsf {Y}_{1,w_1x} \mathsf {Y}_{1,w_2xq^{-1}}^{-1} : + \, \mathscr {S}(w_2/w_1) : \mathsf {Y}_{1,w_2x} \mathsf {Y}_{1,w_1xq^{-1}}^{-1} : \nonumber \\&\quad \; + : \mathsf {Y}_{1,w_1 x q^{-1}}^{-1} \mathsf {Y}_{1,w_2 x q^{-1}}^{-1} : \Big ) \end{aligned}$$
(4.12)

where the scalar factor

$$\begin{aligned} f(w) = \exp \left( \sum _{m \ne 0} \frac{(1 - q_1^m)(1 - q_2^m)}{m (1 - p^m)(1 + q^m)} w^m \right) \end{aligned}$$
(4.13)

which appears in the algebraic relation of the elliptic Virasoro algebra \(W_{q_1,q_2,p}(A_1)\) [32], and the permutation factor

$$\begin{aligned} \mathscr {S}(w) = \frac{\theta (q_1 w;p) \theta (q_2 w;p)}{\theta (w;p) \theta (q w;p)} \,. \end{aligned}$$
(4.14)

Notice the relation

$$\begin{aligned} f(w) f(qw) = \mathscr {S}(w)\,. \end{aligned}$$
(4.15)

We obtain the commutation relation for the elliptic Virasoro generators, defined as the modes of the holomorphic current, from the product expression

$$\begin{aligned}&f(w_2/w_1) T_{1,w_1 x} T_{1,w_2 x} - f(w_1/w_2) T_{1,w_2 x} T_{1,w_1 x} \nonumber \\&\quad = \frac{\theta (q_1;p) \theta (q_2;p)}{(p;p)_\infty ^2 \theta (q;p)} \left( \delta \left( q \frac{w_1}{w_2} \right) - \delta \left( q \frac{w_2}{w_1} \right) \right) \,. \end{aligned}$$
(4.16)

The degree n current with the weight \((w_1, \ldots , w_n)\) is computed in a similar way

$$\begin{aligned} T_{1,x}^{[\mathbf {w}]}&= \, :\mathsf {Y}_{1,w_1 x} \mathsf {Y}_{1,w_2 x} \cdots \mathsf {Y}_{1,w_n}: + \cdots \nonumber \\&= \sum _{I \cup J = \{1\ldots n\}} \prod _{i \in I, j \in J} \mathscr {S}\left( \frac{w_i}{w_j} \right) :\prod _{i \in I} \mathsf {Y}_{1,w_i x} \prod _{j \in J} \mathsf {Y}_{1,w_j x q^{-1}}^{-1}: \,. \end{aligned}$$
(4.17)

Algebraically, this expression is exactly the same as in the \(W_{q_1,q_2}(A_1)\)-algebra [1, 18], except that the factor \( \mathscr {S}(w)\) is replaced by the elliptic index version.

In addition, we can consider the collision limit of the currents which produces derivative terms. For example, the product of the currents \(\mathsf {Y}_{1,x} \mathsf {Y}_{1,w x}\) in the limit \(w \rightarrow 1\) gives

$$\begin{aligned}&\mathscr {S}\left( w \right) : \mathsf {Y}_{1,w x} \mathsf {Y}_{1,x q^{-1}}^{-1} : + \, \mathscr {S}\left( w^{-1} \right) : \mathsf {Y}_{1,x} \mathsf {Y}_{1,w x q^{-1}}^{-1} : \nonumber \\&{\mathop {\longrightarrow }\limits ^{w \rightarrow 1}} \ : \mathsf {Y}_{1,x} \mathsf {Y}_{1,x q^{-1}}^{-1} \left( \mathfrak {c}(q_1,q_2,p) - \frac{\theta (q_1;p) \theta (q_2;p)}{(p;p)_\infty ^2\theta (q;p)} x \partial _x \log \left( \mathsf {Y}_{1,x} \mathsf {Y}_{1,xq^{-1}} \right) \right) : \,. \end{aligned}$$
(4.18)

The coefficient is given by

$$\begin{aligned} \mathfrak {c}(q_1,q_2,p)&= \lim _{w \rightarrow 1} \left( \mathscr {S}(w) + \mathscr {S}(w^{-1}) \right) \,, \end{aligned}$$
(4.19)

which is finite, although the factor \(\mathscr {S}(w)\) itself has a pole at \(w=1\).

4.3 Generic quiver

Now we have an algorithm to compute the qq-character for generic quiver. The fundamental qq-character corresponding to the node \(i \in \Gamma _0\) starts with \(\mathsf {Y}_{i,x}\), and the following terms are generated by the iWeyl reflection [1, 10, 16, 18]:

$$\begin{aligned} T_{i,x} = \mathsf {Y}_{i,x} \, + : \mathsf {Y}_{i,xq^{-1}}^{-1} \prod _{e:i \rightarrow j} \mathsf {Y}_{j,\mu _e^{-1} x} \prod _{e:j \rightarrow i} \mathsf {Y}_{j,\mu _e q^{-1} x} : + \cdots \,. \end{aligned}$$
(4.20)

If there is a product of the same \(\mathsf {Y}\)-operators in a term, we apply the permutation factor (4.14). We can prove the regularity of this current, and the commutativity with the screening charge in exactly the same way as in [1],

$$\begin{aligned} \Big [ T_{i,x} \,, \, \mathsf {S}_{i,x'} \Big ] = 0\,. \end{aligned}$$
(4.21)

Similarly, the holomorphic current \(T_{i,x}\) generates well-defined modes, which define the elliptic algebra \(W_{q_1,q_2,p}(\Gamma )\).

4.4 \(A_r\) quiver

We consider an example of a linear quiver \(A_r\), which leads to the elliptic algebra \(W_{q_1,q_2,p}(A_r)\). The iWeyl reflection computes the qq-character for each node \(i \in \Gamma _0\),

$$\begin{aligned} T_{i,\mu _{1 \Rightarrow i}^{-1} x} = \sum _{1 \le j_1< \cdots < j_i \le r+1} : \prod _{k=1}^i \Lambda _{j_k,q^{-i+k}x} : \end{aligned}$$
(4.22)

where

$$\begin{aligned} \Lambda _{i,x} = \mathsf {Y}_{i,\mu _{1 \Rightarrow i}^{-1} \, x} \mathsf {Y}^{-1}_{i-1, \mu _{1 \Rightarrow i-1}^{-1} q^{-1} x } \end{aligned}$$
(4.23)

with \(\mathsf {Y}_{0,x} = \mathsf {Y}_{r+1,x} = 1\) and the mass product defined

$$\begin{aligned} \mu _{1 \Rightarrow i} := \mu _{1 \rightarrow 2} \mu _{2 \rightarrow 3} \cdots \mu _{i-1 \rightarrow i} = \prod _{j=1}^{i-1} \mu _{j \rightarrow j+1} \,. \end{aligned}$$
(4.24)

Remark that

$$\begin{aligned} : \prod _{i=1}^{r+1} \Lambda _{i,q^{i-1}x} : = 1 \,. \end{aligned}$$
(4.25)

This is the mass-deformed quantum Miura transformation of \(A_r\) theory. For example, the first character, corresponding to the fundamental representation, is given by

$$\begin{aligned} T_{1,x}&= \sum _{i=1}^{r+1} \Lambda _{i,x} \nonumber \\&= \mathsf {Y}_{1,x} + : \mathsf {Y}_{2,\mu _{1 \Rightarrow 2}^{-1} x} \mathsf {Y}_{1,q^{-1} x}^{-1} : + \cdots + : \mathsf {Y}_{r,\mu _{1 \Rightarrow r}^{-1} q^{-1} x}^{-1} : \,. \end{aligned}$$
(4.26)

4.5 \({\widehat{A}}_0\) quiver

So far we have assumed that there is no self-connecting edge (a loop) in a quiver. Let us now study an example having a single node with a self-connecting edge, called \(\widehat{A}_0\) quiver (corresponding to 4d \(\mathcal { N}=2^*\) gauge theory), whose Cartan matrix is (0) and its mass-deformation is given by [1]

$$\begin{aligned} c = 1 + q^{-1} - \mu ^{-1} - \mu q^{-1} \,. \end{aligned}$$
(4.27)

where \(\mu \in \mathbb { C}^\times \) is the multiplicative adjoint mass. Then the commutation relation for the free field \(y_{i,m}^{(\pm )}\) (3.26) becomes

$$\begin{aligned} \left[ y_{1,m}^{(\pm )} \,, \, y_{1,m'}^{(\pm )} \right] = \mp \frac{1}{m} \frac{(1-q_1^{\pm m})(1-q_2^{\pm m})}{(1-p^{\pm m})(1-\mu ^{\pm m})(1-\mu ^{\mp m}q^{\pm m})} \delta _{m+m',0} \,. \end{aligned}$$
(4.28)

The generating current is obtained from the iWeyl reflection

$$\begin{aligned} \mathsf {Y}_{1,x} + \mathfrak {q}\, \mathscr {S}(\mu ^{-1}) \, : \mathsf {Y}_{1,xq^{-1}}^{-1} \mathsf {Y}_{1,\mu ^{-1} x}\mathsf {Y}_{1,\mu q^{-1} x} : \,, \end{aligned}$$
(4.29)

which provides a closed formula

$$\begin{aligned} T_{1,x} = \sum _{\lambda } \mathfrak {q}^{|\lambda |} Z_\lambda ^{\hat{A}_0} (\tilde{q}_1,\tilde{q}_2,\tilde{\nu },\tilde{\mu }) : \prod _{s \in \partial _+ \lambda } \mathsf {Y}_{1,qx/\tilde{x}(s)} \prod _{s \in \partial _- \lambda } \mathsf {Y}_{1,x/\tilde{x}(s)}^{-1} : \,, \end{aligned}$$
(4.30)

where \(\partial _+ \lambda \) and \(\partial _- \lambda \) are the outer and inner boundary of the partition \(\lambda \), and we define

$$\begin{aligned} \tilde{x}(s) = (\mu ^{-1} q)^{s_1-1} \mu ^{s_2-1} q \,. \end{aligned}$$
(4.31)

The factor \(Z_\lambda ^{\hat{A}_0} (\tilde{q}_1,\tilde{q}_2,\tilde{\nu },\tilde{\mu })\) is the elliptic Nekrasov function for \(\hat{A}_0\) quiver (\(\mathcal { N}=2^*\) theory) with U(1) gauge node, evaluated at the partition \(\lambda \) with the ‘dual’ variables [1, 16]

$$\begin{aligned} \tilde{q}_1 = \mu ^{-1} q \,, \qquad \tilde{q}_2 = \mu \,, \qquad \tilde{\mu } = q_2 \,, \qquad \tilde{\nu } = q \,, \end{aligned}$$
(4.32)

so that (4.31) leads to the dual of x-variable \(\tilde{x}(k,\lambda _k+1) = \tilde{x}_k \in \tilde{\mathcal { X}}\) where \((k,\lambda +1) \in \partial _+ \lambda \).

The current (4.30) is an infinite sum over partitions. Notice that for degenerate Cartan matrix it is not possible to absorb the zero mode coupling constant \(\mathfrak {q}\) to the definition of the \(\mathsf {Y}\), and \(\mathfrak {q}\) appears explicitly in the expression for \(T_{1,x}\). For \(|\mathfrak {q}| < 1\) the infinite sum over the partitions converges by the same argument as the convergence of the generating function for the number of partitions \(\sum _{k=0}^{\infty } n_k \mathfrak {q}^{k} = \prod _{p=1}^{\infty } (1-\mathfrak {q}^p)^{-1}\). We define the affine elliptic algebra \(W_{q_1,q_2,p}(\hat{A}_0)\) as generated by the modes \(\tilde{T}_{1,n}\) of current \(T_{1,x} = \sum _{n=-\infty }^{\infty } \tilde{T}_{1,n} x^{-n}\). For a current \(T_{1,x}^{[\mathsf {w}]}\) of higher weight \(\mathsf {w}_1\) the sum is labeled by \(\mathsf {w}\)-colored partitions [1, 18].