% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}

\usepackage{a4wide}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
\definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0.0}

\definecolor{linkColor}{rgb}{0.0,0.0,0.554}
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\definecolor{urlColor}{rgb}{0.0,0.0,0.554}
\definecolor{promptColor}{rgb}{0.0,0.0,0.589}
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}

%%  for a long time these were red and blue by default,
%%  now black, but keep variables to overwrite
\definecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}


\usepackage{fancyvrb}

\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}


\usepackage[
            pdftex=true,
            bookmarks=true,        
            a4paper=true,
            pdftitle={Written with GAPDoc},
            pdfcreator={LaTeX with hyperref package / GAPDoc},
            colorlinks=true,
            backref=page,
            breaklinks=true,
            linkcolor=linkColor,
            citecolor=citeColor,
            filecolor=fileColor,
            urlcolor=urlColor,
            pdfpagemode={UseNone}, 
           ]{hyperref}

\newcommand{\maintitlesize}{\fontsize{50}{55}\selectfont}

% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\immediate\openout\pagenrlog =\jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}}
%% were never documented, give conflicts with some additional packages

\newcommand{\GAP}{\textsf{GAP}}

%% nicer description environments, allows long labels
\usepackage{enumitem}
\setdescription{style=nextline}

%% depth of toc
\setcounter{tocdepth}{1}





%% command for ColorPrompt style examples
\newcommand{\gapprompt}[1]{\color{promptColor}{\bfseries #1}}
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{\color{gapinputColor}{#1}}


\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\mbox{}\vfill

\begin{center}{\maintitlesize \textbf{\textsf{Smallsemi}\mbox{}}}\\
\vfill

\hypersetup{pdftitle=\textsf{Smallsemi}}
\markright{\scriptsize \mbox{}\hfill \textsf{Smallsemi} \hfill\mbox{}}
{\Huge \textbf{A \textsf{GAP} package\mbox{}}}\\
\vfill

{\Huge Version 0.6.10\mbox{}}\\[1cm]
\mbox{}\\[2cm]
{\Large \textbf{Andreas Distler   \mbox{}}}\\
{\Large \textbf{J. D. Mitchell    \mbox{}}}\\
\hypersetup{pdfauthor=Andreas Distler   ; J. D. Mitchell    }
\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{Andreas Distler   }  Email: \href{mailto://a.distler@tu-bs.de} {\texttt{a.distler@tu-bs.de}}\\
  Address: \begin{minipage}[t]{8cm}\noindent
 Institut Computational Mathematics\\
 Rebenring 31 (A14)\\
 38106 Braunschweig\\
 Germany \end{minipage}
}\\
{\mbox{}\\
\small \noindent \textbf{J. D. Mitchell    }  Email: \href{mailto://jdm3@st-and.ac.uk} {\texttt{jdm3@st-and.ac.uk}}\\
  Homepage: \href{http://www-groups.mcs.st-and.ac.uk/~jamesm} {\texttt{http://www-groups.mcs.st-and.ac.uk/\texttt{\symbol{126}}jamesm}}\\
  Address: \begin{minipage}[t]{8cm}\noindent
 Mathematical Institute\\
 North Haugh\\
 St Andrews, Fife\\
 KY16 9SS\\
 Scotland, UK \end{minipage}
}\\
\end{titlepage}

\newpage\setcounter{page}{2}
{\small 
\section*{Copyright}
\logpage{[ 0, 0, 1 ]}
{\copyright} 2008-15 A. Distler \& J. D. Mitchell.

 \textsf{Smallsemi} 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 3 of the license, or (at your option) any later version.

 \textsf{Smallsemi} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

 A copy of the GNU General Public License is available in the file 'GPLv3'; for
the latest version see`http://www.gnu.org/licenses/.

 This file is part of \textsf{Smallsemi}, though as documentation it is released under the GNU Free Documentation
License (see \href{http://www.gnu.org/licenses/licenses.html#FDL} {\texttt{http://www.gnu.org/licenses/licenses.html\#FDL}}). \mbox{}}\\[1cm]
{\small 
\section*{Acknowledgements}
\logpage{[ 0, 0, 3 ]}
 We would like to thank Tom Kelsey for making this library possible by running
all the initial computations in Minion \cite{minion}. \\
 The first author acknowledges financial support of the University of St
Andrews. The second author acknowledges support of EPSRC grant number
GR/S/56085/01. \mbox{}}\\[1cm]
{\small 
\section*{Colophon}
\logpage{[ 0, 0, 2 ]}
 If you use \textsf{Smallsemi}, please tell us by sending an email to \href{mailto://a.distler@tu-bs.de} {\texttt{a.distler@tu-bs.de}} or \href{mailto://jdm3@st-and.ac.uk} {\texttt{jdm3@st-and.ac.uk}}. 

 If you find any bugs or have any suggestions or comments, we would very much
appreciate it if you would let us know. Also, we would like to hear about
applications of this software. \mbox{}}\\[1cm]
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 4 ]}}

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{Introduction}}\label{smallsemi}
\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X7DFB63A97E67C0A1}{}
{
 This manual describes the \textsf{Smallsemi} package (Version 0.6.10) for \textsf{GAP}.

 The \textsf{Smallsemi} package is a data library of semigroups of small size. It provides all
semigroups with at most 8 elements as well as various information about these
objects. The reason that semigroups of higher orders are not included is the
huge number of such objects. The numbers of semigroups of sizes 1 to 9 are
given in the table below (orders not included in the library are in italics). The number of semigroups of size 10 is not known at the time of writing. \mbox{}\label{nrobjects}\begin{center}
\begin{tabular}{|r|r|}\hline
Size&
Number of semigroups\\
\hline
\hline
1&
1\\
\hline
2&
4\\
\hline
3&
18\\
\hline
4&
126\\
\hline
5&
1 160\\
\hline
6&
15 973\\
\hline
7&
836 021\\
\hline
8&
1 843 120 128\\
\hline
9&
\emph{52 989 400 714 478}\\
\hline
\end{tabular}\\[2mm]
\end{center}

 The initial idea for \textsf{Smallsemi} was developed out of the wish for an extensive number of examples of
semigroups of moderate size. This lead to the idea of an electronical
database. As an existing example the \textsf{SmallGroups Library} \cite{smallgroups} was an inspiration on how such a project could be established. Unfortunately
the number of semigroups is so much bigger, and most of them bare so little
structure, that new techniques to store and handle the semigroups had to be
developed. Of course, the first step was to actually construct all the
semigroups. 

 In the remainder of the introduction we explain what you need to do to install
and optimize \textsf{Smallsemi}; see Subsections \ref{reqs} and \ref{install}. 

 In Chapter \ref{data} we explain how the semigroups where obtained, what exactly is stored and how,
and which additional properties have been precomputed. 

 The the types of use \textsf{Smallsemi} is intended for and its limitations are described in Chapter \ref{examples}. The extensive examples can be used as a quick-start guide and as something
to come back to after reading the technical details about available
functionality in the subsequent sections. 

 Chapter \ref{small} has all the information about available functions. 
\section{\textcolor{Chapter }{Requirements}}\label{reqs}
\logpage{[ 1, 1, 0 ]}
\hyperdef{L}{X85A08CF187A6D986}{}
{
 This software is written for \textsf{GAP} 4. It requires an existing installation of \textsf{GAP} in version 4.5 or higher. 

 It is recommended but not necessary to have the \textsf{GAP} 4 packages \textsf{Citrus} and \textsf{sgpviz} installed as well. \textsf{Citrus} provides a wide range of functionality for working with semigroups which is
not available in the \textsf{GAP} core system while \textsf{sgpviz} is recommended for its ability to graphically represent small semigroups. 

 
\subsection{\textcolor{Chapter }{Operating System}}\label{os}
\logpage{[ 1, 1, 1 ]}
\hyperdef{L}{X82C5588B7E8B2725}{}
{
 The current version of \textsf{Smallsemi} was created for use under Unix. It will also work under Windows but only if
all files in the directory \texttt{smallsemi/data} and all of its subdirectories are uncompressed. See Subsection \ref{diskspace} for additional comments on working with \textsf{Smallsemi} under Windows. }

 
\subsection{\textcolor{Chapter }{RAM}}\label{ram}
\logpage{[ 1, 1, 2 ]}
\hyperdef{L}{X78F27CCA81555251}{}
{
 Working with \textsf{Smallsemi} can be memory expensive. We recommend to have at least 1 GB of RAM available.
With less than 512 MB not all the semigroups of size 8 can be accessed. 

 You should be able to use the semigroups of orders 1 through 7 having 128 MB
of RAM only. If you have a system with little memory or want to use as little
memory as possible for the \textsf{GAP} process try using \texttt{UnloadSmallsemiData} (\ref{UnloadSmallsemiData}) to free memory after every access to the library. This is likely to slow down
computations though. 

 For further infomation on how \textsf{GAP} uses memory see \ref{memory} or  (\textbf{Reference: Command Line Options}). }

 
\subsection{\textcolor{Chapter }{Disk Space}}\label{diskspace}
\logpage{[ 1, 1, 3 ]}
\hyperdef{L}{X87E4E0377BF1EAC6}{}
{
 As the data in the library is compressed, 30 MB of disk space will be
sufficient to install \textsf{Smallsemi} under Unix. To use the library under Windows the data has to be uncompressed
and will then occupy approx. 1.6 GB. 

 All data files are compressed using \texttt{gzip}. Under Unix \textsf{GAP} can access the original contents of a gzipped file without uncompressing it as
a whole by using a pipe. On 32-bit systems this might fail in extreme
circumstances. In that case \textsf{GAP} has to be restarted. This functionality is \emph{not} currently available under Windows (or for any other compression type). 

 It should be possible to use \textsf{Smallsemi} under Windows after unzipping all data files. (These are located in the
directory \texttt{data} and its subdirectories and have the file extension \texttt{.gz}.) }

 }

 
\section{\textcolor{Chapter }{Installation and Setup}}\label{install}
\logpage{[ 1, 2, 0 ]}
\hyperdef{L}{X796A04C37CB7AC04}{}
{
 
\subsection{\textcolor{Chapter }{Download and Extract \textsf{Smallsemi}}}\logpage{[ 1, 2, 1 ]}
\hyperdef{L}{X7A4C760D7D6849BC}{}
{
  The installation follows standard \textsf{GAP} rules as outlined in the following two steps; see  (\textbf{Reference: Installing a GAP Package}) for further details. 
\begin{enumerate}
\item  Download one of the archives \texttt{smallsemi-0.6.10.tar.gz} or \texttt{smallsemi-0.6.10.tar.bz2} from \\
 \href{http://www-history.mcs.st-andrews.ac.uk/~jamesm/smallsemi/index.html} {\texttt{http://www-history.mcs.st-andrews.ac.uk/\texttt{\symbol{126}}jamesm/smallsemi/index.html}} 
\item  Move the archive inside a \texttt{pkg} directory. This can be either the main \texttt{pkg} directory in your \textsf{GAP} installation or your personal \texttt{pkg} directory. 
\item  Complete the installation by unpacking the archive, e.g. under Linux type \texttt{tar -xzf smallsemi-0.6.10.tar.gz} at the prompt for the gzipped \texttt{tar}-archive. A subdirectory \texttt{smallsemi} will be created inside the \texttt{pkg} directory. 
\end{enumerate}
 }

 
\subsection{\textcolor{Chapter }{Contents}}\logpage{[ 1, 2, 2 ]}
\hyperdef{L}{X86BA319E87365B5C}{}
{
 In the subdirectory \texttt{smallsemi} you should find the following files and folders: \begin{center}
\begin{tabular}{ll}\texttt{CHANGELOG}&
documents changes to previous versions\\
\texttt{data}&
contains the data files for semigroups\\
\texttt{doc}&
contains the documentation\\
\texttt{gap}&
contains the \textsf{GAP} code\\
\texttt{GPLv3}&
version 3 of the GNU General Public License\\
\texttt{init.g}&
implementation file of \textsf{Smallsemi}\\
\texttt{PackageInfo.g}&
meta information about \textsf{Smallsemi}\\
\texttt{read.g}&
declaration file of \textsf{Smallsemi}\\
\texttt{README.txt}&
the README file of \textsf{Smallsemi}\\
\texttt{tst}&
contains test files\\
\end{tabular}\\[2mm]
\end{center}

  }

 
\subsection{\textcolor{Chapter }{Loading}}\label{load}
\logpage{[ 1, 2, 3 ]}
\hyperdef{L}{X861ED1338181C66D}{}
{
 To use the package, start a \textsf{GAP} session and type \texttt{LoadPackage("smallsemi");} at the \textsf{GAP} prompt. You should see the following: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@LoadPackage("smallsemi");|
  -----------------------------------------------------------------------------
  Smallsemi - A library of small semigroups
  by Andreas Distler & James Mitchell
  For contents, type: ?Smallsemi:
  Loading Smallsemi 0.6.10 ...
  -----------------------------------------------------------------------------
  true
  gap>
\end{Verbatim}
 You might want to start \textsf{GAP} with a specified amount of memory; see Subsection \ref{memory}. }

 
\subsection{\textcolor{Chapter }{Memory Issues}}\label{memory}
\logpage{[ 1, 2, 4 ]}
\hyperdef{L}{X803939AE7C3565DA}{}
{
 As mentioned in Subsection \ref{ram}, working with \textsf{smallsemi } can be memory expensive. It is therefore necessary to either: 
\begin{enumerate}
\item start \textsf{GAP} with 1 GB of memory (if possible), for example, by typing \texttt{gap -m 1g}; or 
\item extend the amount memory used by typing \texttt{return;} in the break-loop whenever \textsf{GAP} runs out of memory. For example, 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(8, 183244314);|
  #I  Loading 'smallsemi' data. Please be patient.
  #I  Loading 'smallsemi' data.
  Error, exceeded the permitted memory (`-o' command line option)
  SplitString( StringFile( file ), "\n" ) called from
  READ_3NIL_DATA( diag ); called from
  RecoverMultiplicationTable( size, nr ) called from
  <function>( <arguments> ) called from read-eval-loop
  you can 'return;'
  !gapbrkprompt@brk>| !gapinput@|
\end{Verbatim}
 
\end{enumerate}
 }

 
\subsection{\textcolor{Chapter }{Testing}}\logpage{[ 1, 2, 5 ]}
\hyperdef{L}{X7DE7E7187BE24368}{}
{
 You should verify the success of the installation by running the test file.
This is done by the following command and should return a similar output (the
number of \texttt{GAP4stones} might differ depending on the speed of your machine): 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@ReadPackage( "smallsemi", "tst/testall.g" );|
  Smallsemi package: small.tst
  GAP4stones: 41
  Smallsemi package: properties.tst
  GAP4stones: 0
  Smallsemi package: enums.tst
  GAP4stones: 1
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{Customizing}}\logpage{[ 1, 2, 6 ]}
\hyperdef{L}{X7B3500B984306465}{}
{
 If you are using \textsf{Smallsemi} regularly you might want to put the command \texttt{LoadPackage("smallsemi");} into your \texttt{.gaprc} file; see  (\textbf{Reference: The gap.ini and gaprc files}). Another option is to save a workspace after loading \textsf{Smallsemi} and executing the following commands 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@SmallSemigroup(7,1);; MOREDATA2TO8;;|
  #I  smallsemi: loading data for semigroups of size 7.
  #I  smallsemi: loading data for semigroup properties. Please be patient.
  !gapprompt@gap>| !gapinput@SaveWorkspace( "<filename for the workspace>" );|
\end{Verbatim}
 Doing this will mean that it is not necessary to load the data from the
library every time you start a new \textsf{GAP} session; see  (\textbf{Reference: Saving and Loading a Workspace}).

 The size of the file containing the saved workspace will be around 76 MB.
Loading this workspace is much quicker than starting a new \textsf{GAP} session and all the data for semigroups of orders 1 through 7 is immediately
available. (If you are working under Unix you can make use of the
functionality mentioned in Subsection \ref{diskspace} and compress the workspace with gzip to roughly 10 MB.) }

 }

 }

 
\chapter{\textcolor{Chapter }{The Data in the Library}}\label{data}
\logpage{[ 2, 0, 0 ]}
\hyperdef{L}{X7E933CC381DA3D7C}{}
{
 In this chapter we outline how the semigroups in the library were found,
exactly what semigroups are available, how they are stored, and how further
information regarding the properties of these semigroups is handled.

   
\section{\textcolor{Chapter }{Creation of the Semigroups}}\logpage{[ 2, 1, 0 ]}
\hyperdef{L}{X7A8F62A38080168D}{}
{
 This section describes which semigroups are contained in the library and how
they were determined. 

 The purpose of the library is to provide one semigroup of every `structural
type'. The semigroups are represented by their multiplication table. Usually,
say, for groups, `stuctural type' means 'up to isomorphism' which corresponds
to relabelling the elements. Roughly speaking, transposing the
multiplicationable of a semigroup does not alter its important structure
features either. More precisely, the usual description of the structure of a
semigroup using Green's relations is invariant under these operations. So, we
consider two semigroups to be of the same structure if they are isomorphic or
anti-isomorphic. We will refer to semigroups that are isomorphic or
anti-isomorphic as \emph{equivalent}. The vast number of non-equivalent semigroups with small numbers of elements
(see Table \ref{nrobjects}) limits us to providing the semigroups with at most 8 elements. 

 The problem of constructing semigroups up to isomorphism and anti-isomorphism
has been considered by many authors. For very small orders, that is 1 to 5,
all the semigroups up to isomorphism and anti-isomorphism were computed by
hand \cite{tamura1} and \cite{tamura2}. The first instance of the use of computers to find all semigroups up to
isomorphism and anti-isomorphism is described in Forsythe \cite{For55}. Subsequently, the number of semigroups with 6 elements was found by Plemmons \cite{Ple67}, with 7 elements by J{\"u}rgensen and Wick \cite{JW77}, with 8 by Satoh, Yama and Tokizawa \cite{SZT94}, and with 9 by Distler, Kelsey, and Mitchell in 2008. Even if the authors
could store their results they had no means to make them publically available.
Plemmons, for example, explicitly states that he had all multiplication tables
for semigroups of size 6 on magnetic tape. J{\"u}rgensen and Wick back in 1977
did not store the semigroups of size 7 because of their large number. The
tables for semigroups with 8 elements use up several gigabytes of disk space
(while the compressed library files in \textsf{Smallsemi} need only 22 MB). 

 Trying to recreate the results from the existing literature, it quickly
becomes obvious that even some 15 years later, with considerably more
computing power available, the task of obtaining all semigroups with 8
elements is still by no means trivial. Our technique was to find all
associative multiplication tables up to isomorphism and anti-isomorphism using
a combination of \textsf{GAP} and the Contraint Satisfaction Problem (CSP) solver Minion \cite{minion}.    More specific details on the search will be available in a later version of \textsf{Smallsemi}. 

 }

  
\section{\textcolor{Chapter }{Storing the Semigroups}}\logpage{[ 2, 2, 0 ]}
\hyperdef{L}{X79038EE8873A1B4B}{}
{
 As discussed in the previous section, we store data relating to the
multiplication table of one representative of every class of equivalent
semigroups with 1 to 8 elements.  

 The tables for semigroups with 2 to 7 elements are stored in the files \texttt{data2.gl.gz} to \texttt{data7.gl.gz} in the directory \texttt{data/data2to7}. 

 For semigroups of size 8 the data is contained in the directories \texttt{data/data8-3nil} and \texttt{data/data8}. The former contains the data relating to 3-nilpotent semigroups (see \texttt{NilpotencyDegree} (\ref{NilpotencyDegree})) and the latter the data for all the remaining semigroups of size 8. 

 The tables of non-3-nilpotent semigroups are partitioned into files \texttt{8diag{\textless}entries in the diagonal{\textgreater}.gl.gz} with respect to their diagonals. For example, \texttt{8diag12345678.gl.gz} contains tables for all the bands of order 8. 

 Any 3-nilpotent semigroup has a unique minimal generating set containing those
elements that do not appear in the table. We only require the subtable with
entries corresponding to the product of two generators, as all other products
are zero. Thus if $m$ is the number of generators, we retain information regarding the entries of an $m \times m$ table. However, we do not store all the tables in this case. The $m \times m$ tables can be sorted into ranges and then the first table and the number of
tables in the range are stored. For every diagonal there is a file \texttt{diag{\textless}entries in the diagonal{\textgreater}.gl.gz} containing the first tables of each range and a separate file named \texttt{diag{\textless}entries in the diagonal{\textgreater}pos.gl.gz} containing the lengths of these ranges. 

 \begin{center}
\begin{tabular}{l|l|r|r|r}class&
file names&
data size&
- gzipped&
compression factor\\
\hline
sizes 2-7&
\texttt{data{\textless}size{\textgreater}.gl}&
39 MB&
680 KB&
58\\
size 8, not 3-nilpotent&
\texttt{8diag{\textless}diagonal{\textgreater}.gl}&
613 MB&
10 MB&
61\\
size 8, 3-nilpotent&
\texttt{diag{\textless}diagonal{\textgreater}.gl}&
974 MB&
11 MB&
89\\
\end{tabular}\\[2mm]
\end{center}

 All together the \textsf{GAP} library files take just under 22 MB of disk space after compression while
allowing fast recovering of the data. The compression rates demonstrated in
the table above were achieved using \texttt{gzip} with the highest possible compression (-9 switch) as well as careful analysis
and intensive testing of how best to structure the data in the files.

 The semigroups in the library satisfying certain standard properties have been
identified and this information is stored in the files \texttt{info1.g.gz} to \texttt{info8.g.gz}. To find out what properties have been considered see \texttt{PrecomputedSmallSemisInfo} (\ref{PrecomputedSmallSemisInfo}). }

 }

 
\chapter{\textcolor{Chapter }{Extended Examples}}\label{examples}
\logpage{[ 3, 0, 0 ]}
\hyperdef{L}{X7CDC63A27F7790AA}{}
{
  The main features of the library can be summarized in three points: it
provides a complete set of semigroups up to isomorphism and anti-isomorphism
of sizes up to 8; it carries a vast amount of precomputed information about
these semigroups; and there is an identification function which takes a
semigroup with at most 8 elements and returns a map to the equivalent one from
the library. 

  These features lead to different ways of using the library. It is impossible
to describe - or even to anticipate - all possible types of usage. Most
problems will admit multiple solutions. We find it difficult to predict which
will be most effective. The examples in this chapter should give an idea of
the differences in the various functions and help you to find an alternative
if a computation uses more time or memory than you have available. 

 Let us go step by step through some ways to use the library showing which
tools are provided.  
\section{\textcolor{Chapter }{Lists, Enumerators and Iterators of Semigroups}}\logpage{[ 3, 1, 0 ]}
\hyperdef{L}{X80DFE0117B7A7C24}{}
{
 At first one could want to search through the stored semigroups for one or all
semigroups with a certain property. Going through all the semigroups can take
a long time. Just to create all the 1.8 billion semigroups as objects in \textsf{GAP} takes around a day on a modern PC. Doing a simple test on all the semigroups
in the library might take another day. Performing complicated tests easily
takes weeks. To avoid this, many properties of the semigroups were
precomputed. Semigroups with or without a precomputed property can be accessed
as quickly as simply creating the same number of semigroups. (Note that
timings of two calls to the same command may vary and, of course, heavily
depend on your machine.) 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@# obtain a list of all semigroups with 6 elements|
  !gapprompt@gap>| !gapinput@AllSmallSemigroups( 6 );;|
  !gapprompt@gap>| !gapinput@time;|
  2636
  !gapprompt@gap>| !gapinput@# obtain a list of all commutative semigroups with 7 elements  |
  !gapprompt@gap>| !gapinput@AllSmallSemigroups( 7, IsCommutative, true );;|
  !gapprompt@gap>| !gapinput@time;|
  2957
  !gapprompt@gap>| !gapinput@# compare the numbers of semigroups in the two lists|
  !gapprompt@gap>| !gapinput@NrSmallSemigroups( 6 ); NrSmallSemigroups( 7, IsCommutative, true );|
  15973
  17291
\end{Verbatim}
 (In all the examples in this section the info messages which are given by
default when data is loaded are turned off via \texttt{SetInfoLevel(InfoSmallSemi,0)}.) 

 We provide three commands that can be used if one is interested in all
semigroups with some properties. These are \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}), \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}), and \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}). Which one is best to use depends a lot on the situation. Here we attempt to
provide some insight about the essential differences. 
\subsection{\textcolor{Chapter }{Precomputed properties}}\logpage{[ 3, 1, 1 ]}
\hyperdef{L}{X790CB8D686E0A336}{}
{
 We start with examples using only precomputed information. In this case there
is essentially no advantage of calling an iterator instead of an enumerator.  Thus only \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}) and \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}) will be considered. 

 We first compare the memory usage and the setup time. Assume we are interested
