where after taking the limit $q_4 \to 1$, we used $q_{1,2,3}$ with the condition $q_1q_2q_3 = 1$. Using the structure function of quantum toroidal $gl_1$ in (9.4), this is rewritten as

$$1 = -q \prod_{i,j=1}^{\infty} g(x_{v; i, j}^{(ab)}/x). \qquad (10.21)$$

## 10.3 D2 system

Let us consider next the D2 system and derive the corresponding BAE. We consider the 3d gauge theories on $\mathbb{C}_4 \times \mathbb{S}^1$. First, let us consider the U(1) gauge theory. The U-function is written as (3.163)

$$U_{k,v}^4(x) = (1 - x_v/x), \quad x_v = vq_4^k. \qquad (10.22)$$

We can define the Q-function with the U(1) instanton (vortex) background as

$$Q_4(x) = (1 - x_v/x). \qquad (10.23)$$

We can do the same procedure we have done in previous sections, by studying the recursion relation of the U(1) partition function. However, for the U(1) case, the partition function is actually trivial (see appendix B.5, (B.48), (B.49)). Hence, we will obtain a trivial BAE for such a case.

To obtain a nontrivial BAE, we need to consider the U(n) gauge theory on $\mathbb{C}_4 \times \mathbb{S}^1$. The Q-function is generalized to

$$Q_4(x) = \prod_{\alpha=1}^{n} (1 - x_{v,\alpha}/x), \quad x_{v,\alpha} = v_{\alpha} q_4^{k_{\alpha}}. \qquad (10.24)$$

The recursion formula of the D2 U(n) partition function comes from (B.55):

$$\frac{q^{\vert \vec{k}+\Box \vert} Z_4^{\mathrm{D2}}[\vec{v}, \vec{k}+\Box]}{q^{\vert \vec{k} \vert} Z_4^{\mathrm{D2}}[\vec{v}, \vec{k}]} = \prod_{\beta \neq \alpha} \frac{U_{k_{\beta}, v_{\beta}}^{4}(x) U_{k_{\beta}, v_{\beta}}^{4}(q_{ij}x) U_{k_{\beta}, v_{\beta}}^{4}(q_{i4}^{-1}x) U_{k_{\beta}, v_{\beta}}^{4}(q_{j4}^{-1}x)}{U_{k_{\beta}, v_{\beta}}^{4}(q_{4}^{-1}x) U_{k_{\beta}, v_{\beta}}^{4}(q_{ij4}^{-1}) U_{k_{\beta}, v_{\beta}}^{4}(q_{i}x) U_{k_{\beta}, v_{\beta}}^{4}(q_{j}x)} \times \frac{U_{k_{\alpha}, v_{\alpha}}^{4}(q_{i4}^{-1}x)}{U_{k_{\alpha}+\Box, v_{\alpha}}(q_{i}x)} \frac{U_{k_{\alpha}, v_{\alpha}}^{4}(q_{j4}^{-1})}{U_{k_{\alpha}+\Box, v_{\alpha}}(q_{j}x)} \frac{U_{k_{\alpha}, v_{\alpha}}^{4}(q_{ij4}^{-1})}{U_{k_{\alpha}, v_{\alpha}}(q_{4}^{-1}x)} \frac{U_{k_{\alpha}+\Box, v_{\alpha}}^{4}(x)}{U_{k_{\alpha}, v_{\alpha}}(q_{4}^{-1}x)} \qquad (10.25)$$

where $x = q_4\chi_{4,v_\alpha}(\Box)$. Noticing that $U_{k_{\alpha}+\Box,v_\alpha}(x)/U_{k,v_\alpha}(x) = \mathcal{V}_4(\chi_{4,v_\alpha}(\Box))/x$ and that we have $\mathcal{V}_4(x) \to 1$ under the limit $q_4 \to 1$, we obtain the following BAE:

$$1 = -q \frac{\mathcal{Q}_4(\mathfrak{q}_1^{-1}x) \mathcal{Q}_4(\mathfrak{q}_2^{-1}x) \mathcal{Q}_4(\mathfrak{q}_3^{-1}x)}{\mathcal{Q}_4(\mathfrak{q}_1 x) \mathcal{Q}_4(\mathfrak{q}_2 x) \mathcal{Q}_4(\mathfrak{q}_3 x)}. \qquad (10.26)$$

Using the structure function of the quantum toroidal $gl_1$, we have

$$1 = -q \prod_{\alpha=1}^{n} g(x_{v_{\alpha}}/x). \qquad (10.27)$$

We note that this BAE appeared in [169] from a 3d $\mathcal{N} = 2$ theory with 3 adjoint chiral matters with the twisted mass $\epsilon_{1,2,3}$, where the gauge group rank corresponds to the number of Bethe roots.
**Flavor branes.** Based on previous sections, we expect that the vortex partition function on $C_a \times S^1$ including a flavor D8-D8 brane is obtained from the operator product

$$ \langle 0 | \tilde{Z}^K(\mu) \prod_{\alpha=1}^{n_a} S_a(v_{a,\alpha} q_a^{k_a^{(\alpha)}}) | 0 \rangle . \qquad (10.28) $$

The non-perturbative partition function is then modified to

$$ Z_{\text{vor.}}^{\text{D2}} \rightarrow \prod_{\alpha=1}^{n_a} \prod_{\Box \in k_a^{(\alpha)}} \left( K \frac{1 - K^{-1} \chi_{a, v_{a, \alpha}}(\Box)/\mu}{1 - \chi_{a, v_{a, \alpha}}(\Box)/\mu} \right) \times Z_{\text{vor.}}^{\text{D2}}. \qquad (10.29) $$

We may interpret that the D8 and $\overline{D8}$-branes give the fundamental chiral and anti-chiral multiplets. Since the D2 theory we are considering is a reduction from a 16 SUSY theory, it is natural to consider the same number of chiral and anti-chiral multiplets, that form a hypermultiplet.

Using this, the recursion formula is modified to

$$ \frac{q^{\lvert \vec{k} + \Box \rvert} Z_4^{\text{D2}}[\vec{v}, \vec{k} + \Box]}{q^{\lvert \vec{k} \rvert} Z_4^{\text{D2}}[\vec{v}, \vec{k}]} = \prod_{\beta \neq \alpha} \frac{U_{k_{\beta}, v_{\beta}}^4(x) U_{k_{\beta}, v_{\beta}}^4(q_{ij}x) U_{k_{\beta}, v_{\beta}}^4(q_{i4}^{-1}x) U_{k_{\beta}, v_{\beta}}^4(q_{j4}^{-1}x)}{U_{k_{\beta}, v_{\beta}}^4(q_{4}^{-1}x) U_{k_{\beta}, v_{\beta}}^4(q_{ij4}^{-1}) U_{k_{\beta}, v_{\beta}}^4(q_{i}x) U_{k_{\beta}, v_{\beta}}^4(q_{j}x)} \\ \times \frac{U_{k_{\alpha}, v_{\alpha}}^4(q_{i4}^{-1}x)}{U_{k_{\alpha}+\Box, v_{\alpha}}^4(q_{i}x)} \frac{U_{k_{\alpha}, v_{\alpha}}^4(q_{j4}^{-1})}{U_{k_{\alpha}+\Box, v_{\alpha}}^4(q_{j}x)} \frac{U_{k_{\alpha}+\Box, v_{\alpha}}^4(q_{ij}x)}{U_{k_{\alpha}, v_{\alpha}}^4(q_{ij4}^{-1})} \frac{U_{k_{\alpha}+\Box, v_{\alpha}}^4(x)}{U_{k_{\alpha}, v_{\alpha}}^4(q_{4}^{-1}x)} \\ \times \frac{1 - K\mu/\chi_{4, v_{\alpha}}(\Box)}{1 - \mu/\chi_{4, v_{\alpha}}(\Box)}. \qquad (10.30) $$

After taking the NS limit $q_4 \to 1$, we have the BAE involving the additional polynomials,

$$ 1 = -q \frac{1 - \tilde{K} \mu/x}{1 - \mu/x} \frac{Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}, \qquad (10.31) $$

where we used $K \to \tilde{K}$ at the limit$^{41}$ $q_4 \to 1$. This corresponds to the trigonometric version of the expression shown in [54, Prop. 7.13], where they obtained the BAE associated with the MacMahon representation.

After specializing the parameter as $\tilde{K} = q_1, q_2, q_3, q_1^{-1}, q_2^{-1}, q_3^{-1}$, we obtain a physical setup where the $D6_i$ ($i = 1, 2, 3$) branes or $\overline{D6}_i$ ($i = 1, 2, 3$) branes will play the role of a flavor branes:

$$ \begin{aligned} 1 &= -q \frac{1 - q_i \mu/x}{1 - \mu/x} \frac{Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}, \\ 1 &= -q \frac{1 - q_i^{-1} \mu/x}{1 - \mu/x} \frac{Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}. \end{aligned} \qquad (10.32) $$

We may also add multiple flavor branes. Generally, the BAE is modified to

$$ 1 = -q \prod_{\alpha=1}^{n_F} \frac{1 - \tilde{K}_\alpha \mu_\alpha / x}{1 - \mu_\alpha / x} \frac{Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}. \qquad (10.33) $$

<footnote>$^{41}$We use different symbols for the parameters K and $\tilde{K}$, because for example when $K = q_{1,2,3}^{\pm 1}$, we have $\tilde{K} = q_{1,2,3}^{\pm 1}$ after taking the limit. When K is generic, they are identified as $K = \tilde{K}$.</footnote>
Specializing the parameters as {$K_\alpha$} $\to$ {$q_1, q_2, q_3$} (which means {$\tilde{K}_\alpha$} $\to$ {$q_1, q_2, q_3$}) give

$$1 = -q \prod_{\alpha=1}^{L} \frac{1 - q_1 u_{\alpha}/x}{1 - u_{\alpha}/x} \prod_{\beta=1}^{M} \frac{1 - q_2 v_{\beta}/x}{1 - v_{\beta}/x} \prod_{\gamma=1}^{N} \frac{1 - q_3 w_{\gamma}/x}{1 - w_{\gamma}/x} \\ \times \frac{Q_4(q_1^{-1} x) Q_4(q_2^{-1} x) Q_4(q_3^{-1} x)}{Q_4(q_1 x) Q_4(q_2 x) Q_4(q_3 x)} \qquad (10.34)$$

where we relabeled {$\mu_\alpha$}$_{\alpha=1}^{n_F=L+M+N}$ $\to$ {$u_\alpha$}$_{\alpha=1}^{L}$ $\cup$ {$v_\beta$}$_{\beta=1}^{M}$ $\cup$ {$w_\gamma$}$_{\gamma=1}^{N}$. The most general case is

$$1 = -q \prod_{\alpha=1}^{L_+} \frac{1 - q_1 u_{\alpha}^{+}/x}{1 - u_{\alpha}^{+}/x} \prod_{\alpha=1}^{L_-} \frac{1 - q_1^{-1} u_{\alpha}^{-}/x}{1 - u_{\alpha}^{-}/x} \prod_{\beta=1}^{M_+} \frac{1 - q_2 v_{\beta}^{+}/x}{1 - v_{\beta}^{+}/x} \prod_{\beta=1}^{M_-} \frac{1 - q_2^{-1} v_{\beta}^{-}/x}{1 - v_{\beta}^{-}/x} \\ \times \prod_{\gamma=1}^{N_+} \frac{1 - q_3 w_{\gamma}^{+}/x}{1 - w_{\gamma}^{+}/x} \prod_{\gamma=1}^{N_-} \frac{1 - q_3^{-1} w_{\gamma}^{-}/x}{1 - w_{\gamma}^{-}/x} \frac{Q_4(q_1^{-1} x) Q_4(q_2^{-1} x) Q_4(q_3^{-1} x)}{Q_4(q_1 x) Q_4(q_2 x) Q_4(q_3 x)} \qquad (10.35)$$

which comes from {$K_a$} $\to$ {$q_1^{\pm 1}, q_2^{\pm 1}, q_3^{\pm 1}$} and {$\mu_\alpha$}$_{\alpha=1}^{n_F}$ $\to$ {$u_\alpha^{\pm}$}$_{\alpha=1}^{L_\pm}$ $\cup$ {$v_\beta^{\pm}$}$_{\beta=1}^{M_\pm}$ $\cup$ {$w_\gamma^{\pm}$}$_{\gamma=1}^{N_\pm}$.

This is a gauge theoretic derivation and generalizations of the BAEs of [158, eq. (5.5), (6.1)], [173]. The equations (10.31) and (10.33) are the BAEs of MacMahon representation and its tensor product representations. Other equations (10.32), (10.34), (10.35) correspond to the BAEs of the representations $\mathcal{F}_i$ ($\bar{\mathcal{F}}_i$), $\mathcal{F}_1^{\otimes L} \otimes \mathcal{F}_2^{\otimes M} \otimes \mathcal{F}_3^{\otimes N}$, and $\mathcal{F}_1^{\otimes L_+} \otimes \bar{\mathcal{F}}_1^{\otimes L_-} \otimes \mathcal{F}_2^{\otimes M_+} \otimes \bar{\mathcal{F}}_2^{\otimes M_-} \otimes \mathcal{F}_3^{\otimes N_+} \otimes \bar{\mathcal{F}}_3^{\otimes N_-}$, respectively, where we denoted the representation with negative central charges as $\bar{\mathcal{F}}_i$. The prefactors are determined from the representations.

Another specialization is to take the limit $K_\alpha \to 0, \infty$, which gives the following BAE:

$$1 = -q \prod_{\alpha=1}^{n_F} \frac{1}{1 - \mu_{\alpha}/x} \frac{Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}. \qquad (10.36)$$

This corresponds to the setup where the $\overline{D8}$-brane is decoupled from the setup. We expect the underlying quantum algebra to be the shifted quantum toroidal algebras for these cases.

To summarize, we have the following BAE from the D2 system with additional flavor branes.

**Theorem 10.2.** In the NS limit of the D2 system with flavor, we obtain the BAE involving the additional polynomials $a(x)$ and $d(x)$ specifying the representation of quantum toroidal $gl_1$,

$$1 = -q \frac{a(x) Q_4(q_1^{-1}x) Q_4(q_2^{-1}x) Q_4(q_3^{-1}x)}{d(x) Q_4(q_1x) Q_4(q_2x) Q_4(q_3x)}. \qquad (10.37)$$

This is analogous to Yangian and quantum affine algebra, where the representation data appears only in the $a$ and $d$ polynomials.

## 10.4 General case

Generalizations to $U(n)$ theories of the D4 and D6 theories can be done similarly to the D2-case. The BAE will have a general structure as in (10.5) of Thm. 10.1. The explicit form of the $Q$-functions is only modified. For the 5d $U(n)$ theory on $\mathbb{C}_{a4}^2 \times \mathbb{S}^1$, equation (10.8) is modified to

$$Q_{a4}(x) = \prod_{i=1}^{\infty} \prod_{\alpha=1}^{n} \left(1 - x_{\alpha,i}^{(a)}/x\right), \quad x_{\alpha,i}^{(a)} = v_{\alpha} q_{a}^{i-1} q_{4}^{\lambda_{i}^{(\alpha)}} \qquad (10.38)$$
We can also consider more general configurations where folded instantons also appear. Consider a gauge origami system where the D4-branes wrap the subspace $S \times S^1$, where

$$S = L\mathbb{C}_{14}^2 + M\mathbb{C}_{24}^2 + N\mathbb{C}_{34}^2. \qquad (10.39)$$

Namely, we have $U(L)$, $U(M)$, $U(N)$ affine quiver gauge theories on $\mathbb{C}_{14}^2 \times S^1$, $\mathbb{C}_{24}^2 \times S^1$, $\mathbb{C}_{34}^2 \times S^1$ respectively, with the folded instantons configurations connecting the different gauge theories. The Q-function is generalized to

$$Q_S(x) = \prod_{i=1}^{\infty} \prod_{\alpha=1}^{L} (1 - x_{\alpha,i}^{(1)}/x) \prod_{j=1}^{\infty} \prod_{\beta=1}^{M} (1 - x_{\beta,i}^{(2)}/x) \prod_{k=1}^{\infty} \prod_{\gamma=1}^{N} (1 - x_{\gamma,k}^{(3)}/x). \qquad (10.40)$$

For a 7d $U(n)$ theory on $\mathbb{C}_{ab4}^3 \times S^1$, equation (10.16) is modified to

$$Q_{ab4}(x) = \prod_{i,j=1}^{\infty} \prod_{\alpha=1}^{n} \left(1 - x_{\alpha; i, j}^{(ab)} / x\right), \quad x_{\alpha; i, j}^{(ab)} = v_{\alpha} q_{a}^{i-1} q_{b}^{j-1} q_{4}^{\pi_{ij}^{(\alpha)}}. \qquad (10.41)$$

The folded instanton system where D6-branes wrapping

$$S = L\mathbb{C}_{234}^3 + M\mathbb{C}_{134}^3 + N\mathbb{C}_{124}^3 \qquad (10.42)$$

gives the Q-function

$$Q_S(x) = \prod_{i,j=1}^{\infty} \prod_{\alpha=1}^{L} (1 - x_{\alpha; i, j}^{(23)}/x) \prod_{k,l=1}^{\infty} \prod_{\beta=1}^{M} (1 - x_{\beta; k, l}^{(13)}/x) \prod_{m,n=1}^{\infty} \prod_{\gamma=1}^{N} (1 - x_{\gamma; m, n}^{(12)}/x). \qquad (10.43)$$

For all cases, by direct computation, one can show that the arising BAE has the form

$$1 = -q \frac{Q_S(q_1^{-1}x)Q_S(q_2^{-1}x)Q_S(q_3^{-1}x)}{Q_S(q_1 x)Q_S(q_2 x)Q_S(q_3 x)}. \qquad (10.44)$$

Therefore, we obtain Thm. 10.1.

Remark 10.3. We note that when only one of $L, M, N$ is non-zero in (10.40), the dual integrable system is the elliptic Calogero-Moser/Ruijsenaars-Schneider model. When only one of $L, M, N$ is zero, the dual integrable system is the double elliptic Calogero-Moser system (and its trigonometric version) corresponding to the Calogero system associated with superalgebras [174–177] as discussed in the context of gauge origami [14, 178] (see also a related paper [73]). We expect that the most general case when $L, M, N \neq 0$ gives a triple elliptic Calogero-Moser system which is an elliptic generalization of the triple Calogero-Sutherland system [179, eq. (2.15)]. For the (10.43), we do not know the corresponding integrable systems and they are yet to be studied.

## 10.5 Quantum toroidal $gl_1$ and $q$-characters

In general, the $qq$-character is reduced to the $q$-character in the NS limit, which can be identified with the T-operator of the corresponding quantum integrable system [70, 180]. We have discussed in section 9 that the $qq$-characters of D2/D4/D6 systems correspond to the vector/Fock/MacMahon representations of quantum toroidal $gl_1$ denoted by $\mathcal{E}$, and actually
they are reduced to the $q$-characters of the corresponding representations of $\mathcal{E}$ considered in [159]. The BAE obtained for $\mathcal{E}$ by [158] is based on the Fock representation, which is consistent with our analysis (10.12). Hence, we propose that the BAE obtained from the D6 system (10.20) is of the MacMahon representation of $\mathcal{E}$.

Let us reproduce the $q$-characters of [159] from a gauge theoretic perspective. Consider a gauge origami system where there are D-branes on subspaces including the $\mathbb{C}_4 \times \mathbb{S}^1$:

$$ \left( \mathrm{pt} \cup \bigcup_{a \in \mathbf{3}} \mathbb{C}_a \cup \bigcup_{A \in \{12,13,23\}} \mathbb{C}_A^2 \right) \times \mathbb{C}_4 \times \mathbb{S}^1. \qquad (10.45) $$

Namely, we are considering a generalized gauge theory where we have D2-branes on $\mathbb{C}_4 \times \mathbb{S}^1$, D4-branes on $\mathbb{C}_{a4}^2 \times \mathbb{S}^1$ ($a \in \mathbf{3}$), and D6-branes on $\mathbb{C}_{A4}^3 \times \mathbb{S}^1$ ($A = 12, 13, 23$). Using (5.27), (6.23), and (7.49) (see also sections 3.7.1, 3.7.2, and 3.7.3), the partition function of such theory is written using the screening current $\mathcal{S}_4(x)$ as

$$ \mathcal{Z}[\vec{k}, \vec{\lambda}, \vec{\pi}] = \mathcal{Z}[\mathcal{X}] = \langle 0 | \prod_{x \in \mathcal{X}} \mathcal{S}_4(x) | 0 \rangle =: \langle 0 | \mathcal{Z} \rangle \qquad (10.46) $$

where

$$ \mathcal{X} = \mathcal{X}_4 \cup \bigcup_{a \in \mathbf{3}} \mathcal{X}_{a4} \cup \bigcup_{ab \in \{12,23,13\}} \mathcal{X}_{ab4}, \qquad |\mathcal{Z}\rangle = \prod_{x \in \mathcal{X}} \mathcal{S}_4(x) |0\rangle \qquad (10.47) $$

and

$$ \mathcal{X}_4 = \left\{ v_{4,\alpha} q_4^{k_4^{(\alpha)}} \middle| \alpha = 1, \dots, n_4 \right\}, \quad \mathcal{X}_{a4} = \left\{ v_{a4,\alpha} q_a^{j-1} q_4^{\lambda_{a4,i}^{(\alpha)}} \middle| \alpha=1,\dots,n_{a4} \atop i=1,\dots,\infty \right\} \quad (a \in \mathbf{3}) \qquad (10.48) $$

$$ \mathcal{X}_{ab4} = \left\{ v_{ab4,\alpha} q_a^{i-1} q_b^{j-1} q_4^{\pi_{abc,ij}^{(\alpha)}} \middle| \alpha=1,\dots,n_{abc} \atop i,j=1,\dots,\infty \right\} \quad (ab = 12, 13, 23). $$

The partition function is given as $\mathcal{Z} = \sum_{\mathcal{X}} \mathcal{Z}[\mathcal{X}]$. Let us consider the expectation value of the $qq$-characters associated with the D-branes spanning the subspace $\mathbb{C}_{123}^3 \times \mathbb{S}^1$ respectively: $\mathcal{Q}_{1,2,3}(x)$, $\mathcal{T}_{12,13,23}(x)$, $\mathcal{T}_{123}(x)$.

For the D2 $qq$-characters, the expectation value is

