  
  [1X13 [33X[0;0YInteraction with HAP[133X[101X
  
  [33X[0;0YThis chapter describes functions which allow functions in the package [5XHAP[105X to
  be called from [5XXMod[105X.[133X
  
  
  [1X13.1 [33X[0;0YCalling HAP functions[133X[101X
  
  [33X[0;0YIn  [5XHAP[105X  a  cat[22X^1[122X-group  is  called  a [10XCatOneGroup[110X and the traditional terms
  [13Xsource[113X  and  [13Xtarget[113X are used for the [10XTailMap[110X and [10XHeadMap[110X. A [10XCatOneGroup[110X is a
  record [10XC[110X with fields [10XC!.sourceMap[110X and [10XC!.targetMap[110X.[133X
  
  [1X13.1-1 SmallCat1Group[101X
  
  [33X[1;0Y[29X[2XSmallCat1Group[102X( [3Xn[103X, [3Xi[103X, [3Xj[103X ) [32X operation[133X
  
  [33X[0;0YThis  operation calls the [5XHAP[105X function [10XSmallCatOneGroup(n,i,j)[110X which returns
  a  [10XCatOneGroup[110X  from  the  [5XHAP[105X database. This is then converted into an [5XXMod[105X
  cat[22X^1[122X-group.  Note  that  the  numbering is not the same as that used by the
  [5XXMod[105X operation [10XCat1Select[110X. In the example [10XC12[110X is the converted form of [10XH12[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XH12 := SmallCatOneGroup( 12, 4, 3 );[127X[104X
    [4X[28XCat-1-group with underlying group Group( [ f1, f2, f3 ] ) . [128X[104X
    [4X[25Xgap>[125X [27XC12 := SmallCat1Group( 12, 4, 3 );[127X[104X
    [4X[28X[Group( [ f1, f2, f3 ] )=>Group( [ f1, f2, <identity> of ... ] )][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X13.1-2 CatOneGroupToXMod[101X
  
  [33X[1;0Y[29X[2XCatOneGroupToXMod[102X( [3XC[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCat1GroupToHAP[102X( [3XC[103X ) [32X operation[133X
  
  [33X[0;0YThese two functions convert between the two alternative implementations.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XC12 := CatOneGroupToXMod( H12 );    [127X[104X
    [4X[28X[Group( [ f1, f2, f3 ] )=>Group( [ f1, f2, <identity> of ... ] )][128X[104X
    [4X[25Xgap>[125X [27XC18 := Cat1Select( 18, 4, 3 );[127X[104X
    [4X[28X[(C3 x C3) : C2=>Group( [ f1, <identity> of ..., f3 ] )][128X[104X
    [4X[25Xgap>[125X [27XH18 := Cat1GroupToHAP( C18 ); [127X[104X
    [4X[28XCat-1-group with underlying group (C3 x C3) : C2 . [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X13.1-3 IdCat1Group[101X
  
  [33X[1;0Y[29X[2XIdCat1Group[102X( [3XC[103X ) [32X operation[133X
  
  [33X[0;0YThis  function calls the [5XHAP[105X function [10XIdCatOneGroup[110X on a cat[22X^1[122X-group [22XC[122X. This
  returns   [22X[n,i,j][122X   if   the  cat[22X^1[122X-group  is  the  [22Xj[122X-th  structure  on  the
  [10XSmallGroup(n,i)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIdCatOneGroup( H18 ); [127X[104X
    [4X[28X[ 18, 4, 4 ][128X[104X
    [4X[25Xgap>[125X [27XIdCat1Group( C18 ); [127X[104X
    [4X[28X[ 18, 4, 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
