%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%W  up2.tex                    XMOD documentation               Chris Wensley
%W                                                                & Murat Alp
%%
%H  $Id: up2.tex,v 2.001 2002/04/17 gap Exp $
%%
%Y  Copyright (C) 1999,2001 University of St. Andrews, North Haugh,
%Y                          St. Andrews, Fife KY16 9SS, Scotland
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Derivations and Sections}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Whitehead Multiplication}

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

\index{section!of cat1-group}
The construction for cat1-groups equivalent to the derivation of a
crossed module is the *section*. 
The monoid of sections of  ${\cal C} = (e;t,h : G \to R)$  
is the set of group homomorphisms
$\xi : R \to G$, with Whitehead multiplication  $\circ$,  
(on the *right*)  satisfying:
$$
\matrix{
{\bf Sect\ 1} ~&:&~ t \xi ~=~ {\rm id}_R ~,\hfill\cr
{\bf Sect\ 2} ~&:&~ (\xi_1 \circ \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)~\.\cr
}
$$
The embedding  $e$  is the identity for this composition,
and  $h(\xi_1 \circ \xi_2) = (h \xi_1)(h \xi_2)$.
A section is  *regular*  when  $h \xi$  is an automorphism and,
of course, the group of regular sections is isomorphic to the
Whitehead group.

\> Object2d( <chi> ) A
\> GeneratorImages( <chi> ) A
\> IsDerivation( <chi> ) P
\> DerivationByImages( <X0>, <ims> ) O

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  *Der\ 1*.  The function `IsDerivation'
is automatically called to check that this procedure is well-defined.

In the following example a crossed module  ${\cal X}_3$
is constructed, isomorphic to the inclusion of the normal
cyclic group <c3> in the symmetric group <s3>.

\beginexample
gap> g18 := Group( (1,2,3), (4,5,6), (2,3)(5,6) );;
gap> SetName( g18, "g18" );
gap> gen18 := GeneratorsOfGroup( g18 );;
gap> a := gen18[1];;  b := gen18[2];;  c := gen18[3];;
gap> s3 := Subgroup( g18, gen18{[2..3]} );;
gap> SetName( s3, "s3" );;
gap> t := GroupHomomorphismByImages( g18, s3, gen18, [ b,b,c] );;
gap> h := GroupHomomorphismByImages( g18, s3, gen18, [(),b,c] );;
gap> e := GroupHomomorphismByImages( s3, g18, [b,c], [b,c] );;
gap> C3 := Cat1( t, h, e );
[g18=>s3]
gap> X3 := XModOfCat1( C3 );;
gap> Display( X3 );
Crossed module [..->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, Group( [ ( 1, 2, 3)( 4, 6, 5) ] ),
[ (4,5,6), (2,3)(5,6) ], [ (1,2,3)(4,6,5), (1,2,3)(4,6,5) ] )
\endexample

\> SectionByImages( <C, ims> ) O
\> SectionByDerivation( <chi> ) O
\> DerivationBySection( <xi> ) O

Sections *are* group homomorphisms, 
so do not need a special representation.
Operations `SectionByDerivation' and `DerivationBySection' 
convert derivations to sections, and vice-versa, 
calling `Cat1OfXMod' and `XModOfCat1' automatically.

Two strategies for calculating derivations and sections are implemented,
see \cite{AW1}.
The default method for `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 {\GAP}~3 version of this package, the default method for 
`AllSections( <C> )' was to compute all endomorphisms
on the range group <R> of <C> as possibilities for the composite $h \xi$.
A backtrack method then found possible images for such a section.
In this version the derivations of the associated crossed module
are calculated, and these are all converted to sections
using `SectionByDerivation'.

\beginexample
gap> xi := SectionByDerivation( chi );
[ (4,5,6), (2,3)(5,6) ] -> [ (1,2,3), (1,2)(4,6) ]
\endexample

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Whitehead Groups and Monoids}

\> RegularDerivations( <X0> ) A
\> AllDerivations( <X0> ) A
\> RegularSections( <C0> ) A
\> AllSections( <C0> ) A
\> ImagesList( <obj> ) A
\> ImagesTable( <obj> ) A

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

Using our example  ${\cal X}_3$ 
we find that there are just nine derivations,
six of them regular, and the associated group is isomorphic to <s3>.

\beginexample
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 ] ]
\endexample

\> CompositeDerivation( <chi1>, <chi2> ) O
\> ImagePositions( <chi> ) A

\hfuzz=20pt%
The Whitehead multiplication is implemented by the function
`CompositeDerivation( <chi1>, <chi2> );'
which has the same result as  `<chi2> * <chi1>',
where composition is on the left and multiplication on the right.

\hfuzz=0.1pt%
\beginexample
gap> reg3 := RegularDerivations( X3 );;
gap> imder3 := ImagesList( reg3 );;
gap> chi4 := DerivationByImages( X3, imder3[4] );
DerivationByImages( s3, Group( [ ( 1, 2, 3)( 4, 6, 5) ] ),
[ (4,5,6), (2,3)(5,6) ], [ ( 1, 3, 2)( 4, 5, 6), () ] )
gap> chi5 := DerivationByImages( X3, imder3[5] );
DerivationByImages( s3, Group( [ ( 1, 2, 3)( 4, 6, 5) ] ),
[ (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, Group( [ ( 1, 2, 3)( 4, 6, 5) ] ),
[ (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
\endexample

\> WhiteheadGroupTable( <X0> ) A
\> WhiteheadMonoidTable( <X0> ) A
\> WhiteheadPermGroup( < X0> ) A
\> WhiteheadTransMonoid( < X0> ) A

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

\beginexample
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,3,2)(4,6,5), (1,4)(2,6)(3,5), (1,5)(2,4)(3,6), 
  (1,6)(2,5)(3,4) ])
gap> wtm3 := WhiteheadTransMonoid( X3 );
<monoid with 9 generators>   
\endexample

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%E