$$ \mathcal{T}_a(x) = \langle \mathcal{Q}_a(x) \rangle = \sum_{k \in \mathbb{Z}} q^k \langle \mathcal{S}_a(q_a^k x) \rangle = \frac{1}{\mathcal{Z}} \sum_{\mathcal{X}} \left( \sum_{k \in \mathbb{Z}} q^k \prod_{x' \in \mathcal{X}} \left[ \mathcal{S}_{\overline{a4}} \left( x q_a^k q_4 / x' \right) \right]_{-}^{x'} \right) \mathcal{Z}[\mathcal{X}] \qquad (10.49) $$

for $a \in \mathbf{3}$, where the expectation value of an operator $\mathcal{O}$ is defined as

$$ \langle \mathcal{O} \rangle = \frac{\langle 0 | \mathcal{O} | \mathcal{Z} \rangle}{\langle 0 | \mathcal{Z} \rangle}. \qquad (10.50) $$

For the D4 $qq$-character, the expectation value is

$$ \begin{aligned} \mathcal{T}_A(x) = \langle \mathcal{T}_A(x) \rangle &= \sum_{\lambda} q^{|\lambda|} \tilde{\mathcal{Z}}_A^{\mathrm{D4}}[\lambda] \langle \Lambda_{A,\lambda}(x) \rangle \\ &= \frac{1}{\mathcal{Z}} \sum_{\mathcal{X}} \left( \sum_{\lambda} q^{|\lambda|} \tilde{\mathcal{Z}}_A^{\mathrm{D4}}[\lambda] \prod_{x' \in \mathcal{X}} \left[ q_A q_4 \frac{y_{\lambda,x}^A (q_A x')}{y_{\lambda,x}^A (q_4^{-1} x')} \right]_{-}^{x'} \right) \mathcal{Z}[\mathcal{X}], \end{aligned} \qquad (10.51) $$
for $A = 12, 13, 23$. For the D6 $qq$-character, we have

$$ \begin{aligned} \mathcal{T}_{123}(x) = \langle \mathcal{T}_{123}(x) \rangle &= \sum_{\pi} q^{\lvert\pi\rvert} \tilde{\mathcal{Z}}_{123}^{\mathrm{D6}}[K, \pi] \langle \Lambda_{123,\pi}^{K}(x) \rangle \\ &= \frac{1}{\mathcal{Z}} \sum_{\mathcal{X}} \left( \sum_{\pi} q^{\lvert\pi\rvert} \tilde{\mathcal{Z}}_{123}^{\mathrm{D6}}[K, \pi] \prod_{x' \in \mathcal{X}} \left[ (-q_4 x) W_{\pi,x}^{\tilde{\mathcal{Z}}_{123}^{\mathrm{D6}}}(q_4^{-1} x') \right]_{-}^{x'} \right) \mathcal{Z}[\mathcal{X}]. \end{aligned} \quad (10.52) $$

After taking the NS limit, the fixed point configurations $\mathcal{X}$ transforms to a saddle point configuration$^{42}$ denoted as $\mathcal{X}_*$. Note also that under this limit, one can show that the U(1) contribution of the D4 and D6 partition functions become trivial:

$$ \tilde{\mathcal{Z}}_{A}^{\mathrm{D4}}[\lambda] \xrightarrow{q_4 \to 1} 1, \quad A \in \{12, 13, 23\}, \quad \tilde{\mathcal{Z}}_{123}^{\mathrm{D6}}[\pi] \xrightarrow{q_4 \to 1} 1. \quad (10.53) $$

The expectation values of the $qq$-characters then become

$$ \mathcal{T}_a(x) \xrightarrow{q_4 \to 1} \sum_{k \in \mathbb{Z}} q^k \left( \prod_{x' \in \mathcal{X}_*} S_a(x q_a^k / x') \right), \quad a \in \mathbf{3} \quad (10.54a) $$

$$ \mathcal{T}_{ij}(x) \xrightarrow{q_4 \to 1} \sum_{\lambda} q^{\lvert\lambda\rvert} \left( \prod_{x' \in \mathcal{X}_*} q_k^{-1} \frac{\mathcal{Y}_{\lambda,x}^{(k)}(q_k^{-1} x')}{\mathcal{Y}_{\lambda,x}^{(k)}(x')} \right), \quad \{i, j, k\} = \mathbf{3} \quad (10.54b) $$

$$ \mathcal{T}_{123}(x) \xrightarrow{q_4 \to 1} (-x) \sum_{\pi} q^{\lvert\pi\rvert} \prod_{x' \in \mathcal{X}_*} \left( \frac{1 - K x / x'}{1 - x / x'} \prod_{\mathfrak{g} \in \pi} g\left(\frac{x'}{\chi_x(\mathfrak{g})}\right) \right), \quad (10.54c) $$

where we used the results in section 9.1. The right-hand sides on (10.54a), (10.54b), (10.54c) are the vector, Fock, MacMahon $q$-characters of [159, eq. (3.15), (3.17)] respectively. We can do the same analysis for general D4, D6 $qq$-characters using the results in sections 9.3, 9.4 and obtain a large class of $q$-characters after taking the NS limit.

Even before taking the expectation values of the $qq$-characters, we have interesting properties under the NS limit. Under the limit $q_4 \to 1$, the vertex operators $S_a(x)$ ($a \in \mathbf{3}$), $X_A(x)$ ($A = 12, 23, 13$), $W_{123}(x)$, $A(x)$ all commute with each other. This is because generally these operators are expressed using the modes $a_n$ as (4.49):

$$ \frac{a_n}{\mathbf{P}_S^{[-n]}} \quad (10.55) $$

where $S \subseteq \mathbf{3}$, $S \neq \emptyset$: $S \in \{1, 2, 3, 12, 13, 23, 123\}$. The commutation relation is

$$ \left[ \frac{a_n}{\mathbf{P}_S^{[-n]}}, \frac{a_m}{\mathbf{P}_{S'}^{[-m]}} \right] = -\frac{1}{n} \delta_{n+m,0} \frac{\mathbf{P}_S^{[n]}}{\mathbf{P}_S^{[-n]} \mathbf{P}_{S'}^{[n]}} \propto (1 - q_4^n) \xrightarrow{q_4 \to 1} 0 \quad (10.56) $$

where we used $S, S' \in \mathbf{3}$. Denoting the NS limit of the $qq$-characters themselves as

$$ Q_a(x) \to \hat{Q}_a(x) \quad (a \in \mathbf{3}), \quad \mathcal{T}_A(x) \to \hat{\mathcal{T}}_A(x) \quad (A = 12, 13, 23), \quad \mathcal{T}_{123}(x) \to \hat{\mathcal{T}}_{123}(x) \quad (10.57) $$

we have the following result.

$$ \langle 0 | Z \rangle = \sum_{\mathcal{X}} Z_{\mathcal{X}} \approx Z_{\mathcal{X}_*}, \quad \langle 0 | \mathcal{O} | Z \rangle = \sum_{\mathcal{X}} \mathcal{O}_{\mathcal{X}} Z_{\mathcal{X}} \approx \mathcal{O}_{\mathcal{X}_*} Z_{\mathcal{X}_*}, $$

<footnote>$^{42}$After taking the NS limit and denoting the saddle point configuration by $\mathcal{X}_*$, we have</footnote>

<footnote>and then the expectation value is given by the on-shell value, $\frac{\langle 0 | \mathcal{O} | Z \rangle}{\langle 0 | Z \rangle} \approx \mathcal{O}_{\mathcal{X}_*}$.</footnote>
**Theorem 10.4.** For any $q$-characters obtained in the NS limit $q_4 \to 1$, $\mathcal{T}(x), \mathcal{T}'(x) \in \{\hat{\mathcal{Q}}_{1,2,3}(x), \hat{T}_{12,23,13}(x), \hat{T}_{123}^K(x)\}$, we have

$$[\mathcal{T}(x), \mathcal{T}'(x')] = 0. \qquad (10.58)$$

The commutativity in (10.58) implies the existence of commuting Hamiltonians. Constructing the explicit Hamiltonians of the corresponding integrable models for the most general gauge origami system on the lines of [14, 73, 178, 181] are left for future work. Moreover, it would be also interesting to relate the triple bilinear identity discussed in [182] to the triality of the $q$-characters.

**Remark 10.5.** Despite the coincidence of the BAEs in (10.12) and (10.20), we would have different commuting Hamiltonians and spectra for these two cases since they have different $q$-characters as in (10.54b) and (10.54c). Moreover, we see the difference between the perturbative part of the $Q$-functions, (10.8) and (10.16),

$$Q_{a4}(x) \xrightarrow{\lambda \to 0} (v/x; q_a)_{\infty}, \quad Q_{ab4}(x) \xrightarrow{\pi \to 0} (v/x; q_a, q_b)_{\infty}, \qquad (10.59)$$

which are given by the $q$-deformed gamma function for the D4 system, while it is given by the $q$-deformed double gamma function for the D6 system.

**Generalizations to other geometries.** Based on the correspondence with BPS $qq$-characters and quantum toroidal algebras in section 9.5, we can also study the $q$-character limit and the BAE. To do a detailed discussion, we need the explicit form of the coefficients $Z_i^{D6}[K, \Lambda^{(i)}]$ in Conj. 7.17. We hope to report a detailed analysis in a future work [74]. Based on the expression using the structure function of quantum toroidal $gl_1$ in (10.13), (10.21), (10.27), we propose the following BAE.

**Conjecture 10.6.** Let $Z = X \times \mathbb{C}$ where $X$ is a toric $CY_3$ be the space-time of the gauge origami system. Consider a gauge theory including $\mathbb{C}$. The recursion relation of the partition function of this gauge theory gives the following BAE after the NS limit ($q_4 \to 1$):

$$1 = -q_i \prod_{x'} \varphi^{c(x) \to c(x')} (x'/x), \qquad (10.60)$$

where the product is taken over some set of variables. We may add flavors that gives

$$1 = -q_i \frac{a_i(x)}{d_i(x)} \prod_{x'} \varphi^{c(x) \to c(x')} (x'/x) \qquad (10.61)$$

where $a_i(x), d_i(x)$ are additional polynomials specifying the representations of the quiver quantum toroidal algebra.

We note that this BAE also appeared in [183, eq. (2.53)] (see also [54]). We expect that the BPS $qq$-characters we introduced in this paper give a different derivation of the Bethe/Gauge correspondence. We also note that after taking the NS limit, the BPS $qq$-characters will transform to $q$-characters, which we call BPS $q$-characters. Similar to the $q$-characters of the quantum toroidal $gl_1$, the BPS $q$-characters obtained in this limit are the $q$-characters of the quiver quantum toroidal algebras. We note that they commute with each other and thus imply the existence of commuting Hamiltonians. We expect that the BPS $qq$-characters and $q$-characters we have introduced will be a tool to systematically derive Hamiltonians for new integrable models.
# 11 Geometric realization of $\mathcal{q}\mathcal{q}$-character

In addition to the algebraic construction based on the vertex operators, the $\mathcal{q}\mathcal{q}$-character allows geometric construction associated with the geometric representation theory of the corresponding quantum algebra [10, 184].

## 11.1 Quantum affine algebra

Let $\Gamma = (\Gamma_0, \Gamma_1)$ be a finite-type Dynkin quiver with $\Gamma_0$ the set of nodes and $\Gamma_1$ the set of edges. Let $\mathfrak{g}_\Gamma$ be the corresponding simple Lie algebra. We consider finite dimensional modules of quantum affine algebra $U_{q_1}(\hat{\mathfrak{g}}_\Gamma)$ specified by $\Gamma_0$-tuple of polynomials with constant term one (Drinfeld polynomials) [185, 186]. We denote the set of degrees of polynomials by $w = (w_i)_{i \in \Gamma_0} \in \mathbb{Z}_{\ge 0}^{\Gamma_0}$, the set of their roots by $\underline{x} = (x_{i,\alpha})_{i \in \Gamma_0, \alpha \in [w_i]}$, and the corresponding finite dimensional module by $M_{w;\underline{x}}$. As $M_{w;\underline{x}}$ is known to be a type 1 module, we have the weight space decomposition as $U_{q_1}(\mathfrak{g}_\Gamma)$-module,

$$ M_{w;\underline{x}} = \bigoplus_{v} M_{w,v;\underline{x}}, \qquad (11.1) $$

where $v = (v_i)_{i \in \Gamma_0} \in \mathbb{Z}_{\ge 0}^{\Gamma_0}$ parametrizes the weight lattice, $\sum_{i \in \Gamma_0} (w_i \varpi_i - v_i \alpha_i) \in P(\mathfrak{g}_\Gamma)$ with $(\varpi_i)_{i \in \Gamma_0}$ the fundamental weights and $(\alpha_i)_{i \in \Gamma_0}$ the simple roots of $\mathfrak{g}_\Gamma$. Then, $\mathcal{q}\mathcal{q}$-character is defined as a map from the Grothendieck ring $\mathrm{Rep}\,U_{q_1}(\hat{\mathfrak{g}}_\Gamma)$ of finite dimensional $U_{q_1}(\mathfrak{g}_\Gamma)$-modules of type 1 to the formal power series of the form, $(\partial^{\bullet} \mathfrak{y}_i(x)^{\pm 1})_{i \in \Gamma_0, x \in \mathbb{C}^\times}$.

**Proposition 11.1** ([10]). Let $M_{w;\underline{x}}$ be the $U_{q_1}(\mathfrak{g}_\Gamma)$-module defined above. The $\mathcal{q}\mathcal{q}$-character associated with $M_{w;\underline{x}}$ is given by the equivariant integral over the quiver variety $\mathfrak{M}_{w,v}$ parametrized by $(w, v)$ as follows,

$$ \mathfrak{T}_{w;\underline{x}}[\mathbf{Y}] = \sum_{v} \mathfrak{T}_{w,v;\underline{x}}[\mathbf{Y}], \qquad (11.2) $$

where

$$ \mathfrak{T}_{w,v;\underline{x}}[\mathbf{Y}] = q_2^{-\frac{1}{2} \dim \mathfrak{M}_{w,v}} \int_{\mathfrak{M}_{w,v}} \mathrm{ch} \wedge^{\bullet} \mathbf{Y}_{w,v}^{\vee} \mathbf{Y} \mathrm{ch} \wedge^{\bullet} T^{\vee} \mathfrak{M}_{w,v} \mathrm{td} (T\mathfrak{M}_{w,v}). \qquad (11.3) $$

We denote $\mathbf{Y}_{w,v}^{\vee} \mathbf{Y} = \sum_{i \in \Gamma_0} \mathbf{Y}_{w,v,i}^{\vee} \mathbf{Y}_i$ where $\mathbf{Y}_{w,v} = (\mathbf{Y}_{w,v,i})_{i \in \Gamma_0}$ and $\mathbf{Y} = (\mathbf{Y}_i)_{i \in \Gamma_0}$ are the observable bundle and the formal bundle over $\mathfrak{M}_{w,v}$ that defines the $\mathfrak{Y}$-function by

$$ \mathfrak{y}_i(x) = \mathrm{ch} \wedge^{\bullet}_{x-1} \mathbf{Y}_i, \quad i \in \Gamma_0. \qquad (11.4) $$

The dimension of the quiver variety is given by $\frac{1}{2} \dim \mathfrak{M}_{w,v} = \sum_{i \in \Gamma_0} w_i v_i - \sum_{i,j \in \Gamma_0} v_i c_{ij}^{\dagger} v_j$ where $c^{\dagger} = (c_{ij})_{i,j \in \Gamma_0}^{\dagger}$ is the half Cartan matrix associated with quiver $\Gamma$.

In fact, this formula is understood as the equivariant $\chi_{q_2}$-genus of the quiver variety with the additional insertion $\mathbf{Y}_{w,v}^{\vee} \mathbf{Y}$, which is physically interpreted as the coupling with the defect brane as discussed in section 3.8. From this point of view, in the limit $q_2 \to 1$, it is reduced to the Euler characteristics of the corresponding quiver variety, which provides the geometric realization of the $q$-character. In order to consider the non-simply-laced algebras, we need to consider the fractional quiver variety [184]. See also [187].
**Remark 11.2.** In the geometric formula, two parameters $q_1$ and $q_2$ play different roles: $q_1$ is the quantum deformation parameter of the algebra $U_{q_1}(\hat{\mathfrak{g}})$, while $q_2$ is the twist parameter for the cotangent bundle insertion. Although they have different meanings, the resulting expression is in the end symmetric for $q_1$ and $q_2$ for the simply-laced algebra [10]. On the other hand, the $qq$-character is not symmetric under $q_1$ and $q_2$ for non-simply-laced cases [62, 184]. See also [69].

**Remark 11.3.** It has been known that there exists another (non-commutative) deformation of the $q$-character, which is called the $t$-analog of $q$-character [188–190]. From the geometric point of view, the $t$-analog is the deformation based on the Poincaré polynomial compared with the Euler characteristics, while the $qq$-character corresponds to the $\chi_{q_2}$-genus of the quiver variety.

## 11.2 Quantum toroidal $gl_1$

Prop. 11.1 also applies to affine quivers, which gives rise to the $qq$-character of quantum toroidal algebra. For example, for $\Gamma = \hat{A}_0$, we obtain the $qq$-character of the Fock representation of quantum toroidal $gl_1$ that we denote by $\mathcal{E}$. Motivated by our analysis of the $qq$-character based on the vertex operator formalism, we have the geometric formula for the $qq$-character of the MacMahon module (and its tensor product) of $\mathcal{E}$.

**Theorem 11.4.** Let $w \in \mathbb{Z}_+$ and $(x_\alpha)_{\alpha=1,...,w} \in (\mathbb{C}^\times)^w$. The $qq$-character of degree-$w$ tensor product of the MacMahon module of quantum toroidal $gl_1$ is given by the following equivariant integral,

$$T_{w;\underline{x}}[\mathbf{Y}] = \sum_{v \ge 0} T_{w,v;\underline{x}}[\mathbf{Y}], \quad T_{w,v;\underline{x}}[\mathbf{Y}] = \int_{[\mathfrak{M}_{w,v}]^{\text{vir}}} \mathrm{ch} \wedge \bullet \mathbf{Y}_{w,v}^{\vee} \mathbf{Y} \mathrm{td}(T\mathfrak{M}_{w,v}), \quad (11.5)$$

where the integral is taken over the virtual fundamental cycle of $\mathfrak{M}_{w,v}$, the moduli space of $v$ D0 and $w$ D6 system (rank $w$ tetrahedron instanton on $\mathbb{C}_{123}^3$), which is isomorphic to the Quot scheme, $\mathfrak{M}_{w,v} \cong \mathrm{Quot}_{\mathbb{C}^3}^v(\mathcal{O}^{\oplus w})$. We denote the observable bundle and the formal bundle over $\mathfrak{M}_{w,v}$ by $\mathbf{Y}_{w,v}$ and $\mathbf{Y}$ that defines the $\mathcal{Y}$-function as before.

**Proof.** We consider the case $w = 1$ for simplicity. As this integral is understood as the equivariant integral, it localizes on the equivariant fixed points, which are characterized by plane partitions $\pi$ with $|\pi| = v$. Trivializing the formal bundle, $\mathrm{ch} \mathbf{Y} \to 1$, it is reduced to the equivariant integral over the moduli space without any insertion, which gives rise to the K-theoretic tetrahedron instanton partition function on $\mathbb{C}_{123}^3$, corresponding to $n_{\bar{4}} = w = 1$ and $n_{\bar{a}} = 0$ for $a \neq 4$ in our notation (see section 3.4). Hence, we have the coefficient $\tilde{Z}_{\bar{4}}^{\mathrm{D6}}[\pi]$ in Def. 7.3 as the contribution from each fixed point. On the other hand, the character of the observable bundle (3.107) is given by $\mathrm{ch} \mathbf{Y}_{w,v}|_{\pi} = x(1 - \prod_{i=1}^3(1 - q_i) \sum_{(i,j,k) \in \pi} q_1^{i-1}q_2^{j-1}q_3^{k-1})$. Hence, from Lem. 7.2, $\mathrm{ch} \wedge \bullet \mathbf{Y}_{w,v}^{\vee} \mathbf{Y}$ provides $\Lambda_{\bar{4},\pi}(x)$ at the fixed point $\pi$ under the replacement of $W_{\bar{4}}(x)$ with $\mathcal{Y}(x) = \mathrm{ch} \wedge \bullet_{\bar{x}-1} \mathbf{Y}$. The higher rank case $w > 1$ works totally in the same way. $\square$

The moduli space $\mathfrak{M}_{w,v}$ has more constraints than the ordinary D0-D4 instanton moduli space, which are implemented by the potential of the quiver variety [52, 54]. As a result, the virtual dimension of the moduli space becomes zero in this case, and hence, compared to the previous formula (11.3), we have no additional $q_2$-twisted cotangent bundle insertion.
## 11.3 Quantum toroidal gl_n

Let us also comment on the geometric formula of the *qq*-character of quantum toroidal gl_n that we denote by $\mathcal{E}_n$. We also have vector/Fock/MacMahon representations for $\mathcal{E}_n$ [165]. We can apply the previous formula (11.3) to affine quiver $\tilde{A}_{n-1}$ to obtain the Fock representation of $\mathcal{E}_n$ [143]. For the MacMahon representation, we apply the formula (11.5) with the moduli space of D0-D6 system on $\mathbb{C}^3/\mathbb{Z}_n$ to construct the *qq*-character.

**Conjecture 11.5.** Let $\underline{i} = (i_j)_{j \in 0, \dots, n-1} \in (\mathbb{Z}/n\mathbb{Z})^n$ with $i_j = \delta_{i,j}$. Let $M_{\underline{i};x}$ be the MacMahon module of color $i$ of $\mathcal{E}_n$. For $w = (w_i)_{i \in 0, \dots, n-1} \in \mathbb{Z}_{\ge 0}^n$ and $\underline{x} = (x_{i,\alpha})_{i \in 0, \dots, n-1, \alpha=1, \dots, w_i} \in (\mathbb{C}^\times)^{|w|}$, we consider the tensor product module of the MacMahon modules,

$$ M_{w;\underline{x}} = \bigotimes_{i \in 0, \dots, n-1} \bigotimes_{\alpha=1, \dots, w_i} M_{\underline{i};x_{i,\alpha}}. \qquad (11.6) $$

Then, the *qq*-character of $\mathcal{E}_n$-module $M_{w;\underline{x}}$ is given by the equivariant integral over the moduli space of D0-D6 system on $\mathbb{C}^3/\mathbb{Z}_n$ denoted by $\mathfrak{M}_{w,v} \cong \mathrm{Quot}^{|v|}_{\mathbb{C}^3/\mathbb{Z}_n}(\mathcal{O}^{\oplus|w|})$, $v = (v_i)_{i=0, \dots, n-1} \in \mathbb{Z}_{\ge 0}^n$, as follows,

$$ T_{w;\underline{x}}[\mathbf{Y}] = \sum_{v \in \mathbb{Z}_{\ge 0}^n} T_{w,v;\underline{x}}[\mathbf{Y}], \qquad T_{w,v;\underline{x}}[\mathbf{Y}] = \int_{[\mathfrak{M}_{w,v}]^{\mathrm{vir}}} \mathrm{ch} \wedge \bullet \mathbf{Y}_{w,v}^{\vee} \mathbf{Y} \mathrm{td}(T\mathfrak{M}_{w,v}). \qquad (11.7) $$

In this case, the integral localizes on the fixed points parametrized by the colored plane partition, which characterizes the MacMahon module of $\mathcal{E}_n$ [165].

The geometric formula presented here could be straightforwardly extended to various *qq*-characters discussed in previous sections by replacing the moduli space with the corresponding one.

## 12 Quiver elliptic W-algebra

As mentioned in section 3.1, instead of considering the gauge origami system on $\mathbb{C}^4 \times \mathbb{R} \times \mathbb{S}^1$, we can consider it also on $\mathbb{C}^4 \times \mathbb{R}^2$ or $\mathbb{C}^4 \times \mathbb{T}^2$. For the former case, the arising algebra is the rational version of the quiver W-algebra [191] (see also [192]), while for the latter case, the arising algebra is the quiver elliptic W-algebra [61]. For the rational case, one needs to take care of the perturbative one-loop part carefully but a similar computation can be done. In this paper, we only discuss the elliptic counterpart of the *qq*-characters introduced in previous sections.

We denote the elliptic parameter $p = e^{2\pi i \tau} \in \mathbb{C}^\times$. The elliptic deformation is obtained by modifying the index as in (3.44):

$$ \mathbb{I}[x] = 1 - x^{-1} \rightarrow \mathbb{I}_p[x] = \theta(x^{-1}; p), \qquad (12.1) $$

where the theta function is defined in (A.12). Note that in the limit $p \to 0$, we obtain the trigonometric index.

At the operator level, we need to double the number of modes and introduce two independent operators [61]. For example, the root current will be modified as

$$ A(x) = a_0(x) : \exp \left( \sum_{n \neq 0} a_n x^{-n} \right) : \rightarrow A^{\theta}(x) = a_0(x) : \exp \left( \sum_{n \neq 0} \left( a_{\theta,n}^{(+)} x^{-n} + a_{\theta,n}^{(-)} x^n \right) \right) : \qquad (12.2) $$
where

$$[a_{\theta,n}^{(\pm)}, a_{\theta,m}^{(\pm)}] = \mp \frac{1}{n} \frac{\mathbf{P}_{\mathbf{4}}^{[\pm n]}}{1 - p^{\pm n}} \delta_{n+m,0}. \quad (12.3)$$

In this process, the modes will be elliptically deformed. We only deform the nonzero modes and leave the zero modes undeformed.

The operators for D2, D4, D6, D8 branes are similarly defined as

$$\text{D2: } S_a^\theta(x) = s_{a,0}(x) : \exp \left( \sum_{n \neq 0} \left( s_{\theta,a,n}^{(+)} x^{-n} + s_{\theta,a,n}^{(-)} x^n \right) \right) : , \quad s_{\theta,a,n}^{(\pm)} = \frac{a_{\theta,n}^{(\pm)}}{\mathbf{P}_a^{[\mp n]}}, \quad a \in \mathbf{4}, \quad (12.4a)$$

$$\text{D4: } X_A^\theta(x) = x_{A,0}(x) : \exp \left( \sum_{n \neq 0} \left( x_{\theta,A,n}^{(+)} x^{-n} + x_{\theta,A,n}^{(-)} x^n \right) \right) : , \quad x_{\theta,A,n}^{(\pm)} = \frac{a_{\theta,n}^{(\pm)}}{\mathbf{P}_A^{[\mp n]}}, \quad A \in \mathbf{6}, \quad (12.4b)$$

$$\text{D6: } W_{\bar{a}}^{\theta}(x) = w_{\bar{a},0}(x) : \exp \left( \sum_{n \neq 0} \left( w_{\theta,\bar{a},n}^{(+)} x^{-n} + w_{\theta,\bar{a},n}^{(-)} x^n \right) \right) : , \quad w_{\theta,\bar{a},n}^{(\pm)} = \frac{a_{\theta,n}^{(\pm)}}{\mathbf{P}_{\bar{a}}^{[\mp n]}}, \quad a \in \mathbf{4}, \quad (12.4c)$$

$$\text{D8: } Z^{\theta}(x) = z_{0}(x) : \exp \left( \sum_{n \neq 0} \left( z_{\theta,n}^{(+)} x^{-n} + z_{\theta,n}^{(-)} x^n \right) \right) : , \quad z_{\theta,n}^{(\pm)} = \frac{a_{\theta,n}^{(\pm)}}{\mathbf{P}_{\mathbf{4}}^{[\mp n]}}. \quad (12.4d)$$

Similarly, elliptic analogs of the structure functions (3.67) are

$$\mathcal{V}_a^\theta(x) = \mathbb{I}_p[-\mathbf{P}_a^\vee x^\vee] = \frac{\theta(q_a x; p)}{\theta(x; p)}, \quad (12.5)$$

$$S_{ab}^{\theta}(x) = \mathbb{I}_{p}[-\mathbf{P}_{ab}^{\vee} x^{\vee}] = \frac{\theta(q_{a}x; p)\theta(q_{b}x; p)}{\theta(x; p)\theta(q_{a}q_{b}x; p)}, \quad (12.5)$$

$$g_{\bar{a}}^{\theta}(x) = \mathbb{I}_{p}[-\mathbf{P}_{\bar{a}}^{\vee} x^{\vee}] = \frac{\prod_{i \neq a} \theta(q_i x; p) \theta(q_{\bar{a}} x; p)}{\theta(x; p) \prod_{i \neq a} \theta(q_{\bar{a}}^{-1} q_i^{-1} x; p)}, \quad (12.5)$$

$$A_{\mathbb{C}4}^{\theta}(x) = \mathbb{I}_{p}[-\mathbf{P}_{\mathbf{4}}^{\vee} x^{\vee}] = \frac{\prod_{a \in \mathbf{4}} \theta(q_{a}x; p) \prod_{a \in \mathbf{4}} \theta(q_{a}^{-1}x; p)}{\theta(x; p)^2 \prod_{A \in \mathbf{6}} \theta(q_{A}x; p)}. \quad (12.5)$$

The D-brane *qq*-characters are defined by changing the operators to the elliptic deformed vertex operators:

$$\text{D2 elliptic } qq\text{-character: } Q_a^\theta(x) = \sum_{k \in \mathbb{Z}} q^k S_a^\theta(q_a^k x), \quad (12.6a)$$

$$\text{D4 elliptic } qq\text{-character: } \mathcal{T}_A^\theta(x) = \sum_{\lambda} q^{|\lambda|} \mathcal{Z}_{\theta,A}^{D4}[\lambda] : X_A^\theta(x) \prod_{\square \in \lambda} \mathcal{A}^\theta(\chi_{A,x}(\square))^{-1} : , \quad (12.6b)$$

$$\text{D6 elliptic } qq\text{-character: } \mathcal{T}_{\mathbf{4}}^{\theta}(x) = \sum_{\pi} q^{|\pi|} \mathcal{Z}_{\mathbf{4},\text{CS}}^{D6} \mathcal{Z}_{\theta,\mathbf{4}}^{D6}[\pi] : W_{\mathbf{4}}^{\theta}(x) \prod_{\mathbb{Q} \in \pi} \mathcal{A}^{\theta}(\chi_{\mathbf{4},x}(\mathbb{Q}))^{-1} : , \quad (12.6c)$$

$$\text{D8 elliptic } qq\text{-character: } \mathcal{T}_{\mathbf{4};a}^{K\theta}(x) = \sum_{\rho \in S_P} q^{|\rho|} \mathcal{Z}_{\theta,\mathbf{4};a}^{D8}[\rho, K] : \tilde{Z}^{K,\theta}(x) \prod_{\mathbb{Q} \in \rho} \mathcal{A}^{\theta}(\chi_{\mathbf{4},x}(\mathbb{Q}))^{-1} : . \quad (12.6d)$$

One can show that the commutativity with the elliptic deformed screening charges also holds similar to the trigonometric *qq*-characters. We also can obtain elliptic deformations of the
general D4, D6 $qq$-characters and even the BPS $qq$-characters introduced in the previous sections. Since it is a straightforward generalization, we omit the results of them.

## 13 Conclusion and discussions

We introduced vertex operators corresponding to the D(2p)-branes ($p = 0, 1, 2, 3, 4$) and gave the free field realizations of the contour integral formulas of the gauge origami partition function in $\mathbb{C}^4$. Interestingly, they can be understood in terms of graded quivers associated with 2d $\mathcal{N} = (0, 2)$ quiver gauge theories, which enabled us to generalize the conventional quiver W-algebra. Based on this free field realization, we managed to construct D2, D4, D6 $qq$-characters and show the BPS/CFT correspondence for the coupled vortex, spiked instanton, and tetrahedron instanton systems. We also managed to give many generalizations and conjectures of the gauge origami setup from the quantum algebraic viewpoint.

The D2 $qq$-characters play the roles of screening charges and the D4, D6 $qq$-characters are uniquely determined after setting the highest weight and imposing the commutativity condition with the screening charge. An interesting property was that the monomial terms are classified by truncations of plane partitions and the patterns of them were determined from the highest weight. Moreover, we have a one-to-one correspondence with the MacMahon representation and its generalizations (e.g. truncations, boundary conditions, etc.) of the quantum toroidal $gl_1$, and the Bethe ansatz equations were derived in a natural way.

Despite the fact that all processes in D2, D4, and D6 were relatively successful, the D8 case was not so successful because we could not construct the screening charge associated with it, and as a result, the D8 $qq$-character we constructed could only reproduce the partition function of the magnificent four model up to sign factors. The construction of the complete D8 $qq$-character is one of the ultimate goals because this D8 $qq$-character is expected to be the mother of all other D-brane $qq$-characters in the gauge origami system.

Let us list down possible directions for future work.

**Gauge theoretical interpretation of general D6 $qq$-characters.** As discussed in section 7.5, general D6 $qq$-characters have a one-to-one correspondence with truncations of plane partitions. Using the BPS/CFT correspondence (see Thm. 1.2), we can obtain generalizations of the tetrahedron instanton partition functions by constructing the $qq$-characters and studying their compositions. Let $\pi_1, \pi_2$ be the two different truncations of the plane partition. After constructing the associated D6 $qq$-characters $T_{\pi_1, \pi_2}(x)$, the vacuum expectation value of the composition of them takes the form:

$$ \mathcal{Z} = \sum_{\pi_1, \pi_2} q^{|\pi_1|+|\pi_2|} \prod_{i=1}^{2} \mathcal{Z}[\pi_i] \mathcal{Z}[\pi_1, \pi_2] \mathcal{Z}[\pi_2, \pi_1]. \qquad (13.1) $$

The physical interpretation of both $\mathcal{Z}[\pi_i]$ and $\mathcal{Z}[\pi_i, \pi_j]$ is necessary. Studying the relation with open BPS states might help to solve this problem [193–195]. Recently, the relation with a different algebra (shifted quiver Yangian) was studied in [128]. Understanding the connection with the representations appearing there might help.
**Gauge origami of general toric Calabi-Yau four-folds.** As mentioned in section 1 and 3.1, the gauge origami system is understood as a setup where D1-branes are probing intersecting D-branes wrapping cycles in the Calabi-Yau four-fold. In [52], the authors defined the elliptic genus [196–198] of the tetraheron instanton system and evaluated the poles by using the JK-residue techniques [85]. Generalization of this computation to general gauge origami setup is necessary. Since toric Calabi-Yau four-folds are related to brane brick models, the computation in [124] might help. Comparison with the contour integral formulas we proposed in Conj. 4.7, 4.9 might be interesting too.

**BPS $qq$-characters and crystal melting.** In the main section, we gave multiple conjectures (Conj. 4.7, 4.9, 7.17) related to generalizations to toric Calabi-Yau four-folds. We hope to come back and solve these conjectures by discussing the relation with brane brick models and brane tilings in a future work [74]. Since all of the BPS $qq$-characters associated with the gauge origami system of a Calabi-Yau four-fold $Z$ are expected to be understood as truncations of a four-dimensional analog of the 3d BPS crystals [57], it is necessary to generalize the discussion of [57] to Calabi-Yau four-folds. Truncations of them are also necessary to be studied.

**Finite type quivers and $qq$-characters.** Although the $qq$-characters we introduced in this paper are associated with “affine”-type quivers which give an infinite number of monomial terms appearing in the $qq$-character, we can consider $qq$-characters with a finite number of monomial terms. Such kind of $qq$-character should be understood as a singular limit of the $q$-parameters appearing in the $q$-Cartan matrix. For example, consider the $\mathbb{C}_{12}^2 \times \mathbb{C}_{34}^2$ gauge origami system and place a $D_{4_{12}}$-brane and a $D_{4_{34}}$-brane spanning transversely. The $D_{4_{12}}$ theory is a 5d $\mathcal{N} = 1^*$ theory with adjoint mass $q_3$. We can take the limit $q_3 \to 0, \infty$ while keeping the product $q_3q_4$ fixed. In this process, the 5d $\mathcal{N} = 1^*$ theory on $\mathbb{C}_{12}^2 \times \mathbb{S}^1$ becomes the pure SYM theory whose quiver structure is the $A_1$. Namely, the quiver structure changes $\hat{A}_0 \to A_1$ under this limit. Actually, one can show that the two $qq$-characters $T_{12}(x), T_{34}(x)$ will be deformed as

$$ \begin{aligned} T_{12}(x) &\to T_{\text{pure SYM}}(x), \\ T_{34}(x) &\to T_{\text{q-Vir}}(x), \end{aligned} \qquad (13.2) $$

where $T_{\text{pure SYM}}(x)$ is the $qq$-character reproducing the instanton partition functions of the pure SYM, while $T_{\text{q-Vir}}(x)$ is the generator of the $q$-Virasoro algebra [74]. Generalizations of this discussion to other quiver W-algebras is a possible future work.

**Relation with intertwiners and quantum toroidal algebras.** A recent work [136] derived the $D_4$ $qq$-character from a new elliptic quantum toroidal algebra denoted as $U_{q,t,p}(\mathfrak{gl}_{1,\text{tor}})$ by studying the intertwiner formalism based on [199] (see also [75, 161, 166, 192, 200–210] for related works). The elliptic quantum toroidal algebra $U_{q,t,p}(\mathfrak{gl}_{1,\text{tor}})$ is an algebra with four parameters $q, t, p, p^* = p\gamma^{-2}$, where $\gamma$ is the central element of the algebra. In their paper, they studied the vertical representation with $\gamma = 1$ and the horizontal representation with $\gamma = (t/q)^{1/2}$. In the horizontal representation, we have $p^*/p = q/t$ which implies the identification $(q_1, q_2, q_3, q_4) = (q, t^{-1}, p, t/(qp))$. Note at the limit $p^* \to 1$, we have $p = t/q$.
We also note that their elliptic parameter $p$ is related to the $\Omega$-deformation parameter of $\mathbb{C}^4$ and is different from the elliptic parameter in section 12. Our elliptic parameter $p$ is related to $\mathcal{C} = \mathbb{T}^2$ but not $\mathbb{C}^4$ and from the algebraic viewpoint, it is rather related to [211–213].

The two screening currents in [136, section 5.1] are identified as

$$s_n^+ \leftrightarrow s_{4,n}, \quad s_n^- \leftrightarrow s_{3,n} \qquad (13.3)$$

and the $T(u)$ operator [136, section 5.2] is identified with the $D_{4_{12}}$ $qq$-character $T_{12}(u)$. As the authors studied one type of $D_4$ $qq$-characters spanning the $\mathbb{C}_{12}^2$ out of the other six possible cases, the BPS/CFT correspondence of the most general spiked instanton system could not be reproduced. It would be interesting to consider other types of $qq$-characters in the context of elliptic quantum toroidal algebra as well. Since the algebra still has a triality symmetry which is the subgroup of the quadrality symmetry, we expect we can construct three types of vertical and horizontal representations (see [69, 139, 153–155, 214]).

Studying interwiners relating these three different types of representations following the line of [207, 208] should give the partition function of intersecting 5d gauge theories. However, we note that since the elliptic parameter $p$ (or $p^*$) is already breaking the quadrality symmetry, the partition function obtained in this way might be the gauge origami partition function of $D_4$-branes wrapping the subspaces of the $\mathbb{C}^3$ part and thus we still can not obtain the full spiked instanton partition function. This is a situation similar to what happened in this paper, where we can choose one screening charge $Q_4(x)$ and the commutativity with this screening charge gives general $qq$-characters reproducing the gauge origami system in the $\mathbb{C}_{123}^3$ subspace. To obtain the complete partition function, we may need a new algebra symmetric in $q_{1,2,3,4}$ with $q_1q_2q_3q_4 = 1$.

**Commuting Hamiltonians and quantum integrable models.** In section 10, we discussed the Bethe ansatz equation of the gauge origami system and related it with the $q$-characters and the associate quantum toroidal algebras. Thm. 10.1, 10.2, 10.4, and Conj. 10.6, imply new types of quantum integrable models. Explicitly deriving the commuting Hamiltonians is an interesting topic. Recent studies [14, 73, 178, 215, 216] gave a way to derive the commuting Hamiltonians by studying surface defects in the gauge origami system. Generalizations of them might help solve this problem.

We also note that the similar Bethe ansatz equations in Conj. 10.6 were proposed in [183] (see also [54, 181, 217] for related works) by studying the $R$-matrices of the quiver Yangians following previous works [218–223]. It was shown in [183] that under suitable assumptions, there is no universal $R$-matrix for some representations, and thus there are obstructions in the Bethe/Gauge correspondence. However, the BPS $q$-characters obtained under the NS limit of the BPS $qq$-characters look to commute with each other and therefore imply commuting Hamiltonians. Therefore, naively we expect to still have Bethe/Gauge correspondence. To fill in this gap, detailed discussions on the BPS $qq$-characters and their truncated versions are necessary. In the historical paper [70], the $q$-characters associated with quantum affine algebras and their relations with deformed $W$-algebras [69] and the $R$-matrices were discussed. Generalization of these works to quantum toroidal $gl_1$ was done in [158, 159]. Understanding the BPS $qq$-characters, BPS $q$-characters, and Bethe ansatz
equations from the R-matrix of quiver quantum toroidal algebras following [69, 70, 158, 159] is also a topic that must be studied.

Acknowledgments

We would like to thank Yalong Cao, Hiroaki Kanno, Hitoshi Konno, Norton Lee, and Hiraku Nakajima for fruitful discussions on the project. The work of TK was supported by CNRS through MITI interdisciplinary programs, EIPHI Graduate School (No. ANR-17-EURE-0002) and Bourgogne-Franche-Comté region. A part of the results in this paper has been presented by TK at XIII Workshop on Geometric Correspondences of Gauge Theories, June 2023, Trieste, Italy, and The 16th MSJ-SI: Elliptic Integrable Systems, Representation Theory and Hypergeometric Functions, July 2023, Tokyo, Japan. He is grateful to the organizers for the invitation and hospitality. GN is supported by JSPS KAKENHI Grant-in-Aid for JSPS fellows Grant No. JP22J20944, JSR Fellowship, and FoPM (WINGS Program), the University of Tokyo. GN is also grateful for the hospitality during his stay in Université de Bourgogne where a part of this work was initiated.

A Special functions

A.1 q-functions

We define the q-shifted factorial as

$$
(z; q)_n = \prod_{m=0}^{n-1} (1 - zq^m). \qquad (A.1)
$$

Taking the limit $n \to \infty$ for $|q| < 1$, we have

$$
(z; q)_{\infty} = \prod_{m=0}^{\infty} (1 - zq^m) = \exp \left( - \sum_{m=1}^{\infty} \frac{z^m}{m(1-q^m)} \right). \quad (A.2)
$$

For the analytic region $|q| > 1$, it is given through analytic continuation

$$
(z; q)_{\infty} = (zq^{-1}; q^{-1})_{\infty}^{-1}. \qquad (A.3)
$$

Note that we have the property

$$
(x; q)_{\infty} = (1-x)(xq; q)_{\infty} \qquad (A.4)
$$

and

$$
(z; q)_n = \frac{(z; q)_{\infty}}{(zq^n; q)_{\infty}} = \exp \left( - \sum_{m=1}^{\infty} \frac{z^m}{m} \frac{1-q^{mn}}{1-q^m} \right). \qquad (A.5)
$$

We also define the multiple version of the q-shifted factorial for $|q_1|, \dots, |q_k| < 1$,$^{43}$

$$
(z; q_1, \dots, q_k)_{\infty} = \prod_{0 \le n_1, \dots, n_k \le \infty} (1 - z q_1^{n_1} \cdots q_k^{n_k}). \qquad (A.6)
$$

$$
\frac{\Gamma_k(xq_i; q_1, \dots, q_k)}{\Gamma_k(q_i; q_1, \dots, q_k)} = \Gamma_{k-1}(x; q_1, \dots, q_i, \dots, q_k).
$$

<footnote>$^{43}$This multiple $q$-shifted factorial is interpreted as a $q$-analog of the multiple gamma function, $\Gamma_k(x; q_1, \dots, q_k) = (z; q_1, \dots, q_k)_{\infty}^{(-1)^k}$ obeying the relation,</footnote>
For other analytic regions, we use

$$ \exp\left(-\sum_{m=1}^{\infty} \frac{z^m}{m} \frac{1}{(1-q_1^m)\cdots(1-q_k^m)}\right) \qquad (A.7) $$

and do a similar process as (A.3).

The one-loop perturbative functions appearing in (3.106), (3.130), (3.147), (3.168) can be rewritten using the q-shifted factorial. For example, for the D2-case in (3.168), we have

$$ \begin{aligned} \mathcal{Z}_{\text{1-loop}}^{\text{D2-D2}}(x, a|x', a) &= \exp\left(-\sum_{n=1}^{\infty} \frac{1}{n} \frac{\mathbf{P}_{\bar{a}}^{[n]} \mathbf{P}_{\bar{a}}^{[-n]}}{\mathbf{P}_{\underline{4}}^{[n]}} \left(\frac{x}{x'}\right)^n\right) \\ &= \begin{cases} \frac{(x/x'; q_a)_\infty \prod_{i \neq a} (q_i q_a x/x'; q_a)_\infty}{(q_a x/x'; q_a)_\infty \prod_{i \neq a} (q_i^{-1} x/x'; q_a)_\infty}, & |q_a| < 1, \\ \frac{(x/x'; q_a^{-1})_\infty \prod_{i \neq a} (q_i^{-1} q_a^{-1} x/x'; q_a^{-1})_\infty}{(q_a^{-1} x/x'; q_a^{-1})_\infty \prod_{i \neq a} (q_i x/x'; q_a^{-1})_\infty}, & |q_a| > 1. \end{cases} \end{aligned} \qquad (A.8) $$

