  
  [1X5 [33X[0;0YHomomorphisms of Groupoids[133X[101X
  
  [33X[0;0YA  [13Xhomomorphism[113X  [22Xm[122X  from a groupoid [22XG[122X to a groupoid [22XH[122X consists of a map from
  the objects of [22XG[122X to those of [22XH[122X together with a map from the elements of [22XG[122X to
  those  of  [22XH[122X  which  is  compatible  with  tail and head and which preserves
  multiplication:[133X
  
  
  [24X[33X[0;6Ym(g1 : o1 \to o2)*m(g2 : o2 \to o3) ~=~ m(g1*g2 : o1 \to o3).[133X
  
  [124X
  
  [33X[0;0YNote  that when a homomorphism is not injective on objects, the image of the
  source  need  not be a subgroupoid of the range. A simple example of this is
  given  by  a  homomorphism  from  the two-object, four-element groupoid with
  trivial  group  to  the free group [22X⟨ a ⟩[122X on one generator, when the image is
  [22X[1,a^n,a^-n][122X for some [22Xn>0[122X.[133X
  
  [33X[0;0YA variety of homomorphism operations are available.[133X
  
  [30X    [33X[0;6YThe  basic  construction is a homomorphism [22Xϕ : G -> H[122X [13Xfrom[113X a connected
        groupoid   [22XG[122X   to   a   connected   groupoid   [22XH[122X,   constructed  using
        [10XGroupoidHomomorphismFromSinglePiece[110X, (see [14X5.1[114X).[133X
  
  [30X    [33X[0;6YSince  more  than  one  connected  groupoid  may be mapped [13Xto[113X the same
        range,  we  then have the operation [10XGroupoidHomomorphismToSinglePiece[110X,
        (see [14X5.4[114X).[133X
  
  [30X    [33X[0;6YThe  third  case  arises  when  both  source  and  range are unions of
        connected groupoids, in which case [10XHomomorphismByUnion[110X is called, (see
        [14X5.5[114X).[133X
  
  [30X    [33X[0;6YFourthly,  there are is an additional operation for the case where the
        source          is          homogeneous          and         discrete,
        [10XGroupoidHomomorphismFromHomogeneousDiscrete[110X, (see [14X5.4-2[114X).[133X
  
  [30X    [33X[0;6YFinally,   there   are  special  operations  for  inclusion  mappings,
        restricted mappings (see [14X5.3[114X). and groupoid automorphisms (see [14X5.6[114X).[133X
  
  
  [1X5.1 [33X[0;0YHomomorphisms from a connected groupoid[133X[101X
  
  [1X5.1-1 GroupoidHomomorphismFromSinglePiece[101X
  
  [33X[1;0Y[29X[2XGroupoidHomomorphismFromSinglePiece[102X( [3Xsrc[103X, [3Xrng[103X, [3Xgens[103X, [3Ximages[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XGroupoidHomomorphism[102X( [3Xargs[103X ) [32X function[133X
  [33X[1;0Y[29X[2XIsGroupoidHomomorphism[102X( [3Xmwohom[103X ) [32X Category[133X
  
  [33X[0;0YThe  simplest groupoid homomorphism is a mapping [22Xϕ : G -> H[122X from a connected
  groupoid [22XG[122X to a connected groupoid [22XH[122X. There are two equivalent sets of input
  data which may be used. Both require the [10XSource[110X [22XG[122X and the [10XRange[110X [22XH[122X. The first
  then requires:[133X
  
  [30X    [33X[0;6Ythe set of generating arrows, [10XgenG = GeneratorsOfGroupoid(G)[110X;[133X
  
  [30X    [33X[0;6Ya list of image arrows [10Ximphi[110X in [22XH[122X.[133X
  
  [33X[0;0YThis        may        be        implemented        by        the       call
  [10XGroupoidHomomorphismFromSinglePiece(G,H,genG,imphi)[110X,  and the data is stored
  in  the  attribute  [10XMappingGeneratorsImages[110X.  Alternatively,  use the global
  function [10XGroupoidHomomorphism[110X with the same four parameters.[133X
  
  [33X[0;0YThe alternative input data consists of:[133X
  
  [30X    [33X[0;6Ya homomorphism [10Xrhom[110X from the root group of [22XG[122X to the group at the image
        object in [22XH[122X;[133X
  
  [30X    [33X[0;6Ya list [10Ximobs[110X of the images of the objects of [22XG[122X;[133X
  
  [30X    [33X[0;6Ya  list [10Ximrays[110X of the elements in the images of the rays of [22XG[122X, so that
        the   image   [22Xϕ(r_i   :   o_1   ->   o_i)[122X   of   the   [22Xi[122X-th   ray   is
        [10X(imrays[i]:imobs[1][110X[22X->[122X[10Ximobs[i])[110X.[133X
  
  [33X[0;0YThis data is stored in the attribute [10XMappingToSinglePieceData[110X.[133X
  
  [33X[0;0YSo an alternative way to construct this homomorphism of groupoids is to make
  a call of the form [10XGroupoidHomomorphism(G,H,rhom,imobs,imrays)[110X.[133X
  
  [33X[0;0YIn  the  following  example  the same homomorphism is constructed using both
  methods.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKk4 := SubgroupoidWithRays( Ha4, k4, [ (), (1,3,4), (1,4)(2,3) ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( Kk4, "Kk4" );[127X[104X
    [4X[25Xgap>[125X [27Xgen1 := GeneratorsOfGroupoid( Gd8 ); [127X[104X
    [4X[28X[ [(5,6,7,8) : -9 -> -9], [(5,7) : -9 -> -9], [() : -9 -> -8], [128X[104X
    [4X[28X  [() : -9 -> -7] ][128X[104X
    [4X[25Xgap>[125X [27Xgen2 := GeneratorsOfGroupoid( Kk4 ); [127X[104X
    [4X[28X[ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X  [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ][128X[104X
    [4X[25Xgap>[125X [27Ximages := [ gen2[1]*gen2[2], gen2[1]^2, gen2[3], gen2[4] ];[127X[104X
    [4X[28X[ [(1,4)(2,3) : -14 -> -14], [() : -14 -> -14], [(1,3,4) : -14 -> -13],[128X[104X
    [4X[28X [(1,4)(2,3) : -14 -> -12] ][128X[104X
    [4X[25Xgap>[125X [27Xhom8 := GroupoidHomomorphismFromSinglePiece( Gd8, Kk4, gen1, images );[127X[104X
    [4X[28Xgroupoid homomorphism : Gd8 -> Kk4[128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [(5,7) : -9 -> -9], [() : -9 -> -8], [128X[104X
    [4X[28X      [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(1,4)(2,3) : -14 -> -14], [() : -14 -> -14], [(1,3,4) : -14 -> -13], [128X[104X
    [4X[28X      [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27Xgend8 := GeneratorsOfGroup( d8 );;[127X[104X
    [4X[25Xgap>[125X [27Ximh := [ (1,4)(2,3), () ];;[127X[104X
    [4X[25Xgap>[125X [27Xh := GroupHomomorphismByImages( d8, a4, gend8, imh );                     [127X[104X
    [4X[28X[ (5,6,7,8), (5,7) ] -> [ (1,4)(2,3), () ][128X[104X
    [4X[25Xgap>[125X [27Xhom9 := GroupoidHomomorphism( Gd8, Kk4, h, [-14,-13,-12],[127X[104X
    [4X[25X>[125X [27X                [ (), (1,3,4), (1,4)(2,3) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xhom8 = hom9;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xe1 := Arrow( Gd8, (5,6,7,8), -7, -8 );;[127X[104X
    [4X[25Xgap>[125X [27XImageElm( hom8, e1 );[127X[104X
    [4X[28X[(1,3,4) : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27XIsGroupoidHomomorphism( hom8 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.2 [33X[0;0YProperties and attributes of groupoid homomorphisms[133X[101X
  
  
  [1X5.2-1 [33X[0;0YProperties of a groupoid homomorphism[133X[101X
  
  [33X[0;0YThe  properties  listed  in  subsection [14X3.3[114X for homomorphisms of magmas with
  objects also apply to groupoid homomorphisms.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27X[ IsInjectiveOnObjects( hom8 ), IsSurjectiveOnObjects( hom8 ) ]; [127X[104X
    [4X[28X[ true, true ][128X[104X
    [4X[25Xgap>[125X [27X[ IsInjective( hom8 ), IsSurjective( hom8 ) ];[127X[104X
    [4X[28X[ false, false ][128X[104X
    [4X[25Xgap>[125X [27Xad8 := GroupHomomorphismByImages( d8, d8, [127X[104X
    [4X[25X>[125X [27X              [ (5,6,7,8), (5,7) ], [ (5,8,7,6), (6,8) ] );; [127X[104X
    [4X[25Xgap>[125X [27Xmd8 := GroupoidHomomorphism( Gd8, Gd8, ad8,[127X[104X
    [4X[25X>[125X [27X              [-7,-9,-8], [(),(5,7),(6,8)] );[127X[104X
    [4X[28Xgroupoid homomorphism : Gd8 -> Gd8[128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [(5,7) : -9 -> -9], [() : -9 -> -8], [128X[104X
    [4X[28X      [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(5,8,7,6) : -7 -> -7], [(6,8) : -7 -> -7], [(5,7) : -7 -> -9], [128X[104X
    [4X[28X      [(6,8) : -7 -> -8] ] ][128X[104X
    [4X[25Xgap>[125X [27XIsBijectiveOnObjects( md8 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X[ IsInjective( md8 ), IsSurjective( md8 ) ];  [127X[104X
    [4X[28X[ true, true ][128X[104X
    [4X[25Xgap>[125X [27X[ IsEndomorphismWithObjects( md8 ), IsAutomorphismWithObjects( md8 ) ];[127X[104X
    [4X[28X[ true, true ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.2-2 [33X[0;0YAttributes of a groupoid homomorphism[133X[101X
  
  [33X[0;0YThe  attributes  of a groupoid homomorphism [10Xmor[110X from a single piece groupoid
  cover both forms of construction defined above.[133X
  
  [30X    [33X[0;6Y[10XS = Source(mor)[110X is the source groupoid of the homomorphism;[133X
  
  [30X    [33X[0;6Y[10XR = Range(mor)[110X is the range groupoid of the homomorphism;[133X
  
  [30X    [33X[0;6Y[10XRootGroupHomomorphism(mor)[110X  is  the  group  homomorphism from the root
        group of [10XS[110X to the group at the image object in [10XR[110X of the root object in
        [10XS[110X;[133X
  
  [30X    [33X[0;6Y[10XImagesOfObjects(mor)[110X  is the list of objects in [10XR[110X which are the images
        of the objects in [10XS[110X;[133X
  
  [30X    [33X[0;6Y[10XImageElementsOfRays(mor)[110X is the list of group elements in those arrows
        in [10XR[110X which are the images of the rays in [10XS[110X;[133X
  
  [30X    [33X[0;6Y[10XMappingGeneratorsImages(mor)[110X  is  the  two element list containing the
        list of generators in [10XS[110X and the list of their images in [10XR[110X;[133X
  
  [30X    [33X[0;6Y[10XMappingToSinglePieceData(mor)[110X  is a list with three elements: the root
        group  homomorphism;  the images of the objects; and the images of the
        rays.[133X
  
  [33X[0;0YFor other types of homomorphism the attributes are very similar.[133X
  
  [33X[0;0YThe  function  [10XObjectGroupHomomorphism[110X,  though an operation, is included in
  this section for convenience.[133X
  
  [1X5.2-3 RootGroupHomomorphism[101X
  
  [33X[1;0Y[29X[2XRootGroupHomomorphism[102X( [3Xhom[103X ) [32X attribute[133X
  
  [33X[0;0YThis is the group homomorphism from the root group of the source groupoid to
  the  group  at  the image object in the range groupoid of the root object in
  the source.[133X
  
  [1X5.2-4 ImagesOfObjects[101X
  
  [33X[1;0Y[29X[2XImagesOfObjects[102X( [3Xhom[103X ) [32X attribute[133X
  
  [33X[0;0YThis  is  the  list of objects in the range groupoid which are the images of
  the objects in the source.[133X
  
  [1X5.2-5 ImageElementsOfRays[101X
  
  [33X[1;0Y[29X[2XImageElementsOfRays[102X( [3Xhom[103X ) [32X attribute[133X
  
  [33X[0;0YThis  is  the  list  of group elements in those arrows in the range groupoid
  which are the images of the rays in the source.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XRootGroupHomomorphism( hom8 );[127X[104X
    [4X[28X[ (5,6,7,8), (5,7) ] -> [ (1,4)(2,3), () ][128X[104X
    [4X[25Xgap>[125X [27XImagesOfObjects( hom8 );[127X[104X
    [4X[28X[ -14, -13, -12 ][128X[104X
    [4X[25Xgap>[125X [27XImageElementsOfRays( hom8 );[127X[104X
    [4X[28X[ (), (1,3,4), (1,4)(2,3) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.2-6 MappingToSinglePieceData[101X
  
  [33X[1;0Y[29X[2XMappingToSinglePieceData[102X( [3Xmap[103X ) [32X attribute[133X
  
  [33X[0;0YAs  mentioned  earlier, this attribute stores the root group homomorphism; a
  list  of the images of the objects; and a list of the elements in the images
  of the rays.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XMappingGeneratorsImages( hom8 );[127X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [(5,7) : -9 -> -9], [() : -9 -> -8], [128X[104X
    [4X[28X      [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(1,4)(2,3) : -14 -> -14], [() : -14 -> -14], [(1,3,4) : -14 -> -13], [128X[104X
    [4X[28X      [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27XMappingToSinglePieceData( hom8 );[127X[104X
    [4X[28X[ [ [ (5,6,7,8), (5,7) ] -> [ (1,4)(2,3), () ], [ -14, -13, -12 ], [128X[104X
    [4X[28X      [ (), (1,3,4), (1,4)(2,3) ] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.2-7 ObjectGroupHomomorphism[101X
  
  [33X[1;0Y[29X[2XObjectGroupHomomorphism[102X( [3Xgpdhom[103X, [3Xobj[103X ) [32X operation[133X
  
  [33X[0;0YFor   a   given  groupoid  homomorphism,  this  operation  gives  the  group
  homomorphism  from  an object group of the source to the object group at the
  image object in the range.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XObjectGroupHomomorphism( hom8, -8 );[127X[104X
    [4X[28X[ (5,6,7,8), (5,7) ] -> [ (1,3)(2,4), () ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.3 [33X[0;0YSpecial types of groupoid homomorphism[133X[101X
  
  [33X[0;0YIn  this section we mention inclusion mappings of subgroupoids; and mappings
  restricted  to  a  source  subgroupoid.  We  also  discuss  various types of
  isomorphism:  to a different set of objects; to a permutation groupoid; to a
  pc-groupoid.[133X
  
  [1X5.3-1 InclusionMappingGroupoids[101X
  
  [33X[1;0Y[29X[2XInclusionMappingGroupoids[102X( [3Xgpd[103X, [3Xsgpd[103X ) [32X operation[133X
  
  [33X[0;0YThe  operation  [10XInclusionMappingGroupoids(gpd,sgpd)[110X  returns  the  inclusion
  homomorphism from the subgroupoid [10Xsgpd[110X to [10Xgpd[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XincKk4 := InclusionMappingGroupoids( Ha4, Kk4 );     [127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Ha4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFor another example, refer back to subsection [2XPiecePositions[102X ([14X4.3-5[114X).[133X
  
  [1X5.3-2 RestrictedMappingGroupoids[101X
  
  [33X[1;0Y[29X[2XRestrictedMappingGroupoids[102X( [3Xmor[103X, [3Xsgpd[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XParentMappingGroupoids[102X( [3Xmor[103X ) [32X attribute[133X
  
  [33X[0;0YThe  operation  [10XRestrictedMappingGroupoids(mor,sgpd)[110X returns the restriction
  of  the homomorphism [10Xmor[110X to the subgroupoid [10Xsgpd[110X of its source. The range is
  usually  set  to  the  [10XImagesSource[110X  of  the restriction. The restriction is
  assigned the attribute [10XParentMappingGroupoids[110X with value [10Xmor[110X (or that of [10Xmor[110X
  is one exists). For another example see section [14X5.7[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XGc4 := Subgroupoid( Gd8, c4 );;  SetName( Gc4, "Gc4" );[127X[104X
    [4X[25Xgap>[125X [27Xres4 := RestrictedMappingGroupoids( hom8, Gc4 );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(1,4)(2,3) : -14 -> -14], [(1,3,4) : -14 -> -13], [128X[104X
    [4X[28X      [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27XParentMappingGroupoids( res4 ) = hom8; [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-3 IsomorphismNewObjects[101X
  
  [33X[1;0Y[29X[2XIsomorphismNewObjects[102X( [3Xsrc[103X, [3Xobjlist[103X ) [32X operation[133X
  
  [33X[0;0YThe  operation [10XIsomorphismNewObjects(gpd,obs)[110X returns the isomorphism from a
  groupoid  [10Xgpd[110X  to a groupoid with the same object group and ray elements but
  with a different set [10Xobs[110X of objects.[133X
  
  [33X[0;0YWe  then  compute  the  composite homomorphism, [10X mor8 : Gd8 -> Kk4 -> Ha4 ->
  Ga4[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XisoHa4 := IsomorphismNewObjects( Ha4, [-30,-29,-28] );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(1,2,3) : -14 -> -14], [(2,3,4) : -14 -> -14], [() : -14 -> -13], [128X[104X
    [4X[28X      [() : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,2,3) : -30 -> -30], [(2,3,4) : -30 -> -30], [() : -30 -> -29], [128X[104X
    [4X[28X      [() : -30 -> -28] ] ][128X[104X
    [4X[25Xgap>[125X [27XKa4 := Range( isoHa4 );  SetName( Ka4, "Ka4" );[127X[104X
    [4X[28Xsingle piece groupoid: < a4, [ -30, -29, -28 ] >[128X[104X
    [4X[25Xgap>[125X [27XIsSubgroupoid( Gk4, Kk4 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XincHa4 := InclusionMappingGroupoids( Ga4, Ha4 );; [127X[104X
    [4X[25Xgap>[125X [27Xmor8 := hom8 * incKk4 * incHa4;                 [127X[104X
    [4X[28Xgroupoid homomorphism : Gd8 -> Ga4[128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [(5,7) : -9 -> -9], [() : -9 -> -8], [128X[104X
    [4X[28X      [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(1,4)(2,3) : -14 -> -14], [() : -14 -> -14], [(1,3,4) : -14 -> -13], [128X[104X
    [4X[28X      [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( mor8, e1 );[127X[104X
    [4X[28X[(1,3,4) : -12 -> -13][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-4 IsomorphismStandardGroupoid[101X
  
  [33X[1;0Y[29X[2XIsomorphismStandardGroupoid[102X( [3Xgpd[103X, [3Xobs[103X ) [32X operation[133X
  
  [33X[0;0YThe  operation  [10XIsomorphismStandardGroupoid(gpd,obs)[110X returns the isomorphism
  from    a    groupoid    with    rays    to    the    groupoid    of    type
  [10XIsDirectProductWithCompleteDigraphDomain[110X  on  the  given set [10Xobs[110X of objects.
  [10XGk4[110X,  a  subgroupoid  of  [10XGa4[110X, was our first example of a groupoid with rays
  (see  [2XSubgroupoidWithRays[102X ([14X4.3-3[114X)), and a standard isomorphic copy is formed
  here.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XisoGk4 := IsomorphismStandardGroupoid( Gk4, [-45..-41] );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -15 -> -15], [(1,3)(2,4) : -15 -> -15], [128X[104X
    [4X[28X      [(1,2,3) : -15 -> -14], [(1,2,4) : -15 -> -13], [(1,3,4) : -15 -> -12], [128X[104X
    [4X[28X      [(2,3,4) : -15 -> -11] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -45 -> -45], [(1,3)(2,4) : -45 -> -45], [() : -45 -> -44], [128X[104X
    [4X[28X      [() : -45 -> -43], [() : -45 -> -42], [() : -45 -> -41] ] ][128X[104X
    [4X[25Xgap>[125X [27XG2k4 := Image( isoGk4 );  SetName( G2k4, "G2k4" );[127X[104X
    [4X[28Xsingle piece groupoid: < k4, [ -45 .. -41 ] >[128X[104X
    [4X[25Xgap>[125X [27Xe5 := Arrow( Gk4, (1,2,4) , -13, -12 );[127X[104X
    [4X[28X[(1,2,4) : -13 -> -12][128X[104X
    [4X[25Xgap>[125X [27XImageElm( isoGk4, e5 );[127X[104X
    [4X[28X[(1,3)(2,4) : -43 -> -42][128X[104X
    [4X[25Xgap>[125X [27XinvGk4 := InverseGeneralMapping( isoGk4 );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -45 -> -45], [(1,3)(2,4) : -45 -> -45], [() : -45 -> -44], [128X[104X
    [4X[28X      [() : -45 -> -43], [() : -45 -> -42], [() : -45 -> -41] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -15 -> -15], [(1,3)(2,4) : -15 -> -15], [128X[104X
    [4X[28X      [(1,2,3) : -15 -> -14], [(1,2,4) : -15 -> -13], [(1,3,4) : -15 -> -12], [128X[104X
    [4X[28X      [(2,3,4) : -15 -> -11] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis  operation may also be used to provide a standard form for groupoids of
  type     [10XIsGroupoidByIsomorphisms[110X     as     described     in     subsection
  [2XGroupoidByIsomorphisms[102X ([14X4.6-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG2;[127X[104X
    [4X[28Xsingle piece groupoid with rays: < s3a, [ -6, -5, -4 ], [128X[104X
    [4X[28X[ [ (), () ], [ (), <identity> of ... ], [ (), <identity ...> ] ] >[128X[104X
    [4X[25Xgap>[125X [27XisoG2 := IsomorphismStandardGroupoid( G2, [-44,-43,-42] ); [127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [[ (1,2), (1,2) ] : -6 -> -6], [[ (2,3), (2,3) ] : -6 -> -6], [128X[104X
    [4X[28X      [[ (), <identity> of ... ] : -6 -> -5], [[ (), <identity ...> ] : -6 -> [128X[104X
    [4X[28X        -4] ], [128X[104X
    [4X[28X  [ [(1,2) : -44 -> -44], [(2,3) : -44 -> -44], [() : -44 -> -43], [128X[104X
    [4X[28X      [() : -44 -> -42] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-5 IsomorphismPermGroupoid[101X
  
  [33X[1;0Y[29X[2XIsomorphismPermGroupoid[102X( [3Xgpd[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XRegularActionHomomorphismGroupoid[102X( [3Xgpd[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XIsomorphismPcGroupoid[102X( [3Xgpd[103X ) [32X attribute[133X
  
  [33X[0;0YThe  attribute  [10XIsomorphismPermGroupoid(gpd)[110X  returns  an isomorphism from a
  groupoid  [10Xgpd[110X  to  a  groupoid  with the same objects but with an isomorphic
  permutation group.[133X
  
  [33X[0;0YThe  attribute [10XRegularActionHomomorphismGroupoid[110X returns an isomorphism from
  a  groupoid  [10Xgpd[110X  to a groupoid with the same objects but with an isomorphic
  regular  presentation.  In  the  example  below these two operations produce
  equivalent permutation groupoids. Only the second is printed as the first is
  liable to change from one run to the next.[133X
  
  [33X[0;0YSimilarly,  the  attribute  [10XIsomorphismPcGroupoid(gpd)[110X attempts to return an
  isomorphism from the group to a pc-group with the same objects.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XisoGq8 := IsomorphismPermGroupoid( Gq8 );;[127X[104X
    [4X[25Xgap>[125X [27XregGq8 := RegularActionHomomorphismGroupoid( Gq8 );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [x : -19 -> -19], [y : -19 -> -19], [y2 : -19 -> -19], [128X[104X
    [4X[28X      [<identity> of ... : -19 -> -18], [<identity> of ... : -19 -> -17] ], [128X[104X
    [4X[28X  [ [(1,2,4,6)(3,8,7,5) : -19 -> -19], [(1,3,4,7)(2,5,6,8) : -19 -> -19], [128X[104X
    [4X[28X      [(1,4)(2,6)(3,7)(5,8) : -19 -> -19], [() : -19 -> -18], [128X[104X
    [4X[28X      [() : -19 -> -17] ] ][128X[104X
    [4X[25Xgap>[125X [27XPq8 := Image( regGq8 );  SetName( Pq8, "Pq8" );[127X[104X
    [4X[28Xsingle piece groupoid: < Group( [ (1,2,4,6)(3,8,7,5), (1,3,4,7)(2,5,6,8), [128X[104X
    [4X[28X  (1,4)(2,6)(3,7)(5,8) ] ), [ -19, -18, -17 ] >[128X[104X
    [4X[25Xgap>[125X [27Xe7 := Arrow( Gq8, x*y, -18, -17 );;[127X[104X
    [4X[25Xgap>[125X [27XImageElm( regGq8, e7 );[127X[104X
    [4X[28X[(1,5,4,8)(2,7,6,3) : -18 -> -17][128X[104X
    [4X[25Xgap>[125X [27XGc4 := Subgroupoid( Gd8, c4 );  SetName( Gc4, "Gc4" );[127X[104X
    [4X[28Xsingle piece groupoid: < c4, [ -9, -8, -7 ] >[128X[104X
    [4X[25Xgap>[125X [27XisoGc4 := IsomorphismPcGroupoid( Gc4 );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [f1 : -9 -> -9], [<identity> of ... : -9 -> -8], [128X[104X
    [4X[28X      [<identity> of ... : -9 -> -7] ] ][128X[104X
    [4X[28X      [<identity> of ... : -9 -> -7] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.4 [33X[0;0YHomomorphisms to a connected groupoid[133X[101X
  
  [1X5.4-1 HomomorphismToSinglePiece[101X
  
  [33X[1;0Y[29X[2XHomomorphismToSinglePiece[102X( [3Xsrc[103X, [3Xrng[103X, [3Xpiecehoms[103X ) [32X operation[133X
  
  [33X[0;0YWhen  [22XG[122X  is  made  up  of  two  or more pieces, all of which get mapped to a
  connected  groupoid,  we  have  a  [13Xhomomorphism to a single piece[113X. The third
  input  parameter in this case is a list of the individual homomorphisms [13Xfrom[113X
  the  single  pieces  (in  the  correct  order!).  See  section  [14X3.1[114X  for the
  corresponding operation on homomorphisms of magmas with objects.[133X
  
  [33X[0;0YIn  the following example the source [10XV2[110X of [10XhomV2[110X has two pieces, and both of
  the component homomorphisms are isomorphisms.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XV2 := UnionOfPieces( Gq8, Gc4 );;[127X[104X
    [4X[25Xgap>[125X [27XimGc4 := [ genPq8[1], genPq8[4], genPq8[5] ];[127X[104X
    [4X[28X[ [(1,2,4,6)(3,8,7,5) : -19 -> -19], [() : -19 -> -18], [() : -19 -> -17] ][128X[104X
    [4X[25Xgap>[125X [27XhomGc4 := GroupoidHomomorphism( Gc4, Pq8, genGc4, imGc4 );[127X[104X
    [4X[28Xgroupoid homomorphism : Gc4 -> Pq8[128X[104X
    [4X[28X[ [ [(5,6,7,8) : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7] ], [128X[104X
    [4X[28X  [ [(1,2,4,6)(3,8,7,5) : -19 -> -19], [() : -19 -> -18], [() : -19 -> -17] ] ][128X[104X
    [4X[25Xgap>[125X [27XhomV2 := HomomorphismToSinglePiece( V2, Pq8, [ regGq8, homGc4 ] );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [ [x : -19 -> -19], [y : -19 -> -19], [y2 : -19 -> -19], [128X[104X
    [4X[28X          [<identity> of ... : -19 -> -18], [<identity> of ... : -19 -> -17] ], [128X[104X
    [4X[28X      [ [(1,2,4,6)(3,8,7,5) : -19 -> -19], [(1,3,4,7)(2,5,6,8) : -19 -> -19], [128X[104X
    [4X[28X          [(1,4)(2,6)(3,7)(5,8) : -19 -> -19], [() : -19 -> -18], [128X[104X
    [4X[28X          [() : -19 -> -17] ] ], [128X[104X
    [4X[28X  [ [ [(5,6,7,8) : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7] ], [128X[104X
    [4X[28X      [ [(1,2,4,6)(3,8,7,5) : -19 -> -19], [() : -19 -> -18], [128X[104X
    [4X[28X          [() : -19 -> -17] ] ] ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( homV2, e7 );            [127X[104X
    [4X[28X[(1,5,4,8)(2,7,6,3) : -18 -> -17][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.4-2 GroupoidHomomorphismFromHomogeneousDiscrete[101X
  
  [33X[1;0Y[29X[2XGroupoidHomomorphismFromHomogeneousDiscrete[102X( [3Xsrc[103X, [3Xrng[103X, [3Xhoms[103X, [3Xoims[103X ) [32X operation[133X
  
  [33X[0;0YThis  operation requires the source; the range; a list of homomorphisms from
  the  object  groups  to  the  image  object  groups; and a list of the image
  objects.  The source must be homogeneous and discrete, and the range must be
  a single piece. The example uses the groupoid [10XHDc6[110X constructed in subsection
  [2XHomogeneousGroupoid[102X ([14X4.1-5[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc3a := Subgroup( a4, [(1,2,3)] );; c3b := Subgroup( a4, [(1,2,4)] );;[127X[104X
    [4X[25Xgap>[125X [27Xc3c := Subgroup( a4, [(1,3,4)] );; c3d := Subgroup( a4, [(2,3,4)] );;[127X[104X
    [4X[25Xgap>[125X [27Xhc6a := GroupHomomorphismByImages( c6, c3a, [127X[104X
    [4X[25X>[125X [27X               [(11,12,13)(14,15)], [(1,2,3)] );;[127X[104X
    [4X[25Xgap>[125X [27Xhc6b := GroupHomomorphismByImages( c6, c3b, [127X[104X
    [4X[25X>[125X [27X               [(11,12,13)(14,15)], [(1,2,4)] );;[127X[104X
    [4X[25Xgap>[125X [27Xhc6c := GroupHomomorphismByImages( c6, c3c, [127X[104X
    [4X[25X>[125X [27X               [(11,12,13)(14,15)], [(1,3,4)] );;[127X[104X
    [4X[25Xgap>[125X [27Xhc6d := GroupHomomorphismByImages( c6, c3d, [127X[104X
    [4X[25X>[125X [27X               [(11,12,13)(14,15)], [(2,3,4)] );;[127X[104X
    [4X[25Xgap>[125X [27Xmor6 := GroupoidHomomorphismFromHomogeneousDiscrete( HDc6, Ga4,[127X[104X
    [4X[25X>[125X [27X             [ hc6a, hc6b, hc6c, hc6d ], [-15,-14,-12,-11] );[127X[104X
    [4X[28Xgroupoid homomorphism : HDc6 -> Ga4[128X[104X
    [4X[25Xgap>[125X [27Xe6 := Arrow( HDc6, (11,12,13), -25, -25 );;[127X[104X
    [4X[25Xgap>[125X [27XImageElm( mor6, e6 );[127X[104X
    [4X[28X[(1,3,4) : -12 -> -12][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.5 [33X[0;0YHomomorphisms to more than one piece[133X[101X
  
  [1X5.5-1 HomomorphismByUnion[101X
  
  [33X[1;0Y[29X[2XHomomorphismByUnion[102X( [3Xsrc[103X, [3Xrng[103X, [3Xhoms[103X ) [32X operation[133X
  
  [33X[0;0YAs in section [14X3.3[114X, when the range [22XH[122X has more than one connected component, a
  homomorphism is a union of homomorphisms, one for each piece in the range.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XW1 := UnionOfPieces( Ha4, Gd8 );;[127X[104X
    [4X[25Xgap>[125X [27XW2 := UnionOfPieces( Ka4, Kk4 );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( W1, "[Ha4,Gd8]" );  SetName( W2, "[Ka4,Kk4]" );[127X[104X
    [4X[25Xgap>[125X [27XhomW := HomomorphismByUnion( W1, W2, [ isoHa4, hom8 ] );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( homW );           [127X[104X
    [4X[28Xgroupoid homomorphism: [Ha4,Gd8] -> [Ka4,Kk4] with pieces :[128X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ka4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,2,3)[128X[104X
    [4X[28X(2,3,4) -> (2,3,4)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -30, -29, -28 ][128X[104X
    [4X[28Xray images: [ (), (), () ][128X[104X
    [4X[28Xhomomorphism to single piece groupoid: Gd8 -> Kk4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(5,6,7,8) -> (1,4)(2,3)[128X[104X
    [4X[28X(5,7) -> ()[128X[104X
    [4X[28Xobject map: [ -9, -8, -7 ] -> [ -14, -13, -12 ][128X[104X
    [4X[28Xray images: [ (), (1,3,4), (1,4)(2,3) ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X5.5-2 IsomorphismGroupoids[101X
  
  [33X[1;0Y[29X[2XIsomorphismGroupoids[102X( [3XA[103X, [3XB[103X ) [32X operation[133X
  
  [33X[0;0YWhen  [22XA,B[122X  are two single piece groupoids, they are isomorphic provided they
  have the same number of objects and the root groups are isomorphic.[133X
  
  [33X[0;0YWhen   [22XA=[A_1,...,A_n],~   B=[B_1,...,B_n][122X  are  both  unions  of  connected
  groupoids, they are isomorphic if there is a permutation [22Xπ[122X of [22X[1,...,n][122X such
  that [22XA_i[122X is isomorphic to [22XB_π(i)[122X for all [22Xi[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xs3b := Group( (4,6,8)(5,7,9), (4,9)(5,8)(6,7) );;[127X[104X
    [4X[25Xgap>[125X [27Xs3c := Group( (4,6,8)(5,7,9), (5,9)(6,8) );;[127X[104X
    [4X[25Xgap>[125X [27XGb := SinglePieceGroupoid( s3b, [-6,-5,-4] );; [127X[104X
    [4X[25Xgap>[125X [27XGc := SinglePieceGroupoid( s3c, [-16,-15,-14] );; [127X[104X
    [4X[25Xgap>[125X [27XSetName( Gb, "Gb" );  SetName( Gc, "Gc" );  [127X[104X
    [4X[25Xgap>[125X [27Xc6b := Group( (1,2,3,4,5,6) );; [127X[104X
    [4X[25Xgap>[125X [27Xc6c := Group( (7,8)(9,10,11) );;[127X[104X
    [4X[25Xgap>[125X [27XHb := SinglePieceGroupoid( c6b, [-10,-9,-8,-7] );; [127X[104X
    [4X[25Xgap>[125X [27XHc := SinglePieceGroupoid( c6c, [-20,-19,-18,-17] );; [127X[104X
    [4X[25Xgap>[125X [27XSetName( Hb, "Hb" );  SetName( Hc, "Hc" ); [127X[104X
    [4X[25Xgap>[125X [27XIsomorphismGroupoids( Gb, Gc );[127X[104X
    [4X[28Xgroupoid homomorphism : Gb -> Gc[128X[104X
    [4X[28X[ [ [(4,6,8)(5,7,9) : -6 -> -6], [(4,9)(5,8)(6,7) : -6 -> -6], [128X[104X
    [4X[28X      [() : -6 -> -5], [() : -6 -> -4] ], [128X[104X
    [4X[28X  [ [(4,6,8)(5,7,9) : -16 -> -16], [(5,9)(6,8) : -16 -> -16], [128X[104X
    [4X[28X      [() : -16 -> -15], [() : -16 -> -14] ] ][128X[104X
    [4X[25Xgap>[125X [27XIsomorphismGroupoids( Gb, Hb );[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XB := UnionOfPieces( [ Gb, Hb ] );; [127X[104X
    [4X[25Xgap>[125X [27XC := UnionOfPieces( [ Gc, Hc ] );;[127X[104X
    [4X[25Xgap>[125X [27XisoBC := IsomorphismGroupoids( B, C );; [127X[104X
    [4X[25Xgap>[125X [27XPrint( List( PiecesOfMapping(isoBC), p -> [Source(p),Range(p)] ) );[127X[104X
    [4X[28X[ [ Hb, Hc ], [ Gb, Gc ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.6 [33X[0;0YAutomorphisms of groupoids[133X[101X
  
  [33X[0;0YIn  this  section  we consider automorphisms of single piece groupoids; then
  homogeneous discrete groupoids; and finally homogeneous groupoids.[133X
  
  [1X5.6-1 GroupoidAutomorphismByObjectPerm[101X
  
  [33X[1;0Y[29X[2XGroupoidAutomorphismByObjectPerm[102X( [3Xgpd[103X, [3Ximobs[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XGroupoidAutomorphismByGroupAuto[102X( [3Xgpd[103X, [3Xgpiso[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XGroupoidAutomorphismByRayShifts[102X( [3Xgpd[103X, [3Ximrays[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XGroupoidInnerAutomorphism[102X( [3Xgpd[103X, [3Xarrow[103X ) [32X operation[133X
  
  [33X[0;0YWe  first  describe  automorphisms  of  a  groupoid  [22XG[122X where [22XG[122X is the direct
  product  of  a  group  [22Xg[122X  and  a  complete  digraph  with  [22Xn[122X  objects..  The
  automorphism group is generated by three types of automorphism:[133X
  
  [30X    [33X[0;6Ygiven a permutation [22Xπ[122X of the [22Xn[122X objects, we define[133X
  
  
  [24X      [33X[0;6Y\pi  :  G  \to G,~ (g : o_i \to o_j) \mapsto (g : o_{\pi i} \to o_{\pi
        j});[133X
  
  [124X
  
  [30X    [33X[0;6Ygiven an automorphism [22Xα[122X of the root group [22Xg[122X, we define[133X
  
  
  [24X      [33X[0;6Y\alpha : G \to G,~ (g : o_i \to o_j) \mapsto (\alpha g : o_i \to o_j);[133X
  
  [124X
  
  [30X    [33X[0;6Ygiven [22XL = [1,g_2,g_3,...,g_n] ∈ g^n[122X we define[133X
  
  
  [24X      [33X[0;6Y\theta_L : G \to G,~ (g : o_i \to o_j) \mapsto (g_i^{-1}gg_j : o_i \to
        o_j)[133X
  
  [124X
  
        [33X[0;6Yso, in particular, [22X∀ j[122X the rays [22X(r_j : o_1 -> o_j)[122X are shifted by [22Xg_j[122X:
        they map to [22X(r_jg_j : o_1 -> o_j)[122X;[133X
  
  [30X    [33X[0;6Ygiven  an arrow [22Xa ∈ G[122X, the [13Xinner automorphism[113X of [22XG[122X by [22Xa[122X is the mapping
        [22Xg ↦ g^a[122X where conjugation of arrows is defined in section [14X4.5[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xperm1 := [-13,-12,-14];;[127X[104X
    [4X[25Xgap>[125X [27Xaut1 := GroupoidAutomorphismByObjectPerm( Ha4, perm1 );; [127X[104X
    [4X[25Xgap>[125X [27XDisplay( aut1 ); [127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,2,3)[128X[104X
    [4X[28X(2,3,4) -> (2,3,4)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -13, -12, -14 ][128X[104X
    [4X[28Xray images: [ (), (), () ][128X[104X
    [4X[25Xgap>[125X [27Xd := Arrow( Ha4, (1,3,4), -12, -13 ); [127X[104X
    [4X[28X[(1,3,4) : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27Xd1 := ImageElm( aut1, d ); [127X[104X
    [4X[28X[(1,3,4) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27Xgensa4 := GeneratorsOfGroup( a4 );; [127X[104X
    [4X[25Xgap>[125X [27Xalpha2 := GroupHomomorphismByImages( a4, a4, gensa4, [(2,3,4), (1,3,4)] );; [127X[104X
    [4X[25Xgap>[125X [27Xaut2 := GroupoidAutomorphismByGroupAuto( Ha4, alpha2 );; [127X[104X
    [4X[25Xgap>[125X [27XDisplay( aut2 ); [127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (2,3,4)[128X[104X
    [4X[28X(2,3,4) -> (1,3,4)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -14, -13, -12 ][128X[104X
    [4X[28Xray images: [ (), (), () ][128X[104X
    [4X[25Xgap>[125X [27Xd2 := ImageElm( aut2, d1 );[127X[104X
    [4X[28X[(1,2,4) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27XL3 := [(), (1,3,2), (2,4,3)];; [127X[104X
    [4X[25Xgap>[125X [27Xaut3 := GroupoidAutomorphismByRayShifts( Ha4, L3 );; [127X[104X
    [4X[25Xgap>[125X [27XDisplay( aut3 ); [127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,2,3)[128X[104X
    [4X[28X(2,3,4) -> (2,3,4)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -14, -13, -12 ][128X[104X
    [4X[28Xray images: [ (), (1,3,2), (2,4,3) ][128X[104X
    [4X[25Xgap>[125X [27Xd3 := ImageElm( aut3, d2 );[127X[104X
    [4X[28X[(1,4)(2,3) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27Xh4 := Arrow( Ha4, (2,3,4), -12, -13 );; [127X[104X
    [4X[25Xgap>[125X [27Xaut4 := GroupoidInnerAutomorphism( Ha4, h4 );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( aut4 );[127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,2,3)[128X[104X
    [4X[28X(2,3,4) -> (2,3,4)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -14, -12, -13 ][128X[104X
    [4X[28Xray images: [ (), (2,4,3), (2,3,4) ][128X[104X
    [4X[25Xgap>[125X [27Xd4 := ImageElm( aut4, d3 );[127X[104X
    [4X[28X[(1,2,4) : -14 -> -13][128X[104X
    [4X[25Xgap>[125X [27Xaut1234 := aut1*aut2*aut3*aut4;; [127X[104X
    [4X[25Xgap>[125X [27XDisplay( aut1234 ); [127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,4,3)[128X[104X
    [4X[28X(2,3,4) -> (2,4,3)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -12, -13, -14 ][128X[104X
    [4X[28Xray images: [ (), (1,2)(3,4), (1,2)(3,4) ][128X[104X
    [4X[25Xgap>[125X [27Xd4  = ImageElm( aut1234, d );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xinv1234 := InverseGeneralMapping( aut1234 );; [127X[104X
    [4X[25Xgap>[125X [27XDisplay( inv1234 ); [127X[104X
    [4X[28Xhomomorphism to single piece groupoid: Ha4 -> Ha4[128X[104X
    [4X[28Xroot group homomorphism:[128X[104X
    [4X[28X(1,2,3) -> (1,2,4)[128X[104X
    [4X[28X(2,3,4) -> (1,2,3)[128X[104X
    [4X[28Xobject map: [ -14, -13, -12 ] -> [ -12, -13, -14 ][128X[104X
    [4X[28Xray images: [ (), (), (1,4)(2,3) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.6-2 [33X[0;0YAutomorphisms of a groupoid with rays[133X[101X
  
  [33X[0;0YLet [22XS[122X be a wide subgroupoid with rays of a standard groupoid [22XG[122X.[133X
  
  [33X[0;0YAn  automorphism  [22Xα[122X  of  the root group [22XH[122X extends to the whole of [22XS[122X with the
  rays fixed by the automorphism: [22X(r^-1_ihr_j : o_i -> o_j) ↦ (r^-1_i (α h)r_j
  : o_i -> o_j)[122X.[133X
  
  [33X[0;0YAn  automorphism  of  [22XG[122X  obtained  by  permuting  the objects may map [22XS[122X to a
  different subgroupoid. So we construct an isomorphism [22Xι[122X from [22XS[122X to a standard
  groupoid [22XT[122X, construct [22Xα[122X permuting the objects of [22XT[122X, and return [22Xι*α*ι^-1[122X.[133X
  
  [33X[0;0YFor an automorphism by ray shifts we require that the shifts are elements of
  the root group of [22XS[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27X## (1) automorphism by group auto [127X[104X
    [4X[25Xgap>[125X [27Xa5 := GroupHomomorphismByImages( k4, k4,[127X[104X
    [4X[25X>[125X [27X             [ (1,2)(3,4), (1,3)(2,4) ], [ (1,3)(2,4), (1,4)(2,3) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xaut5 := GroupoidAutomorphismByGroupAuto( Kk4, a5 );[127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Kk4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,3)(2,4) : -14 -> -14], [(1,4)(2,3) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27Xa := Arrow( Kk4, (1,3)(2,4), -12, -12 );;[127X[104X
    [4X[25Xgap>[125X [27XImageElm( aut5, a );[127X[104X
    [4X[28X[(1,4)(2,3) : -12 -> -12][128X[104X
    [4X[25Xgap>[125X [27Xb := Arrow( Kk4, (1,4,2), -12, -13 );;[127X[104X
    [4X[25Xgap>[125X [27XImageElm( aut5, b );[127X[104X
    [4X[28X[(1,2,3) : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27X## (2) automorphism by object perm [127X[104X
    [4X[25Xgap>[125X [27Xaut6 := GroupoidAutomorphismByObjectPerm( Kk4, [-13,-12,-14] );[127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Kk4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,4)(2,3) : -13 -> -13], [(1,2)(3,4) : -13 -> -13], [128X[104X
    [4X[28X      [(2,3,4) : -13 -> -12], [(1,4,3) : -13 -> -14] ] ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut6, a );                                           [127X[104X
    [4X[28X[(1,3)(2,4) : -14 -> -14][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut6, b );                                           [127X[104X
    [4X[28X[(1,3)(2,4) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27X## (3) automorphism by ray shifts [127X[104X
    [4X[25Xgap>[125X [27Xaut7 := GroupoidAutomorphismByRayShifts( Kk4,[127X[104X
    [4X[25X>[125X [27X               [ (), (1,4)(2,3), (1,3)(2,4) ] );[127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Kk4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,2,3) : -14 -> -13], [(1,2)(3,4) : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut7, a );[127X[104X
    [4X[28X[(1,3)(2,4) : -12 -> -12][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut7, b );[127X[104X
    [4X[28X[(1,2,3) : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27X## (4) combine these three automorphisms [127X[104X
    [4X[25Xgap>[125X [27Xaut567 := aut5 * aut6 * aut7;[127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Kk4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -13 -> -13], [(1,3)(2,4) : -13 -> -13], [128X[104X
    [4X[28X      [(1,4,3) : -13 -> -12], [(1,3,2) : -13 -> -14] ] ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut567, a ); [127X[104X
    [4X[28X[(1,4)(2,3) : -14 -> -14][128X[104X
    [4X[25Xgap>[125X [27XImageElm( aut567, b );[127X[104X
    [4X[28X[(1,4)(2,3) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27X## (5) conjgation by an arrow[127X[104X
    [4X[25Xgap>[125X [27Xe8 := Arrow( Kk4, (1,3)(2,4), -14, -12 );;[127X[104X
    [4X[25Xgap>[125X [27Xaut8 := GroupoidInnerAutomorphism( Kk4, e8 );[127X[104X
    [4X[28Xgroupoid homomorphism : Kk4 -> Kk4[128X[104X
    [4X[28X[ [ [(1,2)(3,4) : -14 -> -14], [(1,3)(2,4) : -14 -> -14], [128X[104X
    [4X[28X      [(1,3,4) : -14 -> -13], [(1,4)(2,3) : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,2)(3,4) : -12 -> -12], [(1,3)(2,4) : -12 -> -12], [128X[104X
    [4X[28X      [(1,4,2) : -12 -> -13], [(1,4)(2,3) : -12 -> -14] ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.6-3 AutomorphismGroupOfGroupoid[101X
  
  [33X[1;0Y[29X[2XAutomorphismGroupOfGroupoid[102X( [3Xgpd[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XNiceObjectAutoGroupGroupoid[102X( [3Xgpd[103X, [3Xaut[103X ) [32X operation[133X
  
  [33X[0;0YAs  above,  let  [22XG[122X be the direct product of a group [22Xg[122X and a complete digraph
  with  [22Xn[122X  objects.  The  [10XAutomorphismGroup[110X  [22XAut(G)[122X  of [22XG[122X is isomorphic to the
  quotient  of  [22XS_n  ×  A  × g^n[122X by a subgroup isomorphic to [22Xg[122X, where [22XA[122X is the
  automorphism  group  of  [22Xg[122X  and [22XS_n[122X is the symmetric group on the [22Xn[122X objects.
  This is one of the main topics in [AW10].[133X
  
  [33X[0;0YIf  [22XH[122X  is  the  union  of  [22Xk[122X  groupoids, all isomorphic to [22XG[122X, then [22XAut(H)[122X is
  isomorphic to [22XS_k ⋉ Aut(G)[122X.[133X
  
  [33X[0;0YThe  function [10XNiceObjectAutoGroupGroupoid[110X takes a groupoid and a subgroup of
  its automorphism group and retuns a [13Xnice monomorphism[113X from this automorphism
  group  to  a  pc-group,  if  one is available. The current implementation is
  experimental.  Note  that  [10XImageElm[110X  at  present  only  works  on generating
  elements.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XAHa4 := AutomorphismGroupOfGroupoid( Ha4 ); [127X[104X
    [4X[28XAut(Ha4)[128X[104X
    [4X[25Xgap>[125X [27XAgens := GeneratorsOfGroup( AHa4);; [127X[104X
    [4X[25Xgap>[125X [27XLength( Agens );[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27XNHa4 := NiceObject( AHa4 );; [127X[104X
    [4X[25Xgap>[125X [27XMHa4 := NiceMonomorphism( AHa4 );; [127X[104X
    [4X[25Xgap>[125X [27XSize( AHa4 );    ## (3!)x24x(12^2)[127X[104X
    [4X[28X20736[128X[104X
    [4X[25Xgap>[125X [27XSetName( AHa4, "AHa4" ); [127X[104X
    [4X[25Xgap>[125X [27XSetName( NHa4, "NHa4" );[127X[104X
    [4X[25Xgap>[125X [27X## either of these names may be returned[127X[104X
    [4X[25Xgap>[125X [27Xnames := [ "(((A4 x A4 x A4) : C2) : C3) : C2",[127X[104X
    [4X[25X>[125X [27X   "(C2 x C2 x C2 x C2 x C2 x C2) : (((C3 x C3 x C3) : C3) : (C2 x C2))" ];;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescription( NHa4 ) in names;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X##  cannot test images of Agens because of random variations [127X[104X
    [4X[25Xgap>[125X [27X##  Now do some tests![127X[104X
    [4X[25Xgap>[125X [27Xmgi := MappingGeneratorsImages( MHa4 );; [127X[104X
    [4X[25Xgap>[125X [27Xautgen := mgi[1];;[127X[104X
    [4X[25Xgap>[125X [27Xpcgen := mgi[2];;[127X[104X
    [4X[25Xgap>[125X [27Xngen := Length( autgen );; [127X[104X
    [4X[25Xgap>[125X [27XForAll( [1..ngen], i -> Order(autgen[i]) = Order(pcgen[i]) ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.6-4 [33X[0;0YInner automorphisms[133X[101X
  
  [33X[0;0YThe  inner automorphism subgroup [22XmathrmInn(G)[122X of the automorphism group of [22XG[122X
  is  the  group of inner automorphisms [22X∧ a : b ↦ b^a[122X for [22Xa ∈ G[122X. It is [13Xnot[113X the
  case  that  the  map  [22XG  ->  mathrmInn(G), a ↦ ∧ a[122X preserves multiplication.
  Indeed, when [22Xa=(o,g,p), b=(p,h,r) ∈ G[122X with objects [22Xp,q,r[122X all distict, then[133X
  
  
  [24X[33X[0;6Y\wedge(ab)   ~=~  (\wedge  a)(\wedge  b)(\wedge  a)  ~=~  (\wedge  b)(\wedge
  a)(\wedge b).[133X
  
  [124X
  
  [33X[0;0Y(Compare   this   with  the  permutation  identity  [22X(pq)(qr)(pq)  =  (pr)  =
  (qr)(pq)(qr)[122X.)    So    the    map    [22XG   ->   mathrmInn(G)[122X   is   of   type
  [10XIsMappingWithObjectsByFunction[110X.[133X
  
  [33X[0;0YIn  the  example we convert the automorphism group [10XAGa4[110X into a single object
  groupoid, and then define the inner automorphism map.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XAHa40 := Groupoid( AHa4, [0] );[127X[104X
    [4X[28Xsingle piece groupoid: < Aut(Ha4), [ 0 ] >[128X[104X
    [4X[25Xgap>[125X [27Xconj := function(a) [127X[104X
    [4X[25X>[125X [27X       return ArrowNC( Ha4, true, GroupoidInnerAutomorphism(Ha4,a), 0, 0 ); [127X[104X
    [4X[25X>[125X [27X   end;; [127X[104X
    [4X[25Xgap>[125X [27Xinner := MappingWithObjectsByFunction( Ha4, AHa40, conj, [0,0,0] );;[127X[104X
    [4X[25Xgap>[125X [27Xa1 := Arrow( Ha4, (1,2,3), -14, -13 );;[127X[104X
    [4X[25Xgap>[125X [27Xinn1 := ImageElm( inner, a1 );;                        [127X[104X
    [4X[25Xgap>[125X [27Xa2 := Arrow( Ha4, (2,3,4), -13, -12 );;[127X[104X
    [4X[25Xgap>[125X [27Xinn2 := ImageElm( inner, a2 );;       [127X[104X
    [4X[25Xgap>[125X [27Xa3 := a1*a2;                      [127X[104X
    [4X[28X[(1,3)(2,4) : -14 -> -12][128X[104X
    [4X[25Xgap>[125X [27Xinn3 := ImageElm( inner, a3 );  [127X[104X
    [4X[28X[groupoid homomorphism : Ha4 -> Ha4[128X[104X
    [4X[28X[ [ [(1,2,3) : -14 -> -14], [(2,3,4) : -14 -> -14], [() : -14 -> -13], [128X[104X
    [4X[28X      [() : -14 -> -12] ], [128X[104X
    [4X[28X  [ [(1,3,4) : -12 -> -12], [(1,2,4) : -12 -> -12], [(1,3)(2,4) : -12 -> -13],[128X[104X
    [4X[28X      [() : -12 -> -14] ] ] : 0 -> 0][128X[104X
    [4X[25Xgap>[125X [27X(inn3 = inn1*inn2*inn1) and (inn3 = inn2*inn1*inn2);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.6-5 GroupoidAutomorphismByGroupAutos[101X
  
  [33X[1;0Y[29X[2XGroupoidAutomorphismByGroupAutos[102X( [3Xgpd[103X, [3Xauts[103X ) [32X operation[133X
  
  [33X[0;0YHomogeneous,  discrete groupoids are the second type of groupoid for which a
  method is provided for [10XAutomorphismGroupOfGroupoid[110X. This is used in the [5XXMod[105X
  package  for  constructing  crossed  modules  of groupoids. The two types of
  generating automorphism are [10XGroupoidAutomorphismByGroupAutos[110X, which requires
  a   list   of   group   automorphisms,   one  for  each  object  group,  and
  [10XGroupoidAutomorphismByObjectPerm[110X,  which  permutes  the  objects. So, if the
  object  groups [22Xg[122X have automorphism group [22XAut(g)[122X and there are [22Xn[122X objects, the
  autmorphism group of the groupoid has size [22Xn!|Aut(g)|^n[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDd8 := HomogeneousDiscreteGroupoid( d8, [ -13..-10] ); [127X[104X
    [4X[28Xhomogeneous, discrete groupoid: < d8, [ -13 .. -10 ] >[128X[104X
    [4X[25Xgap>[125X [27Xaut9 := GroupoidAutomorphismByObjectPerm( Dd8, [-12,-10,-11,-13] ); [127X[104X
    [4X[28Xgroupoid homomorphism : morphism from a homogeneous discrete groupoid:[128X[104X
    [4X[28X[ -13, -12, -11, -10 ] -> [ -12, -10, -11, -13 ][128X[104X
    [4X[28Xobject homomorphisms:[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[25Xgap>[125X [27Xgend8 := GeneratorsOfGroup( d8 );; [127X[104X
    [4X[25Xgap>[125X [27Xg1 := gend8[1];; [127X[104X
    [4X[25Xgap>[125X [27Xg2 := gend8[2];;[127X[104X
    [4X[25Xgap>[125X [27Xb1 := IdentityMapping( d8 );;[127X[104X
    [4X[25Xgap>[125X [27Xb2 := GroupHomomorphismByImages( d8, d8, gend8, [g1, g2*g1 ] );; [127X[104X
    [4X[25Xgap>[125X [27Xb3 := GroupHomomorphismByImages( d8, d8, gend8, [g1^g2, g2 ] );; [127X[104X
    [4X[25Xgap>[125X [27Xb4 := GroupHomomorphismByImages( d8, d8, gend8, [g1^g2, g2^(g1*g2) ] );; [127X[104X
    [4X[25Xgap>[125X [27Xaut10 := GroupoidAutomorphismByGroupAutos( Dd8, [b1,b2,b3,b4] ); [127X[104X
    [4X[28Xgroupoid homomorphism : morphism from a homogeneous discrete groupoid:[128X[104X
    [4X[28X[ -13, -12, -11, -10 ] -> [ -13, -12, -11, -10 ][128X[104X
    [4X[28Xobject homomorphisms:[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XGroupHomomorphismByImages( d8, d8, [ (5,6,7,8), (5,7) ], [128X[104X
    [4X[28X[ (5,6,7,8), (5,8)(6,7) ] )[128X[104X
    [4X[28XGroupHomomorphismByImages( d8, d8, [ (5,6,7,8), (5,7) ], [ (5,8,7,6), (5,7) ] )[128X[104X
    [4X[28XGroupHomomorphismByImages( d8, d8, [ (5,6,7,8), (5,7) ], [ (5,8,7,6), (6,8) ] )[128X[104X
    [4X[25Xgap>[125X [27XADd8 := AutomorphismGroupOfGroupoid( Dd8 ); [127X[104X
    [4X[28X<group with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize( ADd8 );    ## 4!*8^4[127X[104X
    [4X[28X98304[128X[104X
    [4X[25Xgap>[125X [27XgenADd8 := GeneratorsOfGroup( ADd8 );;[127X[104X
    [4X[25Xgap>[125X [27XLength( genADd8 ); [127X[104X
    [4X[28X4  [128X[104X
    [4X[25Xgap>[125X [27Xw := GroupoidAutomorphismByGroupAutos( Dd8, [b2,b1,b1,b1] );; [127X[104X
    [4X[25Xgap>[125X [27Xx := GroupoidAutomorphismByGroupAutos( Dd8, [b3,b1,b1,b1] );; [127X[104X
    [4X[25Xgap>[125X [27Xy := GroupoidAutomorphismByObjectPerm( Dd8, [ -12, -11, -10, -13 ] );; [127X[104X
    [4X[25Xgap>[125X [27Xz := GroupoidAutomorphismByObjectPerm( Dd8, [ -12, -13, -11, -10 ] );; [127X[104X
    [4X[25Xgap>[125X [27Xok := ForAll( genADd8, a -> a in[ w, x, y, z ] ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XNADd8 := NiceObject( ADd8 );; [127X[104X
    [4X[25Xgap>[125X [27XMADd8 := NiceMonomorphism( ADd8 );;[127X[104X
    [4X[25Xgap>[125X [27Xw1 := ImageElm( MADd8, w );; [127X[104X
    [4X[25Xgap>[125X [27Xx1 := ImageElm( MADd8, x );; [127X[104X
    [4X[25Xgap>[125X [27Xy1 := ImageElm( MADd8, y );; [127X[104X
    [4X[25Xgap>[125X [27Xz1 := ImageElm( MADd8, z );; [127X[104X
    [4X[25Xgap>[125X [27Xu := z*w*y*x*z; [127X[104X
    [4X[28Xgroupoid homomorphism : morphism from a homogeneous discrete groupoid:[128X[104X
    [4X[28X[ -13, -12, -11, -10 ] -> [ -11, -13, -10, -12 ][128X[104X
    [4X[28Xobject homomorphisms:[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XGroupHomomorphismByImages( d8, d8, [ (5,6,7,8), (5,7) ], [128X[104X
    [4X[28X[ (5,6,7,8), (5,8)(6,7) ] )[128X[104X
    [4X[28XIdentityMapping( d8 )[128X[104X
    [4X[28XGroupHomomorphismByImages( d8, d8, [ (5,6,7,8), (5,7) ], [ (5,8,7,6), (5,7) ] )[128X[104X
    [4X[25Xgap>[125X [27Xu1 := z1*w1*y1*x1*z1; [127X[104X
    [4X[28X(1,2,4,3)(5,17,23,11,6,18,24,16)(7,19,25,15,9,21,27,13)(8,20,26,14,10,22,28,12)[128X[104X
    [4X[25Xgap>[125X [27Ximu := ImageElm( MADd8, u );; [127X[104X
    [4X[25Xgap>[125X [27Xu1 = imu;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.6-6 AutomorphismGroupoidOfGroupoid[101X
  
  [33X[1;0Y[29X[2XAutomorphismGroupoidOfGroupoid[102X( [3Xgpd[103X ) [32X attribute[133X
  
  [33X[0;0YIf  [22XG[122X is a single piece groupoid with automorphism group [22XAut(G)[122X, and if [22XH[122X is
  the union of [22Xk[122X pieces, all isomorphic to [22XG[122X, then the automorphism group of [22XH[122X
  is  the  wreath product [22XS_k ⋉ Aut(G)[122X. However, we find it more convenient to
  construct  the  [13Xautomorphism  groupoid[113X of [22XH[122X. This is a single piece groupoid
  [22XAUT(H)[122X with [22Xk[122X objects - the object lists of the pieces of [22XH[122X - and root group
  [22XAut(G)[122X.  Isomorphisms between the root groups of the [22Xk[122X pieces may be applied
  to  the  generators  of  [22XAut(G)[122X  to  construct  automorphism groups of these
  pieces,  and  then  isomorphisms  between these automorphism groups. We then
  construct [22XAUT(H)[122X using [10XGroupoidByIsomorphisms[110X.[133X
  
  [33X[0;0YIn  the  special case that [22XH[122X is homogeneous, there is no need to construct a
  collection  of  automorphism groups. Rather, the rays of [22XAUT(H)[122X are given by
  [10XIsomorphismNewObjects[110X. For the example we use [10XHGd8[110X constructed in subsection
  [2XHomogeneousGroupoid[102X ([14X4.1-5[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHGd8 := HomogeneousGroupoid( Gd8, [127X[104X
    [4X[25X>[125X [27X               [ [-39,-38,-37], [-36,-35,-34], [-33,-32,-31] ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( HGd8, "HGd8" );[127X[104X
    [4X[25Xgap>[125X [27XAHGd8 := AutomorphismGroupoidOfGroupoid( HGd8 ); [127X[104X
    [4X[28XAut(HGd8)[128X[104X
    [4X[25Xgap>[125X [27XObjectList( AHGd8 );[127X[104X
    [4X[28X[ [ -39, -38, -37 ], [ -36, -35, -34 ], [ -33, -32, -31 ] ][128X[104X
    [4X[25Xgap>[125X [27XRaysOfGroupoid( AHGd8 ){[2..3]};[127X[104X
    [4X[28X[ groupoid homomorphism : [128X[104X
    [4X[28X    [ [ [(5,6,7,8) : -39 -> -39], [(5,7) : -39 -> -39], [() : -39 -> -38], [128X[104X
    [4X[28X          [() : -39 -> -37] ], [128X[104X
    [4X[28X      [ [(5,6,7,8) : -36 -> -36], [(5,7) : -36 -> -36], [() : -36 -> -35], [128X[104X
    [4X[28X          [() : -36 -> -34] ] ], groupoid homomorphism : [128X[104X
    [4X[28X    [ [ [(5,6,7,8) : -39 -> -39], [(5,7) : -39 -> -39], [() : -39 -> -38], [128X[104X
    [4X[28X          [() : -39 -> -37] ], [128X[104X
    [4X[28X      [ [(5,6,7,8) : -33 -> -33], [(5,7) : -33 -> -33], [() : -33 -> -32], [128X[104X
    [4X[28X          [() : -33 -> -31] ] ] ][128X[104X
    [4X[25Xgap>[125X [27Xobgp := ObjectGroup( AHGd8, [ -36, -35, -34 ] );; [127X[104X
    [4X[25Xgap>[125X [27XSize( obgp );    ## 3!*8^3[127X[104X
    [4X[28X3072[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.7 [33X[0;0YMatrix representations of groupoids[133X[101X
  
  [33X[0;0YSuppose  that [10Xgpd[110X is the direct product of a group [22XG[122X and a complete digraph,
  and  that  [22Xρ : G -> M[122X is an isomorphism to a matrix group [22XM[122X. Then, if [10Xrep[110X is
  the  isomorphic groupoid with the same objects and root group [22XM[122X, there is an
  isomorphism [22Xμ[122X from [10Xgpd[110X to [10Xrep[110X mapping [22X(g : i -> j)[122X to [22X(ρ g : i -> j)[122X.[133X
  
  [33X[0;0YWhen  [10Xgpd[110X  is  a  groupoid  with  rays,  a representation can be obtained by
  restricting a representation of its parent.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xreps := IrreducibleRepresentations( a4 );; [127X[104X
    [4X[25Xgap>[125X [27Xrep4 := reps[4]; [127X[104X
    [4X[28XPcgs([ (2,4,3), (1,3)(2,4), (1,2)(3,4) ]) -> [128X[104X
    [4X[28X[ [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ], [128X[104X
    [4X[28X  [ [ -1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, -1 ] ], [128X[104X
    [4X[28X  [ [ 1, 0, 0 ], [ 0, -1, 0 ], [ 0, 0, -1 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XRa4 := Groupoid( Image( rep4 ), Ga4!.objects );; [127X[104X
    [4X[25Xgap>[125X [27XObjectList( Ra4 ) = [ -15 .. -11 ];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xgens := GeneratorsOfGroupoid( Ga4 );[127X[104X
    [4X[28X[ [(1,2,3) : -15 -> -15], [(2,3,4) : -15 -> -15], [() : -15 -> -14],[128X[104X
    [4X[28X  [() : -15 -> -13], [() : -15 -> -12], [() : -15 -> -11] ][128X[104X
    [4X[25Xgap>[125X [27Ximages := List( gens, [127X[104X
    [4X[25X>[125X [27X       g -> Arrow( Ra4, ImageElm(rep4,g![2]), g![3], g![4] ) ); [127X[104X
    [4X[28X[ [[ [ 0, 0, -1 ], [ 1, 0, 0 ], [ 0, -1, 0 ] ] : -15 -> -15], [128X[104X
    [4X[28X  [[ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] : -15 -> -15], [128X[104X
    [4X[28X  [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -14], [128X[104X
    [4X[28X  [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -13], [128X[104X
    [4X[28X  [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -12], [128X[104X
    [4X[28X  [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -11] ][128X[104X
    [4X[25Xgap>[125X [27Xmor := GroupoidHomomorphismFromSinglePiece( Ga4, Ra4, gens, images );
[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(1,2,3) : -15 -> -15], [(2,3,4) : -15 -> -15], [() : -15 -> -14], [128X[104X
    [4X[28X      [() : -15 -> -13], [() : -15 -> -12], [() : -15 -> -11] ], [128X[104X
    [4X[28X  [ [[ [ 0, 0, -1 ], [ 1, 0, 0 ], [ 0, -1, 0 ] ] : -15 -> -15], [128X[104X
    [4X[28X      [[ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] : -15 -> -15], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -14], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -13], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -12], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -15 -> -11] ] ][128X[104X
    [4X[25Xgap>[125X [27XIsMatrixGroupoid( Ra4 ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xa := Arrow( Ha4, (1,4,2), -12, -13 );[127X[104X
    [4X[28X[(1,4,2) : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27XImageElm( mor, a );[127X[104X
    [4X[28X[[ [ 0, 0, 1 ], [ -1, 0, 0 ], [ 0, -1, 0 ] ] : -12 -> -13][128X[104X
    [4X[25Xgap>[125X [27Xrmor := RestrictedMappingGroupoids( mor, Ha4 );[127X[104X
    [4X[28Xgroupoid homomorphism : [128X[104X
    [4X[28X[ [ [(1,2,3) : -14 -> -14], [(2,3,4) : -14 -> -14], [() : -14 -> -13], [128X[104X
    [4X[28X      [() : -14 -> -12] ], [128X[104X
    [4X[28X  [ [[ [ 0, 0, -1 ], [ 1, 0, 0 ], [ 0, -1, 0 ] ] : -14 -> -14], [128X[104X
    [4X[28X      [[ [ 0, 1, 0 ], [ 0, 0, 1 ], [ 1, 0, 0 ] ] : -14 -> -14], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -14 -> -13], [128X[104X
    [4X[28X      [[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ] : -14 -> -12] ] ][128X[104X
    [4X[25Xgap>[125X [27XParentMappingGroupoids( rmor ) = mor;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
