# Symmetrica library¶

sage.libs.symmetrica.symmetrica.bdg_symmetrica(part, perm)

Calculates the irreducible matrix representation D^part(perm), whose entries are of integral numbers.

REFERENCE: H. Boerner:
Darstellungen von Gruppen, Springer 1955. pp. 104-107.
sage.libs.symmetrica.symmetrica.chartafel_symmetrica(n)

you enter the degree of the symmetric group, as INTEGER object and the result is a MATRIX object: the charactertable of the symmetric group of the given degree.

EXAMPLES:

sage: symmetrica.chartafel(3)
[ 1  1  1]
[-1  0  2]
[ 1 -1  1]
sage: symmetrica.chartafel(4)
[ 1  1  1  1  1]
[-1  0 -1  1  3]
[ 0 -1  2  0  2]
[ 1  0 -1 -1  3]
[-1  1  1 -1  1]

sage.libs.symmetrica.symmetrica.charvalue_symmetrica(irred, cls, table=None)

you enter a PARTITION object part, labelling the irreducible character, you enter a PARTITION object class, labeling the class or class may be a PERMUTATION object, then result becomes the value of that character on that class or permutation. Note that the table may be NULL, in which case the value is computed, or it may be taken from a precalculated charactertable.

EXAMPLES:

sage: n = 3
sage: m = matrix([[symmetrica.charvalue(irred, cls) for cls in Partitions(n)] for irred in Partitions(n)]); m
[ 1  1  1]
[-1  0  2]
[ 1 -1  1]
sage: m == symmetrica.chartafel(n)
True
sage: n = 4
sage: m = matrix([[symmetrica.charvalue(irred, cls) for cls in Partitions(n)] for irred in Partitions(n)])
sage: m == symmetrica.chartafel(n)
True

sage.libs.symmetrica.symmetrica.compute_elmsym_with_alphabet_symmetrica(n, length, alphabet='x')

computes the expansion of a elementary symmetric function labeled by a INTEGER number as a POLYNOM erg. The object number may also be a PARTITION or a ELM_SYM object. The INTEGER length specifies the length of the alphabet. Both routines are the same.

EXAMPLES:

sage: a = symmetrica.compute_elmsym_with_alphabet(2,2); a
x0*x1
sage: a.parent()
Multivariate Polynomial Ring in x0, x1 over Integer Ring
sage: a = symmetrica.compute_elmsym_with_alphabet([2],2); a
x0*x1
sage: symmetrica.compute_elmsym_with_alphabet(3,2)
0
sage: symmetrica.compute_elmsym_with_alphabet([3,2,1],2)
0

sage.libs.symmetrica.symmetrica.compute_homsym_with_alphabet_symmetrica(n, length, alphabet='x')

computes the expansion of a homogenous(=complete) symmetric function labeled by a INTEGER number as a POLYNOM erg. The object number may also be a PARTITION or a HOM_SYM object. The INTEGER laenge specifies the length of the alphabet. Both routines are the same.

EXAMPLES:

sage: symmetrica.compute_homsym_with_alphabet(3,1,'x')
x^3
sage: symmetrica.compute_homsym_with_alphabet([2,1],1,'x')
x^3
sage: symmetrica.compute_homsym_with_alphabet([2,1],2,'x')
x0^3 + 2*x0^2*x1 + 2*x0*x1^2 + x1^3
sage: symmetrica.compute_homsym_with_alphabet([2,1],2,'a,b')
a^3 + 2*a^2*b + 2*a*b^2 + b^3
sage: symmetrica.compute_homsym_with_alphabet([2,1],2,'x').parent()
Multivariate Polynomial Ring in x0, x1 over Integer Ring

sage.libs.symmetrica.symmetrica.compute_monomial_with_alphabet_symmetrica(n, length, alphabet='x')

computes the expansion of a monomial symmetric function labeled by a PARTITION number as a POLYNOM erg. The INTEGER laenge specifies the length of the alphabet.

EXAMPLES:

sage: symmetrica.compute_monomial_with_alphabet([2,1],2,'x')
x0^2*x1 + x0*x1^2
sage: symmetrica.compute_monomial_with_alphabet([1,1,1],2,'x')
0
sage: symmetrica.compute_monomial_with_alphabet(2,2,'x')
x0^2 + x1^2
sage: symmetrica.compute_monomial_with_alphabet(2,2,'a,b')
a^2 + b^2
sage: symmetrica.compute_monomial_with_alphabet(2,2,'x').parent()
Multivariate Polynomial Ring in x0, x1 over Integer Ring