For the D4-case when $A = ab$, $\bar{A} = cd$ and $|q_a|, |q_b| < 1$

$$ \begin{aligned} \mathcal{Z}_{\text{1-loop}}^{\text{D4-D4}}(x, A|x', A) &= \exp\left(-\sum_{n=1}^{\infty} \frac{1}{n} \frac{\mathbf{P}_{\bar{A}}^{[n]} \mathbf{P}_{\bar{A}}^{[-n]}}{\mathbf{P}_{\underline{4}}^{[n]}} \left(\frac{x}{x'}\right)^n\right) \\ &= \frac{(x/x'; q_a, q_b)_\infty (q_c q_d x/x'; q_a, q_b)_\infty}{(q_c x/x'; q_a, q_b)_\infty (q_d x/x'; q_a, q_b)_\infty}. \end{aligned} \qquad (A.9) $$

Other formulas in other analytic regions are written using the reflection formula in (A.3). Similarly, for the D6-case with $|q_i| < 1$ ($i \in \bar{a}$), we have

$$ \begin{aligned} \mathcal{Z}_{\text{1-loop}}^{\text{D6-D6}}(x, \bar{a}|x', \bar{a}) &= \exp\left(-\sum_{n>0} \frac{1}{n} \frac{\mathbf{P}_a^{[n]} \mathbf{P}_a^{[-n]}}{\mathbf{P}_{\underline{4}}^{[n]}} \left(\frac{x}{x'}\right)^n\right) \\ &= \frac{(x/x'; q_b, q_c, q_d)_\infty}{(q_a x/x'; q_b, q_c, q_d)_\infty} \end{aligned} \qquad (A.10) $$

where $b, c, d \in \bar{a}$.

For the D8-case, we have to take care of the analytic region. Since we are imposing the Calabi-Yau condition $q_1q_2q_3q_4 = 1$, we can not simply take all of the parameters in the same analytic region. We choose $|q_1|, |q_2|, |q_3| < 1$ and $|q_4| > 1$. For simplicity, we set $K_1, K_2 = 0$. The one-loop perturbative factor is then written as

$$ \begin{aligned} \mathcal{Z}_{\text{1-loop}}^{\text{D8-D8}}(x, 0|x', 0) &= \exp\left(-\sum_{n>0} \frac{1}{n} \frac{1}{\mathbf{P}_{\underline{4}}^{[n]}} \left(\frac{x}{x'}\right)^n\right) \\ &= \exp\left(\sum_{n>0} \frac{1}{n} \frac{q_4^{-n}}{(1-q_1^n)(1-q_2^n)(1-q_3^n)(1-q_4^{-n})} \left(\frac{x}{x'}\right)^n\right) \qquad (A.11) \\ &= (q_4^{-1} x/x'; q_1, q_2, q_3, q_4^{-1})_\infty^{-1}. \end{aligned} $$

Other analytic regions can be obtained similarly using the reflection formula (A.3).
## A.2 Elliptic formulas

Let us also introduce the elliptic formulas used in the main section:

$$ \theta(x; p) = (x; p)_{\infty}(px^{-1}; p)_{\infty} = \exp\left(-\sum_{m \neq 0} \frac{x^m}{m(1-p^m)}\right), \quad |p| < 1. \qquad (A.12) $$

We have the following reflection property

$$ \theta(x^{-1}; p) = -x^{-1}\theta(x; p). \qquad (A.13) $$

To study the commutativity of the elliptic $qq$-characters and the elliptic deformed screening currents, one can use the following formulas.

### Theorem A.1.

$$ \delta(x) = \frac{1}{1-x} + \frac{x^{-1}}{1-x^{-1}}, \quad \frac{\delta(x)}{(p;p)_{\infty}^2} = \frac{1}{\theta(x;p)} + \frac{x^{-1}}{\theta(x^{-1};p)} \qquad (A.14) $$

*Proof.* The first equation is well known. The second one is obtained using the first one as

$$ \begin{aligned} \frac{1}{\theta(x;p)} &= \frac{1}{(x;p)_{\infty}(px^{-1};p)_{\infty}} = \frac{1}{(1-x)(x;p)_{\infty}(px^{-1};p)_{\infty}} \\ &= \left(\delta(x) - \frac{x^{-1}}{1-x^{-1}}\right) \frac{1}{(xp;p)_{\infty}(px^{-1};p)_{\infty}} = \frac{\delta(x)}{(p;p)_{\infty}^2} - \frac{x^{-1}}{\theta(x^{-1};p)}. \end{aligned} \qquad (A.15) $$

□

## B U(1) partition functions and structure functions

In this section, we summarize some properties of the functions frequently used in the main text. We also give the explicit formulas of the U(1) partition functions for the D2, D4, D6 theories.

### B.1 Structure functions

The structure functions in (3.67) were defined as

$$ \begin{aligned} \mathcal{V}_a(x) &= \mathbb{I}[-\mathbf{P}_a^\vee x^\vee] = \frac{1 - q_a x}{1 - x}, \\ \mathcal{S}_{ab}(x) &= \mathbb{I}[-\mathbf{P}_{ab}^\vee x^\vee] = \frac{(1 - q_a x)(1 - q_b x)}{(1 - x)(1 - q_a q_b x)}, \\ g_{\bar{a}}(x) &= \mathbb{I}[-\mathbf{P}_{\bar{a}}^\vee x^\vee] = \frac{\prod_{i \neq a} (1 - q_i x)(1 - q_{\bar{a}} x)}{(1 - x) \prod_{i \neq a} (1 - q_{\bar{a}}^{-1} q_i^{-1} x)}, \end{aligned} \qquad (B.1) $$

$$ \mathcal{A}_{\mathbb{C}^4}(x) = \mathbb{I}[-\mathbf{P}_{\mathbb{C}^4}^\vee x^\vee] = \frac{\prod_{i=1}^{4} (1 - q_i x) \prod_{i=1}^{4} (1 - q_i^{-1} x)}{(1 - x)^2 \prod_{i \neq j} (1 - q_i q_j x)}. $$

We have the following properties

$$ S_{ab}(x) = \frac{\mathcal{V}_a(x)}{\mathcal{V}_a(q_b x)}, \quad g_{abc}(x) = \frac{S_{ab}(x)}{S_{ab}(q_c x)}, \quad \mathcal{A}_{\mathbb{C}^4}(x) = \frac{g_{\bar{a}}(x)}{g_{\bar{a}}(q_a x)} \qquad (B.2) $$
and the reflection formulas

$$ V_a(x) = q_a V_a(q_a^{-1}x^{-1})^{-1}, \quad S_{ab}(x) = S_{ab}(q_{ab}^{-1}x^{-1}), \quad g_{\bar{a}}(x) = g_{\bar{a}}(q_a x^{-1})^{-1}, \quad A_{\mathbb{C}^4}(x) = A_{\mathbb{C}^4}(x^{-1}). \tag{B.3} $$

The following functions were also defined to study the recursion formulas of the Nekrasov factors for D2, D4, D6 theories. They are determined from the index of the observable bundles $\mathbf{Y}_a$ in (3.149), $\mathbf{Y}_A$ in (3.131), $\mathbf{Y}_{\bar{a}}$ in (3.107) for each theory after localization:

$$ \begin{aligned} U_{k,v}^a(x) &= \mathbb{I}[\mathbf{Y}_a^\vee x] = \left(1 - \frac{v}{x}\right) \prod_{\square \in k} V_a\left(\frac{\chi_{a,v}(\square)}{x}\right) = \left(1 - \frac{vq_a^k}{x}\right), \\ Y_{\lambda,v}^A(x) &= \mathbb{I}[\mathbf{Y}_A^\vee x] = \left(1 - \frac{v}{x}\right) \prod_{\square \in \lambda} S_A\left(\frac{\chi_{A,v}(\square)}{x}\right) = \frac{\prod_{\square \in A(\lambda)} (1 - \chi_{A,v}(\square)/x)}{\prod_{\square \in R(\lambda)} (1 - q_A \chi_{A,v}(\square)/x)}, \\ W_{\pi,v}^{\bar{a}}(x) &= \mathbb{I}[\mathbf{Y}_{\bar{a}}^\vee x] = \left(1 - \frac{v}{x}\right) \prod_{\square \in \pi} g_{\bar{a}}\left(\frac{\chi_{\bar{a},v}(\square)}{x}\right) \propto \prod_{\square \in A(\pi)} \left(1 - \frac{\chi_{\bar{a},v}(\square)}{x}\right) \prod_{\square \in R(\pi)} \left(1 - q_a^{-1} \frac{\chi_{\bar{a},v}(\square)}{x}\right). \end{aligned} \tag{B.4} $$

Although we did not use it in the main text, we formally can define a similar function for the D8-$\overline{D8}$ case using $\mathbf{Y}$ in (3.92)

$$ \mathcal{M}_{\rho, \nu}^{K}(x) = \mathbb{I}[\mathbf{Y}^{\vee} x] = \frac{(1 - v/x)}{(1 - K v/x)} \prod_{\mathbb{G} \in \rho} \mathcal{A}_{\mathbb{C}^4} \left( \frac{\chi_{\mathbf{4},v}(\mathbb{G})}{x} \right). \tag{B.5} $$

We can also define the dual functions as

$$ \begin{aligned} U_{k,v}^{a \vee}(x) &= \mathbb{I}[\mathbf{Y}_a x^{\vee}] = \left(1 - \frac{x}{v}\right) \prod_{\square \in k} V_a\left(q_a^{-1} \frac{x}{\chi_{a,v}(\square)}\right)^{-1} = \left(1 - \frac{x}{vq_a^k}\right), \\ Y_{\lambda,v}^{A \vee}(x) &= \mathbb{I}[\mathbf{Y}_A x^{\vee}] = \left(1 - \frac{x}{v}\right) \prod_{\square \in \lambda} S_A\left(q_A^{-1} \frac{x}{\chi_{A,v}(\square)}\right), \\ W_{\pi,v}^{\bar{a} \vee}(x) &= \mathbb{I}[\mathbf{Y}_{\bar{a}} x^{\vee}] = \left(1 - \frac{x}{v}\right) \prod_{\square \in \pi} g_{\bar{a}}\left(q_a \frac{x}{\chi_{\bar{a},v}(\square)}\right)^{-1}, \\ \mathcal{M}_{\rho, \nu}^{K \vee}(x) &= \mathbb{I}[\mathbf{Y}_4 x^{\vee}] = \frac{(1 - x/v)}{(1 - K^{-1}x/v)} \prod_{\square \in \rho} \mathcal{A}_{\mathbb{C}^4} \left( \frac{x}{\chi_{4,v}(\square)} \right). \end{aligned} \tag{B.6} $$

Note that we have the following reflection formulas

$$ \begin{aligned} U_{k,v}^{a \vee}(x) &= \left(-\frac{x}{vq_a^k}\right) U_{k,v}^{a}(x), & Y_{\lambda,v}^{A \vee}(x) &= \left(-\frac{x}{v}\right) Y_{\lambda,v}^{A}(x), \\ W_{\pi,v}^{\bar{a} \vee}(x) &= \left(-\frac{x}{v}\right) W_{\pi,v}^{\bar{a}}(x), & \mathcal{M}_{\rho,v}^{K \vee}(x) &= K \mathcal{M}_{\rho,v}^{K}(x). \end{aligned} \tag{B.7} $$

## B.2 Examples of structure functions

Let us list some explicit formulas for low levels. For the D2 case, one can easily use the formula in (B.4) so we omit it.
**D4 structure function.** We focus on $Y_{\lambda,v}^{12}(x)$, and other cases are simply obtained by the symmetries of the parameters. The 2d partitions are denoted as

$$ \{\lambda_1, \lambda_2, \dots, \lambda_{\ell(\lambda)}\} \qquad (B.8) $$

where the q-coordinates are

$$ v q_1^{i-1} q_2^{j-1}, \quad 1 \le i \le \ell(\lambda), \quad 1 \le j \le \lambda_i. \qquad (B.9) $$

Up to level $|\lambda| = 3$, we have the following functions.

<table><thead><tr><th>Young diagram λ</th><th>Y<sup>12</sup><sub>λ,v</sub>(x)</th></tr></thead><tbody><tr><td>∅</td><td>(1 - v/x)</td></tr><tr><td>{1}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub>v/x) / (1 - q<sub>1</sub>q<sub>2</sub>v/x)</td></tr><tr><td>{1, 1}</td><td>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>v/x) / (1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)</td></tr><tr><td>{2}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x) / (1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)</td></tr><tr><td>{1, 1, 1}</td><td>(1 - q<sub>1</sub><sup>3</sup>v/x)(1 - q<sub>2</sub>v/x) / (1 - q<sub>1</sub><sup>3</sup>q<sub>2</sub>v/x)</td></tr><tr><td>{2, 1}</td><td>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x) / (1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)</td></tr><tr><td>{3}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub><sup>3</sup>v/x) / (1 - q<sub>1</sub>q<sub>2</sub><sup>3</sup>v/x)</td></tr></tbody></table>

