Representations of the Symmetric Group

Todo

  • construct the product of two irreducible representations.

  • implement Induction/Restriction of representations.

Warning

This code uses a different convention than in Sagan’s book “The Symmetric Group”

class sage.combinat.symmetric_group_representations.SpechtRepresentation(parent, partition)

Bases: sage.combinat.symmetric_group_representations.SymmetricGroupRepresentation_generic_class

representation_matrix(permutation)

Return the matrix representing the permutation in this irreducible representation.

Note

This method caches the results.

EXAMPLES:

sage: spc = SymmetricGroupRepresentation([3,1], 'specht')
sage: spc.representation_matrix(Permutation([2,1,3,4]))
[ 0 -1  0]
[-1  0  0]
[ 0  0  1]
sage: spc.representation_matrix(Permutation([3,2,1,4]))
[0 0 1]
[0 1 0]
[1 0 0]
scalar_product(u, v)

Return 0 if u+v is not a permutation, and the signature of the permutation otherwise.

This is the scalar product of a vertex u of the underlying Yang-Baxter graph with the vertex v in the ‘dual’ Yang-Baxter graph.

EXAMPLES:

sage: spc = SymmetricGroupRepresentation([3,2], 'specht')
sage: spc.scalar_product((1,0,2,1,0),(0,3,0,3,0))
-1
sage: spc.scalar_product((1,0,2,1,0),(3,0,0,3,0))
0
scalar_product_matrix(permutation=None)

Return the scalar product matrix corresponding to permutation.

The entries are given by the scalar products of u and permutation.action(v), where u is a vertex in the underlying Yang-Baxter graph and v is a vertex in the dual graph.

EXAMPLES:

sage: spc = SymmetricGroupRepresentation([3,1], 'specht')
sage: spc.scalar_product_matrix()
[ 1  0  0]
[ 0 -1  0]
[ 0  0  1]
class sage.combinat.symmetric_group_representations.SpechtRepresentations(n, ring=None, cache_matrices=True)

Bases: sage.combinat.symmetric_group_representations.SymmetricGroupRepresentations_class

Element

alias of SpechtRepresentation

sage.combinat.symmetric_group_representations.SymmetricGroupRepresentation(partition, implementation='specht', ring=None, cache_matrices=True)

The irreducible representation of the symmetric group corresponding to partition.

INPUT:

  • partition – a partition of a positive integer

  • implementation – string (default: "specht"), one of:

    • "seminormal" - for Young’s seminormal representation

    • "orthogonal" - for Young’s orthogonal representation

    • "specht" - for Specht’s representation

  • ring – the ring over which the representation is defined

  • cache_matrices – boolean (default: True) if True, then any representation matrices that are computed are cached

EXAMPLES:

Young’s orthogonal representation: the matrices are orthogonal.

sage: orth = SymmetricGroupRepresentation([2,1], "orthogonal"); orth
Orthogonal representation of the symmetric group corresponding to [2, 1]
sage: all(a*a.transpose() == a.parent().identity_matrix() for a in orth)
True
sage: orth = SymmetricGroupRepresentation([3,2], "orthogonal"); orth
Orthogonal representation of the symmetric group corresponding to [3, 2]
sage: orth([2,1,3,4,5])
[ 1  0  0  0  0]
[ 0  1  0  0  0]
[ 0  0 -1  0  0]
[ 0  0  0  1  0]
[ 0  0  0  0 -1]
sage: orth([1,3,2,4,5])
[          1           0           0           0           0]
[          0        -1/2 1/2*sqrt(3)           0           0]
[          0 1/2*sqrt(3)         1/2           0           0]
[          0           0           0        -1/2 1/2*sqrt(3)]
[          0           0           0 1/2*sqrt(3)         1/2]
sage: orth([1,2,4,3,5])
[       -1/3 2/3*sqrt(2)           0           0           0]
[2/3*sqrt(2)         1/3           0           0           0]
[          0           0           1           0           0]
[          0           0           0           1           0]
[          0           0           0           0          -1]

The Specht representation:

sage: spc = SymmetricGroupRepresentation([3,2], "specht")
sage: spc.scalar_product_matrix(Permutation([1,2,3,4,5]))
[ 1  0  0  0  0]
[ 0 -1  0  0  0]
[ 0  0  1  0  0]
[ 0  0  0  1  0]
[-1  0  0  0 -1]
sage: spc.scalar_product_matrix(Permutation([5,4,3,2,1]))
[ 1 -1  0  1  0]
[ 0  0  1  0 -1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[-1  0  0  0 -1]
sage: spc([5,4,3,2,1])
[ 1 -1  0  1  0]
[ 0  0 -1  0  1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[ 0  1  0 -1  1]
sage: spc.verify_representation()
True

By default, any representation matrices that are computed are cached:

sage: spc = SymmetricGroupRepresentation([3,2], "specht")
sage: spc([5,4,3,2,1])
[ 1 -1  0  1  0]
[ 0  0 -1  0  1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[ 0  1  0 -1  1]
sage: spc._cache__representation_matrix
{(([5, 4, 3, 2, 1],), ()): [ 1 -1  0  1  0]
[ 0  0 -1  0  1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[ 0  1  0 -1  1]}

This can be turned off with the keyword cache_matrices:

sage: spc = SymmetricGroupRepresentation([3,2], "specht", cache_matrices=False)
sage: spc([5,4,3,2,1])
[ 1 -1  0  1  0]
[ 0  0 -1  0  1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[ 0  1  0 -1  1]
sage: hasattr(spc, '_cache__representation_matrix')
False

Note

The implementation is based on the paper [Las].

REFERENCES:

Las(1,2)

Alain Lascoux, ‘Young representations of the symmetric group.’ http://phalanstere.univ-mlv.fr/~al/ARTICLES/ProcCrac.ps.gz

AUTHORS:

  • Franco Saliola (2009-04-23)

class sage.combinat.symmetric_group_representations.SymmetricGroupRepresentation_generic_class(parent, partition)

Bases: sage.structure.element.Element

Generic methods for a representation of the symmetric group.

to_character()

Return the character of the representation.

EXAMPLES:

The trivial character:

sage: rho = SymmetricGroupRepresentation([3])
sage: chi = rho.to_character(); chi
Character of Symmetric group of order 3! as a permutation group
sage: chi.values()
[1, 1, 1]
sage: all(chi(g) == 1 for g in SymmetricGroup(3))
True

The sign character:

sage: rho = SymmetricGroupRepresentation([1,1,1])
sage: chi = rho.to_character(); chi
Character of Symmetric group of order 3! as a permutation group
sage: chi.values()
[1, -1, 1]
sage: all(chi(g) == g.sign() for g in SymmetricGroup(3))
True

The defining representation:

sage: triv = SymmetricGroupRepresentation([4])
sage: hook = SymmetricGroupRepresentation([3,1])
sage: def_rep = lambda p : triv(p).block_sum(hook(p)).trace()
sage: list(map(def_rep, Permutations(4)))
[4, 2, 2, 1, 1, 2, 2, 0, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 0, 1, 1, 2, 0, 0]
sage: [p.to_matrix().trace() for p in Permutations(4)]
[4, 2, 2, 1, 1, 2, 2, 0, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 0, 1, 1, 2, 0, 0]
verify_representation()

Verify the representation: tests that the images of the simple transpositions are involutions and tests that the braid relations hold.

EXAMPLES:

sage: spc = SymmetricGroupRepresentation([1,1,1])
sage: spc.verify_representation()
True
sage: spc = SymmetricGroupRepresentation([4,2,1])
sage: spc.verify_representation()
True
sage.combinat.symmetric_group_representations.SymmetricGroupRepresentations(n, implementation='specht', ring=None, cache_matrices=True)

Irreducible representations of the symmetric group.

INPUT:

  • n – positive integer

  • implementation – string (default: "specht"), one of:

    • "seminormal" - for Young’s seminormal representation

    • "orthogonal" - for Young’s orthogonal representation

    • "specht" - for Specht’s representation

  • ring – the ring over which the representation is defined

  • cache_matrices – boolean (default: True) if True, then any representation matrices that are computed are cached

EXAMPLES:

Young’s orthogonal representation: the matrices are orthogonal.

sage: orth = SymmetricGroupRepresentations(3, "orthogonal"); orth
Orthogonal representations of the symmetric group of order 3! over Symbolic Ring
sage: orth.list()
[Orthogonal representation of the symmetric group corresponding to [3],
 Orthogonal representation of the symmetric group corresponding to [2, 1],
 Orthogonal representation of the symmetric group corresponding to [1, 1, 1]]
sage: orth([2,1])([1,2,3])
[1 0]
[0 1]

Young’s seminormal representation.

sage: snorm = SymmetricGroupRepresentations(3, "seminormal"); snorm
Seminormal representations of the symmetric group of order 3! over Rational Field
sage: sgn = snorm([1,1,1]); sgn
Seminormal representation of the symmetric group corresponding to [1, 1, 1]
sage: list(map(sgn, Permutations(3)))
[[1], [-1], [-1], [1], [1], [-1]]

The Specht Representation.

sage: spc = SymmetricGroupRepresentations(5, "specht"); spc
Specht representations of the symmetric group of order 5! over Integer Ring
sage: spc([3,2])([5,4,3,2,1])
[ 1 -1  0  1  0]
[ 0  0 -1  0  1]
[ 0  0  0 -1  1]
[ 0  1 -1 -1  1]
[ 0  1  0 -1  1]

Note

The implementation is based on the paper [Las].

AUTHORS:

  • Franco Saliola (2009-04-23)

class sage.combinat.symmetric_group_representations.SymmetricGroupRepresentations_class(n, ring=None, cache_matrices=True)

Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent

Generic methods for the CombinatorialClass of irreducible representations of the symmetric group.

cardinality()

Return the cardinality of self.

EXAMPLES:

sage: sp = SymmetricGroupRepresentations(4, "specht")
sage: sp.cardinality()
5
class sage.combinat.symmetric_group_representations.YoungRepresentation_Orthogonal(parent, partition)

Bases: sage.combinat.symmetric_group_representations.YoungRepresentation_generic

class sage.combinat.symmetric_group_representations.YoungRepresentation_Seminormal(parent, partition)

Bases: sage.combinat.symmetric_group_representations.YoungRepresentation_generic

class sage.combinat.symmetric_group_representations.YoungRepresentation_generic(parent, partition)

Bases: sage.combinat.symmetric_group_representations.SymmetricGroupRepresentation_generic_class

Generic methods for Young’s representations of the symmetric group.

representation_matrix(permutation)

Return the matrix representing permutation.

EXAMPLES:

sage: orth = SymmetricGroupRepresentation([2,1], "orthogonal")
sage: orth.representation_matrix(Permutation([2,1,3]))
[ 1  0]
[ 0 -1]
sage: orth.representation_matrix(Permutation([1,3,2]))
[       -1/2 1/2*sqrt(3)]
[1/2*sqrt(3)         1/2]
sage: norm = SymmetricGroupRepresentation([2,1], "seminormal")
sage: p = PermutationGroupElement([2,1,3])
sage: norm.representation_matrix(p)
[ 1  0]
[ 0 -1]
sage: p = PermutationGroupElement([1,3,2])
sage: norm.representation_matrix(p)
[-1/2  3/2]
[ 1/2  1/2]
representation_matrix_for_simple_transposition(i)

Return the matrix representing the transposition that swaps i and i+1.

EXAMPLES:

sage: orth = SymmetricGroupRepresentation([2,1], "orthogonal")
sage: orth.representation_matrix_for_simple_transposition(1)
[ 1  0]
[ 0 -1]
sage: orth.representation_matrix_for_simple_transposition(2)
[       -1/2 1/2*sqrt(3)]
[1/2*sqrt(3)         1/2]

sage: norm = SymmetricGroupRepresentation([2,1], "seminormal")
sage: norm.representation_matrix_for_simple_transposition(1)
[ 1  0]
[ 0 -1]
sage: norm.representation_matrix_for_simple_transposition(2)
[-1/2  3/2]
[ 1/2  1/2]
class sage.combinat.symmetric_group_representations.YoungRepresentations_Orthogonal(n, ring=None, cache_matrices=True)

Bases: sage.combinat.symmetric_group_representations.SymmetricGroupRepresentations_class

Element

alias of YoungRepresentation_Orthogonal

class sage.combinat.symmetric_group_representations.YoungRepresentations_Seminormal(n, ring=None, cache_matrices=True)

Bases: sage.combinat.symmetric_group_representations.SymmetricGroupRepresentations_class

Element

alias of YoungRepresentation_Seminormal

sage.combinat.symmetric_group_representations.partition_to_vector_of_contents(partition, reverse=False)

Return the “vector of contents” associated to partition.

EXAMPLES:

sage: from sage.combinat.symmetric_group_representations import partition_to_vector_of_contents
sage: partition_to_vector_of_contents([3,2])
(0, 1, 2, -1, 0)