in the commutative semigroups with at most 7 elements. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@list := AllSmallSemigroups([1..7],IsCommutativeSemigroup,true);;|
  !gapprompt@gap>| !gapinput@time; # the time needed will always depend on your machine|
  3180
  !gapprompt@gap>| !gapinput@enum := EnumeratorOfSmallSemigroups([1..7],IsCommutativeSemigroup,true);|
  <enumerator of semigroups of sizes [ 1 .. 7 ]>
  !gapprompt@gap>| !gapinput@time;|
  8
\end{Verbatim}
 The enumerator stores the information, which semigroups it contains, but only
creates the semigroups when asked for them explicitly. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@# now the semigroups have to be created ...|
  !gapprompt@gap>| !gapinput@for sg in enum do|
  # do nothing, the semigroup will be created anyway
  od;
  !gapprompt@gap>| !gapinput@time;|
  3428
  !gapprompt@gap>| !gapinput@# ... and again if you want to look through them another time ...|
  !gapprompt@gap>| !gapinput@for sg in enum do|
  od;
  !gapprompt@gap>| !gapinput@time;|
  3437
  !gapprompt@gap>| !gapinput@# ... not so for the list of semigroups though|
  !gapprompt@gap>| !gapinput@for sg in list do|
  od;
  !gapprompt@gap>| !gapinput@time;|
  4
\end{Verbatim}
 There are several reasons why one would nevertheless prefer an enumerator, one
is the smaller need for memory. While the number of semigroups in this example
is rather moderate (compared with all the semigroups in the library) the
difference is remarkable: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@nr := Length(enum);|
  17291
  !gapprompt@gap>| !gapinput@MemoryUsage(enum);                                 |
  70507
  !gapprompt@gap>| !gapinput@MemoryUsage(list); # this will take a while ...|
  19089280
  !gapprompt@gap>| !gapinput@# ... but you can get a close approximation much faster|
  !gapprompt@gap>| !gapinput@sg := OneSmallSemigroup(7,IsCommutativeSemigroup,true);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@nr*MemoryUsage(sg);|
  19020100
\end{Verbatim}
 As said before the advantage of the enumerator comes from the fact that the
members of it are created anew every time they are called. This means on the
other hand that information that is computed is not stored. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(list[3]); # a semigroup from the list ...|
  false
  !gapprompt@gap>| !gapinput@KnownPropertiesOfObject(list[3]); # ... can store new information|
  [ "IsEmpty", "IsTrivial", "IsNonTrivial", "IsFinite", "IsDuplicateFree", 
    "IsAssociative", "IsCommutativeSemigroup", "IsZeroSemigroup" ]
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(enum[3]); # semigroups in the enumerator ...|
  false
  !gapprompt@gap>| !gapinput@KnownPropertiesOfObject(enum[3]); # ... are created anew in every call |
  [ "IsEmpty", "IsTrivial", "IsNonTrivial", "IsFinite", "IsDuplicateFree", 
    "IsAssociative", "IsCommutativeSemigroup" ]
  !gapprompt@gap>| !gapinput@# but if it turns out this is the semigroup you want to analyse, just do|
  !gapprompt@gap>| !gapinput@sg := enum[3];|
\end{Verbatim}
 Observe that in the last example the semigroup from the enumerator knew about
the property that was used to create the enumerator. The enumerator stores
this knowledge and passes it on whenever a member is called. 

 Another reason to prefer an enumerator is that one might only be interested in
some of the elements it contains. This could become clear after analysing some
of the elements and then there is no time wasted in creating all semigroups in
the enumerator. Or possibly creating the enumerator involving precomputed
properties was just the first step. As described in Section \ref{enums} enumerators themselves can be given as argument to get to a more restricted
class of semigroups. This leads us to the next part of this section. }

 
\subsection{\textcolor{Chapter }{User functions}}\logpage{[ 3, 1, 2 ]}
\hyperdef{L}{X804593297D7EEF68}{}
{
 We now come to examples dealing with properties that are not precomputed -
including user defined functions. This makes \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}) interesting again. Assume you want to work with bands (\texttt{IsBand} (\ref{IsBand})) of order 8 having 1 Green's $D$-class (see  (\textbf{Reference: Green's Relations})). You might feel tempted to implement a function testing a semigroup for this
combination of properties. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@isFascinatingSemigroup := function(sgrp)|
  local dclasses;
  dclasses := GreensDClasses(sgrp);
  return IsBand(sgrp) and Length(dclasses) = 1;
  end;
\end{Verbatim}
 But then the precomputed property \texttt{IsBand} (\ref{IsBand}) is hidden inside your function and a call like \texttt{AllSmallSemigroups(8,isFascinatingSemigroup,true)} would take days to complete. 

 The following finds the same semigroups more efficiently: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@list:=AllSmallSemigroups(8,IsBand,true,x->Size(GreensDClasses(x)),1);|
  [ <small semigroup of size 8>, <small semigroup of size 8> ]
  !gapprompt@gap>| !gapinput@time;|
  49211
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups(8,IsBand,true,x->Size(GreensDClasses(x)),1);|
  <enumerator of semigroups of size 8>
  !gapprompt@gap>| !gapinput@time;|
  48723
\end{Verbatim}
 Observe that the enumerator lost its advantage of returning the answer faster
because not all properties are precomputed. Thus all bands have to be
constructed to test their number of $D$-classes. As the number of such semigroups is small, \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}) is the better choice in this example - remember that the semigroups from the
enumerator have to be recreated in every call. Often one does not have this
kind of knowledge beforehand. Even for a large number of semigroups the
enumerator still has the advantage of using far less memory as it stores only
the IDs of the semigroups. Before explaining more about this let us for a
moment go back to the semigroups from the previous example. It turns out they
are the 2 non-equivalent rectangular bands (\texttt{IsRectangularBand} (\ref{IsRectangularBand})) with 8 elements. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@ForAll(list,IsRectangularBand);|
  true
\end{Verbatim}
  As a last example in this subsection we look at semigroups from the library
that are not nilpotent. As there are quite some of these we will first try an
enumerator. The obvious call seems to be 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum1 := EnumeratorOfSmallSemigroups([1..7],IsNilpotentSemigroup,false);|
  <enumerator of semigroups of sizes [ 2, 3, 4, 5, 6, 7 ]>
  !gapprompt@gap>| !gapinput@time;|
  103403
\end{Verbatim}
 However, we would like to include the semigroups of order 8 as well. As \texttt{IsNilpotentSemigroup} (\ref{IsNilpotentSemigroup}) is not a precomputed property in the current version of \textsf{Smallsemi} this would take a long time. Here, additional knowledge, about the way the
semigroups are stored in the library, is helpful. The description of \texttt{NilpotencyDegree} (\ref{NilpotencyDegree}) contains information on the IDs of all 3-nilpotent semigroups of order 8. We
can create an enumerator without those semigroups doing the following: 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@# all 8 element semigroups that are not 3-nilpotent|
  !gapprompt@gap>| !gapinput@enum2 := EnumeratorOfSmallSemigroupsByIds([8],[[1..11433106]]);|
  <enumerator of semigroups of size 8>
\end{Verbatim}
 Out of this enumerator the subclass of not nilpotent semigroups can be
extracted. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum3 := EnumeratorOfSmallSemigroups(enum2,IsNilpotentSemigroup,false);|
  !gapprompt@gap>| !gapinput@# This still takes quite a while though|
  !gapprompt@gap>| !gapinput@time;|
  1931140
\end{Verbatim}
 You can avoid the waiting time at setup by using an iterator instead of an
enumerator. An iterator does not know how many elements it contains, one can
always just access the next element - if such exists - and one cannot go back.
(Making copies of an iterator can help to circumvent this problem.) On the
other hand one could in the above example start investigating the first couple
of elements right away. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@iter := IteratorOfSmallSemigroups(enum2,IsNilpotentSemigroup,false);|
  <iterator of semigroups of size 8>
  !gapprompt@gap>| !gapinput@for i in [1..100000] do |
  NextIterator(iter);
  od;
  !gapprompt@gap>| !gapinput@time;|
  30785
\end{Verbatim}
 But even if you know you want to inspect all the semigroups having a property
which is not precomputed, an iterator has the advantage that it does not
create the semigroups before you can actually work with them. To create an
enumerator all semigroups in question will be created and - as said before -
every element is created anew when it is accessed. An iterator on the other
hand creates the semigroups in question one-by-one and returns the next one
having the property. This makes a big difference if the number of semigroups
one is interested in is big like in the example of not nilpotent semigroups of
size 8. In the former example with the rectangular bands it would not play a
role and the disadvantages of an iterator would prevail. 

 As you can see the number of semigroups you are interested in is even more