sage.libs.symmetrica.symmetrica.compute_powsym_with_alphabet_symmetrica(n, length, alphabet='x')

computes the expansion of a power symmetric function labeled by a INTEGER label or by a PARTITION label or a POW_SYM label as a POLYNOM erg. The INTEGER laenge specifies the length of the alphabet.

EXAMPLES:

sage: symmetrica.compute_powsym_with_alphabet(2,2,'x')
x0^2 + x1^2
sage: symmetrica.compute_powsym_with_alphabet(2,2,'x').parent()
Multivariate Polynomial Ring in x0, x1 over Integer Ring
sage: symmetrica.compute_powsym_with_alphabet([2],2,'x')
x0^2 + x1^2
sage: symmetrica.compute_powsym_with_alphabet([2],2,'a,b')
a^2 + b^2
sage: symmetrica.compute_powsym_with_alphabet([2,1],2,'a,b')
a^3 + a^2*b + a*b^2 + b^3

sage.libs.symmetrica.symmetrica.compute_schur_with_alphabet_det_symmetrica(part, length, alphabet='x')

EXAMPLES:

sage: symmetrica.compute_schur_with_alphabet_det(2,2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet_det([2],2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet_det(Partition([2]),2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet_det(Partition([2]),2,'y')
y0^2 + y0*y1 + y1^2
sage: symmetrica.compute_schur_with_alphabet_det(Partition([2]),2,'a,b')
a^2 + a*b + b^2

sage.libs.symmetrica.symmetrica.compute_schur_with_alphabet_symmetrica(part, length, alphabet='x')

Computes the expansion of a schurfunction labeled by a partition PART as a POLYNOM erg. The INTEGER length specifies the length of the alphabet.

EXAMPLES:

sage: symmetrica.compute_schur_with_alphabet(2,2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet([2],2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet(Partition([2]),2)
x0^2 + x0*x1 + x1^2
sage: symmetrica.compute_schur_with_alphabet(Partition([2]),2,'y')
y0^2 + y0*y1 + y1^2
sage: symmetrica.compute_schur_with_alphabet(Partition([2]),2,'a,b')
a^2 + a*b + b^2
sage: symmetrica.compute_schur_with_alphabet([2,1],1,'x')
0

sage.libs.symmetrica.symmetrica.dimension_schur_symmetrica(s)

you enter a SCHUR object a, and the result is the dimension of the corresponding representation of the symmetric group sn.

sage.libs.symmetrica.symmetrica.dimension_symmetrization_symmetrica(n, part)

computes the dimension of the degree of a irreducible representation of the GL_n, n is a INTEGER object, labeled by the PARTITION object a.

sage.libs.symmetrica.symmetrica.divdiff_perm_schubert_symmetrica(perm, a)

Returns the result of applying the divided difference operator $$\delta_i$$ to $$a$$ where $$a$$ is either a permutation or a Schubert polynomial over QQ.

EXAMPLES:

sage: symmetrica.divdiff_perm_schubert([2,3,1], [3,2,1])
X[2, 1]
sage: symmetrica.divdiff_perm_schubert([3,1,2], [3,2,1])
X[1, 3, 2]
sage: symmetrica.divdiff_perm_schubert([3,2,4,1], [3,2,1])
Traceback (most recent call last):
...
ValueError: cannot apply \delta_{[3, 2, 4, 1]} to a (= [3, 2, 1])

sage.libs.symmetrica.symmetrica.divdiff_schubert_symmetrica(i, a)

Returns the result of applying the divided difference operator $$\delta_i$$ to $$a$$ where $$a$$ is either a permutation or a Schubert polynomial over QQ.

EXAMPLES:

sage: symmetrica.divdiff_schubert(1, [3,2,1])
X[2, 3, 1]
sage: symmetrica.divdiff_schubert(2, [3,2,1])
X[3, 1, 2]
sage: symmetrica.divdiff_schubert(3, [3,2,1])
Traceback (most recent call last):
...
ValueError: cannot apply \delta_{3} to a (= [3, 2, 1])

sage.libs.symmetrica.symmetrica.end()
sage.libs.symmetrica.symmetrica.gupta_nm_symmetrica(n, m)

this routine computes the number of partitions of n with maximal part m. The result is erg. The input n,m must be INTEGER objects. The result is freed first to an empty object. The result must be a different from m and n.

sage.libs.symmetrica.symmetrica.gupta_tafel_symmetrica(max)

it computes the table of the above values. The entry n,m is the result of gupta_nm. mat is freed first. max must be an INTEGER object, it is the maximum weight for the partitions. max must be different from result.

sage.libs.symmetrica.symmetrica.hall_littlewood_symmetrica(part)

computes the so called Hall Littlewood Polynomials, i.e. a SCHUR object, whose coefficient are polynomials in one variable. The method, which is used for the computation is described in the paper: A.O. Morris The Characters of the group GL(n,q) Math Zeitschr 81, 112-123 (1963)

sage.libs.symmetrica.symmetrica.kostka_number_symmetrica(shape, content)

computes the kostkanumber, i.e. the number of tableaux of given shape, which is a PARTITION object, and of given content, which also is a PARTITION object, or a VECTOR object with INTEGER entries. The result is an INTEGER object, which is freed to an empty object at the beginning. The shape could also be a SKEWPARTITION object, then we compute the number of skewtableaux of the given shape.

EXAMPLES:

sage: symmetrica.kostka_number([2,1],[1,1,1])
2
sage: symmetrica.kostka_number([1,1,1],[1,1,1])
1
sage: symmetrica.kostka_number([3],[1,1,1])
1

sage.libs.symmetrica.symmetrica.kostka_tab_symmetrica(shape, content)

computes the list of tableaux of given shape and content. shape is a PARTITION object or a SKEWPARTITION object and content is a PARTITION object or a VECTOR object with INTEGER entries, the result becomes a LIST object whose entries are the computed TABLEAUX object.

EXAMPLES:

sage: symmetrica.kostka_tab([3],[1,1,1])
[[[1, 2, 3]]]
sage: symmetrica.kostka_tab([2,1],[1,1,1])
[[[1, 2], [3]], [[1, 3], [2]]]
sage: symmetrica.kostka_tab([1,1,1],[1,1,1])
[[[1], [2], [3]]]
sage: symmetrica.kostka_tab([[2,2,1],[1,1]],[1,1,1])
[[[None, 1], [None, 2], [3]],
[[None, 1], [None, 3], [2]],
[[None, 2], [None, 3], [1]]]
sage: symmetrica.kostka_tab([[2,2],[1]],[1,1,1])
[[[None, 1], [2, 3]], [[None, 2], [1, 3]]]

sage.libs.symmetrica.symmetrica.kostka_tafel_symmetrica(n)

Returns the table of Kostka numbers of weight n.

EXAMPLES:

sage: symmetrica.kostka_tafel(1)
[1]

sage: symmetrica.kostka_tafel(2)
[1 0]
[1 1]

sage: symmetrica.kostka_tafel(3)
[1 0 0]
[1 1 0]
[1 2 1]

sage: symmetrica.kostka_tafel(4)
[1 0 0 0 0]
[1 1 0 0 0]
[1 1 1 0 0]
[1 2 1 1 0]
[1 3 2 3 1]

sage: symmetrica.kostka_tafel(5)
[1 0 0 0 0 0 0]
[1 1 0 0 0 0 0]
[1 1 1 0 0 0 0]
[1 2 1 1 0 0 0]
[1 2 2 1 1 0 0]
[1 3 3 3 2 1 0]
[1 4 5 6 5 4 1]

sage.libs.symmetrica.symmetrica.kranztafel_symmetrica(a, b)

you enter the INTEGER objects, say a and b, and res becomes a MATRIX object, the charactertable of S_b wr S_a, co becomes a VECTOR object of classorders and cl becomes a VECTOR object of the classlabels.

EXAMPLES:

sage: (a,b,c) = symmetrica.kranztafel(2,2)
sage: a
[ 1 -1  1 -1  1]
[ 1  1  1  1  1]
[-1  1  1 -1  1]
[ 0  0  2  0 -2]
[-1 -1  1  1  1]
sage: b
[2, 2, 1, 2, 1]
sage: for m in c: print(m)
[0 0]
[0 1]
[0 0]
[1 0]
[0 2]
[0 0]
[1 1]
[0 0]
[2 0]
[0 0]

sage.libs.symmetrica.symmetrica.mult_monomial_monomial_symmetrica(m1, m2)
sage.libs.symmetrica.symmetrica.mult_schubert_schubert_symmetrica(a, b)

Multiplies the Schubert polynomials a and b.

EXAMPLES:

sage: symmetrica.mult_schubert_schubert([3,2,1], [3,2,1])
X[5, 3, 1, 2, 4]

sage.libs.symmetrica.symmetrica.mult_schubert_variable_symmetrica(a, i)

Returns the product of a and x_i. Note that indexing with i starts at 1.

EXAMPLES:

sage: symmetrica.mult_schubert_variable([3,2,1], 2)
X[3, 2, 4, 1]
sage: symmetrica.mult_schubert_variable([3,2,1], 4)
X[3, 2, 1, 4, 6, 5] - X[3, 2, 1, 5, 4]

sage.libs.symmetrica.symmetrica.mult_schur_schur_symmetrica(s1, s2)
sage.libs.symmetrica.symmetrica.ndg_symmetrica(part, perm)
sage.libs.symmetrica.symmetrica.newtrans_symmetrica(perm)

computes the decomposition of a schubertpolynomial labeled by the permutation perm, as a sum of Schurfunction. FIXME!

sage.libs.symmetrica.symmetrica.odd_to_strict_part_symmetrica(part)

implements the bijection between partitions with odd parts and strict partitions. input is a VECTOR type partition, the result is a partition of the same weight with different parts.

sage.libs.symmetrica.symmetrica.odg_symmetrica(part, perm)

Calculates the irreducible matrix representation D^part(perm), which consists of real numbers.

REFERENCE: G. James/ A. Kerber:
Representation Theory of the Symmetric Group. Addison/Wesley 1981. pp. 127-129.
sage.libs.symmetrica.symmetrica.outerproduct_schur_symmetrica(parta, partb)

you enter two PARTITION objects, and the result is a SCHUR object, which is the expansion of the product of the two schurfunctions, labbeled by the two PARTITION objects parta and partb. Of course this can also be interpreted as the decomposition of the outer tensor product of two irreducibe representations of the symmetric group.

EXAMPLES:

sage: symmetrica.outerproduct_schur([2],[2])
s[2, 2] + s[3, 1] + s[4]

sage.libs.symmetrica.symmetrica.part_part_skewschur_symmetrica(outer, inner)

Return the skew Schur function s_{outer/inner}.

EXAMPLES:

sage: symmetrica.part_part_skewschur([3,2,1],[2,1])
s[1, 1, 1] + 2*s[2, 1] + s[3]

sage.libs.symmetrica.symmetrica.plethysm_symmetrica(outer, inner)
sage.libs.symmetrica.symmetrica.q_core_symmetrica(part, d)

computes the q-core of a PARTITION object part. This is the remaining partition (=res) after removing of all hooks of length d (= INTEGER object). The result may be an empty object, if the whole partition disappears.

sage.libs.symmetrica.symmetrica.random_partition_symmetrica(n)

Return a random partition p of the entered weight w.

w must be an INTEGER object, p becomes a PARTITION object. Type of partition is VECTOR . It uses the algorithm of Nijenhuis and Wilf, p.76

sage.libs.symmetrica.symmetrica.scalarproduct_schubert_symmetrica(a, b)

EXAMPLES:

sage: symmetrica.scalarproduct_schubert([3,2,1], [3,2,1])
X[1, 3, 5, 2, 4]
sage: symmetrica.scalarproduct_schubert([3,2,1], [2,1,3])
X[1, 2, 4, 3]

sage.libs.symmetrica.symmetrica.scalarproduct_schur_symmetrica(s1, s2)
sage.libs.symmetrica.symmetrica.schur_schur_plet_symmetrica(outer, inner)
sage.libs.symmetrica.symmetrica.sdg_symmetrica(part, perm)

Calculates the irreducible matrix representation D^part(perm), which consists of rational numbers.

REFERENCE: G. James/ A. Kerber:
Representation Theory of the Symmetric Group. Addison/Wesley 1981. pp. 124-126.
sage.libs.symmetrica.symmetrica.specht_dg_symmetrica(part, perm)
sage.libs.symmetrica.symmetrica.start()
sage.libs.symmetrica.symmetrica.strict_to_odd_part_symmetrica(part)

implements the bijection between strict partitions and partitions with odd parts. input is a VECTOR type partition, the result is a partition of the same weight with only odd parts.

sage.libs.symmetrica.symmetrica.t_ELMSYM_HOMSYM_symmetrica(elmsym)
sage.libs.symmetrica.symmetrica.t_ELMSYM_MONOMIAL_symmetrica(elmsym)
sage.libs.symmetrica.symmetrica.t_ELMSYM_POWSYM_symmetrica(elmsym)
sage.libs.symmetrica.symmetrica.t_ELMSYM_SCHUR_symmetrica(elmsym)
sage.libs.symmetrica.symmetrica.t_HOMSYM_ELMSYM_symmetrica(homsym)
sage.libs.symmetrica.symmetrica.t_HOMSYM_MONOMIAL_symmetrica(homsym)
sage.libs.symmetrica.symmetrica.t_HOMSYM_POWSYM_symmetrica(homsym)
sage.libs.symmetrica.symmetrica.t_HOMSYM_SCHUR_symmetrica(homsym)
sage.libs.symmetrica.symmetrica.t_MONOMIAL_ELMSYM_symmetrica(monomial)
sage.libs.symmetrica.symmetrica.t_MONOMIAL_HOMSYM_symmetrica(monomial)
sage.libs.symmetrica.symmetrica.t_MONOMIAL_POWSYM_symmetrica(monomial)
sage.libs.symmetrica.symmetrica.t_MONOMIAL_SCHUR_symmetrica(monomial)
sage.libs.symmetrica.symmetrica.t_POLYNOM_ELMSYM_symmetrica(p)

Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function in the elementary basis.

sage.libs.symmetrica.symmetrica.t_POLYNOM_MONOMIAL_symmetrica(p)

Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function in the monomial basis.

sage.libs.symmetrica.symmetrica.t_POLYNOM_POWER_symmetrica(p)

Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function in the power sum basis.

sage.libs.symmetrica.symmetrica.t_POLYNOM_SCHUBERT_symmetrica(a)

Converts a multivariate polynomial a to a Schubert polynomial.

EXAMPLES:

sage: R.<x1,x2,x3> = QQ[]
sage: w0 = x1^2*x2
sage: symmetrica.t_POLYNOM_SCHUBERT(w0)
X[3, 2, 1]

sage.libs.symmetrica.symmetrica.t_POLYNOM_SCHUR_symmetrica(p)

Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function in the Schur basis.

sage.libs.symmetrica.symmetrica.t_POWSYM_ELMSYM_symmetrica(powsym)
sage.libs.symmetrica.symmetrica.t_POWSYM_HOMSYM_symmetrica(powsym)
sage.libs.symmetrica.symmetrica.t_POWSYM_MONOMIAL_symmetrica(powsym)
sage.libs.symmetrica.symmetrica.t_POWSYM_SCHUR_symmetrica(powsym)
sage.libs.symmetrica.symmetrica.t_SCHUBERT_POLYNOM_symmetrica(a)

Converts a Schubert polynomial to a ‘regular’ multivariate polynomial.

EXAMPLES:

sage: symmetrica.t_SCHUBERT_POLYNOM([3,2,1])
x0^2*x1

sage.libs.symmetrica.symmetrica.t_SCHUR_ELMSYM_symmetrica(schur)
sage.libs.symmetrica.symmetrica.t_SCHUR_HOMSYM_symmetrica(schur)
sage.libs.symmetrica.symmetrica.t_SCHUR_MONOMIAL_symmetrica(schur)
sage.libs.symmetrica.symmetrica.t_SCHUR_POWSYM_symmetrica(schur)
sage.libs.symmetrica.symmetrica.test_integer(x)

Tests functionality for converting between Sage’s integers and symmetrica’s integers.

EXAMPLES:

sage: from sage.libs.symmetrica.symmetrica import test_integer
sage: test_integer(1)
1
sage: test_integer(-1)
-1
sage: test_integer(2^33)
8589934592
sage: test_integer(-2^33)
-8589934592
sage: test_integer(2^100)
1267650600228229401496703205376
sage: test_integer(-2^100)
-1267650600228229401496703205376
sage: for i in range(100):
....:     if test_integer(2^i) != 2^i:
....:         print("Failure at {}".format(i))