<!-- ------------------------------------------------------------------- -->
<!--                                                                     -->
<!--  gpdhom.xml             Gpd documentation            Chris Wensley  -->
<!--                                                       & Emma Moore  -->
<!--                                                                     -->
<!--  $Id: gpdhom.xml,v 1.05 2008/11/21 gap Exp $                        -->
<!--                                                                     -->
<!-- ------------------------------------------------------------------- -->

<?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- $Id: gpdhom.xml,v 1.05  Exp $ -->

<Chapter Label="chap-gpdhom">
<Heading>Homomorphisms of Groupoids</Heading>

A <E>homomorphism</E> <M>m</M> from a groupoid <M>G</M> to a groupoid <M>H</M>
consists of a map from the objects of <M>G</M> to those of <M>H</M>
together with a map from the elements of <M>G</M> to those of <M>H</M>
which is compatible with tail and head and which preserves multiplication: 
<Display>
m(g1 : o1 \to o2)*m(g2 : o2 \to o3) ~=~ m(g1*g2 : o1 \to o3).
</Display>
<P/>
Note that when a homomorphism is not injective on objects, 
the image of the source need not be a subgroupoid of the range.
The simplest example of this is given by homomorphism the two-object 
groupoid with trivial group to the free group <M>\langle a \rangle</M> 
on one generator, when the image is <M>[1,a,a^{-1}]</M>.


<Section><Heading>Homomorphisms to a connected groupoid</Heading>

<ManSection>
   <Func Name="GroupoidHomomorphism"
         Arg="args" />
   <Oper Name="GroupoidHomomorphismFromSinglePiece"
         Arg="src, rng, hom, imobs" />
   <Attr Name="Source"
         Arg="hom" />
   <Attr Name="Range"
         Arg="hom" />
<Description>
As usual, there are a variety of homomorphism constructors.
The basic construction is a homomorphism <M>G \to H</M> with <M>H</M> connected, 
which is implemented as <C>IsHomomorphismToSinglePieceGroupoidRep</C> 
with attributes <C>Source</C>, <C>Range</C> and <C>PieceImages</C>.
If <M>G</M> is also connected, we may apply 
<C>HomomorphismOfSinglePieceGroupoids</C>, requiring:
<List>
<Item>
a homomorphism <C>hom</C> from the group of <M>G</M> to the group of <M>H</M>.
</Item>
<Item>
a list <C>imobs</C> of the images of the objects of <M>G</M>;
</Item>
</List>
<P/>
</Description>
</ManSection>
<Example>
<![CDATA[
gap> d12 := Group( (15,16,17,18,19,20, (15,20)(16,19)(17,18) );;
gap> Gd12 := SinglePieceGroupoid( [-37,-36,-35,-34], d12 );;
gap> SetName( d12, "d12" );  SetName( Gd12, "Gd12" );
gap> s3d := Subgroup( d12, [ (15,17,19)(16,18,20), (15,20)(16,19)(17,18) ] );
gap> Gs3d := SubgroupoidByPieces( Gd12, [ [[-36,-35,-34], s3d] ] );;
gap> SetName( s3d, "s3d" );  SetName( Gs3d, "Gs3d" );
gap> gend8 := GeneratorsOfGroup( d8 );;
gap> imhd8 := [ ( ), (15,20)(16,19)(17,18) ];;
gap> hd8 := GroupHomomorphismByImages( d8, s3d, gend8, imhd8 );
gap> homd8 := GroupoidHomomorphism( Gd8, Gs3d, hd8, [-34,-35,-36] );
groupoid homomorphism : Gd8 -> Gs3d 
gap> IsBijectiveOnObjects( homd8 );
true
gap> Display( homd8 );
groupoid mapping: [ Gd8 ] -> [ Gs3d ]
root homomorphism: [ [ (1,2,3,4), (1,3) ], [ (), (15,20)(16,19)(17,18) ] ]
images of objects: [ -34, -35, -36 ]
   images of rays: [ (), (), () ]
]]>
</Example>

</Section>
</Chapter>
