Bases: sage.categories.category_with_axiom.CategoryWithAxiom_singleton
The category of (multiplicative) groups, i.e. monoids with inverses.
EXAMPLES:
sage: Groups()
Category of groups
sage: Groups().super_categories()
[Category of monoids, Category of inverse unital magmas]
TESTS:
sage: TestSuite(Groups()).run()
Bases: sage.categories.algebra_functor.AlgebrasCategory
The category of group algebras over a given base ring.
EXAMPLES:
sage: GroupAlgebras(IntegerRing())
Category of group algebras over Integer Ring
sage: GroupAlgebras(IntegerRing()).super_categories()
[Category of hopf algebras with basis over Integer Ring,
Category of monoid algebras over Integer Ring]
Here is how to create the group algebra of a group :
sage: G = DihedralGroup(5)
sage: QG = G.algebra(QQ); QG
Group algebra of Dihedral group of order 10 as a permutation group over Rational Field
and an example of computation:
sage: g = G.an_element(); g
(1,2,3,4,5)
sage: (QG.term(g) + 1)**3
B[()] + 3*B[(1,2,3,4,5)] + 3*B[(1,3,5,2,4)] + B[(1,4,2,5,3)]
Todo
TESTS:
sage: A = GroupAlgebras(QQ).example(GL(3, GF(11)))
sage: A.one_basis()
[1 0 0]
[0 1 0]
[0 0 1]
sage: A = SymmetricGroupAlgebra(QQ,4)
sage: x = Permutation([4,3,2,1])
sage: A.product_on_basis(x,x)
[1, 2, 3, 4]
sage: C = GroupAlgebras(ZZ)
sage: TestSuite(C).run()
Return self in the canonical basis of the center of the group algebra.
INPUT:
OUTPUT:
Warning
EXAMPLES:
sage: QS3 = SymmetricGroupAlgebra(QQ, 3)
sage: A=QS3([2,3,1])+QS3([3,1,2])
sage: A.central_form()
B[[2, 3, 1]]
sage: QS4 = SymmetricGroupAlgebra(QQ, 4)
sage: B=sum(len(s.cycle_type())*QS4(s) for s in Permutations(4))
sage: B.central_form()
4*B[[1, 2, 3, 4]] + 3*B[[2, 1, 3, 4]] + 2*B[[2, 1, 4, 3]] + 2*B[[2, 3, 1, 4]] + B[[2, 3, 4, 1]]
sage: QG=GroupAlgebras(QQ).example(PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]))
sage: sum(i for i in QG.basis()).central_form()
B[()] + B[(4,5)] + B[(3,4,5)] + B[(2,3)(4,5)] + B[(2,3,4,5)] + B[(1,2)(3,4,5)] + B[(1,2,3,4,5)]
Return generators of this group algebra (as an algebra).
EXAMPLES:
sage: GroupAlgebras(QQ).example(AlternatingGroup(10)).algebra_generators()
Finite family {(1,2,3,4,5,6,7,8,9): B[(1,2,3,4,5,6,7,8,9)], (8,9,10): B[(8,9,10)]}
Note
This function is overloaded for SymmetricGroupAlgebras to return Permutations and not Elements of the symmetric group:
sage: GroupAlgebras(QQ).example(SymmetricGroup(10)).algebra_generators()
[[2, 1, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9, 10, 1]]
Return the antipode of the element g of the basis.
Each basis element g is group-like, and so has
antipode . This method is used to compute the
antipode of any element.
EXAMPLES:
sage: A=CyclicPermutationGroup(6).algebra(ZZ);A
Group algebra of Cyclic group of order 6 as a permutation group over Integer Ring
sage: g=CyclicPermutationGroup(6).an_element();g
(1,2,3,4,5,6)
sage: A.antipode_on_basis(g)
B[(1,6,5,4,3,2)]
sage: a=A.an_element();a
B[()] + 3*B[(1,2,3,4,5,6)] + 3*B[(1,3,5)(2,4,6)]
sage: a.antipode()
B[()] + 3*B[(1,5,3)(2,6,4)] + 3*B[(1,6,5,4,3,2)]
Return the center of the group algebra.
The canonical basis of the center of the group algebra
is the family , where
is
any collection of representatives of the conjugacy
classes of the group, and
is the sum of the
elements in the conjugacy class of
.
OUTPUT:
Warning
EXAMPLES:
sage: SymmetricGroupAlgebra(ZZ,3).center()
Free module generated by {[2, 3, 1], [2, 1, 3], [1, 2, 3]} over Integer Ring
Return the coproduct of the element g of the basis.
Each basis element g is group-like. This method is used to compute the coproduct of any element.
EXAMPLES:
sage: A=CyclicPermutationGroup(6).algebra(ZZ);A
Group algebra of Cyclic group of order 6 as a permutation group over Integer Ring
sage: g=CyclicPermutationGroup(6).an_element();g
(1,2,3,4,5,6)
sage: A.coproduct_on_basis(g)
B[(1,2,3,4,5,6)] # B[(1,2,3,4,5,6)]
sage: a=A.an_element();a
B[()] + 3*B[(1,2,3,4,5,6)] + 3*B[(1,3,5)(2,4,6)]
sage: a.coproduct()
B[()] # B[()] + 3*B[(1,2,3,4,5,6)] # B[(1,2,3,4,5,6)] + 3*B[(1,3,5)(2,4,6)] # B[(1,3,5)(2,4,6)]
Return the counit of the element x of the group algebra.
This is the sum of all coefficients of x with respect to the standard basis of the group algebra.
EXAMPLES:
sage: A=CyclicPermutationGroup(6).algebra(ZZ);A
Group algebra of Cyclic group of order 6 as a permutation group over Integer Ring
sage: a=A.an_element();a
B[()] + 3*B[(1,2,3,4,5,6)] + 3*B[(1,3,5)(2,4,6)]
sage: a.counit()
7
Return the counit of the element g of the basis.
Each basis element g is group-like, and so has
counit . This method is used to compute the
counit of any element.
EXAMPLES:
sage: A=CyclicPermutationGroup(6).algebra(ZZ);A
Group algebra of Cyclic group of order 6 as a permutation group over Integer Ring
sage: g=CyclicPermutationGroup(6).an_element();g
(1,2,3,4,5,6)
sage: A.counit_on_basis(g)
1
Return the underlying group of the group algebra.
EXAMPLES:
sage: GroupAlgebras(QQ).example(GL(3, GF(11))).group()
General Linear Group of degree 3 over Finite Field of size 11
sage: SymmetricGroupAlgebra(QQ,10).group()
Symmetric group of order 10! as a permutation group
Return an example of group algebra.
EXAMPLES:
sage: GroupAlgebras(QQ[x]).example()
Group algebra of Dihedral group of order 8 as a permutation group over Univariate Polynomial Ring in x over Rational Field
An other group can be specified as optional argument:
sage: GroupAlgebras(QQ).example(AlternatingGroup(4))
Group algebra of Alternating group of order 4!/2 as a permutation group over Rational Field
Implement the fact that the algebra of a group is a Hopf algebra.
EXAMPLES:
sage: C = Groups().Algebras(QQ)
sage: C.extra_super_categories()
[Category of hopf algebras over Rational Field]
sage: sorted(C.super_categories(), key=str)
[Category of hopf algebras with basis over Rational Field,
Category of monoid algebras over Rational Field]
Bases: sage.categories.cartesian_product.CartesianProductsCategory
The category of groups constructed as cartesian products of groups.
This construction gives the direct product of groups. See Wikipedia article Direct_product and Wikipedia article Direct_product_of_groups for more information.
Return the group generators of self.
EXAMPLES:
sage: C5 = CyclicPermutationGroup(5)
sage: C4 = CyclicPermutationGroup(4)
sage: S4 = SymmetricGroup(3)
sage: C = cartesian_product([C5, C4, S4])
sage: C.group_generators()
Family (((1,2,3,4,5), (), ()),
((), (1,2,3,4), ()),
((), (), (1,2)),
((), (), (2,3)))
We check the other portion of trac ticket #16718 is fixed:
sage: len(C.j_classes())
1
An example with an infinitely generated group (a better output is needed):
sage: G = Groups.free([1,2])
sage: H = Groups.free(ZZ)
sage: C = cartesian_product([G, H])
sage: C.monoid_generators()
Lazy family (gen(i))_{i in The cartesian product of (...)}
A cartesian product of groups is endowed with a natural group structure.
EXAMPLES:
sage: C = Groups().CartesianProducts()
sage: C.extra_super_categories()
[Category of groups]
sage: sorted(C.super_categories(), key=str)
[Category of Cartesian products of inverse unital magmas,
Category of Cartesian products of monoids,
Category of groups]
Bases: sage.categories.category_with_axiom.CategoryWithAxiom
Category of commutative (abelian) groups.
A group is commutative if
for all
.
Return the free commutative group.
INPUT:
EXAMPLES:
sage: Groups.Commutative.free(index_set=ZZ)
Free abelian group indexed by Integer Ring
sage: Groups().Commutative().free(ZZ)
Free abelian group indexed by Integer Ring
sage: Groups().Commutative().free(5)
Multiplicative Abelian group isomorphic to Z x Z x Z x Z x Z
sage: F.<x,y,z> = Groups().Commutative().free(); F
Multiplicative Abelian group isomorphic to Z x Z x Z
alias of FiniteGroups
Returns the “multiplication” table of this multiplicative group, which is also known as the “Cayley table”.
Note
The order of the elements in the row and column headings is equal to the order given by the table’s column_keys() method. The association between the actual elements and the names/symbols used in the table can also be retrieved as a dictionary with the translation() method.
For groups, this routine should behave identically to the multiplication_table() method for magmas, which applies in greater generality.
INPUT:
OUTPUT: An object representing the multiplication table. This is an OperationTable object and even more documentation can be found there.
EXAMPLES:
Permutation groups, matrix groups and abelian groups can all compute their multiplication tables.
sage: G = DiCyclicGroup(3)
sage: T = G.cayley_table()
sage: T.column_keys()
((), (5,6,7), (5,7,6)...(1,4,2,3)(5,7))
sage: T
* a b c d e f g h i j k l
+------------------------
a| a b c d e f g h i j k l
b| b c a e f d i g h l j k
c| c a b f d e h i g k l j
d| d e f a b c j k l g h i
e| e f d b c a l j k i g h
f| f d e c a b k l j h i g
g| g h i j k l d e f a b c
h| h i g k l j f d e c a b
i| i g h l j k e f d b c a
j| j k l g h i a b c d e f
k| k l j h i g c a b f d e
l| l j k i g h b c a e f d
sage: M=SL(2,2)
sage: M.cayley_table()
* a b c d e f
+------------
a| a b c d e f
b| b a d c f e
c| c f e b a d
d| d e f a b c
e| e d a f c b
f| f c b e d a
sage: A=AbelianGroup([2,3])
sage: A.cayley_table()
* a b c d e f
+------------
a| a b c d e f
b| b c a e f d
c| c a b f d e
d| d e f a b c
e| e f d b c a
f| f d e c a b
Lowercase ASCII letters are the default symbols used for the table, but you can also specify the use of decimal digit strings, or provide your own strings (in the proper order if they have meaning). Also, if the elements themselves are not too complex, you can choose to just use the string representations of the elements themselves.
sage: C=CyclicPermutationGroup(11)
sage: C.cayley_table(names='digits')
* 00 01 02 03 04 05 06 07 08 09 10
+---------------------------------
00| 00 01 02 03 04 05 06 07 08 09 10
01| 01 02 03 04 05 06 07 08 09 10 00
02| 02 03 04 05 06 07 08 09 10 00 01
03| 03 04 05 06 07 08 09 10 00 01 02
04| 04 05 06 07 08 09 10 00 01 02 03
05| 05 06 07 08 09 10 00 01 02 03 04
06| 06 07 08 09 10 00 01 02 03 04 05
07| 07 08 09 10 00 01 02 03 04 05 06
08| 08 09 10 00 01 02 03 04 05 06 07
09| 09 10 00 01 02 03 04 05 06 07 08
10| 10 00 01 02 03 04 05 06 07 08 09
sage: G=QuaternionGroup()
sage: names=['1', 'I', '-1', '-I', 'J', '-K', '-J', 'K']
sage: G.cayley_table(names=names)
* 1 I -1 -I J -K -J K
+------------------------
1| 1 I -1 -I J -K -J K
I| I -1 -I 1 K J -K -J
-1| -1 -I 1 I -J K J -K
-I| -I 1 I -1 -K -J K J
J| J -K -J K -1 -I 1 I
-K| -K -J K J I -1 -I 1
-J| -J K J -K 1 I -1 -I
K| K J -K -J -I 1 I -1
sage: A=AbelianGroup([2,2])
sage: A.cayley_table(names='elements')
* 1 f1 f0 f0*f1
+------------------------
1| 1 f1 f0 f0*f1
f1| f1 1 f0*f1 f0
f0| f0 f0*f1 1 f1
f0*f1| f0*f1 f0 f1 1
The change_names() routine behaves similarly, but changes an existing table “in-place.”
sage: G=AlternatingGroup(3)
sage: T=G.cayley_table()
sage: T.change_names('digits')
sage: T
* 0 1 2
+------
0| 0 1 2
1| 1 2 0
2| 2 0 1
For an infinite group, you can still work with finite sets of elements, provided the set is closed under multiplication. Elements will be coerced into the group as part of setting up the table.
sage: G=SL(2,ZZ)
sage: G
Special Linear Group of degree 2 over Integer Ring
sage: identity = matrix(ZZ, [[1,0], [0,1]])
sage: G.cayley_table(elements=[identity, -identity])
* a b
+----
a| a b
b| b a
The OperationTable class provides even greater flexibility, including changing the operation. Here is one such example, illustrating the computation of commutators. commutator is defined as a function of two variables, before being used to build the table. From this, the commutator subgroup seems obvious, and creating a Cayley table with just these three elements confirms that they form a closed subset in the group.
sage: from sage.matrix.operation_table import OperationTable
sage: G=DiCyclicGroup(3)
sage: commutator = lambda x, y: x*y*x^-1*y^-1
sage: T=OperationTable(G, commutator)
sage: T
. a b c d e f g h i j k l
+------------------------
a| a a a a a a a a a a a a
b| a a a a a a c c c c c c
c| a a a a a a b b b b b b
d| a a a a a a a a a a a a
e| a a a a a a c c c c c c
f| a a a a a a b b b b b b
g| a b c a b c a c b a c b
h| a b c a b c b a c b a c
i| a b c a b c c b a c b a
j| a b c a b c a c b a c b
k| a b c a b c b a c b a c
l| a b c a b c c b a c b a
sage: trans = T.translation()
sage: comm = [trans['a'], trans['b'],trans['c']]
sage: comm
[(), (5,6,7), (5,7,6)]
sage: P=G.cayley_table(elements=comm)
sage: P
* a b c
+------
a| a b c
b| b c a
c| c a b
TODO:
Arrange an ordering of elements into cosets of a normal
subgroup close to size . Then the quotient
group structure is often apparent in the table. See
comments on Trac #7555.
AUTHOR:
Returns group generators for self.
This default implementation calls gens(), for backward compatibility.
EXAMPLES:
sage: A = AlternatingGroup(4)
sage: A.group_generators()
Family ((2,3,4), (1,2,3))
The holomorph of a group
The holomorph of a group is the semidirect product
, where
is the identity function
on
, the automorphism group of
.
See Wikipedia article Holomorph (mathematics)
EXAMPLES:
sage: G = Groups().example()
sage: G.holomorph()
Traceback (most recent call last):
...
NotImplementedError: holomorph of General Linear Group of degree 4 over Rational Field not yet implemented
The semi-direct product of two groups
EXAMPLES:
sage: G = Groups().example()
sage: G.semidirect_product(G,Morphism(G,G))
Traceback (most recent call last):
...
NotImplementedError: semidirect product of General Linear Group of degree 4 over Rational Field and General Linear Group of degree 4 over Rational Field not yet implemented
EXAMPLES:
sage: Groups().example()
General Linear Group of degree 4 over Rational Field
Return the free group.
INPUT:
When the index set is an integer or only variable names are given, this returns FreeGroup_class, which currently has more features due to the interface with GAP than IndexedFreeGroup.
EXAMPLES:
sage: Groups.free(index_set=ZZ)
Free group indexed by Integer Ring
sage: Groups().free(ZZ)
Free group indexed by Integer Ring
sage: Groups().free(5)
Free Group on generators {x0, x1, x2, x3, x4}
sage: F.<x,y,z> = Groups().free(); F
Free Group on generators {x, y, z}