1 About GAP

This chapter introduces you to the GAP system. It describes how to start GAP (you may have to ask your system administrator to install it correctly) and how to leave it. Then a step by step introduction should give you an impression of how the GAP system works. Further sections will give an overview about the features of GAP. After reading this chapter the reader should know what kind of problems can be handled with GAP and how they can be handled.

There is some repetition in this chapter and much of the material is repeated in later chapters in a more compact and precise way. Yes, there are even some little inaccuracies in this chapter simplifying things for better understanding. It should be used as a tutorial introduction while later chapters form the reference manual.

GAP is an interactive system. It continuously executes a read--evaluate--print cycle. Each expression you type at the keyboard is read by GAP, evaluated, and then the result is printed.

The interactive nature of GAP allows you to type an expression at the keyboard and see its value immediately. You can define a function and apply it to arguments to see how it works. You may even write whole programs containing lots of functions and test them without leaving the program.

When your program is large it will be more convenient to write it on a file and then read that file into GAP. Preparing your functions in a file has several advantages. You can compose your functions more carefully in a file (with your favorite text editor), you can correct errors without retyping the whole function and you can keep a copy for later use. Moreover you can write lots of comments into the program text, which are ignored by GAP, but are very useful for human readers of your program text.

GAP treats input from a file in the same way that it treats input from the keyboard.

The printed examples in this first chapter encourage you to try running GAP on your computer. This will support your feeling for GAP as a tool, which is the leading aim of this chapter. Do not believe any statement in this chapter so long as you cannot verify it for your own version of GAP. You will learn to distinguish between small deviations of the behavior of your personal GAP from the printed examples and serious nonsense.

Since the printing routines of GAP are in some sense machine dependent you will for instance encounter a different layout of the printed objects in different environments. But the contents should always be the same.

In case you encounter serious nonsense it is highly recommended that you send a bug report to gap-forum@samson.math.rwth-aachen.de.

If you read this introduction on-line you should now enter ? to read the next section.

Subsections

  1. About Conventions
  2. About Starting and Leaving GAP
  3. About First Steps
  4. About Help
  5. About Syntax Errors
  6. About Constants and Operators
  7. About Variables and Assignments
  8. About Functions
  9. About Lists
  10. About Identical Lists
  11. About Sets
  12. About Vectors and Matrices
  13. About Records
  14. About Ranges
  15. About Loops
  16. About Further List Operations
  17. About Writing Functions
  18. About Groups
  19. About Operations of Groups
  20. About Finitely Presented Groups and Presentations
  21. About Fields
  22. About Matrix Groups
  23. About Domains and Categories
  24. About Mappings and Homomorphisms
  25. About Character Tables
  26. About Group Libraries
  27. About the Implementation of Domains
  28. About Defining New Domains
  29. About Defining New Parametrized Domains
  30. About Defining New Group Elements
Up Next
Index

GAP 3.4.4
April 1997