I would like to know the best way to calculate the following.
Let $P(u,v,s,t)$ be a polynomial such that is invariant under permutation of $u\leftrightarrow s$ AND $v\leftrightarrow t$, that is $P(u,v,s,t)=P(s,t,u,v)$
This polynomial can be written as an algebraic combination of these elementary symmetric polynomials: $\{u+s,us,v+t,vt\}$.
An easy example is: $u^2 + s^2 = (u+s)^2 - 2us$.
But if I have $s^n t+u^n v$ things get more complicated (even for $n=1$).
I need to compute this "symmetric form" of a bunch of polynomials, so I would like to know how can I do it with software.
I tried with Maple but it cannot handle $u\leftrightarrow s$ AND $v\leftrightarrow t$ (at the same time).
In case it is relevant to the context, these polynomials are functions on the Jacobian $J$ of a hyperelliptic curve of genus $2$. So these are functions in the function field $k(J)$ where the generic point of $J$ is $\{(u,v),(s,t)\}$.
Thanks
Not every polynomial $P$ satisfying $P\left( u,v,s,t\right) =P\left( s,t,u,v\right) $ can be written as a polynomial in the $u+s,us,v+t,vt$. And I am not sure if every such polynomial can be written as a rational function in the $u+s,us,\dfrac{t-v}{s-u},\dfrac{sv-ut}{s-u}$ either. But your polynomials $s^{n}t+u^{n}v$ can be written in the latter form. Here is how:
Set $a=u+s$, $b=us$, $c=\dfrac{t-v}{s-u}$ and $d=\dfrac{sv-ut}{s-u}$ in the field $\mathbb{Q}\left(s,t,u,v\right)$. Set $p_{n}=s^{n}t+u^{n}v$ for each $n\in\mathbb{N}$. Then, it is easy to check (by straightforward computation) that \begin{align*} p_{0} & =2d+ac;\\ p_{1} & =a^{2}c+ad-2bc. \end{align*} Next, I claim that \begin{equation} p_{n}=ap_{n-1}-bp_{n-2} \label{1} \tag{1} \end{equation} for each $n\geq2$.
[Proof of \eqref{1}: Let $n\geq2$. Then, $p_{n}=s^{n}t+u^{n}v$ and similarly $p_{n-1}=s^{n-1}t+u^{n-1}v$ and $p_{n-2}=s^{n-2}t+u^{n-2}v$. But straightforward computation shows that $as-b=s^{2}$ and $au-b=u^{2}$. Now, \begin{align*} & a\underbrace{p_{n-1}}_{=s^{n-1}t+u^{n-1}v}-b\underbrace{p_{n-2}} _{=s^{n-2}t+u^{n-2}v}\\ & =a\left( \underbrace{s^{n-1}}_{=ss^{n-2}}t+\underbrace{u^{n-1}}_{=uu^{n-2} }v\right) -b\left( s^{n-2}t+u^{n-2}v\right) \\ & =a\left( ss^{n-2}t+uu^{n-2}v\right) -b\left( s^{n-2}t+u^{n-2}v\right) \\ & =ass^{n-2}t+auu^{n-2}v-bs^{n-2}t-bu^{n-2}v\\ & =\underbrace{\left( ass^{n-2}t-bs^{n-2}t\right) }_{=s^{n-2}\left( as-b\right) t}+\underbrace{\left( auu^{n-2}v-bu^{n-2}v\right) } _{=u^{n-2}\left( au-b\right) v}\\ & =s^{n-2}\underbrace{\left( as-b\right) }_{=s^{2}}t+u^{n-2} \underbrace{\left( au-b\right) }_{=u^{2}}v=\underbrace{s^{n-2}s^{2}} _{=s^{n}}t+\underbrace{u^{n-2}u^{2}}_{=u^{n}}v\\ & =s^{n}t+u^{n}v=p_{n}. \end{align*} This proves \eqref{1}.]
From $p_{0}=2d+ac$ and $p_{1}=a^{2}c+ad-2bc$, we conclude that $p_{0}$ and $p_{1}$ are polynomials in $a,b,c,d$. Therefore, by strong induction, we can conclude that each $p_{n}$ (for $n\in\mathbb{N}$) is a polynomial in $a,b,c,d$. (Indeed, \eqref{1} shows that if $p_{n-1}$ and $p_{n-2}$ are polynomials in $a,b,c,d$, then so is $p_{n}$.)