important in the case of user defined functions than it was in the previous
section about precomputed properties. Sometimes you might have a rough idea
about the numbers - or even a very good one - to base your choice on.
Otherwise the best approach seems to consist of two steps. First, create an
enumerator involving all precomputed properties (try to find as many implied
properties as possible). Then work with an iterator, call the semigroups
one-by-one and store them in a separate list if you think you might want to
look at them again at a later stage. 

  }

 
\subsection{\textcolor{Chapter }{Semigroups of order 8}}\logpage{[ 3, 1, 3 ]}
\hyperdef{L}{X7E4F0756878EB958}{}
{
 When using enumerators and iterators of semigroups of order 8 there are some
limitations. In a 32-bit system the number of semigroups of order 8 exceeds
the maximal length of a list in \textsf{GAP}. The following will work in a 64-bit system, but not on a 32-bit system. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@EnumeratorOfSmallSemigroups(8);|
\end{Verbatim}
 In all other cases there is currently no difference between 32-bit and 64-bit
systems. Hence the following will fail in any case. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@EnumeratorOfSmallSemigroups(8,IsCommutativeSemigroup,false);|
\end{Verbatim}
 Note though that an enumerator of semigroups of order 8 can be created if one
of the required properties is precomputed and takes \texttt{true} as value. This fact was used in the previous subsection, when creating the
enumerator of all bands of order 8 having 1 Green's $D$-class. 

 One could try to circumvent the described problem by using a iterator. The
command 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@iter := IteratorOfSmallSemigroups(8,IsCommutativeSemigroup,false);|
  <iterator>
\end{Verbatim}
 will succeed. But running through the elements in the iterator can take a long
time since the precomputed information is not utilized. A better idea in the
current version of \textsf{Smallsemi} is to divide the enumerator into smaller pieces by restricting the range of
IDs considered at once to at most $2^{28}-1$ (the maximal length of a list in a 32-bit \textsf{GAP}) or possibly by a smaller value, depending on the amount of memory you have
available. For example start with 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum1 := EnumeratorOfSmallSemigroupsByIds([8],[[1..2^24-1]]);|
  <enumerator of semigroups of size 8>
  !gapprompt@gap>| !gapinput@enum2 := EnumeratorOfSmallSemigroups(enum1, IsCommutativeSemigroup, false);|
  <enumerator of semigroups of size 8>
\end{Verbatim}
 Thanks go to Michal Stolorz for the idea of circumventing the current
performance issue for enumerators of small semigroups of order 8 by splitting
it in the described way. }

 }

 
\section{\textcolor{Chapter }{Identifying Semigroups}}\logpage{[ 3, 2, 0 ]}
\hyperdef{L}{X8772952F7B2CFDE1}{}
{
 The data in \textsf{Smallsemi} is as a big catalogue of all structural types of semigroups with at most 8
elements making it possible to refer to the types by their catalogue number,
that is by their ID. With \texttt{IdSmallSemigroup} (\ref{IdSmallSemigroup}) one can find the ID of the structural type of a particular semigroup with at
most 8 elements. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@t1 := RandomTransformation(3);|
  Transformation( [ 1, 3, 1 ] )
  !gapprompt@gap>| !gapinput@t2 := RandomTransformation(3);|
  Transformation( [ 1, 2, 3 ] )
  !gapprompt@gap>| !gapinput@sgrp := SemigroupByGenerators([t1,t2]);|
  <semigroup with 2 generators>
  !gapprompt@gap>| !gapinput@Size(sgrp);|
  3
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(sgrp);|
  [ 3, 8 ]
\end{Verbatim}
 Moreover, one can draw conclusions about a semigroup of size at most 8 using
the precomputed information about the equivalent semigroup from the library.
The precomputed properties are all invariant under isomorphism and
anti-isomorphism. This is most useful in the case where there is no method in \textsf{GAP} to decide the property in the original representation of the semigroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@# use the semigroup from the previous example|
  !gapprompt@gap>| !gapinput@IsCommutative(sgrp); # no need to use the library for this|
  true
  !gapprompt@gap>| !gapinput@# for the following there exists no method for a trans-|
  !gapprompt@gap>| !gapinput@# formation semigroup; access the precomputed information instead |
  !gapprompt@gap>| !gapinput@IsMultSemigroupOfNearRing(SmallSemigroup([3,8]));|
  false
\end{Verbatim}
 \texttt{EquivalenceSmallSemigroup} (\ref{EquivalenceSmallSemigroup}) even provides an isomorphism or anti-isomorphism to a semigroup from the
library. This means one can map elements between the semigroups. Remember that
an isomorphism is returned whenever one exists. This allows to distinguish
between structure types up to isomorphism. Note though, that no information
about subsets - like the set of idempotents or a generating set - is
precomputed for semigroups in the library. If an operation has a method for
the semigroup in the original representation, it is usually more sensible to
simply call this. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@t1 := RandomTransformation(3);|
  Transformation( [ 2, 2, 1 ] )
  !gapprompt@gap>| !gapinput@t2 := RandomTransformation(3);|
  Transformation( [ 2, 1, 1 ] )
  !gapprompt@gap>| !gapinput@sgrp := SemigroupByGenerators([t1,t2]);|
  <semigroup with 2 generators>
  !gapprompt@gap>| !gapinput@Size(sgrp);|
  6
  !gapprompt@gap>| !gapinput@map := EquivalenceSmallSemigroup(sgrp); |
  MappingByFunction( <semigroup with 2 generators>, <small semigroup of size 
  6>, function( x ) ... end )
  !gapprompt@gap>| !gapinput@RespectsMultiplication(map); # verify that this is an anti-isomorphism|
  false
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(Range(map));|
  [ s2, s4 ]
  !gapprompt@gap>| !gapinput@PreImage(map,last); # get a minimal generating set of <sgrp>|
  [ Transformation( [ 1, 1, 2 ] ), Transformation( [ 2, 1, 1 ] ) ]
  !gapprompt@gap>| !gapinput@Idempotents(Range(map));|
  [ s1, s3, s5 ]
  !gapprompt@gap>| !gapinput@PreImage(map,last); # in the same way you can get the idempotents ...|
  [ Transformation( [ 1, 1, 1 ] ), Transformation( [ 1, 2, 2 ] ), 
    Transformation( [ 2, 2, 2 ] ) ]
  !gapprompt@gap>| !gapinput@Idempotents(sgrp); # ... but this can be done directly instead |
  [ Transformation( [ 1, 1, 1 ] ), Transformation( [ 1, 2, 2 ] ), 
    Transformation( [ 2, 2, 2 ] ) ]
\end{Verbatim}
 If for a certain application you are interested in the semigroups up to
isomorphism you can still use the IDs from \textsf{Smallsemi}. Simply mark the ID with $*$, or however else you denote the dual of a semigroup, to refer to the
semigroup being anti-isomorphic to the one in the library having the same ID.
For all semigroups \texttt{IsSelfDualSemigroup} (\ref{IsSelfDualSemigroup}) is precomputed. This will help to decide whether a semigroup and its dual are
actually non-isomorphic. }

  }

  
\chapter{\textcolor{Chapter }{Functionality}}\label{small}
\logpage{[ 4, 0, 0 ]}
\hyperdef{L}{X87F1120883F5B4D0}{}
{
 
\section{\textcolor{Chapter }{Individual Semigroups}}\logpage{[ 4, 1, 0 ]}
\hyperdef{L}{X83F5AF81859D6CBF}{}
{
  The semigroups of sizes 1 to 8 are available up to isomorphism and
anti-isomorphism in \textsf{Smallsemi}. Every semigroup in the library is identified by its size $m$ and a number $n$ lying between 1 and the number of semigroups of size $m$ (see Table \ref{nrobjects}). We call the pair $(m,n)$ the \emph{ID} of the semigroup. 

 In this section we give details about the functions relating to individual
semigroups in \textsf{Smallsemi}. This includes how to access semigroups in the library and how to identify
the semigroup in the library equivalent to an arbitrary semigroup (of size 1
to 8). 

 If you are interested in the properties of a semigroup in the library or would
like to find all the semigroups satisfying a given set of properties please
see Section \ref{props} or Section \ref{enums} respectively.

 

\subsection{\textcolor{Chapter }{SmallSemigroup}}
\logpage{[ 4, 1, 1 ]}\nobreak
\hyperdef{L}{X8538248D78185960}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{SmallSemigroup({\mdseries\slshape m, n})\index{SmallSemigroup@\texttt{SmallSemigroup}}
\label{SmallSemigroup}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{SmallSemigroupNC({\mdseries\slshape m, n})\index{SmallSemigroupNC@\texttt{SmallSemigroupNC}}
\label{SmallSemigroupNC}
}\hfill{\scriptsize (function)}}\\


 returns the semigroup with ID $(\mbox{\texttt{\mdseries\slshape m,n}})$ from the library, that is the \mbox{\texttt{\mdseries\slshape n}}th semigroup with \mbox{\texttt{\mdseries\slshape m}} elements.

 In \texttt{SmallSemigroupNC} no check is performed to verify that \mbox{\texttt{\mdseries\slshape m}} and \mbox{\texttt{\mdseries\slshape n}} are valid arguments. 

 In \texttt{SmallSemigroup} an error is signalled if the semigroups of size \mbox{\texttt{\mdseries\slshape m}} are not classified or if \mbox{\texttt{\mdseries\slshape n}} is greater than the number of semigroups with \mbox{\texttt{\mdseries\slshape m}} elements. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@SmallSemigroup(8,1353452);|
  <small semigroup of size 8>
  !gapprompt@gap>| !gapinput@SmallSemigroupNC(5,1);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@SmallSemigroupNC(5,1)=SmallSemigroup(5,1);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSmallSemigroup}}
\logpage{[ 4, 1, 2 ]}\nobreak
\hyperdef{L}{X857428A57D3FFACB}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSmallSemigroup({\mdseries\slshape sgrp})\index{IsSmallSemigroup@\texttt{IsSmallSemigroup}}
\label{IsSmallSemigroup}
}\hfill{\scriptsize (filter)}}\\


 returns \texttt{true} if \mbox{\texttt{\mdseries\slshape sgrp}} is a semigroup from the library, that is if it was created using \texttt{SmallSemigroup} (\ref{SmallSemigroup}). Otherwise \texttt{false} is returned.

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@sgrp:=RandomSmallSemigroup(5);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsSmallSemigroup(sgrp);|
  true
  !gapprompt@gap>| !gapinput@sgrp:=Semigroup(Transformation([1]));;|
  !gapprompt@gap>| !gapinput@IsSmallSemigroup(sgrp);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSmallSemigroupElt}}
\logpage{[ 4, 1, 3 ]}\nobreak
\hyperdef{L}{X7EC241FB7985775E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSmallSemigroupElt({\mdseries\slshape x})\index{IsSmallSemigroupElt@\texttt{IsSmallSemigroupElt}}
\label{IsSmallSemigroupElt}
}\hfill{\scriptsize (filter)}}\\


 returns \texttt{true} if \mbox{\texttt{\mdseries\slshape x}} is an element of a semigroup from the library, and \texttt{false} otherwise.

 \mbox{\texttt{\mdseries\slshape IsSmallSemigroupElt}} is a representation satisfying \mbox{\texttt{\mdseries\slshape IsPositionalObjectRep}} and \texttt{IsMultiplicativeElement} (\textbf{Reference: IsMultiplicativeElement}) and \mbox{\texttt{\mdseries\slshape IsAttributeStoringRep}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsSmallSemigroupElt(Transformation([1]));|
  false
  !gapprompt@gap>| !gapinput@sgrp:=RandomSmallSemigroup(5);;|
  !gapprompt@gap>| !gapinput@IsSmallSemigroupElt(Random(sgrp));|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RecoverMultiplicationTable}}
\logpage{[ 4, 1, 4 ]}\nobreak
\hyperdef{L}{X793FF84E80B334D1}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RecoverMultiplicationTable({\mdseries\slshape m, n})\index{RecoverMultiplicationTable@\texttt{RecoverMultiplicationTable}}
\label{RecoverMultiplicationTable}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RecoverMultiplicationTableNC({\mdseries\slshape m, n})\index{RecoverMultiplicationTableNC@\texttt{RecoverMultiplicationTableNC}}
\label{RecoverMultiplicationTableNC}
}\hfill{\scriptsize (function)}}\\


 return the multiplication table of the \mbox{\texttt{\mdseries\slshape n}}-th semigroup with \mbox{\texttt{\mdseries\slshape m}} elements from the library. 

 If \mbox{\texttt{\mdseries\slshape m}} is greater than 8 or \mbox{\texttt{\mdseries\slshape n}} greater than the number of semigroups of size \mbox{\texttt{\mdseries\slshape m}}, then \texttt{fail} is returned. The NC version does not perform any tests on the input and will
most likely run into an error in such a case. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@RecoverMultiplicationTable(10,2);|
  fail
  !gapprompt@gap>| !gapinput@RecoverMultiplicationTable(1,2); |
  fail
  !gapprompt@gap>| !gapinput@RecoverMultiplicationTable(2,1);|
  [ [ 1, 1 ], [ 1, 1 ] ]
  !gapprompt@gap>| !gapinput@RecoverMultiplicationTable(8,11111111);|
  [ [ 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 3 ], 
    [ 3, 3, 3, 3, 3, 3, 3, 3 ], [ 1, 1, 1, 4, 4, 4, 4, 1 ], 
    [ 1, 2, 3, 4, 5, 6, 7, 1 ], [ 1, 2, 3, 4, 5, 6, 7, 1 ], 
    [ 1, 2, 3, 4, 5, 6, 7, 1 ], [ 8, 8, 8, 8, 8, 8, 8, 8 ] ]
  !gapprompt@gap>| !gapinput@RecoverMultiplicationTable(2,11111111);|
  fail
\end{Verbatim}
 Note that no semigroup is created calling this function but just the table is
created. This makes it useful if one wants to perform very simple (i.e. quick
in \textsf{GAP}) tests on a large number of semigroups which can be performed on the
multiplication table. 

 To create a semigroup with the multiplication table obtained by \texttt{RecoverMultiplicationTable(\mbox{\texttt{\mdseries\slshape m,n}})} use the function \texttt{SmallSemigroup} (\ref{SmallSemigroup}) with arguments \mbox{\texttt{\mdseries\slshape m,n}}. }

 

\subsection{\textcolor{Chapter }{SemigroupByMultiplicationTableNC}}
\logpage{[ 4, 1, 5 ]}\nobreak
\hyperdef{L}{X813727FD851302B7}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{SemigroupByMultiplicationTableNC({\mdseries\slshape table})\index{SemigroupByMultiplicationTableNC@\texttt{SemigroupByMultiplicationTableNC}}
\label{SemigroupByMultiplicationTableNC}
}\hfill{\scriptsize (function)}}\\


 returns an object with \texttt{IsSemigroup} (\textbf{Reference: IsSemigroup}) and multiplication table \mbox{\texttt{\mdseries\slshape table}} without checking if the multiplication defined by the table is associative.

 If \mbox{\texttt{\mdseries\slshape table}} is not associative, this can lead to errors and wrong results or might even
crash \textsf{GAP}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SemigroupByMultiplicationTableNC([[1,2],[2,1]]);|
  <semigroup of size 2, with 2 generators>
  !gapprompt@gap>| !gapinput@IsSmallSemigroup(s);|
  false
\end{Verbatim}
 Note that this function is \emph{not} used to create semigroups when \texttt{SmallSemigroup} (\ref{SmallSemigroup}) is called. It can be useful in combination with \texttt{RecoverMultiplicationTable} (\ref{RecoverMultiplicationTable}) if one wants to avoid that a semigroup knows it comes from the library. }

 

