Let $F(w,y)$ be a symmetric Laurent polynomial. By this I mean the powers of $w,y$ are bounded above and below, and $F$ is invariant under $y \to y^{-1}, w \to w^{-1}$. Given such an $F$, there are uniquely determined integers $n_{g,h}$ such that
$$F(w,y) = \sum_{g,h \geq 0} n_{g,h} (y-2+y^{-1})^{g}(-w+2-w^{-1})^{h}.$$
This is effectively writing $F$ in a different basis. I'm hoping someone could help me with a code such that $F$ is the input, and it spits out the $n_{g,h}$. Here's those simple component polynomials in $w$ and $y$, respectively
fw[w_] := (2 - 1/w - w); fy[y_] := (-2 + 1/y + y);
And just for an example, here's a particular symmetric Laurent polynomial
F[w_, y_] := 4320 + 16/w^4 - 288/w^3 + 1408/w^2 - 3296/w - 3296 w + 1408 w^2 - 288 w^3 + 16 w^4 + 192/y + 32/(w^2 y) - 128/(w y) - (128 w)/y + (32 w^2)/y + 192 y + (32 y)/w^2 - (128 y)/w - 128 w y + 32 w^2 y
When I'm doing this by hand, you have to start with the highest powers of $F$ and start peeling away these factors of $y-2+y^{-1}$ and $-w+2-w^{-1}$. It's a bit tedious, and I feel like a program could handle this pretty easily, if I had more coding experience.