  
  [1X1 [33X[0;0YPreface[133X[101X
  
  [33X[0;0YWelcome  to  [5XGAP[105X.  This is one of three manuals documenting the core part of
  [5XGAP[105X,  the  other  being  the  [13X[5XGAP[105X  Tutorial[113X  . and the document called [13X[21X[5XGAP[105X -
  Changes from Earlier Versions[121X[113X .[133X
  
  [33X[0;0YThis preface serves not only to introduce [21XThe [5XGAP[105X Reference Manual[121X, but also
  as an introduction to the whole system.[133X
  
  [33X[0;0Y[5XGAP[105X  stands  for  [13XGroups, Algorithms and Programming[113X. The name was chosen to
  reflect the aim of the system, which is introduced in this reference manual.
  Since that choice, the system has become somewhat broader, and you will also
  find  information  about  algorithms  and  programming  for  other algebraic
  structures, such as semigroups and algebras.[133X
  
  [33X[0;0YThis  manual,  the [13X[5XGAP[105X reference manual[113X contains the official definitions of
  [5XGAP[105X  functions. It should contain all the information needed to use [5XGAP[105X, and
  is not intended to be read cover-to-cover.[133X
  
  [33X[0;0YTo get started a new user may first look at parts of the [13X[5XGAP[105X Tutorial[113X .[133X
  
  [33X[0;0YA  lot  of  the  functionality  of  the  system  and a number of contributed
  extensions are provided as [21X[5XGAP[105X packages[121X which are developed independently of
  the  core  part  of  [5XGAP[105X  and can be loaded into a [5XGAP[105X session. Each package
  comes  with  a  its  own manual which is also available through the [5XGAP[105X help
  system.[133X
  
  [33X[0;0YThis  manual  is  divided into chapters, sections and subsections. Chapter [14X2[114X
  describes  the  [13Xhelp system[113X, which provides access to all the manuals from a
  running  [5XGAP[105X  session.  Chapter [14X3[114X  gives  technical  advice for [13Xrunning[113X [5XGAP[105X.
  Chapter [14X4[114X  introduces  the [5XGAP[105X language, and the next chapters deal with the
  [13Xenvironment[113X  provided  by  [5XGAP[105X  for the user. These are followed by the main
  bulk  of  chapters  which are devoted to the various mathematical structures
  that [5XGAP[105X can handle.[133X
  
  [33X[0;0YSubsequent  sections of this preface explain the structure of the system and
  provide copyright and licensing information.[133X
  
  
  [1X1.1 [33X[0;0YThe [5XGAP[105X[101X[1X System[133X[101X
  
  [33X[0;0Y[5XGAP[105X  is  a  [13Xfree[113X,  [13Xopen[113X  and  [13Xextensible[113X software package for computation in
  discrete  abstract  algebra. The terms [21Xfree[121X and [21Xopen[121X describe the conditions
  under  which  the  system  is  distributed -- in brief, it is [13Xfree of charge[113X
  (except  possibly  for the immediate costs of delivering it to you), you are
  [13Xfree  to  pass  it  on[113X within certain limits, and all of the workings of the
  system  are  [13Xopen for you to examine and change[113X. Details of these conditions
  can be found in Section [14X'Reference: Copyright and License'[114X.[133X
  
  [33X[0;0YThe  system is [21Xextensible[121X in that you can write your own programs in the [5XGAP[105X
  language,  and use them in just the same way as the programs which form part
  of  the  system (the [21Xlibrary[121X). Indeed, we actively support the contribution,
  refereeing  and distribution of extensions to the system, in the form of [21X[5XGAP[105X
  packages[121X.  Further details of this can be found in chapter [14X'Reference: Using
  GAP Packages'[114X, and on our website.[133X
  
  [33X[0;0YDevelopment  of  [5XGAP[105X began at Lehrstuhl D für Mathematik, RWTH-Aachen, under
  the leadership of Joachim Neubüser in 1985. Version 2.4 was released in 1988
  and  version  3.1 in 1992. In 1997 coordination of [5XGAP[105X development, now very
  much  an  international  effort,  was  transferred to St Andrews. A complete
  internal  redesign  and  almost complete rewrite of the system was completed
  over  the  following years and version 4.1 was released in July 1999. A sign
  of  the  further internationalization of the project was the [5XGAP[105X 4.4 release
  in  2004,  which  has  been coordinated from Colorado State University, Fort
  Collins.[133X
  
  [33X[0;0YMore  information  on  the motivation and development of [5XGAP[105X to date, can be
  found on our Web pages in a section entitled [21XRelease history and Prefaces[121X.[133X
  
  [33X[0;0YFor  those  readers  who have used an earlier version of [5XGAP[105X, an overview of
  the  changes  from  [5XGAP[105X 4.4  and  a  brief  summary  of changes from earlier
  versions is given in a separate manual [14X'Changes: Changes between GAP 4.4 and
  GAP 4.5'[114X.[133X
  
  [33X[0;0YThe  system  that you are getting now consists of a [21Xcore system[121X and a number
  of packages. The core system consists of four main parts.[133X
  
  [31X1[131X   [33X[0;6YA [13Xkernel[113X, written in C, which provides the user with[133X
  
        [30X    [33X[0;12Yautomatic  dynamic  storage  management,  which the user needn't
              bother about in his programming;[133X
  
        [30X    [33X[0;12Ya   set  of  time-critical  basic  functions,  e.g.  [21Xarithmetic[121X,
              operations  for integers, finite fields, permutations and words,
              as well as natural operations for lists and records;[133X
  
        [30X    [33X[0;12Yan  interpreter  for  the  [5XGAP[105X  language,  an untyped imperative
              programming  language  with functions as first class objects and
              some  extra  built-in data types such as permutations and finite
              field  elements. The language supports a form of object-oriented
              programming, similar to that supported by languages like C++ and
              Java but with some important differences.[133X
  
        [30X    [33X[0;12Ya  small  set of system functions allowing the [5XGAP[105X programmer to
              handle  files  and  execute  external programs in a uniform way,
              regardless of the particular operating system in use.[133X
  
        [30X    [33X[0;12Ya  set  of  programming tools for testing, debugging, and timing
              algorithms.[133X
  
        [30X    [33X[0;12Ya [21Xread-eval-view[121X style user interface.[133X
  
  [31X2[131X   [33X[0;6YA  much  larger  [13Xlibrary of [5XGAP[105X functions[113X that implement algebraic and
        other  algorithms. Since this is written entirely in the [5XGAP[105X language,
        the [5XGAP[105X language is both the main implementation language and the user
        language  of  the  system.  Therefore  the  user  can as easily as the
        original  programmers  investigate  and vary algorithms of the library
        and  add  new  ones  to  it,  first for own use and eventually for the
        benefit of all [5XGAP[105X users.[133X
  
  [31X3[131X   [33X[0;6YA  [13Xlibrary  of group theoretical data[113X which contains various libraries
        of  groups,  including  the  library  of  small groups (containing all
        groups  of order at most 2000, except those of order 1024) and others.
        Large  libraries of ordinary and Brauer character tables and Tables of
        Marks are included as packages.[133X
  
  [31X4[131X   [33X[0;6YThe  [13Xdocumentation[113X.  This  is  available as on-line help, as printable
        files in PDF format and as HTML for viewing with a Web browser.[133X
  
  [33X[0;0YAlso  included  with  the  core  system  are some test files and a few small
  utilities which we hope you will find useful.[133X
  
  [33X[0;0Y[5XGAP[105X  [13Xpackages[113X  are  self-contained  extensions to the core system. A package
  contains  [5XGAP[105X code and its own documentation and may also contain data files
  or  external  programs  to  which  the [5XGAP[105X code provides an interface. These
  packages   may   be  loaded  into  [5XGAP[105X  using  the  [2XLoadPackage[102X  ([14XReference:
  LoadPackage[114X)  command,  and  both the package and its documentation are then
  available  just  as if they were parts of the core system. Some packages may
  be  loaded  automatically,  when  [5XGAP[105X  is started, if they are present. Some
  packages, because they depend on external programs, may only be available on
  the operating systems where those programs are available (usually UNIX). You
  should note that, while the packages included with this release are the most
  recent  versions  ready  for  release  at  this  time,  new packages and new
  versions  may  be  released  at any time and can be easily installed in your
  copy of [5XGAP[105X.[133X
  
  [33X[0;0YWith  [5XGAP[105X  there  are  two  packages  (the  library  of  ordinary and Brauer
  character  tables,  and  the  library  of  tables  of  marks)  which contain
  functionality  developed  from parts of the [5XGAP[105X core system. These have been
  moved  into packages for ease of maintenance and to allow new versions to be
  released  independently  of  new releases of the core system. The library of
  small  groups  should  also  be  regarded as a package, although it does not
  currently  use  the  standard  package  mechanism.  Other  packages  contain
  functionality  which  has never been part of the core system, and may extend
  it   substantially,   implementing   specific   algorithms  to  enhance  its
  capabilities, providing data libraries, interfaces to other computer algebra
  systems  and  data  sources  such  as the electronic version of the Atlas of
  Finite  Group Representations; therefore, installation and usage of packages
  is recommended.[133X
  
  [33X[0;0YFurther details about [5XGAP[105X packages can be found in chapter [14X'Reference: Using
  GAP      Packages'[114X,      and      on      the      [5XGAP[105X     website     here:
  [7Xhttps://www.gap-system.org/Packages/packages.html[107X.[133X
  
  
  [1X1.2 [33X[0;0YAuthors and Maintainers[133X[101X
  
  [33X[0;0Y[5XGAP[105X  is  the  work of very many people, many of whom still maintain parts of
  the  system. A complete list of authors, and an approximation to the current
  list  of  maintainers  can  be  found  on  the  [5XGAP[105X  World  Wide Web site at
  [7Xhttps://www.gap-system.org/Contacts/People/authors.html[107X                  and
  [7Xhttps://www.gap-system.org/Contacts/People/modules.html[107X.  All  [5XGAP[105X  packages
  have their own authors and maintainers. It should however be noted that some
  packages  provide  interfaces between [5XGAP[105X and an external program, a copy of
  which is included for convenience, and that, in these cases, we do not claim
  that  the  package  authors or maintainers wrote, or maintain, this external
  program.  Similarly,  the  system  and  some  packages  include  large  data
  libraries  that  may have been computed by many people. We try to make clear
  in each case what credit is attributable to whom.[133X
  
  [33X[0;0YWe  have,  for  some  time,  operated  a  refereeing  system for contributed
  packages,  both  to ensure the quality of the software we distribute, and to
  provide recognition for the authors. We now consider this to be a refereeing
  system  for modules, and we would note, in particular that, although it does
  not use the standard package interface, the library of small groups has been
  refereed and accepted on exactly the same basis as the accepted packages.[133X
  
  [33X[0;0YWe  also  include with this distribution a number of packages which have not
  (yet)  gone  through  our  refereeing  process.  Some may be accepted in the
  future,  in  other  cases  the  authors have chosen not to submit them. More
  information can be found on our World Wide Web site (see Section [14X1.5[114X).[133X
  
  
  [1X1.3 [33X[0;0YAcknowledgements[133X[101X
  
  [33X[0;0YVery  many  people  have  worked  on, and contributed to, [5XGAP[105X over the years
  since  its  inception.  On  our  Web  site you will find the prefaces to the
  previous  releases,  each of which acknowledges people who have made special
  contributions  to  that  release. Even so, it is appropriate to mention here
  Joachim  Neubüser  whose  vision  of  a free, open and extensible system for
  computational  algebra inspired [5XGAP[105X in the first place, and Martin Schönert,
  who was the technical architect of [5XGAP[105X 3 and [5XGAP[105X 4.[133X
  
  
  [1X1.4 [33X[0;0YCopyright and License[133X[101X
  
  [33X[0;0YCopyright © (1987-2018) by the [5XGAP[105X Group,[133X
  
  [33X[0;0Yincorporating  the  Copyright  ©  1999,  2000  by School of Mathematical and
  Computational  Sciences,  University of St Andrews, North Haugh, St Andrews,
  Fife KY16 9SS, Scotland[133X
  
  [33X[0;0Ybeing  the  Copyright  ©  1992  by  Lehrstuhl  D für Mathematik, RWTH, 52056
  Aachen, Germany, transferred to St Andrews on July 21st, 1997.[133X
  
  [33X[0;0Yexcept  for  files  in  the  distribution,  which have an explicit different
  copyright  statement.  In  particular, the copyright of packages distributed
  with [5XGAP[105X is usually with the package authors or their institutions.[133X
  
  [33X[0;0Y[5XGAP[105X  is  free  software;  you can redistribute it and/or modify it under the
  terms  of  the  GNU General Public License as published by the Free Software
  Foundation;  either  version 2 of the License, or (at your option) any later
  version.  For  details,  see  the  file  [11XGPL[111X in the [11Xetc[111X directory of the [5XGAP[105X
  distribution or see [7Xhttp://www.gnu.org/licenses/gpl.html[107X.[133X
  
  [33X[0;0YIf  you  obtain  [5XGAP[105X  please send us a short notice to that effect, e.g., an
  e-mail  message  to the address [7Xmailto:support@gap-system.org[107X. This helps us
  to keep track of the number of [5XGAP[105X users.[133X
  
  [33X[0;0YIf  you  publish  a  mathematical result that was partly obtained using [5XGAP[105X,
  please  cite  [5XGAP[105X,  just  as you would cite another paper that you used (see
  below  for sample citation). Also we would appreciate if you could inform us
  about   such   a   paper,   which  we  will  add  to  the  [5XGAP[105X  bibliography
  ([7Xhttps://www.gap-system.org/Doc/Bib/bib.html[107X).[133X
  
  [33X[0;0YSpecifically, please refer to[133X
  
  [4X[32X[104X
    [4X[GAP] The GAP Group, GAP - Groups, Algorithms, and Programming,[104X
    [4X      Version 4.8.10; 2018 (https://www.gap-system.org)[104X
  [4X[32X[104X
  
  [33X[0;0YYou are permitted to modify and redistribute [5XGAP[105X, but you are not allowed to
  restrict  further  redistribution.  That is to say proprietary modifications
  will not be allowed. We want all versions of [5XGAP[105X to remain free.[133X
  
  [33X[0;0YIf  you modify any part of [5XGAP[105X and redistribute it, you must supply a [11XREADME[111X
  document. This should specify what modifications you made in which files. We
  do not want to take credit or be blamed for your modifications.[133X
  
  [33X[0;0YOf  course  we are interested in all of your modifications. In particular we
  would  like  to  see  bug-fixes, improvements and new functions. So again we
  would appreciate it if you would inform us about all modifications you make.[133X
  
  [33X[0;0YIn  addition to the general copyright for [5XGAP[105X set forth above, the following
  terms apply to the versions of [5XGAP[105X for Windows.[133X
  
  [33X[0;0YThe  executable  of [5XGAP[105X for Windows that we distribute was compiled with the
  [10Xgcc[110X compiler supplied with [5XCygwin[105X installation ([7Xhttp://cygwin.com/[107X).[133X
  
  [33X[0;0YThe GNU C compiler is[133X
  
  [33X[0;0Y[13XCopyright © 2010 Free Software Foundation, Inc.[113X[133X
  
  [33X[0;0Yunder the terms of the GNU General Public License (GPL).[133X
  
  [33X[0;0YThe  [5XCygwin[105X  API  library  is also covered by the GNU GPL. The executable we
  provide  is  linked  against this library (and in the process includes GPL'd
  [5XCygwin[105X  glue  code). This means that the executable falls under the GPL too,
  which it does anyhow.[133X
  
  [33X[0;0YThe  [11Xcyggcc_s-1.dll[111X, [11Xcygncurses-10.dll[111X, [11Xcygncursesw-10.dll[111X, [11Xcygpanel-10.dll[111X,
  [11Xcygpopt-0.dll[111X,   [11Xcygreadline7.dll[111X,  [11Xcygstart.exe[111X,  [11Xcygwin1.dll[111X,  [11XlibW11.dll[111X,
  [11Xmintty.exe[111X,  [11Xrxvt.exe[111X  and  [11Xregtool.exe[111X are taken unmodified from the [5XCygwin[105X
  distribution.  They  are copyright by RedHat Software and released under the
  GPL. For more information on [5XCygwin[105X, see [7Xhttp://www.cygwin.com[107X.[133X
  
  [33X[0;0YPlease   contact   [7Xmailto:support@gap-system.org[107X   if   you   need   further
  information.[133X
  
  
  [1X1.5 [33X[0;0YFurther Information about [5XGAP[105X[101X[1X[133X[101X
  
  [33X[0;0YInformation about [5XGAP[105X is best obtained from the [5XGAP[105X website[133X
  
  [33X[0;0Y[7Xhttps://www.gap-system.org[107X[133X
  
  [33X[0;0YThere you will find, amongst other things[133X
  
  [30X    [33X[0;6Ydirections  to  the  sites from which you can download the current [5XGAP[105X
        distribution, all accepted and deposited [5XGAP[105X packages, and a selection
        of other contributions.[133X
  
  [30X    [33X[0;6Ythe [5XGAP[105X manual and an archive of the [10Xgap-forum[110X mailing list, formatted
        for reading with a Web browser, and indexed for searching.[133X
  
  [30X    [33X[0;6Yinformation  about  [5XGAP[105X  developers,  and  about  the  email addresses
        available for comment, discussion and support.[133X
  
  [33X[0;0YWe would particularly ask you to note the following things:[133X
  
  [30X    [33X[0;6YThe [5XGAP[105X Forum – an email discussion forum for comments, discussions or
        questions  about  [5XGAP[105X.  You  must subscribe to the list before you can
        post  to  it,  see  the  website  for  details.  In particular we will
        announce new releases in this mailing list.[133X
  
  [30X    [33X[0;6YThe email address [7Xmailto:support@gap-system.org[107X to which you are asked
        to send any questions or bug reports which do not seem likely to be of
        interest  to  the  whole [5XGAP[105X Forum. Please give a (short, if possible)
        self-contained  excerpt  of  a  [5XGAP[105X  session containing both input and
        output  that  illustrates  your problem (including comments of why you
        think  it  is  a  bug)  and  state  the type of the machine, operating
        system,  (compiler used, if UNIX/Linux) and the version of [5XGAP[105X you are
        using  (the  first  line  after the [5XGAP[105X 4 banner starting [10XGAP, Version
        4...[110X).[133X
  
  [30X    [33X[0;6YWe     also    ask    you    to    send    a    brief    message    to
        [7Xmailto:support@gap-system.org[107X when you install [5XGAP[105X.[133X
  
  [30X    [33X[0;6YThe correct form of citation of [5XGAP[105X, which we ask you use whenever you
        publish scientific results obtained using [5XGAP[105X.[133X
  
  [33X[0;0YIt finally remains for us to wish you all pleasure and success in using [5XGAP[105X,
  and to invite your constructive comment and criticism.[133X
  
  [33X[0;0YThe GAP Group,[133X
  
  [33X[0;0Y15-Jan-2018[133X
  
