Groups¶
Permutation groups¶
A permutation group is a subgroup of some symmetric group
PermutationGroup
, so you
can work with such groups directly:
sage: G = PermutationGroup(['(1,2,3)(4,5)'])
sage: G
Permutation Group with generators [(1,2,3)(4,5)]
sage: g = G.gens()[0]; g
(1,2,3)(4,5)
sage: g*g
(1,3,2)
sage: G = PermutationGroup(['(1,2,3)'])
sage: g = G.gens()[0]; g
(1,2,3)
sage: g.order()
3
>>> from sage.all import *
>>> G = PermutationGroup(['(1,2,3)(4,5)'])
>>> G
Permutation Group with generators [(1,2,3)(4,5)]
>>> g = G.gens()[Integer(0)]; g
(1,2,3)(4,5)
>>> g*g
(1,3,2)
>>> G = PermutationGroup(['(1,2,3)'])
>>> g = G.gens()[Integer(0)]; g
(1,2,3)
>>> g.order()
3
G = PermutationGroup(['(1,2,3)(4,5)']) G g = G.gens()[0]; g g*g G = PermutationGroup(['(1,2,3)']) g = G.gens()[0]; g g.order()
For the example of the Rubik’s cube group (a permutation subgroup
of
sage: cube = "cubegp := Group(
( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19),
( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37)( 6,22,46,35),
(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13)( 8,30,41,11),
(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21)( 8,33,48,24),
(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29)( 1,14,48,27),
(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) )"
sage: gap(cube)
'permutation group with 6 generators'
sage: gap("Size(cubegp)")
43252003274489856000'
>>> from sage.all import *
>>> cube = "cubegp := Group(
( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19),
( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37)( 6,22,46,35),
(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13)( 8,30,41,11),
(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21)( 8,33,48,24),
(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29)( 1,14,48,27),
(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) )"
>>> gap(cube)
'permutation group with 6 generators'
>>> gap("Size(cubegp)")
43252003274489856000'
cube = "cubegp := Group( gap(cube) gap("Size(cubegp)")
Another way you can choose to do this:
Create a file
cubegroup.py
containing the lines:cube = "cubegp := Group( ( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18)(11,35,27,19), ( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37)( 6,22,46,35), (17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13)( 8,30,41,11), (25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21)( 8,33,48,24), (33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29)( 1,14,48,27), (41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) )"
Then place the file in the subdirectory
$SAGE_ROOT/local/lib/python2.4/site-packages/sage
of your Sage home directory. Last, read (i.e.,import
) it into Sage:sage: import sage.cubegroup sage: sage.cubegroup.cube 'cubegp := Group(( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18) (11,35,27,19),( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37) ( 6,22,46,35),(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13) ( 8,30,41,11),(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21) ( 8,33,48,24),(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29) ( 1,14,48,27),(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39) (16,24,32,40) )' sage: gap(sage.cubegroup.cube) 'permutation group with 6 generators' sage: gap("Size(cubegp)") '43252003274489856000'
>>> from sage.all import * >>> import sage.cubegroup >>> sage.cubegroup.cube 'cubegp := Group(( 1, 3, 8, 6)( 2, 5, 7, 4)( 9,33,25,17)(10,34,26,18) (11,35,27,19),( 9,11,16,14)(10,13,15,12)( 1,17,41,40)( 4,20,44,37) ( 6,22,46,35),(17,19,24,22)(18,21,23,20)( 6,25,43,16)( 7,28,42,13) ( 8,30,41,11),(25,27,32,30)(26,29,31,28)( 3,38,43,19)( 5,36,45,21) ( 8,33,48,24),(33,35,40,38)(34,37,39,36)( 3, 9,46,32)( 2,12,47,29) ( 1,14,48,27),(41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39) (16,24,32,40) )' >>> gap(sage.cubegroup.cube) 'permutation group with 6 generators' >>> gap("Size(cubegp)") '43252003274489856000'
import sage.cubegroup sage.cubegroup.cube gap(sage.cubegroup.cube) gap("Size(cubegp)")
(You will have line wrap instead of the above carriage returns in your Sage output.)
Use the
CubeGroup
class:sage: rubik = CubeGroup() sage: rubik The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48). sage: rubik.order() 43252003274489856000
>>> from sage.all import * >>> rubik = CubeGroup() >>> rubik The Rubik's cube group with generators R,L,F,B,U,D in SymmetricGroup(48). >>> rubik.order() 43252003274489856000
rubik = CubeGroup() rubik rubik.order()
(1) has implemented classical groups (such as
) and matrix groups over a finite field with user-defined generators.(2) also has implemented finite and infinite (but finitely generated) abelian groups.
Conjugacy classes¶
You can compute conjugacy classes of a finite group using “natively”:
sage: G = PermutationGroup(['(1,2,3)', '(1,2)(3,4)', '(1,7)'])
sage: CG = G.conjugacy_classes_representatives()
sage: gamma = CG[2]
sage: CG; gamma
[(), (4,7), (3,4,7), (2,3)(4,7), (2,3,4,7), (1,2)(3,4,7), (1,2,3,4,7)]
(3,4,7)
>>> from sage.all import *
>>> G = PermutationGroup(['(1,2,3)', '(1,2)(3,4)', '(1,7)'])
>>> CG = G.conjugacy_classes_representatives()
>>> gamma = CG[Integer(2)]
>>> CG; gamma
[(), (4,7), (3,4,7), (2,3)(4,7), (2,3,4,7), (1,2)(3,4,7), (1,2,3,4,7)]
(3,4,7)
G = PermutationGroup(['(1,2,3)', '(1,2)(3,4)', '(1,7)']) CG = G.conjugacy_classes_representatives() gamma = CG[2] CG; gamma
You can use the Sage-GAP interface:
sage: libgap.eval("G := Group((1,2)(3,4),(1,2,3))")
Group([ (1,2)(3,4), (1,2,3) ])
sage: libgap.eval("CG := ConjugacyClasses(G)")
[ ()^G, (2,3,4)^G, (2,4,3)^G, (1,2)(3,4)^G ]
sage: libgap.eval("gamma := CG[3]")
(2,4,3)^G
sage: libgap.eval("g := Representative(gamma)")
(2,4,3)
>>> from sage.all import *
>>> libgap.eval("G := Group((1,2)(3,4),(1,2,3))")
Group([ (1,2)(3,4), (1,2,3) ])
>>> libgap.eval("CG := ConjugacyClasses(G)")
[ ()^G, (2,3,4)^G, (2,4,3)^G, (1,2)(3,4)^G ]
>>> libgap.eval("gamma := CG[3]")
(2,4,3)^G
>>> libgap.eval("g := Representative(gamma)")
(2,4,3)
libgap.eval("G := Group((1,2)(3,4),(1,2,3))") libgap.eval("CG := ConjugacyClasses(G)") libgap.eval("gamma := CG[3]") libgap.eval("g := Representative(gamma)")
Or, here’s another (more “pythonic”) way to do this type of computation:
sage: G = libgap.eval("Group([(1,2,3), (1,2)(3,4), (1,7)])")
sage: CG = G.ConjugacyClasses()
sage: gamma = CG[2]
sage: g = gamma.Representative()
sage: CG; gamma; g
[ ()^G, (4,7)^G, (3,4,7)^G, (2,3)(4,7)^G, (2,3,4,7)^G, (1,2)(3,4,7)^G, (1,2,3,4,7)^G ]
(3,4,7)^G
(3,4,7)
>>> from sage.all import *
>>> G = libgap.eval("Group([(1,2,3), (1,2)(3,4), (1,7)])")
>>> CG = G.ConjugacyClasses()
>>> gamma = CG[Integer(2)]
>>> g = gamma.Representative()
>>> CG; gamma; g
[ ()^G, (4,7)^G, (3,4,7)^G, (2,3)(4,7)^G, (2,3,4,7)^G, (1,2)(3,4,7)^G, (1,2,3,4,7)^G ]
(3,4,7)^G
(3,4,7)
G = libgap.eval("Group([(1,2,3), (1,2)(3,4), (1,7)])") CG = G.ConjugacyClasses() gamma = CG[2] g = gamma.Representative() CG; gamma; g
Normal subgroups¶
If you want to find all the normal subgroups of a permutation group
sage: G = AlternatingGroup( 5 )
sage: libgap(G).NormalSubgroups()
[ Alt( [ 1 .. 5 ] ), Group(()) ]
>>> from sage.all import *
>>> G = AlternatingGroup( Integer(5) )
>>> libgap(G).NormalSubgroups()
[ Alt( [ 1 .. 5 ] ), Group(()) ]
G = AlternatingGroup( 5 ) libgap(G).NormalSubgroups()
or
sage: G = libgap.AlternatingGroup( 5 )
sage: G.NormalSubgroups()
[ Alt( [ 1 .. 5 ] ), Group(()) ]
>>> from sage.all import *
>>> G = libgap.AlternatingGroup( Integer(5) )
>>> G.NormalSubgroups()
[ Alt( [ 1 .. 5 ] ), Group(()) ]
G = libgap.AlternatingGroup( 5 ) G.NormalSubgroups()
Here’s another way, working more directly with GAP:
sage: libgap.eval("G := AlternatingGroup( 5 )")
Alt( [ 1 .. 5 ] )
sage: libgap.eval("normal := NormalSubgroups( G )")
[ Alt( [ 1 .. 5 ] ), Group(()) ]
sage: G = libgap.eval("DihedralGroup( 10 )")
sage: G.NormalSubgroups().SortedList()
[ Group([ ]), Group([ f2 ]), <pc group of size 10 with 2 generators> ]
sage: libgap.eval("G := SymmetricGroup( 4 )")
Sym( [ 1 .. 4 ] )
sage: libgap.eval("normal := NormalSubgroups( G );")
[ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), ... ]),
Group(()) ]
>>> from sage.all import *
>>> libgap.eval("G := AlternatingGroup( 5 )")
Alt( [ 1 .. 5 ] )
>>> libgap.eval("normal := NormalSubgroups( G )")
[ Alt( [ 1 .. 5 ] ), Group(()) ]
>>> G = libgap.eval("DihedralGroup( 10 )")
>>> G.NormalSubgroups().SortedList()
[ Group([ ]), Group([ f2 ]), <pc group of size 10 with 2 generators> ]
>>> libgap.eval("G := SymmetricGroup( 4 )")
Sym( [ 1 .. 4 ] )
>>> libgap.eval("normal := NormalSubgroups( G );")
[ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), ... ]),
Group(()) ]
libgap.eval("G := AlternatingGroup( 5 )") libgap.eval("normal := NormalSubgroups( G )") G = libgap.eval("DihedralGroup( 10 )") G.NormalSubgroups().SortedList() libgap.eval("G := SymmetricGroup( 4 )") libgap.eval("normal := NormalSubgroups( G );")
Centers¶
How do you compute the center of a group in Sage?
Although Sage calls GAP to do the computation of the group center,
center
is “wrapped” (i.e., Sage has a class PermutationGroup with
associated class method “center”), so the user does not need to use
the libgap
command. Here’s an example:
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])
sage: G.center()
Subgroup generated by [()] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)])
>>> from sage.all import *
>>> G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])
>>> G.center()
Subgroup generated by [()] of (Permutation Group with generators [(3,4), (1,2,3)(4,5)])
G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)']) G.center()
A similar syntax for matrix groups also works:
sage: G = SL(2, GF(5) )
sage: G.center()
Subgroup with 1 generators (
[4 0]
[0 4]
) of Special Linear Group of degree 2 over Finite Field of size 5
sage: G = PSL(2, 5 )
sage: G.center()
Subgroup generated by [()] of (The projective special linear group of degree 2 over Finite Field of size 5)
>>> from sage.all import *
>>> G = SL(Integer(2), GF(Integer(5)) )
>>> G.center()
Subgroup with 1 generators (
[4 0]
[0 4]
) of Special Linear Group of degree 2 over Finite Field of size 5
>>> G = PSL(Integer(2), Integer(5) )
>>> G.center()
Subgroup generated by [()] of (The projective special linear group of degree 2 over Finite Field of size 5)
G = SL(2, GF(5) ) G.center() G = PSL(2, 5 ) G.center()
Note
center
can be spelled either way in GAP, not so in Sage.
The group id database¶
The function group_id
uses the Small Groups Library of
E. A. O’Brien, B. Eick, and H. U. Besche, which is a part of GAP.
sage: G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])
sage: G.order()
120
sage: G.group_id()
[120, 34]
>>> from sage.all import *
>>> G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)'])
>>> G.order()
120
>>> G.group_id()
[120, 34]
G = PermutationGroup(['(1,2,3)(4,5)', '(3,4)']) G.order() G.group_id()
Another example of using the small groups database: group_id
sage: gap_console()
┌───────┐ GAP 4.10.0 of 01-Nov-2018
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64
Configuration: gmp 6.0.0, readline
Loading the library and packages ...
Packages: GAPDoc 1.6.2, PrimGrp 3.3.2, SmallGrp 1.3, TransGrp 2.0.4
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> G:=Group((4,6,5)(7,8,9),(1,7,2,4,6,9,5,3));
Group([ (4,6,5)(7,8,9), (1,7,2,4,6,9,5,3) ])
gap> StructureDescription(G);
"(C3 x C3) : GL(2,3)"
>>> from sage.all import *
>>> gap_console()
┌───────┐ GAP 4.10.0 of 01-Nov-2018
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64
Configuration: gmp 6.0.0, readline
Loading the library and packages ...
Packages: GAPDoc 1.6.2, PrimGrp 3.3.2, SmallGrp 1.3, TransGrp 2.0.4
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> G:=Group((4,6,5)(7,8,9),(1,7,2,4,6,9,5,3));
Group([ (4,6,5)(7,8,9), (1,7,2,4,6,9,5,3) ])
gap> StructureDescription(G);
"(C3 x C3) : GL(2,3)"
gap_console()
Construction instructions for every group of order less than 32¶
AUTHORS:
Davis Shurbert
Every group of order less than 32 is implemented in Sage as a permutation group. They can all be created easily. We will first show how to build direct products and semidirect products, then give the commands necessary to build all of these small groups.
Let G1
, G2
, …, Gn
be permutation groups already initialized in
Sage. The following command can be used to take their direct product (where,
of course, the ellipses are simply being used here as a notation, and you
actually must enter every factor in your desired product explicitly).
sage: G = direct_product_permgroups([G1, G2, ..., Gn])
>>> from sage.all import *
>>> G = direct_product_permgroups([G1, G2, Ellipsis, Gn])
G = direct_product_permgroups([G1, G2, ..., Gn])
The semidirect product operation can be thought of as a generalization of the
direct product operation. Given two groups,
The output is not the group explicitly described in the definition of the
operation, but rather an isomorphic group of permutations. In the routine
below, assume H
and K
already have been defined and initialized in
Sage. Also, phi
is a list containing two sublists that define the
underlying homomorphism by giving the images of a set of generators of H
.
For each semidirect product in the table below we will show you how to build
phi
, then assume you have read this passage and understand how to go
from there.
sage: G = H.semidirect_product(K, phi)
>>> from sage.all import *
>>> G = H.semidirect_product(K, phi)
G = H.semidirect_product(K, phi)
To avoid unnecessary repetition, we will now give commands that one can use to
create the cyclic group of order
sage: G = CyclicPermutationGroup(n)
sage: G = DihedralGroup(n)
>>> from sage.all import *
>>> G = CyclicPermutationGroup(n)
>>> G = DihedralGroup(n)
G = CyclicPermutationGroup(n) G = DihedralGroup(n)
Note that exponential notation will be used for the direct product operation.
For example,
Order |
Group Description |
Command(s) |
GAP ID |
---|---|---|---|
1 |
The Trivial Group |
sage: G = SymmetricGroup(1)
>>> from sage.all import *
>>> G = SymmetricGroup(Integer(1))
G = SymmetricGroup(1) |
[1,1] |
2 |
sage: G = SymmetricGroup(2)
>>> from sage.all import *
>>> G = SymmetricGroup(Integer(2))
G = SymmetricGroup(2) |
[2,1] |
|
3 |
sage: G = CyclicPermutationGroup(3)
>>> from sage.all import *
>>> G = CyclicPermutationGroup(Integer(3))
G = CyclicPermutationGroup(3) |
[3,1] |
|
4 |
[4,1] |
||
4 |
sage: G = KleinFourGroup()
>>> from sage.all import *
>>> G = KleinFourGroup()
G = KleinFourGroup() |
[4,2] |
|
5 |
[5,1] |
||
6 |
[6,2] |
||
6 |
sage: G = SymmetricGroup(3)
>>> from sage.all import *
>>> G = SymmetricGroup(Integer(3))
G = SymmetricGroup(3) |
[6,1] |
|
7 |
[7,1] |
||
8 |
[8,1] |
||
8 |
[8,2] |
||
8 |
[8,5] |
||
8 |
sage: G = DihedralGroup(4)
>>> from sage.all import *
>>> G = DihedralGroup(Integer(4))
G = DihedralGroup(4) |
[8,3] |
|
8 |
The Quaternion Group (Q) |
sage: G = QuaternionGroup()
>>> from sage.all import *
>>> G = QuaternionGroup()
G = QuaternionGroup() |
[8,4] |
9 |
[9,1] |
||
9 |
[9,2] |
||
10 |
[10,2] |
||
10 |
[10,1] |
||
11 |
[11,1] |
||
12 |
[12,2] |
||
12 |
[12,5] |
||
12 |
[12,4] |
||
12 |
sage: G = AlternatingGroup(4)
>>> from sage.all import *
>>> G = AlternatingGroup(Integer(4))
G = AlternatingGroup(4) |
[12,3] |
|
12 |
sage: G = DiCyclicGroup(3)
>>> from sage.all import *
>>> G = DiCyclicGroup(Integer(3))
G = DiCyclicGroup(3) |
[12,1] |
|
13 |
[13,1] |
||
14 |
[14,2] |
||
14 |
[14,1] |
||
15 |
[15,1] |
||
16 |
[16,1] |
||
16 |
[16,5] |
||
16 |
[16,2] |
||
16 |
[16,10] |
||
16 |
[16,14] |
||
16 |
[16,11] |
||
16 |
[16,12] |
||
16 |
[16,7] |
||
16 |
sage: G = DiCyclicGroup(4)
>>> from sage.all import *
>>> G = DiCyclicGroup(Integer(4))
G = DiCyclicGroup(4) |
[16,9] |
|
16 |
Semidihedral Group of order |
sage: G = SemidihedralGroup(4)
>>> from sage.all import *
>>> G = SemidihedralGroup(Integer(4))
G = SemidihedralGroup(4) |
[16,8] |
16 |
Split Metacyclic Group of order |
sage: G = SplitMetacyclicGroup(2,4)
>>> from sage.all import *
>>> G = SplitMetacyclicGroup(Integer(2),Integer(4))
G = SplitMetacyclicGroup(2,4) |
[16,6] |
16 |
sage: C2 = SymmetricGroup(2); C4 = CyclicPermutationGroup(4)
sage: A = direct_product_permgroups([C2,C4])
sage: alpha = PermutationGroupMorphism(A,A,[A.gens()[0],A.gens()[0]^2*A.gens()[1]])
sage: phi = [[(1,2)],[alpha]]
>>> from sage.all import *
>>> C2 = SymmetricGroup(Integer(2)); C4 = CyclicPermutationGroup(Integer(4))
>>> A = direct_product_permgroups([C2,C4])
>>> alpha = PermutationGroupMorphism(A,A,[A.gens()[Integer(0)],A.gens()[Integer(0)]**Integer(2)*A.gens()[Integer(1)]])
>>> phi = [[(Integer(1),Integer(2))],[alpha]]
C2 = SymmetricGroup(2); C4 = CyclicPermutationGroup(4) A = direct_product_permgroups([C2,C4]) alpha = PermutationGroupMorphism(A,A,[A.gens()[0],A.gens()[0]^2*A.gens()[1]]) phi = [[(1,2)],[alpha]] |
[16,13] |
|
16 |
sage: C2 = SymmetricGroup(2); C4 = CyclicPermutationGroup(4)
sage: A = direct_product_permgroups([C2,C4])
sage: alpha = PermutationGroupMorphism(A,A,[A.gens()[0]^3*A.gens()[1],A.gens()[1]])
sage: phi = [[(1,2)],[alpha]]
>>> from sage.all import *
>>> C2 = SymmetricGroup(Integer(2)); C4 = CyclicPermutationGroup(Integer(4))
>>> A = direct_product_permgroups([C2,C4])
>>> alpha = PermutationGroupMorphism(A,A,[A.gens()[Integer(0)]**Integer(3)*A.gens()[Integer(1)],A.gens()[Integer(1)]])
>>> phi = [[(Integer(1),Integer(2))],[alpha]]
C2 = SymmetricGroup(2); C4 = CyclicPermutationGroup(4) A = direct_product_permgroups([C2,C4]) alpha = PermutationGroupMorphism(A,A,[A.gens()[0]^3*A.gens()[1],A.gens()[1]]) phi = [[(1,2)],[alpha]] |
[16,3] |
|
16 |
sage: C4 = CyclicPermutationGroup(4)
sage: alpha = PermutationGroupMorphism(C4,C4,[C4.gen().inverse()])
sage: phi = [[(1,2,3,4)],[alpha]]
>>> from sage.all import *
>>> C4 = CyclicPermutationGroup(Integer(4))
>>> alpha = PermutationGroupMorphism(C4,C4,[C4.gen().inverse()])
>>> phi = [[(Integer(1),Integer(2),Integer(3),Integer(4))],[alpha]]
C4 = CyclicPermutationGroup(4) alpha = PermutationGroupMorphism(C4,C4,[C4.gen().inverse()]) phi = [[(1,2,3,4)],[alpha]] |
[16,4] |
|
17 |
[17,1] |
||
18 |
[18,2] |
||
18 |
[18,5] |
||
18 |
[18,1] |
||
18 |
[18,3] |
||
18 |
sage: G = GeneralDihedralGroup([3,3])
>>> from sage.all import *
>>> G = GeneralDihedralGroup([Integer(3),Integer(3)])
G = GeneralDihedralGroup([3,3]) |
[18,4] |
|
19 |
[19,1] |
||
20 |
[20,2] |
||
20 |
[20,5] |
||
20 |
[20,4] |
||
20 |
[20,1] |
||
20 |
sage: C5 = CyclicPermutationGroup(5)
sage: G = C5.holomorph()
>>> from sage.all import *
>>> C5 = CyclicPermutationGroup(Integer(5))
>>> G = C5.holomorph()
C5 = CyclicPermutationGroup(5) G = C5.holomorph() |
[20,3] |
|
21 |
[21,2] |
||
21 |
sage: C7 = CyclicPermutationGroup(7)
sage: alpha = PermutationGroupMorphism(C7,C7,[C7.gen()**4])
sage: phi = [[(1,2,3)],[alpha]]
>>> from sage.all import *
>>> C7 = CyclicPermutationGroup(Integer(7))
>>> alpha = PermutationGroupMorphism(C7,C7,[C7.gen()**Integer(4)])
>>> phi = [[(Integer(1),Integer(2),Integer(3))],[alpha]]
C7 = CyclicPermutationGroup(7) alpha = PermutationGroupMorphism(C7,C7,[C7.gen()**4]) phi = [[(1,2,3)],[alpha]] |
[21,1] |
|
22 |
[22,2] |
||
22 |
[22,1] |
||
23 |
[23,1] |
||
24 |
[24,2] |
||
24 |
[24,6] |
||
24 |
[24,4] |
||
24 |
[24,9] |
||
24 |
[24,15] |
||
24 |
sage: G = SymmetricGroup(4)
>>> from sage.all import *
>>> G = SymmetricGroup(Integer(4))
G = SymmetricGroup(4) |
[24,12] |
|
24 |
[24,5] |
||
24 |
[24,14] |
||
24 |
[24,10] |
||
24 |
[24,11] |
||
24 |
[24,13] |
||
24 |
[24,7] |
||
24 |
sage: Q = QuaternionGroup()
sage: alpha = PermutationGroupMorphism(Q,Q,[Q.gens()[0]*Q.gens()[1],Q.gens()[0].inverse()])
sage: phi = [[(1,2,3)],[alpha]]
>>> from sage.all import *
>>> Q = QuaternionGroup()
>>> alpha = PermutationGroupMorphism(Q,Q,[Q.gens()[Integer(0)]*Q.gens()[Integer(1)],Q.gens()[Integer(0)].inverse()])
>>> phi = [[(Integer(1),Integer(2),Integer(3))],[alpha]]
Q = QuaternionGroup() alpha = PermutationGroupMorphism(Q,Q,[Q.gens()[0]*Q.gens()[1],Q.gens()[0].inverse()]) phi = [[(1,2,3)],[alpha]] |
[24,3] |
|
24 |
sage: C3 = CyclicPermutationGroup(3)
sage: alpha = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()])
sage: phi = [[(1,2,3,4,5,6,7,8)],[alpha]]
>>> from sage.all import *
>>> C3 = CyclicPermutationGroup(Integer(3))
>>> alpha = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()])
>>> phi = [[(Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6),Integer(7),Integer(8))],[alpha]]
C3 = CyclicPermutationGroup(3) alpha = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()]) phi = [[(1,2,3,4,5,6,7,8)],[alpha]] |
[24,1] |
|
24 |
sage: C3 = CyclicPermutationGroup(3)
sage: alpha1 = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()])
sage: alpha2 = PermutationGroupMorphism(C3,C3,[C3.gen()])
sage: phi = [[(1,2,3,4),(1,3)],[alpha1,alpha2]]
>>> from sage.all import *
>>> C3 = CyclicPermutationGroup(Integer(3))
>>> alpha1 = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()])
>>> alpha2 = PermutationGroupMorphism(C3,C3,[C3.gen()])
>>> phi = [[(Integer(1),Integer(2),Integer(3),Integer(4)),(Integer(1),Integer(3))],[alpha1,alpha2]]
C3 = CyclicPermutationGroup(3) alpha1 = PermutationGroupMorphism(C3,C3,[C3.gen().inverse()]) alpha2 = PermutationGroupMorphism(C3,C3,[C3.gen()]) phi = [[(1,2,3,4),(1,3)],[alpha1,alpha2]] |
[24,8] |
|
25 |
[25,1] |
||
25 |
[25,2] |
||
26 |
[26,2] |
||
26 |
[26,1] |
||
27 |
[27,1] |
||
27 |
[27,2] |
||
27 |
[27,5] |
||
27 |
Split Metacyclic Group of order |
sage: G = SplitMetacyclicGroup(3,3)
>>> from sage.all import *
>>> G = SplitMetacyclicGroup(Integer(3),Integer(3))
G = SplitMetacyclicGroup(3,3) |
[27,4] |
27 |
sage: C3 = CyclicPermutationGroup(3)
sage: A = direct_product_permgroups([C3,C3])
sage: alpha = PermutationGroupMorphism(A,A,[A.gens()[0]*A.gens()[1].inverse(),A.gens()[1]])
sage: phi = [[(1,2,3)],[alpha]]
>>> from sage.all import *
>>> C3 = CyclicPermutationGroup(Integer(3))
>>> A = direct_product_permgroups([C3,C3])
>>> alpha = PermutationGroupMorphism(A,A,[A.gens()[Integer(0)]*A.gens()[Integer(1)].inverse(),A.gens()[Integer(1)]])
>>> phi = [[(Integer(1),Integer(2),Integer(3))],[alpha]]
C3 = CyclicPermutationGroup(3) A = direct_product_permgroups([C3,C3]) alpha = PermutationGroupMorphism(A,A,[A.gens()[0]*A.gens()[1].inverse(),A.gens()[1]]) phi = [[(1,2,3)],[alpha]] |
[27,3] |
|
28 |
[28,2] |
||
28 |
[28,4] |
||
28 |
[28,3] |
||
28 |
[28,1] |
||
29 |
[29,1] |
||
30 |
[30,4] |
||
30 |
[30,3] |
||
30 |
[30,2] |
||
30 |
[30,1] |
||
31 |
[31,1] |
Table By Kevin Halasz
Construction instructions for every finitely presented group of order 15 or less¶
Sage has the capability to easily construct every group of order 15 or less as a finitely presented group. We will begin with some discussion on creating finitely generated abelian groups, as well as direct and semidirect products of finitely presented groups.
All finitely generated abelian groups can be created using the
groups.presentation.FGAbelian(ls)
command, where ls
is a list of
non-negative integers which gets reduced to invariants defining the group
to be returned. For example, to construct
sage: A = groups.presentation.FGAbelian([4,2,2,2])
>>> from sage.all import *
>>> A = groups.presentation.FGAbelian([Integer(4),Integer(2),Integer(2),Integer(2)])
A = groups.presentation.FGAbelian([4,2,2,2])
The output for a given group is the same regardless of the input list of integers. The following example yields identical presentations for the cyclic group of order 30.
sage: A = groups.presentation.FGAbelian([2,3,5])
sage: B = groups.presentation.FGAbelian([30])
>>> from sage.all import *
>>> A = groups.presentation.FGAbelian([Integer(2),Integer(3),Integer(5)])
>>> B = groups.presentation.FGAbelian([Integer(30)])
A = groups.presentation.FGAbelian([2,3,5]) B = groups.presentation.FGAbelian([30])
If G
and H
are finitely presented groups, we can use the following
code to create the direct product of G
and H
,
sage: D = G.direct_product(H)
>>> from sage.all import *
>>> D = G.direct_product(H)
D = G.direct_product(H)
Suppose there exists a homomorphism
sage: C2 = groups.presentation.Cyclic(2)
sage: C8 = groups.presentation.Cyclic(8)
sage: hom = (C2.gens(), [ ([C8([1])], [C8([-1])]) ])
sage: D = C2.semidirect_product(C8, hom)
>>> from sage.all import *
>>> C2 = groups.presentation.Cyclic(Integer(2))
>>> C8 = groups.presentation.Cyclic(Integer(8))
>>> hom = (C2.gens(), [ ([C8([Integer(1)])], [C8([-Integer(1)])]) ])
>>> D = C2.semidirect_product(C8, hom)
C2 = groups.presentation.Cyclic(2) C8 = groups.presentation.Cyclic(8) hom = (C2.gens(), [ ([C8([1])], [C8([-1])]) ]) D = C2.semidirect_product(C8, hom)
The following table shows the groups of order 15 or less, and how to construct them in Sage. Repeated commands have been omitted but instead are described by the following examples.
The cyclic group of order
sage: C = groups.presentation.Cyclic(n)
>>> from sage.all import *
>>> C = groups.presentation.Cyclic(n)
C = groups.presentation.Cyclic(n)
Similarly for the dihedral group of order
sage: D = groups.presentation.Dihedral(n)
>>> from sage.all import *
>>> D = groups.presentation.Dihedral(n)
D = groups.presentation.Dihedral(n)
This table was modeled after the preceding table created by Kevin Halasz.
Order |
Group Description |
Command(s) |
GAP ID |
---|---|---|---|
1 |
The Trivial Group |
sage: G = groups.presentation.Symmetric(1)
>>> from sage.all import *
>>> G = groups.presentation.Symmetric(Integer(1))
G = groups.presentation.Symmetric(1) |
[1,1] |
2 |
sage: G = groups.presentation.Symmetric(2)
>>> from sage.all import *
>>> G = groups.presentation.Symmetric(Integer(2))
G = groups.presentation.Symmetric(2) |
[2,1] |
|
3 |
sage: G = groups.presentation.Cyclic(3)
>>> from sage.all import *
>>> G = groups.presentation.Cyclic(Integer(3))
G = groups.presentation.Cyclic(3) |
[3,1] |
|
4 |
[4,1] |
||
4 |
sage: G = groups.presentation.Klein()
>>> from sage.all import *
>>> G = groups.presentation.Klein()
G = groups.presentation.Klein() |
[4,2] |
|
5 |
[5,1] |
||
6 |
[6,2] |
||
6 |
sage: G = groups.presentation.Symmetric(3)
>>> from sage.all import *
>>> G = groups.presentation.Symmetric(Integer(3))
G = groups.presentation.Symmetric(3) |
[6,1] |
|
7 |
[7,1] |
||
8 |
[8,1] |
||
8 |
sage: G = groups.presentation.FGAbelian([4,2])
>>> from sage.all import *
>>> G = groups.presentation.FGAbelian([Integer(4),Integer(2)])
G = groups.presentation.FGAbelian([4,2]) |
[8,2] |
|
8 |
sage: G = groups.presentation.FGAbelian([2,2,2])
>>> from sage.all import *
>>> G = groups.presentation.FGAbelian([Integer(2),Integer(2),Integer(2)])
G = groups.presentation.FGAbelian([2,2,2]) |
[8,5] |
|
8 |
sage: G = groups.presentation.Dihedral(4)
>>> from sage.all import *
>>> G = groups.presentation.Dihedral(Integer(4))
G = groups.presentation.Dihedral(4) |
[8,3] |
|
8 |
The Quaternion Group (Q) |
sage: G = groups.presentation.Quaternion()
>>> from sage.all import *
>>> G = groups.presentation.Quaternion()
G = groups.presentation.Quaternion() |
[8,4] |
9 |
[9,1] |
||
9 |
[9,2] |
||
10 |
[10,2] |
||
10 |
[10,1] |
||
11 |
[11,1] |
||
12 |
[12,2] |
||
12 |
[12,5] |
||
12 |
[12,4] |
||
12 |
sage: G = groups.presentation.Alternating(4)
>>> from sage.all import *
>>> G = groups.presentation.Alternating(Integer(4))
G = groups.presentation.Alternating(4) |
[12,3] |
|
12 |
sage: G = groups.presentation.DiCyclic(3)
>>> from sage.all import *
>>> G = groups.presentation.DiCyclic(Integer(3))
G = groups.presentation.DiCyclic(3) |
[12,1] |
|
13 |
[13,1] |
||
14 |
[14,2] |
||
14 |
[14,1] |
||
15 |
[15,1] |