  
  [1X9 [33X[0;0YUtility functions[133X[101X
  
  [33X[0;0YBy a utility function we mean a [5XGAP[105X function which is[133X
  
  [30X    [33X[0;6Yneeded by other functions in this package,[133X
  
  [30X    [33X[0;6Ynot (as far as we know) provided by the standard [5XGAP[105X library,[133X
  
  [30X    [33X[0;6Ymore suitable for inclusion in the main library than in this package.[133X
  
  
  [1X9.1 [33X[0;0YPrinting Lists[133X[101X
  
  [1X9.1-1 PrintListOneItemPerLine[101X
  
  [29X[2XPrintListOneItemPerLine[102X( [3XL[103X ) [32X operation
  
  [33X[0;0YThis  function is used in Chapter 4 when printing image lists of derivations
  and sections.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL := [ [1,2,3,4], true, [ (1,2), (2,3) ] ];; [127X[104X
    [4X[25Xgap>[125X [27XPrintListOneItemPerLine( L ); [127X[104X
    [4X[28X[ [ 1, 2, 3, 4 ], [128X[104X
    [4X[28X  true, [128X[104X
    [4X[28X  [ (1,2), (2,3) ] [128X[104X
    [4X[28X  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X9.2 [33X[0;0YInclusion and Restriction Mappings[133X[101X
  
  [33X[0;0YThese  two  functions  have  been  moved  to  the [5Xgpd[105X package, but are still
  documented here.[133X
  
  [1X9.2-1 InclusionMappingGroups[101X
  
  [29X[2XInclusionMappingGroups[102X( [3XG[103X, [3XH[103X ) [32X operation
  [29X[2XRestrictionMappingGroups[102X( [3Xhom[103X, [3Xsrc[103X, [3Xrng[103X ) [32X operation
  [29X[2XMappingToOne[102X( [3XG[103X, [3XH[103X ) [32X operation
  
  [33X[0;0YThis   set   of  utilities  concerns  inclusion  and  restriction  mappings.
  Restriction  may  apply to both the source and the range of the map. The map
  [10Xincd8[110X is the inclusion of [10Xd8[110X in [10Xd16[110X used in Section [14X3.4[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XPrint( incd8, "\n" );[127X[104X
    [4X[28X[ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ] ->[128X[104X
    [4X[28X[ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ][128X[104X
    [4X[25Xgap>[125X [27Ximd8 := Image( incd8 );;[127X[104X
    [4X[25Xgap>[125X [27Xresd8 := RestrictionMappingGroups( incd8, c4, imd8 );;[127X[104X
    [4X[25Xgap>[125X [27XSource( resd8 );  Range( resd8 );[127X[104X
    [4X[28Xc4[128X[104X
    [4X[28XGroup([ (11,13,15,17)(12,14,16,18), (11,18)(12,17)(13,16)(14,15) ])[128X[104X
    [4X[25Xgap>[125X [27XMappingToOne( c4, imd8 );[127X[104X
    [4X[28X[ (11,13,15,17)(12,14,16,18) ] -> [ () ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X9.2-2 InnerAutomorphismByNormalSubgroup[101X
  
  [29X[2XInnerAutomorphismByNormalSubgroup[102X( [3XG[103X, [3XN[103X ) [32X operation
  [29X[2XIsGroupOfAutomorphisms[102X( [3XA[103X ) [32X property
  
  [33X[0;0YInner  automorphisms of a group [10XG[110X by the elements of a normal subgroup [10XN[110X are
  calculated with the first of these functions, usually with [10XG[110X = [10XN[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xautd8 := AutomorphismGroup( d8 );;[127X[104X
    [4X[25Xgap>[125X [27Xinnd8 := InnerAutomorphismsByNormalSubgroup( d8, d8 );;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup( innd8 );[127X[104X
    [4X[28X[ ^(1,2,3,4), ^(1,3) ][128X[104X
    [4X[25Xgap>[125X [27XIsGroupOfAutomorphisms( innd8 );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X9.3 [33X[0;0YAbelian Modules[133X[101X
  
  [1X9.3-1 AbelianModuleObject[101X
  
  [29X[2XAbelianModuleObject[102X( [3Xgrp[103X, [3Xact[103X ) [32X operation
  [29X[2XIsAbelianModule[102X( [3Xobj[103X ) [32X property
  [29X[2XAbelianModuleGroup[102X( [3Xobj[103X ) [32X attribute
  [29X[2XAbelianModuleAction[102X( [3Xobj[103X ) [32X attribute
  
  [33X[0;0YAn  abelian  module  is an abelian group together with a group action. These
  are used by the crossed module constructor [10XXModByAbelianModule[110X.[133X
  
  [33X[0;0YThe    resulting    [10XXabmod[110X    is    isomorphic    to    the    output   from
  [10XXModByAutomorphismGroup( k4 );[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := (6,7)(8,9);;  y := (6,8)(7,9);;  z := (6,9)(7,8);;[127X[104X
    [4X[25Xgap>[125X [27Xk4 := Group( x, y );;  SetName( k4, "k4" );[127X[104X
    [4X[25Xgap>[125X [27Xs3 := Group( (1,2), (2,3) );;  SetName( s3, "s3" );[127X[104X
    [4X[25Xgap>[125X [27Xalpha := GroupHomomorphismByImages( k4, k4, [x,y], [y,x] );;[127X[104X
    [4X[25Xgap>[125X [27Xbeta := GroupHomomorphismByImages( k4, k4, [x,y], [x,z] );;[127X[104X
    [4X[25Xgap>[125X [27Xaut := Group( alpha, beta );;[127X[104X
    [4X[25Xgap>[125X [27Xact := GroupHomomorphismByImages( s3, aut, [(1,2),(2,3)], [alpha,beta] );;[127X[104X
    [4X[25Xgap>[125X [27Xabmod := AbelianModuleObject( k4, act );;[127X[104X
    [4X[25Xgap>[125X [27XXabmod := XModByAbelianModule( abmod );[127X[104X
    [4X[28X[k4->s3][128X[104X
    [4X[25Xgap>[125X [27XDisplay( Xabmod );[127X[104X
    [4X[28X[128X[104X
    [4X[28XCrossed module [k4->s3] :- [128X[104X
    [4X[28X: Source group k4 has generators:[128X[104X
    [4X[28X  [ (6,7)(8,9), (6,8)(7,9) ][128X[104X
    [4X[28X: Range group s3 has generators:[128X[104X
    [4X[28X  [ (1,2), (2,3) ][128X[104X
    [4X[28X: Boundary homomorphism maps source generators to:[128X[104X
    [4X[28X  [ (), () ][128X[104X
    [4X[28X: Action homomorphism maps range generators to automorphisms:[128X[104X
    [4X[28X  (1,2) --> { source gens --> [ (6,8)(7,9), (6,7)(8,9) ] }[128X[104X
    [4X[28X  (2,3) --> { source gens --> [ (6,7)(8,9), (6,9)(7,8) ] }[128X[104X
    [4X[28X  These 2 automorphisms generate the group of automorphisms.[128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X9.4 [33X[0;0YDistinct and Common Representatives[133X[101X
  
  [1X9.4-1 DistinctRepresentatives[101X
  
  [29X[2XDistinctRepresentatives[102X( [3Xlist[103X ) [32X operation
  [29X[2XCommonRepresentatives[102X( [3Xlist[103X ) [32X operation
  [29X[2XCommonTransversal[102X( [3Xgrp[103X, [3Xsubgrp[103X ) [32X operation
  [29X[2XIsCommonTransversal[102X( [3Xgrp[103X, [3Xsubgrp[103X, [3Xlist[103X ) [32X operation
  
  [33X[0;0YThe  final  set  of  utilities  deal  with lists of subsets of [22X[1 ... n][122X and
  construct  systems  of  distinct  and  common  representatives using simple,
  non-recursive, combinatorial algorithms.[133X
  
  [33X[0;0YWhen  [22XL[122X  is  a  set  of  [22Xn[122X  subsets  of  [22X[1 ... n][122X and the Hall condition is
  satisfied  (the  union  of  any [22Xk[122X subsets has at least [22Xk[122X elements), a set of
  distinct representatives exists.[133X
  
  [33X[0;0YWhen  [22XJ,K[122X  are  both  lists  of  [22Xn[122X  sets, the function [10XCommonRepresentatives[110X
  returns  two  lists:  the  set  of representatives, and a permutation of the
  subsets  of  the  second  list.  It  may  also  be  used to provide a common
  transversal  for sets of left and right cosets of a subgroup [22XH[122X of a group [22XG[122X,
  although a greedy algorithm is usually quicker.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XJ := [ [1,2,3], [3,4], [3,4], [1,2,4] ];[127X[104X
    [4X[28X[ [ 1, 2, 3 ], [ 3, 4 ], [ 3, 4 ], [ 1, 2, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XDistinctRepresentatives( J );[127X[104X
    [4X[28X[ 1, 3, 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XK := [ [3,4], [1,2], [2,3], [2,3,4] ];[127X[104X
    [4X[28X[ [ 3, 4 ], [ 1, 2 ], [ 2, 3 ], [ 2, 3, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XCommonRepresentatives( J, K );[127X[104X
    [4X[28X[ [ 3, 3, 3, 1 ], [ 1, 3, 4, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XCommonTransversal( d16, c4 );[127X[104X
    [4X[28X[ (), (12,18)(13,17)(14,16), (11,12,13,14,15,16,17,18), [128X[104X
    [4X[28X  (11,12)(13,18)(14,17)(15,16) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
