Mathematics

GAP: A System for Computational Discrete Algebra

GAP (Groups, Algorithms, Programming) is a program for computational discrete algebra, which is particularly useful for computational group theory. It is a text based computer system which includes a large number of functions that implement various algebraic algorithms. A vast number of these are with regards to groups, using the program you can find the group generated by certain elements, find subgroups (including Sylow subgroups) plus all manner of other things (including addition!).

I don’t want to go into details of how to use GAP, the documentation is fantastic. You can find the root of the files here. Here I want to briefly mention how to download and run GAP.

Note, if you want to use GAP to work with complex reflection groups then please skip down a bit, to the information on installing GAP version 3.

I will explain the installation process in Linux, but GAP works fine on Windows or Mac OS, click on either for the GAP Website instructions. If you are running Ubuntu then you can install GAP in one line, you just need to run in the terminal:

However, if you do not have GAP in your repos then you can install it by hand. First we need to download two packages, you can get these on the GAP download page, download gap4r4p12.tar.gz and packages-2011_01_28-12_18_UTC.tar.gz or you can download them straight from a terminal:

You now need to extract the files in the usual way, to any particular directory you want. Now copy the packages folder into the gap4r4 folder and then you need to navigate to that folder in the terminal and then use the command:

Followed by

If you have any problems, these will probably be from not having gcc installed, so install that.

Finally we need to edit the gap.sh file to make GAP work. You can find it in the GAP directory in the ‘bin’ folder i.e. gap4r4/bin/gap.sh. Use your favourite text editor to modify it. On line 23 you need change the GAP directory path (GAP_DIR) to where you have actually placed your gap4r4 folder. Then we are done! You just need to run the gap.sh script in the bin folder, i.e.

GAP Version 3. You will have found that if you want to do anything regarding complex reflection groups, you need to use the package CHEVIE, which hasn’t been ported to GAP Version 4 yet. Instead of using the version 3 download from the GAP website, you can download it from here. When you extract this file you do not need to run configure in the folder, or run make. Just edit the gap.sh file to the directory and then run it again.

Note that this version includes the CHEVIE package, so you do not need to run the RequirePackage command (this will make sense if you have tried to run CHEVIE before).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.