**D6 structure function.** For the D6-case, we focus only on $W_{\pi,v}^4(x)$. The plane partitions are denoted as lists of numbers as

$$ \{\{\pi_{11}, \pi_{12}, \dots, \pi_{1n_1}\}, \{\pi_{21}, \pi_{22}, \dots, \pi_{2n_2}\} \dots \{\pi_{m1}, \pi_{m2}, \dots, \pi_{mn_m}\}\} \qquad (B.10) $$

where we used the (2, 1)-type description. The q-coordinates of the boxes in the plane partition will be

$$ v q_1^{i-1} q_2^{j-1} q_3^{k-1}, \quad 1 \le i \le m, \quad 1 \le j \le n_i, \quad 1 \le k \le \pi_{ij}. \qquad (B.11) $$

Denoting the number of boxes as $k = |\pi|$, we have the following functions up to level $k = 3$.
<table><thead><tr><th>plane partition π</th><th>W<sup>4</sup><sub>π,v</sub>(x)</th></tr></thead><tbody><tr><td>∅</td><td>(1 - v/x)</td></tr><tr><td>{{1}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)<br>(1 - q<sub>1</sub>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub>q<sub>3</sub>v/x)</td></tr><tr><td>{{1}, {1}}</td><td>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>q<sub>3</sub>v/x)<br>(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>3</sub>v/x)(1 - q<sub>2</sub>q<sub>3</sub>v/x)</td></tr><tr><td>{{2}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)<br>(1 - q<sub>1</sub>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)</td></tr><tr><td>{{1, 1}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>q<sub>3</sub>v/x)<br>(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)</td></tr><tr><td>{{3}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub><sup>3</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>3</sup>v/x)<br>(1 - q<sub>1</sub>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>3</sub><sup>3</sup>v/x)(1 - q<sub>2</sub>q<sub>3</sub><sup>3</sup>v/x)</td></tr><tr><td>{{2, 1}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>q<sub>3</sub>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)<br>(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)</td></tr><tr><td>{{1, 1, 1}}</td><td>(1 - q<sub>1</sub>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub><sup>3</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)<br>(1 - q<sub>1</sub>q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub><sup>3</sup>q<sub>3</sub>v/x)</td></tr><tr><td>{{2}, {1}}</td><td>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)<br>(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>2</sub><sup>2</sup>q<sub>3</sub>v/x)<br>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>q<sub>3</sub>v/x)</td></tr><tr><td>{{1, 1}, {1}}</td><td>(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>3</sub><sup>2</sup>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)<br>(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub><sup>2</sup>v/x)(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub><sup>2</sup>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x)<br>(1 - q<sub>1</sub><sup>2</sup>v/x)(1 - q<sub>2</sub>v/x)(1 - q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>2</sub><sup>2</sup>v/x)</td></tr><tr><td>{{1}, {1}, {1}}</td><td>(1 - q<sub>3</sub><sup>3</sup>q<sub>2</sub>v/x)(1 - q<sub>3</sub><sup>3</sup>q<sub>3</sub>v/x)(1 - q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>v/x)<br>(1 - q<sub>3</sub><sup>3</sup>q<sub>2</sub>v/x)(1 - q<sub>3</sub><sup>3</sup>q<sub>3</sub>v/x)(1 - q<sub>2</sub>q<sub>3</sub>v/x)(1 - q<sub>1</sub>q<sub>2</sub>q<sub>3</sub><sup>2</sup>v/x)</td></tr></tbody></table>

## B.3 D6 partition functions

The partition function of the 7d U(1) theory on $\mathbb{C}_a^3 \times \mathbb{S}^1$ is given from

$$Z_{\tilde{a}}^{\text{D6}}[\pi] = \frac{1}{\mathbb{N}_{\tilde{a}}(v, \pi | v, \pi)}, \quad \tilde{Z}_{\tilde{a}}^{\text{D6}}[\pi] = \prod_{\mathcal{D} \in \pi} \left( -\frac{q_a v}{\chi_{\tilde{a},v}(\mathcal{D})} \right) Z_{\tilde{a}}^{\text{D6}}[\pi], \qquad (\text{B.12})$$

where

$$\mathbb{N}_{\tilde{a}}(v, \pi | v, \pi) = \prod_{\mathcal{D} \in \pi} \frac{(1 - v/\chi_{\tilde{a},v}(\mathcal{D}))}{(1 - q_a^{-1} \chi_{\tilde{a},v}(\mathcal{D})/v)} \prod_{\substack{\mathcal{D} \in \pi \\ \mathcal{D} \neq \pi}} g_{\tilde{a}} \left( \frac{\chi_{\tilde{a},v}(\mathcal{D})}{\chi_{\tilde{a},v}(\mathcal{D})} \right). \qquad (\text{B.13})$$

For simplicity, we only consider $a = 4$ and $Z_4^{\text{D6}}[\pi]$. Note that this comes from the following character:

$$\mathbf{v}_{\text{inst}} = -\mathbf{N}_{123}^{\vee} \mathbf{K}_{123} + q_4 \mathbf{K}_{123}^{\vee} \mathbf{N}_{123} + \mathbf{P}_{123}^{\vee} \mathbf{K}_{123}^{\vee} \mathbf{K}_{123}, \\ \mathbf{N}_{123} = v, \quad \mathbf{K}_{123} = \sum_{\mathcal{D} \in \pi} \chi_{123,v}(\mathcal{D}) = \sum_{(x,y,z) \in \pi} v q_1^{x-1} q_2^{y-1} q_3^{z-1}. \qquad (\text{B.14})$$
The generating function of the plane partition is referred to as the MacMahon function, which is given as

$$Z_3(q) = \sum_{\pi} q^{\lvert\pi\rvert} = \prod_{n=1}^{\infty} \frac{1}{(1-q^n)^n} = 1 + q + 3q^2 + 6q^3 + 13q^4 + \dots \quad (B.15)$$

For levels of instanton $k = |\pi| \le 3$, the U(1) contribution is given as the following.

$$\bullet \quad k = 0, \pi = \emptyset: \qquad 1 \qquad (B.16)$$

$$\bullet \quad k = 1, \pi = \{\{1\}\}: \qquad \frac{(1 - q_1 q_2)(1 - q_1 q_3)(1 - q_2 q_3)}{(1 - q_1)(1 - q_2)(1 - q_3)} \qquad (B.17)$$

$$\bullet \quad k = 2: \qquad \pi = \{\{1\}, \{1\}\}: \qquad \frac{q_1(1-q_1q_2)(1-q_1^2q_2)(1-q_1q_3)(1-q_1^2q_3)(q_1-q_2q_3)}{(1-q_1)(1-q_1^2)(1-q_2)(q_1-q_2)(1-q_3)(q_1-q_3)}, \\ \pi = \{\{2\}\}: \qquad \frac{(1-q_1q_2)q_3(-q_1q_2+q_3)(1-q_1q_3)(1-q_2q_3)(1-q_1q_3^2)(1-q_2q_3^2)}{(1-q_1)(1-q_2)(1-q_3)(-q_1+q_3)(-q_2+q_3)(1-q_3^2)}, \\ \pi = \{\{1, 1\}\}: \qquad \frac{q_2(1-q_1q_2)(1-q_1q_2^2)(1-q_1q_3)(q_2-q_1q_3)(1-q_2q_3)(1-q_2^2q_3)}{(1-q_1)(1-q_2)(-q_1+q_2)(1-q_2^2)(1-q_3)(q_2-q_3)} \quad (B.18)$$

$$\bullet \quad k = 3: \qquad \pi = \{\{3\}\}: \qquad \frac{(1-q_1q_2)q_3^3(-q_1q_2+q_3)(1-q_1q_3)(1-q_2q_3)(-q_1q_2+q_3^2)(1-q_1q_3^2)(1-q_2q_3^2)(1-q_1q_3^3)(1-q_2q_3^3)}{(1-q_1)(1-q_2)(1-q_3)(-q_1+q_3)(-q_2+q_3)(1-q_3^2)(-q_1+q_3^2)(-q_2+q_3^2)(1-q_3^3)} \\ \qquad \pi = \{\{2, 1\}\}: \qquad \frac{q_2(1-q_1q_2)^2q_3(-q_1q_2^2+q_3)(1-q_1q_3)^2(1-q_2q_3)(1-q_2^2q_3)(q_2-q_1q_3^2)}{(1-q_1)(1-q_2)^2(-q_1+q_2)(1-q_3)^2(-q_1+q_3)(-q_2^2+q_3)(q_2-q_3^2)} \\ \qquad \pi = \{\{1, 1, 1\}\}: \qquad \frac{q_2^3(1-q_1q_2)(1-q_1q_2^2)(1-q_1q_3^2)(1-q_1q_3)(q_2-q_1q_3)(q_2^2-q_1q_3)(1-q_2q_3)(1-q_2^2q_3)(1-q_2^3q_3)}{(1-q_1)(1-q_2)(-q_1+q_2)(1-q_2^2)(-q_1+q_2^2)(1-q_3^2)(1-q_3)(q_2-q_3)(q_2^2-q_3)} \\ \qquad \pi = \{\{2\}, \{1\}\}: \qquad \frac{q_1(1-q_1q_2)^2q_3(-q_1^2q_2+q_3)(1-q_1q_3)(1-q_1^2q_3)(1-q_2q_3)^2(1-q_1q_3^2)(q_1-q_2q_3^2)}{(1-q_1)^2(1-q_2)(q_1-q_2)(1-q_3)^2(-q_1^2+q_3)(-q_2+q_3)(q_1-q_3^2)} \\ \qquad \pi = \{\{1, 1\}\{1\}\}: \qquad \frac{q_1q_2(1-q_1q_2)(1-q_1^2q_2)(1-q_1q_2^2)(1-q_1q_3)^2(q_2-q_1^2q_3)(1-q_2q_3)^2(q_1-q_2^2q_3)}{(1-q_1)^2(1-q_2)^2(-q_1^2+q_2)(q_1-q_2^2)(1-q_3)(q_1-q_3)(q_2-q_3)} \\ \qquad \pi = \{\{1\}, \{1\}, \{1\}\}: \qquad \frac{q_1^3(1-q_1q_2)(1-q_1^2q_2)(1-q_1^3q_2)(1-q_1q_3)(1-q_1^2q_3)(1-q_1^3q_3)(1-q_2q_3)(q_1-q_2q_3)(q_1^2-q_2q_3)}{(1-q_1)(1-q_1^2)(1-q_1^3)(1-q_2)(q_1-q_2)(q_1^2-q_2^2)(1-q_3)(q_1-q_3)(q_1^2-q_3)} \quad (B.19)$$
Therefore, in the simplest case when there is only one box in the plane partition, we have

$$ \tilde{Z}_4^{\text{D6}}[\{\{1\}\}] = \frac{(1-q_1 q_2)(1-q_1 q_3)(1-q_2 q_3)}{(1-q_1)(1-q_2)(1-q_3)}, \quad \tilde{Z}_4^{\text{D6}}[\{\{1\}\}] = -q_4 \frac{(1-q_1 q_2)(1-q_1 q_3)(1-q_2 q_3)}{(1-q_1)(1-q_2)(1-q_3)}. \qquad (B.20) $$

Under the NS limit $q_4 \to 1$ and $q_{1,2,3} \to q_{1,2,3}$, the partition function becomes trivial: $\tilde{Z}_4^{\text{D6}}[\pi] = 1$. For example, we have

$$ \tilde{Z}_4^{\text{D6}}[\{\{1\}\}] \to - \frac{(1 - q_1 q_2)(1 - q_1 q_3)(1 - q_2 q_3)}{(1 - q_1)(1 - q_2)(1 - q_3)} = 1. \qquad (B.21) $$

Hence, under this limit the total U(1) partition function becomes the MacMahon function:

$$ \tilde{Z}_{4, \text{inst.}}^{\text{D6}}[\text{U}(1)] = \sum_{\pi} q^{|\pi|} \tilde{Z}_{4}^{\text{D6}}[\pi] \xrightarrow{q_4 \to 1} Z_3(q) = \sum_{\pi} q^{|\pi|}. \qquad (B.22) $$

**Recursion formulas.** For low levels, using the explicit form of the partition functions, we can write down the recursion formula for $\tilde{Z}_4^{\text{D6}}[\pi]$ as