\subsection{\textcolor{Chapter }{IdSmallSemigroup}}
\logpage{[ 4, 1, 6 ]}\nobreak
\hyperdef{L}{X788211A07D67C282}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IdSmallSemigroup({\mdseries\slshape sgrp})\index{IdSmallSemigroup@\texttt{IdSmallSemigroup}}
\label{IdSmallSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 returns a pair \texttt{[m, n]} such that $(m,n)$ is the ID of a semigroup in \textsf{Smallsemi} equivalent to \mbox{\texttt{\mdseries\slshape sgrp}}. The argument \mbox{\texttt{\mdseries\slshape sgrp}} has to be a semigroup of size 8 or less, otherwise an error is signalled. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@sgrp:=Semigroup(Transformation( [ 1, 2, 2 ] ), Transformation( [ 1, 2, 3 ] ));;|
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(sgrp);|
  [ 2, 3 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{EquivalenceSmallSemigroup}}
\logpage{[ 4, 1, 7 ]}\nobreak
\hyperdef{L}{X79D38A3886C7431D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{EquivalenceSmallSemigroup({\mdseries\slshape sgrp})\index{EquivalenceSmallSemigroup@\texttt{EquivalenceSmallSemigroup}}
\label{EquivalenceSmallSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 returns a mapping \texttt{map} from \mbox{\texttt{\mdseries\slshape sgrp}} to the semigroup in \textsf{Smallsemi} equivalent to \mbox{\texttt{\mdseries\slshape sgrp}}. The mapping is an isomorphism if such exists and an anti-isomorphism
otherwise. The argument \mbox{\texttt{\mdseries\slshape sgrp}} has to be a semigroup of size 8 or less, otherwise an error is signalled. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@sgrp:=Semigroup(Transformation( [ 1, 2, 2 ] ), |
  !gapprompt@>| !gapinput@Transformation( [ 1, 2, 3 ] ));;|
  !gapprompt@gap>| !gapinput@EquivalenceSmallSemigroup(sgrp);|
  SemigroupHomomorphismByImages ( Monoid( 
  [ Transformation( [ 1, 2, 2 ] ) ] )-><small semigroup of size 2>)
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{InfoSmallsemi}}
\logpage{[ 4, 1, 8 ]}\nobreak
\hyperdef{L}{X8078FC78871FA496}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{InfoSmallsemi\index{InfoSmallsemi@\texttt{InfoSmallsemi}}
\label{InfoSmallsemi}
}\hfill{\scriptsize (info class)}}\\


 is the info class (see  (\textbf{Reference: Info Functions})) of \textsf{Smallsemi}. The info level is initially set to 1 which triggers a message whenever data
is loaded into \textsf{GAP}. }

 

\subsection{\textcolor{Chapter }{UnloadSmallsemiData}}
\logpage{[ 4, 1, 9 ]}\nobreak
\hyperdef{L}{X841BB74986A73272}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{UnloadSmallsemiData({\mdseries\slshape use{\textunderscore}later})\index{UnloadSmallsemiData@\texttt{UnloadSmallsemiData}}
\label{UnloadSmallsemiData}
}\hfill{\scriptsize (function)}}\\


 deletes most or all of the data from the \textsf{GAP} workspace that was loaded by \textsf{Smallsemi}. 

 If the boolean \mbox{\texttt{\mdseries\slshape use{\textunderscore}later}} is \texttt{false} all data loaded by \textsf{Smallsemi} is deleted from the workspace, in which case \textsf{Smallsemi} is not guaranteed to work properly without restarting your \textsf{GAP} session. 

 If the boolean \mbox{\texttt{\mdseries\slshape use{\textunderscore}later}} is \texttt{true} only the recoverable data is deleted. This leaves roughly 10 MB of data in the
workspace. }

 }

  
\section{\textcolor{Chapter }{Properties of Semigroups}}\label{props}
\logpage{[ 4, 2, 0 ]}
\hyperdef{L}{X78274024827F306D}{}
{
 In this section we detail the \textsf{GAP} functions that can be used to determine whether a small semigroup satisfies a
certain property. Let \mbox{\texttt{\mdseries\slshape S}} be a semigroup. Then 
\begin{itemize}
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{left zero semigroup} if \mbox{\texttt{\mdseries\slshape xy=x}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape S}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{right zero semigroup} if \mbox{\texttt{\mdseries\slshape xy=y}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape S}}.
\item \mbox{\texttt{\mdseries\slshape S}} is \emph{commutative} if \mbox{\texttt{\mdseries\slshape xy=yx}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape S}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is \emph{simple} if it has no proper two-sided ideals.
\item  \mbox{\texttt{\mdseries\slshape S}} is \emph{zero simple} if the only 2-sided ideals are \mbox{\texttt{\mdseries\slshape \texttt{\symbol{123}}0\texttt{\symbol{125}}}} and \mbox{\texttt{\mdseries\slshape S}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is \emph{regular} if for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape S}} there exists \mbox{\texttt{\mdseries\slshape y}} in \mbox{\texttt{\mdseries\slshape S}} such that \mbox{\texttt{\mdseries\slshape xyx=x}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is \emph{completely regular} if every element of \mbox{\texttt{\mdseries\slshape S}} lies in a subgroup. 
\item  \mbox{\texttt{\mdseries\slshape S}} is an \emph{inverse semigroup} if every element \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape S}} has a unique semigroup inverse, that is, a unique element \mbox{\texttt{\mdseries\slshape y}} such that \mbox{\texttt{\mdseries\slshape xyx=x}} and \mbox{\texttt{\mdseries\slshape yxy=y}}. 
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{Clifford semigroup} if it is a regular semigroup whose idempotents are central, that is, for all \mbox{\texttt{\mdseries\slshape e,x}} in \mbox{\texttt{\mdseries\slshape S}} where \mbox{\texttt{\mdseries\slshape e\texttt{\symbol{94}}2=e}} we have that \mbox{\texttt{\mdseries\slshape ex=xe}}. 
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{band} if every element is an idempotent, that is, \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}} for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape S}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{Brandt semigroup} if it is inverse and zero simple.
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{rectangular band} if for all \mbox{\texttt{\mdseries\slshape x,y,z}} in \mbox{\texttt{\mdseries\slshape S}} we have that \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}} and \mbox{\texttt{\mdseries\slshape xyz=xz}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is a \emph{semiband} if it is generated by its idempotent elements, that is, elements satisfying \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}}.
\item  \mbox{\texttt{\mdseries\slshape S}} is an \emph{orthodox semigroup} if it is regular and its idempotents (elements satisfying \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}}) form a subsemigroup.
\item \mbox{\texttt{\mdseries\slshape S}} is a \emph{zero semigroup} if there exists an element \mbox{\texttt{\mdseries\slshape 0}} in \mbox{\texttt{\mdseries\slshape S}} such that \mbox{\texttt{\mdseries\slshape xy=0}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape S}}.
\item \mbox{\texttt{\mdseries\slshape S}} is a \emph{zero group} if there exists an element \mbox{\texttt{\mdseries\slshape 0}} in \mbox{\texttt{\mdseries\slshape S}} such that \mbox{\texttt{\mdseries\slshape S}} without \mbox{\texttt{\mdseries\slshape 0}} is a group and for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape S}} we have that \mbox{\texttt{\mdseries\slshape x0=0x=0}}.
\end{itemize}
 The \textsf{MONOID} package was used to determined which semigroups in the library satisfy the
properties above. All of the resulting information is stored in the library. 

\subsection{\textcolor{Chapter }{Annihilators}}
\logpage{[ 4, 2, 1 ]}\nobreak
\hyperdef{L}{X86A4F95783A18702}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{Annihilators({\mdseries\slshape sgrp})\index{Annihilators@\texttt{Annihilators}}
\label{Annihilators}
}\hfill{\scriptsize (attribute)}}\\


 returns the set of annihilators of \mbox{\texttt{\mdseries\slshape sgrp}} if \mbox{\texttt{\mdseries\slshape sgrp}} contains a zero element and \texttt{fail} otherwise.

 An element $x$ in a semigroup with zero $z$ is an \emph{annihilator} if $xy=yx=z$ for every element $y$ in the semigroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(5,6);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@Annihilators(s);|
  [ s1, s2 ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{DiagonalOfMultiplicationTable}}
\logpage{[ 4, 2, 2 ]}\nobreak
\hyperdef{L}{X7E1195927C454C8A}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DiagonalOfMultiplicationTable({\mdseries\slshape sgrp})\index{DiagonalOfMultiplicationTable@\texttt{DiagonalOfMultiplicationTable}}
\label{DiagonalOfMultiplicationTable}
}\hfill{\scriptsize (attribute)}}\\


 returns the diagonal of the multiplication table of the semigroup \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(8,10101);;|
  !gapprompt@gap>| !gapinput@DiagonalOfMultiplicationTable(s);|
  [ 1, 1, 1, 1, 1, 1, 1, 1 ]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7,10101);;|
  !gapprompt@gap>| !gapinput@DiagonalOfMultiplicationTable(s);|
  [ 1, 1, 1, 1, 1, 1, 1 ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{DisplaySmallSemigroup}}
\logpage{[ 4, 2, 3 ]}\nobreak
\hyperdef{L}{X7DCF7C368665E94D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DisplaySmallSemigroup({\mdseries\slshape sgrp})\index{DisplaySmallSemigroup@\texttt{DisplaySmallSemigroup}}
\label{DisplaySmallSemigroup}
}\hfill{\scriptsize (function)}}\\


 displays all the information about the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} that is stored in the library and its Green's classes and idempotents. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(6, 3838);;|
  !gapprompt@gap>| !gapinput@DisplaySmallSemigroup(s);|
  IsBand:                              false
  IsBrandtSemigroup:                   false
  IsCommutative:                       false
  IsCompletelyRegularSemigroup:        false
  IsFullTransformationSemigroupCopy:   false
  IsGroupAsSemigroup:                  false
  IsIdempotentGenerated:               false
  IsInverseSemigroup:                  false
  IsMonogenicSemigroup:                false
  IsMonoidAsSemigroup:                 false
  IsMultSemigroupOfNearRing:           false
  IsOrthodoxSemigroup:                 false
  IsRectangularBand:                   false
  IsRegularSemigroup:                  false
  IsSelfDualSemigroup:                 false
  IsSemigroupWithClosedIdempotents:    true
  IsSimpleSemigroup:                   false
  IsSingularSemigroupCopy:             false
  IsZeroSemigroup:                     false
  IsZeroSimpleSemigroup:               false
  MinimalGeneratingSet:                [ s3, s4, s5, s6 ]
  Idempotents:                         [ s1, s5, s6 ]
  GreensRClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s5}, {\
  s6} ]
  GreensLClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s6} ]
  GreensHClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s5}, {\
  s6} ]
  GreensDClasses:                      [ {s1}, {s2}, {s3}, {s4}, {s6} ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IndexPeriod}}
\logpage{[ 4, 2, 4 ]}\nobreak
\hyperdef{L}{X86B662117F4C4C7F}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IndexPeriod({\mdseries\slshape x})\index{IndexPeriod@\texttt{IndexPeriod}}
\label{IndexPeriod}
}\hfill{\scriptsize (attribute)}}\\


 returns the minimum numbers \mbox{\texttt{\mdseries\slshape m, r}} such that \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}\texttt{\symbol{123}}m+r\texttt{\symbol{125}}=x\texttt{\symbol{94}}m}}; known as the index and period of the small semigroup element \mbox{\texttt{\mdseries\slshape x}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,116);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@x:=Elements(s)[3];|
  s3
  !gapprompt@gap>| !gapinput@IndexPeriod(x);|
  [ 2, 1 ]
  !gapprompt@gap>| !gapinput@x^3=x^2;|
  true
  !gapprompt@gap>| !gapinput@x^2=x^1;|
  false
  !gapprompt@gap>| !gapinput@x^3=x^1;|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsBand}}
\logpage{[ 4, 2, 5 ]}\nobreak
\hyperdef{L}{X7C8DB14587D1B55A}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsBand({\mdseries\slshape sgrp})\index{IsBand@\texttt{IsBand}}
\label{IsBand}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a band and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{band} if every element is an idempotent, that is, \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}} for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,519);;|
  !gapprompt@gap>| !gapinput@IsBand(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsBand, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsBand(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);   |
  [ 5, 1010 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsBrandtSemigroup}}
\logpage{[ 4, 2, 6 ]}\nobreak
\hyperdef{L}{X7EFDBA687DCDA6FA}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsBrandtSemigroup({\mdseries\slshape sgrp})\index{IsBrandtSemigroup@\texttt{IsBrandtSemigroup}}
\label{IsBrandtSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a Brandt semigroup and \texttt{false} otherwise.

 A finite semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{Brandt semigroup} if it is inverse and zero simple. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,519);;|
  !gapprompt@gap>| !gapinput@IsBrandtSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsBrandtSemigroup, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsBrandtSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);   |
  [ 5, 149 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsCliffordSemigroup}}
\logpage{[ 4, 2, 7 ]}\nobreak
\hyperdef{L}{X81DE11987BB81017}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsCliffordSemigroup({\mdseries\slshape sgrp})\index{IsCliffordSemigroup@\texttt{IsCliffordSemigroup}}
\label{IsCliffordSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a Clifford semigroup and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{Clifford semigroup} if it is a regular semigroup whose idempotents are central, that is, for all \mbox{\texttt{\mdseries\slshape e,x}} in \mbox{\texttt{\mdseries\slshape sgrp}} where \mbox{\texttt{\mdseries\slshape e\texttt{\symbol{94}}2=e}} we have that \mbox{\texttt{\mdseries\slshape ex=xe}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,519);; |
  !gapprompt@gap>| !gapinput@IsBand(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsBand, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsBand(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);   |
  [ 5, 1010 ]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,519);;|
  !gapprompt@gap>| !gapinput@IsCliffordSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsCliffordSemigroup, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsCliffordSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 5, 148 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsCommutativeSemigroup}}
\logpage{[ 4, 2, 8 ]}\nobreak
\hyperdef{L}{X843EFDA4807FDC31}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsCommutativeSemigroup({\mdseries\slshape sgrp})\index{IsCommutativeSemigroup@\texttt{IsCommutativeSemigroup}}
\label{IsCommutativeSemigroup}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsCommutative({\mdseries\slshape sgrp})\index{IsCommutative@\texttt{IsCommutative}}
\label{IsCommutative}
}\hfill{\scriptsize (property)}}\\


 return \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is commutative and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is \emph{commutative} if \mbox{\texttt{\mdseries\slshape xy=yx}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(6,871);;|
  !gapprompt@gap>| !gapinput@IsCommutativeSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsCommutative, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsCommutativeSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IsCommutative(s);         |
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 5, 1 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsCommutativeSemigroup, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsCommutativeSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IsCommutative(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsCompletelyRegularSemigroup}}
\logpage{[ 4, 2, 9 ]}\nobreak
\hyperdef{L}{X7AFA23AF819FBF3D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsCompletelyRegularSemigroup({\mdseries\slshape sgrp})\index{IsCompletelyRegularSemigroup@\texttt{IsCompletelyRegularSemigroup}}
\label{IsCompletelyRegularSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is completely regular and \texttt{false} otherwise.

 A semigroup is \emph{completely regular} if every element is contained in a subgroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(6,13131);                           |
  <small semigroup of size 6>
  !gapprompt@gap>| !gapinput@IsCompletelyRegularSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(6, IsCompletelyRegularSemigroup, true); |
  <small semigroup of size 6>
  !gapprompt@gap>| !gapinput@IsCompletelyRegularSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 6, 3164 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsFullTransformationSemigroupCopy}}
\logpage{[ 4, 2, 10 ]}\nobreak
\hyperdef{L}{X7D51FD2B7AA3E8DF}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsFullTransformationSemigroupCopy({\mdseries\slshape sgrp})\index{IsFullTransformationSemigroupCopy@\texttt{IsFullTransformationSemigroupCopy}}
\label{IsFullTransformationSemigroupCopy}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is isomorphic to a full transformation semigroup and \texttt{false} otherwise. 

 The size of the full transformation semigroup on an \mbox{\texttt{\mdseries\slshape n}} element set is $n^n$ and so there are only two semigroup in the library that have this property. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(1,1);|
  <small semigroup of size 1>
  !gapprompt@gap>| !gapinput@IsFullTransformationSemigroupCopy(s);|
  true
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, IsFullTransformationSemigroupCopy, true);|
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsFullTransformationSemigroupCopy(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 4, 96 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(6, IsFullTransformationSemigroupCopy, true);|
  fail
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsGroupAsSemigroup}}
\logpage{[ 4, 2, 11 ]}\nobreak
\hyperdef{L}{X852F29E8795FA489}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsGroupAsSemigroup({\mdseries\slshape sgrp})\index{IsGroupAsSemigroup@\texttt{IsGroupAsSemigroup}}
\label{IsGroupAsSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is mathematically a group, and returns \texttt{false} otherwise. Note that no small semigroup can lie in the category \texttt{IsGroup} (\textbf{Reference: IsGroup}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7,7);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsGroupAsSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(4,37);;|
  !gapprompt@gap>| !gapinput@IsGroupAsSemigroup(s);|
  true
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{IsIdempotentGenerated}}\logpage{[ 4, 2, 12 ]}
\hyperdef{L}{X835484C481CF3DDD}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsIdempotentGenerated({\mdseries\slshape sgrp})\index{IsIdempotentGenerated@\texttt{IsIdempotentGenerated}}
\label{IsIdempotentGenerated}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSemiband({\mdseries\slshape sgrp})\index{IsSemiband@\texttt{IsSemiband}}
\label{IsSemiband}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a semiband and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is \emph{idempotent generated} or equivalently a \emph{semiband} if it is generated by its idempotent elements, i.e elements satisfying \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(3, 13);|
  <small semigroup of size 3>
  !gapprompt@gap>| !gapinput@IsIdempotentGenerated(s);|
  true
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(3, IsIdempotentGenerated, false);|
  <small semigroup of size 3>
  !gapprompt@gap>| !gapinput@IsIdempotentGenerated(s);|
  false
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 3, 1 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, IsIdempotentGenerated, true, |
  !gapprompt@>| !gapinput@IsSingularSemigroupCopy, true);|
  fail
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(2, IsIdempotentGenerated, true, |
  !gapprompt@>| !gapinput@IsSingularSemigroupCopy, true);|
  <small semigroup of size 2>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsInverseSemigroup}}
