# 37.5 The Primitive Groups Library

This group library contains all primitive permutation groups of degree at most 50. There are a total of 406 such groups. Actually to be a little bit more precise, there are 406 inequivalent primitive operations on at most 50 points. Quite a few of the 406 groups are isomorphic.

`AllPrimitiveGroups( fun1, val1, fun2, val2, ... )`

`AllPrimitiveGroups` returns a list containing all primitive groups that have the properties given as arguments. Each property is specified by passing a pair of arguments, the first being a function, which will be applied to all groups in the library, and the second being a value or a list of values, that this function must return in order to have this group included in the list returned by `AllPrimitiveGroups`.

The first argument must be `DegreeOperation` and the second argument either a degree or a list of degrees, otherwise `AllPrimitiveGroups` will print a warning to the effect that the library contains only groups with degrees between 1 and 50.

```    gap> l := AllPrimitiveGroups( Size, 120, IsSimple, false );
#W  AllPrimitiveGroups: degree automatically restricted to [1..50]
[ S(5), PGL(2,5), S(5) ]
gap> List( l, g -> g.generators );
[ [ (1,2,3,4,5), (1,2) ], [ (1,2,3,4,5), (2,3,5,4), (1,6)(3,4) ],
[ ( 1, 8)( 2, 5, 6, 3)( 4, 9, 7,10), ( 1, 5, 7)( 2, 9, 4)( 3, 8,10)
] ] ```

`OnePrimitiveGroup( fun1, val1, fun2, val2, ... )`

`OnePrimitiveGroup` returns one primitive group that has the properties given as argument. Each property is specified by passing a pair of arguments, the first being a function, which will be applied to all groups in the library, and the second being a value or a list of values, that this function must return in order to have this group returned by `OnePrimitiveGroup`. If no such group exists, `false` is returned.

The first argument must be `DegreeOperation` and the second argument either a degree or a list of degrees, otherwise `OnePrimitiveGroup` will print a warning to the effect that the library contains only groups with degrees between 1 and 50.

```    gap> g := OnePrimitiveGroup( DegreeOperation,5, IsSolvable,false );
A(5)
gap> Size( g );
60 ```

`AllPrimitiveGroups` and `OnePrimitiveGroup` recognize the following functions and handle them usually quite efficient. `DegreeOperation`, `Size`, `Transitivity`, and `IsSimple`. You should pass those functions first, e.g., it is more efficient to say ```AllPrimitiveGroups( Size,120 , IsAbelian,false )``` than to say ```AllPrimitiveGroups( IsAbelian,false, Size,120 )``` (see About Group Libraries).

`PrimitiveGroup( deg, nr )`

`PrimitiveGroup` returns the nr-th primitive group of degree deg. Both deg and nr must be positive integers. The primitive groups of equal degree are sorted with respect to their size, so for example `PrimitiveGroup( deg, 1 )` is the smallest primitive group of degree deg, e.g, the cyclic group of size deg, if deg is a prime. Primitive groups of equal degree and size are in no particular order.

```    gap>  g := PrimitiveGroup( 8, 1 );
AGL(1,8)
gap> g.generators;
[ (1,2,3,4,5,6,7), (1,8)(2,4)(3,7)(5,6) ] ```

Apart from the usual components described in Group Records, the group records returned by the above functions have the following components.

`transitivity`:

degree of transitivity of G.

`isSharpTransitive`:

`true` if G is sharply `G.transitivity`-fold transitive and `false` otherwise.

`isKPrimitive`:

`true` if G is k-fold primitive, and `false` otherwise.

`isOdd`:

`false` if G is a subgroup of the alternating group of degree `G.degree` and `true` otherwise.

`isFrobeniusGroup`:

`true` if G is a Frobenius group indexFrobenius group and `false` otherwise.

This library was computed by Charles Sims. The list of primitive permutation groups of degree at most 20 was published in Sim70. The library was brought into GAP format by Martin Schaccent127onert. He assumes the responsibility for all mistakes.

GAP 3.4.4
April 1997