### Navigation

- index
- modules |
- next |
- previous |
- Algebras »

# Group algebras

This module implements group algebras for arbitrary groups over arbitrary commutative rings.

EXAMPLES:

    sage: D4 = DihedralGroup(4)
    sage: kD4 = GroupAlgebra(D4, GF(7))
    sage: a = kD4.an_element(); a
    () + 2*(2,4) + 3*(1,2)(3,4) + (1,2,3,4)
    sage: a * a
    (1,2)(3,4) + (1,2,3,4) + 3*(1,3) + (1,3)(2,4) + 6*(1,4,3,2) + 2*(1,4)(2,3)

Given the group and the base ring, the corresponding group algebra is unique:

    sage: A = GroupAlgebra(GL(3, QQ), ZZ)
    sage: B = GroupAlgebra(GL(3, QQ), ZZ)
    sage: A is B
    True
    sage: C = GroupAlgebra(GL(3, QQ), QQ)
    sage: A == C
    False

As long as there is no natural map from the group to the base ring, you can easily convert elements of the group to the group algebra:

    sage: A = GroupAlgebra(DihedralGroup(2), ZZ)
    sage: g = DihedralGroup(2).gen(0); g
    (3,4)
    sage: A(g)
    (3,4)
    sage: A(2) * g
    2*(3,4)

Since there is a natural inclusion from the dihedral group \(D_2\) of order 4 into the symmetric group \(S_4\) of order 4!, and since there is a natural map from the integers to the rationals, there is a natural map from \(\ZZ[D_2]\) to \(\QQ[S_4]\):

    sage: A = GroupAlgebra(DihedralGroup(2), ZZ)
    sage: B = GroupAlgebra(SymmetricGroup(4), QQ)
    sage: a = A.an_element(); a
    () + 3*(3,4) + 3*(1,2)
    sage: b = B.an_element(); b
    () + 2*(3,4) + 3*(2,3) + (1,2,3,4)
    sage: B(a)
    () + 3*(3,4) + 3*(1,2)
    sage: a * b  # a is automatically converted to an element of B
    7*() + 5*(3,4) + 3*(2,3) + 9*(2,3,4) + 3*(1,2) + 6*(1,2)(3,4) + 3*(1,2,3) + (1,2,3,4) + 9*(1,3,2) + 3*(1,3,4)
    sage: parent(a * b)
    Group algebra of group "Symmetric group of order 4! as a permutation group" over base ring Rational Field

    sage: G = GL(3, GF(7))
    sage: ZG = GroupAlgebra(G)
    sage: c, d = G.random_element(), G.random_element()
    sage: zc, zd = ZG(c), ZG(d)
    sage: zc * d == zc * zd  # d is automatically converted to an element of ZG
    True

There is no obvious map in the other direction, though:

    sage: A(b)
    Traceback (most recent call last):
    ...
    TypeError: Don't know how to create an element of Group algebra of group "Dihedral group of order 4 as a permutation group" over base ring Integer Ring from () + 2*(3,4) + 3*(2,3) + (1,2,3,4)

Group algebras have the structure of Hopf algebras:

    sage: a = kD4.an_element(); a
    () + 2*(2,4) + 3*(1,2)(3,4) + (1,2,3,4)
    sage: a.antipode()
    () + 2*(2,4) + 3*(1,2)(3,4) + (1,4,3,2)
    sage: a.coproduct()
    () # () + 2*(2,4) # (2,4) + 3*(1,2)(3,4) # (1,2)(3,4) + (1,2,3,4) # (1,2,3,4)

Note

As alluded to above, it is problematic to make group algebras fit nicely with Sage’s coercion model. The problem is that (for example) if G is the additive group \((\ZZ,+)\), and \(R = \ZZ[G]\) is its group ring, then the integer 2 can be coerced into R in two ways – via G, or via the base ring – and the answers are different. In practice we get around this by preventing elements of a group \(H\) from coercing automatically into a group ring \(k[G]\) if \(H\) coerces into both \(k\) and \(G\). This is unfortunate, but it seems like the most sensible solution in this ambiguous situation.

AUTHOR:

- David Loeffler (2008-08-24): initial version
- Martin Raum (2009-08): update to use new coercion model – see trac ticket #6670
- John Palmieri (2011-07): more updates to coercion, categories, etc., group algebras constructed using CombinatorialFreeModule – see trac ticket #6670