\logpage{[ 4, 2, 13 ]}\nobreak
\hyperdef{L}{X83F1529479D56665}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsInverseSemigroup({\mdseries\slshape sgrp})\index{IsInverseSemigroup@\texttt{IsInverseSemigroup}}
\label{IsInverseSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is an inverse semigroup and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is an \emph{inverse semigroup} if every element \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape sgrp}} has a unique semigroup inverse, that is, a unique element \mbox{\texttt{\mdseries\slshape y}} such that \mbox{\texttt{\mdseries\slshape xyx=x}} and \mbox{\texttt{\mdseries\slshape yxy=y}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(7, IsInverseSemigroup, true);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsInverseSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 101324);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsInverseSemigroup(s);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsLeftZeroSemigroup}}
\logpage{[ 4, 2, 14 ]}\nobreak
\hyperdef{L}{X7E9261367C8C52C0}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsLeftZeroSemigroup({\mdseries\slshape sgrp})\index{IsLeftZeroSemigroup@\texttt{IsLeftZeroSemigroup}}
\label{IsLeftZeroSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a left zero semigroup and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{left zero semigroup} if \mbox{\texttt{\mdseries\slshape xy=x}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 438);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsLeftZeroSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 1141);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsLeftZeroSemigroup(s);|
  true
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsMonogenicSemigroup}}
\logpage{[ 4, 2, 15 ]}\nobreak
\hyperdef{L}{X79D46BAB7E327AD1}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsMonogenicSemigroup({\mdseries\slshape sgrp})\index{IsMonogenicSemigroup@\texttt{IsMonogenicSemigroup}}
\label{IsMonogenicSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is generated by a single element and \texttt{false} otherwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=RandomSmallSemigroup(7);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsMonogenicSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(7, IsMonogenicSemigroup, true);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsMonogenicSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(s);|
  [ s7 ]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup( 7, 406945);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsMonogenicSemigroup(s);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsMonoidAsSemigroup}}
\logpage{[ 4, 2, 16 ]}\nobreak
\hyperdef{L}{X7E4DEECD7CD9886D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsMonoidAsSemigroup({\mdseries\slshape sgrp})\index{IsMonoidAsSemigroup@\texttt{IsMonoidAsSemigroup}}
\label{IsMonoidAsSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a monoid (i.e. has an identity element) and \texttt{false} otherwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(4, 126);|
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsMonoidAsSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, IsMonoidAsSemigroup, true);|
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsMonoidAsSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@One(s);|
  s1
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 4, 7 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsMultSemigroupOfNearRing}}
\logpage{[ 4, 2, 17 ]}\nobreak
\hyperdef{L}{X79FF88207AFC8330}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsMultSemigroupOfNearRing({\mdseries\slshape sgrp})\index{IsMultSemigroupOfNearRing@\texttt{IsMultSemigroupOfNearRing}}
\label{IsMultSemigroupOfNearRing}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if \mbox{\texttt{\mdseries\slshape sgrp}} is isomorphic (or anti-isomorphic?) to the multiplicative semigroup of a
near-ring and \texttt{false} otherwise. 

 Those semigroups in the library that have this property were identified using
the \textsf{Sonata} package. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(7, IsMultSemigroupOfNearRing, true);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 7, 1 ]
  !gapprompt@gap>| !gapinput@IsMultSemigroupOfNearRing(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(2,2);|
  <small semigroup of size 2>
  !gapprompt@gap>| !gapinput@IsMultSemigroupOfNearRing(s);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsNGeneratedSemigroup}}
\logpage{[ 4, 2, 18 ]}\nobreak
\hyperdef{L}{X83D4ED237BB929AF}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsNGeneratedSemigroup({\mdseries\slshape sgrp, n})\index{IsNGeneratedSemigroup@\texttt{IsNGeneratedSemigroup}}
\label{IsNGeneratedSemigroup}
}\hfill{\scriptsize (operation)}}\\


 returns \texttt{true} if the least size of a generating set for the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is \mbox{\texttt{\mdseries\slshape n}} and \texttt{false} otherwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 760041);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsNGeneratedSemigroup(s, 4);|
  false
  !gapprompt@gap>| !gapinput@IsNGeneratedSemigroup(s, 3);|
  true
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(s);|
  [ s3, s5, s7 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, x-> Length(MinimalGeneratingSet(x)), 4);|
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsNGeneratedSemigroup(s, 4);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsNIdempotentSemigroup}}
\logpage{[ 4, 2, 19 ]}\nobreak
\hyperdef{L}{X87BF19367BA2B9ED}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsNIdempotentSemigroup({\mdseries\slshape sgrp, n})\index{IsNIdempotentSemigroup@\texttt{IsNIdempotentSemigroup}}
\label{IsNIdempotentSemigroup}
}\hfill{\scriptsize (operation)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} has \mbox{\texttt{\mdseries\slshape n}} idempotents and \texttt{false} otherwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(4, 75);;|
  !gapprompt@gap>| !gapinput@IsNIdempotentSemigroup(s, 1);|
  false
  !gapprompt@gap>| !gapinput@IsNIdempotentSemigroup(s, 2);|
  false
  !gapprompt@gap>| !gapinput@IsNIdempotentSemigroup(s, 3);|
  true
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{IsNilpotentSemigroup}}\logpage{[ 4, 2, 20 ]}
\hyperdef{L}{X780ADE31828F0848}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsNilpotentSemigroup({\mdseries\slshape sgrp})\index{IsNilpotentSemigroup@\texttt{IsNilpotentSemigroup}}
\label{IsNilpotentSemigroup}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsNilpotent({\mdseries\slshape sgrp})\index{IsNilpotent@\texttt{IsNilpotent}}
\label{IsNilpotent}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is nilpotent and \texttt{false} otherwise. 

 A semigroup is \emph{nilpotent} if it has a zero element and every element to some power equals this zero. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,116);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsNilpotentSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 673768);;|
  !gapprompt@gap>| !gapinput@IsNilpotentSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 657867);;|
  !gapprompt@gap>| !gapinput@IsNilpotent(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsOrthodoxSemigroup}}
\logpage{[ 4, 2, 21 ]}\nobreak
\hyperdef{L}{X7935C476808C8773}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsOrthodoxSemigroup({\mdseries\slshape sgrp})\index{IsOrthodoxSemigroup@\texttt{IsOrthodoxSemigroup}}
\label{IsOrthodoxSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is orthodox and \texttt{false} otherwise. 

 A semigroup is \emph{orthodox} if it is regular and its idempotents form a subsemigroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(6, 15858);;|
  !gapprompt@gap>| !gapinput@IsSemigroupWithClosedIdempotents(s);|
  true
  !gapprompt@gap>| !gapinput@IsRegularSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IsOrthodoxSemigroup(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsRectangularBand}}
\logpage{[ 4, 2, 22 ]}\nobreak
\hyperdef{L}{X7E9B674D781B072C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsRectangularBand({\mdseries\slshape sgrp})\index{IsRectangularBand@\texttt{IsRectangularBand}}
\label{IsRectangularBand}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a rectangular band and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{rectangular band} if for all \mbox{\texttt{\mdseries\slshape x,y,z}} in \mbox{\texttt{\mdseries\slshape sgrp}} we have that \mbox{\texttt{\mdseries\slshape x\texttt{\symbol{94}}2=x}} and \mbox{\texttt{\mdseries\slshape xyz=xz}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 216);;|
  !gapprompt@gap>| !gapinput@IsRectangularBand(s);|
  false
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(6, 15854);;|
  !gapprompt@gap>| !gapinput@IsRectangularBand(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsRegularSemigroup}}
\logpage{[ 4, 2, 23 ]}\nobreak
\hyperdef{L}{X7C4663827C5ACEF1}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsRegularSemigroup({\mdseries\slshape sgrp})\index{IsRegularSemigroup@\texttt{IsRegularSemigroup}}
\label{IsRegularSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a regular semigroup and \texttt{false} otherwise. 

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is \emph{regular} if for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape sgrp}} there exists \mbox{\texttt{\mdseries\slshape y}} in \mbox{\texttt{\mdseries\slshape sgrp}} such that \mbox{\texttt{\mdseries\slshape xyx=x}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(3, 10);;|
  !gapprompt@gap>| !gapinput@IsRegularSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(3, 1);;|
  !gapprompt@gap>| !gapinput@IsRegularSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, IsFullTransformationSemigroupCopy, true); |
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsRegularSemigroup(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsRightZeroSemigroup}}
\logpage{[ 4, 2, 24 ]}\nobreak
\hyperdef{L}{X7CB099958658F979}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsRightZeroSemigroup({\mdseries\slshape sgrp})\index{IsRightZeroSemigroup@\texttt{IsRightZeroSemigroup}}
\label{IsRightZeroSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{false} for any small semigroup \mbox{\texttt{\mdseries\slshape sgrp}} since the library contains only left zero semigroups. 

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{right zero semigroup} if \mbox{\texttt{\mdseries\slshape xy=y}} for all \mbox{\texttt{\mdseries\slshape x,y}} in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 438);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsRightZeroSemigroup(s);|
  false
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsSelfDualSemigroup}}
\logpage{[ 4, 2, 25 ]}\nobreak
\hyperdef{L}{X846FC6247EE31607}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSelfDualSemigroup({\mdseries\slshape sgrp})\index{IsSelfDualSemigroup@\texttt{IsSelfDualSemigroup}}
\label{IsSelfDualSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is self dual and \texttt{false} otherwise. 

 A semigroup is \emph{self dual} if it is isomorphic to its dual, that is, the semigroup \mbox{\texttt{\mdseries\slshape t}} with multiplication \mbox{\texttt{\mdseries\slshape *}} defined by \mbox{\texttt{\mdseries\slshape x*y=yx}} where \mbox{\texttt{\mdseries\slshape yx}} denotes the product in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,116);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsSelfDualSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=RandomSmallSemigroup(5, IsSelfDualSemigroup, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsSelfDualSemigroup(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSemigroupWithClosedIdempotents}}
\logpage{[ 4, 2, 26 ]}\nobreak
\hyperdef{L}{X7D3ACD8A7C0AB34C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSemigroupWithClosedIdempotents({\mdseries\slshape sgrp})\index{IsSemigroupWithClosedIdempotents@\texttt{IsSemigroupWithClosedIdempotents}}
\label{IsSemigroupWithClosedIdempotents}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the idempotent elements of the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} form a subsemigroup and \texttt{false} otherwise. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 677);;|
  !gapprompt@gap>| !gapinput@IsSemigroupWithClosedIdempotents(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 659);;|
  !gapprompt@gap>| !gapinput@IsSemigroupWithClosedIdempotents(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5, 327);;|
  !gapprompt@gap>| !gapinput@IsSemigroupWithClosedIdempotents(s);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSemigroupWithZero}}
\logpage{[ 4, 2, 27 ]}\nobreak
\hyperdef{L}{X82D229727C6278EC}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSemigroupWithZero({\mdseries\slshape sgrp})\index{IsSemigroupWithZero@\texttt{IsSemigroupWithZero}}
\label{IsSemigroupWithZero}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} has a zero element and false otherwise. 

 An element $z$ is a \emph{zero} if $z*x=x*z=z$ for all $x$ in the semigroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(5,1);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsSemigroupWithZero(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(4,26);|
  <small semigroup of size 4>
  !gapprompt@gap>| !gapinput@IsSemigroupWithZero(s);|
  false
\end{Verbatim}
 }

 
\subsection{\textcolor{Chapter }{IsSimpleSemigroup}}\logpage{[ 4, 2, 28 ]}
\hyperdef{L}{X836F4692839F4874}{}
{
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSimpleSemigroup({\mdseries\slshape sgrp})\index{IsSimpleSemigroup@\texttt{IsSimpleSemigroup}}
\label{IsSimpleSemigroup}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsCompletelySimpleSemigroup({\mdseries\slshape sgrp})\index{IsCompletelySimpleSemigroup@\texttt{IsCompletelySimpleSemigroup}}
\label{IsCompletelySimpleSemigroup}
}\hfill{\scriptsize (property)}}\\


 return \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is simple or completely simple and \texttt{false} otherwise. 

 A semigroup is \emph{simple} if it has no proper 2-sided ideals. A semigroup is \emph{completely simple} if it is simple and possesses minimal left and right ideals. 

 A finite semigroup is simple if and only if it is completely simple. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 835080);;|
  !gapprompt@gap>| !gapinput@IsSimpleSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IsCompletelySimpleSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 208242);;|
  !gapprompt@gap>| !gapinput@IsSimpleSemigroup(s);|
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSingularSemigroupCopy}}
\logpage{[ 4, 2, 29 ]}\nobreak
\hyperdef{L}{X85A3F78C864507EB}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsSingularSemigroupCopy({\mdseries\slshape sgrp})\index{IsSingularSemigroupCopy@\texttt{IsSingularSemigroupCopy}}
\label{IsSingularSemigroupCopy}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is isomorphic to a semigroup of singular (i.e. non-invertible) mappings on a
finite set and \texttt{false} otherwise. 

 The size of this semigroup on an $n$ element set is $n^n-n!$ and so there is only one semigroup in the library that has this property. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(1,1);|
  <small semigroup of size 1>
  !gapprompt@gap>| !gapinput@IsSingularSemigroupCopy(s);|
  false
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(2, IsSingularSemigroupCopy, true);|
  <small semigroup of size 2>
  !gapprompt@gap>| !gapinput@IsSingularSemigroupCopy(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 2, 4 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(4, IsSingularSemigroupCopy, true);|
  fail
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsZeroGroup}}
\logpage{[ 4, 2, 30 ]}\nobreak
\hyperdef{L}{X85F7E5CD86F0643B}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsZeroGroup({\mdseries\slshape sgrp})\index{IsZeroGroup@\texttt{IsZeroGroup}}
\label{IsZeroGroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a zero group and \texttt{false} otherwise. 

 The semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{zero group} if there exists an element $z$ in \mbox{\texttt{\mdseries\slshape sgrp}} such that \mbox{\texttt{\mdseries\slshape sgrp}} without $z$ is a group and for all $x$ in $sgrp$ we have that $xz=zx=z$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@g:=Group((1,2),(3,4)); |
  Group([ (1,2), (3,4) ])
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(g); |
  [ 4, 7 ]
  !gapprompt@gap>| !gapinput@s := Range(InjectionZeroMagma(g));|
  <Group([ (1,2), (3,4) ]) with 0 adjoined>
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 5, 149 ]
  !gapprompt@gap>| !gapinput@IsZeroGroup(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsZeroSemigroup}}
\logpage{[ 4, 2, 31 ]}\nobreak
\hyperdef{L}{X81A1882181B75CC9}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsZeroSemigroup({\mdseries\slshape sgrp})\index{IsZeroSemigroup@\texttt{IsZeroSemigroup}}
\label{IsZeroSemigroup}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a zero semigroup and \texttt{false} otherwise. 

 The semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is a \emph{zero semigroup} if there exists an element $z$ in \mbox{\texttt{\mdseries\slshape sgrp}} such that $xy=z$ for all $x,y$ in \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsZeroSemigroup, true);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(s);|
  true
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 5, 1 ]
  !gapprompt@gap>| !gapinput@s:=OneSmallSemigroup(5, IsZeroSemigroup, false);|
  <small semigroup of size 5>
  !gapprompt@gap>| !gapinput@IdSmallSemigroup(s);|
  [ 5, 2 ]
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(s);|
  false
\end{Verbatim}
 Note that for each size the unique zero semigroup is always the first
semigroup of this size in the library. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(SmallSemigroup(6,1));|
  true
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(SmallSemigroup(7,1));|
  true
  !gapprompt@gap>| !gapinput@IsZeroSemigroup(SmallSemigroup(8,1));|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsZeroSimpleSemigroup}}
