Bases: sage.categories.category.Category
The category of (multiplicative) groups, i.e. monoids with inverses.
EXAMPLES:
sage: Groups()
Category of groups
sage: Groups().super_categories()
[Category of monoids]
TESTS:
sage: TestSuite(Groups()).run()
Bases: sage.categories.algebra_functor.AlgebrasCategory
alias of Algebras.ElementMethods
alias of Algebras.ParentMethods
EXAMPLES:
sage: Groups().Algebras(QQ).super_categories()
[Category of hopf algebras with basis over Rational Field, Category of monoid algebras over Rational Field]
sage: Groups().example().algebra(ZZ).categories()
[Category of group algebras over Integer Ring, Category of hopf algebras with basis over Integer Ring, Category of bialgebras with basis over Integer Ring, Category of coalgebras with basis over Integer Ring, Category of hopf algebras over Integer Ring, Category of bialgebras over Integer Ring, Category of coalgebras over Integer Ring, Category of monoid algebras over Integer Ring, Category of semigroup algebras over Integer Ring, Category of algebras with basis over Integer Ring, Category of algebras over Integer Ring, Category of rings, Category of rngs, Category of semirings, Category of monoids, Category of semigroups, Category of magmas, Category of set algebras over Integer Ring, Category of modules with basis over Integer Ring, Category of modules over Integer Ring, Category of bimodules over Integer Ring on the left and Integer Ring on the right, Category of left modules over Integer Ring, Category of right modules over Integer Ring, Category of commutative additive groups, Category of commutative additive monoids, Category of commutative additive semigroups, Category of additive magmas, Category of sets, Category of sets with partial maps, Category of objects]
Returns the “multiplication” table of this multiplicative group, which is also known as the “Cayley table.”
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| d c b a f e
b| e f a b c d
c| f e d c b a
d| a b c d e f
e| b a f e d c
f| c d e f a b
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:
EXAMPLES:
sage: Groups().super_categories()
[Category of monoids]