To start GAP, type 'gap' on the command line. For help, type '?' within GAP. You can preface a command with a '?' to bring up a help page about it. For instance, '?Group' brings up the help page for the 'Group' command. Help pages will also give examples. Try '?tutorial' if you'd like a tutorial. If the help page is a list of references, then '?1' will will bring up the first one, etc. Otherwise, '?' will work. To quickly type out commands, and to look for other commands, GAP offers tab completion. Just type out part of the word and press the TAB key. GAP will either complete the command out, complete it as much as possible before become non-unique, or give you a list of possible completions if it cannot complete it further. gap> Double DoubleCentralizerOrbit DoubleCoset DoubleCosetRepsAndSizes DoubleCosets DoubleCosetsNC DoubleCosetsPcGroup DoubleHashArraySize DoubleHashDictSize gap> Double gap> 2+2; 4 gap> # cycles: acting on a set, multiplicaion, and conjugation gap> 1^(1,2,3,4); 2 gap> (1,2,3,4) * (1,3,4,2); (2,4,3) gap> (1,2,3,4)^(1,3,4,2); (1,4,2,3) gap> # lists can be written in two ways gap> [1,2,3,4,5,6]; [ 1, 2, 3, 4, 5, 6 ] gap> [1..6]; [ 1 .. 6 ] gap> # advanced list and conjugation use, conjugate each element gap> List( [1,2], x -> x^(1,2,3,4) ); [ 2, 3 ] gap> # permutation group (on [1..6]) & various properties gap> G := Group( (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6)); Group([ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ]) gap> Order(G); 48 gap> Orbits(G, [1..11]); [ [ 1, 5, 2, 4, 6, 3 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ] ] gap> IsTransitive(G); true gap> IsPrimitive(G); false gap> RankAction(G); 3 gap> # verify the rank via the number of suborbits and orbitals gap> S := Stabilizer(G, 1); Group([ (3,6)(4,5), (3,4), (5,6) ]) gap> Orbits(S,[1..6]); [ [ 1 ], [ 2 ], [ 3, 5, 6, 4 ] ] gap> Number(Orbits(S,[1..6])); 3 gap> Orbits(G, Tuples([1..6],2), OnTuples); [ [ [ 1, 1 ], [ 2, 2 ], [ 5, 5 ], [ 6, 6 ], [ 4, 4 ], [ 3, 3 ] ], [ [ 1, 2 ], [ 2, 1 ], [ 5, 6 ], [ 6, 5 ], [ 4, 3 ], [ 3, 4 ] ], [ [ 1, 3 ], [ 2, 3 ], [ 1, 4 ], [ 2, 4 ], [ 5, 2 ], [ 6, 2 ], [ 5, 1 ], [ 6, 1 ], [ 4, 6 ], [ 3, 6 ], [ 4, 5 ], [ 3, 5 ], [ 1, 6 ], [ 2, 6 ], [ 1, 5 ], [ 2, 5 ], [ 4, 2 ], [ 3, 2 ], [ 4, 1 ], [ 3, 1 ], [ 5, 3 ], [ 6, 3 ], [ 5, 4 ], [ 6, 4 ] ] ] gap> Number(Orbits(G, Tuples([1..6],2), OnTuples)); 3 gap> Random(G); (1,4,2,3)(5,6) gap> Random(G); (1,2)(3,6,4,5) gap> Random(G); (1,2)(5,6) gap> # consider Sym(6) acting on the cosets of G as a group gap> Index( SymmetricGroup(6), G); 15 gap> perms := CosetTableBySubgroup( SymmetricGroup(6), G ); [ [ 2, 1, 4, 6, 3, 10, 9, 5, 12, 8, 13, 7, 14, 11, 15 ], [ 2, 1, 5, 3, 8, 4, 12, 10, 7, 6, 14, 9, 11, 13, 15 ], [ 1, 3, 2, 7, 9, 11, 4, 13, 5, 10, 6, 12, 8, 15, 14 ], [ 1, 3, 2, 7, 9, 11, 4, 13, 5, 10, 6, 12, 8, 15, 14 ] ] gap> List(perms, PermList); [ (1,2)(3,4,6,10,8,5)(7,9,12)(11,13,14), (1,2)(3,5,8,10,6,4)(7,12,9)(11,14,13), (2,3)(4,7)(5,9)(6,11)(8,13)(14,15), (2,3)(4,7)(5,9)(6,11)(8,13)(14,15) ] gap> Order(Group(List(perms, PermList))); 720 gap> DoubleCosets(SymmetricGroup(6),G,G); [ DoubleCoset(Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] ),(),Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] )), DoubleCoset(Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] ), ( 4, 5),Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] )), DoubleCoset(Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] ), ( 2, 3)( 4, 5),Group( [ (1,2), (3,4), (5,6), (1,3,2,4), (1,5,2,6), (3,5,4,6) ] )) ] gap> # programming example gap> for elts in G do > Print( elts , Order(elts), "\n"); > od; ()1 (5,6)2 (3,4)2 (3,4)(5,6)2 (3,5)(4,6)2 (3,5,4,6)4 (3,6,4,5)4 (3,6)(4,5)2 (1,2)2 (1,2)(5,6)2 (1,2)(3,4)2 (1,2)(3,4)(5,6)2 (1,2)(3,5)(4,6)2 (1,2)(3,5,4,6)4 (1,2)(3,6,4,5)4 (1,2)(3,6)(4,5)2 (1,3)(2,4)2 (1,3)(2,4)(5,6)2 (1,3,2,4)4 (1,3,2,4)(5,6)4 (1,3,5)(2,4,6)3 (1,3,5,2,4,6)6 (1,3,6,2,4,5)6 (1,3,6)(2,4,5)3 (1,4,2,3)4 (1,4,2,3)(5,6)4 (1,4)(2,3)2 (1,4)(2,3)(5,6)2 (1,4,6,2,3,5)6 (1,4,6)(2,3,5)3 (1,4,5)(2,3,6)3 (1,4,5,2,3,6)6 (1,5,3)(2,6,4)3 (1,5,4,2,6,3)6 (1,5,3,2,6,4)6 (1,5,4)(2,6,3)3 (1,5)(2,6)2 (1,5,2,6)4 (1,5)(2,6)(3,4)2 (1,5,2,6)(3,4)4 (1,6,4,2,5,3)6 (1,6,3)(2,5,4)3 (1,6,4)(2,5,3)3 (1,6,3,2,5,4)6 (1,6,2,5)4 (1,6)(2,5)2 (1,6,2,5)(3,4)4 (1,6)(2,5)(3,4)2 gap> for elts in G do > Print( elts ,"\t", Order(elts), "\n"); > od; () 1 (5,6) 2 (3,4) 2 (3,4)(5,6) 2 (3,5)(4,6) 2 (3,5,4,6) 4 (3,6,4,5) 4 (3,6)(4,5) 2 (1,2) 2 (1,2)(5,6) 2 (1,2)(3,4) 2 (1,2)(3,4)(5,6) 2 (1,2)(3,5)(4,6) 2 (1,2)(3,5,4,6) 4 (1,2)(3,6,4,5) 4 (1,2)(3,6)(4,5) 2 (1,3)(2,4) 2 (1,3)(2,4)(5,6) 2 (1,3,2,4) 4 (1,3,2,4)(5,6) 4 (1,3,5)(2,4,6) 3 (1,3,5,2,4,6) 6 (1,3,6,2,4,5) 6 (1,3,6)(2,4,5) 3 (1,4,2,3) 4 (1,4,2,3)(5,6) 4 (1,4)(2,3) 2 (1,4)(2,3)(5,6) 2 (1,4,6,2,3,5) 6 (1,4,6)(2,3,5) 3 (1,4,5)(2,3,6) 3 (1,4,5,2,3,6) 6 (1,5,3)(2,6,4) 3 (1,5,4,2,6,3) 6 (1,5,3,2,6,4) 6 (1,5,4)(2,6,3) 3 (1,5)(2,6) 2 (1,5,2,6) 4 (1,5)(2,6)(3,4) 2 (1,5,2,6)(3,4) 4 (1,6,4,2,5,3) 6 (1,6,3)(2,5,4) 3 (1,6,4)(2,5,3) 3 (1,6,3,2,5,4) 6 (1,6,2,5) 4 (1,6)(2,5) 2 (1,6,2,5)(3,4) 4 (1,6)(2,5)(3,4) 2 gap> Random(G); (1,4)(2,3)(5,6) gap> Random(G); (1,6,4)(2,5,3) gap> gap> # Example for finding empirically fining how many permutations are fpf gap> gap> Read("gap/FixedPointFree.gap"); gap> IsFixedPointFree( [1..4], (1,2)(3,4) ); true gap> IsFixedPointFree( [1..4], (1,2)(3,5) ); false gap> IsFixedPointFree( [1..4], (1,2,3) ); false gap> for N in [1..12] do > SymmetricFPF_Percent(N); > od; Sym(1): 0 in 1000 randomly selected. Sym(2): 525 in 1000 randomly selected. Sym(3): 331 in 1000 randomly selected. Sym(4): 335 in 1000 randomly selected. Sym(5): 369 in 1000 randomly selected. Sym(6): 360 in 1000 randomly selected. Sym(7): 384 in 1000 randomly selected. Sym(8): 363 in 1000 randomly selected. Sym(9): 359 in 1000 randomly selected. Sym(10): 353 in 1000 randomly selected. Sym(11): 371 in 1000 randomly selected. Sym(12): 330 in 1000 randomly selected. gap> SymmetricFPF_Percent(20); Sym(20): 353 in 1000 randomly selected. gap> SymmetricFPF_Percent(20); Sym(20): 372 in 1000 randomly selected. gap> SymmetricFPF_Percent(100); Sym(100): 390 in 1000 randomly selected.