GAP:SymmetricGroup

Function type
This function takes as input either a nonegative integer or a list of nonnegative integers and outputs a group. An optional filter may be provided.

Related functions

 * CyclicGroup
 * AlternatingGroup
 * DihedralGroup

Single command examples
gap> G := SymmetricGroup(0); Sym( [ ] ) gap> H := SymmetricGroup(1); Sym( [ ] ) gap> Order(SymmetricGroup([2,3,5,9])); 24 gap> SymmetricGroup(4); Sym( [ 1 .. 4 ] ) gap> SymmetricGroup(['a']); Sym( [ ] ) gap> SymmetricGroup([-1]); Sym( [ ] ) gap> SymmetricGroup(IsPcGroup,4);  gap> IdGroup(SymmetricGroup(5)); [ 120, 34 ]

Below is an explanation:

Typical command sequences using this function
gap> K := SymmetricGroup(2); Sym( [ 1 .. 2 ] ) gap> L := SymmetricGroup([1,2]); Sym( [ 1 .. 2 ] ) gap> M := SymmetricGroup([1,3]); Sym( [ 1, 3 .. 3 ] ) gap> K = L; true gap> K = M; false gap> L = M; false

Below is an explanation:

Error message examples
gap> SymmetricGroup(IsPcGroup,5); Error, must be at most 4 called from SymmetricGroupCons( arg[1], arg[2] ) called from called from read-eval-loop Entering break read-eval-print loop ... you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> quit; gap> P := SymmetricGroup([rabbit]); Variable: 'rabbit' must have a value gap> Q := SymmetricGroup([1,-1]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `INV' on 1 arguments called from InverseOp( elm ) called from LeftQuotient( PermList( src ), PermList( dst ) ) called from MappingPermListList( dom, Concatenation( dom{[ 2 .. Length( dom ) ]}, [ dom[1] ] ) ) called from SymmetricGroupCons( IsPermGroup, arg[1] ) called from called from read-eval-loop Entering break read-eval-print loop ... you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> quit; gap> Q := SymmetricGroup(-1); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 3rd choice method found for `SymmetricGroupCons' on 2 arguments called from SymmetricGroupCons( IsPermGroup, arg[1] ) called from Error( no_method_found ); called from InverseOp( elm ) called from LeftQuotient( PermList( src ), PermList( dst ) ) called from MappingPermListList( dom, Concatenation( dom{[ 2 .. Length( dom ) ]}, [ dom[1] ] ) ) called from ... Entering break read-eval-print loop ... you can 'quit;' to quit to outer loop, or you can 'return;' to continue