# Obtaining the immanent associated to a partition

For a partition $\lambda$ let $y_{\lambda}$ be the corresponding irreducible representation of the symmetric group $S_n$. Let $p_{\lambda}=\sum\limits_{\pi \in S_n}^{}{y_\lambda( \pi) x_{1 \pi(1)} ... x_{n \pi(n)}}$ be the immanent corresponding to $\lambda$. (For the sign representation we will just get the determinant for example). This is a polynomial in the $n^2$ variables $x_{i,j}$ over $\mathbb{Z}$.

My question is how can I obtain the immanent given a parition $\lambda$ using Sage?

My first problem is already that we need the polynomial ring in the $n^2$ variables $x_{i,j}$ and I am not sure how to define this in Sage depending on $n$.

edit retag close merge delete

Sort by » oldest newest most voted

Here are some immanants:

n = 3
G = SymmetricGroup(n)
R = PolynomialRing(ZZ, n, n, var_array=('x',))
x = {(i, j) : R.gen(n*i + j) for i in range(n) for j in range(n)}
for lamb in SymmetricGroupRepresentations(n):
chi = lamb.to_character()
imm = sum(chi(sigma)*prod(x[i,sigma(i+1)-1] for i in range(n)) for sigma in G)
print(imm)


Output:

x02*x11*x20 + x01*x12*x20 + x02*x10*x21 + x00*x12*x21 + x01*x10*x22 + x00*x11*x22
-x01*x12*x20 - x02*x10*x21 + 2*x00*x11*x22
-x02*x11*x20 + x01*x12*x20 + x02*x10*x21 - x00*x12*x21 - x01*x10*x22 + x00*x11*x22


To do it for a single partition, use e.g. SymmetricGroupRepresentation([3,2]) to create the representation; see SymmetricGroupRepresentation.

more