[1]:
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

import sympy as sp
import numpy as np
import itertools as it
import pysymmpol as sy
import pysymmpol.utils as ut
from IPython.display import display, Latex

Class: SchurPolynomial

Let us now consider the Schur polynomials. We can initialize the SchurPolynomials class as: sy.SchurPolynomial(young: YoungDiagram)

[3]:
par = (3, 2, 1) # define a partition
yg = sy.YoungDiagram(par) # Initialize an object, YoungDiagram
sch = sy.SchurPolynomial(yg) # Initialize the Schur polynomial
[4]:
t = ut.create_miwa(yg.boxes) # using the function in the utils module
tt = tuple(t.values())

To get the explicit expression for the polynomial, one can use the method .explicit(t). As before, it accepts tuples and dictionaries.

[7]:
sch.explicit(t)
[7]:
$\displaystyle \frac{t_{1}^{6}}{45} - \frac{t_{1}^{3} t_{3}}{3} + t_{1} t_{5} - t_{3}^{2}$

As before, one can get the sympy polynomials as

[10]:
sch.explicit(tt, True)
[10]:
$\displaystyle \operatorname{Poly}{\left( \frac{1}{45} t_{1}^{6} - \frac{1}{3} t_{1}^{3}t_{3} + t_{1}t_{5} - t_{3}^{2}, t_{1}, t_{3}, t_{5}, domain=\mathbb{Q} \right)}$

One can also express the Schur polynomials in terms of the coordinates x:

[26]:
#Suppose we have x = (x1, x2, x3),
m = 3 # minimum to give a non trivial
tx = ut.tx_power_sum(yg.boxes, m)
tx
[26]:
(x1 + x2 + x3,
 x1**2/2 + x2**2/2 + x3**2/2,
 x1**3/3 + x2**3/3 + x3**3/3,
 x1**4/4 + x2**4/4 + x3**4/4,
 x1**5/5 + x2**5/5 + x3**5/5,
 x1**6/6 + x2**6/6 + x3**6/6)
[27]:
sch.explicit(tx)
[27]:
$\displaystyle x_{1}^{3} x_{2}^{2} x_{3} + x_{1}^{3} x_{2} x_{3}^{2} + x_{1}^{2} x_{2}^{3} x_{3} + 2 x_{1}^{2} x_{2}^{2} x_{3}^{2} + x_{1}^{2} x_{2} x_{3}^{3} + x_{1} x_{2}^{3} x_{3}^{2} + x_{1} x_{2}^{2} x_{3}^{3}$

Generate Schur polynomials for a given level n

One can easily generate all Schur polynomials for a given level n as follows:

[49]:
# Define a function to list the polynomials
def list_schur(n):
    states = sy.State(n).partition_states()
    for a in states:
        yg = sy.YoungDiagram(a)
        sch = sy.SchurPolynomial(yg)
        t = ut.create_miwa(yg.boxes)
        print(f'-- Schur[{a}] --')
        display(sch.explicit(t))
[50]:
list_schur(2)
-- Schur[(1, 1)] --
$\displaystyle \frac{t_{1}^{2}}{2} - t_{2}$
-- Schur[(2, 0)] --
$\displaystyle \frac{t_{1}^{2}}{2} + t_{2}$

Skew-Schur Polynomials

In order to define the Schur polynomials, we need to consider a secong Young diagram \(\mu\) that is contained in \(\lambda\), we write \(\mu \subseteq \lambda\). We can use the method constains(mu) to test the subset relation between the partitions.

[85]:
yg1 = sy.YoungDiagram((4,3,2,2,1))
yg2 = sy.YoungDiagram((3,2,1))
t = ut.create_miwa(yg1.boxes)
[86]:
yg1.contains(yg2)
[86]:
True
[87]:
# We find skew Schur polynomials with the skew_schur method
sch1 = sy.SchurPolynomial(yg1)
sch2 = sy.SchurPolynomial(yg2)
[88]:
sch.skew_schur(t, yg1) # bacause yg2 does not contain yg1
[88]:
0
[89]:
sch1.skew_schur(t, yg2)
[89]:
$\displaystyle t_{1}^{2} \cdot \left(\frac{5 t_{1}^{4}}{24} - \frac{t_{1}^{2} t_{2}}{2} - t_{1} t_{3} + \frac{t_{2}^{2}}{2} + t_{4}\right)$
[ ]: