% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[11pt]{report}
\usepackage{a4wide}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}
\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{FuncColor}{rgb}{1.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,1.0}

\usepackage{fancyvrb}

\usepackage{pslatex}

\usepackage[
        a4paper=true,bookmarks=false,pdftitle={Written with GAPDoc},
        pdfcreator={LaTeX with hyperref package / GAPDoc},
        colorlinks=true,backref=page,breaklinks=true,linkcolor=RoyalBlue,
        citecolor=RoyalGreen,filecolor=RoyalRed,
        urlcolor=RoyalRed,pagecolor=RoyalBlue]{hyperref}

% 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,}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\F}{\mathbb{F}}

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

\newsavebox{\backslashbox}
\sbox{\backslashbox}{\texttt{\symbol{92}}}
\newcommand{\bs}{\usebox{\backslashbox}}

\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\begin{center}{\Huge \textbf{\textsf{XMod}}}\\[1cm]
\hypersetup{pdftitle=\textsf{XMod}}
\markright{\scriptsize \mbox{}\hfill \textsf{XMod} \hfill\mbox{}}
{\Large \textbf{Crossed modules and cat1-groups in \textsf{GAP}}}\\[1cm]
{Version 2.008}\\[1cm]
{October 2006}\\[1cm]
\mbox{}\\[2cm]
{\large \textbf{ Murat Alp   }}\\
{\large \textbf{ Chris Wensley    }}\\
\hypersetup{pdfauthor= Murat Alp   ;  Chris Wensley    }
\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{ Murat Alp   } --- Email: \href{mailto://malp@dumlupinar.edu.tr}{\texttt{malp@dumlupinar.edu.tr}}\\
 --- Address: \begin{minipage}[t]{8cm}\noindent
 Dumlupinar Universitesi,\\
 Fen-Edebiyat Fakultesi, Matematik Bolumu\\
 Merkez Kampus, Kutahya, Turkey. \end{minipage}
}\\
{\mbox{}\\
\small \noindent \textbf{ Chris Wensley    } --- Email: \href{mailto://c.d.wensley@bangor.ac.uk}{\texttt{c.d.wensley@bangor.ac.uk}}\\
 --- Homepage: \href{http://www.informatics.bangor.ac.uk/~cwensley/}{\texttt{http://www.informatics.bangor.ac.uk/\~{}cwensley/}}\\
 --- Address: \begin{minipage}[t]{8cm}\noindent
 School of Informatics, University of Wales Bangor,\\
 Dean Street, Bangor, Gwynedd, LL57 1UT, U.K. \end{minipage}
}\\
\end{titlepage}

\newpage\setcounter{page}{2}
{\small 
\section*{Abstract}
\logpage{[ 0, 0, 1 ]}
 Add an abstract here? }\\[1cm]
{\small 
\section*{Copyright}
\logpage{[ 0, 0, 2 ]}
 {\copyright} 1997-2006 by Murat Alp and Chris Wensley 

 We adopt the copyright regulations of \textsf{GAP} as detailed in the copyright notice in the \textsf{GAP} manual. }\\[1cm]
{\small 
\section*{Acknowledgements}
\logpage{[ 0, 0, 4 ]}
 The first author wishes to acknowledge support from the Turkish government
(add details?). }\\[1cm]
{\small 
\section*{Colophon}
\logpage{[ 0, 0, 3 ]}
 \textsf{XMod} was originally implemented in 1997 using the \textsf{GAP}3 language. when the first author was studying for a Ph.D. \cite{A1} in Bangor. 

 In April 2002 the first and third parts were converted to \textsf{GAP}4, the pre-structures were added, and version 2.001 was released. The final
two parts, covering derivations, sections and actors, were included in the
January 2004 release 2.002 for {\GAP}~4.4. 

 The current version is 2.008, released on October 25th 2006. 

 Bug reports, suggestions and comments are, of course, welcome. Please contact
the second author at \href{mailto://c.d.wensley@bangor.ac.uk}{\texttt{c.d.wensley@bangor.ac.uk}}. }\\[1cm]
\newpage

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

\tableofcontents
\newpage

           
\chapter{\textcolor{Chapter }{Introduction}}\label{Intro}
\logpage{[ 1, 0, 0 ]}
{
  The \textsf{XMod} package provides functions for computation with 
\begin{itemize}
\item  finite crossed modules and cat1-groups, and morphisms of these structures; 
\item  finite pre-crossed modules, pre-cat1-groups, and their Peiffer quotients; 
\item  derivations of crossed modules and sections of cat1-groups; 
\item  the actor crossed square of a crossed module; and 
\item  crossed squares and their morphisms (experimental version). 
\end{itemize}
 It is loaded with the command 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> LoadPackage( "xmod" ); 
  
\end{Verbatim}
 

 The term crossed module was introduced by J. H. C. Whitehead in \cite{W2}, \cite{W1}. Loday, in \cite{L1}, reformulated the notion of a crossed module as a cat1-group. Norrie \cite{N1}, \cite{N2} and Gilbert \cite{G1} have studied derivations, automorphisms of crossed modules and the actor of a
crossed module, while Ellis \cite{E1} has investigated higher dimensional analogues. Properties of induced crossed
modules have been determined by Brown, Higgins and Wensley in \cite{BH1}, \cite{BW1} and \cite{BW2}. For further references see \cite{AW1}, where we discuss some of the data structures and algorithms used in this
package, and also tabulate isomorphism classes of cat1-groups up to size $30$. 

 \textsf{XMod} was originally implemented in 1997 using the \textsf{GAP}~3 language. In April 2002 the first and third parts were converted to \textsf{GAP}~4, the pre-structures were added, and version 2.001 was released. The final
two parts, covering derivations, sections and actors, were included in the
January 2004 release 2.002 for \textsf{GAP}~4.4. The current version is 2.008, released on October 25th 2006. 

 Many of the function names have been changed during the conversion, for
example \texttt{ConjugationXMod} has become \texttt{XModByNormalSubgroup}. For a list of name changes see the file \texttt{names.pdf} in the \texttt{doc} directory. 

 Crossed modules and cat1-groups are special types of \emph{2-dimensional groups} \cite{B82} and are implemented as \texttt{2dObjects} having a \texttt{Source} and a \texttt{Range}. See the file \texttt{notes.pdf} in the \texttt{doc} directory for an introductory account of these algebraic gadgets. 

 The package divides into four parts, all converted from \textsf{GAP}~3 to the \textsf{GAP}~4.4 release. 

 The first part is concerned with the standard constructions for pre-crossed
modules and crossed modules; together with direct products; normal sub-crossed
modules; and quotients. Operations for constructing pre-cat1-groups and
cat1-groups, and for converting between cat1-groups and crossed modules, are
also included. 

 The second part is concerned with \emph{morphisms} of (pre-)crossed modules and (pre-)cat1-groups, together with standard
operations for morphisms, such as composition, image and kernel. 

 The third part deals with the equivalent notions of \emph{derivation} for a crossed module and \emph{section} for a cat1-group, and the monoids which they form under the Whitehead
multiplication. 

 The fourth part deals with actor crossed modules and actor cat1-groups. For
the actor crossed module ${\rm Act}(\mathcal{X})$ of a crossed module $\mathcal{X}$ we require representations for the Whitehead group of regular derivations of $\mathcal{X}$ and for the group of automorphisms of $\mathcal{X}$. The construction also provides an inner morphism from $\mathcal{X}$ to ${\rm Act}(\mathcal{X})$ whose kernel is the centre of $\mathcal{X}$. 

 In version 2.007 there are also experimental functions for \emph{crossed squares} and their morphisms, structures which arise as $3$-dimensional groups. Examples of these are inclusions of normal sub-crossed
modules, and the inner morphism from a crossed module to its actor. 

 The package may be obtained as a compressed tar file \texttt{xmod.2.008.tar.gz} by ftp from one of the sites with a \textsf{GAP}~4 archive, or from the Bangor Mathematics web site whose URL is: \href{http://www.informatics.bangor.ac.uk/public/mathematics/chda/}{\texttt{http://www.informatics.bangor.ac.uk/public/mathematics/chda/}} 

 The following constructions were not in the \textsf{GAP}~3 version of the package: sub-2d-object functions, functions for pre-crossed
modules and the Peiffer subgroup of a pre-crossed module, and the associated
crossed modules. The source and range groups in these constructions are no
longer required to be permutation groups. 

 Future plans include the implementation of \emph{group-graphs} which will provide examples of pre-crossed modules (their implementation will
require interaction with graph-theoretic functions in \textsf{GAP}~4). Cat2-groups, and conversion betwen these and crossed squares, are also
planned. 

 The equivalent categories \texttt{XMod} (crossed modules) and \texttt{Cat1} (cat1-groups) are also equivalent to \texttt{GpGpd}, the subcategory of group objects in the category \texttt{Gpd} of groupoids. Finite groupoids have been implemented in Emma Moore's crossed
resolutions package \textsf{GraphGpd} \cite{M1}, and further work on group groupoids is planned. 

 \index{InfoXMod@\texttt{InfoXMod}} In order that the user has some control of the verbosity of the \textsf{XMod} package's functions, an \texttt{InfoClass} \texttt{InfoXMod} is provided (see Chapter \texttt{ref:Info Functions} in the \textsf{GAP} Reference Manual for a description of the \texttt{Info} mechanism). By default, the \texttt{InfoLevel} of \texttt{InfoXMod} is \texttt{0}; progressively more information is supplied by raising the \texttt{InfoLevel} to \texttt{1}, \texttt{2} and \texttt{3}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> SetInfoLevel( InfoXMod, 1); #sets the InfoXMod level to 1
  
\end{Verbatim}
 The following test file (from the \texttt{xmod} directory) runs all the manual commands. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> ReadTest("tst/xmod_manual.tst");
  + Testing constructions of crossed modules and cat1-groups
  + GAP4stones: 0
  true
  
\end{Verbatim}
 Additional information can be found on the \emph{Computational Higher-dimensional Discrete Algebra} web site at \href{http://www.informatics.bangor.ac.uk/public/mathematics/chda/}{\texttt{http://www.informatics.bangor.ac.uk/public/mathematics/chda/}} }

           
\chapter{\textcolor{Chapter }{2d-objects}}\label{chap-obj2}
\logpage{[ 2, 0, 0 ]}
{
  
\section{\textcolor{Chapter }{Constructions for crossed modules}}\logpage{[ 2, 1, 0 ]}
{
 \index{crossed module} \index{2d-object} A crossed module $\mathcal{X} = (\partial : S \to R )$ consists of a group homomorphism $\partial $, called the \emph{boundary} of $\mathcal{X}$, with \emph{source} $S$ and \emph{range} $R$. The Group $R$ acts on itself by conjugation, and on $S$ by an action $\alpha : R \to {\rm Aut}(S)$ such that, for all $s,s_1,s_2 \in S$ and $r \in R$, 
\[ {\bf XMod\ 1} ~:~ \partial(s^r) = r^{-1} (\partial s) r = (\partial s)^r,
\qquad {\bf XMod\ 2} ~:~ s_1^{\partial s_2} = s_2^{-1}s_1 s_2 = {s_1}^{s_2}. \]
 

 The kernel of $\partial$ is abelian. 

 There are a variety of constructors for crossed modules: 

\subsection{\textcolor{Chapter }{XMod}}
\logpage{[ 2, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XMod( args )\index{XMod@\texttt{XMod}}
\label{XMod}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByBoundaryAndAction( bdy, act )\index{XModByBoundaryAndAction@\texttt{XModByBoundaryAndAction}}
\label{XModByBoundaryAndAction}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByTrivialAction( bdy )\index{XModByTrivialAction@\texttt{XModByTrivialAction}}
\label{XModByTrivialAction}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByNormalSubgroup( G, N )\index{XModByNormalSubgroup@\texttt{XModByNormalSubgroup}}
\label{XModByNormalSubgroup}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByCentralExtension( bdy )\index{XModByCentralExtension@\texttt{XModByCentralExtension}}
\label{XModByCentralExtension}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByAutomorphismGroup( grp )\index{XModByAutomorphismGroup@\texttt{XModByAutomorphismGroup}}
\label{XModByAutomorphismGroup}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByInnerAutomorphismGroup( grp )\index{XModByInnerAutomorphismGroup@\texttt{XModByInnerAutomorphismGroup}}
\label{XModByInnerAutomorphismGroup}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByGroupOfAutomorphisms( G, A )\index{XModByGroupOfAutomorphisms@\texttt{XModByGroupOfAutomorphisms}}
\label{XModByGroupOfAutomorphisms}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByAbelianModule( abgrp )\index{XModByAbelianModule@\texttt{XModByAbelianModule}}
\label{XModByAbelianModule}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DirectProduct( X1, X2 )\index{DirectProduct@\texttt{DirectProduct}}
\label{DirectProduct}
}\hfill{\scriptsize (operation)}}\\


 Here are the standard constructions which these implement: 
\begin{itemize}
\item  A \emph{conjugation crossed module} is an inclusion of a normal subgroup $S \unlhd R$, where $R$ acts on $S$ by conjugation. 
\item  A \emph{central extension crossed module} has as boundary a surjection $\partial : S \to R$ with central kernel, where $r \in R$ acts on $S$ by conjugation with $\partial^{-1}r$. 
\item  An \emph{automorphism crossed module} has as range a subgroup $R$ of the automorphism group $\Aut(S)$ of $S$ which contains the inner automorphism group of $S$. The boundary maps $s \in S$ to the inner automorphism of $S$ by $s$. 
\item  A \emph{trivial action crossed module} $\partial : S \to R$ has $s^r = s$ for all $s \in S, \; r \in R$, the source is abelian and the image lies in the centre of the range. 
\item  A \emph{crossed abelian module} has an abelian module as source and the zero map as boundary. 
\item  The direct product $\mathcal{X}_{1} \times \mathcal{X}_{2}$ of two crossed modules has source $S_1 \times S_2$, range $R_1 \times R_2$ and boundary $\partial_1 \times \partial_2$, with $R_1,\ R_2$ acting trivially on $S_2,\ S_1$ respectively. 
\end{itemize}
 }

 

\subsection{\textcolor{Chapter }{Source}}
\logpage{[ 2, 1, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Source( X0 )\index{Source@\texttt{Source}}
\label{Source}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Range( X0 )\index{Range@\texttt{Range}}
\label{Range}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Boundary( X0 )\index{Boundary@\texttt{Boundary}}
\label{Boundary}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AutoGroup( X0 )\index{AutoGroup@\texttt{AutoGroup}}
\label{AutoGroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModAction( X0 )\index{XModAction@\texttt{XModAction}}
\label{XModAction}
}\hfill{\scriptsize (attribute)}}\\


 In this implementation the attributes used in the construction of a crossed
module \texttt{X0} are as follows. 
\begin{itemize}
\item  \texttt{Source(X0)} and \texttt{Range(X0)} are the source $S$ and range $R$ of $\partial$, the boundary \texttt{Boundary(X0)}; 
\item  \texttt{AutoGroup(X0)} is a group of automorphisms of $S$; 
\item  \texttt{XModAction(X0)} is a homomorphism from $R$ to \texttt{AutoGroup(X0)}. 
\end{itemize}
 }

 

\subsection{\textcolor{Chapter }{Size}}
\logpage{[ 2, 1, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Size( X0 )\index{Size@\texttt{Size}}
\label{Size}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Name( X0 )\index{Name@\texttt{Name}}
\label{Name}
}\hfill{\scriptsize (attribute)}}\\


 More familiar attributes are \texttt{Size} and \texttt{Name}, the latter formed by concatenating the names of the source and range (if
these exist). An \texttt{Enumerator} function has not been implemented. \index{display a 2d-object} The \texttt{Display} function is used to print details of \texttt{2d-objects}. }

 Here is a simple example of an automorphism crossed module, using a cyclic
group of size five. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> c5 := Group( (5,6,7,8,9) );;
  gap> SetName( c5, "c5" );
  gap> X1 := XModByAutomorphismGroup( c5 );
  [c5 -> PAut(c5)] 
  gap> Display( X1 );
  Crossed module [c5 -> PAut(c5)] :-
  : Source group c5 has generators:
    [ (5,6,7,8,9) ]
  : Range group PAut(c5) has generators:
    [ (1,2,4,3) ]
  : Boundary homomorphism maps source generators to:
    [ () ]
  : Action homomorphism maps range generators to automorphisms:
    (1,2,4,3) --> { source gens --> [ (5,7,9,6,8) ] }
    This automorphism generates the group of automorphisms.
  gap> Size( X1 );
  [ 5, 4 ]
  gap> Print( RepresentationsOfObject(X1), "\n" );
  [ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPreXModObj" ]
  gap> Print( KnownPropertiesOfObject(X1), "\n" );
  [ "Is2dObject", "IsPerm2dObject", "IsPreXMod", "IsXMod",
    "IsTrivialAction2dObject", "IsAutomorphismGroup2dObject" ]
  gap> Print( KnownAttributesOfObject(X1), "\n" );
  [ "Name", "Size", "Range", "Source", "Boundary", "AutoGroup", "XModAction" ]
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{SubXMod}}
\logpage{[ 2, 1, 4 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SubXMod( X0, src, rng )\index{SubXMod@\texttt{SubXMod}}
\label{SubXMod}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IdentitySubXMod( X0 )\index{IdentitySubXMod@\texttt{IdentitySubXMod}}
\label{IdentitySubXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NormalSubXMods( X0 )\index{NormalSubXMods@\texttt{NormalSubXMods}}
\label{NormalSubXMods}
}\hfill{\scriptsize (attribute)}}\\


 With the standard crossed module constructors listed above as building blocks,
sub-crossed modules, normal sub-crossed modules $\mathcal{N} \lhd \mathcal{X}$, and also quotients $\mathcal{X}/\mathcal{N}$ may be constructed. A sub-crossed module $\mathcal{S} = (\delta : N \to M)$ is \emph{normal} in $\mathcal{X} = (\partial : S \to R)$ if 
\begin{itemize}
\item  $N,M$ are normal subgroups of $S,R$ respectively, 
\item  $\delta$ is the restriction of $\partial$, 
\item  $n^r \in N$ for all $n \in N,\,r \in R$, 
\item  $s^{-1}\,s^m \in N$ for all $m \in M,\,s \in S$. 
\end{itemize}
 These conditions ensure that $M \ltimes N$ is normal in the semidirect product $R \ltimes S$. }

 }

 
\section{\textcolor{Chapter }{Pre-crossed modules}}\logpage{[ 2, 2, 0 ]}
{
 \index{pre-crossed module} 

\subsection{\textcolor{Chapter }{PreXModByBoundaryAndAction}}
\logpage{[ 2, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreXModByBoundaryAndAction( bdy, act )\index{PreXModByBoundaryAndAction@\texttt{PreXModByBoundaryAndAction}}
\label{PreXModByBoundaryAndAction}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SubPreXMod( X0, src, rng )\index{SubPreXMod@\texttt{SubPreXMod}}
\label{SubPreXMod}
}\hfill{\scriptsize (operation)}}\\


 When axiom {\bf XMod\ 2} is \emph{not} satisfied, the corresponding structure is known as a \emph{pre-crossed module}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> c := (11,12,13,14,15,16,17,18);;  d := (12,18)(13,17)(14,16);;
  gap> d16 := Group( c, d );;
  gap> sk4 := Subgroup( d16, [ c^4, d ] );;
  gap> SetName( d16, "d16" );  SetName( sk4, "sk4" );
  gap> bdy16 := GroupHomomorphismByImages( d16, sk4, [c,d], [c^4,d] );;
  gap> h1 := GroupHomomorphismByImages( d16, d16, [c,d], [c^5,d] );;
  gap> h2 := GroupHomomorphismByImages( d16, d16, [c,d], [c,c^4*d] );;
  gap> aut16 := Group( [ h1, h2 ] );;
  gap> act16 := GroupHomomorphismByImages( sk4, aut16, [c^4,d], [h1,h2] );;
  gap> P16 := PreXModByBoundaryAndAction( bdy16 );
  [d16->sk4]
  
\end{Verbatim}
 \index{Peiffer subgroup} 

\subsection{\textcolor{Chapter }{PeifferSubgroup}}
\logpage{[ 2, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PeifferSubgroup( X0 )\index{PeifferSubgroup@\texttt{PeifferSubgroup}}
\label{PeifferSubgroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModByPeifferQuotient( prexmod )\index{XModByPeifferQuotient@\texttt{XModByPeifferQuotient}}
\label{XModByPeifferQuotient}
}\hfill{\scriptsize (attribute)}}\\


 The \emph{Peiffer subgroup} of a pre-crossed module $P$ of $S$ is the subgroup of ${\rm ker}(\partial)$ generated by \emph{Peiffer commutators} 
\[ \langle s_1,s_2 \rangle \quad=\quad % (s_1^{-1})^{\partial
s_2}\,s_2^{-1}\,s_1\,s_2~. \]
 Then $\mathcal{P} = (0 : P \to \{1_R\})$ is a normal sub-pre-crossed module of $\mathcal{X}$ and $\mathcal{X}/\mathcal{P} = (\partial : S/P \to R)$ is a crossed module. 

 In the following example the Peiffer subgroup is cyclic of size $4$. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> P := PeifferSubgroup( P16 );
  Group( [ (11,15)(12,16)(13,17)(14,18), (11,17,15,13)(12,18,16,14) ] )
  gap> X16 := XModByPeifferQuotient( P16 );
  [d16/P->sk4]
  gap> Display( X16 );
  Crossed module [d16/P->sk4] :-
  : Source group has generators:
    [ f1, f2 ]
  : Range group has generators:
    [ (11,15)(12,16)(13,17)(14,18), (12,18)(13,17)(14,16) ]
  : Boundary homomorphism maps source generators to:
    [ (12,18)(13,17)(14,16), (11,15)(12,16)(13,17)(14,18) ]
    The automorphism group is trivial
  gap> iso16 := IsomorphismPermGroup( Source( X16 ) );;
  gap> S16 := Image( iso16 );
  Group([ (1,3)(2,4), (1,2)(3,4) ])   
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{IsPermXMod}}
\logpage{[ 2, 2, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPermXMod( X0 )\index{IsPermXMod@\texttt{IsPermXMod}}
\label{IsPermXMod}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPcPreXMod( X0 )\index{IsPcPreXMod@\texttt{IsPcPreXMod}}
\label{IsPcPreXMod}
}\hfill{\scriptsize (property)}}\\


 When both source and range groups are of the same type, corresponding
properties are assigned to the crossed module. }

 }

 
\section{\textcolor{Chapter }{Cat1-groups and pre-cat1-groups}}\label{sect-cat1}
\logpage{[ 2, 3, 0 ]}
{
  \index{cat1-group} 

\subsection{\textcolor{Chapter }{Source}}
\logpage{[ 2, 3, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Source( C )\index{Source@\texttt{Source}}
\label{Source}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Range( C )\index{Range@\texttt{Range}}
\label{Range}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Tail( C )\index{Tail@\texttt{Tail}}
\label{Tail}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Head( C )\index{Head@\texttt{Head}}
\label{Head}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RangeEmbedding( C )\index{RangeEmbedding@\texttt{RangeEmbedding}}
\label{RangeEmbedding}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{KernelEmbedding( C )\index{KernelEmbedding@\texttt{KernelEmbedding}}
\label{KernelEmbedding}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Boundary( C )\index{Boundary@\texttt{Boundary}}
\label{Boundary}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Name( C )\index{Name@\texttt{Name}}
\label{Name}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Size( C )\index{Size@\texttt{Size}}
\label{Size}
}\hfill{\scriptsize (attribute)}}\\


 These are the attributes of a cat1-group $\mathcal{C}$ in this implementation. 

 In \cite{L1}, Loday reformulated the notion of a crossed module as a cat1-group, namely a
group $G$ with a pair of homomorphisms $t,h : G \to G$ having a common image $R$ and satisfying certain axioms. We find it convenient to define a cat1-group $\mathcal{C} = (e;t,h : G \to R )$ as having source group $G$, range group $R$, and three homomorphisms: two surjections $t,h : G \to R$ and an embedding $e : R \to G$ satisfying: 
\[ {\bf Cat\ 1} ~:~ te = he = {\rm id}_R, \qquad {\bf Cat\ 2} ~:~ [\ker t, \ker
h] = \{ 1_G \}. \]
 It follows that $teh = h$, $het = t$, $tet = t$, $heh = h$. 

 The maps $t,h$ are often referred to as the \emph{source} and \emph{target}, but we choose to call them the \emph{tail} and \emph{head} of $\mathcal{C}$, because \emph{source} is the \textsf{GAP} term for the domain of a function. The \texttt{RangeEmbedding} is the embedding of \texttt{R} in \texttt{G}, the \texttt{KernelEmbedding} is the inclusion of the kernel of \texttt{t} in \texttt{G}, and the \texttt{Boundary} is the restriction of \texttt{h} to the kernel of \texttt{t}. }

 

\subsection{\textcolor{Chapter }{Cat1}}
\logpage{[ 2, 3, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1( args )\index{Cat1@\texttt{Cat1}}
\label{Cat1}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1ByTailHeadEmbedding( t, h, e )\index{PreCat1ByTailHeadEmbedding@\texttt{PreCat1ByTailHeadEmbedding}}
\label{PreCat1ByTailHeadEmbedding}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1ByEndomorphisms( t, h )\index{PreCat1ByEndomorphisms@\texttt{PreCat1ByEndomorphisms}}
\label{PreCat1ByEndomorphisms}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1ByNormalSubgroup( G, N )\index{PreCat1ByNormalSubgroup@\texttt{PreCat1ByNormalSubgroup}}
\label{PreCat1ByNormalSubgroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1ByPeifferQuotient( P )\index{Cat1ByPeifferQuotient@\texttt{Cat1ByPeifferQuotient}}
\label{Cat1ByPeifferQuotient}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Reverse( C0 )\index{Reverse@\texttt{Reverse}}
\label{Reverse}
}\hfill{\scriptsize (attribute)}}\\


 These are some of the constructors for pre-cat1-groups and cat1-groups. 

 The following listing shows an example of a cat1-group of pc-groups: }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> s3 := SymmetricGroup(IsPcGroup,3);;   
  gap> gens3 := GeneratorsOfGroup(s3);
  [ f1, f2 ]
  gap> pc4 := CyclicGroup(4);; 
  gap> SetName(s3,"s3");  SetName( pc4, "pc4" );
  gap> s3c4 := DirectProduct( s3, pc4 );; 
  gap> SetName( s3c4, "s3c4" );  
  gap> gens3c4 := GeneratorsOfGroup( s3c4 );
  [ f1, f2, f3, f4 ]
  gap> a := gens3[1];;  b := gens3[2];;  one := One(s3);;
  gap> t2 := GroupHomomorphismByImages( s3c4, s3, gens3c4, [a,b,one,one] );
  [ f1, f2, f3, f4 ] -> [ f1, f2, &lt;identity&gt; of ..., &lt;identity&gt; of ... ]
  gap> e2 := Embedding( s3c4, 1 );
  [ f1, f2 ] -> [ f1, f2 ]
  gap> C2 := Cat1( t2, t2, e2 );
  [s3c4=>s3]
  gap> Display( C2 );
  Cat1-group [s3c4=>s3] :-
  : source group has generators:
    [ f1, f2, f3, f4 ]
  :  range group has generators:
    [ f1, f2 ]
  : tail homomorphism maps source generators to:
    [ f1, f2, &lt;identity&gt; of ..., &lt;identity&gt; of ... ]
  : head homomorphism maps source generators to:
    [ f1, f2, &lt;identity&gt; of ..., &lt;identity&gt; of ... ]
  : range embedding maps range generators to:
    [ f1, f2 ]
  : kernel has generators:
    [ f3, f4 ]
  : boundary homomorphism maps generators of kernel to:
    [ &lt;identity&gt; of ..., &lt;identity&gt; of ... ]
  : kernel embedding maps generators of kernel to:
    [ f3, f4 ]
  gap> IsPcCat1( C2 );
  true
  gap> Size( C2 );
  [ 24, 6 ]
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{Cat1OfXMod}}
\logpage{[ 2, 3, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1OfXMod( X0 )\index{Cat1OfXMod@\texttt{Cat1OfXMod}}
\label{Cat1OfXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModOfCat1( C0 )\index{XModOfCat1@\texttt{XModOfCat1}}
\label{XModOfCat1}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1OfPreXMod( P0 )\index{PreCat1OfPreXMod@\texttt{PreCat1OfPreXMod}}
\label{PreCat1OfPreXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreXModOfPreCat1( P0 )\index{PreXModOfPreCat1@\texttt{PreXModOfPreCat1}}
\label{PreXModOfPreCat1}
}\hfill{\scriptsize (attribute)}}\\


 The category of crossed modules is equivalent to the category of cat1-groups,
and the functors between these two categories may be described as follows.
Starting with the crossed module $\mathcal{X} = (\partial : S \to R)$ the group $G$ is defined as the semidirect product $G = R \ltimes S$ using the action from $\mathcal{X}$, with multiplication rule 
\[ (r_1,s_1)(r_2,s_2) ~=~ (r_1r_2,{s_1}^{r_2}s_2). \]
 The structural morphisms are given by 
\[ t(r,s) = r, \quad h(r,s) = r (\partial s), \quad er = (r,1). \]
 On the other hand, starting with a cat1-group $ \mathcal{C} = (e;t,h : G \to R)$, we define $ S = \ker t$, the range $R$ remains unchanged, and $ \partial = h\!\mid_S $. The action of $R$ on $S$ is conjugation in $G$ via the embedding of $R$ in $G$. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> SetName( Kernel(t2), "ker(t2)" );;
  gap> X2 := XModOfCat1( C2 );
  [Group( [ f3, f4 ] )->s3]
  gap> Display( X2 );
  Crossed module [ker(t2)->s3] :-
  : Source group has generators:
    [ f3, f4 ]
  : Range group s3 has generators:
    [ f1, f2 ]
  : Boundary homomorphism maps source generators to:
    [ &lt;identity&gt; of ..., &lt;identity&gt; of ... ]
    The automorphism group is trivial
  : associated cat1-group is [s3c4=>s3]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Selection of a small cat1-group}}\logpage{[ 2, 4, 0 ]}
{
 \index{selection of a small cat1-group} The \texttt{Cat1} function may also be used to select a cat1-group from a data file. All
cat1-structures on groups of size up to $47$ are stored in a list in file \texttt{cat1data.g}. Global variables \texttt{CAT1{\textunderscore}LIST{\textunderscore}MAX{\textunderscore}SIZE := 47} and \texttt{CAT1{\textunderscore}LIST{\textunderscore}CLASS{\textunderscore}SIZES} are also stored. The \textsf{XMod}~2 version of the database orders the groups of size up to $47$ according to the \textsf{GAP}~4 numbering of small groups. The data is read into the list \texttt{CAT1{\textunderscore}LIST} only when this function is called. 

\subsection{\textcolor{Chapter }{Cat1Select}}
\logpage{[ 2, 4, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1Select( size, gpnum, num )\index{Cat1Select@\texttt{Cat1Select}}
\label{Cat1Select}
}\hfill{\scriptsize (attribute)}}\\


 This function may be used in three ways. \texttt{Cat1Select( size )} returns the names of the groups with this size. \texttt{Cat1Select( size, gpnum )} prints a list of cat1-structures for this chosen group. \texttt{Cat1Select( size, gpnum, num )} (or just \texttt{Cat1( size, gpnum, num )}) returns the chosen cat1-group. 

 The example below is the first case in which $t \neq h$ and the associated conjugation crossed module is given by the normal subgroup \texttt{c3} of \texttt{s3}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> L18 := Cat1Select( 18 );
  #I  Loading cat1-group data into CAT1_LIST
  Usage:  Cat1( size, gpnum, num )
  [ "d18", "c18", "s3c3", "c3^2|Xc2", "c6c3" ]
  gap> Cat1Select( 18, 4 );
  There are 4 cat1-structures for the group c3^2|Xc2.
  [ [range gens], source & range names, [tail genimages], [head genimages] ] :-
  [ [ (1,2,3), (4,5,6), (2,3)(5,6) ],  tail = head = identity mapping ]
  [ [ (2,3)(5,6) ], "c3^2", "c2", [ (), (), (2,3)(5,6) ],
    [ (), (), (2,3)(5,6) ] ]
  [ [ (4,5,6), (2,3)(5,6) ], "c3", "s3", [ (), (4,5,6), (2,3)(5,6) ],
    [ (), (4,5,6), (2,3)(5,6) ] ]
  [ [ (4,5,6), (2,3)(5,6) ], "c3", "s3", [ (4,5,6), (4,5,6), (2,3)(5,6) ],
    [ (), (4,5,6), (2,3)(5,6) ] ]
  Usage:  Cat1( size, gpnum, num );
  Group has generators [ (1,2,3), (4,5,6), (2,3)(5,6) ]
  4
  gap> C4 := Cat1( 18, 4, 4 );
  [c3^2|Xc2=>s3]
  gap> Display( C4 );
  Cat1-group [c3^2|Xc2=>s3] :-
  : source group has generators:
    [ (1,2,3), (4,5,6), (2,3)(5,6) ]
  :  range group has generators:
    [ (4,5,6), (4,5,6), (2,3)(5,6) ]
  : tail homomorphism maps source generators to:
    [ (4,5,6), (4,5,6), (2,3)(5,6) ]
  : head homomorphism maps source generators to:
    [ (), (4,5,6), (2,3)(5,6) ]
  : range embedding maps range generators to:
    [ (4,5,6), (4,5,6), (2,3)(5,6) ]
  : kernel has generators:
    [ ( 1, 2, 3)( 4, 6, 5) ]
  : boundary homomorphism maps generators of kernel to:
    [ (4,6,5) ]
  : kernel embedding maps generators of kernel to:
    [ (1,2,3)(4,6,5) ]
  gap> XC4 := XModOfCat1( C4 );
  [Group( [ ( 1, 2, 3)( 4, 6, 5) ] )->s3]
  
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{2d-mappings}}\label{chap-map2}
\logpage{[ 3, 0, 0 ]}
{
  \index{2d-mapping} 
\section{\textcolor{Chapter }{Morphisms of 2d-objects}}\logpage{[ 3, 1, 0 ]}
{
 \index{morphism of 2d-object} \index{crossed module morphism} This chapter describes morphisms of (pre-)crossed modules and
(pre-)cat1-groups. 

\subsection{\textcolor{Chapter }{Source}}
\logpage{[ 3, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Source( map )\index{Source@\texttt{Source}}
\label{Source}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Range( map )\index{Range@\texttt{Range}}
\label{Range}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SourceHom( map )\index{SourceHom@\texttt{SourceHom}}
\label{SourceHom}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RangeHom( map )\index{RangeHom@\texttt{RangeHom}}
\label{RangeHom}
}\hfill{\scriptsize (attribute)}}\\


 Morphisms of \texttt{2dObjects} are implemented as \texttt{2dMappings}. These have a pair of 2d-objects as source and range, together with two group
homomorphisms mapping between corresponding source and range groups. These
functions return \texttt{fail} when invalid data is supplied. }

 }

 
\section{\textcolor{Chapter }{Morphisms of pre-crossed modules}}\logpage{[ 3, 2, 0 ]}
{
 \index{morphism} 

\subsection{\textcolor{Chapter }{IsXModMorphism}}
\logpage{[ 3, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsXModMorphism( map )\index{IsXModMorphism@\texttt{IsXModMorphism}}
\label{IsXModMorphism}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsCat1Morphism( map )\index{IsCat1Morphism@\texttt{IsCat1Morphism}}
\label{IsCat1Morphism}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPreXModMorphism( map )\index{IsPreXModMorphism@\texttt{IsPreXModMorphism}}
\label{IsPreXModMorphism}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPreCat1Morphism( map )\index{IsPreCat1Morphism@\texttt{IsPreCat1Morphism}}
\label{IsPreCat1Morphism}
}\hfill{\scriptsize (property)}}\\


 A morphism between two pre-crossed modules $\mathcal{X}_{1} = (\partial_1 :
S_1 \to R_1)$ and $\mathcal{X}_{2} = (\partial_2 : S_2 \to R_2)$ is a pair
$(\sigma, \rho)$, where $\sigma : S_1 \to S_2$ and $\rho : R_1 \to R_2$
commute with the two boundary maps and are morphisms for the two actions: 
\[ \partial_2 \sigma = \rho \partial_1, \qquad \sigma(s^r) = (\sigma s)^{\rho r}. \]
 Thus $\sigma$ is the \texttt{SourceHom} and $\rho$ is the \texttt{RangeHom}. When $\mathcal{X}_{1} = \mathcal{X}_{2}$ and $ \sigma, \rho $ are
automorphisms then $(\sigma, \rho)$ is an automorphism of $\mathcal{X}_1$. The
group of automorphisms is denoted by ${\rm Aut}(\mathcal{X}_1 ).$ }

 

\subsection{\textcolor{Chapter }{IsInjective}}
\logpage{[ 3, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsInjective( map )\index{IsInjective@\texttt{IsInjective}}
\label{IsInjective}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsSurjective( map )\index{IsSurjective@\texttt{IsSurjective}}
\label{IsSurjective}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsSingleValued( map )\index{IsSingleValued@\texttt{IsSingleValued}}
\label{IsSingleValued}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsTotal( map )\index{IsTotal@\texttt{IsTotal}}
\label{IsTotal}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsBijective( map )\index{IsBijective@\texttt{IsBijective}}
\label{IsBijective}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsEndomorphism2dObject( map )\index{IsEndomorphism2dObject@\texttt{IsEndomorphism2dObject}}
\label{IsEndomorphism2dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsAutomorphism2dObject( map )\index{IsAutomorphism2dObject@\texttt{IsAutomorphism2dObject}}
\label{IsAutomorphism2dObject}
}\hfill{\scriptsize (property)}}\\


 The usual properties of mappings are easily checked. It is usually sufficient
to verify that both the \texttt{SourceHom} and the \texttt{RangeHom} have the required property. }

 

\subsection{\textcolor{Chapter }{XModMorphism}}
\logpage{[ 3, 2, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModMorphism( args )\index{XModMorphism@\texttt{XModMorphism}}
\label{XModMorphism}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XModMorphismByHoms( X1, X2, sigma, rho )\index{XModMorphismByHoms@\texttt{XModMorphismByHoms}}
\label{XModMorphismByHoms}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreXModMorphism( args )\index{PreXModMorphism@\texttt{PreXModMorphism}}
\label{PreXModMorphism}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreXModMorphismByHoms( P1, P2, sigma, rho )\index{PreXModMorphismByHoms@\texttt{PreXModMorphismByHoms}}
\label{PreXModMorphismByHoms}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InclusionMorphism2dObjects( X1, S1 )\index{InclusionMorphism2dObjects@\texttt{InclusionMorphism2dObjects}}
\label{InclusionMorphism2dObjects}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InnerAutomorphismXMod( X1, r )\index{InnerAutomorphismXMod@\texttt{InnerAutomorphismXMod}}
\label{InnerAutomorphismXMod}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IdentityMapping( X1 )\index{IdentityMapping@\texttt{IdentityMapping}}
\label{IdentityMapping}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsomorphismPermObject( obj )\index{IsomorphismPermObject@\texttt{IsomorphismPermObject}}
\label{IsomorphismPermObject}
}\hfill{\scriptsize (function)}}\\


 These are the constructors for morphisms of pre-crossed and crossed modules. 

 In the following example we construct a simple automorphism of the crossed
module \texttt{X1} constructed in the previous chapter. }

 \index{display a 2d-mapping} 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> sigma1 := GroupHomomorphismByImages( c5, c5, [ (5,6,7,8,9) ]
          [ (5,9,8,7,6) ] );;
  gap> rho1 := IdentityMapping( Range( X1 ) );
  IdentityMapping( PAut(c5) )
  gap> mor1 := XModMorphism( X1, X1, sigma1, rho1 );
  [[c5->PAut(c5))] => [c5->PAut(c5))]] 
  gap> Display( mor1 );
  Morphism of crossed modules :-
  : Source = [c5->PAut(c5))] with generating sets:
    [ (5,6,7,8,9) ]
    [ (1,2,4,3) ]
  : Range = Source
  : Source Homomorphism maps source generators to:
    [ (5,9,8,7,6) ]
  : Range Homomorphism maps range generators to:
    [ (1,2,4,3) ]
  gap> IsAutomorphism2dObject( mor1 );
  true 
  gap> Print( RepresentationsOfObject(mor1), "\n" );
  [ "IsComponentObjectRep", "IsAttributeStoringRep", "Is2dMappingRep" ]
  gap> Print( KnownPropertiesOfObject(mor1), "\n" );
  [ "IsTotal", "IsSingleValued", "IsInjective", "IsSurjective", "Is2dMapping",
    "IsPreXModMorphism", "IsXModMorphism", "IsEndomorphism2dObject",
    "IsAutomorphism2dObject" ]
  gap> Print( KnownAttributesOfObject(mor1), "\n" );
  [ "Name", "Range", "Source", "SourceHom", "RangeHom" ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Morphisms of pre-cat1-groups}}\label{sect-mor-pre-cat1}