\logpage{[ 4, 2, 32 ]}\nobreak
\hyperdef{L}{X8193A60F839C064E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsZeroSimpleSemigroup({\mdseries\slshape sgrp})\index{IsZeroSimpleSemigroup@\texttt{IsZeroSimpleSemigroup}}
\label{IsZeroSimpleSemigroup}
}\hfill{\scriptsize (property)}}\\


 return \texttt{true} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is zero simple and \texttt{false} otherwise.

 A semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is \emph{zero simple} if the only 2-sided ideals are the zero \mbox{\texttt{\mdseries\slshape \texttt{\symbol{123}}0\texttt{\symbol{125}}}} and \mbox{\texttt{\mdseries\slshape sgrp}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 519799);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsZeroSimpleSemigroup(s);|
  false
  !gapprompt@gap>| !gapinput@s:=RandomSmallSemigroup(7, IsZeroSimpleSemigroup, true); |
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@IsZeroSimpleSemigroup(s);|
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinimalGeneratingSet}}
\logpage{[ 4, 2, 33 ]}\nobreak
\hyperdef{L}{X81D15723804771E2}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{MinimalGeneratingSet({\mdseries\slshape sgrp})\index{MinimalGeneratingSet@\texttt{MinimalGeneratingSet}}
\label{MinimalGeneratingSet}
}\hfill{\scriptsize (attribute)}}\\


 returns a set of generators for \mbox{\texttt{\mdseries\slshape sgrp}} with minimal size. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(8, 1478885610);;|
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(s);|
  [ s4, s5, s6, s7, s8 ]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(7, 673768);;|
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(s);|
  [ s4, s5, s6, s7 ]
  !gapprompt@gap>| !gapinput@s:=SmallSemigroup(4, 4);;|
  !gapprompt@gap>| !gapinput@MinimalGeneratingSet(s);|
  [ s2, s3, s4 ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{NilpotencyDegree}}
\logpage{[ 4, 2, 34 ]}\nobreak
\hyperdef{L}{X7D1C336E7B0A059C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{NilpotencyDegree({\mdseries\slshape sgrp})\index{NilpotencyDegree@\texttt{NilpotencyDegree}}
\label{NilpotencyDegree}
}\hfill{\scriptsize (attribute)}}\\


 returns the least $n$ such that every product of $n$ elements in the nilpotent semigroup \mbox{\texttt{\mdseries\slshape sgrp}} equals the zero element and returns \texttt{fail} if the semigroup \mbox{\texttt{\mdseries\slshape sgrp}} is not nilpotent. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(5, 1121);;|
  !gapprompt@gap>| !gapinput@NilpotencyDegree(s);|
  fail
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(7, 393450);;|
  !gapprompt@gap>| !gapinput@NilpotencyDegree(s);|
  3
\end{Verbatim}
  Note that for size 8 a semigroup in the library with ID $(8,n)$ is nilpotent of degree 3 if and only if $n$ is greater than 11433106. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(8, 11433106+1231);;|
  !gapprompt@gap>| !gapinput@NilpotencyDegree(s);|
  3
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(8,NrSmallSemigroups(8));;|
  !gapprompt@gap>| !gapinput@NilpotencyDegree(s);|
  3
\end{Verbatim}
  }

 }

 
\section{\textcolor{Chapter }{Nilpotent semigroups by coclass}}\label{coclass}
\logpage{[ 4, 3, 0 ]}
\hyperdef{L}{X866B154E7F54AE62}{}
{
 A useful parameter in the classification of nilpotent semigroups is their
coclass. For a finite nilpotent semigroup of order $n$ and nilpotency degree $d$ the coclass is defined as $n-d$. In \cite{Dis14} lists up to (anti-)isomorphism are provided for nilpotent semigroups of
coclass 0, 1, and 2. The semigroups in the lists are given by finite
presentations. In this section we describe a function that allows to access
such lists in \textsf{GAP}. 

 A further invariant of a nilpotent semigroup $S$ is the size of its unique minimal generating set $S\backslash S^2$. The possible sizes for a particular coclass are restricted. Monogenic
nilpotent semigroups are precisely those of coclass 0. For coclass $d \geq 1$ the size of the minimal generating set is at least 2 and at most $d+1$. 

\subsection{\textcolor{Chapter }{NilpotentSemigroupsByCoclass}}
\logpage{[ 4, 3, 1 ]}\nobreak
\hyperdef{L}{X819BD88C78976AFD}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{NilpotentSemigroupsByCoclass({\mdseries\slshape n, d[, r]})\index{NilpotentSemigroupsByCoclass@\texttt{NilpotentSemigroupsByCoclass}}
\label{NilpotentSemigroupsByCoclass}
}\hfill{\scriptsize (function)}}\\


 returns for a positive integer \mbox{\texttt{\mdseries\slshape n}} and an integer \mbox{\texttt{\mdseries\slshape d}} with value 0, 1, or 2 a list of nilpotent semigroups of order \mbox{\texttt{\mdseries\slshape n}} and coclass \mbox{\texttt{\mdseries\slshape d}} up to (anti-)isomorphism. If the optional third argument \mbox{\texttt{\mdseries\slshape r}} is given then only semigroups of rank \mbox{\texttt{\mdseries\slshape r}} are returned. The semigroups in the list are given by finite presentations. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@NilpotentSemigroupsByCoclass(5,1);|
  [ <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]>, 
    <fp semigroup on the generators [ s1, s2 ]> ]
  !gapprompt@gap>| !gapinput@NilpotentSemigroupsByCoclass(7,0);|
  [ <fp semigroup on the generators [ s1 ]> ]
  !gapprompt@gap>| !gapinput@NilpotentSemigroupsByCoclass(4,2,3);|
  [ <fp semigroup on the generators [ s1, s2, s3 ]> ]
\end{Verbatim}
  }

 }

 
\section{\textcolor{Chapter }{Starred Green's relations}}\label{star}
\logpage{[ 4, 4, 0 ]}
\hyperdef{L}{X7D6E81E37E3AAED8}{}
{
 In this section functionality around the starred Green's relations is
described. The five starred Green's relations are $R^*$, $L^*$, $J^*$, $H^*$, and $D^*$; two elements $a$, $b$ from a semigroup $S$ are $R^*$-related if for all $x, y \in S^1: xa=ya$ if and only if $xb = yb$; and $a$ and $b$ are $L^*$-related if for all $x, y \in S^1: ax=ay$ if and only if $bx = by$. In parallel to the classical Green's relations  (\textbf{Reference: Green's Relations}) $H^*=R^* \wedge L^*$ and $D^*= R^* \vee L^*$ (but $R^* \circ L^* = L^* \circ R^*$ does \emph{not} hold in general). To describe $J^*$ is a bit more technical. For $a,b \in S$ one can show that $b$ lies in $J^*(a)$, the principal *-ideal of $a$, if and only if there exist $c_0,c_1\ldots,c_n\in S$ and $x_1,\ldots,x_n,y_1,\ldots, y_n\in S^1$ such that $a=c_0, b=c_n$ and $c_iD^*x_ic_{i-1}y_i$ for $1\leq i\leq n$. Then $aJ^*b$ if and only if both $a\in J^*(b)$ and $b\in J^*(a)$ 

 Note that even for finite semigroups $J^*$ does not always equal $D^*$ (in contrast to the situation for classical Green's relations). Using \textsf{Smallsemi} it was shown that there exist semigroups of order 8 with $J^*\neq D^*$ \cite{DMU13}. 

\subsection{\textcolor{Chapter }{IsStarRelation}}
\logpage{[ 4, 4, 1 ]}\nobreak
\hyperdef{L}{X84EAD3BC80389059}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsStarRelation({\mdseries\slshape bin-relation})\index{IsStarRelation@\texttt{IsStarRelation}}
\label{IsStarRelation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsRStarRelation({\mdseries\slshape equiv-relation})\index{IsRStarRelation@\texttt{IsRStarRelation}}
\label{IsRStarRelation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsLStarRelation({\mdseries\slshape equiv-relation})\index{IsLStarRelation@\texttt{IsLStarRelation}}
\label{IsLStarRelation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsJStarRelation({\mdseries\slshape equiv-relation})\index{IsJStarRelation@\texttt{IsJStarRelation}}
\label{IsJStarRelation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsHStarRelation({\mdseries\slshape equiv-relation})\index{IsHStarRelation@\texttt{IsHStarRelation}}
\label{IsHStarRelation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsDStarRelation({\mdseries\slshape equiv-relation})\index{IsDStarRelation@\texttt{IsDStarRelation}}
\label{IsDStarRelation}
}\hfill{\scriptsize (property)}}\\


 These functions return \texttt{true} if the argument is the respective type of relation and \texttt{false} otherwise. }

 

\subsection{\textcolor{Chapter }{RStarRelation}}
\logpage{[ 4, 4, 2 ]}\nobreak
\hyperdef{L}{X7A8059EC848E0A77}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RStarRelation({\mdseries\slshape semigroup})\index{RStarRelation@\texttt{RStarRelation}}
\label{RStarRelation}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{LStarRelation({\mdseries\slshape semigroup})\index{LStarRelation@\texttt{LStarRelation}}
\label{LStarRelation}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{JStarRelation({\mdseries\slshape semigroup})\index{JStarRelation@\texttt{JStarRelation}}
\label{JStarRelation}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DStarRelation({\mdseries\slshape semigroup})\index{DStarRelation@\texttt{DStarRelation}}
\label{DStarRelation}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{HStarRelation({\mdseries\slshape semigroup})\index{HStarRelation@\texttt{HStarRelation}}
\label{HStarRelation}
}\hfill{\scriptsize (attribute)}}\\


 The starred Green's relations (which are equivalence relations) are attributes
of the semigroup \mbox{\texttt{\mdseries\slshape semigroup}}. }

 

\subsection{\textcolor{Chapter }{RStarClass (for a semigroup and element)}}
\logpage{[ 4, 4, 3 ]}\nobreak
\hyperdef{L}{X7D30CDC386C8816A}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RStarClass({\mdseries\slshape S, a})\index{RStarClass@\texttt{RStarClass}!for a semigroup and element}
\label{RStarClass:for a semigroup and element}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{LStarClass({\mdseries\slshape S, a})\index{LStarClass@\texttt{LStarClass}!for a semigroup and element}
\label{LStarClass:for a semigroup and element}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DStarClass({\mdseries\slshape S, a})\index{DStarClass@\texttt{DStarClass}!for a semigroup and element}
\label{DStarClass:for a semigroup and element}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{JStarClass({\mdseries\slshape S, a})\index{JStarClass@\texttt{JStarClass}!for a semigroup and element}
\label{JStarClass:for a semigroup and element}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{HStarClass({\mdseries\slshape S, a})\index{HStarClass@\texttt{HStarClass}!for a semigroup and element}
\label{HStarClass:for a semigroup and element}
}\hfill{\scriptsize (operation)}}\\


 Creates the $X*$-class of the element \mbox{\texttt{\mdseries\slshape a}} in the semigroup \mbox{\texttt{\mdseries\slshape S}} where $X$ is one of $L$, $R$, $D$, $J$, or $H$. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(7, 280142);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@elm := AsList(s)[5];;|
  !gapprompt@gap>| !gapinput@jclass := JStarClass(s, elm);|
  {s5}
  !gapprompt@gap>| !gapinput@AsList(jclass);|
  [ s2, s3, s4, s5 ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{RStarClass (for a Green's *-class)}}
\logpage{[ 4, 4, 4 ]}\nobreak
\hyperdef{L}{X83E1C16B8247ECBD}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RStarClass({\mdseries\slshape C})\index{RStarClass@\texttt{RStarClass}!for a Green's *-class}
\label{RStarClass:for a Green's *-class}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{LStarClass({\mdseries\slshape C})\index{LStarClass@\texttt{LStarClass}!for a Green's *-class}
\label{LStarClass:for a Green's *-class}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DStarClass({\mdseries\slshape C})\index{DStarClass@\texttt{DStarClass}!for a Green's *-class}
\label{DStarClass:for a Green's *-class}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{JStarClass({\mdseries\slshape C})\index{JStarClass@\texttt{JStarClass}!for a Green's *-class}
\label{JStarClass:for a Green's *-class}
}\hfill{\scriptsize (attribute)}}\\


 are attributes reflecting the natural ordering over the various starred
Green's classes. They return the respective class in which the given class $C$ is contained, where $C$ must be a class from a strictly finer relation. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(7, 280142);|
  <small semigroup of size 7>
  !gapprompt@gap>| !gapinput@elm := AsList(s)[5];;|
  !gapprompt@gap>| !gapinput@hclass := HStarClass(s, elm);|
  {s5}
  !gapprompt@gap>| !gapinput@AsList(LStarClass(hclass));|
  [ s5 ]
  !gapprompt@gap>| !gapinput@AsList(RStarClass(hclass));|
  [ s2, s5 ]
  !gapprompt@gap>| !gapinput@AsList(DStarClass(hclass));|
  [ s2, s3, s4, s5 ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsStarClass}}
\logpage{[ 4, 4, 5 ]}\nobreak
\hyperdef{L}{X82A391177D13A7E0}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsStarClass({\mdseries\slshape equiv-class})\index{IsStarClass@\texttt{IsStarClass}}
\label{IsStarClass}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsRStarClass({\mdseries\slshape equiv-class})\index{IsRStarClass@\texttt{IsRStarClass}}
\label{IsRStarClass}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsLStarClass({\mdseries\slshape equiv-class})\index{IsLStarClass@\texttt{IsLStarClass}}
\label{IsLStarClass}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsJStarClass({\mdseries\slshape equiv-class})\index{IsJStarClass@\texttt{IsJStarClass}}
\label{IsJStarClass}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsHStarClass({\mdseries\slshape equiv-class})\index{IsHStarClass@\texttt{IsHStarClass}}
\label{IsHStarClass}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsDStarClass({\mdseries\slshape equiv-class})\index{IsDStarClass@\texttt{IsDStarClass}}
\label{IsDStarClass}
}\hfill{\scriptsize (property)}}\\


 return \texttt{true} if the equivalence class \mbox{\texttt{\mdseries\slshape equiv-class}} is a starred Green's class of any type, or of $R$, $L$, $J$, $H$, $D$ type, respectively, or \texttt{false} otherwise. }

 

\subsection{\textcolor{Chapter }{RStarClasses}}
\logpage{[ 4, 4, 6 ]}\nobreak
\hyperdef{L}{X83B9C0417C03A220}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RStarClasses({\mdseries\slshape semigroup})\index{RStarClasses@\texttt{RStarClasses}}
\label{RStarClasses}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{LStarClasses({\mdseries\slshape semigroup})\index{LStarClasses@\texttt{LStarClasses}}
\label{LStarClasses}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{JStarClasses({\mdseries\slshape semigroup})\index{JStarClasses@\texttt{JStarClasses}}
\label{JStarClasses}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{DStarClasses({\mdseries\slshape semigroup})\index{DStarClasses@\texttt{DStarClasses}}
\label{DStarClasses}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{HStarClasses({\mdseries\slshape semigroup})\index{HStarClasses@\texttt{HStarClasses}}
\label{HStarClasses}
}\hfill{\scriptsize (attribute)}}\\


 return the $R$, $L$, $J$, $H$, or $D$ starred Green's classes, respectively for semigroup \mbox{\texttt{\mdseries\slshape semigroup}}. \texttt{EquivalenceClasses} for a Green's relation lead to one of these functions. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@s := SmallSemigroup(6, 54);|
  <small semigroup of size 6>
  !gapprompt@gap>| !gapinput@JStarClasses(s);|
  [ {s1}, {s2}, {s4}, {s5}, {s6} ]
\end{Verbatim}
  }

 }

 
\section{\textcolor{Chapter }{Families of Semigroups}}\label{enums}
\logpage{[ 4, 5, 0 ]}
\hyperdef{L}{X82F9C36C86006857}{}
{
 In this section we describe how to find semigroups in the library satisfying a
given set of parameters.

 The following functions have the same usage but may return different values: \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}), \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}), \texttt{EnumeratorSortedOfSmallSemigroups} (\ref{EnumeratorSortedOfSmallSemigroups}), \texttt{IdsOfSmallSemigroups} (\ref{IdsOfSmallSemigroups}), \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}), \texttt{NrSmallSemigroups} (\ref{NrSmallSemigroups}), \texttt{OneSmallSemigroup} (\ref{OneSmallSemigroup}), \texttt{PositionsOfSmallSemigroups} (\ref{PositionsOfSmallSemigroups}), \texttt{RandomSmallSemigroup} (\ref{RandomSmallSemigroup}). 

 The number of arguments should be odd: 
\begin{itemize}
\item the first argument \texttt{arg[1]} should be a positive integer, a list of positive integers, or an enumerator or
iterator of small semigroups satisfying \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}) or \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups})
\item  the even arguments \texttt{arg[2i]}, if present, should be a function
\item  the odd arguments \texttt{arg[2i+1]} argument should be a possible value that can be returned by the function \texttt{arg[2i]}.
\end{itemize}
 In the case that the function is \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}) and \texttt{arg[1]} is a positive integer, then the returned value is a list of all semigroups $S$ with \texttt{arg[1]} elements such that \texttt{arg[2i](S)=arg[2i+1]}.

 For example, to obtain all the commutative semigroups with \mbox{\texttt{\mdseries\slshape 3}} idempotents of sizes \mbox{\texttt{\mdseries\slshape 2}} to \mbox{\texttt{\mdseries\slshape 5}} use one of \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}), \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}), \texttt{EnumeratorSortedOfSmallSemigroups} (\ref{EnumeratorSortedOfSmallSemigroups}), \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}) with argument 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  [2..5], IsCommutative, true, Is3IdempotentGenerated, true
  	
