\frac{(1-t^{-1})^{N-l_0}}{(1-q t^{-1})^{N-l_0}}\\
&E_{l_{n+m}}(t^{-1}) * \dots * E_{l_{n+1}}(t^{-1})
* H_{l_n}(t^{-1}) * \cdots * H_{l_1}(t^{-1})
* E_{l_0}(t q^{-1})
\label{eq:T-sh-super}
\end{align}

By the same arguments leading to (<ref>) we convert the trace in (<ref>) into a summation over the symmetric group:

\begin{align}
\label{eq:Tsigma-Wt-super}
\sum_{\substack{l_0\ldots l_{n+m}\geq 0 \\ l_0+\cdots +l_{n+m}=N}}
\frac{1}{l_0!\cdots l_{n+m}!}
\prod_{i=0}^n z_i^{l_i}
\prod_{i=1}^{m} (-w_i)^{l_{n+i}}
\sum_{\sigma \in \mathcal S_N}
\widetilde W_{\sigma(\lambda^-)}^{\sigma(\lambda^-)}(x)
\end{align}

where $\lambda^-=(0^{l_0}1^{l_1}\ldots (n+m)^{l_{n+m}})$.
Let us show that the summation over $\sigma$ can be written as a shuffle product. The diagonal elements $\widetilde W_{\alpha}^{\alpha}(x)$ in (<ref>) can be computed with the help of Proposition <ref> in which we set $y_i=q x_i$:

\begin{align}
\label{eq:W-mat-super}
\widetilde W_{\alpha}^{\alpha}(x)=
\prod_{k=0}^{n+m}
\times
\prod_{k_1=0}^{n+m}\prod_{k_2=k_1+1}^{n+m}
\prod_{j\in S(k_1)}
\prod_{i\in S(k_2)}
\frac{x_i-t x_j}{x_i-x_j}
\frac{q x_{i}-x_{j}}{q x_{i}-t x_{j}}
\end{align}

where $D_M^{(k)}(x):= D_M^{(k)}(x_1\ldots x_M;q x_1\ldots q x_M)$ and $S(k)\in [N]$ is the subset that records the positions of $k$'s in $\alpha$. The factors $D_{l_k}^{(k)}(x)$ are the domain-wall partition functions from Lemma <ref> in the special case $y_i = q x_i$. We can match these partition functions with the shuffle algebra functions:

\begin{align}\label{eq:EEH-Wx}
\begin{cases}
E_M(t q^{-1}) & k=0 \\
\dfrac{(1-t^{-1})^M}{(1-q t^{-1})^M}
H_M(t^{-1})  & 0< k \leq n \\
\dfrac{(1-t^{-1})^M}{(1-q t^{-1})^M}E_M(t^{-1})
& n< k \leq n+m
\end{cases}
\end{align}

where we remind that $E_M(t q^{-1})=1$ but considered to be a function in $(x_1\ldots x_M)$. By inserting (<ref>) into (<ref>) and recalling the definition of $\zeta$ in (<ref>) we get:

\begin{align}
\label{eq:WX-super}
\widetilde W_{\alpha}^{\alpha}(x)=
\frac{(1-t^{-1})^{N-l_0}}{(1-q t^{-1})^{N-l_0}}
E_{l_0}(t q^{-1};x_{S(0)})
&\prod_{k=1}^{n} H_{l_k}(t^{-1};x_{S(k)})
\prod_{k=n+1}^{n+m} E_{l_k}(t^{-1};x_{S(k)})\\
\prod_{i\in S(k_1)}
\prod_{j\in S(k_2)}
\zeta(x_j/x_i)\nonumber
\end{align}

Inserting this formula for $\widetilde W_{\alpha}^{\alpha}(x)$ into (<ref>) gives an expression which can be rewritten using the shuffle product (<ref>). Note that the positions of the variables $x_j$ and $x_i$ in  $\zeta(x_j/x_i)$ decide the order in which the shuffle product is taken: the functions ($H$ or $E$) which depend on $S(k)$ with higher values of $k$ should be placed on the left. This explains the reason for the ordering of the factors in the shuffle product in (<ref>).

Consider the generating function of $T_N(x;z,w)$:

\begin{align}\label{eq:Tv_def-super}
T(v;z,w) = \sum_{N=0}^{\infty} v^N T_N(x;z,w)
\end{align}

We have:

\begin{align}\label{eq:Tv-super}
T(v;z,w) =
\exp_*\left(\sum_{k>0}\frac{1}{k}\frac{1-t^k}{1-q^k}\left(\sum_{i=1}^{m} w_i^k
-\sum_{i=1}^n z_i^k
-\frac{q^k-t^k}{1-t^k}z_0^k  \right) v^{k}S_k\right)
\end{align}

We first note that the elements $E_k(t^{-1})$, $H_k(t^{-1})$ and $E_k(t q^{-1})$ belong to the commutative shuffle algebra $\Ac$. The proof of (<ref>) follows by writing (<ref>) with $T_N$ given by (<ref>). Then summing over $N$ produces a shuffle product of $m$ generating functions of $E_k(t^{-1})$, $n$ generating functions of $H_k(t^{-1})$ and a single generating function of $E_k( tq^{-1})$ where all generating functions have different generating parameters. Then we can use the exponential generating functions (<ref>) and (<ref>) which allows us to rewrite $T(v;z,w)$ in the form given in (<ref>). The last step is possible because we are dealing with commutative elements.

The partition function $T_N(v;z,w)$ is equal to $Z_N$ from the introduction (<ref>). In Theorem <ref> we wrote $Z_N$ in terms of yet another conic partition function $L_N$. This result follows from (<ref>) below.

Consider the matrix $W_N(x)$ associated to $U_t(\widehat{sl}(2|1))$ vertex model, i.e. in the matrix elements $W_{\gamma}^\delta(x)$, with $\gamma,\delta\in \{0,1,2\}^N$, the label $1$ denotes the bosonic colour and $2$ denotes the fermionic colour.
We define $L_N(x)$ to be the following partition function:
\begin{align}\label{eq:L-trace}
L_N(x) := \sum_{\alpha\in\{1,2\}^N}
\bra{\alpha} W_N(x)\ket{\alpha}
\end{align}

where $m_2(\alpha)$ is the multiplicity of the fermionic index $2$ in $\alpha$.

Using the same methods as in the proof of Theorem <ref> we can write $L_N(x)$ in terms of a shuffle product of $H_M(t^{-1})$ and $E_M(t^{-1})$ which by (<ref>) are equal to $D^{(1)}_M$ and $D^{(2)}_M$ up to a factor. Therefore the partition function $L_N(x)$ can be expressed as a combination of the fermionic and bosonic six vertex domain-wall partition functions:

