  
  [1X4 [33X[0;0YGroupoids[133X[101X
  
  [33X[0;0YA   [13Xgroupoid[113X  is  a  (mathematical)  category  in  which  every  element  is
  invertible.  It  consists  of  a set of [13Xpieces[113X, each of which is a connected
  groupoid.  The  usual  terminology  is  `connected  component',  but  in [5XGAP[105X
  `component' is used for `record component', so we use the term [13Xsingle piece[113X.[133X
  
  [33X[0;0YThe  simplest  form  for  a [13Xsingle piece groupoid[113X is the direct product of a
  group and a complete graph, and so is determined by a set of [13Xobjects[113X [10Xobs[110X [22X= Ω[122X
  (the  least of which is the [13Xroot object[113X), and a [13Xroot group[113X [10Xgrp[110X [22X= G[122X. Then the
  elements  of  the  groupoid  are  [13Xarrows[113X  [22Xg  : o_1 -> o_2[122X, stored as triples
  [10X[g,o1,o2][110X, where [22Xg ∈ G[122X and [22Xo_1,o_2 ∈ Ω[122X. The objects will generally be chosen
  to  be  consecutive  negative  integers,  but  any  suitable  ordered set is
  acceptable,  and  `consecutive'  is  not  a requirement. The root group will
  usually  be taken to be a permutation group, but pc-groups and fp-groups are
  also supported.[133X
  
  [33X[0;0YA [13Xgroup[113X may be considered as a single piece groupoid with one object.[133X
  
  [33X[0;0YA  [13Xgroupoid[113X  is a set of one or more single piece groupoids, its [13Xpieces[113X, and
  is represented as [10XIsGroupoidRep[110X, with attribute [10XPiecesOfGroupoid[110X.[133X
  
  [33X[0;0YA  groupoid  is  [13Xhomogeneous[113X  if  it has two of more isomorphic pieces, with
  identical groups. The special case of [13Xhomogeneous, discrete[113X groupoids, where
  each  piece  has a single object, is given its own representation. These are
  used in the [5XXMod[105X package as the source of a crossed modules of groupoids.[133X
  
  [33X[0;0YFor  the  definitions of the standard properties of groupoids we refer to R.
  Brown's   book  ``Topology''  [Bro88],  recently  revised  and  reissued  as
  ``Topology and Groupoids'' [Bro06].[133X
  
  
  [1X4.1 [33X[0;0YGroupoids: their properties and attributes[133X[101X
  
  [1X4.1-1 SinglePieceGroupoid[101X
  
  [29X[2XSinglePieceGroupoid[102X( [3Xgrp[103X, [3Xobs[103X ) [32X operation
  [29X[2XGroupoid[102X( [3Xargs[103X ) [32X function
  [29X[2XDomainWithSingleObject[102X( [3Xgp[103X, [3Xobj[103X ) [32X operation
  
  [33X[0;0YThe  simplest construction of a groupoid is as the direct product of a group
  and  a  complete  graph. Such a groupoid will be called a [13Xstandard groupoid[113X.
  Many  subgroupoids of such a groupoid do not have this simple form, and will
  be  considered  in  section  [14X4.3[114X. The global function [10XGroupoid[110X will normally
  find the appropriate constructor to call, the options being:[133X
  
  [30X    [33X[0;6Ythe object group, a set of objects;[133X
  
  [30X    [33X[0;6Ya group being converted to a groupoid, a single object;[133X
  
  [30X    [33X[0;6Ya list of groupoids which have already been constructed (see [14X4.1-4[114X).[133X
  
  [33X[0;0YMethods for [10XViewObj[110X, [10XPrintObj[110X and [10XDisplay[110X are provided for groupoids and the
  other types of object in this package. Users are advised to supply names for
  all the groups and groupoids they construct.[133X
  
  [33X[0;0YIn  the  last  two examples [10XGf2c6[110X and [10XGabc[110X show that the objects need not be
  integers.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xs4 := Group( (1,2,3,4), (3,4) );; [127X[104X
    [4X[25Xgap>[125X [27Xd8 := Subgroup( s4, [ (1,2,3,4), (1,3) ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( s4, "s4" );  SetName( d8, "d8" ); [127X[104X
    [4X[25Xgap>[125X [27XGs4 := SinglePieceGroupoid( s4, [-15 .. -11] ); [127X[104X
    [4X[28Xsingle piece groupoid: < s4, [ -15 .. -11 ] >[128X[104X
    [4X[25Xgap>[125X [27XGd8 := Groupoid( d8, [-9,-8,-7] );[127X[104X
    [4X[28Xsingle piece groupoid: < d8, [ -9, -8, -7 ] >[128X[104X
    [4X[25Xgap>[125X [27Xc6 := Group( (5,6,7)(8,9) );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( c6, "c6" );[127X[104X
    [4X[25Xgap>[125X [27XGc6 := DomainWithSingleObject( c6, -6 );[127X[104X
    [4X[28Xsingle piece groupoid: < c6, [ -6 ] >[128X[104X
    [4X[25Xgap>[125X [27XSetName( Gs4, "Gs4" );  SetName( Gd8, "Gd8" );  SetName( Gc6, "Gc6" );  [127X[104X
    [4X[25Xgap>[125X [27XG3 := Groupoid( [ Gc6, Gd8, Gs4 ] );[127X[104X
    [4X[28Xgroupoid with 3 pieces:[128X[104X
    [4X[28X[ Gs4, Gd8, Gc6 ][128X[104X
    [4X[25Xgap>[125X [27Xf2 := FreeGroup(2);;[127X[104X
    [4X[25Xgap>[125X [27XGf2c6 := Groupoid( c6, GeneratorsOfGroup(f2) );[127X[104X
    [4X[28Xsingle piece groupoid: < c6, [ f1, f2 ] >[128X[104X
    [4X[25Xgap>[125X [27XGabc := Groupoid( d8, [ "a", "b", "c" ] );[127X[104X
    [4X[28Xsingle piece groupoid: < d8, [ "a", "b", "c" ] >[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-2 ObjectList[101X
  
  [29X[2XObjectList[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XRootObject[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XRootGroup[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XObjectGroup[102X( [3Xgpd[103X, [3Xobj[103X ) [32X operation
  
  [33X[0;0YThe  [10XObjectList[110X  of a groupoid is the sorted list of objects. The [10XRootObject[110X
  in  a  single-piece  groupoid  is  the object with least label. A [13Xloop[113X is an
  arrow  of the form [22Xg : o -> o[122X, and the loops at a particular object [22Xo[122X form a
  group,  the  [10XObjectGroup[110X  at  [22Xo[122X.  The  [10XRootGroup[110X  is  the [10XObjectGroup[110X at the
  [10XRootObject[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XObjectList( Gs4 );    [127X[104X
    [4X[28X[ -15, -14, -13, -12, -11 ][128X[104X
    [4X[25Xgap>[125X [27XRootObject( Gd8 );[127X[104X
    [4X[28X-9[128X[104X
    [4X[25Xgap>[125X [27XRootGroup( Gc6 );[127X[104X
    [4X[28Xc6[128X[104X
    [4X[25Xgap>[125X [27XObjectGroup( Gs4, -11 );[127X[104X
    [4X[28Xs4[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-3 IsPermGroupoid[101X
  
  [29X[2XIsPermGroupoid[102X( [3Xgpd[103X ) [32X property
  [29X[2XIsPcGroupoid[102X( [3Xgpd[103X ) [32X property
  [29X[2XIsFpGroupoid[102X( [3Xgpd[103X ) [32X property
  [29X[2XIsMatrixGroupoid[102X( [3Xgpd[103X ) [32X property
  
  [33X[0;0YA  groupoid  is  a  permutation  groupoid if all its pieces have permutation
  groups.  Most of the examples in this chapter are permutation groupoids, but
  in  principle  any  type of group known to [5XGAP[105X may be used. In the following
  example  [10XGf2[110X  is an fp-groupoid, [10XGq8[110X is a pc-groupoid, and [10XGsl43[110X is a matrix
  groupoid.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xf2 := FreeGroup( 2 );;[127X[104X
    [4X[25Xgap>[125X [27XGf2 := Groupoid( f2, -22 );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( f2, "f2" );  SetName( Gf2, "Gf2" ); [127X[104X
    [4X[25Xgap>[125X [27Xq8 := SmallGroup( 8, 4 );;[127X[104X
    [4X[25Xgap>[125X [27XGq8 := Groupoid( q8, [ -28, -27 ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( q8, "q8" );  SetName( Gq8, "Gq8" );[127X[104X
    [4X[25Xgap>[125X [27Xsl43 := SpecialLinearGroup( 4, 3 );;[127X[104X
    [4X[25Xgap>[125X [27XGsl43 := SinglePieceGroupoid( sl43, [ -35..-31 ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( sl43, "sl43" );  SetName( Gsl43, "Gsl43" );[127X[104X
    [4X[25Xgap>[125X [27X[ IsMatrixGroupoid( Gsl43 ), IsFpGroupoid( Gf2 ), [127X[104X
    [4X[25X>[125X [27X     IsPcGroupoid( Gq8 ), IsPermGroupoid( Gs4 ) ]; [127X[104X
    [4X[28X[ true, true, true, true ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-4 UnionOfPieces[101X
  
  [29X[2XUnionOfPieces[102X( [3Xpieces[103X ) [32X operation
  [29X[2XPieces[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XSize[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XReplaceOnePieceInUnion[102X( [3XU[103X, [3Xold_piece[103X, [3Xnew_piece[103X ) [32X operation
  
  [33X[0;0YWhen  a  groupoid  consists  of  two or more pieces, we require their object
  lists  to be disjoint. The operation [10XUnionOfPieces[110X and the attribute [10XPieces[110X,
  introduced  in  section  [14X2.4[114X,  are  also  used for groupoids. The pieces are
  sorted  by  the  least  object  in their object lists. The [10XObjectList[110X is the
  sorted concatenation of the objects in the pieces.[133X
  
  [33X[0;0YThe [10XSize[110X of a groupoid is the number of its arrows which, for a single piece
  groupoid,  is  the  product  of the size of the group with the square of the
  number of objects.[133X
  
  [33X[0;0YOne  of  the  pieces  in  a groupoid may be replaced by an alternative piece
  using  the operation [10XReplaceOnePieceInUnion[110X. The [13Xold_piece[113X may be either the
  [13Xposition[113X  oif  the  piece  to  be  replaced,  or one of the pieces in [10XU[110X. The
  objects  in  the  new  piece may or may not overlap the objects in the piece
  removed  --  we  just  require  that  the  object lists in the new union are
  disjoint.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XU3 := UnionOfPieces( [ Gs4, Gd8, Gc6 ] );;[127X[104X
    [4X[25Xgap>[125X [27XDisplay( U3 );[127X[104X
    [4X[28Xgroupoid with 3 pieces:[128X[104X
    [4X[28X< objects: [ -15 .. -11 ][128X[104X
    [4X[28X    group: s4 = <[ (1,2,3,4), (3,4) ]> >[128X[104X
    [4X[28X< objects: [ -9, -8, -7 ][128X[104X
    [4X[28X    group: d8 = <[ (1,2,3,4), (1,3) ]> >[128X[104X
    [4X[28X< objects: [ -6 ][128X[104X
    [4X[28X    group: c6 = <[ (5,6,7)(8,9) ]> >[128X[104X
    [4X[25Xgap>[125X [27XPieces( U3 );[127X[104X
    [4X[28X[ Gs4, Gd8, Gc6 ][128X[104X
    [4X[25Xgap>[125X [27XObjectList( U3 );[127X[104X
    [4X[28X[ -15, -14, -13, -12, -11, -9, -8, -7, -6 ][128X[104X
    [4X[25Xgap>[125X [27XU2 := Groupoid( [ Gf2, Gq8 ] );;[127X[104X
    [4X[25Xgap>[125X [27X[ Size(Gs4), Size(Gd8), Size(Gc6), Size(U3) ];[127X[104X
    [4X[28X[ 600, 72, 6, 678 ][128X[104X
    [4X[25Xgap>[125X [27X[ Size(Gf2), Size(Gq8), Size(U2) ];           [127X[104X
    [4X[28X[ infinity, 32, infinity ][128X[104X
    [4X[25Xgap>[125X [27XU5 := UnionOfPieces( [ U3, Gf2, Gq8 ] );[127X[104X
    [4X[28Xgroupoid with 5 pieces:[128X[104X
    [4X[28X[ Gq8, Gf2, Gs4, Gd8, Gc6 ][128X[104X
    [4X[25Xgap>[125X [27XV5 := ReplaceOnePieceInUnion( U5, 3, Gsl43 ); [127X[104X
    [4X[28Xgroupoid with 5 pieces:[128X[104X
    [4X[28X[ Gsl43, Gq8, Gf2, Gd8, Gc6 ][128X[104X
    [4X[25Xgap>[125X [27XObjectList(V5);             [127X[104X
    [4X[28X[ -35, -34, -33, -32, -31, -28, -27, -22, -9, -8, -7, -6 ][128X[104X
    [4X[25Xgap>[125X [27XU5 = V5; [127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XW5 := ReplaceOnePieceInUnion( V5, Gc6, Gs4 ); [127X[104X
    [4X[28Xgroupoid with 5 pieces:[128X[104X
    [4X[28X[ Gsl43, Gq8, Gf2, Gs4, Gd8 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-5 HomogeneousGroupoid[101X
  
  [29X[2XHomogeneousGroupoid[102X( [3Xgpd[103X, [3Xoblist[103X ) [32X operation
  [29X[2XHomogeneousDiscreteGroupoid[102X( [3Xgp[103X, [3Xobs[103X ) [32X operation
  
  [33X[0;0YSpecial  functions  are provided for the case where a groupoid has more than
  one connected component, and these components are identical except for their
  object sets. Such groupoids are said to be [13Xhomogeneous[113X.[133X
  
  [33X[0;0YThe  operation  [10XHomogeneousGroupoid[110X is used when the components each contain
  more  than  one object. The arguments consist of a single piece groupoid [10Xgpd[110X
  and  a  list  of  lists  of objects [10Xoblist[110X, each of whose lists has the same
  length  as  the object list [10Xobs[110X of [10Xgpd[110X. Note that [10Xgpd[110X is [13Xnot[113X included as one
  of  the  pieces  in the output unless [10Xobs[110X is included as one of the lists in
  [10Xoblist[110X.[133X
  
  [33X[0;0YThe  operation  [10XHomogeneousDiscreteGroupoid[110X is used when the components each
  have a single object. In this case the first argument is just a group -- the
  root  group for each component. These groupoids are used in the [5XXMod[105X package
  as the source of many crossed modules of groupoids.[133X
  
  [33X[0;0YBoth  types of groupoid have the property [10XIsHomogeneousDomainWithObjects[110X. In
  the  latter  case a separate representation [10XIsHomogeneousDiscreteGroupoidRep[110X
  is used.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHd8 := HomogeneousGroupoid( Gd8, [ [-12,-11,-10], [-16,-15,-14] ] ); [127X[104X
    [4X[28Xhomogeneous groupoid with 2 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < d8, [ -16, -15, -14 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < d8, [ -12, -11, -10 ] >[128X[104X
    [4X[25Xgap>[125X [27XIsHomogeneousDomainWithObjects(Hd8);               [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XHc6 := HomogeneousDiscreteGroupoid( c6, [-7..-4] );[127X[104X
    [4X[28Xhomogeneous, discrete groupoid: < c6, [ -7 .. -4 ] >[128X[104X
    [4X[25Xgap>[125X [27XRepresentationsOfObject(Gd8);[127X[104X
    [4X[28X[ "IsComponentObjectRep", "IsAttributeStoringRep", "IsMWOSinglePieceRep" ][128X[104X
    [4X[25Xgap>[125X [27XRepresentationsOfObject(Hd8);[127X[104X
    [4X[28X[ "IsComponentObjectRep", "IsAttributeStoringRep", "IsPiecesRep" ][128X[104X
    [4X[25Xgap>[125X [27XRepresentationsOfObject(Hc6);[127X[104X
    [4X[28X[ "IsComponentObjectRep", "IsAttributeStoringRep", [128X[104X
    [4X[28X  "IsHomogeneousDiscreteGroupoidRep" ][128X[104X
    [4X[25Xgap>[125X [27XKnownTruePropertiesOfObject(Hc6); [127X[104X
    [4X[28X[ "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", [128X[104X
    [4X[28X  "IsAssociative", "IsCommutative", "IsDiscreteDomainWithObjects", [128X[104X
    [4X[28X  "IsHomogeneousDomainWithObjects" ][128X[104X
    [4X[25Xgap>[125X [27XKd8 := UnionOfPieces( [ Gd8, Hd8 ] );[127X[104X
    [4X[28Xgroupoid with 3 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < d8, [ -16, -15, -14 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < d8, [ -12, -11, -10 ] >[128X[104X
    [4X[28X3:  Gd8[128X[104X
    [4X[25Xgap>[125X [27XObjectList(Kd8);[127X[104X
    [4X[28X[ -16, -15, -14, -12, -11, -10, -9, -8, -7 ][128X[104X
    [4X[25Xgap>[125X [27XIsHomogeneousDomainWithObjects( Kd8 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.2 [33X[0;0YGroupoid elements; stars; costars; homsets[133X[101X
  
  [1X4.2-1 Arrow[101X
  
  [29X[2XArrow[102X( [3Xgpd[103X, [3Xelt[103X, [3Xtail[103X, [3Xhead[103X ) [32X operation
  [29X[2XElementOfArrow[102X( [3Xelt[103X ) [32X operation
  [29X[2XTailOfArrow[102X( [3Xelt[103X ) [32X operation
  [29X[2XHeadOfArrow[102X( [3Xelt[103X ) [32X operation
  [29X[2XIsArrowIn[102X( [3Xarr[103X, [3Xgpd[103X ) [32X operation
  
  [33X[0;0YA  [13Xgroupoid  element[113X  is  an  arrow in a magma with objects, as described in
  subsection  [14X2.1-2[114X.  To recapitulate, an arrow [10Xe[110X consists of a group element,
  [10XElementOfArrow(e)[110X;  the  tail  (source) object, [10XTailOfArrow(e)[110X; and the head
  (target)  object,  [10XHeadOfArrow(e)[110X.  Arrows  have  a [13Xpartial composition[113X: two
  arrows  may be multiplied when the head of the first coincides with the tail
  of  the  second.  When  an  attempt  is  made  to multiply arrows where this
  condition  does  not  hold,  then  the  value  [10Xfail[110X is returned. (In earlier
  versions   of   the   package   there  were  functions  [10XGroupoidElement[110X  and
  [10XMultiplicativeElementWithObjects[110X,  but  these  have  now  been  replaced  by
  [10XArrow[110X.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xe1 := Arrow( Gd8, (1,2,3,4), -9, -8 );[127X[104X
    [4X[28X[(1,2,3,4) : -9 -> -8][128X[104X
    [4X[25Xgap>[125X [27Xe2 := Arrow( Gd8, (1,3), -8, -7 );[127X[104X
    [4X[28X[(1,3) : -8 -> -7][128X[104X
    [4X[25Xgap>[125X [27XPrint( [ ElementOfArrow(e2), TailOfArrow(e2), HeadOfArrow(e2) ], "\n" );[127X[104X
    [4X[28X[ (1,3), -8, -7 ][128X[104X
    [4X[25Xgap>[125X [27Xprod := e1*e2;[127X[104X
    [4X[28X[(1,2)(3,4) : -9 -> -7][128X[104X
    [4X[25Xgap>[125X [27Xe2*e1;[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27Xe3 := Arrow( Gd8, (2,4), -7, -9 );;[127X[104X
    [4X[25Xgap>[125X [27Xloop := prod*e3;[127X[104X
    [4X[28X[(1,4,3,2) : -9 -> -9][128X[104X
    [4X[25Xgap>[125X [27Xloop^2;[127X[104X
    [4X[28X[(1,3)(2,4) : -9 -> -9][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-2 IdentityArrow[101X
  
  [29X[2XIdentityArrow[102X( [3Xgpd[103X, [3Xobj[103X ) [32X operation
  
  [33X[0;0YThe  identity  arrow  [22X1_o[122X  of  [22XG[122X  at  object  [22Xo[122X is [22X(e:o -> o)[122X where [22Xe[122X is the
  identity  element  in the object group. The inverse [22Xe^-1[122X of [22Xe = (c : p -> q)[122X
  is [22X(c^-1 : q -> p)[122X, so that [22Xe*e^-1=1_p[122X and [22Xe^-1*e = 1_q[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xi8 := IdentityArrow( Gd8, -8 );[127X[104X
    [4X[28X[() : -8 -> -8][128X[104X
    [4X[25Xgap>[125X [27X[ e1*i8, i8*e1, e1^-1]; [127X[104X
    [4X[28X[ [(1,2,3,4) : -9 -> -8], fail, [(1,4,3,2) : -8 -> -9] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-3 Order[101X
  
  [29X[2XOrder[102X( [3Xarr[103X ) [32X attribute
  
  [33X[0;0YA  groupoid  element is a [13Xloop[113X when the tail and head coincide. In this case
  the order of the element is defined to be the order of its group element.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xi8; Order(i8);[127X[104X
    [4X[28X[() : -8 -> -8][128X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27Xloop; Order(loop);[127X[104X
    [4X[28X[(1,4,3,2) : -9 -> -9][128X[104X
    [4X[28X4[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-4 ObjectStar[101X
  
  [29X[2XObjectStar[102X( [3Xgpd[103X, [3Xobj[103X ) [32X operation
  [29X[2XObjectCostar[102X( [3Xgpd[103X, [3Xobj[103X ) [32X operation
  [29X[2XHomset[102X( [3Xgpd[103X, [3Xtail[103X, [3Xhead[103X ) [32X operation
  
  [33X[0;0YThe  [13Xstar[113X  at  [10Xobj[110X  is  the  set of arrows which have [10Xobj[110X as tail, while the
  [13Xcostar[113X  is the set of arrows which have [10Xobj[110X as head. The [13Xhomset[113X from [10Xobj1[110X to
  [10Xobj2[110X  is  the  set  of  arrows  with  the specified tail and head, and so is
  bijective  with the elements of the object groups. Thus every star and every
  costar  is  a  union  of  homsets. The identity arrow at an object is a left
  identity for the star and a right identity for the costar at that object.[133X
  
  [33X[0;0YIn  order  not  to create unneccessarily long lists, these operations return
  objects  of  type  [10XIsHomsetCosetsRep[110X  for which an [10XIterator[110X is provided. (An
  [10XEnumerator[110X is not yet implemented.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xstar9 := ObjectStar( Gd8, -9 );[127X[104X
    [4X[28X<star at [ -9 ] with group d8>[128X[104X
    [4X[25Xgap>[125X [27XSize( star9 ); [127X[104X
    [4X[28X24[128X[104X
    [4X[25Xgap>[125X [27Xfor e in star9 do[127X[104X
    [4X[25X>[125X [27X     if ( Order( ElementOfArrow(e) ) = 4 ) then Print( e, "\n" ); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[28X[(1,4,3,2) : -9 -> -9][128X[104X
    [4X[28X[(1,4,3,2) : -9 -> -8][128X[104X
    [4X[28X[(1,4,3,2) : -9 -> -7][128X[104X
    [4X[28X[(1,2,3,4) : -9 -> -9][128X[104X
    [4X[28X[(1,2,3,4) : -9 -> -8][128X[104X
    [4X[28X[(1,2,3,4) : -9 -> -7][128X[104X
    [4X[25Xgap>[125X [27Xcostar6 := ObjectCostar( Gc6, -6 );[127X[104X
    [4X[28X<costar at [ -6 ] with group c6>[128X[104X
    [4X[25Xgap>[125X [27XSize( costar6 ); [127X[104X
    [4X[28X6[128X[104X
    [4X[25Xgap>[125X [27Xhsetq8 := Homset( Gq8, -28, -27 );[127X[104X
    [4X[28X<homset -28 -> -27 with group q8>[128X[104X
    [4X[25Xgap>[125X [27Xfor e in hsetq8 do Print(e,"\n"); od;[127X[104X
    [4X[28X[<identity> of ... : -28 -> -27][128X[104X
    [4X[28X[f3 : -28 -> -27][128X[104X
    [4X[28X[f2 : -28 -> -27][128X[104X
    [4X[28X[f2*f3 : -28 -> -27][128X[104X
    [4X[28X[f1 : -28 -> -27][128X[104X
    [4X[28X[f1*f3 : -28 -> -27][128X[104X
    [4X[28X[f1*f2 : -28 -> -27][128X[104X
    [4X[28X[f1*f2*f3 : -28 -> -27][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.3 [33X[0;0YSubgroupoids[133X[101X
  
  [1X4.3-1 Subgroupoid[101X
  
  [29X[2XSubgroupoid[102X( [3Xargs[103X ) [32X function
  [29X[2XSubgroupoidByPieces[102X( [3Xgpd[103X, [3Xobhoms[103X ) [32X operation
  [29X[2XIsSubgroupoid[102X( [3Xgpd[103X, [3Xsgpd[103X ) [32X operation
  [29X[2XFullSubgroupoid[102X( [3Xgpd[103X, [3Xobs[103X ) [32X operation
  [29X[2XMaximalDiscreteSubgroupoid[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XDiscreteSubgroupoid[102X( [3Xgpd[103X, [3Xsgps[103X, [3Xobs[103X ) [32X operation
  [29X[2XFullTrivialSubgroupoid[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XDiscreteTrivialSubgroupoid[102X( [3Xgpd[103X ) [32X attribute
  [29X[2XIsWide[102X( [3Xgpd[103X, [3Xsgpd[103X ) [32X operation
  
  [33X[0;0YA  [13Xsubgroupoid[113X  [10Xsgpd[110X  of  a  groupoid  [10Xgpd[110X has as objects some subset of the
  objects  of  [10Xgpd[110X. It is [13Xwide[113X if all the objects are included. It is [13Xfull[113X if,
  for  any  two  objects  in  [10Xsgpd[110X, the [10XHomset[110X is the same as that in [10Xgpd[110X. The
  arrows of [10Xsgpd[110X are a subset of those of [10Xgpd[110X, closed under multiplication and
  with tail and head in the chosen object set.[133X
  
  [33X[0;0YThere  are  a  variety  of  constructors  for  a  subgroupoid  of a standard
  groupoid, and the most general is the operation [10XSubgroupoidByPieces[110X. Its two
  parameters  are  a groupoid and a list of pieces, each piece being specified
  as  a  list  [10X[sgp,obs][110X,  where  [10Xsgp[110X  is a subgroup of the root group in that
  piece, and [10Xobs[110X is a subset of the objects in that piece. The [10XFullSubgroupoid[110X
  of  a groupoid [10Xgpd[110X on a subset [10Xobs[110X of its objects contains all the arrows of
  [10Xgpd[110X with tail and head in [10Xobs[110X. A subgroupoid is [13Xdiscrete[113X if it is a union of
  groups.  The  [10XMaximalDiscreteSubgroupoid[110X  of  [10Xgpd[110X  is  the  union of all the
  single-object  full  subgroupoids  of [10Xgpd[110X. A [13Xtrivial subgroupoid[113X has trivial
  object  groups, but need not be discrete. A single piece trivial groupoid is
  sometimes called a [13Xtree groupoid[113X. (The term [13Xidentity subgroupoid[113X was used in
  versions  up  to  1.14.)  The  global  function  [10XSubgroupoid[110X should call the
  appropriate operation.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc4 := Subgroup( d8, [ (1,2,3,4) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xk4 := Subgroup( d8, [ (1,2)(3,4), (1,3)(2,4) ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( c4, "c4" );  SetName( k4, "k4" );[127X[104X
    [4X[25Xgap>[125X [27XUd8 := Subgroupoid( Gd8, [ [ k4, [-9] ], [ c4, [-8,-7] ] ] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( Ud8, "Ud8" );[127X[104X
    [4X[25Xgap>[125X [27XDisplay( Ud8 );[127X[104X
    [4X[28Xgroupoid with 2 pieces:[128X[104X
    [4X[28X< objects: [ -9 ][128X[104X
    [4X[28X    group: k4 = <[ (1,2)(3,4), (1,3)(2,4) ]> >[128X[104X
    [4X[28X< objects: [ -8, -7 ][128X[104X
    [4X[28X    group: c4 = <[ (1,2,3,4) ]> >[128X[104X
    [4X[25Xgap>[125X [27X[ Parent( Ud8 ), IsWide( Gd8, Ud8 ) ]; [127X[104X
    [4X[28X[ Gd8, true ][128X[104X
    [4X[25Xgap>[125X [27Xgenf2b := List( GeneratorsOfGroup(f2), g -> g^2 );[127X[104X
    [4X[28X[ f1^2, f2^2 ][128X[104X
    [4X[25Xgap>[125X [27Xf2b := Subgroup( f2, genf2b );;[127X[104X
    [4X[25Xgap>[125X [27XSubgroupoidByPieces( U2, [ [q8,[-27]], [f2b,[-22]] ] );[127X[104X
    [4X[28Xgroupoid with 2 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < q8, [ -27 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < Group( [ f1^2, f2^2 ] ), [ -22 ] >[128X[104X
    [4X[25Xgap>[125X [27XIsSubgroupoid( Gf2, Groupoid( f2b, [-22] ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XFullSubgroupoid( U3, [-7,-6] );[127X[104X
    [4X[28Xgroupoid with 2 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < d8, [ -7 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < c6, [ -6 ] >[128X[104X
    [4X[25Xgap>[125X [27XDiscreteSubgroupoid( U3, [ c4, k4 ], [-9,-7] );[127X[104X
    [4X[28Xgroupoid with 2 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < c4, [ -9 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < k4, [ -7 ] >[128X[104X
    [4X[25Xgap>[125X [27XFullTrivialSubgroupoid( Ud8 );[127X[104X
    [4X[28Xgroupoid with 2 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < id(k4), [ -9 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < id(c4), [ -8, -7 ] >[128X[104X
    [4X[25Xgap>[125X [27XMaximalDiscreteSubgroupoid(U2);[127X[104X
    [4X[28Xgroupoid with 3 pieces:[128X[104X
    [4X[28X1:  single piece groupoid: < q8, [ -28 ] >[128X[104X
    [4X[28X2:  single piece groupoid: < q8, [ -27 ] >[128X[104X
    [4X[28X3:  single piece groupoid: < f2, [ -22 ] >[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-2 SubgroupoidWithRays[101X
  
  [29X[2XSubgroupoidWithRays[102X( [3Xgpd[103X, [3Xsgp[103X, [3Xrays[103X ) [32X operation
  [29X[2XRaysOfGroupoid[102X( [3Xgpd[103X ) [32X operation
  [29X[2XRayElementsOfGroupoid[102X( [3Xgpd[103X ) [32X operation
  
  [33X[0;0YIf groupoid [22XG[122X is of type [10XIsDirectProductWithCompleteGraph[110X with group [22Xg[122X and [22Xn[122X
  objects,  then  a  typical  wide  subgroupoid [22XH[122X of [22XG[122X is formed by choosing a
  subgroup  [22Xh[122X of [22Xg[122X to be the object group at the root object [22Xq[122X, and an arrow [22Xr
  :  q  -> p[122X for each of the objects [22Xp[122X. The chosen loop arrow at [22Xq[122X must be the
  identity  arrow.  These [22Xn[122X arrows are called the [13Xrays[113X of the subgroupoid. The
  arrows  in  the homset from [22Xp[122X to [22Xp'[122X have the form [22Xr^-1xr'[122X where [22Xr,r'[122X are the
  rays from [22Xq[122X to [22Xp,p'[122X respectively, and [22Xx ∈ h[122X.[133X
  
  [33X[0;0YThe  operation [10XRaysOfGroupoid[110X returns a list of arrows, one for each object,
  while the operation [10XRayElementsOfGroupoid[110X returns the list of group elements
  in these arrows.[133X
  
  [33X[0;0YIn  the  following  example we construct a subgroupoid with rays on three of
  the   five  objects.  It  is  therefore  necessary  to  construct  the  full
  subgroupoid on these three objects first.[133X
  
  [33X[0;0YNote  that  it  is  also  possible to construct a subgroupoid with rays of a
  subgroupoid with rays.[133X
  
  [33X[0;0YNote also that the function [10XAncestor[110X provides an iteration of [10XParent[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHs4 := FullSubgroupoid( Gs4, [-14,-13,-12] );; [127X[104X
    [4X[25Xgap>[125X [27XSetName( Hs4, "Hs4" ); [127X[104X
    [4X[25Xgap>[125X [27XHd8a := SubgroupoidWithRays( Hs4, d8, [(),(2,3),(3,4)] );[127X[104X
    [4X[28Xsingle piece groupoid with rays: < d8, [ -14, -13, -12 ], [ (), (2,3), (3,4)[128X[104X
    [4X[28X ] >[128X[104X
    [4X[25Xgap>[125X [27Xhs1413 := Homset( Hd8a, -14, -13 );[127X[104X
    [4X[28X<homset -14 -> -13 with group d8>[128X[104X
    [4X[25Xgap>[125X [27Xfor e in hs1413 do  Print(e,", "); od;  Print( "\n");[127X[104X
    [4X[28X[(2,3) : -14 -> -13], [(1,2,4,3) : -14 -> -13], [(1,4,2) : -14 -> -13], [[128X[104X
    [4X[28X(1,3,4) : -14 -> -13], [(2,4,3) : -14 -> -13], [(1,2,3) : -14 -> -13], [[128X[104X
    [4X[28X(1,4) : -14 -> -13], [(1,3,4,2) : -14 -> -13], [128X[104X
    [4X[25Xgap>[125X [27XHd8b := SubgroupoidWithRays( Hs4, d8, [(),(1,2,3),(1,2,4)] );[127X[104X
    [4X[28Xsingle piece groupoid with rays: < d8, [ -14, -13, -12 ],[128X[104X
    [4X[28X[ (), (1,2,3), (1,2,4) ] >[128X[104X
    [4X[25Xgap>[125X [27XHd8a = Hd8b; [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XRaysOfGroupoid( Hd8b );[127X[104X
    [4X[28X[ [() : -14 -> -14], [(1,2,3) : -14 -> -13], [(1,2,4) : -14 -> -12] ][128X[104X
    [4X[25Xgap>[125X [27XRayElementsOfGroupoid( Hd8b ); [127X[104X
    [4X[28X[ (), (1,2,3), (1,2,4) ][128X[104X
    [4X[25Xgap>[125X [27XParent( Hd8a );[127X[104X
    [4X[28XHs4[128X[104X
    [4X[25Xgap>[125X [27XAncestor( Hd8a ); [127X[104X
    [4X[28XGs4[128X[104X
    [4X[25Xgap>[125X [27XFd8a := FullSubgroupoid( Hd8a, [-14,-13]);[127X[104X
    [4X[28Xsingle piece groupoid with rays: < d8, [ -14, -13 ], [ (), (2,3) ] >[128X[104X
    [4X[25Xgap>[125X [27XFd8b := FullSubgroupoid( Hd8a, [-13,-12]);[127X[104X
    [4X[28Xsingle piece groupoid with rays: < Group( [ (1,3,2,4), (1,2) ] ), [128X[104X
    [4X[28X[ -13, -12 ], [ (), (2,4,3) ] >[128X[104X
    [4X[25Xgap>[125X [27XFd8a := FullSubgroupoid( Hd8a, [-13,-12] );            [127X[104X
    [4X[28Xsingle piece groupoid with rays: < Group( [ (1,3,2,4), (1,2) ] ), [128X[104X
    [4X[28X[ -13, -12 ], [ (), (2,4,3) ] >[128X[104X
    [4X[25Xgap>[125X [27XKd8a := SubgroupoidWithRays( Fd8a, k4, [ (), (1,3) ] ); [127X[104X
    [4X[28Xsingle piece groupoid with rays: < k4, [ -13, -12 ], [ (), (1,3) ] >[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.4 [33X[0;0YLeft, right and double cosets[133X[101X
  
  [1X4.4-1 RightCoset[101X
  
  [29X[2XRightCoset[102X( [3XG[103X, [3XU[103X, [3Xelt[103X ) [32X operation
  [29X[2XRightCosetRepresentatives[102X( [3XG[103X, [3XU[103X ) [32X operation
  [29X[2XLeftCoset[102X( [3XG[103X, [3XU[103X, [3Xelt[103X ) [32X operation
  [29X[2XLeftCosetRepresentatives[102X( [3XG[103X, [3XU[103X ) [32X operation
  [29X[2XLeftCosetRepresentativesFromObject[102X( [3XG[103X, [3XU[103X, [3Xobj[103X ) [32X operation
  [29X[2XDoubleCoset[102X( [3XG[103X, [3XU[103X, [3Xelt[103X, [3XV[103X ) [32X operation
  [29X[2XDoubleCosetRepresentatives[102X( [3XG[103X, [3XU[103X, [3XV[103X ) [32X operation
  
  [33X[0;0YIf  [10XU[110X  is  a  wide  subgroupoid  of [22XG[122X, the [13Xright cosets[113X [22XUg[122X of [22XU[122X in [22XG[122X are the
  equivalence  classes for the relation on the arrows of [22XG[122X where [22Xg1[122X is related
  to  [22Xg2[122X  if  and  only  if  [22Xg2  = u*g1[122X for some arrow [22Xu[122X of [22XU[122X. The right coset
  containing  [22Xg[122X  is  written [22XUg[122X. These right cosets partition the costars of [22XG[122X
  and,  in  particular,  the  costar  [22XU1_o[122X  of  [22XU[122X at object [22Xo[122X, so that (unlike
  groups) [22XU[122X is itself a coset only when [22XG[122X has a single object.[133X
  
  [33X[0;0YThe  [13Xright coset representatives[113X for [22XU[122X in [22XG[122X form a list containing one arrow
  for  each  coset where, in a particular piece of [22XU[122X, the group element chosen
  is the right coset representative of the group of [22XU[122X in the group of [22XG[122X.[133X
  
  [33X[0;0YSimilarly, the [13Xleft cosets[113X [22XgU[122X refine the stars of [22XG[122X, while [13Xdouble cosets[113X are
  unions    of    left    cosets    and    right    cosets.    The   operation
  [10XLeftCosetRepresentativesFromObject(  G,  U,  obj )[110X is used in Chapter 4, and
  returns only those representatives which have tail at [10Xobj[110X.[133X
  
  [33X[0;0YAs  with stars and homsets, these cosets are implemented with representation
  [10XIsHomsetCosetsRep[110X  and provided with an iterator. Note that, when [22XU[122X has more
  than one piece, cosets may have differing lengths.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xre2 := RightCoset( Gd8, Ud8, e2 );[127X[104X
    [4X[28XRightCoset(single piece groupoid: < c4, [ -8, -7 ] >,[(1,3) : -8 -> -7])[128X[104X
    [4X[25Xgap>[125X [27Xfor x in re2 do Print( x, "\n" ); od;[127X[104X
    [4X[28X[(1,3) : -8 -> -7][128X[104X
    [4X[28X[(1,3) : -7 -> -7][128X[104X
    [4X[28X[(2,4) : -8 -> -7][128X[104X
    [4X[28X[(2,4) : -7 -> -7][128X[104X
    [4X[28X[(1,4)(2,3) : -8 -> -7][128X[104X
    [4X[28X[(1,4)(2,3) : -7 -> -7][128X[104X
    [4X[28X[(1,2)(3,4) : -8 -> -7][128X[104X
    [4X[28X[(1,2)(3,4) : -7 -> -7][128X[104X
    [4X[25Xgap>[125X [27Xrcrd8 := RightCosetRepresentatives( Gd8, Ud8 );[127X[104X
    [4X[28X[ [() : -9 -> -9], [() : -9 -> -8], [() : -9 -> -7], [(2,4) : -9 -> -9],[128X[104X
    [4X[28X  [(2,4) : -9 -> -8], [(2,4) : -9 -> -7], [() : -8 -> -9], [() : -8 -> -8],[128X[104X
    [4X[28X  [() : -8 -> -7], [(2,4) : -8 -> -9], [(2,4) : -8 -> -8], [(2,4) : -8 -> -7][128X[104X
    [4X[28X ][128X[104X
    [4X[25Xgap>[125X [27Xlcr7 := LeftCosetRepresentativesFromObject( Gd8, Ud8, -7 );[127X[104X
    [4X[28X[ [() : -7 -> -9], [(2,4) : -7 -> -9], [() : -7 -> -8], [(2,4) : -7 -> -8] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.5 [33X[0;0YConjugation[133X[101X
  
  [1X4.5-1 ConjugateArrow[101X
  
  [29X[2XConjugateArrow[102X( [3Xe1[103X, [3Xe[103X ) [32X operation
  
  [33X[0;0YWhen  [22Xe = (c : p -> q)[122X conjugation by [22Xe[122X is the groupoid automorphism defined
  as follows. There are two cases.[133X
  
  [33X[0;0YIn the case [22Xp ≠ q[122X,[133X
  
  [30X    [33X[0;6Yobjects [22Xp,q[122X are interchanged, and the remaining objects are fixed;[133X
  
  [30X    [33X[0;6Yloops  at [22Xp,q[122X: [22X(b: p -> p) ↦ (b^c : q -> q)[122X and [22X(b: q -> q) ↦ (b^c^-1}
        : p -> p)[122X;[133X
  
  [30X    [33X[0;6Yarrows between [22Xp[122X and [22Xq[122X: [22X(b : p -> q) ↦ (c^-1bc^-1 : q -> p)[122X and [22X(b : q
        -> p) ↦ (cbc : p -> q)[122X;[133X
  
  [30X    [33X[0;6Ycostar  at [22Xp,q[122X: [22X(b : r -> p) ↦ (bc : r -> q)[122X and [22X(b : r -> q) ↦ (bc^-1
        : r -> p)[122X;[133X
  
  [30X    [33X[0;6Ystar  at [22Xp,q[122X: [22X(b : p -> r) ↦ (c^-1b : -> q)[122X and [22X(b : q -> r) ↦ (cb : p
        -> r)[122X;[133X
  
  [30X    [33X[0;6Ythe remaining arrows are unchanged.[133X
  
  [33X[0;0YIn the case [22Xp=q[122X,[133X
  
  [30X    [33X[0;6Yall the objects are fixed;[133X
  
  [30X    [33X[0;6Yloops at [22Xp[122X are conjugated by [22Xc[122X, [22X(b : p -> p) ↦ (b^c : p -> p)[122X;[133X
  
  [30X    [33X[0;6Ythe  rest of the costar and star at [22Xp[122X are permuted, [22X(b : r -> p) ↦ (bc
        : r -> p)[122X and [22X(b : p -> r) ↦ (c^-1b : p -> r)[122X;[133X
  
  [30X    [33X[0;6Ythe remaining arrows are unchanged.[133X
  
  [33X[0;0YThe details of this construction may be found in [AW10].[133X
  
  [33X[0;0Y(Note that it is more desirable to use the command [10Xe1^e2[110X, but it has not yet
  been possible to get this to work!)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := Arrow( Gd8, (1,3), -9, -9 );; [127X[104X
    [4X[25Xgap>[125X [27Xy := Arrow( Gd8, (1,2,3,4), -8, -9 );; [127X[104X
    [4X[25Xgap>[125X [27Xz := Arrow( Gd8, (1,2)(3,4), -9, -7 );; [127X[104X
    [4X[25Xgap>[125X [27Xw := Arrow( Gd8, (1,2,3,4), -7, -8 );; [127X[104X
    [4X[25Xgap>[125X [27X##  conjugation with arrows x, y, z and w in Gd8: [127X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(x,y);[127X[104X
    [4X[28X[(2,4) : -8 -> -8][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(x,z);[127X[104X
    [4X[28X[(2,4) : -7 -> -7][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(x,w);[127X[104X
    [4X[28X[(1,3) : -9 -> -9][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(y,x);[127X[104X
    [4X[28X[() : -8 -> -9][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(y,z);[127X[104X
    [4X[28X[(2,4) : -8 -> -7][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(y,w);    [127X[104X
    [4X[28X[(1,3)(2,4) : -7 -> -9][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(z,x);[127X[104X
    [4X[28X[(1,4,3,2) : -9 -> -7][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(z,y);[127X[104X
    [4X[28X[(2,4) : -8 -> -7][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(z,w);[127X[104X
    [4X[28X[(1,3) : -9 -> -8][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(w,x); [127X[104X
    [4X[28X[(1,2,3,4) : -7 -> -8][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(w,y);[127X[104X
    [4X[28X[(1,3)(2,4) : -7 -> -9][128X[104X
    [4X[25Xgap>[125X [27XConjugateArrow(w,z);[127X[104X
    [4X[28X[(1,3) : -9 -> -8][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-2 SinglePieceSubgroupoidByGenerators[101X
  
  [29X[2XSinglePieceSubgroupoidByGenerators[102X( [3Xparent[103X, [3Xgens[103X ) [32X operation
  
  [33X[0;0YA  set  of  arrows  generates a groupoid by taking all possible products and
  inverses.  So  far,  the  only  implementation  is  for  the  case  of loops
  generating  a group at an object [22Xo[122X andf a set of rays from [22Xo[122X, where [22Xo[122X is [13Xnot[113X
  the  least  object.  A  suitably large supergroupoid, which must be a direct
  product  with  a complete graph, should be provided. This is the case needed
  for [10XConjugateGroupoid[110X in the following section. Other cases will be added as
  time permits.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xu := Arrow( Gs4, (1,2,3), -15, -13 ); [127X[104X
    [4X[28X[(1,2,3) : -15 -> -13][128X[104X
    [4X[25Xgap>[125X [27Xgensa := GeneratorsOfGroupoid( Hd8a );[127X[104X
    [4X[28X[ [(1,2,3,4) : -14 -> -14], [(1,3) : -14 -> -14], [(2,3) : -14 -> -13], [128X[104X
    [4X[28X  [(3,4) : -14 -> -12] ][128X[104X
    [4X[25Xgap>[125X [27Ximsa := List( gensa, g -> ConjugateArrow( g, u ) ); [127X[104X
    [4X[28X[ [(1,2,3,4) : -14 -> -14], [(1,3) : -14 -> -14], [(1,3) : -14 -> -15], [128X[104X
    [4X[28X  [(3,4) : -14 -> -12] ][128X[104X
    [4X[25Xgap>[125X [27XC := SinglePieceSubgroupoidByGenerators( Gs4, imsa ); [127X[104X
    [4X[28Xsingle piece groupoid with rays: < Group( [ (1,4,3,2), (1,3) ] ), [128X[104X
    [4X[28X[ -15, -14, -12 ], [ (), (1,3), (1,4,3) ] >[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-3 ConjugateGroupoid[101X
  
  [29X[2XConjugateGroupoid[102X( [3Xgpd[103X, [3Xe[103X ) [32X operation
  
  [33X[0;0YWhen  [22XH[122X  is  a  subgroupoid of a groupoid [22XG[122X and [22Xa[122X is an arrow of [22XG[122X, then the
  conjugate  of  [22XH[122X  by [22Xa[122X is the subgroupoid generated by the conjugates of the
  generators of [22XH[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XConjugateGroupoid( Hd8a, u^-1 ); [127X[104X
    [4X[28Xsingle piece groupoid with rays: < Group( [ (1,4,3,2), (1,3) ] ), [128X[104X
    [4X[28X[ -15, -14, -12 ], [ (), (1,3), (1,4,3) ] >[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YMore  examples  of  all  these  operations  may be found in the example file
  [11Xgpd/examples/gpd.g[111X.[133X
  
