## GAP: Groups, Algorithms, Programming

• Entwickelt seit ca. 1985 in Aachen, Neubüser, Schönert, ++

• auf dem Weg nach St. Andrews

• leicht Portierbar: Unix, MSDOS, OS/2, MacOS, TOS

• Version 3.4.4, Version 4 in Arbeit

• Umfang:
Bibliotheken/Datenbasen mit bekannten Gruppen
Algorithmen und Darstellungen zur Berechnung von Gruppeneigenschaften
Programmiersprache zur Entwicklung eigener Algorithmen
Interaktiv Benutzbar

### Getting Started

• Start + Stop
• Permutationen, {1,2, ..., n } ---> {1,2, ..., n }
Zyklen Notation, cycle notation
```
1 2 3 4 5 6 7 8 9
im      2 3 4 1 6 7 8 9 5

cycl   (1,2,3,4)(5,6,7,8,9)
```
```
gap> im:=[2,3,4,1,6,7,8,9,5];
[ 2, 3, 4, 1, 6, 7, 8, 9, 5 ]

gap> e:=PermList(im);
(1,2,3,4)(5,6,7,8,9)
```
• Bild, Produkt, Konjugation
```
gap> SignPerm(e);
-1

gap> 4^e;
1

gap> f:=e*e;
(1,3)(2,4)(5,7,9,6,8)
```
```     gap> i:=1;
1

gap> repeat f:=e^i; Print("e^",i," = ",f,"\n");
i:=i+1; until f = ();

e^1 = (1,2,3,4)(5,6,7,8,9)
e^2 = (1,3)(2,4)(5,7,9,6,8)
e^3 = (1,4,3,2)(5,8,6,9,7)
e^4 = (5,9,8,7,6)
e^5 = (1,2,3,4)
e^6 = (1,3)(2,4)(5,6,7,8,9)
e^7 = (1,4,3,2)(5,7,9,6,8)
e^8 = (5,8,6,9,7)
e^9 = (1,2,3,4)(5,9,8,7,6)
e^10 = (1,3)(2,4)
e^11 = (1,4,3,2)(5,6,7,8,9)
e^12 = (5,7,9,6,8)
e^13 = (1,2,3,4)(5,8,6,9,7)
e^14 = (1,3)(2,4)(5,9,8,7,6)
e^15 = (1,4,3,2)
e^16 = (5,6,7,8,9)
e^17 = (1,2,3,4)(5,7,9,6,8)
e^18 = (1,3)(2,4)(5,8,6,9,7)
e^19 = (1,4,3,2)(5,9,8,7,6)
e^20 = ()
```
```     gap> while f <> () do f:=e^i; Print("e^",i," = ",f,"\n");
i:=i+1; od;

gap> for i in [1..20] do Print("e^",i," = ",e^i,"\n"); od;

gap> repeat Print("e^",i," = ",e^i,"\n");
i:=i+1; until e^i = ();

gap> Ordnung:=function(g)
> local i, f;
> f:=g; i:=1;
> while f <> () do i:=i+1; f:=f*g; od;
> return i;
> end;
function ( g ) ... end

gap> Ordnung(e);
20
```
```     gap> e^-1;
(1,4,3,2)(5,9,8,7,6)

gap> e^-1*f*e;
(1,3)(2,4)(5,7,9,6,8)

gap> f^e;
(1,3)(2,4)(5,7,9,6,8)
```
3 Bedeutungen von ^: n^g, g^n, g^f

• Hilfe
```     gap> ?Read

'Read' reads the input from the  file with the filename , which
must be a string.

'Read' first opens the file .   If the file  does not exist, or
if   GAP  can not open it, e.g., because of access restrictions, an error
is signalled.
...
```
```    gap> ?PrintTo

PrintTo _____________________________________________________ Environment

'PrintTo( , , ... )'

'PrintTo' works  like  'Print', except that  the output is printed to the
file with the name  instead of the  standard output.  This file
must of  course be writable by   GAP,   otherwise  an error is signalled.
Note that 'PrintTo' will overwrite the previous contents  of this file if
it  already existed.  'AppendTo' can be used  to append  to  a file  (see
"AppendTo").

...
```
```     repeat AppendTo("xxx", "e.",i," := ",e^i,";\n");
i:=i+1; until e^i = ();
```
```     gap> f:=rec();
rec(
)

gap> f;
rec(
1 := (1,2,3,4)(5,6,7,8,9),
2 := (1,3)(2,4)(5,7,9,6,8),
3 := (1,4,3,2)(5,8,6,9,7),
4 := (5,9,8,7,6),
5 := (1,2,3,4),
6 := (1,3)(2,4)(5,6,7,8,9),
7 := (1,4,3,2)(5,7,9,6,8),
8 := (5,8,6,9,7),
9 := (1,2,3,4)(5,9,8,7,6),
10 := (1,3)(2,4),
11 := (1,4,3,2)(5,6,7,8,9),
12 := (5,7,9,6,8),
13 := (1,2,3,4)(5,8,6,9,7),
14 := (1,3)(2,4)(5,9,8,7,6),
15 := (1,4,3,2),
16 := (5,6,7,8,9),
17 := (1,2,3,4)(5,7,9,6,8),
18 := (1,3)(2,4)(5,8,6,9,7),
19 := (1,4,3,2)(5,9,8,7,6),
20 := () )

gap> f.3;
(1,4,3,2)(5,8,6,9,7)
```
• HTML Manual