Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Representations Of A Semigroup
AUTHORS:
- Travis Scrimshaw (2015-11-21): Initial version """
#################################################################################### # Copyright (C) 2015 Travis Scrimshaw <tscrimsh at umn.edu> # # Distributed under the terms of the GNU General Public License (GPL) # The full text of the GPL is available at: # http://www.gnu.org/licenses/ ####################################################################################
""" Abstract base class for representations of semigroups.
INPUT:
- ``semigroup`` -- a semigroup - ``base_ring`` -- a commutative ring """ """ Initialize ``self``.
EXAMPLES::
sage: G = FreeGroup(3) sage: T = G.trivial_representation() sage: TestSuite(T).run() """
""" Return the semigroup whose representation ``self`` is.
EXAMPLES::
sage: G = SymmetricGroup(4) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, g.sign()) sage: R = Representation(G, M, on_basis) sage: R.semigroup() Symmetric group of order 4! as a permutation group """
""" Return the semigroup algebra whose representation ``self`` is.
EXAMPLES::
sage: G = SymmetricGroup(4) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, g.sign()) sage: R = Representation(G, M, on_basis) sage: R.semigroup_algebra() Symmetric group algebra of order 4 over Rational Field """
def side(self): """ Return whether ``self`` is a left, right, or two-sided representation.
OUTPUT:
- the string ``"left"``, ``"right"``, or ``"twosided"``
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation() sage: R.side() 'left' """
""" Representation of a semigroup.
INPUT:
- ``semigroup`` -- a semigroup - ``module`` -- a module with a basis - ``on_basis`` -- function which takes as input ``g``, ``m``, where ``g`` is an element of the semigroup and ``m`` is an element of the indexing set for the basis, and returns the result of ``g`` acting on ``m`` - ``side`` -- (default: ``"left"``) whether this is a ``"left"`` or ``"right"`` representation
EXAMPLES:
We construct the sign representation of a symmetric group::
sage: G = SymmetricGroup(4) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, g.sign()) sage: R = Representation(G, M, on_basis) sage: x = R.an_element(); x 2*B['v'] sage: c,s = G.gens() sage: c,s ((1,2,3,4), (1,2)) sage: c * x -2*B['v'] sage: s * x -2*B['v'] sage: c * s * x 2*B['v'] sage: (c * s) * x 2*B['v']
This extends naturally to the corresponding group algebra::
sage: A = G.algebra(QQ) sage: s,c = A.algebra_generators() sage: c,s ((1,2,3,4), (1,2)) sage: c * x -2*B['v'] sage: s * x -2*B['v'] sage: c * s * x 2*B['v'] sage: (c * s) * x 2*B['v'] sage: (c + s) * x -4*B['v']
REFERENCES:
- :wikipedia:`Group_representation` """ """ Initialize ``self``.
EXAMPLES::
sage: G = SymmetricGroup(4) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, g.sign()) sage: R = Representation(G, M, on_basis) sage: R._test_representation() """ raise ValueError('side must be "left" or "right"') category=cat, **module.print_options())
""" Check (on some elements) that ``self`` is a representation of the given semigroup.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation() sage: R._test_representation()
sage: G = CoxeterGroup(['A',4,1], base_ring=ZZ) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, (-1)**g.length()) sage: R = Representation(G, M, on_basis, side="right") sage: R._test_representation(max_runs=500) """ else:
""" Return a string representation of ``self``.
EXAMPLES::
sage: P = Permutations(4) sage: M = CombinatorialFreeModule(QQ, ['v']) sage: from sage.modules.with_basis.representation import Representation sage: on_basis = lambda g,m: M.term(m, g.sign()) sage: Representation(P, M, on_basis) Representation of Standard permutations of 4 indexed by {'v'} over Rational Field """ self._semigroup, self.basis().keys(), self.base_ring())
""" Return a string representation of a basis index ``b`` of ``self``.
EXAMPLES::
sage: SGA = SymmetricGroupAlgebra(QQ, 3) sage: R = SGA.regular_representation() sage: all(R._repr_term(b) == SGA._repr_term(b) for b in SGA.basis().keys()) True """
""" Return a LaTeX representation of a basis index ``b`` of ``self``.
EXAMPLES::
sage: SGA = SymmetricGroupAlgebra(QQ, 3) sage: R = SGA.regular_representation() sage: all(R._latex_term(b) == SGA._latex_term(b) for b in SGA.basis().keys()) True """
""" Construct an element of ``self`` from ``x``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: A = G.algebra(ZZ) sage: R = A.regular_representation() sage: x = A.an_element(); x () + 4*(1,2,3,4) + 2*(1,4)(2,3) sage: R(x) () + 4*(1,2,3,4) + 2*(1,4)(2,3) """
""" Return whether ``self`` is a left or a right representation.
OUTPUT:
- the string ``"left"`` or ``"right"``
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation() sage: R.side() 'left' sage: S = G.regular_representation(side="right") sage: S.side() 'right' """
""" Return the action of ``scalar`` on ``self``.
EXAMPLES::
sage: G = groups.misc.WeylGroup(['B',2], prefix='s') sage: R = G.regular_representation() sage: s1,s2 = G.gens() sage: x = R.an_element(); x 2*s2*s1*s2 + s1*s2 + 3*s2 + 1 sage: 2 * x 4*s2*s1*s2 + 2*s1*s2 + 6*s2 + 2 sage: s1 * x 2*s2*s1*s2*s1 + 3*s1*s2 + s1 + s2 sage: s2 * x s2*s1*s2 + 2*s1*s2 + s2 + 3
sage: G = groups.misc.WeylGroup(['B',2], prefix='s') sage: R = G.regular_representation(side="right") sage: s1,s2 = G.gens() sage: x = R.an_element(); x 2*s2*s1*s2 + s1*s2 + 3*s2 + 1 sage: x * s1 2*s2*s1*s2*s1 + s1*s2*s1 + 3*s2*s1 + s1 sage: x * s2 2*s2*s1 + s1 + s2 + 3
sage: G = groups.misc.WeylGroup(['B',2], prefix='s') sage: R = G.regular_representation() sage: R.base_ring() Integer Ring sage: A = G.algebra(ZZ) sage: s1,s2 = A.algebra_generators() sage: x = R.an_element(); x 2*s2*s1*s2 + s1*s2 + 3*s2 + 1 sage: s1 * x 2*s2*s1*s2*s1 + 3*s1*s2 + s1 + s2 sage: s2 * x s2*s1*s2 + 2*s1*s2 + s2 + 3 sage: (2*s1 - s2) * x 4*s2*s1*s2*s1 - s2*s1*s2 + 4*s1*s2 + 2*s1 + s2 - 3 sage: (3*s1 + s2) * R.zero() 0
sage: A = G.algebra(QQ) sage: s1,s2 = A.algebra_generators() sage: a = 1/2 * s1 sage: a * x Traceback (most recent call last): ... TypeError: unsupported operand parent(s) for *: 'Algebra of Weyl Group of type ['B', 2] ... over Rational Field' and 'Left Regular Representation of Weyl Group of type ['B', 2] ... over Integer Ring' """ return self scalar = ~scalar for m,c in self), not self_on_left)
ms = ~ms for m,c in self), not self_on_left)
r""" The regular representation of a semigroup.
The left regular representation of a semigroup `S` over a commutative ring `R` is the semigroup ring `R[S]` equipped with the left `S`-action `x b_y = b_{xy}`, where `(b_z)_{z \in S}` is the natural basis of `R[S]` and `x,y \in S`.
INPUT:
- ``semigroup`` -- a semigroup - ``base_ring`` -- the base ring for the representation - ``side`` -- (default: ``"left"``) whether this is a ``"left"`` or ``"right"`` representation
REFERENCES:
- :wikipedia:`Regular_representation` """ """ Initialize ``self``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation() sage: TestSuite(R).run() """ else:
""" Return a string representation of ``self``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: G.regular_representation() Left Regular Representation of Dihedral group of order 8 as a permutation group over Integer Ring sage: G.regular_representation(side="right") Right Regular Representation of Dihedral group of order 8 as a permutation group over Integer Ring """ else:
""" Return the left action of ``g`` on ``m``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation() sage: R._test_representation() # indirect doctest """
""" Return the right action of ``g`` on ``m``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.regular_representation(side="right") sage: R._test_representation() # indirect doctest """
""" The trivial representation of a semigroup.
The trivial representation of a semigroup `S` over a commutative ring `R` is the `1`-dimensional `R`-module on which every element of `S` acts by the identity.
This is simultaneously a left and right representation.
INPUT:
- ``semigroup`` -- a semigroup - ``base_ring`` -- the base ring for the representation
REFERENCES:
- :wikipedia:`Trivial_representation` """ """ Initialize ``self``.
EXAMPLES::
sage: G = groups.permutation.PGL(2, 3) sage: V = G.trivial_representation() sage: TestSuite(V).run() """
""" Return a string representation of ``self``.
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: G.trivial_representation() Trivial representation of Dihedral group of order 8 as a permutation group over Integer Ring """ self.base_ring())
""" Return that ``self`` is a two-sided representation.
OUTPUT:
- the string ``"twosided"``
EXAMPLES::
sage: G = groups.permutation.Dihedral(4) sage: R = G.trivial_representation() sage: R.side() 'twosided' """
""" Return the action of ``scalar`` on ``self``.
EXAMPLES::
sage: SGA = SymmetricGroupAlgebra(QQ, 3) sage: V = SGA.trivial_representation() sage: x = V.an_element() sage: 2 * x 4*B['v'] sage: all(x * b == x for b in SGA.basis()) True sage: all(b * x == x for b in SGA.basis()) True sage: z = V.zero() sage: all(b * z == z for b in SGA.basis()) True """ return self
|