\end{Verbatim}
 \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}) returns a list of all such semigroups, \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}), \texttt{EnumeratorSortedOfSmallSemigroups} (\ref{EnumeratorSortedOfSmallSemigroups}), and \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}) return an enumerator and an iterator of all such semigroups, respectively. For
more information on enumerators and iterators see \texttt{Enumerator} (\textbf{Reference: Enumerator}), \texttt{EnumeratorSorted} (\textbf{Reference: EnumeratorSorted}), or \texttt{Iterator} (\textbf{Reference: Iterator}). The following are rules of thumb regarding the different situations when
these functions should be used in order of slowest to fastest and greatest
memory use to least: 
\begin{itemize}
\item \texttt{AllSmallSemigroups} (\ref{AllSmallSemigroups}) should be used if the number of semigroups is not too large and you want to
keep the created semigroups in a list. 
\item \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}) or \texttt{EnumeratorSortedOfSmallSemigroups} (\ref{EnumeratorSortedOfSmallSemigroups}) should be used when the functions in even indexed positions are those stored
in the library (see \texttt{PrecomputedSmallSemisInfo} (\ref{PrecomputedSmallSemisInfo})) or you want repeatedly search the same set of semigroups and there are too
many to store in a list. Note that the enumerator stores the id numbers of its
elements but not the semigroups themselves. Hence every time an element of the
enumerator is required it must be recreated from the multiplication table
data. 
\item \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}) should be used if the functions in even indexed positions are not stored in
the library (see \texttt{PrecomputedSmallSemisInfo} (\ref{PrecomputedSmallSemisInfo})) or if you just want to run through all the semigroups satisfying the
specified parameters once only. Note that each new call of \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}) requires \textsf{GAP} to recompute its elements which may be slow if the functions are user-defined
or not stored in the library.
\end{itemize}
 Further information on the relative virtues of these different commands can be
found in Chapter \ref{examples}.

 As a further example, if we want to obtain a single non-simple semigroup with $7$ elements and trivial automorphism group, then we would use one of the
functions \texttt{OneSmallSemigroup} (\ref{OneSmallSemigroup}) or \texttt{RandomSmallSemigroup} (\ref{RandomSmallSemigroup}) with argument

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  7, IsSimpleSemigroup, false, x-> IsTrivial(AutomorphismGroup(x)), true
  	
\end{Verbatim}
 \texttt{OneSmallSemigroup} (\ref{OneSmallSemigroup}) should return an answer more quickly than \texttt{RandomSmallSemigroup} (\ref{RandomSmallSemigroup}). Also note that \texttt{OneSmallSemigroup} (\ref{OneSmallSemigroup}) will always return the same semigroup, i.e. the first semigroup in the library
with the given parameters. 

\subsection{\textcolor{Chapter }{AllSmallSemigroups}}
\logpage{[ 4, 5, 1 ]}\nobreak
\hyperdef{L}{X81DC0FE28043C9B0}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{AllSmallSemigroups({\mdseries\slshape arg})\index{AllSmallSemigroups@\texttt{AllSmallSemigroups}}
\label{AllSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{AllSmallSemigroups} returns a list of all the small semigroups \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{AllSmallSemigroups} returns a list of all the small semigroups \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{AllSmallSemigroups} returns a list of all the small semigroups \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
    gap> AllSmallSemigroups(2);
    [ <small semigroup of size 2>, <small semigroup of size 2>,
      <small semigroup of size 2>, <small semigroup of size 2> ]
    gap> AllSmallSemigroups([2,3], IsRegularSemigroup, true,
    > x-> Length(GreensRClasses(x)), 1);
    [ <small semigroup of size 2>, <small semigroup of size 2>,
      <small semigroup of size 3>, <small semigroup of size 3> ]
    gap> enum:=EnumeratorOfSmallSemigroups(8, IsInverseSemigroup, true,
    > IsCommutativeSemigroup, true);;
    gap> AllSmallSemigroups(enum, x-> Length(GreensRClasses(x)), 1);
    [ <small semigroup of size 8>, <small semigroup of size 8>,
      <small semigroup of size 8> ]
    gap> iter:=IteratorOfSmallSemigroups(7, x-> Length(GreensRClasses(x)), 1);;
    gap> AllSmallSemigroups(iter, IsCommutative, true,
    > IsSimpleSemigroup, true);
    [ <small semigroup of size 7> ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{EnumeratorOfSmallSemigroups}}
\logpage{[ 4, 5, 2 ]}\nobreak
\hyperdef{L}{X831E543E83DDFDEA}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{EnumeratorOfSmallSemigroups({\mdseries\slshape arg})\index{EnumeratorOfSmallSemigroups@\texttt{EnumeratorOfSmallSemigroups}}
\label{EnumeratorOfSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{EnumeratorOfSmallSemigroups} returns an enumerator of all the small semigroups \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{EnumeratorOfSmallSemigroups} returns an enumerator of all the small semigroups \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{EnumeratorOfSmallSemigroups} returns an enumerator of all the small semigroups \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups(7);|
  <enumerator of semigroups of size 7>
  !gapprompt@gap>| !gapinput@EnumeratorOfSmallSemigroups([2,3], IsRegularSemigroup, true);|
  <enumerator of semigroups of sizes [ 2, 3 ]>
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups(8, IsInverseSemigroup, true,|
  !gapprompt@>| !gapinput@IsCommutativeSemigroup, true);|
  <enumerator of semigroups of size 8>
  !gapprompt@gap>| !gapinput@EnumeratorOfSmallSemigroups(enum, IsCommutativeSemigroup, true,|
  !gapprompt@>| !gapinput@IsSimpleSemigroup, false);|
  <enumerator of semigroups of size 8>
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups(8);|
  <iterator>
  !gapprompt@gap>| !gapinput@EnumeratorOfSmallSemigroups(iter, IsCommutativeSemigroup, true,|
  !gapprompt@>| !gapinput@IsSimpleSemigroup, false);|
  <enumerator of semigroups of size 8>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{EnumeratorOfSmallSemigroupsByIds}}
\logpage{[ 4, 5, 3 ]}\nobreak
\hyperdef{L}{X7F8EF88E7EB417A8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{EnumeratorOfSmallSemigroupsByIds({\mdseries\slshape arg})\index{EnumeratorOfSmallSemigroupsByIds@\texttt{EnumeratorOfSmallSemigroupsByIds}}
\label{EnumeratorOfSmallSemigroupsByIds}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{EnumeratorOfSmallSemigroupsByIdsNC({\mdseries\slshape arg})\index{EnumeratorOfSmallSemigroupsByIdsNC@\texttt{EnumeratorOfSmallSemigroupsByIdsNC}}
\label{EnumeratorOfSmallSemigroupsByIdsNC}
}\hfill{\scriptsize (operation)}}\\


 the argument of this function should be one of the following: 
\begin{itemize}
\item  a positive integer \mbox{\texttt{\mdseries\slshape arg[1]}} and a set of positive integers less than \texttt{NrSmallSemigroups} (\ref{NrSmallSemigroups}) with argument \mbox{\texttt{\mdseries\slshape arg[1]}}. For example, the argument \mbox{\texttt{\mdseries\slshape 3, [1..10]}} yields the first 10 semigroups with 3 elements. 
\item  a set of positive integers \mbox{\texttt{\mdseries\slshape arg[1]}} and a list of sets of positive integers \mbox{\texttt{\mdseries\slshape arg[2]}} such that \mbox{\texttt{\mdseries\slshape x}} is at most \texttt{NrSmallSemigroups} (\ref{NrSmallSemigroups}) with argument \mbox{\texttt{\mdseries\slshape arg[1][i]}} for all \mbox{\texttt{\mdseries\slshape x}} in \mbox{\texttt{\mdseries\slshape arg[2][i]}}. For example, \mbox{\texttt{\mdseries\slshape [2,3], [[1..2],[1..10]]}} yields the first 2 semigroups of size 2, and the first 10 semigroups of size
3.
\item  a list of id numbers, for example, \mbox{\texttt{\mdseries\slshape [[7,1], [6,1], [5,1]]}}.
\end{itemize}
 The no check version does not check that the arguments are valid and may
return unpredictable results. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroupsByIds([[7,1],[6,1],[5,1]]);|
  <enumerator of semigroups of sizes [ 5, 6, 7 ]>
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroupsByIds(7, [1..1000]);|
  <enumerator of semigroups of size 7>
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroupsByIds([2,3], [[1..2],[1..10]]);|
  <enumerator of semigroups of sizes [ 2, 3 ]>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{EnumeratorSortedOfSmallSemigroups}}
\logpage{[ 4, 5, 4 ]}\nobreak
\hyperdef{L}{X8306153E7B988D45}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{EnumeratorSortedOfSmallSemigroups({\mdseries\slshape arg})\index{EnumeratorSortedOfSmallSemigroups@\texttt{EnumeratorSortedOfSmallSemigroups}}
\label{EnumeratorSortedOfSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 accepts the same arguments and returns the same values as \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}). }

 

\subsection{\textcolor{Chapter }{FuncsOfSmallSemisInEnum}}
\logpage{[ 4, 5, 5 ]}\nobreak
\hyperdef{L}{X7BED502C80DE7C78}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{FuncsOfSmallSemisInEnum({\mdseries\slshape enum})\index{FuncsOfSmallSemisInEnum@\texttt{FuncsOfSmallSemisInEnum}}
\label{FuncsOfSmallSemisInEnum}
}\hfill{\scriptsize (function)}}\\


 returns a list of the functions and their values that were used to create the
enumerator of small semigroups \mbox{\texttt{\mdseries\slshape enum}}. If you only want the names of these functions use \texttt{NamesFuncsSmallSemisInEnum} (\ref{NamesFuncsSmallSemisInEnum}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups([2..4], IsSimpleSemigroup, false,|
  !gapprompt@>| !gapinput@IsRegularSemigroup, true);;                                         |
  !gapprompt@gap>| !gapinput@FuncsOfSmallSemisInEnum(enum);|
  [ <Property "IsRegularSemigroup">, true, 
    <Property "IsSimpleSemigroup">, false ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{FuncsOfSmallSemisInIter}}
\logpage{[ 4, 5, 6 ]}\nobreak
\hyperdef{L}{X8227884778A86F70}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{FuncsOfSmallSemisInIter({\mdseries\slshape iter})\index{FuncsOfSmallSemisInIter@\texttt{FuncsOfSmallSemisInIter}}
\label{FuncsOfSmallSemisInIter}
}\hfill{\scriptsize (function)}}\\


 returns a list of the functions and their values that were used to create the
iterator of small semigroups \mbox{\texttt{\mdseries\slshape iter}}. If you only want the names of these functions use \texttt{NamesFuncsSmallSemisInIter} (\ref{NamesFuncsSmallSemisInIter}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=IteratorOfSmallSemigroups([2..4], IsSimpleSemigroup, false,|
  !gapprompt@>| !gapinput@IsRegularSemigroup, true);;                                        |
  !gapprompt@gap>| !gapinput@FuncsOfSmallSemisInIter(enum);|
  [ <Property "IsRegularSemigroup">, true, 
    <Property "IsSimpleSemigroup">, false ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IdsOfSmallSemigroups}}
\logpage{[ 4, 5, 7 ]}\nobreak
\hyperdef{L}{X814BA9F778B06D47}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IdsOfSmallSemigroups({\mdseries\slshape arg})\index{IdsOfSmallSemigroups@\texttt{IdsOfSmallSemigroups}}
\label{IdsOfSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{IdsOfSmallSemigroups} returns a list of the id numbers of all the small semigroups \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{IdsOfSmallSemigroups} returns a list of the id numbers of all the small semigroups \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{IdsOfSmallSemigroups} returns a list of the id numbers of all the small semigroups \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@ enum:=EnumeratorOfSmallSemigroups(5, x-> Length(GreensRClasses(x)), 1);;|
  !gapprompt@gap>| !gapinput@IdsOfSmallSemigroups(enum, IsCommutativeSemigroup, true,|
  !gapprompt@>| !gapinput@IsSimpleSemigroup, false);                                              |
  [  ]
  !gapprompt@gap>| !gapinput@IdsOfSmallSemigroups([2,3], IsRegularSemigroup, true);  |
  [ [ 2, 2 ], [ 2, 3 ], [ 2, 4 ], [ 3, 10 ], [ 3, 11 ], [ 3, 12 ], 
    [ 3, 13 ], [ 3, 14 ], [ 3, 15 ], [ 3, 16 ], [ 3, 17 ], [ 3, 18 ] ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsEnumeratorOfSmallSemigroups}}
\logpage{[ 4, 5, 8 ]}\nobreak
\hyperdef{L}{X7BF0DCA5853A5C22}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsEnumeratorOfSmallSemigroups({\mdseries\slshape enum})\index{IsEnumeratorOfSmallSemigroups@\texttt{IsEnumeratorOfSmallSemigroups}}
\label{IsEnumeratorOfSmallSemigroups}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if \mbox{\texttt{\mdseries\slshape enum}} is an enumerator of small semigroups created using \texttt{EnumeratorOfSmallSemigroups} (\ref{EnumeratorOfSmallSemigroups}), \texttt{EnumeratorOfSmallSemigroupsByIds} (\ref{EnumeratorOfSmallSemigroupsByIds}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroupsByIds([[2,1], [3,1], [4,1]]);;|
  !gapprompt@gap>| !gapinput@IsEnumeratorOfSmallSemigroups(enum);|
  true
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsIdSmallSemigroup}}
\logpage{[ 4, 5, 9 ]}\nobreak
\hyperdef{L}{X83C27CD97895698A}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsIdSmallSemigroup({\mdseries\slshape arg})\index{IsIdSmallSemigroup@\texttt{IsIdSmallSemigroup}}
\label{IsIdSmallSemigroup}
}\hfill{\scriptsize (property)}}\\


 return \texttt{true} if the \mbox{\texttt{\mdseries\slshape arg}} is the id of a small semigroup or \mbox{\texttt{\mdseries\slshape [arg[1], arg[2]]}} is the id of a small semigroup. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@IsIdSmallSemigroup(8,1);|
  true
  !gapprompt@gap>| !gapinput@IsIdSmallSemigroup([1,2]);|
  false
  !gapprompt@gap>| !gapinput@IsIdSmallSemigroup([3,18]);|
  true
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IsIteratorOfSmallSemigroups}}
\logpage{[ 4, 5, 10 ]}\nobreak
\hyperdef{L}{X803366027F328BC9}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IsIteratorOfSmallSemigroups({\mdseries\slshape iter})\index{IsIteratorOfSmallSemigroups@\texttt{IsIteratorOfSmallSemigroups}}
\label{IsIteratorOfSmallSemigroups}
}\hfill{\scriptsize (property)}}\\


 returns \texttt{true} if \mbox{\texttt{\mdseries\slshape iter}} is an iterator of small semigroups created using \texttt{IteratorOfSmallSemigroups} (\ref{IteratorOfSmallSemigroups}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups(8);;|
  !gapprompt@gap>| !gapinput@IsIteratorOfSmallSemigroups(iter);|
  true
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{IteratorOfSmallSemigroups}}
\logpage{[ 4, 5, 11 ]}\nobreak
\hyperdef{L}{X7D6BFDE17A9BEEC3}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{IteratorOfSmallSemigroups({\mdseries\slshape arg})\index{IteratorOfSmallSemigroups@\texttt{IteratorOfSmallSemigroups}}
\label{IteratorOfSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{IteratorOfSmallSemigroups} returns an iterator of all the small semigroups \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{IteratorOfSmallSemigroups} returns an iterator of all the small semigroups \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{IteratorOfSmallSemigroups} returns an iterator of all the small semigroups \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups(8);|
  <iterator>
  !gapprompt@gap>| !gapinput@NextIterator(iter);|
  <small semigroup of size 8>
  !gapprompt@gap>| !gapinput@IsDoneIterator(iter);|
  false
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups([2,3], IsRegularSemigroup, true,|
  !gapprompt@>| !gapinput@x-> Length(Idempotents(x))=1, true);|
  <iterator>
  !gapprompt@gap>| !gapinput@NextIterator(iter);|
  <small semigroup of size 2>
  !gapprompt@gap>| !gapinput@NextIterator(iter);|
  <small semigroup of size 3>
  !gapprompt@gap>| !gapinput@NextIterator(iter);|
  fail
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups(5, x-> Length(Idempotents(x))=1, true);|
  <enumerator of semigroups of size 5>
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups(enum, x-> Length(GreensRClasses(x))=2, true);|
  <iterator>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NamesFuncsSmallSemisInEnum}}