\logpage{[ 3, 3, 0 ]}
{
  A morphism of pre-cat1-groups from $\mathcal{C}_1 = (e_1;t_1,h_1 : G_1 \to R_1)$ to $\mathcal{C}_2 = (e_2;t_2,h_2 : G_2 \to R_2)$ is a pair $(\gamma, \rho)$ where $\gamma : G_1 \to G_2$ and $\rho : R_1 \to R_2$ are homomorphisms satisfying 
\[ h_2 \gamma = \rho h_1~, \qquad % t_2 \gamma = \rho t_1~, \qquad % e_2 \rho =
\gamma e_1~\. \]
 

\subsection{\textcolor{Chapter }{Cat1Morphism}}
\logpage{[ 3, 3, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1Morphism( args )\index{Cat1Morphism@\texttt{Cat1Morphism}}
\label{Cat1Morphism}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Cat1MorphismByHoms( C1, C2, gamma, rho )\index{Cat1MorphismByHoms@\texttt{Cat1MorphismByHoms}}
\label{Cat1MorphismByHoms}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1Morphism( args )\index{PreCat1Morphism@\texttt{PreCat1Morphism}}
\label{PreCat1Morphism}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PreCat1MorphismByHoms( P1, P2, gamma, rho )\index{PreCat1MorphismByHoms@\texttt{PreCat1MorphismByHoms}}
\label{PreCat1MorphismByHoms}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InclusionMorphism2dObjects( C1, S1 )\index{InclusionMorphism2dObjects@\texttt{InclusionMorphism2dObjects}}
\label{InclusionMorphism2dObjects}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InnerAutomorphismCat1( C1, r )\index{InnerAutomorphismCat1@\texttt{InnerAutomorphismCat1}}
\label{InnerAutomorphismCat1}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IdentityMapping( C1 )\index{IdentityMapping@\texttt{IdentityMapping}}
\label{IdentityMapping}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsmorphismPermObject( obj )\index{IsmorphismPermObject@\texttt{IsmorphismPermObject}}
\label{IsmorphismPermObject}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SmallerDegreePerm2dObject( obj )\index{SmallerDegreePerm2dObject@\texttt{SmallerDegreePerm2dObject}}
\label{SmallerDegreePerm2dObject}
}\hfill{\scriptsize (function)}}\\


 The global function \texttt{IsomorphismPermObject} calls \texttt{IsomorphismPermPreCat1}, which constructs a morphism whose \texttt{SourceHom} and \texttt{RangeHom} are calculated using \texttt{IsomorphismPermGroup} on the source and range. Similarly \texttt{SmallerDegreePermutationRepresentation} is used on the two groups to obtain \texttt{SmallerDegreePerm2dObject}. Names are assigned automatically. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> iso2 := IsomorphismPermObject( C2 );
  [[s3c4=>s3] => [Ps3c4=>Ps3]]
  gap> Display( iso2 );
  Morphism of cat1-groups :-
  : Source = [s3c4=>s3] with generating sets:
    [ f1, f2, f3, f4 ]
    [ f1, f2 ]
  :  Range = [Ps3c4=>Ps3] with generating sets:
    [ ( 5, 9)( 6,10)( 7,11)( 8,12), ( 1, 5, 9)( 2, 6,10)( 3, 7,11)( 4, 8,12),
    ( 1, 3, 2, 4)( 5, 7, 6, 8)( 9,11,10,12), ( 1, 2)( 3, 4)( 5, 6)( 7, 8)( 9,10)
      (11,12) ]
    [ (2,3), (1,2,3) ]
  : Source Homomorphism maps source generators to:
    [ ( 5, 9)( 6,10)( 7,11)( 8,12), ( 1, 5, 9)( 2, 6,10)( 3, 7,11)( 4, 8,12),
    ( 1, 3, 2, 4)( 5, 7, 6, 8)( 9,11,10,12), ( 1, 2)( 3, 4)( 5, 6)( 7, 8)( 9,10)
      (11,12) ]
  : Range Homomorphism maps range generators to:
    [ (2,3), (1,2,3) ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Operations on morphisms}}\label{sect-oper-mor}
