# Permutation Group Actions on Polynomials

If $P$ is a polynomial ring in $n$ indeterminates $x_1, \ldots, x_n$, over any coefficient ring, ${\operatorname{Sym}}(n)$ acts on $P$ by permuting the indices of the indeterminates. Thus, the polynomial $f(x_1, \ldots, x_n)$ is mapped into the polynomial $f(x_{g(1)}, \ldots, x_{g(n)})$.

## `f ^ g: RngMPolElt, GrpPermElt -> RngMPolElt`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates, and a permutation $g$ belonging to a subgroup of ${\operatorname{Sym}}(\lbrace 1, \ldots, n \rbrace)$, return the image of $f$ under $g$.

## `f ^ G: RngMPolElt, GrpPerm -> { RngMPolElt }`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates, and a permutation group $G$ contained in ${\operatorname{Sym}}(\lbrace 1, \ldots, n \rbrace)$, return the orbit of $f$ under $G$.

## `IsInvariant(f, g): RngMPolElt, GrpElt -> BoolElt`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates, and a permutation $g$ of degree $n$ or an element of a matrix group of degree $n$ whose coefficient ring is the same as that of $f$, return whether $f$ is an invariant of $g$, i.e., whether $f^g = f$.

## `IsInvariant(f, G): RngMPolElt, Grp -> BoolElt`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates, and a permutation group $G$ of degree $n$ or a matrix group of degree $n$ whose coefficient ring is the same as that of $f$, return whether $f$ is an invariant of $G$, i.e., whether $f^g = f$ for all $g\in G$.