\logpage{[ 4, 5, 12 ]}\nobreak
\hyperdef{L}{X786566EB87AE031D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{NamesFuncsSmallSemisInEnum({\mdseries\slshape enum})\index{NamesFuncsSmallSemisInEnum@\texttt{NamesFuncsSmallSemisInEnum}}
\label{NamesFuncsSmallSemisInEnum}
}\hfill{\scriptsize (function)}}\\


 returns a list of the names of functions and their values that were used to
create the enumerator of small semigroups \mbox{\texttt{\mdseries\slshape enum}}. If you only want the actual functions themselves then use \texttt{FuncsOfSmallSemisInEnum} (\ref{FuncsOfSmallSemisInEnum}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups([2..4], IsSimpleSemigroup, false,|
  !gapprompt@>| !gapinput@IsRegularSemigroup, true);;|
  !gapprompt@gap>| !gapinput@NamesFuncsSmallSemisInEnum(enum);|
  [ "IsRegularSemigroup", true, "IsSimpleSemigroup", false ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NamesFuncsSmallSemisInIter}}
\logpage{[ 4, 5, 13 ]}\nobreak
\hyperdef{L}{X81AFBE80871F7766}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{NamesFuncsSmallSemisInIter({\mdseries\slshape iter})\index{NamesFuncsSmallSemisInIter@\texttt{NamesFuncsSmallSemisInIter}}
\label{NamesFuncsSmallSemisInIter}
}\hfill{\scriptsize (attribute)}}\\


 returns a list of the names of functions and their values that were used to
create the iterator of small semigroups \mbox{\texttt{\mdseries\slshape iter}}. If you only want the actual functions themselves then use \texttt{FuncsOfSmallSemisInIter} (\ref{FuncsOfSmallSemisInIter}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups([2..4], IsSimpleSemigroup, false,|
  !gapprompt@>| !gapinput@IsRegularSemigroup, true);;|
  !gapprompt@gap>| !gapinput@NamesFuncsSmallSemisInIter(iter);|
  [ "IsRegularSemigroup", true, "IsSimpleSemigroup", false ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{Nr3NilpotentSemigroups}}
\logpage{[ 4, 5, 14 ]}\nobreak
\hyperdef{L}{X867F3E967CF3AFE9}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{Nr3NilpotentSemigroups({\mdseries\slshape n[, type]})\index{Nr3NilpotentSemigroups@\texttt{Nr3NilpotentSemigroups}}
\label{Nr3NilpotentSemigroups}
}\hfill{\scriptsize (function)}}\\


 returns the number of 3-nilpotent semigroups on a set with \mbox{\texttt{\mdseries\slshape n}} elements. If the optional argument \mbox{\texttt{\mdseries\slshape type}} is given it must be one of \texttt{"UpToEquivalence", "UpToIsomorphism", "SelfDual", "Commutative", "Labelled",
"Labelled-Commutative"}. The number will be returned for the respective type of semigroup. By default \mbox{\texttt{\mdseries\slshape type}} is \texttt{"UpToEquivalence"}. 

 The function implements the formulae calculating the number of 3-nilpotent
semigroups developed in \cite{Dis10} 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@Nr3NilpotentSemigroups( 4 );|
  8
  !gapprompt@gap>| !gapinput@Nr3NilpotentSemigroups( 9, "UpToIsomorphism" );|
  105931872028455
  !gapprompt@gap>| !gapinput@Nr3NilpotentSemigroups( 9, "Labelled" );|
  38430603831264883632
  !gapprompt@gap>| !gapinput@Nr3NilpotentSemigroups( 16, "SelfDual" );|
  4975000837941847814744710290469890455985530
  !gapprompt@gap>| !gapinput@Nr3NilpotentSemigroups( 19, "Commutative" );|
  12094270656160403920767935604624748908993169949317454767617795
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{NrSmallSemigroups}}
\logpage{[ 4, 5, 15 ]}\nobreak
\hyperdef{L}{X8257C9207DDF2451}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{NrSmallSemigroups({\mdseries\slshape arg})\index{NrSmallSemigroups@\texttt{NrSmallSemigroups}}
\label{NrSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{NrSmallSemigroups} returns the number of small semigroups \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{NrSmallSemigroups} returns the number of small semigroups \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{NrSmallSemigroups} returns the number of small semigroups \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@List([1..8], NrSmallSemigroups);|
  [ 1, 4, 18, 126, 1160, 15973, 836021, 1843120128 ]
  !gapprompt@gap>| !gapinput@NrSmallSemigroups(8, IsCommutative, true, IsInverseSemigroup, true);|
  4443
  !gapprompt@gap>| !gapinput@NrSmallSemigroups([1..8], IsCliffordSemigroup, true);|
  5610
  !gapprompt@gap>| !gapinput@NrSmallSemigroups(8, IsRegularSemigroup, true,|
  !gapprompt@>| !gapinput@IsCompletelyRegularSemigroup, false);|
  1164
  !gapprompt@gap>| !gapinput@NrSmallSemigroups(5, NilpotencyDegree, 3);|
  84
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{OneSmallSemigroup}}
\logpage{[ 4, 5, 16 ]}\nobreak
\hyperdef{L}{X7C71885F7DF31EC4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{OneSmallSemigroup({\mdseries\slshape arg})\index{OneSmallSemigroup@\texttt{OneSmallSemigroup}}
\label{OneSmallSemigroup}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions.

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{OneSmallSemigroup} returns the first small semigroup \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{OneSmallSemigroup} returns the first small semigroup \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{OneSmallSemigroup} returns the first small semigroup \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@OneSmallSemigroup(8, IsCommutative, true, IsInverseSemigroup, true);|
  <small semigroup of size 8>
  !gapprompt@gap>| !gapinput@OneSmallSemigroup([1..8], IsCliffordSemigroup, true);|
  <small semigroup of size 1>
  !gapprompt@gap>| !gapinput@iter:=IteratorOfSmallSemigroups(8, IsCommutative, false);|
  <iterator>
  !gapprompt@gap>| !gapinput@OneSmallSemigroup(iter);|
  <small semigroup of size 8>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{PositionsOfSmallSemigroups}}
\logpage{[ 4, 5, 17 ]}\nobreak
\hyperdef{L}{X7FAF09BF7CC1C265}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{PositionsOfSmallSemigroups({\mdseries\slshape arg})\index{PositionsOfSmallSemigroups@\texttt{PositionsOfSmallSemigroups}}
\label{PositionsOfSmallSemigroups}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer or an enumerator with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), the even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions. The argument can be a list \texttt{arg} with the same components as given above.

 The function returns a list of the second components of the \texttt{IdSmallSemigroup} (\ref{IdSmallSemigroup}) of all the small semigroups \texttt{S} in the library satisfying \texttt{Size(S)} in \texttt{arg[1]} or \texttt{Size(S)} in \texttt{SizesOfSmallSemisInEnum(arg[1])} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i} partitioned by size of the semigroups. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
    gap> PositionsOfSmallSemigroups(3);
    [ [ 1 .. 18 ] ]
    gap> PositionsOfSmallSemigroups(3, IsRegularSemigroup, false);
    [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ]
    gap> enum:=EnumeratorOfSmallSemigroups(3, IsRegularSemigroup, false);;
    gap> PositionsOfSmallSemigroups(enum);
    [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ]
    gap> PositionsOfSmallSemigroups([1..4], IsBand, true);
    [ [ 1 ], [ 3, 4 ], [ 12 .. 17 ], [ 98 .. 123 ] ]
    gap> PositionsOfSmallSemigroups(enum, Is1IdempotentSemigroup, true,
    > Is2GeneratedSemigroup, true, IsCliffordSemigroup, false);
    [ [ 1, 2 ], [ 2, 3, 5, 6, 8, 9, 10, 12, 34, 35, 36, 97 ],
      [ 5, 20, 21, 22, 23, 26, 29, 32, 35, 54, 55, 56, 60, 61, 62, 63, 64, 65,
          152, 156, 159, 177, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
          191, 192, 193, 540, 1009, 1157, 1158 ] ]
    
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{PositionsOfSmallSemisInEnum}}
\logpage{[ 4, 5, 18 ]}\nobreak
\hyperdef{L}{X7C9E01FA7F53DF03}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{PositionsOfSmallSemisInEnum({\mdseries\slshape enum})\index{PositionsOfSmallSemisInEnum@\texttt{PositionsOfSmallSemisInEnum}}
\label{PositionsOfSmallSemisInEnum}
}\hfill{\scriptsize (function)}}\\


 returns the second components of the id numbers of the small semigroups in the
enumerator of small semigroups \mbox{\texttt{\mdseries\slshape enum}} in a list partitioned according the size of the semigroup. The same value is
returned by using \texttt{PositionsOfSmallSemigroups} (\ref{PositionsOfSmallSemigroups}). 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum := EnumeratorOfSmallSemigroups([2..4],IsSimpleSemigroup,true);;|
  !gapprompt@gap>| !gapinput@PositionsOfSmallSemisInEnum|
  !gapprompt@>| !gapinput@(enum);|
  [ [ 2, 4 ], [ 17, 18 ], [ 7, 37, 52, 122, 123 ] ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{PrecomputedSmallSemisInfo}}
\logpage{[ 4, 5, 19 ]}\nobreak
\hyperdef{L}{X79AFE7FC81C0DF37}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{PrecomputedSmallSemisInfo\index{PrecomputedSmallSemisInfo@\texttt{PrecomputedSmallSemisInfo}}
\label{PrecomputedSmallSemisInfo}
}\hfill{\scriptsize (global variable)}}\\


 the global variable \texttt{PrecomputedSmallSemisInfo} contains a list of all the names of precomputed properties stored in the
library. The \texttt{i}th element of the list contains the list of properties that have been
precomputed for all semigroups in the library of order \texttt{i}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
    gap> PrecomputedSmallSemisInfo[3];
    [ "Is1GeneratedSemigroup", "Is2GeneratedSemigroup", "Is3GeneratedSemigroup", 
      "IsBand", "IsCliffordSemigroup", "IsCommutative", 
      "IsCompletelyRegularSemigroup", "IsFullTransformationSemigroupCopy", 
      "IsGroupAsSemigroup", "IsIdempotentGenerated", "IsInverseSemigroup", 
      "IsMonoidAsSemigroup", "IsMultSemigroupOfNearRing", "IsRegularSemigroup", 
      "IsSelfDualSemigroup", "IsSemigroupWithoutClosedIdempotents", 
      "IsSimpleSemigroup", "IsSingularSemigroupCopy", "IsZeroSemigroup", 
      "IsZeroSimpleSemigroup" ]
\end{Verbatim}
  }

 

\subsection{\textcolor{Chapter }{RandomSmallSemigroup}}
\logpage{[ 4, 5, 20 ]}\nobreak
\hyperdef{L}{X7A63356C85E45F6F}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{RandomSmallSemigroup({\mdseries\slshape arg})\index{RandomSmallSemigroup@\texttt{RandomSmallSemigroup}}
\label{RandomSmallSemigroup}
}\hfill{\scriptsize (function)}}\\


 the number of argument of this function should be odd. The first argument \texttt{arg[1]} should be a positive integer, an enumerator of small semigroups with \texttt{IsEnumeratorOfSmallSemigroups} (\ref{IsEnumeratorOfSmallSemigroups}), or an iterator of small semigroup with \texttt{IsIteratorOfSmallSemigroups} (\ref{IsIteratorOfSmallSemigroups}). 

 The even arguments \texttt{arg[2i]}, if present, should be functions, and the odd arguments \texttt{arg[2i+1]} should be a value that the preceeding function can have. For example, a
typical input might be \texttt{3, IsRegularSemigroup, true}. The functions \texttt{arg[2i]} can be user defined or existing \textsf{GAP} functions. 

 Please see Section \ref{enums} or Chapter \ref{examples} for more details. 

 If \texttt{arg[1]} is a positive integer, then \texttt{RandomSmallSemigroup} returns a random small semigroup \texttt{S} in the library with \texttt{Size(S)=arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is a list of positive integers, then \texttt{RandomSmallSemigroup} returns the a random small semigroup \texttt{S} in the library with \texttt{Size(S) in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 

 If \texttt{arg[1]} is an enumerator or iterator of small semigroups, then \texttt{RandomSmallSemigroup} returns the a random small semigroup \texttt{S} in the library with \texttt{S in arg[1]} and \texttt{arg[2i](S)=arg[2i+1]} for all \texttt{i}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
    gap> RandomSmallSemigroup(8, IsCommutative, true,
    > IsInverseSemigroup, true);
    <small semigroup of size 8>
    gap> RandomSmallSemigroup([1..8], IsCliffordSemigroup, true);
    <small semigroup of size 8>
    gap> iter:=IteratorOfSmallSemigroups([1..7]);
    <iterator of semigroups of size [ 1 .. 7 ]>
    gap> RandomSmallSemigroup(iter);
    <small semigroup of size 7>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SizesOfSmallSemisInEnum}}
\logpage{[ 4, 5, 21 ]}\nobreak
\hyperdef{L}{X7B5A3BB07B8092A4}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{SizesOfSmallSemisInEnum({\mdseries\slshape enum})\index{SizesOfSmallSemisInEnum@\texttt{SizesOfSmallSemisInEnum}}
\label{SizesOfSmallSemisInEnum}
}\hfill{\scriptsize (function)}}\\


 returns the sizes of the semigroups in the enumerator of small semigroups \mbox{\texttt{\mdseries\slshape enum}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@enum:=EnumeratorOfSmallSemigroups([2..4], IsSimpleSemigroup, false);|
  <enumerator of semigroups of sizes [ 2, 3, 4 ]>
  !gapprompt@gap>| !gapinput@SizesOfSmallSemisInEnum(enum);|
  [ 2, 3, 4 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SizesOfSmallSemisInIter}}
\logpage{[ 4, 5, 22 ]}\nobreak
\hyperdef{L}{X8290E3DB83F681AC}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{SizesOfSmallSemisInIter({\mdseries\slshape iter})\index{SizesOfSmallSemisInIter@\texttt{SizesOfSmallSemisInIter}}
\label{SizesOfSmallSemisInIter}
}\hfill{\scriptsize (function)}}\\


 returns the sizes of the semigroups in the iterator \mbox{\texttt{\mdseries\slshape iter}} of small semigroups. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
    gap> iter:=IteratorOfSmallSemigroups(7, IsCommutative, false);
    <iterator of semigroups of size 7>
    gap> SizesOfSmallSemisInIter(iter);
    [ 7 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{UpToIsomorphism}}
\logpage{[ 4, 5, 23 ]}\nobreak
\hyperdef{L}{X87C50557821D4786}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\ \ \texttt{UpToIsomorphism({\mdseries\slshape sgrps})\index{UpToIsomorphism@\texttt{UpToIsomorphism}}
\label{UpToIsomorphism}
}\hfill{\scriptsize (operation)}}\\


 takes a list \mbox{\texttt{\mdseries\slshape sgrps}} of non-equivalent semigroups from the library as input and returns a list of
non-isomorphic semigroups containing an isomorphic semigroup and an
anti-isomorphic semigroup for every semigroup in \mbox{\texttt{\mdseries\slshape sgrps}}. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@UpToIsomorphism([SmallSemigroup(5,126),SmallSemigroup(6,2)]);|
  [ <small semigroup of size 5>, <small semigroup of size 6> ]
  !gapprompt@gap>| !gapinput@UpToIsomorphism([SmallSemigroup(5,126),SmallSemigroup(5,3)]);|
  [ <small semigroup of size 5>, <small semigroup of size 5>, 
    <semigroup of size 5, with 5 generators> ]
\end{Verbatim}
 }

 }

 }

 \def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}

\bibliographystyle{alpha}
\bibliography{smallsemi}

\addcontentsline{toc}{chapter}{References}

\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}
\hyperdef{L}{X83A0356F839C696F}{}
}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Index}


\printindex

\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}