class `sage.algebras.group_algebra_new.``GroupAlgebra`(group, base_ring=Integer Ring)

  Bases: `sage.combinat.free_module.CombinatorialFreeModule`

  Create the given group algebra.

  INPUT:

  - `group`, a group
  - `base_ring` (optional, default \(\ZZ\)), a commutative ring

  OUTPUT:

  – a `GroupAlgebra` instance.

  EXAMPLES:

      sage: GroupAlgebra(GL(3, GF(7)))
      Group algebra of group "General Linear Group of degree 3 over Finite Field of size 7" over base ring Integer Ring
      sage: GroupAlgebra(GL(3, GF(7)), QQ)
      Group algebra of group "General Linear Group of degree 3 over Finite Field of size 7" over base ring Rational Field
      sage: GroupAlgebra(1)
      Traceback (most recent call last):
      ...
      TypeError: "1" is not a group

      sage: GroupAlgebra(SU(2, GF(4, 'a')), IntegerModRing(12)).category()
      Category of group algebras over Ring of integers modulo 12
      sage: GroupAlgebra(KleinFourGroup()) is GroupAlgebra(KleinFourGroup())
      True

  The one of the group indexes the one of this algebra:

      sage: A = GroupAlgebra(DihedralGroup(6), QQ)
      sage: A.one_basis()
      ()
      sage: A.one()
      ()

  The product of two basis elements is induced by the product of the corresponding elements of the group:

      sage: A = GroupAlgebra(DihedralGroup(3), QQ)
      sage: (a, b) = A._group.gens()
      sage: a*b
      (1,2)
      sage: A.product_on_basis(a, b)
      (1,2)

  The basis elements are group-like for the coproduct: \(\Delta(g) = g \otimes g\):

      sage: A = GroupAlgebra(DihedralGroup(3), QQ)
      sage: (a, b) = A._group.gens()
      sage: A.coproduct_on_basis(a)
      (1,2,3) # (1,2,3)

  The counit on the basis elements is 1:

      sage: A = GroupAlgebra(DihedralGroup(6), QQ)
      sage: (a, b) = A._group.gens()
      sage: A.counit_on_basis(a)
      1

  The antipode on basis elements is given by \(\chi(g) = g^{-1}\):

      sage: A = GroupAlgebra(DihedralGroup(3), QQ)
      sage: (a, b) = A._group.gens(); a
      (1,2,3)
      sage: A.antipode_on_basis(a)
      (1,3,2)

  TESTS:

      sage: A = GroupAlgebra(GL(3, GF(7)))
      sage: A.has_coerce_map_from(GL(3, GF(7)))
      True
      sage: G = SymmetricGroup(5)
      sage: x,y = G.gens()
      sage: A = GroupAlgebra(G)
      sage: A( A(x) )
      (1,2,3,4,5)

  `algebra_generators`()

    The generators of this algebra, as per `Algebras.ParentMethods.algebra_generators()`.

    They correspond to the generators of the group.

    EXAMPLES:

        sage: A = GroupAlgebra(DihedralGroup(3), QQ); A
        Group algebra of group "Dihedral group of order 6 as a permutation group" over base ring Rational Field
        sage: A.algebra_generators()
        Finite family {(1,2,3): (1,2,3), (1,3): (1,3)}

  `construction`()

    EXAMPLES:

        sage: A = GroupAlgebra(KleinFourGroup(), QQ)
        sage: A.construction()
        (GroupAlgebraFunctor, Rational Field)

  `gen`(i=0)

    EXAMPLES:

        sage: A = GroupAlgebra(GL(3, GF(7)))
        sage: A.gen(0)
        [3 0 0]
        [0 1 0]
        [0 0 1]

  `gens`()

    The generators of this algebra, as per `Algebras.ParentMethods.algebra_generators()`.

    They correspond to the generators of the group.

    EXAMPLES:

        sage: A = GroupAlgebra(DihedralGroup(3), QQ); A
        Group algebra of group "Dihedral group of order 6 as a permutation group" over base ring Rational Field
        sage: A.algebra_generators()
        Finite family {(1,2,3): (1,2,3), (1,3): (1,3)}

  `group`()

    Return the group of this group algebra.

    EXAMPLES:

        sage: GroupAlgebra(GL(3, GF(11))).group()
        General Linear Group of degree 3 over Finite Field of size 11
        sage: GroupAlgebra(SymmetricGroup(10)).group()
        Symmetric group of order 10! as a permutation group

  `is_commutative`()

    Return True if self is a commutative ring. True if and only if `self.group()` is abelian.

    EXAMPLES:

        sage: GroupAlgebra(SymmetricGroup(2)).is_commutative()
        True
        sage: GroupAlgebra(SymmetricGroup(3)).is_commutative()
        False

  `is_exact`()

    Return True if elements of self have exact representations, which is true of self if and only if it is true of `self.group()` and `self.base_ring()`.

    EXAMPLES:

        sage: GroupAlgebra(GL(3, GF(7))).is_exact()
        True
        sage: GroupAlgebra(GL(3, GF(7)), RR).is_exact()
        False
        sage: GroupAlgebra(GL(3, pAdicRing(7))).is_exact() # not implemented correctly (not my fault)!
        False

  `is_field`(proof=True)

    Return True if self is a field. This is always false unless `self.group()` is trivial and `self.base_ring()` is a field.

    EXAMPLES:

        sage: GroupAlgebra(SymmetricGroup(2)).is_field()
        False
        sage: GroupAlgebra(SymmetricGroup(1)).is_field()
        False
        sage: GroupAlgebra(SymmetricGroup(1), QQ).is_field()
        True

  `is_finite`()

    Return True if self is finite, which is true if and only if `self.group()` and `self.base_ring()` are both finite.

    EXAMPLES:

        sage: GroupAlgebra(SymmetricGroup(2), IntegerModRing(10)).is_finite()
        True
        sage: GroupAlgebra(SymmetricGroup(2)).is_finite()
        False
        sage: GroupAlgebra(AbelianGroup(1), IntegerModRing(10)).is_finite()
        False

  `is_integral_domain`(proof=True)

    Return True if self is an integral domain.

    This is false unless `self.base_ring()` is an integral domain, and even then it is false unless `self.group()` has no nontrivial elements of finite order. I don’t know if this condition suffices, but it obviously does if the group is abelian and finitely generated.

    EXAMPLES:

        sage: GroupAlgebra(SymmetricGroup(2)).is_integral_domain()
        False
        sage: GroupAlgebra(SymmetricGroup(1)).is_integral_domain()
        True
        sage: GroupAlgebra(SymmetricGroup(1), IntegerModRing(4)).is_integral_domain()
        False
        sage: GroupAlgebra(AbelianGroup(1)).is_integral_domain()
        True
        sage: GroupAlgebra(AbelianGroup(2, [0,2])).is_integral_domain()
        False
        sage: GroupAlgebra(GL(2, ZZ)).is_integral_domain() # not implemented
        False

  `ngens`()

    Return the number of generators.

    EXAMPLES:

        sage: GroupAlgebra(SL2Z).ngens()
        2
        sage: GroupAlgebra(DihedralGroup(4), RR).ngens()
        2

  `random_element`(n=2)

    Return a ‘random’ element of self.

    INPUT:

    - n – integer (optional, default 2), number of summands

    Algorithm: return a sum of n terms, each of which is formed by multiplying a random element of the base ring by a random element of the group.

    EXAMPLE:

        sage: GroupAlgebra(DihedralGroup(6), QQ).random_element()
        -1/95*(2,6)(3,5) - 1/2*(1,3)(4,6)
        sage: GroupAlgebra(SU(2, 13), QQ).random_element(1)
        1/2*[      11    a + 6]
        [2*a + 12       11]

class `sage.algebras.group_algebra_new.``GroupAlgebraFunctor`(group)

  Bases: `sage.categories.pushout.ConstructionFunctor`

  For a fixed group, a functor sending a commutative ring to the corresponding group algebra.

  INPUT :

  - `group` – the group associated to each group algebra under consideration.

  EXAMPLES:

      sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
      sage: F = GroupAlgebraFunctor(KleinFourGroup())
      sage: loads(dumps(F)) == F
      True
      sage: GroupAlgebra(SU(2, GF(4, 'a')), IntegerModRing(12)).category()
      Category of group algebras over Ring of integers modulo 12

  `group`()

    Return the group which is associated to this functor.

    EXAMPLES:

        sage: from sage.algebras.group_algebra_new import GroupAlgebraFunctor
        sage: GroupAlgebraFunctor(CyclicPermutationGroup(17)).group() == CyclicPermutationGroup(17)
        True

### Navigation

- index
- modules |
- next |
- previous |
- Algebras »