\logpage{[ 3, 4, 0 ]}
{
  \index{operations on morphisms} 

\subsection{\textcolor{Chapter }{Order}}
\logpage{[ 3, 4, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Order( auto )\index{Order@\texttt{Order}}
\label{Order}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CompositionMorphism( map2, map1 )\index{CompositionMorphism@\texttt{CompositionMorphism}}
\label{CompositionMorphism}
}\hfill{\scriptsize (operation)}}\\


 Composition of morphisms, written \texttt{(<map1> * <map2>)} for maps acting of the right, calls the \texttt{CompositionMorphism} function for maps acting on the left, applied to the appropriate type of
2d-mapping. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> Order( mor1 );
  2
  gap> GeneratorsOfGroup( d16 );
  [ (11,12,13,14,15,16,17,18), (12,18)(13,17)(14,16) ]
  gap> d8 := Subgroup( d16, [ c^2, d ] );;
  gap> c4 := Subgroup( d8, [ c^2 ] );;
  gap> SetName( d8, "d8" );  SetName( c4, "c4" );
  gap> X16 := XModByNormalSubgroup( d16, d8 );
  [d8->d16]
  gap> X8 := XModByNormalSubgroup( d8, c4 );
  [c4->d8]
  gap> IsSubXMod( X16, X8 );
  true
  gap> incd8 := InclusionMorphism2dObjects( X16, X8 );
  [[c4->d8] => [d8->d16]]
  gap> rho := GroupHomomorphismByImages( d16, d16, [c,d], [c,d^(c^2)] );;
  gap> sigma := GroupHomomorphismByImages( d8, d8, [c^2,d], [c^2,d^(c^2)] );;
  gap> mor := XModMorphismByHoms( X16, X16, sigma, rho );
  [[d8->d16] => [d8->d16]]
  gap> comp := incd8 * mor;
  [[c4->d8] => [d8->d16]]
  gap> comp = CompositionMorphism( mor, incd8 );
  true
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{Kernel}}
\logpage{[ 3, 4, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Kernel( map )\index{Kernel@\texttt{Kernel}}
\label{Kernel}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Kernel2dMapping( map )\index{Kernel2dMapping@\texttt{Kernel2dMapping}}
\label{Kernel2dMapping}
}\hfill{\scriptsize (attribute)}}\\


 The kernel of a morphism of crossed modules is a normal subcrossed module