<table><thead><tr><th>π</th><th>π + ⌢</th><th>χ<sub>4,v</sub>(⌢)</th><th>Z<sub>4</sub><sup>D6</sup>[π + ⌢]/Z<sub>4</sub><sup>D6</sup>[π]</th></tr></thead><tbody><tr><td>0</td><td>{1}</td><td>v</td><td>(1-q<sub>1</sub>q<sub>2</sub>)(1-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)(1-q<sub>3</sub>)</td></tr><tr><td>{1}</td><td>{1}, {1}</td><td>νq<sub>1</sub></td><td>(q<sub>1</sub>(1-q<sub>1</sub><sup>2</sup>q<sub>2</sub>)(1-q<sub>1</sub><sup>2</sup>q<sub>3</sub>)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub>)(q<sub>1</sub>-q<sub>3</sub>)</td></tr><tr><td>{1}</td><td>{2}</td><td>νq<sub>3</sub></td><td>(q<sub>3</sub>(q<sub>3</sub>-q<sub>1</sub>q<sub>2</sub>)(1-q<sub>1</sub>q<sub>3</sub><sup>2</sup>)(1-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (q<sub>3</sub>-q<sub>1</sub>)(q<sub>3</sub>-q<sub>2</sub>)(1-q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{1}</td><td>{1, 1}</td><td>νq<sub>2</sub></td><td>(q<sub>2</sub>(1-q<sub>1</sub>q<sub>2</sub><sup>2</sup>)(q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (q<sub>2</sub>-q<sub>1</sub>)(1-q<sub>2</sub><sup>2</sup>)(q<sub>2</sub>-q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{1}, {1}, {1}</td><td>νq<sub>1</sub><sup>2</sup></td><td>(q<sub>1</sub><sup>2</sup>(1-q<sub>1</sub><sup>3</sup>q<sub>2</sub>)(1-q<sub>1</sub><sup>3</sup>q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub><sup>3</sup>)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)(q<sub>1</sub><sup>2</sup>-q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{1, 1}, {1}</td><td>νq<sub>2</sub></td><td>(1-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub>)q<sub>2</sub>(1-q<sub>1</sub>q<sub>2</sub><sup>2</sup>)(1-q<sub>1</sub>q<sub>3</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>q<sub>3</sub>) (1-q<sub>2</sub>q<sub>3</sub>)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>2</sub>-q<sub>3</sub>)(1-q<sub>1</sub><sup>2</sup>q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{2}, {1}</td><td>νq<sub>3</sub></td><td>(1-q<sub>1</sub><sup>2</sup>)(1-q<sub>1</sub>q<sub>2</sub>)(q<sub>1</sub>-q<sub>3</sub>)q<sub>3</sub>(q<sub>3</sub>-q<sub>1</sub><sup>2</sup>q<sub>2</sub>) (1-q<sub>2</sub>q<sub>3</sub>)(1-q<sub>1</sub>q<sub>3</sub><sup>2</sup>) (q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (1-q<sub>1</sub>)(1-q<sub>1</sub><sup>2</sup>q<sub>2</sub>)(1-q<sub>3</sub>)(q<sub>3</sub>-q<sub>1</sub><sup>2</sup>)(q<sub>3</sub>-q<sub>2</sub>)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) (q<sub>1</sub>-q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{2}</td><td>{2}, {1}</td><td>νq<sub>1</sub></td><td>(q<sub>1</sub>(1-q<sub>1</sub>q<sub>2</sub>)(q<sub>3</sub>-q<sub>1</sub>)(q<sub>3</sub>-q<sub>1</sub><sup>2</sup>q<sub>2</sub>) (1-q<sub>1</sub><sup>2</sup>q<sub>3</sub>)(1-q<sub>2</sub>q<sub>3</sub>) (1-q<sub>3</sub><sup>2</sup>) (q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (1-q<sub>1</sub>)(q<sub>1</sub>-q<sub>2</sub>)(1-q<sub>3</sub>)(q<sub>3</sub>-q<sub>1</sub><sup>2</sup>)(q<sub>3</sub>-q<sub>1</sub>q<sub>2</sub>) (q<sub>1</sub>-q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{2}</td><td>{2, 1}</td><td>νq<sub>2</sub></td><td>(q<sub>2</sub>(1-q<sub>1</sub>q<sub>2</sub>)(q<sub>3</sub>-q<sub>2</sub>) (q<sub>3</sub>-q<sub>1</sub>q<sub>2</sub><sup>2</sup>) (1-q<sub>1</sub>q<sub>3</sub>) (1-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) (1-q<sub>3</sub><sup>2</sup>) (q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub><sup>2</sup>) / (1-q<sub>2</sub>)(q<sub>2</sub>-q<sub>1</sub>)(1-q<sub>3</sub>)(q<sub>3</sub>-q<sub>1</sub>q<sub>2</sub>) (q<sub>3</sub>-q<sub>2</sub><sup>2</sup>) (q<sub>2</sub>-q<sub>3</sub><sup>2</sup>) (1-q<sub>1</sub>q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{2}</td><td>{3}</td><td>νq<sub>3</sub><sup>2</sup></td><td>(q<sub>3</sub><sup>2</sup>(q<sub>3</sub><sup>2</sup>-q<sub>1</sub>q<sub>2</sub>) (1-q<sub>1</sub>q<sub>3</sub><sup>2</sup>) (1-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (q<sub>3</sub><sup>2</sup>-q<sub>1</sub>) (q<sub>3</sub><sup>2</sup>-q<sub>2</sub>) (1-q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{1, 1}</td><td>{1, 1, 1}</td><td>νq<sub>2</sub><sup>2</sup></td><td>(q<sub>2</sub><sup>2</sup>(1-q<sub>1</sub>q<sub>2</sub><sup>2</sup>) (q<sub>2</sub><sup>2</sup>-q<sub>1</sub>q<sub>3</sub>) (1-q<sub>3</sub><sup>2</sup>q<sub>3</sub>) / (q<sub>2</sub><sup>2</sup>-q<sub>1</sub>) (1-q<sub>3</sub><sup>2</sup>) (q<sub>2</sub><sup>2</sup>-q<sub>3</sub>)</td></tr><tr><td>{1, 1}</td><td>{1, 1}, {1}</td><td>νq<sub>1</sub></td><td>(q<sub>1</sub>(q<sub>2</sub>-q<sub>1</sub>)(1-q<sub>1</sub><sup>2</sup>q<sub>2</sub>) (1-q<sub>2</sub><sup>2</sup>) (1-q<sub>1</sub>q<sub>3</sub>) (q<sub>2</sub>-q<sub>1</sub><sup>2</sup>q<sub>3</sub>) (1-q<sub>2</sub>q<sub>3</sub>) (q<sub>1</sub>-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>) (q<sub>2</sub>-q<sub>1</sub><sup>2</sup>) (q<sub>1</sub>-q<sub>2</sub><sup>2</sup>) (q<sub>1</sub>-q<sub>3</sub>) (q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>) (1-q<sub>2</sub><sup>2</sup>q<sub>3</sub>)</td></tr><tr><td>{1, 1}</td><td>{2, 1}</td><td>νq<sub>3</sub></td><td>(1-q<sub>1</sub>q<sub>2</sub>) (1-q<sub>2</sub><sup>2</sup>) (q<sub>2</sub>-q<sub>3</sub>)q<sub>3</sub>(q<sub>3</sub>-q<sub>1</sub>q<sub>2</sub><sup>2</sup>) (1-q<sub>1</sub>q<sub>3</sub>) (q<sub>2</sub>-q<sub>1</sub><sup>2</sup>q<sub>3</sub>) (1-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (1-q<sub>2</sub>) (1-q<sub>1</sub>q<sub>2</sub><sup>2</sup>) (1-q<sub>3</sub>) (q<sub>3</sub>-q<sub>1</sub>) (q<sub>3</sub>-q<sub>2</sub><sup>2</sup>) (q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>) (q<sub>2</sub>-q<sub>3</sub><sup>2</sup>)</td></tr></tbody></table>
Using the explicit forms of $\tilde{W}^{\bar{4}}_{\pi,v}(x)$, we can compute the following function for low levels:

$$ \frac{\mathrm{Res}_{x=\chi_{\bar{4},v}(\mathfrak{D})} x^{-1} \tilde{W}^{\bar{4}}_{\pi,v}(x)^{-1}}{\mathrm{Res}_{x=\chi_{\bar{4},v}(\mathfrak{D})} x^{-1} \tilde{W}^{\bar{4}}_{\pi+\mathfrak{D},v}(q_4^{-1}x)^{-1}} \quad (B.23) $$

where note that $\mathrm{Res}_{x'=q_4\chi_{\bar{4},x}(\mathfrak{D})} x'^{-1}\tilde{W}^{\bar{4}}_{\pi,x}(q_4^{-1}x')^{-1} = \mathrm{Res}_{x=\chi_{\bar{4},v}(\mathfrak{D})} x^{-1}\tilde{W}^{\bar{4}}_{\pi,v}(x)^{-1}$. The results are

<table><thead><tr><th>π</th><th>π + ⧸</th><th>χ<sub>4,v</sub>()</th><th>Res<sub>x=χ<sub>4,v</sub>(ق)</sub> x<sup>-1</sup>W<sup>4</sup><sub>π,v</sub>(x)<sup>-1</sup><br>Res<sub>x=χ<sub>4,v</sub>(ق)</sub> x<sup>-1</sup>W<sup>4</sup><sub>π+ق,v</sub>(q<sub>4</sub><sup>-1</sup>x)<sup>-1</sup></th></tr></thead><tbody><tr><td>Ø</td><td>{1}</td><td>v</td><td>q<sub>123</sub><sup>-1</sup> (1-q<sub>1</sub>q<sub>2</sub>)(1-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)(1-q<sub>3</sub>)</td></tr><tr><td>{1}</td><td>{1}, {1}</td><td>νq<sub>1</sub></td><td>- (q<sub>1</sub><sup>2</sup>q<sub>2</sub>-1)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) / (q<sub>1</sub>(q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>2</sub>)q<sub>2</sub>(q<sub>1</sub>-q<sub>3</sub>)q<sub>3</sub>)</td></tr><tr><td>{1}</td><td>{2}</td><td>νq<sub>3</sub></td><td>(q<sub>1</sub>q<sub>2</sub>-q<sub>3</sub>)(q<sub>1</sub>q<sub>3</sub><sup>2</sup>-1)(q<sub>2</sub>q<sub>3</sub><sup>2</sup>-1) / (q<sub>1</sub>q<sub>2</sub>(q<sub>1</sub>-q<sub>3</sub>)(q<sub>2</sub>-q<sub>3</sub>))q<sub>3</sub>(q<sub>3</sub><sup>2</sup>-1)</td></tr><tr><td>{1}</td><td>{1, 1}</td><td>νq<sub>2</sub></td><td>- (q<sub>1</sub>q<sub>2</sub><sup>2</sup>-1)(q<sub>1</sub>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub><sup>2</sup>q<sub>3</sub>-1) / (q<sub>1</sub>(q<sub>1</sub>-q<sub>2</sub>)q<sub>2</sub>(q<sub>2</sub><sup>2</sup>-1)(q<sub>2</sub>-q<sub>3</sub>)q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{1}, {1}, {1}</td><td>νq<sub>1</sub><sup>2</sup></td><td>- (q<sub>1</sub><sup>3</sup>q<sub>2</sub>-1)(q<sub>1</sub><sup>3</sup>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>q<sub>3</sub>) / (q<sub>1</sub>(q<sub>1</sub><sup>3</sup>-1)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)q<sub>2</sub>(q<sub>1</sub><sup>2</sup>-q<sub>3</sub>)q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{1, 1}, {1}</td><td>νq<sub>2</sub></td><td>- (q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>2</sub>)(q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-q<sub>2</sub>) / (q<sub>1</sub>-1)q<sub>1</sub>(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)(q<sub>2</sub>-1)q<sub>2</sub>(q<sub>1</sub>-q<sub>2</sub>) / (q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>)</td></tr><tr><td>{1}, {1}</td><td>{2}, {1}</td><td>νq<sub>3</sub></td><td>(q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>q<sub>2</sub>-1)(q<sub>1</sub>-q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>q<sub>2</sub>-q<sub>3</sub>)(q<sub>2</sub>q<sub>3</sub>-1)(q<sub>1</sub>q<sub>3</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) / (q<sub>1</sub>-1)q<sub>1</sub>q<sub>2</sub>(q<sub>1</sub><sup>2</sup>q<sub>2</sub>-1)(q<sub>1</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>2</sub>-q<sub>3</sub>)(q<sub>3</sub>-1)q<sub>3</sub>(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>)(q<sub>1</sub>-q<sub>3</sub><sup>2</sup>)</td></tr><tr><td>{2}</td><td>{2}, {1}</td><td>νq<sub>1</sub></td><td>- (q<sub>1</sub>q<sub>2</sub>-1)(q<sub>1</sub>-q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>q<sub>2</sub>-q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>2</sub>q<sub>3</sub>-1)(q<sub>3</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub><sup>2</sup>) / (q<sub>1</sub>-1)q<sub>1</sub>(q<sub>1</sub>-q<sub>2</sub>)q<sub>2</sub>(q<sub>1</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>1</sub>q<sub>2</sub>-q<sub>3</sub>)(q<sub>3</sub>-1)q<sub>3</sub>(q<sub>1</sub>-q<sub>3</sub><sup>2</sup>)(q<sub>2</sub>q<sub>3</sub><sup>2</sup>-1)</td></tr><tr><td>{2}</td><td>{2, 1}</td><td>νq<sub>2</sub></td><td>- (q<sub>1</sub>q<sub>2</sub>-1)(q<sub>2</sub>-q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>q<sub>2</sub>-q<sub>3</sub>)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>2</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>3</sub><sup>2</sup>-1)(q<sub>1</sub><sup>2</sup>q<sub>2</sub>) / (q<sub>1</sub>(q<sub>1</sub>-q<sub>2</sub>)(q<sub>2</sub>-1)q<sub>2</sub>(q<sub>1</sub>q<sub>2</sub>-q<sub>3</sub>)(q<sub>2</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>3</sub>-1)q<sub>3</sub>(q<sub>2</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1))</td></tr><tr><td>{2}</td><td>{3}</td><td>νq<sub>3</sub><sup>2</sup></td><td>(q<sub>1</sub>q<sub>2</sub>-q<sub>3</sub><sup>2</sup>)(q<sub>1</sub>q<sub>3</sub><sup>2</sup>-1)(q<sub>2</sub>q<sub>3</sub><sup>2</sup>-1) / (q<sub>1</sub>q<sub>2</sub>q<sub>3</sub>(q<sub>1</sub>-q<sub>3</sub><sup>2</sup>)(q<sub>2</sub>-q<sub>3</sub><sup>2</sup>)(q<sub>3</sub><sup>2</sup>-1))</td></tr><tr><td>{1, 1}</td><td>{1, 1, 1}</td><td>νq<sub>2</sub><sup>2</sup></td><td>- (q<sub>1</sub>q<sub>3</sub><sup>2</sup>-1)(q<sub>1</sub>q<sub>3</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>3</sub><sup>2</sup>q<sub>3</sub>-1) / (q<sub>1</sub>q<sub>2</sub>(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>2</sub><sup>2</sup>-1)(q<sub>2</sub>-q<sub>3</sub>)q<sub>3</sub>)</td></tr><tr><td>{1, 1}</td><td>{1, 1}, {1}</td><td>νq<sub>1</sub></td><td>- (q<sub>1</sub>-q<sub>2</sub>)(q<sub>1</sub><sup>2</sup>q<sub>2</sub>-1)(q<sub>2</sub><sup>2</sup>-1)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-q<sub>2</sub>) / (q<sub>1</sub>-1)q<sub>1</sub>(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)(q<sub>2</sub>-1)q<sub>2</sub>(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>3</sub>)q<sub>3</sub>(q<sub>1</sub>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub><sup>2</sup>q<sub>3</sub>-1))</td></tr><tr><td>{1, 1}</td><td>{2, 1}</td><td>νq<sub>3</sub></td><td>(q<sub>1</sub>q<sub>2</sub>-1)(q<sub>2</sub><sup>2</sup>-1)(q<sub>2</sub>-q<sub>3</sub>)(q<sub>1</sub>q<sub>2</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>1</sub>q<sub>3</sub><sup>2</sup>-q<sub>2</sub>) / (q<sub>1</sub>(q<sub>2</sub>-1)q<sub>2</sub>(q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>3</sub>)(q<sub>2</sub><sup>2</sup>-q<sub>3</sub>)(q<sub>3</sub>-1)q<sub>3</sub>(q<sub>1</sub>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub><sup>2</sup>-q<sub>3</sub><sup>2</sup>))</td></tr></tbody></table>

We then have the following relation.

**Theorem B.1.** The recursion formula of the U(1) partition function $\tilde{Z}^{\bar{D}6}_{\bar{a}}[\pi]$ is related with the functions $W^{\bar{a}}_{\pi,v}(x)$:

$$ \frac{\tilde{Z}^{\bar{D}6}_{\bar{a}}[\pi + \mathfrak{D}]}{\tilde{Z}^{\bar{D}6}_{\bar{a}}[\pi]} = - \frac{\mathrm{Res}_{x'=q_a \chi_{\bar{a},v}(\mathfrak{D})} x'^{-1} \tilde{W}^{\bar{a}}_{\pi,v}(q_a^{-1}x')^{-1}}{\mathrm{Res}_{x'=\chi_{\bar{a},v}(\mathfrak{D})} x'^{-1} \tilde{W}^{\bar{a}}_{\pi+\mathfrak{D},v}(q_a^{-1}x')^{-1}} \quad (B.24) $$

*Proof.* The nontrivial part of this recursion formula is the minus sign appearing on the right-hand side. To obtain this minus sign, one needs to take care of the collision terms
carefully. A general proof for this recursion formula can be obtained following the discussion in [64, section 5.1.1]. □

The above formula is written in a simple form as

$$ \begin{aligned} \frac{\tilde{Z}_{\tilde{a}}^{\mathrm{D}6}[\pi + \bar{\tau}]}{\tilde{Z}_{\tilde{a}}^{\mathrm{D}6}[\pi]} &= -\frac{\mathrm{Res}_{x'=q_{\tilde{a},v}(\bar{\tau})} x'^{-1} W_{\pi,v}^{\tilde{a}}(q_a^{-1}x')^{-1}}{\mathrm{Res}_{x'=\chi_{\tilde{a},v}(\bar{\tau})} x'^{-1} W_{\pi+\bar{\tau},v}^{\tilde{a}}(q_a^{-1}x')^{-1}} \\ &= -\frac{\lim_{x' \to \chi_{\tilde{a},v}(\bar{\tau})} (1 - \chi_{\tilde{a},v}(\bar{\tau})/x') W_{\pi,v}^{\tilde{a}}(x')^{-1}}{\lim_{x' \to \chi_{\tilde{a},v}(\bar{\tau})} (1 - \chi_{\tilde{a},v}(\bar{\tau})/x') W_{\pi+\bar{\tau},v}^{\tilde{a}}(q_a^{-1}x')^{-1}} \quad (\mathrm{B.25}) \\ &= -\frac{W_{\pi+\bar{\tau},v}^{\tilde{a}}(q_a^{-1}\chi_{\tilde{a},v}(\bar{\tau}))}{W_{\pi,v}^{\tilde{a}}(\chi_{\tilde{a},v}(\bar{\tau}))}. \end{aligned} $$

The numerator and denominator are both singular and the inserting $\chi_{\tilde{a},v}(\bar{\tau})$ diverges. However, such singular terms cancel with each other so the total formula itself is well-defined.

## B.4 D4 partition functions

The U(1) contribution of the 5d affine quiver gauge theory is given from

$$ \mathcal{Z}_A^{\mathrm{D}4}[\lambda; q_{\mathrm{inf}(\bar{A})}] = \frac{\mathcal{N}_A(q_{\mathrm{inf}(\bar{A})}v, \lambda | v, \lambda)}{\mathcal{N}_A(v, \lambda | v, \lambda)}, \quad \tilde{\mathcal{Z}}_A^{\mathrm{D}4}[\lambda] = q_{\mathrm{inf}(\bar{A})}^{-|\lambda|} \mathcal{Z}_A^{\mathrm{D}4}[\lambda; q_{\mathrm{inf}(\bar{A})}], \quad (\mathrm{B.26}) $$

where

$$ \mathcal{N}_A(v, \lambda | v, \lambda) = \prod_{\bar{\tau} \in \lambda} \left(1 - \frac{q_A \chi_{A,v}(\bar{\tau})}{v}\right) \prod_{\bar{\tau} \in \lambda} \left(1 - \frac{v}{\chi_{A,v}(\bar{\tau})}\right) \prod_{\substack{\bar{\tau} \in \lambda \\ \bar{\tau} \neq \lambda}} \mathcal{S}_A \left( \frac{\chi_{A,v}(\bar{\tau})}{\chi_{A,v}(\bar{\tau})} \right). \quad (\mathrm{B.27}) $$

For simplicity, we only consider $A = 12$ and $\mathcal{Z}_{12}^{\mathrm{D}4}[\lambda; q_3]$. Note that this form comes from the character

$$ \begin{aligned} \mathbf{v}_{\mathrm{inst}} &= -\mathbf{N}_{12}^{\vee} \mathbf{P}_3^{\vee} \mathbf{K}_{12} - \mathbf{N}_{12} q_{12}^{-1} \mathbf{P}_3^{\vee} \mathbf{K}_{12}^{\vee} + \mathbf{K}_{12}^{\vee} \mathbf{P}_{123}^{\vee} \mathbf{K}_{12}, \\ \mathbf{N}_{12} &= v, \quad \mathbf{K}_{12} = \sum_{i=1}^{\ell(\lambda)} \sum_{j=1}^{\lambda_i} v q_1^{i-1} q_2^{j-1}. \end{aligned} \quad (\mathrm{B.28}) $$

The generating function for the 2d partition is given as

$$ Z_2(q) = \sum_{\lambda} q^{|\lambda|} = \prod_{n=1}^{\infty} \frac{1}{1-q^n} = 1 + q + 2q^2 + 3q^3 + 5q^4 + \dots \quad (\mathrm{B.29}) $$

For low levels, the U(1) contribution $\mathcal{Z}_{12}^{\mathrm{D}4}[\lambda; q_3]$ is given as follows.

$k = 1, \lambda = \{1\}:$

$$ \frac{(1 - q_1 q_3) (1 - q_2 q_3)}{(1 - q_1) (1 - q_2)} \quad (\mathrm{B.30}) $$
• $k=2$

$$ \lambda = \{2\} : \frac{(1 - q_1 q_3) (q_2 - q_1 q_3) (1 - q_2 q_3) (1 - q_2^2 q_3)}{(1 - q_1) (1 - q_2) (q_2 - q_1) (1 - q_2^2)} \quad (B.31) $$
$$ \lambda = \{1, 1\} : \frac{(1 - q_1 q_3) (1 - q_1^2 q_3) (1 - q_2 q_3) (q_1 - q_2 q_3)}{(1 - q_1) (1 - q_1^2) (1 - q_2) (q_1 - q_2)} $$

• $k=3$

$$ \lambda = \{3\} : \frac{(1 - q_1 q_3) (q_2 - q_1 q_3) (q_2^2 - q_1 q_3) (1 - q_2 q_3) (1 - q_2^2 q_3) (1 - q_2^3 q_3)}{(1 - q_1) (1 - q_2) (q_2 - q_1) (1 - q_2^2) (q_2^2 - q_1) (1 - q_2^3)} $$
$$ \lambda = \{2, 1\} : \frac{(1 - q_1 q_3)^2 (q_2 - q_1^2 q_3) (1 - q_2 q_3)^2 (q_1 - q_2^2 q_3)}{(1 - q_1)^2 (1 - q_2)^2 (q_2 - q_1^2) (q_1 - q_2^2)} $$
$$ \lambda = \{1, 1, 1\} : \frac{(1 - q_1 q_3) (1 - q_1^2 q_3) (1 - q_1^3 q_3) (1 - q_2 q_3) (q_1 - q_2 q_3) (q_1^2 - q_2 q_3)}{(1 - q_1) (1 - q_1^2) (1 - q_1^3) (1 - q_2) (q_1 - q_2) (q_1^2 - q_2^2)} \quad (B.32) $$

Therefore, in the simplest case when there is only one instanton, we have

$$ \begin{aligned} Z_{12}^{\mathrm{D4}}[\{1\}; q_3] &= \frac{(1 - q_1 q_3)(1 - q_2 q_3)}{(1 - q_1)(1 - q_2)}, \\ \tilde{Z}_{12}^{\mathrm{D4}}[\{1\}] &= q_3^{-1} \frac{(1 - q_1 q_3)(1 - q_2 q_3)}{(1 - q_1)(1 - q_2)} = \frac{(1 - q_1 q_3)(1 - q_1 q_4)}{(1 - q_1)(1 - q_1 q_3 q_4)} = S_{34}(q_1). \end{aligned} \quad (B.33) $$

Note that we have $S_{34}(q_1) = S_{34}(q_2)$.

Under the NS limit $q_4 \to 1$ and $q_{1,2,3} \to q_{1,2,3}$, the U(1) instanton partition function trivialize: $\tilde{Z}_{12}^{\mathrm{D4}}[\lambda] = 1$. For example, we have

$$ \tilde{Z}_{12}^{\mathrm{D4}}[\{1\}] = \frac{(1 - q_1 q_3)(1 - q_1 q_4)}{(1 - q_1)(1 - q_1 q_3 q_4)} \to \frac{(1 - q_1 q_3)(1 - q_1)}{(1 - q_1)(1 - q_1 q_3)} = 1. \quad (B.34) $$

The U(1) instanton partition function becomes the generating function of the 2d partition:

$$ Z_{12, \mathrm{inst.}}^{\mathrm{D4}}[\mathrm{U}(1)] = \sum_{\lambda} q^{|\lambda|} \tilde{Z}_{12}^{\mathrm{D4}}[\lambda] \xrightarrow{q_4 \to 1} Z_2(q) = \sum_{\lambda} q^{|\lambda|}. \quad (B.35) $$
**Recursion formulas for U(1) contribution.** Using the explicit formulas, let us write down the recursion formula for the U(1) contribution coming from $Z_{12}^{D4}[\lambda; q_3]$.

<table><thead><tr><th>λ</th><th>λ + □</th><th>χ<sub>12,v</sub>(□)</th><th>Z<sub>12</sub><sup>D4</sup>[λ + □; q<sub>3</sub>]/Z<sub>12</sub><sup>D4</sup>[λ; q<sub>3</sub>]</th></tr></thead><tbody><tr><td>∅</td><td>{1}</td><td>v</td><td>(1-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)</td></tr><tr><td>{1}</td><td>{1, 1}</td><td>νq<sub>1</sub></td><td>(1-q<sub>1</sub><sup>2</sup>q<sub>3</sub>)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub>)</td></tr><tr><td>{1}</td><td>{2}</td><td>νq<sub>2</sub></td><td>(q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (q<sub>2</sub>-q<sub>1</sub>)(1-q<sub>2</sub><sup>2</sup>)</td></tr><tr><td>{1, 1}</td><td>{2, 1}</td><td>νq<sub>2</sub></td><td>(1-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub>)(1-q<sub>1</sub>q<sub>3</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(1-q<sub>1</sub><sup>2</sup>q<sub>3</sub>)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>)</td></tr><tr><td>{1, 1}</td><td>{1, 1, 1}</td><td>νq<sub>1</sub><sup>2</sup></td><td>(1-q<sub>1</sub><sup>3</sup>q<sub>3</sub>)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub><sup>3</sup>)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)</td></tr><tr><td>{2}</td><td>{3}</td><td>νq<sub>2</sub><sup>2</sup></td><td>(q<sub>2</sub><sup>2</sup>-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub><sup>3</sup>q<sub>3</sub>) / (q<sub>2</sub><sup>2</sup>-q<sub>1</sub>)(1-q<sub>2</sub><sup>3</sup>)</td></tr><tr><td>{2}</td><td>{2, 1}</td><td>νq<sub>1</sub></td><td>(q<sub>2</sub>-q<sub>1</sub>)(1-q<sub>2</sub><sup>2</sup>)(1-q<sub>1</sub>q<sub>3</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)(q<sub>2</sub>-q<sub>1</sub><sup>2</sup>)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub><sup>2</sup>q<sub>3</sub>)</td></tr></tbody></table>

Using the explicit forms of $y_{\lambda,v}^{12}(x)$, we can also compute the following function for low levels:

$$ \frac{\operatorname{Res}_{x=q_3^{-1}\chi_{12,v}(\square)} x^{-1} \frac{y_{\lambda,v}^{12}(x)}{y_{\lambda,v}^{12}(q_3x)}}{\operatorname{Res}_{x=q_{34}^{-1}\chi_{12,v}(\square)} x^{-1} \frac{y_{\lambda+\square,v}^{12}(x)}{y_{\lambda+\square,v}^{12}(q_3x)}} \quad (B.37) $$

The results are

<table><thead><tr><th>λ</th><th>λ + □</th><th>χ<sub>12,v</sub>(□)</th><th>Res x<sup>-1</sup> y<sup>12</sup><sub>λ,v</sub>(x) / y<sup>12</sup><sub>λ,v</sub>(q<sub>3</sub>x)</th></tr></thead><tbody><tr><td>∅</td><td>{1}</td><td>v</td><td>-q<sub>3</sub><sup>-1</sup>(1-q<sub>1</sub>q<sub>3</sub>)(1-q<sub>2</sub>q<sub>3</sub>) / (1-q<sub>1</sub>)(1-q<sub>2</sub>)</td></tr><tr><td>{1}</td><td>{1, 1}</td><td>νq<sub>1</sub></td><td>-(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>) / (q<sub>1</sub><sup>2</sup>-1)(q<sub>1</sub>-q<sub>2</sub>)q<sub>3</sub></td></tr><tr><td>{1}</td><td>{2}</td><td>νq<sub>2</sub></td><td>(q<sub>2</sub>-q<sub>1</sub>q<sub>3</sub>)(q<sub>2</sub><sup>2</sup>q<sub>3</sub>-1) / (q<sub>1</sub>-q<sub>2</sub>)(q<sub>2</sub><sup>2</sup>-1)q<sub>3</sub></td></tr><tr><td>{1, 1}</td><td>{2, 1}</td><td>νq<sub>2</sub></td><td>-(q<sub>1</sub>+1)(q<sub>1</sub>-q<sub>2</sub>)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)(q<sub>2</sub>-1)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)q<sub>3</sub>(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub>q<sub>3</sub>)</td></tr><tr><td>{1, 1}</td><td>{1, 1, 1}</td><td>νq<sub>1</sub><sup>2</sup></td><td>-(q<sub>1</sub><sup>3</sup>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>q<sub>3</sub>) / (q<sub>1</sub><sup>3</sup>-1)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)q<sub>3</sub></td></tr><tr><td>{2}</td><td>{3}</td><td>νq<sub>2</sub><sup>2</sup></td><td>(q<sub>2</sub><sup>2</sup>-q<sub>1</sub>q<sub>3</sub>)(q<sub>2</sub><sup>3</sup>q<sub>3</sub>-1) / (q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)(q<sub>2</sub><sup>3</sup>-1)q<sub>3</sub></td></tr><tr><td>{2}</td><td>{2, 1}</td><td>νq<sub>1</sub></td><td>-(q<sub>1</sub>-q<sub>2</sub>)(q<sub>2</sub>+1)(q<sub>1</sub>q<sub>3</sub>-1)(q<sub>1</sub><sup>2</sup>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub>q<sub>3</sub>-1)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>q<sub>3</sub>) / (q<sub>1</sub>-1)(q<sub>1</sub><sup>2</sup>-q<sub>2</sub>)(q<sub>1</sub>-q<sub>2</sub><sup>2</sup>)q<sub>3</sub>(q<sub>1</sub>q<sub>3</sub>-q<sub>2</sub>)(q<sub>2</sub><sup>2</sup>q<sub>3</sub>-1)</td></tr></tbody></table>
Comparing the two relations, one will see we have the following relation

$$ \frac{\mathrm{Res}_{x=q_3^{-1}\chi_{12,v}(\Box)} x^{-1} \frac{y_{\lambda,v}^{12}(x)}{y_{\lambda,v}^{12}(q_3x)}}{\mathrm{Res}_{x=q_{34}^{-1}\chi_{12,v}(\Box)} x^{-1} \frac{y_{\lambda+\Box,v}^{12}(x)}{y_{\lambda+\Box,v}^{12}(q_3x)}} = -q_3^{-1} \frac{\mathcal{Z}_{12}^{\mathrm{D4}}[\lambda+\Box; q_3]}{\mathcal{Z}_{12}^{\mathrm{D4}}[\lambda; q_3]} = -\frac{\tilde{\mathcal{Z}}_{12}^{\mathrm{D4}}[\lambda+\Box]}{\tilde{\mathcal{Z}}_{12}^{\mathrm{D4}}[\lambda]}. \quad (B.39) $$

Generally, we have the following theorem.

**Theorem B.2.** The recursion relation of the U(1) partition function of the 5d $\mathcal{N} = 1^*$ theory is written using the residues of the $\mathcal{Y}$-functions as

$$ \frac{\tilde{\mathcal{Z}}_A^{\mathrm{D4}}[\lambda + \Box]}{\tilde{\mathcal{Z}}_A^{\mathrm{D4}}[\lambda]} = - \frac{\mathrm{Res}_{x=q_{\mathrm{inf}(\bar{A})}^{-1}\chi_{A,v}(\Box)} x^{-1} \frac{y_{\lambda,v}^A(x)}{y_{\lambda,v}^A(q_{\mathrm{inf}(\bar{A})}x)}}{\mathrm{Res}_{x=q_A\chi_{A,v}(\Box)} x^{-1} \frac{y_{\lambda+\Box,v}^A(x)}{y_{\lambda+\Box,v}^A(q_{\mathrm{inf}(\bar{A})}x)}}. \quad (B.40) $$

At one-instanton level, we explicitly have

$$ \tilde{\mathcal{Z}}_{ab}^{\mathrm{D4}}[\{1\}] = S_{ab}(q_a) = S_{ab}(q_b) \quad (B.41) $$

*Proof.* The nontrivial part is the minus sign arising on the right-hand side. This formula can be obtained following the discussion in [64, section 5.1.1]. □

The recursion relation above can be written in a rather symmetric way:

$$ \begin{aligned} \frac{\tilde{\mathcal{Z}}_{ab}^{\mathrm{D4}}[\lambda + \Box]}{\tilde{\mathcal{Z}}_{ab}^{\mathrm{D4}}[\lambda]} &= - \lim_{x \to q_c^{-1} \chi_{ab,v}(\Box)} \left(1 - \frac{q_c^{-1} \chi_{ab,v}(\Box)}{x}\right) \frac{y_{\lambda,v}^{ab}(x)}{y_{\lambda,v}^{ab}(q_c x)} \\ &\quad \times \left( \lim_{x \to q_{ab} \chi_{ab,v}(\Box)} \left(1 - \frac{q_{ab} \chi_{ab,v}(\Box)}{x}\right) \frac{y_{\lambda+\Box,v}^{ab}(x)}{y_{\lambda+\Box,v}^{ab}(q_c x)} \right)^{-1} \\ &= - \frac{y_{\lambda,v}^{ab}(q_c^{-1} \chi_{ab,v}(\Box)) y_{\lambda+\Box,v}^{ab}(q_d^{-1} \chi_{ab,v}(\Box))}{y_{\lambda,v}^{ab}(\chi_{ab,v}(\Box)) y_{\lambda+\Box,v}^{ab}(q_{cd}^{-1} \chi_{ab,v}(\Box))} \end{aligned} \quad (B.42) $$

where $A = ab, \bar{A} = cd$ ($c < d$) and $\Box \in A(\lambda)$. The numerators come from the fact that they have no pole when taking the limit. For the denominators, both of them are singular but the singular part will cancel with each other and the above formula itself is well-defined.

## B.5 D2 partition functions

The U(1) contribution of the 3d gauge theory is given from

$$ \mathcal{Z}_a^{\mathrm{D2}}[k; q_i, q_j] = \frac{\mathbf{N}_a(q_i v, k | v, k) \mathbf{N}_a(q_j v, k | v, k)}{\mathbf{N}_a(v, k | v, k) \mathbf{N}_a(q_i q_j v, k | v, k)} \quad (B.43) $$

where

$$ \mathbf{N}_a(v_1, k_1 | v_2, k_2) = \frac{\prod_{\substack{\bullet \in k_2 \\ \Box \in k_1}} (1 - v_1 / \chi_{a,v_2}(\Box))}{\prod_{\substack{\bullet \in k_2 \\ \Box \in k_1}} (1 - q_a \chi_{a,v_1}(\Box) / v_2)} \prod_{\Box \in k_1} \mathcal{V}_a \left( \frac{\chi_{a,v_1}(\Box)}{\chi_{a,v_2}(\Box)} \right). \quad (B.44) $$
The D2 Nekrasov factor explicitly is given

$$ \mathbf{N}_a(v_1, k_1 | v_2, k_2) = \mathbb{I} \left[ \frac{v_2}{v_1} \frac{1 - q_a^{k_2-k_1}}{1 - q_a} \right] = \begin{cases} \prod_{l=1}^{k_2-k_1} \left( 1 - \frac{v_1}{v_2} q_a^{l+1} \right), & k_2 > k_1, \\ 1, & k_1 = k_2, \\ \prod_{l=1}^{k_1-k_2} \left( 1 - \frac{v_1}{v_2} q_a^{l-1} \right), & k_1 > k_2. \end{cases} \quad (B.45) $$

For simplicity, we only consider the case $a=4$. Note that the character for the U(1) case is

$$ \begin{gathered} \mathbf{v}_{\text{inst.}} = \mathbf{P}_A^{\vee} (\mathbf{N}_4^{\vee} \mathbf{K}_4 - q_4^{-1} \mathbf{N}_4 \mathbf{K}_4^{\vee} - \mathbf{P}_4^{\vee} \mathbf{K}_4^{\vee} \mathbf{K}_4), \quad A \in \{12, 13, 23\}, \\ \mathbf{N}_4 = v, \quad \mathbf{K}_4 = \sum_{j=1}^k v q_4^{j-1} = v \frac{1-q_4^k}{1-q_4}. \end{gathered} \quad (B.46) $$

Explicitly, we can show that the partition is trivial:

$$ \begin{aligned} & \mathbf{N}_4^{\vee} \mathbf{K}_4 - q_4^{-1} \mathbf{N}_4 \mathbf{K}_4^{\vee} - \mathbf{P}_4^{\vee} \mathbf{K}_4^{\vee} \mathbf{K}_4 \\ &= \frac{1}{1-q_4} (1-q_4^k + 1-q_4^{-k} - (1-q_4^{-k})(1-q_4^k)) \quad (B.47) \\ &= 0. \end{aligned} $$

Thus, the U(1) partition function is given

$$ \mathcal{Z}_4^{\mathrm{D2}}[k; q_i, q_j] = 1. \quad (B.48) $$

Generally, we have

$$ \mathcal{Z}_a^{\mathrm{D2}}[k; q_i, q_j] = 1. \quad (B.49) $$

The recursion formula of the Nekrasov factor $\mathbf{N}_a(v, \lambda | v, \lambda)$ in terms of the $\mathcal{U}$-functions is

$$ \begin{aligned} \frac{\mathbf{N}_a(v, k + \Box | v, k + \Box)}{\mathbf{N}_a(v, k | v, k)} &= - \left( - \frac{v q_a^k}{\chi_{a,v}(\Box)} \right) \frac{\operatorname{Res}_{x'=\chi_{a,v}(\Box)} x'^{-1} \mathcal{U}_{k+\Box,v}^a (q_a x')^{-1}}{\operatorname{Res}_{x'=\chi_{a,v}(\Box)} x'^{-1} \mathcal{U}_{k,v}^a (x')^{-1}} \quad (B.50) \\ &= - \left( - \frac{v q_a^k}{\chi_{a,v}(\Box)} \right) \frac{\mathcal{U}_{k,v}^a (\chi_{a,v}(\Box))}{\mathcal{U}_{k+\Box,v}^a (q_a \chi_{a,v}(\Box))}. \end{aligned} $$

Note that the second equation is still well-defined although the numerator and denominator are singular themselves. This is because the singularities cancel with each other. Note also that $k+\Box = k+1$ for the vortex partition function.

For the adjoint contributions, we have

$$ \begin{aligned} \frac{\mathbf{N}_a(mv, k + \Box | v, k + \Box)}{\mathbf{N}_a(mv, k | v, k)} &= \frac{\mathcal{U}_{k,v}^a (m^{-1} \chi_{a,v}(\Box))}{\mathcal{U}_{k+\Box,v}^{a\vee} (m q_a \chi_{a,v}(\Box))} \\ &= \left( - \frac{v q_a^k}{m \chi_{a,v}(\Box)} \right) \frac{\mathcal{U}_{k,v}^a (m^{-1} \chi_{a,v}(\Box))}{\mathcal{U}_{k+\Box,v}^a (m q_a \chi_{a,v}(\Box))} \end{aligned} \quad (B.51) $$
In this case, both the numerator and denominator themselves are already non-singular and well-defined. Combining these, we have

$$ \frac{\mathcal{Z}_a^{\text{D2}}[k + \Box; q_i, q_j]}{\mathcal{Z}_a^{\text{D2}}[k; q_i, q_j]} = - \frac{\mathcal{U}_{k,v}^a(q_i^{-1}\chi_{a,v}(\Box)) \mathcal{U}_{k,v}^a(q_j^{-1}\chi_{a,v}(\Box)) \mathcal{U}_{k+\Box,v}^a(q_{ij}q_a\chi_{a,v}(\Box)) \mathcal{U}_{k+\Box,v}^a(q_a\chi_{a,v}(\Box))}{\mathcal{U}_{k+\Box,v}^a(q_i q_a \chi_{a,v}(\Box)) \mathcal{U}_{k+\Box,v}^a(q_j q_a \chi_{a,v}(\Box)) \mathcal{U}_{k,v}^a(q_{ij}^{-1}\chi_{a,v}(\Box)) \mathcal{U}_{k,v}^a(\chi_{a,v}(\Box))}. \quad (B.52) $$

Although, indeed we can rewrite using the $U$-functions, the right-hand side will trivialize after computation.

Since the D2 Nekrasov factor (B.45) does not disappear generally, the partition function for the $U(n_a)$ ($a \in \mathcal{A}$) case does not disappear. Denoting the $U(n_a)$ partition function as $\mathcal{Z}_a^{\text{D2}}[\vec{v}_a, \vec{k}_a]$, we have

$$ \begin{aligned} \mathcal{Z}_a^{\text{D2}}[\vec{v}_a, \vec{k}_a] &= \prod_{\alpha=1}^{n_a} \mathcal{Z}_a^{\text{D2}}[k_a^{(\alpha)}; q_{i(\alpha)}, q_{j(\alpha)}] \prod_{\alpha<\beta} \mathcal{Z}_{a|a}^{\text{D2-D2}}(v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)}) \\ &= \prod_{\alpha,\beta} \frac{\mathbf{N}_a(q_{i(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)}) \mathbf{N}_a(q_{j(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)})}{\mathbf{N}_a(q_{i(\alpha)}q_{j(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)}) \mathbf{N}_a(v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)})} \quad (B.53) \\ &= \prod_{\alpha \neq \beta} \frac{\mathbf{N}_a(q_{i(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)}) \mathbf{N}_a(q_{j(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)})}{\mathbf{N}_a(q_{i(\alpha)}q_{j(\alpha)}v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)}) \mathbf{N}_a(v_{a,\alpha}, k_a^{(\alpha)}|v_{a,\beta}, k_a^{(\beta)})}, \end{aligned} $$

where we used $\mathbf{N}_a(v, \lambda|v, \lambda) = 1$.

Let us focus on the $a = 4$ case:

$$ \mathcal{Z}_4^{\text{D2}}[\vec{v}, \vec{k}] = \prod_{\alpha, \beta} \frac{\mathbf{N}_4(q_i v_\alpha, k^{(\alpha)}|v_\beta, k^{(\beta)}) \mathbf{N}_4(q_j v_\alpha, k^{(\alpha)}|v_\beta, k^{(\beta)})}{\mathbf{N}_4(v_\alpha, k^{(\alpha)}|v_\beta, k^{(\beta)}) \mathbf{N}_4(q_i q_j v_\alpha, k^{(\alpha)}|v_\beta, k^{(\beta)})}, \quad (B.54) $$

where we kept the $U(1)$ part for convention. The recursive relation is given as

$$ \begin{aligned} \frac{\mathcal{Z}_4^{\text{D2}}[\vec{v}, \vec{k} + \Box]}{\mathcal{Z}_4^{\text{D2}}[\vec{v}, \vec{k}]} &= \prod_{\beta \neq \alpha} \frac{\mathcal{U}_{k_\beta, v_\beta}^4 (q_4 \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_{ij} q_4 \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_i^{-1} \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_j^{-1} \chi_4, v_\alpha(\Box))}{\mathcal{U}_{k_\beta, v_\beta}^4 (\chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_{ij}^{-1} \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_{4i} \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\beta, v_\beta}^4 (q_{4j} \chi_4, v_\alpha(\Box))} \\ &\quad \times - \frac{\mathcal{U}_{k_\alpha, v_\alpha}^4 (q_i^{-1} \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\alpha, v_\alpha}^4 (q_j^{-1} \chi_4, v_\alpha(\Box))}{\mathcal{U}_{k_\alpha+\Box, v_\alpha}^4 (q_i q_4 \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\alpha+\Box, v_\alpha}^4 (q_j q_4 \chi_4, v_\alpha(\Box))} \frac{\mathcal{U}_{k_\alpha+\Box, v_\alpha}^4 (q_{ij} q_4 \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\alpha+\Box, v_\alpha}^4 (q_4 \chi_4, v_\alpha(\Box))}{\mathcal{U}_{k_\alpha, v_\alpha}^4 (q_{ij}^{-1} \chi_4, v_\alpha(\Box)) \mathcal{U}_{k_\alpha, v_\alpha}^4 (\chi_4, v_\alpha(\Box))} \end{aligned} \quad (B.55) $$

where we shortly wrote $\vec{v} = (v_\alpha)^n_{\alpha=1}$, $\vec{k} = (k_\alpha)^n_{\alpha=1}$ and assumed $\Box \in A(k^{(\alpha)})$, $\exists \alpha$.

## C Zero modes of vertex operators

Let us check that the zero modes discussed in (4.61) and (4.62) indeed satisfy the conditions in (4.5), (4.44), (4.32), (4.18), (4.11), (4.54), (4.56), (4.58). Moreover, the notation we use also obeys (4.65).
**Proposition C.3 (Contraction formulas).** Under the above free field realizations of the zero modes, the contraction formulas are

$$A(x)S_a(x') = g_{\bar{a}}(x'/x)^{-1} :A(x)S_a(x'):, \qquad (C.0.12a)$$

$$S_a(x')A(x) = g_{\bar{a}}(q_a x/x') :A(x)S_a(x'):, \qquad (C.0.12b)$$

$$A(x)X_A(x') = S_{\bar{A}}(x'/x)^{-1} :A(x)X_A(x'):, \qquad (C.0.13d)$$

$$X_A(x')A(x) = S_{\bar{A}}(q_A x/x')^{-1} :X_A(x')A(x):, \qquad (C.0.13e)$$

$$A(x)W_{\bar{a}}(x') = \mathcal{V}_a (x'/x)^{-1} :A(x)W_{\bar{a}}(x'):, \qquad (C.0.14d)$$

$$W_{\bar{a}}(x')A(x) = q_a^{-1} \mathcal{V}_a (q_a^{-1} x/x') :W_{\bar{a}}(x')A(x):, \qquad (C.0.14e)$$

$$A(x)\tilde{Z}^K(x') = \frac{1 - x'/x}{1 - Kx'/x} :A(x)\tilde{Z}^K(x'):, \qquad (C.0.15d)$$

$$\tilde{Z}^K(x')A(x) = K^{-1} \frac{1 - x/x'}{1 - K^{-1}x/x'} :A(x)\tilde{Z}^K(x'):, \qquad (C.0.15e)$$

$$S_a(x)S_b(x') = S_{\bar{a}b}(q_a x'/x) :S_a(x)S_b(x'):, \qquad (C.0.16d)$$

$$S_b(x')S_a(x) = S_{\bar{a}b}(q_b x/x') :S_a(x)S_b(x'):, \qquad (C.0.16e)$$

$$X_A(x)S_c(x') = \mathcal{V}_d (q_A x'/x)^{-1} :X_A(x)S_c(x'):, \qquad (C.0.17d)$$

$$S_c(x')X_A(x) = q_d^{-1} \mathcal{V}_d (q_d^{-1} q_A^{-1} x/x') :X_A(x)S_c(x'):, \qquad (C.0.17e)$$

$$W_{\bar{a}}(x)S_a(x') = x' \frac{1}{1 - q_a^{-1} x'/x} :W_{\bar{a}}(x)S_a(x'):, \qquad (C.0.18d)$$

$$S_a(x')W_{\bar{a}}(x) = (-q_a x) \frac{1}{1 - q_a x/x'} :W_{\bar{a}}(x)S_a(x'):, \qquad (C.0.18e)$$

# D Supergroup gauge theory

In this section, we review the instanton partition function of supergroup gauge theories in 5d theories. From the D-brane perspective, we need to include ghost D4-branes, denoted by D4$^-$, in the system. The partition functions were first derived by [93] (see also [97] for a review). The quantum algebraic perspective was studied in [99] for A, D-quiver gauge theories. The discussion here is complementary to the discussion in [99].

## D.1 Contour integral formula and partition functions

We consider 5d gauge theories on $\mathbb{C}_{12}^2 \times \mathbb{S}^1$. The instanton partition functions of superunitary groups $U(n_+|n_-)$ are described by changing the character to super characters:

$$ \mathbf{N} = \mathbf{N}^{+} - \mathbf{N}^{-}, \quad \mathbf{K} = \mathbf{K}^{+} - \mathbf{K}^{-}, \\ \mathbf{N}^{\pm} = \sum_{\alpha=1}^{n_{\pm}} e^{a_{\alpha}^{\pm}} = \sum_{\alpha=1}^{n_{\pm}} v_{\alpha}^{\pm}, \quad \mathbf{K}^{\pm} = \sum_{I=1}^{k_{\pm}} e^{\phi_{I}^{\pm}} = \sum_{I=1}^{k_{\pm}} x_{I}^{\pm}. \qquad (D.1) $$
The partition function is given by inserting these characters to (3.76) or generally to (3.135). Let us focus on the affine quiver gauge theory case whose character is$^{44}$

$$ \begin{aligned} \mathbf{v}_{\text{inst.}} &= -\mathbf{P}_{34}^{\vee}\mathbf{N}^{\vee}\mathbf{K} + \mathbf{P}_{123}^{\vee}\mathbf{K}^{\vee}\mathbf{K} \\ &= -\sum_{\sigma, \sigma'=\pm} \sigma\sigma' \mathbf{P}_{34}^{\vee}\mathbf{N}^{\sigma\vee}\mathbf{K}^{\sigma'} + \sum_{\sigma, \sigma'=\pm} \sigma\sigma' \mathbf{P}_{123}^{\vee}\mathbf{K}^{\sigma\vee}\mathbf{K}^{\sigma'}. \end{aligned} \quad (D.2) $$

The contour integral is then given by

$$ \begin{aligned} \mathcal{Z}_{12,k_+|k_-}^{\text{D4}} = {}& \mathbb{I}[\mathbf{v}_{\text{inst.}}] = \frac{\mathcal{G}_{\bar{4}}^{k_+} \mathcal{G}_{\bar{4}}^{k_-}}{k_+! k_-!} \oint \prod_{\sigma=\pm} \prod_{I=1}^{k_\sigma} \frac{dx_I^\sigma}{2\pi i x_I^\sigma} \prod_{\sigma\sigma'=\pm} \prod_{\alpha=1}^{n^\sigma} \prod_{I=1}^{k_{\sigma'}} S_{34} \left( \frac{v_\alpha^\sigma}{x_I^{\sigma'}} \right)^{\sigma\sigma'} \\ & \times \prod_{\substack{\sigma, \sigma'=\pm \\ I=1, \dots, k_\sigma \\ J=1, \dots, k_{\sigma'} \\ (I, \sigma) \neq (J, \sigma')}} \prod_{\substack{\alpha=1 \\ (I, \sigma) \neq (J, \sigma')}} g_{\bar{4}} \left( \frac{x_I^\sigma}{x_J^{\sigma'}} \right)^{-\sigma\sigma'} . \end{aligned} \quad (D.3) $$

The instanton partition function is schematically written as

$$ \mathcal{Z}_{\text{inst.}} = \sum_{k_{\pm} \ge 0} q^{k_{+} - k_{-}} \mathcal{Z}_{12, k_{+} | k_{-}}^{\text{D4}}. \quad (D.4) $$

Note that the topological term is in the opposite power compared to the normal group case. The supergroup analogue of the gauge origami of the spiked instantons is obtained in a similar way.

The contour integral will localize on the poles classified by $(n_+, n_-)$-tuples of Young diagrams:

$$ \begin{aligned} \vec{v} = (v_{\alpha}^{\sigma})_{\alpha=1,...,n_{\sigma}}^{\sigma=\pm}, \quad \vec{\lambda} = (\lambda_{\sigma}^{(\alpha)})_{\alpha=1,...,n_{\sigma}}^{\sigma=\pm}, \quad \sum_{\alpha=1}^{n_{\sigma}} |\lambda_{\sigma}^{(\alpha)}| = k_{\sigma} \\ \{x_I^{\sigma}\}_{I=1,...,k_{\sigma}} \rightarrow \{\chi_{12,v_{\alpha}^{+}(\Box)}\}_{\alpha=1,...,n_{+}, \Box \in \lambda_{+}^{(\alpha)}} \cup \{\bar{\chi}_{12,v_{\alpha}^{-}(\Box)}\}_{\alpha=1,...,n_{-}, \Box \in \lambda_{-}^{(\alpha)}} \end{aligned} \quad (D.5) $$

where

$$ \bar{\chi}_{12,v}(\Box) = v q_1^{-i} q_2^{-j}, \quad \Box = (i,j). \quad (D.6) $$

The character of the instanton bundle for the negative instanton contribution is

$$ \mathbf{K}^{-} = \sum_{\alpha=1}^{n_{-}} \sum_{\Box \in \lambda_{-}^{(\alpha)}} \bar{\chi}_{12, v_{\alpha}^{-}}(\Box). \quad (D.7) $$

The explicit form of the instanton partition functions is expressed by the Nekrasov factors for supergroup gauge theories (see [99]):

$$ \mathcal{N}_{A}^{\sigma\sigma'}(v_1, \lambda^{(1)} | v_2, \lambda^{(2)}) = \prod_{\Box \in \lambda^{(1)}} \left(1 - q_A \frac{\chi_{A, v_1}^{(\sigma)}(\Box)}{v_2}\right) \prod_{\Box \in \lambda^{(2)}} \left(1 - \frac{v_1}{\chi_{A, v_2}^{(\sigma')}(\Box)}\right) \prod_{\substack{\Box \in \lambda^{(1)} \\ \blacksquare \in \lambda^{(2)}}} S_A \left( \frac{\chi_{A, v_1}^{(\sigma)}(\Box)}{\chi_{A, v_2}^{(\sigma')}(\Box)} \right) \quad (D.8) $$

<footnote>$^{44}$We use the character in (3.135) where the topological term is slightly modified.</footnote>
where

$$ \chi_{A,v}^{(\sigma)} = \begin{cases} \chi_{A,v}(\square), & \sigma = +, \\ \bar{\chi}_{A,v}(\square), & \sigma = -, \end{cases} \qquad (D.9) $$

These are the supergroup analogs of the Nekrasov factors introduced in (3.86). See [99] for the explicit form of how the partition function looks like using the Nekrasov factors.

For later use, let us write down the $U(0|1)$ partition function:

$$ \tilde{Z}_A^{\text{D4}^-}[\lambda] = q_{\text{inf}(\bar{A})}^{-|\lambda|} \frac{\mathbf{N}_A^{\text{--}}(q_{\text{inf}(\bar{A})}x, \lambda | x, \lambda)}{\mathbf{N}_A^{\text{--}}(x, \lambda | x, \lambda)}. \qquad (\text{D.10}) $$

For example, the one instanton contribution for $A = 12$ is given by the

$$ \tilde{Z}_{12}^{\text{D4}^{-}}[\{1\}] = S_{34}(q_1), \qquad (\text{D.11}) $$

which is equivalent to the one instanton contribution for the $U(1|0)$ case.

The recursion formulas of these Nekrasov factors are given as

$$ \begin{aligned} \frac{\mathbf{N}_A^{\sigma\sigma'}(v_1, \lambda^{(1)} + \square | v_2, \lambda^{(2)})}{\mathbf{N}_A^{\sigma\sigma'}(v_1, \lambda^{(1)} | v_2, \lambda^{(2)})} &= \left(-\frac{q_A \chi_{A,v_1}^{(\sigma)}}{v_2}\right) y_{\lambda^{(2)},v_2}^{A,\sigma'}(q_A \chi_{A,v}^{(\sigma)}(\square)), \\ \frac{\mathbf{N}_A^{\sigma\sigma'}(v_1, \lambda^{(1)} | v_2, \lambda^{(2)} + \square)}{\mathbf{N}_A^{\sigma\sigma'}(v_1, \lambda^{(1)} | v_2, \lambda^{(2)})} &= y_{\lambda^{(1)},v_1}^{A,\sigma}(\chi_{A,v_2}^{(\sigma')}(\square)) \end{aligned} \qquad (\text{D.12}) $$

where

$$ y_{\lambda, v}^{A, \sigma}(x) = \left(1 - \frac{v}{x}\right) \prod_{\square \in \lambda} S_A \left( \frac{\chi_{A, v}^{(\sigma)}(\square)}{x} \right). \qquad (\text{D.13}) $$

For $\sigma = -$, we shortly use (see [99] for the derivations)

$$ \bar{y}_{\lambda, v}^{A}(x) := y_{\lambda, v}^{A, -}(x) = \frac{\prod_{\square \in A(\lambda)} (1 - q_A \bar{\chi}_{A, v}(\square) / x)}{\prod_{\square \in R(\lambda)} (1 - \bar{\chi}_{A, v}(\square) / x)}. \qquad (\text{D.14}) $$

## D.2 Supergroup analog of affine quiver W-algebra

Let us give a proof of Thm. 6.13. It is enough to consider the $qq$-character generated by $X_{12}(x)^{-1}$. Let $F_{12}^{\text{D4}^{-}}[\lambda]$ be an undetermined function and let us find the condition it should obey so that the $qq$-character commutes:

$$ T_{12}^{(0|1)}(x) = \sum_{\lambda} F_{12}^{\text{D4}^{-}}[\lambda] \bar{\Lambda}_{12,\lambda}(x), \quad \bar{\Lambda}_{12,\lambda}(x) :=: X_{12}(x)^{-1} \prod_{\square \in \lambda} \mathcal{A}(\bar{\chi}_{12,x}(\square)) : : \qquad (\text{D.15}) $$

First of all, let us check the commutativity for the first term. The operator product is given

$$ \begin{aligned} & X_{12}^{-1}(q_{12}x)S_4(x') = \frac{1 - q_3x'/x}{1 - x'/x} : X_{12}(x)^{-1}S_4(x') : , \\ & : X_{12}^{-1}(q_{12}x)A(x) : S_4(x') = \frac{(1 - q_{12}x'/x)(1 - q_{13}x'/x)(1 - q_{23}x'/x)}{(1 - q_4^{-1}x'/x)(1 - q_1x'/x)(1 - q_2x'/x)} : X_{12}^{-1}(q_{12}x)A(x)S_4(x') : \end{aligned} \qquad (\text{D.16}) $$
and thus we have

$$ [\mathbf{X}_{12}^{-1}(q_{12}x), \mathbf{S}_4(x')] = (1 - q_3)\delta(x'/x) : \mathbf{X}_{12}(x)^{-1}\mathbf{S}_4(x') : , \\ [:\mathbf{X}_{12}^{-1}(q_{12}x)\mathbf{A}(x) : , \mathbf{S}_4(x')] = (1 - q_3^{-1})\frac{(1 - q_2^{-1})(1 - q_1^{-1})}{(1 - q_{14})(1 - q_{24})} \delta(q_4x/x') : \mathbf{X}_{12}^{-1}(q_{12}x)\mathbf{A}(x)\mathbf{S}_4(x') : \\ + \dots \tag{D.17} $$

Therefore, if we do the i-Weyl reflection as

$$ \mathbf{X}_{12}(x) \rightarrow q_3 \frac{(1 - q_{13}^{-1})(1 - q_{23}^{-1})}{(1 - q_1^{-1})(1 - q_2^{-1})} : \mathbf{X}_{12}^{-1}(x)\mathbf{A}(q_{12}^{-1}x) := \mathbf{S}_{34}(q_1) : \mathbf{X}_{12}^{-1}(x)\mathbf{A}(q_{12}^{-1}x) : , \tag{D.18} $$

the terms coming from the first pole cancel up to total difference. Note that the coefficient $\mathbf{S}_{34}(q_1)$ is just the one instanton contribution coming from $U(0|1)$ (see (D.11)).

Generally, using

$$ \left[ \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right]_+ - \left[ \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right]_- \\ = \sum_{\square \in R(\lambda)} \delta\left(q_4 \frac{\bar{\chi}_{12,x}(\square)}{x'}\right) \mathrm{Res}_{x'=q_4\bar{\chi}_{12,x}(\square)} x'^{-1} \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \tag{D.19} \\ + \sum_{\square \in A(\lambda)} \delta\left(\frac{\bar{\chi}_{12,x}(\square)}{x'}\right) \mathrm{Res}_{x'=\bar{\chi}_{12,x}(\square)} x'^{-1} \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} $$

and

$$ \mathbf{S}_4(x')\bar{\Lambda}_{12,\lambda}(x) = \left[ q_3 \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right]_+ : \mathbf{S}_4(x')\bar{\Lambda}_{12,\lambda}(x) : , \tag{D.20} \\ \bar{\Lambda}_{12,\lambda}(x)\mathbf{S}_4(x') = \left[ q_3 \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right]_- : \mathbf{S}_4(x')\bar{\Lambda}_{12,\lambda}(x) : $$

Then, the commutation relation with the screening current is

$$ \begin{aligned} [\mathbf{T}_{12}^{(0|1)}(x), \mathbf{S}_4(x')] \\ = (-q_3) \sum_{\lambda \in \mathcal{P}} F_{12}^{\mathrm{D4}^{-}}[\lambda] \left[ \sum_{\square \in R(\lambda)} \delta\left(q_4 \frac{\bar{\chi}_{12,x}(\square)}{x'}\right) \mathrm{Res}_{x'=q_4\bar{\chi}_{12,x}(\square)} x'^{-1} \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right. \\ \left. + \sum_{\square \in A(\lambda)} \delta\left(\frac{\bar{\chi}_{12,x}(\square)}{x'}\right) \mathrm{Res}_{x'=\bar{\chi}_{12,x}(\square)} x'^{-1} \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')} \right] : \bar{\Lambda}_{12,\lambda}(x)\mathbf{S}_4(x') : . \end{aligned} \tag{D.21} $$

After shifting the first term using $\lambda = \lambda' + \square$, the first term transforms to

$$ \begin{aligned} = (-q_3) \sum_{\lambda' \in \mathcal{P}} \sum_{\square \in A(\lambda')} F_{12}^{\mathrm{D4}^{-}}[\lambda' + \square] \delta\left(q_4 \frac{\bar{\chi}_{12,x}(\square)}{x'}\right) \mathrm{Res}_{x'=q_4\bar{\chi}_{12,x}(\square)} x'^{-1} \frac{\bar{y}_{\lambda'+\square,x}^{12}(q_{123}x')}{\bar{y}_{\lambda'+\square,x}^{12}(q_{12}x')} \tag{D.22} \\ \times : \bar{\Lambda}_{12,\lambda'+\square}(x)\mathbf{S}_4(q_4\bar{\chi}_{12,x}(\square)) : \end{aligned} $$
Using

$$ : \bar{\Lambda}_{12, \lambda'+\square}(x) S_4(q_4 \bar{\chi}_{12,x}(\square)) := \bar{\Lambda}_{12, \lambda'}(x) A(\bar{\chi}_{12,x}(\square)) S_4(q_4 \bar{\chi}_{12,x}(\square)) := \bar{\Lambda}_{12, \lambda'}(x) S_4(\bar{\chi}_{12,x}(\square)) : \qquad (D.23) $$

and imposing the condition

$$ \frac{F_{12}^{D4^{-}}[\lambda + \square]}{F_{12}^{D4^{-}}[\lambda]} = - \frac{\underset{x'=\bar{\chi}_{12,x}(\square)}{\mathrm{Res}} x' - 1 \frac{\bar{y}_{\lambda,x}^{12}(q_{123}x')}{\bar{y}_{\lambda,x}^{12}(q_{12}x')}}{\underset{x'=q_4\bar{\chi}_{12,x}(\square)}{\mathrm{Res}} x' - 1 \frac{\bar{y}_{\lambda+\square,x}^{12}(q_{123}x')}{\bar{y}_{\lambda+\square,x}^{12}(q_{12}x')}} \qquad (D.24) $$

we obtain

$$ [T_{12}^{(0)1}(x), Q_4(x')] = 0. \qquad (D.25) $$

The condition actually implies $F_{12}^{D4^{-}}[\lambda] = \tilde{Z}_{12}^{D4^{-}}[\lambda]$. This can be shown by doing a similar analysis in appendix B.4.

**Open Access.** This article is distributed under the terms of the Creative Commons Attribution License (CC-BY4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.

## References

[1] N.A. Nekrasov, Seiberg-Witten prepotential from instanton counting, Adv. Theor. Math. Phys. 7 (2003) 831 [hep-th/0206161] [INSPIRE].

[2] N. Nekrasov and A. Okounkov, Seiberg-Witten theory and random partitions, Prog. Math. 244 (2006) 525 [hep-th/0306238] [INSPIRE].

[3] H. Nakajima and K. Yoshioka, Instanton counting on blowup. I, Invent. Math. 162 (2005) 313 [math/0306198] [INSPIRE].

[4] H. Nakajima and K. Yoshioka, Lectures on instanton counting, in the proceedings of the CRM Workshop on Algebraic Structures and Moduli Spaces, Montreal, Canada July 14–20 (2003) [math/0311058] [INSPIRE].

[5] H. Nakajima and K. Yoshioka, Instanton counting on blowup. II. K-theoretic partition function, Transform. Groups 10 (2005) 489 [math/0505553] [INSPIRE].

[6] V. Pestun, Localization of gauge theory on a four-sphere and supersymmetric Wilson loops, Commun. Math. Phys. 313 (2012) 71 [arXiv:0712.2824] [INSPIRE].

[7] V. Pestun et al., Localization techniques in quantum field theories, J. Phys. A 50 (2017) 440301 [arXiv:1608.02952] [INSPIRE].

[8] H. Nakajima, Lectures on Hilbert Schemes of Points on Surfaces, American Mathematical Society (1999) [DOI:10.1090/ulect/018].

[9] N. Nekrasov, V. Pestun and S. Shatashvili, Quantum geometry and quiver gauge theories, Commun. Math. Phys. 357 (2018) 519 [arXiv:1312.6689] [INSPIRE].

[10] N. Nekrasov, BPS/CFT correspondence: non-perturbative Dyson-Schwinger equations and qq-characters, JHEP 03 (2016) 181 [arXiv:1512.05388] [INSPIRE].
[11] N. Nekrasov, BPS/CFT correspondence II: Instantons at crossroads, moduli and compactness theorem, Adv. Theor. Math. Phys. 21 (2017) 503 [arXiv:1608.07272] [INSPIRE].

[12] N. Nekrasov, BPS/CFT Correspondence III: Gauge Origami partition function and qq-characters, Commun. Math. Phys. 358 (2018) 863 [arXiv:1701.00189] [INSPIRE].

[13] N. Nekrasov, BPS/CFT correspondence IV: sigma models and defects in gauge theory, Lett. Math. Phys. 109 (2019) 579 [arXiv:1711.11011] [INSPIRE].

[14] N. Nekrasov, BPS/CFT correspondence V: BPZ and KZ equations from qq-characters, arXiv:1711.11582 [INSPIRE].

[15] N. Nekrasov, Magnificent four, Adv. Theor. Math. Phys. 24 (2020) 1171 [arXiv:1712.08128] [INSPIRE].

[16] N. Nekrasov and N. Piazzalunga, Magnificent Four with Colors, Commun. Math. Phys. 372 (2019) 573 [arXiv:1808.05206] [INSPIRE].

[17] D. Gaiotto, $N = 2$ dualities, JHEP 08 (2012) 034 [arXiv:0904.2715] [INSPIRE].

[18] L.F. Alday, D. Gaiotto and Y. Tachikawa, Liouville Correlation Functions from Four-dimensional Gauge Theories, Lett. Math. Phys. 91 (2010) 167 [arXiv:0906.3219] [INSPIRE].

[19] N. Wyllard, $A_{(N-1)}$ conformal Toda field theory correlation functions from conformal $N = 2$ SU(N) quiver gauge theories, JHEP 11 (2009) 002 [arXiv:0907.2189] [INSPIRE].

[20] B. Le Floch, A slow review of the AGT correspondence, J. Phys. A 55 (2022) 353002 [arXiv:2006.14025] [INSPIRE].

[21] H. Awata and Y. Yamada, Five-dimensional AGT Conjecture and the Deformed Virasoro Algebra, JHEP 01 (2010) 125 [arXiv:0910.4431] [INSPIRE].

[22] H. Awata and Y. Yamada, Five-dimensional AGT Relation and the Deformed beta-ensemble, Prog. Theor. Phys. 124 (2010) 227 [arXiv:1004.5122] [INSPIRE].

[23] M. Taki, On AGT-W Conjecture and q-Deformed W-Algebra, arXiv:1403.7016 [INSPIRE].

[24] K. Miki, $A(q, \gamma)$ analog of the $W_{1+\infty}$ algebra, J. Math. Phys. 48 (2007) 123520 [INSPIRE].

[25] B. Feigin et al., Quantum continuous $gl_\infty$: Semi-infinite construction of representations, Kyoto J. Math. 51 (2011) 337 [arXiv:1002.3100] [INSPIRE].

[26] A. Litvinov and L. Spodyneiko, On W algebras commuting with a set of screenings, JHEP 11 (2016) 138 [arXiv:1609.06271] [INSPIRE].

[27] D. Gaiotto and M. Rapčák, Vertex Algebras at the Corner, JHEP 01 (2019) 160 [arXiv:1703.00982] [INSPIRE].

[28] T. Procházka and M. Rapčák, Webs of W-algebras, JHEP 11 (2018) 109 [arXiv:1711.06888] [INSPIRE].

[29] T. Procházka and M. Rapčák, W-algebra modules, free fields, and Gukov-Witten defects, JHEP 05 (2019) 159 [arXiv:1808.08837] [INSPIRE].

[30] M. Rapčak, Y. Soibelman, Y. Yang and G. Zhao, Cohomological Hall algebras, vertex algebras and instantons, Commun. Math. Phys. 376 (2019) 1803 [arXiv:1810.10402] [INSPIRE].

[31] M. Rapčak, Y. Soibelman, Y. Yang and G. Zhao, Cohomological Hall algebras and perverse coherent sheaves on toric Calabi-Yau 3-folds, Commun. Num. Theor. Phys. 17 (2023) 847 [arXiv:2007.13365] [INSPIRE].
[32] W. Li and M. Yamazaki, *Quiver Yangian from Crystal Melting*, JHEP 11 (2020) 035
[arXiv:2003.08909] [INSPIRE].

[33] D. Galakhov, W. Li and M. Yamazaki, *Toroidal and elliptic quiver BPS algebras and beyond*, JHEP 02 (2022) 024 [arXiv:2108.10286] [INSPIRE].

[34] G. Noshita and A. Watanabe, *A note on quiver quantum toroidal algebra*, JHEP 05 (2022) 011
[arXiv:2108.07104] [INSPIRE].

[35] M.F. Atiyah, N.J. Hitchin, V.G. Drinfeld and Y.I. Manin, *Construction of Instantons*, Phys. Lett. A 65 (1978) 185 [INSPIRE].

[36] M.F. Atiyah and R. Bott, *The moment map and equivariant cohomology*, Topology 23 (1984) 1
[INSPIRE].

[37] A. Lossev, N. Nekrasov and S.L. Shatashvili, *Testing Seiberg-Witten solution*, NATO Sci. Ser. C 520 (1999) 359 [hep-th/9801061] [INSPIRE].

[38] G.W. Moore, N. Nekrasov and S. Shatashvili, *Integrating over Higgs branches*, Commun. Math. Phys. 209 (2000) 97 [hep-th/9712241] [INSPIRE].

[39] B.S. Acharya, M. O'Loughlin and B.J. Spence, *Higher dimensional analogs of Donaldson-Witten theory*, Nucl. Phys. B 503 (1997) 657 [hep-th/9705138] [INSPIRE].

[40] L. Baulieu, H. Kanno and I.M. Singer, *Special quantum field theories in eight-dimensions and other dimensions*, Commun. Math. Phys. 194 (1998) 149 [hep-th/9704167] [INSPIRE].

[41] N.A. Nekrasov, *Instanton partition functions and M-theory*, Japanese Journal of Mathematics 4 (2009) 63.

[42] R.J. Szabo and M. Tirelli, *Noncommutative instantons in diverse dimensions*, Eur. Phys. J. ST 232 (2023) 3661 [arXiv:2207.12862] [INSPIRE].

[43] N. Nekrasov, *Analytic continuation and supersymmetry*, Proc. Symp. Pure Math. 107 (2024) 167 [arXiv:2310.01654] [INSPIRE].

[44] D.L. Jafferis, *Topological Quiver Matrix Models and Quantum Foam*, arXiv:0705.2250 [INSPIRE].

[45] M. Cirafici, A. Sinkovics and R.J. Szabo, *Cohomological gauge theory, quiver matrix models and Donaldson-Thomas theory*, Nucl. Phys. B 809 (2009) 452 [arXiv:0803.4188] [INSPIRE].

[46] H. Awata and H. Kanno, *Quiver Matrix Model and Topological Partition Function in Six Dimensions*, JHEP 07 (2009) 076 [arXiv:0905.0184] [INSPIRE].

[47] H. Kanno, *Quiver matrix model of ADHM type and BPS state counting in diverse dimensions*, PTEP 2020 (2020) 11B104 [arXiv:2004.05760] [INSPIRE].

[48] E. Witten, *Sigma models and the ADHM construction of instantons*, J. Geom. Phys. 15 (1995) 215 [hep-th/9410052] [INSPIRE].

[49] E. Witten, *Small instantons in string theory*, Nucl. Phys. B 460 (1996) 541 [hep-th/9511030] [INSPIRE].

[50] M.R. Douglas, *Branes within branes*, NATO Sci. Ser. C 520 (1999) 267 [hep-th/9512077] [INSPIRE].

[51] M.R. Douglas, *Gauge fields and D-branes*, J. Geom. Phys. 28 (1998) 255 [hep-th/9604198] [INSPIRE].

[52] E. Pomoni, W. Yan and X. Zhang, *Tetrahedron Instantons*, Commun. Math. Phys. 393 (2022) 781 [arXiv:2106.11611] [INSPIRE].
[53] N. Fasola and S. Monavari, *Tetrahedron instantons in Donaldson-Thomas theory*, arXiv:2306.07145 [inSPIRE].

[54] Y. Cao and G. Zhao, *Quasimaps to quivers with potentials*, arXiv:2306.01302 [inSPIRE].

[55] B. Szendroi, *Non-commutative Donaldson-Thomas invariants and the conifold*, *Geom. Topol.* **12** (2008) 1171 [arXiv:0705.3419] [inSPIRE].

[56] S. Mozgovoy and M. Reineke, *On the noncommutative Donaldson-Thomas invariants arising from brane tilings*, arXiv:0809.0117 [inSPIRE].

[57] H. Ooguri and M. Yamazaki, *Crystal Melting and Toric Calabi-Yau Manifolds*, *Commun. Math. Phys.* **292** (2009) 179 [arXiv:0811.2801] [inSPIRE].

[58] K. Nagao and H. Nakajima, *Counting invariant of perverse coherent sheaves and its wall-crossing*, *Int. Math. Res. Not.* (2010) 3885 [arXiv:0809.2992] [inSPIRE].

[59] N. Nekrasov and N.S. Prabhakar, *Spiked Instantons from Intersecting D-branes*, *Nucl. Phys. B* **914** (2017) 257 [arXiv:1611.03478] [inSPIRE].

[60] T. Kimura and V. Pestun, *Quiver W-algebras*, *Lett. Math. Phys.* **108** (2018) 1351 [arXiv:1512.0853] [inSPIRE].

[61] T. Kimura and V. Pestun, *Quiver elliptic W-algebras*, *Lett. Math. Phys.* **108** (2018) 1383 [arXiv:1608.04651] [inSPIRE].

[62] T. Kimura and V. Pestun, *Fractional quiver W-algebras*, *Lett. Math. Phys.* **108** (2018) 2425 [arXiv:1705.04410] [inSPIRE].

[63] T. Kimura and V. Pestun, *Twisted reduction of quiver W-algebras*, arXiv:1905.03865 [inSPIRE].

[64] T. Kimura, *Instanton Counting, Quantum Geometry and Algebra*, Springer (2021) [DOI:10.1007/978-3-030-76190-5] [inSPIRE].

[65] H.-C. Kim, *Line defects and 5d instanton partition functions*, JHEP 03 (2016) 199 [arXiv:1601.06841] [inSPIRE].

[66] J. Shiraishi, H. Kubo, H. Awata and S. Odake, *A quantum deformation of the Virasoro algebra and the Macdonald symmetric functions*, *Lett. Math. Phys.* **38** (1996) 33 [q-alg/9507034] [inSPIRE].

[67] H. Awata, H. Kubo, S. Odake and J. Shiraishi, *Quantum $W(N)$ algebras and Macdonald polynomials*, *Commun. Math. Phys.* **179** (1996) 401 [q-alg/9508011] [inSPIRE].

[68] H. Awata, H. Kubo, S. Odake and J. Shiraishi, *Quantum deformation of the $W(N)$ algebra*, in the proceedings of the *Extended and Quantum Algebras and their Applications to Physics*, Tianjin, China, August 19–24 (1996) [q-alg/9612001] [inSPIRE].

[69] E. Frenkel and N. Reshetikhin, *Deformations of $W$-algebras associated to simple Lie algebras*, *Commun. Math. Phys.* **197** (1998) 1 [q-alg/9708006] [inSPIRE].

[70] E. Frenkel and N. Reshetikhin, *The $q$-characters of representations of quantum affine algebras and deformations of $W$-algebras*, math/9810055 [inSPIRE].

[71] N. Nekrasov and V. Pestun, *Seiberg-Witten Geometry of Four-Dimensional $N = 2$ Quiver Gauge Theories*, SIGMA **19** (2023) 047 [arXiv:1211.2240] [inSPIRE].

[72] S. Jeong and N. Nekrasov, *Opers, surface defects, and Yang-Yang functional*, *Adv. Theor. Math. Phys.* **24** (2020) 1789 [arXiv:1806.08270] [inSPIRE].
[73] S. Jeong, N. Lee and N. Nekrasov, *Intersecting defects in gauge theory, quantum spin chains, and Knizhnik-Zamolodchikov equations*, JHEP 10 (2021) 120 [arXiv:2103.17186 [insPIRE]].

[74] T. Kimura and G. Noshita, in preparation.

[75] J.-E. Bourgine and S. Jeong, *New quantum toroidal algebras from 5D $N=1$ instantons on orbifolds*, JHEP 05 (2020) 127 [arXiv:1906.01625 [insPIRE]].

[76] Y. Cao, M. Kool and S. Monavari, *K-Theoretic DT/PT Correspondence for Toric Calabi-Yau 4-Folds*, Commun. Math. Phys. 396 (2022) 225 [arXiv:1906.07856 [insPIRE]].

[77] T. Kimura, *Double Quiver Gauge Theory and BPS/CFT Correspondence*, SIGMA 19 (2023) 039 [arXiv:2212.03870 [insPIRE]].

[78] Y. Cao, M. Kool and S. Monavari, *A Donaldson-Thomas crepit resolution conjecture on Calabi-Yau 4-folds*, Trans. Am. Math. Soc. 376 (2023) 8225 [arXiv:2301.11629 [insPIRE]].

[79] R.J. Szabo and M. Tirelli, *Instanton Counting and Donaldson-Thomas Theory on Toric Calabi-Yau Four-Orbifolds*, arXiv:2301.13069 [insPIRE].

[80] N. Nekrasov and N. Piazzalunga, *Global magni4icence, or: 4G Networks*, arXiv:2306.12995 [insPIRE].

[81] E. Pomoni, W. Yan and X. Zhang, *Probing M-theory with tetrahedron instantons*, JHEP 11 (2023) 177 [arXiv:2306.06005 [insPIRE]].

[82] S. Shadchin, *On F-term contribution to effective action*, JHEP 08 (2007) 052 [hep-th/0611278 [insPIRE]].

[83] M. Rapčak, *Branes, Quivers and BPS Algebras*, arXiv:2112.13878 [insPIRE].

[84] A. Losev, N. Nekrasov and S.L. Shatashvili, *Issues in topological gauge theory*, Nucl. Phys. B 534 (1998) 549 [hep-th/9711108 [insPIRE]].

[85] L.C. Jeffrey and F.C. Kirwan, *Localization for nonabelian group actions*, Topology 34 (1993) 291. [alg-geom/9307001] [insPIRE].

[86] Y. Cao and M. Kool, *Zero-dimensional Donaldson-Thomas invariants of Calabi-Yau 4-folds*, Adv. Math. 338 (2018) 601 [arXiv:1712.07347 [insPIRE]].

[87] M. Billò et al., *Classical solutions for exotic instantons?, JHEP 03 (2009) 056* [arXiv:0901.1666 [insPIRE]].

[88] M. Billò et al., *Exotic instanton counting and heterotic/type I-prime duality*, JHEP 07 (2009) 092 [arXiv:0905.4586 [insPIRE]].

[89] G. Bonelli, N. Fasola, A. Tanzini and Y. Zenkevich, *ADHM in 8d, coloured solid partitions and Donaldson-Thomas invariants on orbifolds*, J. Geom. Phys. 191 (2023) 104910 [arXiv:2011.02366 [insPIRE]].

[90] M. Billò et al., *On the $D(-1)/D7$-brane systems*, JHEP 04 (2021) 096 [arXiv:2101.01732 [insPIRE]].

[91] D. Borisov and D. Joyce, *Virtual fundamental classes for moduli spaces of sheaves on Calabi-Yau four-folds*, Geom. Topol. 21 (2017) 3231 [arXiv:1504.00690 [insPIRE]].

[92] J. Oh and R.P. Thomas, *Counting sheaves on Calabi-Yau 4-folds*, I, Duke Math. J. 172 (2023) 1333 [arXiv:2009.05542 [insPIRE]].

[93] T. Kimura and V. Pestun, *Super instanton counting and localization*, arXiv:1905.01513 [insPIRE].
[94] C. Vafa, Brane / anti-brane systems and U(N|M) supergroup, hep-th/0101218 [INSPIRE].

[95] T. Okuda and T. Takayanagi, *Ghost D-branes*, JHEP 03 (2006) 062 [hep-th/0601024] [INSPIRE].

[96] R. Dijkstra, B. Heidenreich, P. Jefferson and C. Vafa, *Negative Branes, Supergroups and the Signature of Spacetime*, JHEP 02 (2018) 050 [arXiv:1603.05665] [INSPIRE].

[97] T. Kimura, *Aspects of supergroup gauge theory*, Int. J. Mod. Phys. A 38 (2023) 2330001 [arXiv:2301.05927] [INSPIRE].

[98] T. Kimura and Y. Shao, *Orthosymplectic superinstanton counting and brane dynamics*, Lett. Math. Phys. 113 (2023) 122 [arXiv:2306.08156] [INSPIRE].

[99] G. Noshita, *5d AGT correspondence of supergroup gauge theories from quantum toroidal gl₁*, JHEP 12 (2022) 157 [arXiv:2209.08313] [INSPIRE].

[100] Y. Yoshida, *Localization of Vortex Partition Functions in N = (2,2) Super Yang-Mills theory*, arXiv:1101.0872 [INSPIRE].

[101] M. Fujitsuka, M. Honda and Y. Yoshida, *Higgs branch localization of 3d N = 2 theories*, PTEP 2014 (2014) 123B02 [arXiv:1312.3627] [INSPIRE].

[102] Y. Yoshida and K. Sugiyama, *Localization of three-dimensional N = 2 supersymmetric theories on S¹ × D²*, PTEP 2020 (2020) 113B02 [arXiv:1409.6713] [INSPIRE].

[103] F. Nieri, Y. Pan and M. Zabidine, *3d Expansions of 5d Instanton Partition Functions*, JHEP 04 (2018) 092 [arXiv:1711.06150] [INSPIRE].

[104] T. Kimura, *Integrating over quiver variety and BPS/CFT correspondence*, Lett. Math. Phys. 110 (2020) 1237 [arXiv:1910.03247] [INSPIRE].

[105] A. Sen, *Tachyon condensation on the brane anti-brane system*, JHEP 08 (1998) 012 [hep-th/9805170] [INSPIRE].

[106] S. Oppermann, *Quivers for silting mutation*, Adv. Math. 307 (2017) 684 [arXiv:1504.02617].

[107] A.B. Buan and H. Thomas, *Coloured quiver mutation for higher cluster categories*, Adv. Math. 222 (2009) 971 [arXiv:0809.0691].

[108] S. Franco and G. Musiker, *Higher Cluster Categories and QFT Dualities*, Phys. Rev. D 98 (2018) 046021 [arXiv:1711.01270] [INSPIRE].

[109] C. Closset, S. Franco, J. Guo and A. Hasan, *Graded quivers and B-branes at Calabi-Yau singularities*, JHEP 03 (2019) 053 [arXiv:1811.07016] [INSPIRE].

[110] M.R. Douglas and G.W. Moore, *D-branes, quivers, and ALE instantons*, hep-th/9603167 [INSPIRE].

[111] S. Franco et al., *Gauge theories from toric geometry and brane tilings*, JHEP 01 (2006) 128 [hep-th/0505211] [INSPIRE].

[112] S. Franco et al., *Brane dimers and quiver gauge theories*, JHEP 01 (2006) 096 [hep-th/0504110] [INSPIRE].

[113] S. Franco, S. Lee and R.-K. Seong, *Brane Brick Models, Toric Calabi-Yau 4-Folds and 2d (0,2) Quivers*, JHEP 02 (2016) 047 [arXiv:1510.01744] [INSPIRE].

[114] S. Franco et al., *2d (0,2) Quiver Gauge Theories and D-Branes*, JHEP 09 (2015) 072 [arXiv:1506.03818] [INSPIRE].
[115] D. Galakhov and M. Yamazaki, *Quiver Yangian and Supersymmetric Quantum Mechanics*, Commun. Math. Phys. **396** (2022) 713 [arXiv:2008.07006] [INSPIRE].

[116] A. Iqbal, N. Nekrasov, A. Okounkov and C. Vafa, *Quantum foam and topological strings*, JHEP **04** (2008) 011 [hep-th/0312022] [INSPIRE].

[117] A. Iqbal, C. Kozçaz and C. Vafa, *The refined topological vertex*, JHEP **10** (2009) 069 [hep-th/0701156] [INSPIRE].

[118] M. Aganagic, A. Klemm, M. Marino and C. Vafa, *The Topological vertex*, Commun. Math. Phys. **254** (2005) 425 [hep-th/0305132] [INSPIRE].

[119] A. Okounkov, N. Reshetikhin and C. Vafa, *Quantum Calabi-Yau and classical crystals*, Prog. Math. **244** (2006) 597 [hep-th/0309208] [INSPIRE].

[120] K.D. Kennaway, *Brane Tilings, Int. J. Mod. Phys. A **22** (2007) 2977 [arXiv:0706.1660] [INSPIRE].

[121] A. Hanany and A. Zaffaroni, *On the realization of chiral four-dimensional gauge theories using branes*, JHEP **05** (1998) 001 [hep-th/9801134] [INSPIRE].

[122] A. Hanany and D. Vegh, *Quivers, tilings, branes and rhombi*, JHEP **10** (2007) 029 [hep-th/0511063] [INSPIRE].

[123] S. Franco, S. Lee and R.-K. Seong, *Brane brick models and 2d (0,2) triality*, JHEP **05** (2016) 020 [arXiv:1602.01834] [INSPIRE].

[124] S. Franco, D. Ghim, S. Lee and R.-K. Seong, *Elliptic Genera of 2d (0,2) Gauge Theories from Brane Brick Models*, JHEP **06** (2017) 068 [arXiv:1702.02948] [INSPIRE].

[125] H. Garcia-Compean and A.M. Uranga, *Brane box realization of chiral gauge theories in two-dimensions*, Nucl. Phys. B **539** (1999) 329 [hep-th/9806177] [INSPIRE].

[126] M. Yamazaki, *Brane Tilings and Their Applications*, Fortsch. Phys. **56** (2008) 555 [arXiv:0803.4474] [INSPIRE].

[127] N. Piazzalunga, *The one-legged K-theoretic vertex of fourfolds from 3d gauge theory*, arXiv:2306.12405 [INSPIRE].

[128] D. Galakhov, W. Li and M. Yamazaki, *Shifted quiver Yangians and representations from BPS crystals*, JHEP **08** (2021) 146 [arXiv:2106.01230] [INSPIRE].

[129] G. Noshita and A. Watanabe, *Shifted quiver quantum toroidal algebra and subcrystal representations*, JHEP **05** (2022) 122 [arXiv:2109.02045] [INSPIRE].

[130] H. Kanno and Y. Tachikawa, *Instanton counting with a surface operator and the chain-saw quiver*, JHEP **06** (2011) 119 [arXiv:1105.0357] [INSPIRE].

[131] M. Aganagic, N. Haouzi, C. Kozçaz and S. Shakirov, *Gauge/Liouville Triality*, arXiv:1309.1687 [INSPIRE].

[132] M. Aganagic, N. Haouzi and S. Shakirov, *A$_n$-Triality*, arXiv:1403.3657 [INSPIRE].

[133] M. Aganagic and N. Haouzi, *ADE Little String Theory on a Riemann Surface (and Triality)*, arXiv:1506.04183 [INSPIRE].

[134] T. Kimura and F. Nieri, *Intersecting defects and supergroup gauge theory*, J. Phys. A **54** (2021) 435401 [arXiv:2105.02776] [INSPIRE].

[135] C. Beem, T. Dimofte and S. Pasquetti, *Holomorphic Blocks in Three Dimensions*, JHEP **12** (2014) 177 [arXiv:1211.1986] [INSPIRE].
[136] H. Konno and K. Oshima, *Elliptic quantum toroidal algebra* $U_{q,t,p}(gl_{1,tor})$ and affine quiver gauge theories, *Lett. Math. Phys.* **113** (2023) 32 [arXiv:2112.09885] [INSPIRE].

[137] B. Feigin, M. Jimbo, T. Miwa and E. Mukhin, *Quantum toroidal gl$_1$-algebra: Plane partitions*, *Kyoto J. Math.* **52** (2012) 621 [arXiv:1110.5310].

[138] H. Awata et al., *The MacMahon R-matrix*, JHEP 04 (2019) 097 [arXiv:1810.07676] [INSPIRE].

[139] M. Bershtein, B. Feigin and G. Merzon, *Plane partitions with a “pit”: generating functions and representation theory*, Selecta Math. **24** (2018) 21 [arXiv:1512.08779].

[140] K. Harada and Y. Matsuo, *Plane partition realization of (web of) W-algebra minimal models*, JHEP 02 (2019) 050 [arXiv:1810.08512] [INSPIRE].

[141] V. Belavin, O. Foda and R. Santachiara, *AGT, N-Burge partitions and W$_N$ minimal models*, JHEP 10 (2015) 073 [arXiv:1507.03540] [INSPIRE].

[142] K.B. Alkalaev and V.A. Belavin, *Conformal blocks of W$_N$ minimal models and AGT correspondence*, JHEP 07 (2014) 024 [arXiv:1404.7094] [INSPIRE].

[143] T. Kimura, *Higgsing qq-character and irreducibility*, arXiv:2205.08312 [INSPIRE].

[144] H. Awata and H. Kanno, *Instanton counting, Macdonald functions and the moduli space of D-branes*, JHEP 05 (2005) 039 [hep-th/0502061] [INSPIRE].

[145] H. Awata and H. Kanno, *Refined BPS state counting from Nekrasov's formula and Macdonald functions*, Int. J. Mod. Phys. A 24 (2009) 2253 [arXiv:0805.0191] [INSPIRE].

[146] M. Taki, *Refined Topological Vertex and Instanton Counting*, JHEP 03 (2008) 048 [arXiv:0710.1776] [INSPIRE].

[147] K. Harada, *Quantum deformation of Feigin-Semikhatov's W-algebras and 5d AGT correspondence with a simple surface operator*, arXiv:2005.14174 [INSPIRE].

[148] J. Ding, J.-T. Ding and K. Iohara, *Generalization and deformation of Drinfeld quantum affine algebras*, *Lett. Math. Phys.* **41** (1997) 181 [q-alg/9608002] [INSPIRE].

[149] B. Feigin et al., *Quantum continuous gl$_\infty$: Tensor products of Fock modules and W$_n$ characters*, *Kyoto J. Math.* **51** (2011) 365 [arXiv:1002.3113] [INSPIRE].

[150] Y. Matsuo, S. Nawata, G. Noshita and R.-D. Zhu, *Quantum toroidal algebras and solvable structures in gauge/string theory*, Phys. Rept. **1055** (2024) 1 [arXiv:2309.07596] [INSPIRE].

[151] G. Noshita, *Brane tilings and crystal representations of quiver quantum toroidal algebras*, M.Sc. thesis, University of Tokyo, Tokyo 113-8654, Japan (2022) [INSPIRE].

[152] B. Feigin et al., *Kernel function and quantum algebras*, arXiv:1002.2485.

[153] T. Kojima, *Quadratic relations of the deformed W-superalgebra W$_{q,t}$ (sl(2|1))*, J. Math. Phys. **62** (2021) 051702 [arXiv:1912.03096] [INSPIRE].

[154] T. Kojima, *Quadratic relations of the deformed W-superalgebra W$_{q,t}$ (A(M, N))*, J. Phys. A **54** (2021) 335201 [arXiv:2101.01110] [INSPIRE].

[155] K. Harada, Y. Matsuo, G. Noshita and A. Watanabe, *q-deformation of corner vertex operator algebras by Miura transformation*, JHEP 04 (2021) 202 [arXiv:2101.03953] [INSPIRE].

[156] H. Liu, *A Representation-Theoretic Approach to qq-Characters*, SIGMA **18** (2022) 090 [arXiv:2203.07072] [INSPIRE].
[157] M.B. Bayındırlı, D.N. Demirtaş, C. Kozçaz and Y. Zenkevich, *On R-matrix formulation of qq-characters*, arXiv:2310.02587 [inSPIRE].

[158] B. Feigin, M. Jimbo, T. Miwa and E. Mukhin, *Quantum toroidal $gl_1$ and Bethe ansatz*, *J. Phys. A* **48** (2015) 244001 [arXiv:1502.07194] [inSPIRE].

[159] B. Feigin, M. Jimbo, T. Miwa and E. Mukhin, *Finite Type Modules and Bethe Ansatz for Quantum Toroidal $gl_1$, Commun. Math. Phys.* **356** (2017) 285 [arXiv:1603.02765] [inSPIRE].

[160] J.-E. Bourgine, *Fiber-base duality from the algebraic perspective*, JHEP **03** (2019) 003 [arXiv:1810.00301] [inSPIRE].

[161] J.-E. Bourgine, *Shifted Quantum Groups and Matter Multiplets in Supersymmetric Gauge Theories*, Commun. Math. Phys. **401** (2023) 2051 [arXiv:2205.01309] [inSPIRE].

[162] T. Procházka, *W-symmetry, topological vertex and affine Yangian*, JHEP **10** (2016) 077 [arXiv:1512.07178] [inSPIRE].

[163] V. Ginzburg, M. Kapranov and E. Vasserot, *Langlands Reciprocity for Algebraic Surfaces*, Math. Res. Lett. **2** (1995) 147 [q-alg/9502013].

[164] B. Feigin, M. Jimbo, T. Miwa and E. Mukhin, *Branching rules for quantum toroidal $gl_n$, Adv. Math.* **300** (2016) 229 [arXiv:1309.2147] [inSPIRE].

[165] B. Feigin, M. Jimbo, T. Miwa and E. Mukhin, *Representations of quantum toroidal $gl_n$, J. Algebra* **380** (2013) 78 [arXiv:1204.5378] [inSPIRE].

[166] H. Awata et al., $(q,t)$-KZ equations for quantum toroidal algebra and Nekrasov partition functions on ALE spaces, JHEP **03** (2018) 192 [arXiv:1712.08016] [inSPIRE].

[167] J. Bao, Y.-H. He and A. Zahabi, *Crystal melting, BPS quivers and plethystics*, JHEP **06** (2022) 016 [arXiv:2202.12850] [inSPIRE].

[168] N.A. Nekrasov and S.L. Shatashvili, *Quantization of Integrable Systems and Four Dimensional Gauge Theories*, in the proceedings of the 16th International Congress on Mathematical Physics, Prague, Czechia, August 03–08 (2009) [DOI:10.1142/9789814304634_0015] [arXiv:0908.4052] [inSPIRE].

[169] H.-Y. Chen, T.J. Hollowood and P. Zhao, *A 5d/3d duality from relativistic integrable system*, JHEP **07** (2012) 139 [arXiv:1205.4230] [inSPIRE].

[170] R. Donagi and E. Witten, *Supersymmetric Yang-Mills theory and integrable systems*, Nucl. Phys. **B** **460** (1996) 299 [hep-th/9510101] [inSPIRE].

[171] E. D'Hoker and D.H. Phong, *Calogero-Moser systems in SU(N) Seiberg-Witten theory*, Nucl. Phys. **B** **513** (1998) 405 [hep-th/9709053] [inSPIRE].

[172] T. Kimura and N. Lee, *Defect in gauge theory and quantum Hall states*, Nucl. Phys. **B** **991** (2023) 116218 [arXiv:2210.05949] [inSPIRE].

[173] A.V. Litvinov, *On spectrum of ILW hierarchy in conformal field theory*, JHEP **11** (2013) 155 [arXiv:1307.8094] [inSPIRE].

[174] S. Kerov, A. Okounkov and G. Olshanski, *The boundary of the Young graph with Jack edge multiplicities*, Int. Math. Res. Not. **1998** (1998) 173 [q-alg/9703037].

[175] A. Sergeev, *Superanalogs of the Calogero Operators and Jack Polynomials*, Journal of Nonlinear Mathematical Physics **8** (2001) 59 [math/0106222].

[176] A.N. Sergeev, *Calogero operator and Lie superalgebras*, Theor. Math. Phys. **131** (2002) 747 [inSPIRE].
[177] A.N. Sergeev and A.P. Veselov, Generalised discriminants, deformed Calogero-Moser-Sutherland operators and super-Jack polynomials, Adv. Math. 192 (2005) 341 [math-ph/0307036].

[178] H.-Y. Chen, T. Kimura and N. Lee, Quantum Elliptic Calogero-Moser Systems from Gauge Origami, JHEP 02 (2020) 108 [arXiv:1908.04928] [INSPIRE].

[179] D. Gaiotto and M. Rapčak, Miura operators, degenerate fields and the M2-M5 intersection, JHEP 01 (2022) 086 [arXiv:2012.04118] [INSPIRE].

[180] H. Knight, Spectra of Tensor Products of Finite Dimensional Representations of Yangians, J. Algebra 174 (1995) 187.

[181] T. Procházka and A. Watanabe, On Bethe equations of 2d conformal field theory, arXiv:2301.05147 [INSPIRE].

[182] A. Grekov and N. Nekrasov, Elliptic Calogero-Moser system, crossed and folded instantons, and bilinear identities, arXiv:2310.04571 [INSPIRE].

[183] D. Galakhov, W. Li and M. Yamazaki, Gauge/Bethe correspondence from quiver BPS algebras, JHEP 11 (2022) 119 [arXiv:2206.13340] [INSPIRE].

[184] T. Kimura and V. Pestun, Fractionalization of quiver variety and qq-character, unpublished (2022).

[185] V.G. Drinfeld, A new realization of Yangians and quantized affine algebras, Sov. Math. Dokl. 36 (1988) 212 [INSPIRE].

[186] V. Chari and A. Pressley, Quantum affine algebras, Commun. Math. Phys. 142 (1991) 261.

[187] H. Nakajima and A. Weekes, Coulomb branches of quiver gauge theories with symmetrizers, J. Eur. Math. Soc. 25 (2021) 203 [arXiv:1907.06552] [INSPIRE].

[188] H. Nakajima, Quiver varieties and finite dimensional representations of quantum affine algebras, J. Am. Math. Soc. 14 (2000) 145 [math/9912158].

[189] H. Nakajima, t-analogue of the q-characters of finite dimensional representations of quantum affine algebras, in Physics and Combinatorics, A.N. Kirillov and N. Liskova eds., World Scientific (2001), p. 196–219 [DOI:10.1142/9789812810007_0009] [math/0009231].

[190] H. Nakajima, Quiver varieties and t-analogs of q-characters of quantum affine algebras, Annals Math. 160 (2004) 1057 [math/0105173].

[191] F. Nieri and Y. Zenkevich, Quiver $W_{\epsilon_1, \epsilon_2}$ algebras of $4d N = 2$ gauge theories, J. Phys. A 53 (2020) 275401 [arXiv:1912.09969] [INSPIRE].

[192] J.E. Bourgine and K. Zhang, A note on the algebraic engineering of $4D N = 2$ super Yang-Mills theories, Phys. Lett. B 789 (2019) 610 [arXiv:1809.08861] [INSPIRE].

[193] K. Nagao, Refined open non-commutative Donaldson-Thomas invariants for small crepant resolutions, Pac. J. Math. 254 (2011) 173 [arXiv:0907.3784] [INSPIRE].

[194] K. Nagao and M. Yamazaki, The Non-commutative Topological Vertex and Wall Crossing Phenomena, Adv. Theor. Math. Phys. 14 (2010) 1147 [arXiv:0910.5479] [INSPIRE].

[195] P. Sulkowski, Wall-crossing, open BPS counting and matrix models, JHEP 03 (2011) 089 [Erratum ibid. 04 (2011) 046] [arXiv:1011.5269] [INSPIRE].

[196] F. Benini, R. Eager, K. Hori and Y. Tachikawa, Elliptic genera of two-dimensional $N = 2$ gauge theories with rank-one gauge groups, Lett. Math. Phys. 104 (2014) 465 [arXiv:1305.0533] [INSPIRE].
[197] F. Benini, R. Eager, K. Hori and Y. Tachikawa, *Elliptic Genera of 2d $\mathcal{N}=2$ Gauge Theories, Commun. Math. Phys.* **333** (2015) 1241 [arXiv:1308.4896] [INSPIRE].

[198] F. Benini, G. Bonelli, M. Poggi and A. Tanzini, *Elliptic non-Abelian Donaldson-Thomas invariants of $\mathbb{C}^3$, JHEP* **07** (2019) 068 [arXiv:1807.08482] [INSPIRE].

[199] H. Awata, B. Feigin and J. Shiraishi, *Quantum Algebraic Approach to Refined Topological Vertex, JHEP* **03** (2012) 041 [arXiv:1112.6074] [INSPIRE].

[200] H. Awata et al., *Explicit examples of DIM constraints for network matrix models, JHEP* **07** (2016) 103 [arXiv:1604.08366] [INSPIRE].

[201] H. Awata et al., *Toric Calabi-Yau threefolds as quantum integrable systems. $\mathcal{R}$-matrix and RTT relations, JHEP* **10** (2016) 047 [arXiv:1608.05351] [INSPIRE].

[202] H. Awata et al., *Anomaly in RTT relation for DIM algebra and network matrix models, Nucl. Phys. B* **918** (2017) 358 [arXiv:1611.07304] [INSPIRE].

[203] J.-E. Bourgine et al., *Coherent states in quantum $W_{1+\infty}$ algebra and qq-character for 5d Super Yang-Mills, PTEP* **2016** (2016) 123B05 [arXiv:1606.08020] [INSPIRE].

[204] H. Awata et al., *Generalized Knizhnik-Zamolodchikov equation for Ding-Iohara-Miki algebra, Phys. Rev. D* **96** (2017) 026021 [arXiv:1703.06084] [INSPIRE].

[205] J.-E. Bourgine et al., $(p, q)$-webs of DIM representations, 5d $\mathcal{N}=1$ instanton partition functions and qq-characters, JHEP **11** (2017) 034 [arXiv:1703.10759] [INSPIRE].

[206] J.-E. Bourgine, M. Fukuda, Y. Matsuo and R.-D. Zhu, *Reflection states in Ding-Iohara-Miki algebra and brane-web for D-type quiver, JHEP* **12** (2017) 015 [arXiv:1709.01954] [INSPIRE].

[207] Y. Zenkevich, *Higgsed network calculus, JHEP* **08** (2021) 149 [arXiv:1812.11961] [INSPIRE].

[208] Y. Zenkevich, *Mixed network calculus, JHEP* **12** (2021) 027 [arXiv:2012.15563] [INSPIRE].

[209] M. Ghoneim, C. Kozçaz, K. Kurşun and Y. Zenkevich, *4d higgsed network calculus and elliptic DIM algebra, Nucl. Phys. B* **978** (2022) 115740 [arXiv:2012.15352] [INSPIRE].

[210] J.-E. Bourgine, *Engineering 3D $N=2$ theories using the quantum affine $sl(2)$ algebra, Nucl. Phys. B* **985** (2022) 115979 [arXiv:2107.10063] [INSPIRE].

[211] Y. Saito, *Elliptic Ding-Iohara Algebra and the Free Field Realization of the Elliptic Macdonald Operator, Publ. Res. Inst. Math. Sci.* **50** (2014) 411 [arXiv:1301.4912].

[212] R.-D. Zhu, *An Elliptic Vertex of Awata-Feigin-Shiraishi type for M-strings, JHEP* **08** (2018) 050 [arXiv:1712.10255] [INSPIRE].

[213] O. Foda and R.-D. Zhu, *An elliptic topological vertex, J. Phys. A* **51** (2018) 465401 [arXiv:1805.12073] [INSPIRE].

[214] B. Feigin, M. Jimbo, E. Mukhin and I. Vilkoviskiy, *Deformations of $W$ algebras via quantum toroidal algebras, Selecta Math.* **27** (2021) 52 [arXiv:2003.04234] [INSPIRE].

[215] S. Jeong, *Splitting of surface defect partition functions and integrable systems, Nucl. Phys. B* **938** (2019) 775 [arXiv:1709.04926] [INSPIRE].

[216] S. Jeong, N. Lee and N. Nekrasov, *Parallel surface defects, Hecke operators, and quantum Hitchin system, arXiv:2304.04656* [INSPIRE].

[217] J. Bao, *A note on quiver Yangians and $\mathcal{R}$-matrices, JHEP* **08** (2022) 219 [arXiv:2206.06186] [INSPIRE].
[218] D. Maulik and A. Okounkov, *Quantum Groups and Quantum Cohomology*, Astérisque 408 (2019) 1 [arXiv:1211.1287] [INSPIRE].

[219] M. Fukuda, K. Harada, Y. Matsuo and R.-D. Zhu, *The Maulik-Okounkov R-matrix from the Ding-Iohara-Miki algebra*, PTEP 2017 (2017) 093A01 [arXiv:1705.02941] [INSPIRE].

[220] A. Litvinov and I. Vilkoviskiy, *Liouville reflection operator, affine Yangian and Bethe ansatz*, JHEP 12 (2020) 100 [arXiv:2007.00535] [INSPIRE].

[221] A. Litvinov and I. Vilkoviskiy, *Integrable structure of BCD conformal field theory and boundary Bethe ansatz for affine Yangian*, JHEP 08 (2021) 141 [arXiv:2105.04018] [INSPIRE].

[222] E. Chistyakova, A. Litvinov and P. Orlov, *Affine Yangian of gl(2) and integrable structures of superconformal field theory*, JHEP 03 (2022) 102 [arXiv:2110.05870] [INSPIRE].

[223] D. Kolyaskin, A. Litvinov and A. Zhukov, *R-matrix formulation of affine Yangian of gl(1|1), Nucl. Phys. B 985 (2022) 116023* [arXiv:2206.01636] [INSPIRE].