GAP Lesson 3
Change to the directory where you store your GAP files, and then start up GAP.
The last command is there because the function KnownPropertiesOfObject has a long name and it is inconvenient to keep typing it. It shows that a function can be assigned to a variable. There is also KnownPropertiesOfObject but it does something different.
Some manipulation with permutation groups.
We start by entering a group. Every so often we will check what GAP knows about the group by doing the command At. The first lines are to show you how to access the generators of the group.
Comment on anything you notice.
We now learn: Orbits, Action, Tuples, UnorderedTuples, Arrangements, Combinations.
Make sure you understand what Action is doing. What kind of data type does this command return? Obtaining a group as a permutation group on a smaller set than originally given can be quite useful. Comment on anything weird that happened.
How would things be different if you had done instead
What do you think would happen if you were to do
Now try the following:
Most of the above were straightforward. Explain what Arrangements seems to do.
Exercise: Find out what GAP command returns a list of all partitions of [1,2,3].
Other possibilities in Action instead of OnTuples: OnPairs, OnTuples, OnSets, OnRight, OnLeft. Investigate by doing ?Actions.
The following is very useful.
We use these commands to show computationally that SL(2,4) is isomorphic to the alternating group A_5. We first call up SL(2,4) from a library of matrix groups. We will learn about matrix groups in just a moment.
Exercise: Show that the group
is isomorphic to the symmetric group S_4.
Matrices, Finite Fields and Matrix Groups
We learn: vectors are lists, matrices are lists of lists, they can be manipulated the same way as integers, the functions BaseMat, TransposedMat, NullspaceMat, RankMat, TriangulizeMat, PrintArray, the library of matrix groups; how finite field elements are represented and manipulated; computations with matrix groups are mostly done by finding a permutation representation first.
With the calculations using SL(2,4) we have already seen that GAP can compute with matrix groups, and that some of the same commands for permutation groups also work in this context. Let us examine this group a little more.
We set about trying to get GAP to print out what these matrices really are.
You can see that matrices are lists of lists and that the field with 4 elements appears to be stored in a funny way.
gap> Z(4) in GF(16);
gap> Z(4) in GF(8);
From these calculations, describe how finite field elements are stored, and why the last two commands gave the results you got.
Exercise: Find the power of Z(16) that equals Z(4).
We next see how to display elements of the prime field in a user-friendly fashion.
Using the function Int we now write a function which prints out (some) matrices nicely.
function( mat ) ... end
The following lines illustrate some standard matrix operations.
Algorithms for permutation groups generally work much faster than algorithms for matrix groups. Because of this, one of the first things frequently done with a matrix group is to convert it to a permutation group. We now see some ways to do this.
gap> gcopy:=Action(g, last);
The latter may be created by doing the next two lines:
Group([ (5,7)(6,8), (2,3,5)(4,7,6) ])