whose groups are the kernels of the source and target homomorphisms. The
inclusion of the kernel is a standard example of a crossed square, but these
have not yet been implemented. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> c2 := Group( (19,20) );;
  gap> i2 := Subgroup( c2, [()] );;
  gap> X9 := XModByNormalSubgroup( c2, i2 );;
  gap> sigma9 := GroupHomomorphismByImages( c4, i2, [c^2], [()] );;
  gap> rho9 := GroupHomomorphismByImages( d8, c2, [c^2,d], [(),(19,20)] );;
  gap> mor9 := XModMorphism( X8, X9, sigma9, rho9 );
  [[c4->d8] => [..]]
  gap> K9 := Kernel( mor9 );
  [Group( [ (11,13,15,17)(12,14,16,18) ] )->Group( [ (11,13,15,17)(12,14,16,18)
   ] )]
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{Derivations and Sections}}\label{chap-up2}
\logpage{[ 4, 0, 0 ]}
{
  \index{up 2d-mapping of 2d-object} 
\section{\textcolor{Chapter }{Whitehead Multiplication}}\logpage{[ 4, 1, 0 ]}
{
 \index{Whitehead multiplication} 

\subsection{\textcolor{Chapter }{IsDerivation}}
\logpage{[ 4, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsDerivation( map )\index{IsDerivation@\texttt{IsDerivation}}
\label{IsDerivation}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsSection( map )\index{IsSection@\texttt{IsSection}}
\label{IsSection}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsUp2dMapping( map )\index{IsUp2dMapping@\texttt{IsUp2dMapping}}
\label{IsUp2dMapping}
}\hfill{\scriptsize (property)}}\\


 \index{derivation, of crossed module} \index{Whitehead monoid} The Whitehead monoid ${\rm Der}(\mathcal{X})$ of $\mathcal{X}$ was defined in \cite{W2} to be the monoid of all \emph{derivations} from $R$ to $S$, that is the set of all maps $\chi : R \to S$, with \emph{Whitehead multiplication} $\star$ (on the \emph{right}) satisfying: 
\[ {\bf Der\ 1}: \chi(qr) ~=~ (\chi q)^{r} \; (\chi r), \qquad {\bf Der\ 2}:
(\chi_1 \star \chi_2)(r) ~=~ (\chi_2 r)(\chi_1 r)(\chi_2 \partial \chi_1 r).
\end{eqnarray*} \]
 The zero map is the identity for this composition. \index{regular derivation} Invertible elements in the monoid are called \emph{regular}. \index{Whitehead group} The Whitehead group of $\mathcal{X}$ is the group of regular derivations in ${\rm Der}(\mathcal{X} )$. In the next chapter the \emph{actor} of $\mathcal{X}$ is defined as a crossed module whose source and range are permutation
representations of the Whitehead group and the automorphism group of $\mathcal{X}$. 

 \index{section, of cat1-group} The construction for cat1-groups equivalent to the derivation of a crossed
module is the \emph{section}. \index{Whitehead multiplication} The monoid of sections of $\mathcal{C} = (e;t,h : G \to R)$ is the set of group homomorphisms $\xi : R \to G$, with Whitehead multiplication $\star$, (on the \emph{right}) satisfying: 
\[ {\bf Sect\ 1}: t \xi ~=~ {\rm id}_R, \quad {\bf Sect\ 2}: (\xi_1 \star
\xi_2)(r) ~=~ (\xi_1 r)(e h \xi_1 r)^{-1}(\xi_2 h \xi_1 r) ~=~ (\xi_2 h \xi_1
r)(e h \xi_1 r)^{-1}(\xi_1 r). \]
 The embedding $e$ is the identity for this composition, and $h(\xi_1 \star \xi_2) = (h \xi_1)(h \xi_2)$. A section is \emph{regular} when $h \xi$ is an automorphism, and the group of regular sections is isomorphic to the
Whitehead group. 

 If $\epsilon$ denotes the inclusion of $S = {\rm ker} t$ in $G$ then $\partial = h \epsilon : S \to R$ and 
\[ \xi r ~=~ (e r)(e \chi r) ~=~ (r, \chi r) \]
 determines a section $\xi$ of $\mathcal{C}$ in terms of the corresponding derivation $\chi$ of $\mathcal{X}$, and conversely. }

 

\subsection{\textcolor{Chapter }{DerivationByImages}}
\logpage{[ 4, 1, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DerivationByImages( X0, ims )\index{DerivationByImages@\texttt{DerivationByImages}}
\label{DerivationByImages}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Object2d( chi )\index{Object2d@\texttt{Object2d}}
\label{Object2d}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GeneratorImages( chi )\index{GeneratorImages@\texttt{GeneratorImages}}
\label{GeneratorImages}
}\hfill{\scriptsize (attribute)}}\\


 Derivations are stored like group homomorphisms by specifying the images of a
generating set. Images of the remaining elements may then be obtained using
axiom {\bf Der\ 1}. The function \texttt{IsDerivation} is automatically called to check that this procedure is well-defined. 

 In the following example a cat1-group \texttt{C3} and the associated crossed module \texttt{X3} are constructed, where \texttt{X3} is isomorphic to the inclusion of the normal cyclic group \texttt{c3} in the symmetric group \texttt{s3}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> g18 := Group( (1,2,3), (4,5,6), (2,3)(5,6) );;
  gap> SetName( g18, "g18" );
  gap> gen18 := GeneratorsOfGroup( g18 );;
  gap> g1 := gen18[1];;  g2 := gen18[2];;  g3 := gen18[3];;
  gap> s3 := Subgroup( g18, gen18{[2..3]} );;
  gap> SetName( s3, "s3" );;
  gap> t := GroupHomomorphismByImages( g18, s3, gen18, [g2,g2,g3] );;
  gap> h := GroupHomomorphismByImages( g18, s3, gen18, [(),g2,g3] );;
  gap> e := GroupHomomorphismByImages( s3, g18, [g2,g3], [g2,g3] );;
  gap> C3 := Cat1( t, h, e );
  [g18=>s3]
  gap> SetName( Kernel(t), "c3" );;
  gap> X3 := XModOfCat1( C3 );;
  gap> Display( X3 );
  Crossed module [c3->s3] :-
  : Source group has generators:
    [ ( 1, 2, 3)( 4, 6, 5) ]
  : Range group has generators:
    [ (4,5,6), (2,3)(5,6) ]
  : Boundary homomorphism maps source generators to:
    [ (4,6,5) ]
  : Action homomorphism maps range generators to automorphisms:
    (4,5,6) --> { source gens --> [ (1,2,3)(4,6,5) ] }
    (2,3)(5,6) --> { source gens --> [ (1,3,2)(4,5,6) ] }
    These 2 automorphisms generate the group of automorphisms.
  : associated cat1-group is [g18=>s3]
  
  gap> imchi := [ (1,2,3)(4,6,5), (1,2,3)(4,6,5) ];;
  gap> chi := DerivationByImages( X3, imchi );
  DerivationByImages( s3, c3, [ (4,5,6), (2,3)(5,6) ],
  [ (1,2,3)(4,6,5), (1,2,3)(4,6,5) ] )
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{SectionByImages}}
\logpage{[ 4, 1, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SectionByImages( C, ims )\index{SectionByImages@\texttt{SectionByImages}}
\label{SectionByImages}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SectionByDerivation( chi )\index{SectionByDerivation@\texttt{SectionByDerivation}}
\label{SectionByDerivation}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DerivationBySection( xi )\index{DerivationBySection@\texttt{DerivationBySection}}
\label{DerivationBySection}
}\hfill{\scriptsize (operation)}}\\


 Sections \emph{are} group homomorphisms, so do not need a special representation. Operations \texttt{SectionByDerivation} and \texttt{DerivationBySection} convert derivations to sections, and vice-versa, calling \texttt{Cat1OfXMod} and \texttt{XModOfCat1} automatically. 

 Two strategies for calculating derivations and sections are implemented, see \cite{AW1}. The default method for \texttt{AllDerivations} is to search for all possible sets of images using a backtracking procedure,