\begin{align}
\label{eq:L-DW}
L_N(x) = \sum_{j=1}^N (-1)^j j D_{N-j}^{(1)}*D_j^{(2)}
\end{align}

The following proposition provides a lattice path realization of the shuffle algebra elements $S_N\in \Ac_N$.

The partition functions $L_N(x)$ and the elements $S_N\in\Ac_N$ are equal up to a factor:

\begin{align}
\label{eq:L-S}
L_N(x) = \frac{1-t^N}{1-q^N}S_N(x)
\end{align}

Consider $T_N(x;z_0,z_1,w_1)$, i.e. the case $n=m=1$ of $T_N$.
Set $z_0=0,z_1=1$ and $w_1=w$. We compute $T_N(x;0,1,w)$ using the definition (<ref>) of $T_N$:

\begin{align}\label{eq:T_W11}
T_N(x;0,1,w) = \sum_{\alpha\in\{1,2\}^N}
\bra{\alpha} W_N(x)\ket{\alpha}
\end{align}

By comparing (<ref>) with (<ref>) we see that the functions $L_N(x)$ and $T_N(x;0,1,w)$ are related by:

\begin{align}
\label{eq:L-T}
L_N(x))=\lim_{w\rightarrow 1} \frac{\partial}{\partial w} T_N(x;0,1,w)
\end{align}

Using (<ref>) we compute the exponential generating function of $T_N(x;0,1,w)$:

\begin{align}\label{eq:Tv11}
\sum_{N=0}^\infty v^N T_N(x;0,1,w) =
\exp_*\left(\sum_{k>0}\frac{1}{k}\frac{1-t^k}{1-q^k}\left(w^k-1\right) v^{k}S_k\right)
\end{align}

Next we take the sum over $N$ on both sides in (<ref>) with $v^N$ and compute the derivative and the limit on the r.h.s. using (<ref>). As a result we get (<ref>).

§ SKEW MACDONALD FUNCTIONS AND LATTICE PATHS

In this section we derive the connection between the trace elements $T_N$ and the skew Macdonald functions $P_{\mu/\nu}$. This connection is based on the mixed Cauchy kernel $K(x;w)$, which is defined by applying the isomorphism $\iota_z$ to the Cauchy kernel $\Pi(z,w)$ (see [15]). Under the evaluation map $\ev_{\mu/\nu}$ the mixed Cauchy kernel $K(x;w)$ reproduces the skew Macdonald functions $P_{\mu/\nu}(w)$. Finally we relate the mixed Cauchy kernel with the generating function $T(v;z,w)$.

§.§ The mixed Cauchy kernel

Let us recall the commuting shuffle algebra elements $F_\lambda\in \Ac$ and the evaluation map (<ref>) from Section <ref>. The functions $F_\lambda=F_\lambda(x_1\ldots x_k)$, with $\lambda\vdash k$, have an important property:

\ev_\mu(F_\lambda)= \delta_{\lambda,\mu} \frac{1}{d_\lambda}

Let us compute the evaluations $\ev_{\mu/\nu}$ of $F_\lambda$.

We have the product rule:

\begin{align}\label{eq:shuffle-LR-ceof}
q^{n(\mu')-n(\lambda')-n(\nu')}\frac{c_\lambda c_\nu}{c_\mu}
\end{align}

and evaluations:

\begin{align}
\label{eq:ev_LR}
\normalfont{\ev}_{\mu/\nu}\left(F_\lambda\right) =
q^{n(\mu')-n(\lambda')-n(\nu')}\frac{c_\lambda c_\nu}{c_\mu d_{\mu/\nu}}
\end{align}

We recall the product rule for Macdonald functions (<ref>) :

and apply the isomorphism $\iota^{-1}$ to the l.h.s. and to the r.h.s. of this equation separately:

\begin{align*}
\iota^{-1}\left(P_{\lambda}P_{\nu}\right)
\frac{q^{n(\lambda')+n(\nu')}(1-t)^{|\lambda|+|\nu|}}{c_\lambda c_\nu}
F_\lambda *F_\nu \\
\sum_{\mu}f^{\mu}_{\lambda,\nu}
\iota^{-1}\left(P_{\mu}\right)
\frac{q^{n(\mu')}(1-t)^{|\mu|}}{c_\mu}
\end{align*}

By comparing the two equations above and noting that $|\lambda|+|\mu|=|\nu|$ by the degree argument we verify (<ref>). In order to prove (<ref>) we act with (<ref>) on $\ket{\varnothing}$ and recall (<ref>) that $F_\nu\ket{\varnothing}=\ket{\nu}$:

\begin{align*}
q^{n(\mu')-n(\lambda')-n(\nu')}\frac{c_\lambda c_\nu}{c_\mu}
\end{align*}

This equation allows us to compute the matrix elements $\bra{\mu}F_{\lambda}\ket{\nu}$:

\begin{align*}
\bra{\mu}F_{\lambda}\ket{\nu}=
q^{n(\mu')-n(\lambda')-n(\nu')}\frac{c_\lambda c_\nu}{c_\mu}
\end{align*}

and combining this with (<ref>) leads to

Next we define the mixed Cauchy kernel $K(x;z)$ which we will expand in $F_\lambda(x)$ and apply to it the evaluation map ev$_{\mu/\nu}$ using the result (<ref>) of the above Lemma.

Let $(z)$ and $(w)$ be two alphabets and $\Pi(z,w)$ the Cauchy kernel (<ref>).
Define the mixed Cauchy kernel:

\begin{align}
\label{eq:K-mixed}
K(x;w) : = \iota_z^{-1} \left(\Pi(z,w)\right)
\end{align}

For $K(x;w)$ we have the analogues of the exponential formula (<ref>) as well as bases expansions (<ref>) for $\Pi(z,w)$:

\begin{align}\label{eq:K-exp}
\exp_*\left(\sum_{r>0}\frac{1}{r}\frac{1-t^r}{1-q^r}
\frac{(t-q)^r}{(1-q)^r}p_r(w)S_r \right)\\
\label{eq:K-mon}
K(x;w)&= \sum_{\lambda}\frac{(1-t^{-1})^{|\lambda|}}{(1-q)^{|\lambda|}} m_\lambda(w) E_\lambda(t^{-1}) \\
\label{eq:K-Mac}
K(x;w)&=  \sum_{\lambda} \frac{q^{n(\lambda')}(1-t)^{|\lambda|}}{c'_\lambda} P_\lambda(w) F_\lambda
\end{align}

The exponential formula (<ref>) is obtained by inserting the exponential formula (<ref>) for the Cauchy kernel in (<ref>) and applying $\iota_z$ to the power sums (<ref>). The monomial expansion (<ref>) is a consequence of (<ref>) and the isomorphism formula (<ref>)[The monomial expansion of $K(x;z)$ was studied in [15] in relation with the tableaux formula for the Macdonald functions.].  The Macdonald expansion (<ref>) follows from (<ref>), (<ref>) and the isomorphism formula (<ref>).

Let $\mu/\nu$ be a skew partition and $k=|\mu|-|\nu|$. The mixed Cauchy kernel $K(x;w)$ reproduces the skew Macdonald function $P_{\mu/\nu}(w)$ under $\normalfont{\ev}_{\mu/\nu}$:

\begin{align}
\label{eq:K-skew-Mac}
=\tilde a_{\mu,\nu}
\normalfont{\ev}_{\mu/\nu} \left(K(x;w)\right),
\qquad
\tilde a_{\mu,\nu} : = \frac{q^{n(\nu')-n(\mu')}c_\mu' d_{\mu/\nu}}{(1-t)^{k} c_\nu'}
\end{align}

We first note that the evaluation map $\ev_{\mu/\nu}$ acts on $F\in \Ac_j$ and gives zero unless $j=k$, the number of boxes in $\mu/\nu$. We apply $\ev_{\mu/\nu}$ to $K(x;w)$ written in the form (<ref>):

\begin{align*}
\ev_{\mu/\nu} \left(K(x;w)\right)=
&(1-t)^{k}\sum_{\lambda\vdash k} \frac{q^{n(\lambda')}}{c'_\lambda} P_\lambda(w) \ev_{\mu/\nu}  \left(F_\lambda  \right) \\
\frac{q^{n(\mu')-n(\nu')} c_\nu}{c_\mu d_{\mu/\nu}}
\sum_{\lambda\vdash k} b_\lambda
\frac{(1-t)^{k}q^{n(\mu')-n(\nu')} c_\nu'}{c_\mu' d_{\mu/\nu}} P_{\mu/\nu}(w)
\end{align*}

where in the second line we computed $\ev_{\mu/\nu}(F_\lambda)$ using (<ref>) and then used the definition of $b_\lambda$ (<ref>). To get the result in the third line we recalled the formula for the skew Macdonald functions (<ref>):

P_{\mu/\nu} = \sum_{\lambda} \frac{b_\nu b_\lambda}{b_\mu}  f^\mu_{\lambda,\nu}  P_\lambda

This computation proves (<ref>).

§.§ The trace elements and the skew Macdonald functions

The elements of the shuffle algebra $S_r\in \Ac_r$ are mapped to the power sums (<ref>) under $\iota$, therefore the exponential generating function $T(v;z,w)$ given in (<ref>) is related to the Cauchy kernel (<ref>) under this isomorphism.

The generating function $T(v;z,w)$ (<ref>) is a symmetric function in two alphabets $(w)=(w_1\ldots w_m)$ and $(z)=(z_1\ldots z_n)$ and can be written in terms of the power sums:

\begin{align}\label{eq:Tv-power_sums}
T(v;z,w) =
\exp_*\left(\sum_{r>0}\frac{1}{r}\frac{1-t^r}{1-q^r}\left(p_r(w)- p_r(z)-\frac{q^r-t^r}{1-t^r}z_0^r  \right) v^{r}S_r\right)
\end{align}

Therefore it is given by the mixed Cauchy kernel $K(x;w)$ to which one needs to apply the following transformation:

\begin{align}
\label{eq:pi}
\pi_{w,z}:\quad p_r(w) \rightarrow p_r(w) -p_r(z) - \frac{q^r-t^r}{1-t^r}z_0^r
\end{align}

The map $\pi_{w,z}$ is a  plethystic substitution and for a function $f(w)$ from the ring of symmetric functions $\Lambda$ in the alphabet $(w)$ it is common to write:

\begin{align}
\label{eq:pleth}
\pi_{w,z}\left( f(w)  \right) = f\left[w -z -\frac{q-t}{1-t}z_0\right]
\end{align}

By comparing (<ref>) with (<ref>) we find:

\begin{align}
\label{eq:T-K}
T(c v;z,w) = \pi_{w,z}\left(K(x;w)\right),
\qquad c = \frac{t-q}{1-q}
\end{align}

This identity together with Lemma <ref> leads to the following result:

Let $\mu/\nu$ be a skew partition and $N=|\mu|-|\nu|$, we have the identity:

\begin{align}
\label{eq:T-skew-Mac}
P_{\mu/\nu}\left[w -z -\frac{q-t}{1-t}z_0\right]
\normalfont{\ev}_{\mu/\nu} \left(T_N(x;z,w)\right),
\end{align}

\begin{align}
\label{eq:a}
a_{\mu,\nu} : = \frac{(t-q)^N}{(1-q)^N (1-t)^{N}}\frac{q^{n(\nu')-n(\mu')}c_\mu' d_{\mu/\nu}}{ c_\nu'}
\end{align}

§.§ Example

In this section we show how to compute $P_{(2,1)/(1)}(w_1,w_2;z_{0})$ using Theorem <ref>. In this case we have $N=2$, $n=0$ and $m=2$, so according to Theorem <ref> we need to calculate:

=\ev_{(2,1)/(1)} \left(T_2(x_1,x_2;z_0,w_1,w_2)\right)=

where $T_2(q,t^{-1};z_0,w_1,w_2)$ is the partition function of lattice path configurations with two fermionic colours and boundary conditions as in (<ref>). Let the two colours be red and green where red corresponds to the smaller label and the local configurations are given by the Boltzmann weights of the $R$-matrix of $U_{t}(\widehat{ sl}(1|2))$, given in (<ref>). We can find all possible configurations in $T_2(q,t^{-1};z_0,w_1,w_2)$ and write:

\begin{align}\label{eq:loops}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw[invarrow=0.95] (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw[invarrow=0.95] (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw[invarrow=0.95] (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.5-0.25) -- (2+0.5+0.25,0.5-0.25) -- (2+0.5+0.25,1) -- (2.5,1);
\draw [rounded corners=5pt]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\foreach\i/\lab in {2/q ,1/t^{-1}}
\node at (-0.4,\i) {$\scriptstyle \lab$};
\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
\node at (\i,3.5) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}\\[1 em]
\left(
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.5-0.25) -- (2+0.5+0.25,0.5-0.25) -- (2+0.5+0.25,1) -- (2.5,1);
\draw [rounded corners=5pt]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}\right) z^{2}_{0}
\left(
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,red, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
\draw [rounded corners=5pt,red, ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (1,0.5)--(1,2)--(2.5,2);
\draw [rounded corners=5pt,red, ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}\right)z_{0}w_{1}\nonumber\\[1 em]
\left(
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,gcol, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
\draw [rounded corners=5pt,gcol, ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (1,0.5)--(1,2)--(2.5,2);
\draw [rounded corners=5pt,gcol, ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\right)z_{0}w_{2}\nonumber\\[1 em]
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,red, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,red,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw[red,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,red, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,red,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw[red,ultra thick] (1,0.5)--(1,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\right) w^{2}_{1}\
\left(
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,gcol, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,gcol,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw[gcol,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,gcol, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,gcol,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw[gcol,ultra thick] (1,0.5)--(1,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\right)w^{2}_{2}\nonumber\\[1 em]
\left(
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,gcol, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,red,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[red,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}+
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,gcol, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[gcol,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,red,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[red,ultra thick] (1,0.5)--(1,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,red, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,gcol,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[gcol,ultra thick] (1,0.5)--(1,1)--(2,1)--(2,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6, baseline=(current  bounding  box.center)]
\draw (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt,red, ultra thick]  (2,0.5) -- (2,0.25) -- (2.75,0.25) -- (2.75,1) -- (2.5,1);
\draw[red,ultra thick] (2,0.5)--(2,1)--(2.5,1);
\draw [rounded corners=5pt,gcol,ultra thick]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\draw[gcol,ultra thick] (1,0.5)--(1,2)--(2.5,2);
%\foreach\i/\lab in {2/q ,1/t^{-1}}
%\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
%\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
%\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}\right)w_{1}w_{2}
\nonumber
\end{align}

By substituting the Boltzmann weights (<ref>) we compute the coefficients in front of each monomial:

\begin{align}\label{eq:P-example}
\Big{(}z^{2}_{0}+
\frac{(1-t) (2+q+t + 2 q t)}{(1+q) (1+t) (t-q)}
\frac{(1-t) \left(1-q t^2\right)}{(1+q) (1+t) (q-t)^2}
\frac{(1-t)^2 (2+q+t+2 q t)}{(1+q) (1+t) (q-t)^2}w_{1}w_{2}   \Big{)}
\nonumber
\end{align}

where the coefficient $a_{(2,1),(1)}$ reads:

\begin{align}
\label{eq:acoef_example}
\frac{(1+q)(1+t)(q-t)^2}{(1-t) (1-q t^2)}
\end{align}

Therefore we computed $P_{(2,1)/(1)}(w_1,w_2;z_{0})$. By setting $z_0=0$ in (<ref>) we recover the standard skew Macdonald polynomial $P_{(2,1)/(1)}(w_1,w_2)$:

P_{(2,1)/(1)}(w_1,w_2) =
w_1^2 +
\frac{(1-t)  (2+q+t+2 q t)}{1-q t^2}w_1 w_2

§ A SHUFFLE PRODUCT IDENTITY

The determinant formula (<ref>) for $H_k(t^{-1})$ is known as the Izergin determinant. This determinant satisfies various summation identities. For our purposes a useful identity is given by a subset formula from [5]:

\begin{align}
& \frac{\prod_{i,j=1}^k(x_i-y_j)}{\prod_{1\leq i<j\leq k}(x_i-x_j)(y_j-y_i)}
\det_{1\leq i,j \leq k} \frac{(1-t)x_i}{(x_i-y_j)(y_j-t x_i)}\nonumber
\\
(-1)^{r} t^{r(r-1)/2}
\sum_{\substack{S\subseteq [k]\\ |S|=r}}
\prod_{i\in S}
\prod_{j\in S^c}
\frac{x_j-t x_i}{x_j-x_i}
\prod_{i\in S}
\prod_{j=1}^k
\frac{y_j-x_i}{y_j-t x_i}
\label{eq:det_subset-app}
\end{align}

When we set $y_i=q x_i$ the left-hand side above matches with the formula (<ref>) for $H_k(t^{-1})$ up to a factor. This leads to a summation formula for $H_k(t^{-1})$:

\begin{align}\label{eq:H_subset-app}
H_k(t^{-1}) =   \frac{(1-q t^{-1})^k}{(1-t^{-1})^k}
\sum_{r=0}^k
(-1)^{r} t^{-r(r+1)/2}
\sum_{\substack{S\subseteq [k]\\ |S|=r}}
\prod_{i\in S}
\prod_{j\in S^c}
\frac{x_i-t^{-1} x_j}{x_i-x_j}
\prod_{i\in S}
\prod_{j=1}^k
\frac{x_i-q x_j}{x_i-q t^{-1} x_j}
\end{align}

The sum over subsets $S$ has the structure of the shuffle product (<ref>). To see this we split the product over $j$ in the last factor in (<ref>)
into two products: $j\in S$ and $j\in S^c$. The second product can be combined with the first factor in (<ref>) giving:

\begin{align*}
&   \sum_{\substack{S\subseteq [k]\\ |S|=r}}
\prod_{i\in S}
\prod_{j\in S^c}
\frac{x_i-t^{-1} x_j}{x_i-x_j}
\prod_{i\in S}
\prod_{j=1}^k
\frac{x_i-q x_j}{x_i-q t^{-1} x_j} =
\sum_{\substack{S\subseteq [k]\\ |S|=r}}
\prod_{i\in S}
\prod_{j\in S^c}
\frac{x_i-t^{-1} x_j}{x_i-x_j}
\frac{x_i-q x_j}{x_i-q t^{-1} x_j}
\prod_{i,j\in S}
\frac{x_i-q x_j}{x_i-q t^{-1} x_j} \\
&\frac{(1-q)^{r}}{(1-q t^{-1})^{r}} t^{r(r-1)/2}
\sum_{\substack{S\subseteq [k]\\ |S|=r}}
\prod_{i\in S}
\prod_{j\in S^c}
\zeta(x_j/x_i)
\frac{(1-q)^{r}}{(1-q t^{-1})^{r}} t^{r(r-1)/2}    E_{k-r}(t q^{-1})*E_{r}(q)
\end{align*}

where in the second line we used (<ref>), Definition <ref> of $E_r(q)$ and $E_{k-r}(t q^{-1})$ (which is equal to $1$) and the formula for the shuffle product (<ref>).  As a consequence the element $H_k(t^{-1})$ admits the formula:

\begin{align}\label{eq:H_E-app}
H_k(t^{-1}) =   \frac{(1-q t^{-1})^k}{(1-t^{-1})^k}
\sum_{r=0}^k
\frac{(1-q)^{r}}{(1-q t^{-1})^{r}}
E_{k-r}(t q^{-1})*E_{r}(q)
\end{align}

We can derive analogously the identities for $H_k(q)$ and $H_k(t q^{-1})$ and summarize all three formulas by:

\begin{align}\label{eq:Hq_E-app}
H_k(q_a) =
\sum_{r=0}^k
\left(\frac{1-q_b}{1-q_b q_c}\right)^{k-r}
\left(\frac{1-q_c}{1-q_b q_c}\right)^{r}
\end{align}

where $(a,b,c)$ is a permutation of $(1,2,3)$.

§ ACKNOWLEDGMENTS

We would like to thank Jan de Gier, Andrei Neguţ, Michael Wheeler and Paul Zinn-Justin for many interesting discussions. A. G. gratefully acknowledges financial support from the Australian Research Council.

[1]
A. Aggarwal, A. Borodin, and M. Wheeler.
Colored fermionic vertex models and symmetric functions.
Commun. Amer. Math. Soc., 3(08):400–630, 2023.

[2]
T.-D. Albert, H. Boos, R. Flume, and K. Ruhlig.
Resolution of the nested hierarchy for rational $sl(n)$ models.
J. Phys. A: Math. Gen., 33(28):4963, 2000.

[3]
R. Baxter.
Exactly solved models in statistical mechanics.
Elsevier, 2016.

[4]
V. Bazhanov and A. Shadrikov.
Trigonometric solutions of triangle equations. Simple Lie
Theor. Math. Phys., 73(3), 1988.

[5]
D. Betea, M. Wheeler, and P. Zinn-Justin.
Refined Cauchy/Littlewood identities and six-vertex model partition
functions: II. Proofs and new conjectures.
J. Alg. Comb., 42:555–603, 2015.

[6]
A. Borodin.
On a family of symmetric rational functions.
Adv. Math., 306:973–1018, 2017.

[7]
A. Borodin and M. Wheeler.
Coloured stochastic vertex models and their spectral theory.
Astérisque, 437, 2022.

[8]
A. Borodin and M. Wheeler.
Nonsymmetric Macdonald polynomials via integrable vertex models.
Trans. Amer. Math. Soc., 375(12), 2022.

[9]
B. Brubaker, V. Buciumas, D. Bump, and H. Gustafsson.
Colored vertex models and Iwahori Whittaker functions.
Preprint, 1906.04140, 2019.

[10]
B. Brubaker, D. Bump, and S. Friedberg.
Schur polynomials and the Yang-Baxter equation.
Commun. Math. Phys., 308(2):281–301, 2011.
0912.0911 .

[11]
V. Buciumas and T. Scrimshaw.
Double Grothendieck polynomials and colored lattice models.
Int. Math. Res. Not. IMRN, 2020.
Art. ID rnaa327. 2007.04533.

[12]
L. Cantini, J. de Gier, and M. Wheeler.
Matrix product formula for Macdonald polynomials.
J. Phys. A: Math. Theor., 48(38):384001, 2015.

[13]
I. Corwin and L. Petrov.
Stochastic higher spin vertex models on the line.
Commun. Math. Phys., 343:651–700, 2016.
1502.07374 .

[14]
B. Feigin, K. Hashizume, A. Hoshino, J. Shiraishi, and S. Yanagida.
A commutative algebra on degenerate $\mathbb{CP}^1$ and Macdonald
J. Math. Phys., 50(9):095215, 2009.

[15]
B. Feigin, A. Hoshino, J. Shibahara, J. Shiraishi, and S. Yanagida.
Kernel function and quantum algebras.
Preprint, 1002.2485, 2010.

[16]
B. Feigin, M. Jimbo, T. Miwa, and E. Mukhin.
Quantum toroidal $gl(1)$ and Bethe ansatz.
J. Phys. A: Math. Theor., 48(24):244001, 2015.

[17]
B. Feigin, M. Jimbo, and E. Mukhin.
Commutative subalgebra of a shuffle algebra associated with quantum
toroidal $\mathfrak{gl}_{m|n}$.
Preprint, 2306.05223, 2023.

[18]
B. Feigin and A. Odesskii.
A family of elliptic algebras.
Int. Math. Res. Not., 1997(11):531–539, 1997.

[19]
B. Feigin and A. Tsymbaliuk.
Equivariant $K$-theory of Hilbert schemes via shuffle algebra.
Kyoto J. Math., 51(4):831–854, 2011.

[20]
B. Feigin and A. Tsymbaliuk.
Bethe subalgebras of $U_q(\widehat{gl}_n)$ via shuffle algebras.
Sel. Math., 22:979–1011, 2016.

[21]
O. Foda, M. Wheeler, and M. Zuparic.
Factorized domain wall partition functions in trigonometric vertex
J. Stat. Mech.: Theor. Exp., 2007(10):P10016, 2007.

[22]
A. Garbali, J. de Gier, and M. Wheeler.
A new generalisation of Macdonald polynomials.
Commun. Math. Phys., 352(2):773–804, 2017.

[23]
A. Garbali and M. Wheeler.
Modified Macdonald polynomials and integrability.
Commun. Math. Phys., 374(3):1809–1876, 2020.

[24]
A. Garbali and P. Zinn-Justin.
Shuffle algebras, lattice paths and the commuting scheme.
Contemp. Math. Special Issue: Hypergeometry, Integrability and
Lie Theory, 780, 2022.

[25]
A. Gunna and P. Zinn-Justin.
Vertex models for Canonical Grothendieck polynomials and their
Alg. Comb., 6(1):109–163, 2023.

[26]
A. Hutsalyuk, A. Liashyk, S. Pakuliak, E. Ragoucy, and N. Slavnov.
Scalar products of Bethe vectors in the models with $gl(m|n)$
Nucl. Phys. B, 923:277–311, 2017.

[27]
A. Izergin.
Partition function of a six-vertex model in a finite volume.
In Dokl. Akad. Nauk SSSR, volume 297, pages 331–333, 1987.

[28]
V. Korepin.
Calculation of norms of Bethe wave functions.
Commun. Math. Phys., 86:391–418, 1982.

[29]
V. Korepin, N. Bogoliubov, and A. Izergin.
Quantum inverse scattering method and correlation functions,
volume 3.
Cambridge University Press, 1997.

[30]
A. Kuniba, V. Mangazeev, S. Maruyama, and M. Okado.
Stochastic $R$ matrix for $U_{q}(A_n^{(1)})$.
Nucl. Phys. B, 913:248–277, 2016.

[31]
A. Litvinov and I. Vilkoviskiy.
Liouville reflection operator, affine Yangian and Bethe ansatz.
J. High En. Phys., 2020(12):1–49, 2020.

[32]
I. Macdonald.
Symmetric functions and Hall polynomials.
Oxford University Press, 1998.

[33]
J.-M. Maillet and J. Sanchez de Santos.
Drinfel'd twists and algebraic Bethe ansatz.
Amer. Math. Soc. Transl. Ser. 2, 201, 2000.

[34]
S. McAteer and M. Wheeler.
On factorizing F-matrices in $Y(sl_n)$ and $U_q(\widehat{sl_n})$
spin chains.
J. Stat. Mech., 2012(04), 2012.

[35]
M. Mucciconi and L. Petrov.
Spin q-Whittaker polynomials and deformed quantum Toda.
Commun. Math. Phys., 389(3):1331–1416, 2022.

[36]
A. Neguţ.
The shuffle algebra revisited.
Int. Math. Res. Not., 2014(22):6242–6275, 2014.

[37]
A. Negut.
Moduli of flags of sheaves and their $K$-theory.
Alg. Geom., 2(1):19–43, 2015.

[38]
A. Neguţ.
A tale of two shuffle algebras.
Preprint, 1908.08395, 2019.

[39]
N. Reshetikhin.
Calculation of the norm of Bethe vectors in models with
J. Sov. Math., 46:1694–1706, 1989.

[40]
O. Schiffmann and E. Vasserot.
The elliptic Hall algebra and the $K$-theory of the Hilbert
scheme of $\mathbb{A}^2$.
Duke Math. J., 162(2):279–366, 2013.

[41]
N. Slavnov.
Calculation of scalar products of wave functions and form factors in
the framework of the algebraic Bethe ansatz.
Teor. Mat. Fiz., 79(2):232–240, 1989.

[42]
M. Wheeler.
Scalar products in generalized models with $SU(3)$-symmetry.
Commun. Math. Phys., 327:737–777, 2014.

[43]
M. Wheeler and P. Zinn-Justin.
Hall polynomials, inverse Kostka polynomials and puzzles.
J. Comb. Theor. Ser. A, 159:107–163, 2018.

[44]
W.-L. Yang, Y.-Z. Zhang, and S.-Y. Zhao.
Drinfeld Twists and Algebraic Bethe Ansatz of the Supersymmetric
Model Associated with $U_q(gl (m| n))$.
Commun. Math. Phys., 264:87–114, 2006.

I am writing this as a subsection which shall later be reorganised

§.§ Littlewood–Richardson Coefficients

Let us recall the definition of skew Macdonlad polynomials from  <cit.>. For partitions $\lambda,\mu,\nu$, we have:

\begin{align}
\label{eq:mcDlr}
\end{align}

where $f^{\nu}_{\lambda,\mu}$ are the Littlewood–Richardson coefficients.
Then the skew Macdonald polynomials $P_{\lambda/\mu}$ as:

\begin{align}
\label{eq:skewmcd-lr}
\end{align}

We can the use the linearity of $\iota^{-1}$ to define shuffle version of $P_{\lambda/\mu}$.

\begin{align}
\label{eq:shuffskmcD}
F_{\lambda/\mu}=\iota^{-1}\left( \sum_{\nu}\dfrac{b_{\mu}b_{\nu}}{b_{\lambda}} f^{\lambda}_{\mu,\nu}(q,t)P_{\nu} \right)
&=\sum_{\nu}\dfrac{b_{\mu}b_{\nu}}{b_{\lambda}}f^{\lambda}_{\mu,\nu}(q,t)\dfrac{(1-t)^{|\nu|} q^{n(\nu')}}{c_{\nu}}F_{\nu}
\end{align}

We can then write $f^{\lambda}_{\mu,\nu}$ as an evalutaion of $F_{\lambda/\mu}$ at $\nu$:

\begin{align}
\label{eq:shuffMcdlr}
\ev_{\nu}(F_{\lambda/\mu}) &= \sum_{\kappa}\dfrac{b_{\mu}b_{\kappa}}{b_{\lambda}}f^{\lambda}_{\mu,\kappa}(q,t)\dfrac{(1-t)^{|\kappa|} q^{n(\kappa')}}{c_{\kappa}} \ev_{\nu}\left(F_{\kappa}\right)\\
&= \dfrac{b_{\mu}b_{\nu}}{b_{\lambda}}f^{\lambda}_{\mu,\nu}(q,t)\dfrac{(1-t)^{|\nu|}q^{n(\nu')}}{c_{\nu}d_{\nu}}
\end{align}

[scale=0.7,baseline=(current  bounding  box.center)]
ȷ/in 2/0,3/,4/0
[invarrow=0.95] (ȷ,1.5) – node[pos=1,above] $\scriptstyle \lab$ (ȷ,4.5);

ı/in 4/1,3/,2/1
[invarrow=0.95] (1.5,ı) – node[pos=1,right] $\scriptstyle \lab$ (4.5,ı);

ı/in 2/x_n,3/ ,4/x_2
at (5.5,ı) $\scriptstyle \lab$;

ı/in 2/q x_2,3/ ,4/q x_n
at (ı,5.5) $\scriptstyle \lab$;

ı/in 4/0,3/,2/0
at (1.2,ı) $\scriptstyle \lab$;

ı/in 4/1,3/,2/1
at (ı,1.3) $\scriptstyle \lab$;

Let us define a product of $J_n(x)$ and $J_m(x)$ using the diagrams:

\begin{align}\label{eq:JnJm}
J_{m,n}=J_{m}(x)*J_{n}(x):=\sum_{\sigma\in \mathcal{S}_{n+m}/\mathcal{S}_m\times \mathcal{S}_n} \sigma
\begin{tikzpicture}[scale=0.8,baseline=(current  bounding  box.center)]
% vertical and diagonal lines
\foreach\j/\xx in {1/1,2/,3/1}
\draw[invarrow=0.975] (\j,0.5) node[below] {$\ss \xx$} -- (\j,6.5) -- (\j+3,6.5+3);
\foreach\j/\xx in {4/1,5/,6/1}
\draw[invarrow=0.975] (\j,3.5) node[below] {$\ss \xx$} -- (\j,6.5) -- (\j-3,6.5+3);
% vertical parameters
\foreach\j/\xx in {1/\frac tq x_1,2/,3/\frac tq x_m,4/\frac tq x_{m+1},5/,6/\frac tq x_{m+n}}
\node at (\j,8.5+2) {$\scriptstyle \xx$};
% top boundary
\foreach\j/\xx in {1/0,2/0,3/0,4/0,5/0,6/0}
\node at (\j,8+2) {$\scriptstyle \xx$};
% horizontal lines and right boundary
\foreach\i/\lab in {3/1,2/,1/1}
\draw[invarrow=0.95] (0.5,\i) -- node[pos=1,right] {$\scriptstyle  \lab$} (3.5,\i);
\foreach\i/\lab in {6/1,5/,4/1}
\draw[invarrow=0.975] (0.5,\i) -- node[pos=1,right] {$\scriptstyle \lab$} (6.5,\i);
% vertical parameters
\foreach\i/\lab in {6/x_{1},5/,4/x_{m} ,3/x_{m+1},2/, 1/x_{m+n}}
\node at (-0.6,\i) {$\scriptstyle \lab$};
% left boundary
\foreach\i/\lab in {6/0,5/0,4/0,3/0,2/0 ,1/0}
\node at (0.1,\i) {$\scriptstyle \lab$};
\foreach\j in {1,2,3}
\foreach\i in {1,2,3}
\draw node at (\i,\j) {$\ss \bullet$} node at (\i,\j+3) {$\ss \bullet$} node at (\i+3,\j+3) {$\ss \bullet$} node at (1.5+\i/2+\j/2,8+\j/2-\i/2) {$\ss \bullet$};
\draw[dashed,gray] (0.75,3.75) -- (0.75,6.25) -- (0.75+2.5,6.25) -- (0.75+2.5,3.75) -- (0.75,3.75);
\draw[dashed,gray] (2.25,8) -- (2.25+1.25,8+1.25) -- (2.25+2.5,8) -- (2.25+1.25,8-1.25) -- (2.25,8);
\end{tikzpicture}
\end{align}

______________________ Old proof of Lemma about shuffle elements

§.§ Proof of Lemma <ref>

Our proof of Lemma <ref> follows the steps given below with some technical computations given later in Sections <ref> and <ref>.

* We use (<ref>) in order to define a set of elements $\tilde P_n$ of $\Ac$:

\begin{align}
\label{eq:P-tilde}
\tilde P_0:=1,\qquad
\tilde P_n := (-1)^{n+1}\lim_{s\rightarrow 1}\frac{1}{1-s}K_n(s) ,
\qquad n>0
\end{align}

The recurrence for $K_n(s)$: $e K_n(s) = x_1 * K_{n-1}(s) - s K_{n-1}(s) * x_1$ implies a similar recurrence for $\tilde P_n$. By acting with $e$ on both sides of (<ref>) and using the recurrence for $K_n(s)$ we get:

\begin{align}
\label{eq:P-tilde_rec}
\tilde P_1=1,\qquad
e \tilde P_n
= \tilde P_{n-1} * x_1 - x_1 *  \tilde P_{n-1},
\qquad n>1
\end{align}

We argue below that $\tilde P_n$ coincides with $P_n$ given by the explicit formula (<ref>).

* Then we define the generating function $K(v)$ of $K_n$'s and show in Section <ref> that:

\begin{align}
\label{eq:K-gen}
K(v): =\sum_{n=0}^\infty v^n K_n=
\exp_*
\left(
\sum_{r>0}\frac{(-1)^{r+1}}{r}\tilde P_r v^{r}
\right)
\end{align}

From Remark <ref> it follows that $\bar K_n$ is generated by $K^{-1}(v)$ and $K_n(s)$ is generated by:

\begin{align}
\label{eq:Kvs-app}
K(v;s)= K(v)K^{-1}(s v) =
\exp_*
\left(
\sum_{r>0}\frac{(-1)^{r+1}(1-s^r)}{r}  \tilde P_r v^{r}
\right)
\end{align}

This proves (<ref>) up to showing that $\tilde P =P$.

* Next, we focus on the elements $E_n(p)$ where $p\in \{q,t^{-1},t q^{-1}\}$. Because $E_n(p)$'s are fully factorized it is not difficult to show (see [24]) that they also satisfy a recurrence relation with $x_1$:

\begin{align}
\label{eq:E-rec}
(1-p)\sum_{i=1}^n x_i E_n(p) = x_1 * E_{n-1}(p) - p E_{n-1}(p) * x_1 , \qquad p\in \{q,t^{-1},t q^{-1}\}
\end{align}

This recurrence relation is a special case of the relation (<ref>) defining $K_n(s)$. As a consequence of this and (<ref>) we have an exponential generating function for $E_n(p)$:

\begin{align}
\label{eq:E-gen}
E(v;p)= \sum_{n=0}^\infty v^n E_n(p)=
\exp_*
\left(
\sum_{r>0}\frac{(-1)^{r+1}}{r}\frac{1-p^r}{(1-p)^r} v^{r} \tilde P_r
\right)
\qquad
p\in \{q,t^{-1},t q^{-1}\}
\end{align}

This exponential formula was obtained in <cit.> by other means and written in terms of $P_r$  (<ref>) in place of $\tilde P_r$. Therefore we conclude that $\tilde P_n=P_n$ and also prove (<ref>).

* Next, we look at $H_n(p)$. In <ref> we derive a formula in which $H_n(p)$ is written in terms of the $E$'s (<ref>). By summing this expression over $n$ with $v^n$ we obtain the generating function for $H_n(p)$:

\begin{align}
\label{eq:H-gen}
\sum_{n=0}^\infty v^n H_n(p)=
\exp_*
\left(
\sum_{r>0}\frac{(-1)^{r+1}}{r}\frac{1-p^{-r}}{(1-p^{-1})^r} v^{r} P_r
\right)
\qquad
p\in \{t,q^{-1},q t^{-1}\}
\end{align}

We then compare $K(v;s)$ with this generating function with $p\in \{q^{-1},t,q t^{-1}\}$ and prove (<ref>).

§.§.§ Computing the generating function $K(v)$

This proof is not finished.

We will use (<ref>) to show that:

\begin{align}
\label{eq:K_P}
K_n = \sum_{\lambda\vdash n} \frac{(-1)^{\ell(\lambda)+|\lambda|}}{\lambda! \prod_{r\in \lambda} r}  \tilde P_\lambda
\end{align}

and if we sum this over $n$ with the parameter $v^n$ we will obtain the exponential generating functions (<ref>). Recall the recurrence relation:

\begin{align*}
e \tilde P_n
\tilde P_{n-1} * x_1-x_1 *  \tilde P_{n-1}
\end{align*}

By making use of the action by $e$ similar (<ref>) gives:

\begin{align*}
e \tilde P_n
e \tilde P_{n-1} * P_1-P_1 * e \tilde P_{n-1}
\end{align*}

Iterating this produces the formula:

\begin{align*}
e \tilde P_{n+1}
\sum_{j=0}^{n} (-1)^{j} \binom{n}{j} 1^{*(n-j)}*x_1*1^{*j}
\end{align*}

which implies:

\begin{align*}
\tilde P_n =
\frac{\sum_{j=1}^{n}
(-1)^{j} \binom{n-1}{j-1}
x_j}{\sum_{j=1}^{n} x_j}
\prod_{1\leq i<j\leq n}
\zeta(x_i/x_j)
\right)
\end{align*}

The case $n=0$ of (<ref>) produces the right value $K_0=1$, therefore we need to show that the r.h.s. of (<ref>) satisfies the defining equation of $K_n$: $e K_n = x_1 * K_{n-1}$ (<ref>). Write $x_1 * K_n$ with $K_n$ given by (<ref>), and apply (<ref>) recursively:

\begin{align*}
x_1 * K_n &= \sum_{\lambda\vdash n} \frac{(-1)^{\ell(\lambda)+|\lambda|}}{\lambda!  \prod_{r\in \lambda} r}  x_1 *  \tilde P_\lambda
\sum_{\lambda\vdash n} \frac{(-1)^{\ell(\lambda)+|\lambda|}}{\lambda!  \prod_{r\in \lambda} r}  \tilde P_\lambda * x_1
\\
&+ \sum_{\lambda\vdash n} \frac{(-1)^{\ell(\lambda)+|\lambda|}}{\lambda! \prod_{r\in \lambda} r}
\sum_{i=1}^{\ell(\lambda)}
\tilde P_{\lambda_1}*\dots *
\tilde P_{\lambda_{i-1}}
(e  \tilde P_{\lambda_i+1})
\tilde P_{\lambda_{i+1}}*\dots * \tilde P_{\lambda_{\ell(\lambda)}}
\end{align*}

Consider the action $x_1*\tilde P_\lambda$:

\begin{align*}
x_1 *  \tilde P_\lambda
\tilde P_\lambda * x_1
\sum_{i=1}^{\ell(\lambda)}
\tilde P_{\lambda_1}*\dots
(e  \tilde P_{\lambda_i+1})
\dots * \tilde P_{\lambda_{\ell(\lambda)}}\\
\tilde P_\lambda * x_1
\sum_{i=1}^{\ell(\lambda)}
\tilde P_{\lambda_1\dots \lambda_{i-1},1^{n-j}}*x_1
* \tilde P_{\lambda_{i+1}\dots \lambda_{\ell},1^j}
\end{align*}

where we recursively used the definition (<ref>) and the identity $x_1 = e \tilde P_1$ in the first term. In the second line we rewrite the sum in terms of a sum over all partitions $\mu$ which can be obtained from $\lambda$ by adding a box at every possible location which produced …The proof of this is clear; needs good phrasing.

Example $n=2$

\begin{align}
K_1 = P_1\qquad
K_2 = \frac{-1}{2} P_2 + \frac{1}{2} P_1^{*2}
\qquad
K_3 =
\frac{1}{3} P_3 +
\frac{-1}{2} P_2*P_1^{*2}+
\frac{1}{6} P_1^{*3}
\end{align}

Compute $e K_2 = x_1 * K_1$

\begin{align*}
e K_2 = \frac{-1}{2} e P_2 + \frac{1}{2} e P_1^{*2} =
\frac{-1}{2} (P_1*x_1 -x_1 * P_1)+ \frac{1}{2} (x_1 *P_1 + P_1 *x_1 ) = x_1 *P_1
\end{align*}

Compute $e K_3 = x_1 * K_2$

\begin{align*}
e K_3 &= \frac{1}{3} e P_3 +
\frac{-1}{2} (e P_2)*P_1+
\frac{-1}{2}P_2*e P_1+
\frac{1}{6}  e  P_1^{*3} \\
&= \frac{1}{3} (P_2*e P_1  - e P_1*P_2) +
\frac{-1}{2}P_2*e P_1+
\frac{1}{6}  (x_1 *P_1*P_1 + P_1*P_1 *x_1) + \frac{1}{6}P_1*x_1*P_1 \\
\end{align*}

\begin{align*}
\begin{tikzpicture}[scale=0.7, baseline=(current  bounding  box.center)]
\draw[invarrow=0.95] (1,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (1,2.5);
\draw[invarrow=0.95] (2,0.5) -- node[pos=1,above] {$\scriptstyle 0$} (2,2.5);
\foreach\i/\lab in {2/,1/\delta_N}
\draw[invarrow=0.95] (0.5,\i) -- (2.5,\i);
\draw [rounded corners=5pt]  (2,0.5) -- (2,0.5-0.25) -- (2+0.5+0.25,0.5-0.25) -- (2+0.5+0.25,1) -- (2.5,1);
\draw [rounded corners=5pt]  (1,0.5) -- (1,0.5-0.5) -- (2+0.5+0.5,0.5-0.5) -- (2+0.5+0.5,2) -- (2.5,2);
\foreach\i/\lab in {2/q ,1/t^{-1}}
\node at (2.5,0.25+\i) {$\scriptstyle \lab$};
\foreach\i/\lab in {1/q^{2} ,2/q t^{-1}}
\node at (\i,3.3) {$\scriptstyle \lab$};
\foreach\i/\lab in {2/0 ,1/0}
\node at (0.3,\i) {$\scriptstyle \lab$};
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5) node[above,black] {$\ss q^{2}$};
\draw (1.5,0.5)--(1.5,2.5) node[above,black] {$\ss q t^{-1}$};
\draw (0,1) node[left,black] {$\ss t^{-1}$}--(2,1);
\draw (0,2) node[left,black] {$\ss q$}--(2,2);
\end{tikzpicture}\right)z^{2}_{0}
\\
\left(\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}\right)z_{0}w_{1}
\left(\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}\right)z_{0}w_{2}\\
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[red,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[red,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\right) w^{2}_{1}\
\left(
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\right)w^{2}_{2}\\
\left(
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[red,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[gcol,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[red,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,1)--(1.5,1)--(1.5,2)--(2,2);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.6,baseline= (current bounding box.center)]
\draw (0.5,0.5)--(0.5,2.5);
\draw (1.5,0.5)--(1.5,2.5);
\draw (0,1)--(2,1);
\draw (0,2)--(2,2);
\draw[red,ultra thick] (1.5,0.5)--(1.5,1)--(2,1);
\draw[gcol,ultra thick] (0.5,0.5)--(0.5,2)--(2,2);
\end{tikzpicture}\right)w_{1}w_{2}
\end{align*}