and when all the derivations are found it is not known which are regular. In
the \textsf{GAP}3 version of this package, the default method for \texttt{AllSections( <C> )} was to compute all endomorphisms on the range group \texttt{R} of \texttt{C} as possibilities for the composite $h \xi$. A backtrack method then found possible images for such a section. In the
current version the derivations of the associated crossed module are
calculated, and these are all converted to sections using \texttt{SectionByDerivation}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> xi := SectionByDerivation( chi );
  [ (4,5,6), (2,3)(5,6) ] -> [ (1,2,3), (1,2)(4,6) ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Whitehead Groups and Monoids}}\logpage{[ 4, 2, 0 ]}
{
 

\subsection{\textcolor{Chapter }{RegularDerivations}}
\logpage{[ 4, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RegularDerivations( X0 )\index{RegularDerivations@\texttt{RegularDerivations}}
\label{RegularDerivations}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AllDerivations( X0 )\index{AllDerivations@\texttt{AllDerivations}}
\label{AllDerivations}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RegularSections( C0 )\index{RegularSections@\texttt{RegularSections}}
\label{RegularSections}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AllSections( C0 )\index{AllSections@\texttt{AllSections}}
\label{AllSections}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ImagesList( obj )\index{ImagesList@\texttt{ImagesList}}
\label{ImagesList}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ImagesTable( obj )\index{ImagesTable@\texttt{ImagesTable}}
\label{ImagesTable}
}\hfill{\scriptsize (attribute)}}\\


 There are two functions to determine the elements of the Whitehead group and
the Whitehead monoid of $\mathcal{X}0$, namely \texttt{RegularDerivations} and \texttt{AllDerivations}. (The functions \texttt{RegularSections} and \texttt{AllSections} perform corresponding tasks for a cat1-group.) 

 Using our example \texttt{X3} we find that there are just nine derivations, six of them regular, and the
associated group is isomorphic to \texttt{s3}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> all3 := AllDerivations( X3 );;
  gap> imall3 := ImagesList( all3 );; Display( imall3 );
  [ [ (), () ],
    [ (), ( 1, 2, 3)( 4, 6, 5) ],
    [ (), ( 1, 3, 2)( 4, 5, 6) ],
    [ ( 1, 2, 3)( 4, 6, 5), () ],
    [ ( 1, 2, 3)( 4, 6, 5), ( 1, 2, 3)( 4, 6, 5) ],
    [ ( 1, 2, 3)( 4, 6, 5), ( 1, 3, 2)( 4, 5, 6) ],
    [ ( 1, 3, 2)( 4, 5, 6), () ],
    [ ( 1, 3, 2)( 4, 5, 6), ( 1, 2, 3)( 4, 6, 5) ],
    [ ( 1, 3, 2)( 4, 5, 6), ( 1, 3, 2)( 4, 5, 6) ]
    ]
  gap> KnownAttributesOfObject( all3 );
  [ "Object2d", "ImagesList", "AllOrRegular", "ImagesTable" ]
  gap> Display( ImagesTable( all3 ) );
  [ [  1,  1,  1,  1,  1,  1 ],
    [  1,  1,  1,  2,  2,  2 ],
    [  1,  1,  1,  3,  3,  3 ],
    [  1,  2,  3,  1,  2,  3 ],
    [  1,  2,  3,  2,  3,  1 ],
    [  1,  2,  3,  3,  1,  2 ],
    [  1,  3,  2,  1,  3,  2 ],
    [  1,  3,  2,  2,  1,  3 ],
    [  1,  3,  2,  3,  2,  1 ] ]
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{CompositeDerivation}}
\logpage{[ 4, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CompositeDerivation( chi1, chi2 )\index{CompositeDerivation@\texttt{CompositeDerivation}}
\label{CompositeDerivation}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ImagePositions( chi )\index{ImagePositions@\texttt{ImagePositions}}
\label{ImagePositions}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CompositeSection( xi1, xi2 )\index{CompositeSection@\texttt{CompositeSection}}
\label{CompositeSection}
}\hfill{\scriptsize (operation)}}\\


 The Whitehead product $\chi_1 \star \chi_2$ is implemented as \texttt{CompositeDerivation( <chi1>, <chi2> )}. The composite of two sections is just the composite of homomorphisms. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> reg3 := RegularDerivations( X3 );;
  gap> imder3 := ImagesList( reg3 );;
  gap> chi4 := DerivationByImages( X3, imder3[4] );
  DerivationByImages( s3, c3, [ (4,5,6), (2,3)(5,6) ], 
  [ ( 1, 3, 2)( 4, 5, 6), () ] )
  gap> chi5 := DerivationByImages( X3, imder3[5] );
  DerivationByImages( s3, c3, [ (4,5,6), (2,3)(5,6) ], 
  [ ( 1, 3, 2)( 4, 5, 6), ( 1, 2, 3)( 4, 6, 5) ] )
  gap> im4 := ImagePositions( chi4 );
  [ 1, 3, 2, 1, 3, 2 ] 
  gap> im5 := ImagePositions( chi5 );
  [ 1, 3, 2, 2, 1, 3 ] 
  gap> chi45 := chi4 * chi5;
  DerivationByImages( s3, c3, [ (4,5,6), (2,3)(5,6) ], 
  [ (), ( 1, 2, 3)( 4, 6, 5) ] )
  gap> im45 := ImagePositions( chi45 );
  [ 1, 1, 1, 2, 2, 2 ]  
  gap> pos := Position( imder3, GeneratorImages( chi45 ) );
  2
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{WhiteheadGroupTable}}
\logpage{[ 4, 2, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{WhiteheadGroupTable( X0 )\index{WhiteheadGroupTable@\texttt{WhiteheadGroupTable}}
\label{WhiteheadGroupTable}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{WhiteheadMonoidTable( X0 )\index{WhiteheadMonoidTable@\texttt{WhiteheadMonoidTable}}
\label{WhiteheadMonoidTable}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{WhiteheadPermGroup( X0 )\index{WhiteheadPermGroup@\texttt{WhiteheadPermGroup}}
\label{WhiteheadPermGroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{WhiteheadTransMonoid( X0 )\index{WhiteheadTransMonoid@\texttt{WhiteheadTransMonoid}}
\label{WhiteheadTransMonoid}
}\hfill{\scriptsize (attribute)}}\\


 Multiplication tables for the Whitehead group or monoid enable the
construction of permutation or transformation representations. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> wgt3 := WhiteheadGroupTable( X3 );; Display( wgt3 );
  [ [  1,  2,  3,  4,  5,  6 ],
    [  2,  3,  1,  5,  6,  4 ],
    [  3,  1,  2,  6,  4,  5 ],
    [  4,  6,  5,  1,  3,  2 ],
    [  5,  4,  6,  2,  1,  3 ],
    [  6,  5,  4,  3,  2,  1 ] ]
  gap> wpg3 := WhiteheadPermGroup( X3 );
  Group([ (1,2,3)(4,5,6), (1,4)(2,6)(3,5) ])
  gap> wmt3 := WhiteheadMonoidTable( X3 );; Display( wmt3 );
  [ [  1,  2,  3,  4,  5,  6,  7,  8,  9 ],
    [  2,  3,  1,  5,  6,  4,  8,  9,  7 ],
    [  3,  1,  2,  6,  4,  5,  9,  7,  8 ],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4 ],
    [  5,  5,  5,  5,  5,  5,  5,  5,  5 ],
    [  6,  6,  6,  6,  6,  6,  6,  6,  6 ],
    [  7,  9,  8,  4,  6,  5,  1,  3,  2 ],
    [  8,  7,  9,  5,  4,  6,  2,  1,  3 ],
    [  9,  8,  7,  6,  5,  4,  3,  2,  1 ] ]
  gap> wtm3 := WhiteheadTransMonoid( X3 );
  Monoid( [ Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] ),
    Transformation( [ 2, 3, 1, 5, 6, 4, 8, 9, 7 ] ),
    Transformation( [ 3, 1, 2, 6, 4, 5, 9, 7, 8 ] ),
    Transformation( [ 4, 4, 4, 4, 4, 4, 4, 4, 4 ] ),
    Transformation( [ 5, 5, 5, 5, 5, 5, 5, 5, 5 ] ),
    Transformation( [ 6, 6, 6, 6, 6, 6, 6, 6, 6 ] ),
    Transformation( [ 7, 9, 8, 4, 6, 5, 1, 3, 2 ] ),
    Transformation( [ 8, 7, 9, 5, 4, 6, 2, 1, 3 ] ),
    Transformation( [ 9, 8, 7, 6, 5, 4, 3, 2, 1 ] ) ], ... )
  
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{Actors of 2d-objects}}\label{chap-actor2}
\logpage{[ 5, 0, 0 ]}
{
  
\section{\textcolor{Chapter }{Actor of a crossed module}}\logpage{[ 5, 1, 0 ]}
{
 \index{actor} The \emph{actor} of ${\cal X}$ is a crossed module $(\Delta ~:~ {\cal W}({\cal X}) \to {\rm Aut}({\cal X}))$ which was shown by Lue and Norrie, in \cite{N2} and \cite{N1} to give the
automorphism object of a crossed module ${\cal X}$. In this implementation, the source of the actor is a permutation
representation $W$ of the Whitehead group of regular derivations, and the range is a permutation
representation $A$ of the automorphism group ${\rm Aut}({\cal X})$ of ${\cal X}$. 

\subsection{\textcolor{Chapter }{WhiteheadXMod}}
\logpage{[ 5, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{WhiteheadXMod( xmod )\index{WhiteheadXMod@\texttt{WhiteheadXMod}}
\label{WhiteheadXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{LueXMod( xmod )\index{LueXMod@\texttt{LueXMod}}
\label{LueXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NorrieXMod( xmod )\index{NorrieXMod@\texttt{NorrieXMod}}
\label{NorrieXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ActorXMod( xmod )\index{ActorXMod@\texttt{ActorXMod}}
\label{ActorXMod}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AutomorphismPermGroup( xmod )\index{AutomorphismPermGroup@\texttt{AutomorphismPermGroup}}
\label{AutomorphismPermGroup}
}\hfill{\scriptsize (attribute)}}\\


 An automorphism $( \sigma, \rho )$ of \texttt{X} acts on the Whitehead monoid by $\chi^{(\sigma,\rho)} = \sigma \circ \chi \circ \rho^{-1}$, and this action determines the action for the actor. In fact the four groups $R, S, W, A$, the homomorphisms between them, and the various actions, give five crossed
modules forming a \emph{crossed square}: \index{crossed square} 
\begin{itemize}
\item  ${\cal X} = (\partial : S \to R)$,~ the initial crossed module, on the left, 
\item  ${\cal W(X)} = (\eta : S \to W)$,~ the Whitehead crossed module of ${\cal X}$, at the top, 
\item  ${\cal L(X)} = (\Delta\circ\eta = \alpha\circ\partial : S \to A)$,~ the Lue crossed module of ${\cal X}$, along the top-left to bottom-right diagonal, 
\item  ${\cal N(X)} = (\alpha : R \to A)$,~ the Norrie crossed module of ${\cal X}$, at the bottom, and 
\item  ${\rm Act}({\cal X}) = ( \Delta : W \to A)$,~ the actor crossed module of ${\cal X}$, on the right. 
\end{itemize}
 }

 

\subsection{\textcolor{Chapter }{Centre}}
\logpage{[ 5, 1, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Centre( xmod )\index{Centre@\texttt{Centre}}
\label{Centre}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InnerActor( xmod )\index{InnerActor@\texttt{InnerActor}}
\label{InnerActor}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InnerMorphism( xmod )\index{InnerMorphism@\texttt{InnerMorphism}}
\label{InnerMorphism}
}\hfill{\scriptsize (attribute)}}\\


 Pairs of boundaries or identity mappings provide six morphisms of crossed
modules. In particular, the boundaries of $\mathcal{W}(\mathcal{X})$ and $\mathcal{N}(\mathcal{X})$ form the \emph{inner morphism} of $\mathcal{X}$, mapping source elements to principal derivations and range elements to inner
automorphisms. The image of $\mathcal{X}$ under this morphism is the \emph{inner actor} of $\mathcal{X}$, while the kernel is the \emph{centre} of $\mathcal{X}$. In the example which follows, using the crossed module \texttt{(X3 : c3 -> s3)} from Chapter \ref{chap-up2}, the inner morphism is an inclusion of crossed modules. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> X3;
  [c3->s3]]
  gap> WGX3 := WhiteheadPermGroup( X3 );
  Group( [ (1,2,3)(4,5,6), (1,4)(2,6)(3,5) ] )
  gap> APX3 := AutomorphismPermGroup( X3 );
  Group( [ (3,4,5), (1,2)(4,5) ] )
  gap> WX3 := WhiteheadXMod( X3 );;  Display( WX3 );
  Crossed module Whitehead[c3->s3] :-
  : Source group has generators:
    [ ( 1, 2, 3)( 4, 6, 5) ]
  : Range group has generators:
    [ (1,2,3)(4,5,6), (1,4)(2,6)(3,5) ]
  : Boundary homomorphism maps source generators to:
    [ (1,3,2)(4,6,5) ]
  : Action homomorphism maps range generators to automorphisms:
    (1,2,3)(4,5,6) --> { source gens --> [ (1,2,3)(4,6,5) ] }
    (1,4)(2,6)(3,5) --> { source gens --> [ (1,3,2)(4,5,6) ] }
    These 2 automorphisms generate the group of automorphisms.
  gap> LX3 := LueXMod( X3 );
  Lue[c3->s3]
  gap> NX3 := NorrieXMod( X3 );
  Norrie[c3->s3]
  gap> AX3 := ActorXMod( X3 );;  Display( AX3);
  Crossed module Actor[c3->s3] :-
  : Source group has generators:
    [ (1,2,3)(4,5,6), (1,4)(2,6)(3,5) ]
  : Range group has generators:
    [ (3,4,5), (1,2)(4,5) ]
  : Boundary homomorphism maps source generators to:
    [ (3,5,4), (1,2)(4,5) ]
  : Action homomorphism maps range generators to automorphisms:
    (3,4,5) --> { source gens --> [ (1,2,3)(4,5,6), (1,5)(2,4)(3,6) ] }
    (1,2)(4,5) --> { source gens --> [ (1,3,2)(4,6,5), (1,4)(2,6)(3,5) ] }
    These 2 automorphisms generate the group of automorphisms.
  gap> IAX3 := InnerActorXMod( X3 );;  Display( IAX3 );
  Crossed module InnerActor[c3->s3] :-
  : Source group has generators:
    [ (1,3,2)(4,6,5) ]
  : Range group has generators:
    [ (3,5,4), (1,2)(4,5) ]
  : Boundary homomorphism maps source generators to:
    [ (3,4,5) ]
  : Action homomorphism maps range generators to automorphisms:
    (3,5,4) --> { source gens --> [ (1,3,2)(4,6,5) ] }
    (1,2)(4,5) --> { source gens --> [ (1,2,3)(4,5,6) ] }
    These 2 automorphisms generate the group of automorphisms.
  gap> IMX3 := InnerMorphism( X3 );; Display( IMX3 );
  Morphism of crossed modules :-
  : Source = [c3->s3] with generating sets:
    [ ( 1, 2, 3)( 4, 6, 5) ]
    [ (4,5,6), (2,3)(5,6) ]
  :  Range = Actor[c3->s3] with generating sets:
    [ (1,2,3)(4,5,6), (1,4)(2,6)(3,5) ]
    [ (3,4,5), (1,2)(4,5) ]
  : Source Homomorphism maps source generators to:
    [ (1,3,2)(4,6,5) ]
  : Range Homomorphism maps range generators to:
    [ (3,5,4), (1,2)(4,5) ]
  gap> Centre( X3 );
  [Group( () )->Group( () )]
  
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{Induced Constructions}}\label{chap-induce2}
\logpage{[ 6, 0, 0 ]}
{
  
\section{\textcolor{Chapter }{Induced crossed modules}}\logpage{[ 6, 1, 0 ]}
{
 \index{induced crossed module} 

\subsection{\textcolor{Chapter }{InducedXMod}}
\logpage{[ 6, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InducedXMod( args )\index{InducedXMod@\texttt{InducedXMod}}
\label{InducedXMod}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InducedCat1( args )\index{InducedCat1@\texttt{InducedCat1}}
\label{InducedCat1}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsInducedXMod( xmod )\index{IsInducedXMod@\texttt{IsInducedXMod}}
\label{IsInducedXMod}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsInducedCat1( cat1 )\index{IsInducedCat1@\texttt{IsInducedCat1}}
\label{IsInducedCat1}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MorphismOfInducedXMod( xmod )\index{MorphismOfInducedXMod@\texttt{MorphismOfInducedXMod}}
\label{MorphismOfInducedXMod}
}\hfill{\scriptsize (attribute)}}\\


 A morphism of crossed modules $(\sigma, \rho) : {\cal X}_1 \to {\cal X}_2$ factors uniquely through an induced crossed module $\rho_{\ast} {\cal X}_1 = (\delta ~:~ \rho_{\ast} S_1 \to R_2)$. Similarly, a morphism of cat1-groups factors through an induced cat1-group.
Calculation of induced crossed modules of ${\cal X}$ also provides an algebraic means of determining the homotopy $2$-type of homotopy pushouts of the classifying space of ${\cal X}$. For more background from algebraic topology see references in \cite{BH1},
\cite{BW1}, \cite{BW2}. Induced crossed modules and induced cat1-groups also
provide the building blocks for constructing pushouts in the categories \emph{XMod} and \emph{Cat1}. 

 Data for the cases of algebraic interest is provided by a conjugation crossed
module ${\cal X} = (\partial ~:~ S \to R)$ and a homomorphism $\iota$ from $R$ to a third group $Q$. The output from the calculation is a crossed module $\iota_{\ast}{\cal X} = (\delta ~:~ \iota_{\ast}S \to Q)$ together with a morphism of crossed modules ${\cal X} \to \iota_{\ast}{\cal X}$. When $\iota$ is a surjection with kernel $K$ then $\iota_{\ast}S = [S,K]$ (see \cite{BH1}). When $\iota$ is an inclusion the induced crossed module may be calculated using a copower
construction \cite{BW1} or, in the case when $R$ is normal in $Q$, as a coproduct of crossed modules (\cite{BW2}, but not yet implemented).
When $\iota$ is neither a surjection nor an inclusion, $\iota$ is written as the composite of the surjection onto the image and the inclusion
of the image in $Q$, and then the composite induced crossed module is constructed. These
constructions use Tietze transformation routines in the library file \texttt{tietze.gi}. 

 As a first, surjective example, we take for ${\cal X}$ the normal inclusion crossed module of \texttt{a4} in \texttt{s4}, and for $\iota$ the surjection from \texttt{s4} to \texttt{s3} with kernel \texttt{k4}. The induced crossed module is isomorphic to \texttt{X3}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> s4gens := [ (1,2), (2,3), (3,4) ];;
  gap> s4 := Group( s4gens );; SetName(s4,"s4");
  gap> a4gens := [ (1,2,3), (2,3,4) ];;
  gap> a4 := Subgroup( s4, a4gens );;  SetName( a4, "a4" );
  gap> s3 := Group( (5,6),(6,7) );;  SetName( s3, "s3" );
  gap> epi := GroupHomomorphismByImages( s4, s3, s4gens, [(5,6),(6,7),(5,6)] );;
  gap> X4 := XModByNormalSubgroup( s4, a4 );;
  gap> indX4 := SurjectiveInducedXMod( X4, epi );
  [a4/ker->s3]
  gap> morX4 := MorphismOfInducedXMod( indX4 );
  [[a4->s4] => [a4/ker->s3]]
  
\end{Verbatim}
 For a second, injective example we take for ${\cal X}$ the conjugation crossed module $(\partial ~:~ c4 \to d8)$ of Chapter 3, and for $\iota$ the inclusion \texttt{incd8} of \texttt{d8} in \texttt{d16}. The induced crossed module has $c4 \times c4$ as source. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> incd8 := RangeHom( inc8 );;
  gap> [ Source(incd8), Range(incd8), IsInjective(incd8) ];
  [ d8, d16, true ]
  gap> indX8 := InducedXMod( X8, incd8 );
  #I Simplified presentation for induced group :-
  <presentation with 2 gens and 3 rels of total length 12>
  #I  generators: [ f11, f14 ]
  #I  relators:
  #I  1.  4  [ 1, 1, 1, 1 ]
  #I  2.  4  [ 2, 2, 2, 2 ]
  #I  3.  4  [ 2, -1, -2, 1 ]
  #I induced group has Size: 16
  #I factor 1 is abelian  with invariants: [ 4, 4 ]
  i*([c4->d8])
  gap> Display( indX8 );
  Crossed module i*([c4->d8]) :-
  : Source group has generators:
    [ ( 1, 2, 6, 3)( 4, 7,12, 9)( 5, 8,13,10)(11,14,16,15),
    ( 1, 4,11, 5)( 2, 7,14, 8)( 3, 9,15,10)( 6,12,16,13) ]
  : Range group d16 has generators:
    [ (11,12,13,14,15,16,17,18), (12,18)(13,17)(14,16) ]
  : Boundary homomorphism maps source generators to:
    [ (11,13,15,17)(12,14,16,18), (11,17,15,13)(12,18,16,14) ]
  : Action homomorphism maps range generators to automorphisms:
    (11,12,13,14,15,16,17,18) --> { source gens -->
  [ ( 1, 5,11, 4)( 2, 8,14, 7)( 3,10,15, 9)( 6,13,16,12),
    ( 1, 3, 6, 2)( 4, 9,12, 7)( 5,10,13, 8)(11,15,16,14) ] }
    (12,18)(13,17)(14,16) --> { source gens -->
  [ ( 1, 3, 6, 2)( 4, 9,12, 7)( 5,10,13, 8)(11,15,16,14),
    ( 1, 5,11, 4)( 2, 8,14, 7)( 3,10,15, 9)( 6,13,16,12) ] }
    These 2 automorphisms generate the group of automorphisms.
  gap> morX8 := MorphismOfInducedXMod( indX8 );
  [[c4->d8] => i*([c4->d8])]
  gap> Display( morX8 );
  Morphism of crossed modules :-
  : Source = [c4->d8] with generating sets:
    [ (11,13,15,17)(12,14,16,18) ]
    [ (11,13,15,17)(12,14,16,18), (12,18)(13,17)(14,16) ]
  :  Range = i*([c4->d8]) with generating sets:
    [ ( 1, 2, 6, 3)( 4, 7,12, 9)( 5, 8,13,10)(11,14,16,15),
    ( 1, 4,11, 5)( 2, 7,14, 8)( 3, 9,15,10)( 6,12,16,13) ]
    [ (11,12,13,14,15,16,17,18), (12,18)(13,17)(14,16) ]
  : Source Homomorphism maps source generators to:
    [ ( 1, 2, 6, 3)( 4, 7,12, 9)( 5, 8,13,10)(11,14,16,15) ]
  : Range Homomorphism maps range generators to:
    [ (11,13,15,17)(12,14,16,18), (12,18)(13,17)(14,16) ]
  
\end{Verbatim}
 For a third example we take the identity mapping on \texttt{s3} as boundary, and the inclusion of \texttt{s3} in \texttt{s4} as \texttt{iota}. The induced group is a general linear group \texttt{GL(2,3)}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> s3b := Subgroup( s4, [ (2,3), (3,4) ] );;  SetName( s3b, "s3b" );
  gap> indX3 := InducedXMod( s4, s3b, s3b );
  #I Simplified presentation for induced group :-
  <presentation with 2 gens and 4 rels of total length 33>
  #I  generators: [ f11, f112 ]
  #I  relators:
  #I  1.  2  [ 1, 1 ]
  #I  2.  3  [ 2, 2, 2 ]
  #I  3.  12  [ 1, -2, 1, 2, 1, 2, 1, -2, 1, 2, 1, 2 ]
  #I  4.  16  [ -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1 ]
  #I induced group has Size: 48
  #I IdGroup = [ [  48,  29 ] ]
  i*([s3b->s3b])
  gap> isoX3 := IsomorphismGroups( Source( indX3 ), GeneralLinearGroup(2,3) );
  [ (1,2)(4,5)(6,8), (2,3,4)(5,6,7) ] ->
  [ [ [ Z(3)^0, 0*Z(3) ], [ Z(3), Z(3) ] ],
    [ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), Z(3)^0 ] ] ]
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{AllInducedXMods}}
\logpage{[ 6, 1, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AllInducedXMods( Q )\index{AllInducedXMods@\texttt{AllInducedXMods}}
\label{AllInducedXMods}
}\hfill{\scriptsize (operation)}}\\


 This function calculates all the induced crossed modules \texttt{InducedXMod( Q, P, M )}, where \texttt{P} runs over all conjugacy classes of subgroups of \texttt{Q} and \texttt{M} runs over all non-trivial subgroups of \texttt{P}. }

 }

 }

           
\chapter{\textcolor{Chapter }{Crossed squares and their morphisms}}\label{chap-obj3}
\logpage{[ 7, 0, 0 ]}
{
  \index{crossed module} \index{cat2-group} \index{3d-object} Crossed squares were introduced by Guin-Wal\'ery and Loday (see, for example, \cite{brow:lod}) as fundamental crossed squares of commutative squares of spaces, but are
also of purely algebraic interest. We denote by $[n]$ the set $\{1,2,\ldots,n\}$. We use the $n=2$ version of the definition of crossed $n$-cube as given by Ellis and Steiner \cite{ell:st}. 

 A \emph{crossed square} $\mathcal{R}$ consists of the following: 
\begin{itemize}
\item  Groups $R_J$ for each of the four subsets $J \subseteq [2]$; 
\item  a commutative diagram of group homomorphisms: 
\[ \ddot{\partial}_1 : R_{[2]} \to R_{\{2\}}, \quad \ddot{\partial}_2 : R_{[2]}
\to R_{\{1\}}, \quad \dot{\partial}_1 : R_{\{1\}} \to R_{\emptyset}, \quad
\dot{\partial}_2 : R_{\{2\}} \to R_{\emptyset}; \]
 
\item  actions of $R_{\emptyset}$ on $R_{\{1\}}, R_{\{2\}}$ and $R_{[2]}$ which determine actions of $R_{\{1\}}$ on $R_{\{2\}}$ and $R_{[2]}$ via $\dot{\partial}_1$ and actions of $R_{\{2\}}$ on $R_{\{1\}}$ and $R_{[2]}$ via $\dot{\partial}_2$~; 
\item  a function ~ $\boxtimes : R_{\{1\}} \times R_{\{2\}} \to R_{[2]}$~. 
\end{itemize}
 The following axioms must be satisfied for all $l \in R_{[2]},\; m,m_1,m_2 \in R_{\{1\}},\; n,n_1,n_2 \in R_{\{2\}},\; p \in
R_{\emptyset}$~: 
\begin{itemize}
\item  the homomorphisms $\ddot{\partial}_1, \ddot{\partial}_2$ preserve the action of $R_{\emptyset}$~; 
\item  each of 
\[ \ddot{\mathcal{R}}_1 = (\ddot{\partial}_1 : R_{[2]} \to R_{\{2\}}),~
\ddot{\mathcal{R}}_2 = (\ddot{\partial}_2 : R_{[2]} \to R_{\{1\}}), ~
\dot{\mathcal{R}}_1 = (\dot{\partial}_1 : R_{\{1\}} \to R_{\emptyset}),~
\dot{\mathcal{R}}_2 = (\dot{\partial}_2 : R_{\{2\}} \to R_{\emptyset}), \]
 and the diagonal 
\[ \mathcal{R}_{12} = (\partial_{12} := \dot{\partial}_1\ddot{\partial}_2 =
\dot{\partial}_2\ddot{\partial}_1 : R_{[2]} \to R_{\emptyset}) \]
 are crossed modules (with actions via $R_{\emptyset}$); 
\item  \index{crossed pairing} $\boxtimes$ is a \emph{crossed pairing}: 
\begin{itemize}
\item  $(m_1m_2 \boxtimes n)\;=\;{(m_1 \boxtimes n)}^{m_2}\;(m_2 \boxtimes n)$~, 
\item  $(m \boxtimes n_1n_2) \;=\; (m \boxtimes n_2)\;{(m \boxtimes n_1)}^{n_2}$~, 
\item  $(m \boxtimes n)^{p} \;=\; (m^p \boxtimes n^p)$~; 
\end{itemize}
 
\item  $\ddot{\partial}_1 (m \boxtimes n) \;=\; (n^{-1})^{m}\;n$ \quad \mbox{and} \quad $\ddot{\partial}_2 (m \boxtimes n) \;=\; m^{-1}\;m^{n}$~, 
\item  $(m \boxtimes \ddot{\partial}_1 l) \;=\; (l^{-1})^{m}\;l$ \quad \mbox{and} \quad $(\ddot{\partial}_2 l \boxtimes n) \;=\; l^{-1}\;l^n$~. 
\end{itemize}
 Note that the actions of $R_{\{1\}}$ on $R_{\{2\}}$ and $R_{\{2\}}$ on $R_{\{1\}}$ via $R_{\emptyset}$ are compatible since 
\[ {m_1}^{(n^m)} \;=\; {m_1}^{\dot{\partial}_2(n^m)} \;=\;
{m_1}^{m^{-1}(\dot{\partial}_2 n)m} \;=\; (({m_1}^{m^{-1}})^n)^m~. \]
 
\section{\textcolor{Chapter }{Constructions for crossed squares}}\logpage{[ 7, 1, 0 ]}
{
 Analogously to the data structure used for crossed modules, crossed squares
are implemented as \texttt{3d-objects}. When times allows, cat2-groups will also be implemented, with conversion
between the two types of structure. Some standard constructions of crossed
squares are listed below. At present, a limited number of constructions are
implemented. Morphisms of crossed squares have also been implemented, though
there is a lot still to do. 

\subsection{\textcolor{Chapter }{XSq}}
\logpage{[ 7, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XSq( args )\index{XSq@\texttt{XSq}}
\label{XSq}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XSqByNormalSubgroups( P, N, M, L )\index{XSqByNormalSubgroups@\texttt{XSqByNormalSubgroups}}
\label{XSqByNormalSubgroups}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ActorXSq( X0 )\index{ActorXSq@\texttt{ActorXSq}}
\label{ActorXSq}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Transpose3dObject( S0 )\index{Transpose3dObject@\texttt{Transpose3dObject}}
\label{Transpose3dObject}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Name( S0 )\index{Name@\texttt{Name}}
\label{Name}
}\hfill{\scriptsize (attribute)}}\\


 Here are some standard examples of crossed squares. 
\begin{itemize}
\item  If $M, N$ are normal subgroups of a group $P$, and $L = M \cap N$, then the four inclusions, $L \to N,~ L \to M,~ M \to P,~ N \to P$, together with the actions of $P$ on $M, N$ and $L$ given by conjugation, and the crossed pairing 
\[ \boxtimes \;:\; M \times N \to M\cap N, \quad (m,n) \mapsto [m,n] \,=\,
m^{-1}n^{-1}mn \,=\,(n^{-1})^mn \,=\, m^{-1}m^n \]
 is a crossed square. This construction is implemented as \texttt{XSqByNormalSubgroups(P,N,M,L);}. 
\item  The actor $\mathcal{A}(\mathcal{X}_0)$ of a crossed module $\mathcal{X}_0$ has been described in Chapter 5. The crossed pairing is given by 
\[ \boxtimes \;:\; R \times W \,\to\, S, \quad (r,\chi) \,\mapsto\, \chi r~. \]
 This is implemented as \texttt{ActorXSq( X0 );}. 
\item  The \emph{transpose} of $\mathcal{R}$ is the crossed square $\tilde{\mathcal{R}}$ obtained by interchanging $R_{\{1\}}$ with $R_{\{2\}}$, $\ddot{\partial}_1$ with $\ddot{\partial}_2$, and $\dot{\partial}_1$ with $\dot{\partial}_2$. The crossed pairing is given by 
\[ \tilde{\boxtimes} \;:\; R_{\{2\}} \times R_{\{1\}} \to R_{[2]}, \quad (n,m)
\;\mapsto\; n\,\tilde{\boxtimes}\,m := (m \boxtimes n)^{-1}~. \]
 
\end{itemize}
 The following constructions will be implemented in the next release. 
\begin{itemize}
\item  If $M, N$ are ordinary $P$-modules and $A$ is an arbitrary abelian group on which $P$ acts trivially, then there is a crossed square with sides 
\[ 0 : A \to N,\quad 0 : A \to M,\quad 0 : M \to P,\quad 0 : N \to P. \]
 
\item  For a group $L$, the automorphism crossed module ${\rm Act}\ L = (\iota : L \to {\rm Aut}\ L)$ splits to form the square with $(\iota_1 : L \to {\rm Inn}\ L)$ on two sides, and $(\iota_2 : {\rm Inn}\ L \to {\rm Aut}\ L)$ on the other two sides, where $\iota_1$ maps $l \in L$ to the inner automorphism $\beta_l : L \to L,\; l^{\prime} \mapsto l^{-1}l^{\prime}l$, and $\iota_2$ is the inclusion of ${\rm Inn}\ L$ in ${\rm Aut}\ L$. The actions are standard, and the crossed pairing is 
\[ \boxtimes \;:\; {\rm Inn}\ L \times {\rm Inn}\ L \to L, \quad (\beta_l,
\beta_{l^{\prime}}) \;\mapsto\; [l, l^{\prime}]~. \]
 
\end{itemize}
 }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> c := (11,12,13,14,15,16);;
  gap> d := (12,16)(13,15);;
  gap> cd := c*d;;
  gap> d12 := Group( [ c, d ] );;
  gap> s3a := Subgroup( d12, [ c^2, d ] );;
  gap> s3b := Subgroup( d12, [ c^2, cd ] );;
  gap> c3 := Subgroup( d12, [ c^2 ] );;
  gap> SetName( d12, "d12");  SetName( s3a, "s3a" );
  gap> SetName( s3b, "s3b" );  SetName( c3, "c3" );
  gap> XSconj := XSqByNormalSubgroups( d12, s3b, s3a, c3 );
  [  c3 -> s3b ]
  [  |      |  ]
  [ s3a -> d12 ]
  gap> Name( XSconj );
  "[c3->s3b,s3a->d12]"
  gap> XStrans := Transpose3dObject( XSconj );
  [  c3 -> s3a ]
  [  |      |  ]
  [ s3b -> d12 ]
  gap> X12 := XModByNormalSubgroup( d12, s3a );
  [s3a->d12]
  gap> XSact := ActorXSq( X12 );
  crossed square with:
        up = Whitehead[s3a->d12]
      left = [s3a->d12]
     right = Actor[s3a->d12]
      down = Norrie[s3a->d12]
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{IsXSq}}
\logpage{[ 7, 1, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsXSq( obj )\index{IsXSq@\texttt{IsXSq}}
\label{IsXSq}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPerm3dObject( obj )\index{IsPerm3dObject@\texttt{IsPerm3dObject}}
\label{IsPerm3dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Is3dObject( obj )\index{Is3dObject@\texttt{Is3dObject}}
\label{Is3dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPerm3dObject( obj )\index{IsPerm3dObject@\texttt{IsPerm3dObject}}
\label{IsPerm3dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPc3dObject( obj )\index{IsPc3dObject@\texttt{IsPc3dObject}}
\label{IsPc3dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsFp3dObject( obj )\index{IsFp3dObject@\texttt{IsFp3dObject}}
\label{IsFp3dObject}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPreXSq( obj )\index{IsPreXSq@\texttt{IsPreXSq}}
\label{IsPreXSq}
}\hfill{\scriptsize (property)}}\\


 These are the basic properties for 3dobjects, and crossed squares in
particular. }

 

\subsection{\textcolor{Chapter }{Up2dObject}}
\logpage{[ 7, 1, 3 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Up2dObject( XS )\index{Up2dObject@\texttt{Up2dObject}}
\label{Up2dObject}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Left2dObject( XS )\index{Left2dObject@\texttt{Left2dObject}}
\label{Left2dObject}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Down2dObject( XS )\index{Down2dObject@\texttt{Down2dObject}}
\label{Down2dObject}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Right2dObject( XS )\index{Right2dObject@\texttt{Right2dObject}}
\label{Right2dObject}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DiagonalAction( XS )\index{DiagonalAction@\texttt{DiagonalAction}}
\label{DiagonalAction}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XPair( XS )\index{XPair@\texttt{XPair}}
\label{XPair}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ImageElmXPair( XS, pair )\index{ImageElmXPair@\texttt{ImageElmXPair}}
\label{ImageElmXPair}
}\hfill{\scriptsize (operation)}}\\


 In this implementation the attributes used in the construction of a crossed
square \texttt{XS} are the four crossed modules (2d-objects) on the sides of the square; the
diagonal action of $P$ on $L$, and the crossed pairing. 

 The \textsf{GAP} development team have suggested that crossed pairings should be implemented as
a special case of \texttt{BinaryMappings} -- a structure which does not yet exist in \textsf{GAP}. As a temporary measure, crossed pairings have been implemented using \texttt{Mapping2ArgumentsByFunction}. }

 

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> Up2dObject( XSconj );
  [c3->s3b]
  gap> Right2dObject( XSact );
  Actor[s3a->d12]
  gap> xpconj := XPair( XSconj );;
  gap> ImageElmXPair( xpconj, [ (1,6)(2,5)(3,4), (2,6)(3,5) ] );
  (1,3,5)(2,4,6)
  gap> diag := DiagonalAction( XSact );
  [ (2,3)(6,8)(7,9), (1,2)(4,6)(5,7) ] ->
  [ [ (11,13,15)(12,14,16), (12,16)(13,15) ] ->
      [ (11,15,13)(12,16,14), (12,16)(13,15) ],
    [ (11,13,15)(12,14,16), (12,16)(13,15) ] ->
      [ (11,15,13)(12,16,14), (11,13)(14,16) ] ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Morphisms of crossed squares}}\logpage{[ 7, 2, 0 ]}
{
 \index{morphism of 3d-object} \index{crossed square morphism} \index{3d-mapping} This section describes an initial implementation of morphisms of (pre-)crossed
squares. 

\subsection{\textcolor{Chapter }{Source}}
\logpage{[ 7, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Source( map )\index{Source@\texttt{Source}}
\label{Source}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Range( map )\index{Range@\texttt{Range}}
\label{Range}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Up2dMorphism( map )\index{Up2dMorphism@\texttt{Up2dMorphism}}
\label{Up2dMorphism}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Left2dMorphism( map )\index{Left2dMorphism@\texttt{Left2dMorphism}}
\label{Left2dMorphism}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Down2dMorphism( map )\index{Down2dMorphism@\texttt{Down2dMorphism}}
\label{Down2dMorphism}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{Right2dMorphism( map )\index{Right2dMorphism@\texttt{Right2dMorphism}}
\label{Right2dMorphism}
}\hfill{\scriptsize (attribute)}}\\


 Morphisms of \texttt{3dObjects} are implemented as \texttt{3dMappings}. These have a pair of 3d-objects as source and range, together with four
2d-morphisms mapping between the four pairs of crossed modules on the four
sides of the squares. These functions return \texttt{fail} when invalid data is supplied. }

 

\subsection{\textcolor{Chapter }{IsXSqMorphism}}
\logpage{[ 7, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsXSqMorphism( map )\index{IsXSqMorphism@\texttt{IsXSqMorphism}}
\label{IsXSqMorphism}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPreXSqMorphism( map )\index{IsPreXSqMorphism@\texttt{IsPreXSqMorphism}}
\label{IsPreXSqMorphism}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsBijective( mor )\index{IsBijective@\texttt{IsBijective}}
\label{IsBijective}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsAutomorphism3dObject( mor )\index{IsAutomorphism3dObject@\texttt{IsAutomorphism3dObject}}
\label{IsAutomorphism3dObject}
}\hfill{\scriptsize (property)}}\\


 A morphism \texttt{mor} between two pre-crossed squares $\mathcal{R}_{1}$ and $\mathcal{R}_{2}$ consists of four crossed module morphisms \texttt{Up2dMorphism( mor )}, mapping the \texttt{Up2dObject} of $\mathcal{R}_1$ to that of $\mathcal{R}_2$, \texttt{Left2dMorphism( mor )}, \texttt{Down2dMorphism( mor )} and \texttt{Right2dMorphism( mor )}. These four morphisms are required to commute with the four boundary maps and
to preserve the rest of the structure. The current version of \texttt{IsXSqMorphism} does not perform all the required checks. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> ad12 := GroupHomomorphismByImages( d12, d12, [c,d], [c,d^c] );;
  gap> as3a := GroupHomomorphismByImages( s3a, s3a, [c^2,d], [c^2,d^c] );;
  gap> as3b := GroupHomomorphismByImages( s3b, s3b, [c^2,cd], [c^2,cd^c] );;
  gap> idc3 := IdentityMapping( c3 );;
  gap> upconj := Up2dObject( XSconj );;
  gap> leftconj := Left2dObject( XSconj );; 
  gap> downconj := Down2dObject( XSconj );; 
  gap> rightconj := Right2dObject( XSconj );; 
  gap> up := XModMorphismByHoms( upconj, upconj, idc3, as3b );
  [[c3->s3b] => [c3->s3b]]
  gap> left := XModMorphismByHoms( leftconj, leftconj, idc3, as3a );
  [[c3->s3a] => [c3->s3a]]
  gap> down := XModMorphismByHoms( downconj, downconj, as3a, ad12 );
  [[s3a->d12] => [s3a->d12]]
  gap> right := XModMorphismByHoms( rightconj, rightconj, as3b, ad12 );
  [[s3b->d12] => [s3b->d12]]
  gap> autoconj := XSqMorphism( XSconj, XSconj, up, left, down, right );; 
  gap> ord := Order( autoconj );;
  gap> Display( autoconj );
  Morphism of crossed squares :-
  :    Source = [c3->s3b,s3a->d12]
  :     Range = [c3->s3b,s3a->d12]
  :     order = 3
  :    up-left: [ [ (11,13,15)(12,14,16) ], [ (11,13,15)(12,14,16) ] ]
  :   up-right: [ [ (11,13,15)(12,14,16), (11,16)(12,15)(13,14) ],
    [ (11,13,15)(12,14,16), (11,12)(13,16)(14,15) ] ]
  :  down-left: [ [ (11,13,15)(12,14,16), (12,16)(13,15) ],
    [ (11,13,15)(12,14,16), (11,13)(14,16) ] ]
  : down-right: [ [ (11,12,13,14,15,16), (12,16)(13,15) ],
    [ (11,12,13,14,15,16), (11,13)(14,16) ] ]
  gap> KnownPropertiesOfObject( autoconj );
  [ "IsTotal", "IsSingleValued", "IsInjective", "IsSurjective", "Is3dMapping",
    "IsPreXSqMorphism", "IsXSqMorphism", "IsEndomorphism3dObject" ]
  gap> IsAutomorphism3dObject( autoconj );
  true
  
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{Utility functions}}\label{chap-util}
\logpage{[ 8, 0, 0 ]}
{
  By a utility function we mean a {\GAP} function which is 
\begin{itemize}
\item  needed by other functions in this package, 
\item  not (as far as we know) provided by the standard \textsf{GAP} library, 
\item  more suitable for inclusion in the main library than in this package. 
\end{itemize}
 
\section{\textcolor{Chapter }{Inclusion and Restriction Mappings}}\logpage{[ 8, 1, 0 ]}
{
 \index{inclusion mapping} \index{restriction mapping} 

\subsection{\textcolor{Chapter }{InclusionMappingGroups}}
\logpage{[ 8, 1, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InclusionMappingGroups( G, H )\index{InclusionMappingGroups@\texttt{InclusionMappingGroups}}
\label{InclusionMappingGroups}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RestrictionMappingGroups( hom, src, rng )\index{RestrictionMappingGroups@\texttt{RestrictionMappingGroups}}
\label{RestrictionMappingGroups}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MappingToOne( G, H )\index{MappingToOne@\texttt{MappingToOne}}
\label{MappingToOne}
}\hfill{\scriptsize (operation)}}\\


 The first set of utilities concerns inclusion and restriction mappings.
Restriction may apply to both the source and the range of the map. The map \texttt{incd8} is the inclusion of \texttt{d8} in \texttt{d16} used in Section \ref{sect-oper-mor}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> Print( incd8, "\n" );
  [ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ] ->
  [ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ]
  gap> imd8 := Image( incd8 );;
  gap> resd8 := RestrictionMappingGroups( incd8, c4, imd8 );;
  gap> Source( res8 );  Range( res8 );
  c4
  Group([ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ])
  gap> MappingToOne( c4, imd8 );
  [ (11,13,15,17)(12,14,16,18) ] -> [ () ]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Endomorphism Classes and Automorphisms}}\logpage{[ 8, 2, 0 ]}
{
 \index{endomorphism classes} 

\subsection{\textcolor{Chapter }{EndomorphismClasses}}
\logpage{[ 8, 2, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{EndomorphismClasses( grp, case )\index{EndomorphismClasses@\texttt{EndomorphismClasses}}
\label{EndomorphismClasses}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{EndoClassNaturalHom( class )\index{EndoClassNaturalHom@\texttt{EndoClassNaturalHom}}
\label{EndoClassNaturalHom}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{EndoClassIsomorphism( class )\index{EndoClassIsomorphism@\texttt{EndoClassIsomorphism}}
\label{EndoClassIsomorphism}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{EndoClassConjugators( class )\index{EndoClassConjugators@\texttt{EndoClassConjugators}}
\label{EndoClassConjugators}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AutoGroup( class )\index{AutoGroup@\texttt{AutoGroup}}
\label{AutoGroup}
}\hfill{\scriptsize (attribute)}}\\


 The monoid of endomorphisms of a group is used when calculating the monoid of
derivations of a crossed module and when determining all the cat1-structures
on a group. 

 An endomorphism $\epsilon$ of $R$ with image $H'$ is determined by 
\begin{itemize}
\item  a normal subgroup $N$ of $R$ and a permutation representation $\theta : R/N \to Q$ of the quotient, giving a projection $\theta \circ \nu : R \to Q$, where $\nu : R \to R/N$ is the natural homomorphism; 
\item  an automorphism $\alpha$ of $Q$; 
\item  a subgroup $H'$ in a conjugacy class $[H]$ of subgroups of $R$ isomorphic to $Q$ having representative $H$, an isomorphism $\phi : Q \cong H$, and a conjugating element $c \in R$ such that $H^c = H'$. 
\end{itemize}
 

 Then $\epsilon$ takes values 
\[ \epsilon r ~=~ (\phi\alpha\theta\nu\,r)^c~. \]
 Endomorphisms are placed in the same class if they have the same choice of $N$ and $[H]$, and so the number of endomorphisms is 
\[ |{\rm End}(R)| ~=~ \sum_{{\rm classes}} |{\rm Aut}(Q)|.|[H]|~. \]
 The function \texttt{EndomorphismClasses( <grp>, <case> )} may be called in three ways: 
\begin{itemize}
\item  case 1 includes automorphisms and the zero map, 
\item  case 2 excludes automorphisms and the zero map, 
\item  case 3 is when \texttt{N} intersects \texttt{H} trivially. 
\end{itemize}
 }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> end8 := EndomorphismClasses( d8, 1 );;
  gap> Length( end8 );
  13
  gap> e4 := end8[4];
  <enumerator>
  gap> EndoClassNaturalHom( e4 );
  GroupHomomorphismByImages( d8, Group( [ f1 ] ),
  [ (11,13,15,17)(12,14,16,18), (12,18)(13,17)(14,16) ], [ f1, f1 ] )
  gap> EndoClassIsomorphism( e4 );
  Pcgs([ f1 ]) -> [ (11,13)(14,18)(15,17) ]
  gap> EndoClassConjugators( e4 );
  [ (), (12,18)(13,17)(14,16) ]
  gap> AutoGroup( e4 );
  Group( [ Pcgs([ f1 ]) -> [ f1 ] ] )
  gap> L := List( end8, e -> Length(EndoClassConjugators(e)) * Size(AutoGroup(e)) );
  [ 8, 1, 2, 2, 1, 2, 2, 1, 2, 2, 6, 6, 1 ]
  gap> Sum( L );
  36
  
\end{Verbatim}
 

\subsection{\textcolor{Chapter }{InnerAutomorphismByNormalSubgroup}}
\logpage{[ 8, 2, 2 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{InnerAutomorphismByNormalSubgroup( G, N )\index{InnerAutomorphismByNormalSubgroup@\texttt{InnerAutomorphismByNormalSubgroup}}
\label{InnerAutomorphismByNormalSubgroup}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsGroupOfAutomorphisms( A )\index{IsGroupOfAutomorphisms@\texttt{IsGroupOfAutomorphisms}}
\label{IsGroupOfAutomorphisms}
}\hfill{\scriptsize (property)}}\\


 Inner automorphisms of a group \texttt{G} by the elements of a normal subgroup \texttt{N} are calculated with the first of these functions, usually with \texttt{G} = \texttt{N}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> autd8 := AutomorphismGroup( d8 );;
  gap> innd8 := InnerAutomorphismsByNormalSubgroup( d8, d8 );;
  gap> GeneratorsOfGroup( innd8 );
  [ InnerAutomorphism( d8, (11,13,15,17)(12,14,16,18) ),
    InnerAutomorphism( d8, (12,18)(13,17)(14,16) ) ]
  gap> IsGroupOfAutomorphisms( innd8 );
  true 
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Abelian Modules}}\logpage{[ 8, 3, 0 ]}
{
 \index{abelian module} 

\subsection{\textcolor{Chapter }{AbelianModuleObject}}
\logpage{[ 8, 3, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AbelianModuleObject( grp, act )\index{AbelianModuleObject@\texttt{AbelianModuleObject}}
\label{AbelianModuleObject}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsAbelianModule( obj )\index{IsAbelianModule@\texttt{IsAbelianModule}}
\label{IsAbelianModule}
}\hfill{\scriptsize (property)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AbelianModuleGroup( obj )\index{AbelianModuleGroup@\texttt{AbelianModuleGroup}}
\label{AbelianModuleGroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AbelianModuleAction( obj )\index{AbelianModuleAction@\texttt{AbelianModuleAction}}
\label{AbelianModuleAction}
}\hfill{\scriptsize (attribute)}}\\


 An abelian module is an abelian group together with a group action. These are
used by the crossed module constructor \texttt{XModByAbelianModule}. 

 The resulting \texttt{Xabmod} is isomorphic to the output from \texttt{XModByAutomorphismGroup( k4 );}. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> x := (6,7)(8,9);;  y := (6,8)(7,9);;  z := (6,9)(7,8);;
  gap> k4 := Group( x, y );  SetName( k4, "k4" );
  gap> s3 := Group( (1,2), (2,3) );;  SetName( s3, "s3" );
  gap> alpha := GroupHomomorphismByImages( k4, k4, [x,y], [y,x] );
  gap> beta := GroupHomomorphismByImages( k4, k4, [x,y], [x,z] );
  gap> aut := Group( alpha, beta );
  gap> act := GroupHomomorphismByImages( s3, aut, [(1,2),(2,3)], [alpha,beta] );
  gap> abmod := AbelianModuleObject( k4, act );
  &lt;enumerator&rt;
  gap> Xabmod := XModByAbelianModule( abmod );
  [k4->s3]
  
\end{Verbatim}
 }

 
\section{\textcolor{Chapter }{Distinct and Common Representatives}}\logpage{[ 8, 4, 0 ]}
{
 \index{distinct and common representatives} 

\subsection{\textcolor{Chapter }{DistinctRepresentatives}}
\logpage{[ 8, 4, 1 ]}\nobreak
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DistinctRepresentatives( list )\index{DistinctRepresentatives@\texttt{DistinctRepresentatives}}
\label{DistinctRepresentatives}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CommonRepresentatives( list )\index{CommonRepresentatives@\texttt{CommonRepresentatives}}
\label{CommonRepresentatives}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CommonTransversal( grp, subgrp )\index{CommonTransversal@\texttt{CommonTransversal}}
\label{CommonTransversal}
}\hfill{\scriptsize (operation)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsCommonTransversal( grp, subgrp, list )\index{IsCommonTransversal@\texttt{IsCommonTransversal}}
\label{IsCommonTransversal}
}\hfill{\scriptsize (operation)}}\\


 The final set of utilities deal with lists of subsets of $[1 \ldots n]$ and construct systems of distinct and common representatives using simple,
non-recursive, combinatorial algorithms. 

 When $L$ is a set of $n$ subsets of $[1 \ldots n]$ and the Hall condition is satisfied (the union of any $k$ subsets has at least $k$ elements), a set of distinct representatives exists. 

 When $J,K$ are both lists of $n$ sets, the function \texttt{CommonRepresentatives} returns two lists: the set of representatives, and a permutation of the
subsets of the second list. It may also be used to provide a common
transversal for sets of left and right cosets of a subgroup $H$ of a group $G$, although a greedy algorithm is usually quicker. }

 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  
  gap> J := [ [1,2,3], [3,4], [3,4], [1,2,4] ];;
  gap> DistinctRepresentatives( J );
  [ 1, 3, 4, 2 ]
  gap> K := [ [3,4], [1,2], [2,3], [2,3,4] ];;
  gap> CommonRepresentatives( J, K );
  [ [ 3, 3, 3, 1 ], [ 1, 3, 4, 2 ] ]
  gap> CommonTransversal( d16, c4 );
  [ (), (12,18)(13,17)(14,16), (11,12,13,14,15,16,17,18),
    (11,12)(13,18)(14,17)(15,16) ]
  gap> IsCommonTransversal( d16, c4, [ (), c, d, c*d ] );
  true
  
\end{Verbatim}
 }

 }

           
\chapter{\textcolor{Chapter }{Development history}}\label{chap-history}
\logpage{[ 9, 0, 0 ]}
{
  This chapter, which is intended to contain details of the major changes to the
package as it develops, was first created in April 2002. Details of the
changes from \textsf{XMod}~1 to \textsf{XMod}~2.001 are far from complete. 

 The inspiration for this package was the need, in the mid-1990's, to calculate
induced crossed modules (see \cite{BW1}, \cite{BW2}, \cite{BW3}). \textsf{GAP} was chosen over other computational group theory systems because the code was
freely available, and it was possible to modify the Tietze transformation code
so as to record the images of the original generators of a presentation as
words in the simplified presentation. (These modifications are now a standard
part of the Tietze transformation package in \textsf{GAP}.) 
\section{\textcolor{Chapter }{Changes from version to version}}\logpage{[ 9, 1, 0 ]}
{
 
\subsection{\textcolor{Chapter }{Version 1 for \textsf{GAP}~3}}\logpage{[ 9, 1, 1 ]}
{
 \index{version 1 for \textsf{GAP}~3} The first version of \textsf{XMod} became an accepted package for \textsf{GAP}~3.4.3 in December 1996. }

 
\subsection{\textcolor{Chapter }{Version 2}}\logpage{[ 9, 1, 2 ]}
{
 Conversion of \textsf{XMod}~1 from \textsf{GAP}~3.4.3 to the new \textsf{GAP} syntax began soon after \textsf{GAP}~4 was released, and had a lengthy gestation. The new \textsf{GAP} syntax encouraged a re-naming of many of the function names. An early decision
was to introduce generic names \texttt{2dObject} for (pre-)crossed modules and (pre-)cat1-groups, and \texttt{2dMapping} for the various types of morphism. This allows \texttt{3dObject} to be used in future for crossed squares and cat2-groups, and \texttt{3dMapping} for their morphisms. A generic name for derivations and sections is also
required, and \texttt{Up2dMapping} is currently used. }

 
\subsection{\textcolor{Chapter }{Version 2.001 for \textsf{GAP}~4}}\logpage{[ 9, 1, 3 ]}
{
 \index{version 2.001 for \textsf{GAP}~4} This was the first version of \textsf{XMod} for \textsf{GAP}~4, completed in April 2002 in a rush to catch the release of \textsf{GAP}~4.3. Functions for actors and induced crossed modules were not included, nor
many of the functions for derivations and sections, for example \texttt{InnerDerivation}. During the ten days prior to the release, the main changes made were: 
\begin{itemize}
\item  Generic name \texttt{UpMapping} chosen for derivations and sections (now changed to \texttt{Up2dMapping}). 
\item  File names changed to \texttt{obj2.gd}, \texttt{map2.gi}, \texttt{up2.tex}, etc. 
\item  Added alternative methods for \texttt{IsomorphismPermGroup} for \texttt{2dObjects} (see also 9.1.4). 
\item  Sorted a problem with fixing the generating set for \texttt{R} when used to define derivations. The (old) code uses an fp-group version of \texttt{R} and checks that all the relators map by \texttt{chi} to \texttt{1}. Unfortunately, \texttt{IsomorphismFpGroup} sometimes permutes the order of the \texttt{R}-generators, with unfortunate effects. The fix is to use \texttt{IsomorphismFpGroupByGenerators} which returns the images of the generators specified in the function call. We
have also used \texttt{genR := StrongGeneratorsStabChain( StabChain( rng ) );} throughout to specify the generators of \texttt{R}. 
\item  Operation \texttt{XModMorphism} renamed as \texttt{XModMorphismByHoms}, and a new global function \texttt{XModMorphism} introduced (ditto for other \texttt{2dMappings}). 
\item  Now using $\chi_1 \star \chi_2$ for Whitehead multiplication {\bf on the right}, with \texttt{CompositeDerivation} still giving multiplication {\bf on the left}. This means that the second
axiom for derivations and for sections has changed -- see Chapter 4. 
\end{itemize}
 }

 
\subsection{\textcolor{Chapter }{Induced crossed modules}}\logpage{[ 9, 1, 4 ]}
{
 During the period May 20th - May 27th 2002 converted \texttt{induce.g} to \texttt{induce.gd} and \texttt{induce.gi} (later renamed \texttt{induce2.gd}, \texttt{induce2.gi}), at least as regards induced crossed modules. (Induced cat1-groups may be
convereted one day.) This involved the following. 
\begin{itemize}
\item  Converted combinatorial functions -- \texttt{DistinctRepresentatives}, \texttt{CommonRepresentatives}, \texttt{CommonTransversal} and \texttt{IsCommonTransversal}. 
\item  Converted Tietze modification functions \texttt{TzCommutatorPair}, \texttt{TzPartition} and \texttt{FactorsPresentation}. 
\item  Introduced global functions \texttt{IsomorphismPermObject}, \texttt{IsomorphismFpObject}, and \texttt{IsomorphismPcObject} which call \texttt{IsomorphismPermGroup} etc. when the object is a group. Added functions \texttt{IsomorphismPermPreXMod}, \texttt{IsomorphismPermPreCat1}, etc. to be called when the object is a 2d-object. 
\item  Added \texttt{IsomorphismXModByNormalSubgroup} which applies when the boundary of the xmod is injective. 
\item  Added \texttt{PreXModIsomorphismByIsomorphisms} (we also need a similar function \texttt{PreCat1IsomorphismByIsomorphisms}) where the data consists of a crossed module, an isomorphism of the source,
and an isomorphism of the range. 
\item  Changed \texttt{RModule} to \texttt{AbelianModule}. 
\end{itemize}
 }

 
\subsection{\textcolor{Chapter }{Versions 2.002 -- 2.006}}\logpage{[ 9, 1, 5 ]}
{
 Version 2.002 was prepared for the 4.4 release at the end of January 2004, and
so required a \texttt{PackageInfo.g} file. 

 Version 2.003 of February 28th 2004 just fixed some file protections. 

 Version 2.004 of April 14th 2004 gave a new email address for Murat Alp and
added the \texttt{Cat1Select} functionality of version 1 to the \texttt{Cat1} function (see also version 2.007). 

 Version 2.005 of April 16th 2004 moved the example files from \texttt{tst/test{\textunderscore}i.g} to \texttt{examples/example{\textunderscore}i.g}, and converted \texttt{testmanual.g} to a proper test file \texttt{tst/xmod{\textunderscore}manual.tst}. 

 Changes made include the following. 
\begin{itemize}
\item  Replaced \texttt{OperationHomomorphism} by \texttt{ActionHomomorphism} -- a general \textsf{GAP}4.4 change. 
\item  Finished replacing \texttt{RModule} by \texttt{AbelianModule}. 
\item  Renamed \texttt{UpMapping} as \texttt{Up2dMapping}. 
\item  Added \texttt{MappingGeneratorsImages} and \texttt{InverseGeneralMapping} for a \texttt{2dMapping}. 
\item  Converted the actor crossed module functions from the \texttt{3.4.4} version, including \texttt{AutomorphismPermGroup} for a crossed module, \texttt{WhiteheadXMod}, \texttt{NorrieXMod}, \texttt{LueXMod}, \texttt{ActorXMod}, \texttt{Centre} of a crossed module, \texttt{InnerMorphism} and \texttt{InnerActorXMod}. 
\item  Added \texttt{SmallerDegreePermPreXMod} after discovering, in the library, the very useful \texttt{SmallerDegreePermutationRepresentation}. 
\end{itemize}
 

 Version 2.006 of September 4th 2004 changed morphism functions to return \texttt{fail} when invalid data is supplied, rather than calling \texttt{Error}, and fixed a bug in \texttt{XModByGroupOfAutomorphisms}. }

 
\subsection{\textcolor{Chapter }{Versions 2.007 -- 2.008}}\logpage{[ 9, 1, 6 ]}
{
 This version contains changes made between September 2004 and October 2006. 
\begin{itemize}
\item  Added basic functions for crossed squares, considered as \texttt{3dObjects} with crossed pairings, and their morphisms. Groups with two normal subgroups,
and the actor of a crossed module, provide standard examples of crossed
squares. (Cat2-groups are not yet implemented.) 
\item  Converted the documentation to the format of the \textsf{GAPDoc} package, and added the function \texttt{XModBuildManual()} to the \texttt{util.gi} file. 
\item  Improved \texttt{AutomorphismPermGroup} for crossed modules, and introduced a special method for conjugation crosseed
modules. 
\item  Substantial revisons made to \texttt{XModByCentralExtension}, \texttt{NorrieXMod}, \texttt{LueXMod}, \texttt{ActorXMod}, and \texttt{InclusionInducedXModByCopower}. 
\item  Reintroduced the \texttt{Cat1Select} operation. 
\item  The only reason for releasing version 2.008 was to fix broken links in \texttt{PackageInfo.g}. 
\end{itemize}
 }

 }

 
\section{\textcolor{Chapter }{What needs doing next?}}\logpage{[ 9, 2, 0 ]}
{
 
\begin{itemize}
\item  Speed up the calculation of Whitehead groups. 
\item  Add more functions for \texttt{3dObjects} and implement \texttt{cat2-groups}. 
\item  Add interaction with \textsf{IdRel}, \textsf{XRes}, and \textsf{natp}. 
\item  Need \texttt{InverseGeneralMapping} for morphisms. 
\item  Need more features for \texttt{FpXMods}, \texttt{PcXMods}, etc. 
\item  Implement actions of a crossed module. 
\item  Implement \texttt{FreeXMods}. 
\item  Implement an operation \texttt{Isomorphism2dObjects}. 
\item  Allow the construction of a group of morphisms of crossed modules. 
\item  Complete the conversion from Version 1 of the calculation of sections using \texttt{EndoClasses}. 
\end{itemize}
 }

 }

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

\bibliographystyle{alpha}
\bibliography{manual}

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


\printindex

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