  
  [1X5 [33X[0;0YGroups and homomorphisms[133X[101X
  
  
  [1X5.1 [33X[0;0YFunctions for groups[133X[101X
  
  [1X5.1-1 Comm[101X
  
  [33X[1;0Y[29X[2XComm[102X( [3XL[103X ) [32X operation[133X
  
  [33X[0;0YThis method has been transferred from package [5XResClasses[105X.[133X
  
  [33X[0;0YIt  provides  a  method  for  [10XComm[110X  when the argument is a list (enclosed in
  square brackets), and calls the function [10XLeftNormedComm[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XComm( [ (1,2), (2,3) ] );[127X[104X
    [4X[28X(1,2,3)[128X[104X
    [4X[25Xgap>[125X [27XComm( [(1,2),(2,3),(3,4),(4,5),(5,6)] );[127X[104X
    [4X[28X(1,5,6)[128X[104X
    [4X[25Xgap>[125X [27XComm(Comm(Comm(Comm((1,2),(2,3)),(3,4)),(4,5)),(5,6));  ## the same[127X[104X
    [4X[28X(1,5,6)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.1-2 IsCommuting[101X
  
  [33X[1;0Y[29X[2XIsCommuting[102X( [3Xa[103X, [3Xb[103X ) [32X operation[133X
  
  [33X[0;0YThis function has been transferred from package [5XResClasses[105X.[133X
  
  [33X[0;0YIt tests whether two elements in a group commute.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD12 := DihedralGroup( 12 );[127X[104X
    [4X[28X<pc group of size 12 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XSetName( D12, "D12" ); [127X[104X
    [4X[25Xgap>[125X [27Xa := D12.1;;  b := D12.2;;  [127X[104X
    [4X[25Xgap>[125X [27XIsCommuting( a, b );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.1-3 ListOfPowers[101X
  
  [33X[1;0Y[29X[2XListOfPowers[102X( [3Xg[103X, [3Xexp[103X ) [32X operation[133X
  
  [33X[0;0YThis function has been transferred from package [5XRCWA[105X.[133X
  
  [33X[0;0YThe  operation  [10XListOfPowers(g,exp)[110X  returns  the  list [22X[g,g^2,...,g^exp][122X of
  powers of the element [22Xg[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XListOfPowers( 2, 20 );[127X[104X
    [4X[28X[ 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384,[128X[104X
    [4X[28X 32768, 65536, 131072, 262144, 524288, 1048576 ][128X[104X
    [4X[25Xgap>[125X [27XListOfPowers( (1,2,3)(4,5), 12 );[127X[104X
    [4X[28X[ (1,2,3)(4,5), (1,3,2), (4,5), (1,2,3), (1,3,2)(4,5), (),[128X[104X
    [4X[28X (1,2,3)(4,5), (1,3,2), (4,5), (1,2,3), (1,3,2)(4,5), () ][128X[104X
    [4X[25Xgap>[125X [27XListOfPowers( D12.2, 6 );[127X[104X
    [4X[28X[ f2, f3, f2*f3, f3^2, f2*f3^2, <identity> of ... ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.1-4 GeneratorsAndInverses[101X
  
  [33X[1;0Y[29X[2XGeneratorsAndInverses[102X( [3XG[103X ) [32X operation[133X
  
  [33X[0;0YThis function has been transferred from package [5XRCWA[105X.[133X
  
  [33X[0;0YThis operation returns a list containing the generators of [22XG[122X followed by the
  inverses of these generators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsAndInverses( D12 );[127X[104X
    [4X[28X[ f1, f2, f3, f1, f2*f3^2, f3^2 ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsAndInverses( SymmetricGroup(5) );     [127X[104X
    [4X[28X[ (1,2,3,4,5), (1,2), (1,5,4,3,2), (1,2) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.1-5 UpperFittingSeries[101X
  
  [33X[1;0Y[29X[2XUpperFittingSeries[102X( [3XG[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XLowerFittingSeries[102X( [3XG[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XFittingLength[102X( [3XG[103X ) [32X attribute[133X
  
  [33X[0;0YThese three functions have been transferred from package [5XResClasses[105X.[133X
  
  [33X[0;0YThe  upper  and  lower  Fitting  series and the Fitting length of a solvable
  group are described here: [7Xhttps://en.wikipedia.org/wiki/Fitting_length[107X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XUpperFittingSeries( D12 );  LowerFittingSeries( D12 );[127X[104X
    [4X[28X[ Group([  ]), Group([ f3, f2*f3 ]), Group([ f1, f3, f2*f3 ]) ][128X[104X
    [4X[28X[ D12, Group([ f3 ]), Group([  ]) ][128X[104X
    [4X[25Xgap>[125X [27XFittingLength( D12 );[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XS4 := SymmetricGroup( 4 );;[127X[104X
    [4X[25Xgap>[125X [27XUpperFittingSeries( S4 );[127X[104X
    [4X[28X[ Group(()), Group([ (1,2)(3,4), (1,4)(2,3) ]), Group([ (1,2)(3,4), (1,4)[128X[104X
    [4X[28X  (2,3), (2,4,3) ]), Group([ (3,4), (2,3,4), (1,2)(3,4) ]) ][128X[104X
    [4X[25Xgap>[125X [27XList( last, StructureDescription );[127X[104X
    [4X[28X[ "1", "C2 x C2", "A4", "S4" ][128X[104X
    [4X[25Xgap>[125X [27XLowerFittingSeries( S4 );[127X[104X
    [4X[28X[ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,3)[128X[104X
    [4X[28X (2,4) ]), Group(()) ][128X[104X
    [4X[25Xgap>[125X [27XList( last, StructureDescription );[127X[104X
    [4X[28X[ "S4", "A4", "C2 x C2", "1" ][128X[104X
    [4X[25Xgap>[125X [27XFittingLength( S4);[127X[104X
    [4X[28X3[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.2 [33X[0;0YLeft Cosets for Groups[133X[101X
  
  [1X5.2-1 LeftCoset[101X
  
  [33X[1;0Y[29X[2XLeftCoset[102X( [3Xg[103X, [3XU[103X ) [32X operation[133X
  
  [33X[0;0YSince  [5XGAP[105X uses right actions by default, the library contains the operation
  [10XRightCoset(U,g)[110X  for constructing the right coset [22XUg[122X of a subgroup [22XU ≤ G[122X and
  an  element  [22Xg  ∈  G[122X.  It  has  been  noted in the reference manual that, by
  inverting all the elements in [22XUg[122X, the left coset [22Xg^-1U[122X is obtained.[133X
  
  [33X[0;0YJust  for  the  sake of completeness, from August 2022 this package provides
  the  operation  [10XLeftCoset(g,U)[110X for constructing the left coset [22XgU[122X. Users are
  strongly   recommended  to  continue  to  use  [10XRightCoset[110X  for  all  serious
  calculations,  since  left  cosets have a much simpler implementation and do
  not behave exactly like right cosets.[133X
  
  [33X[0;0YThe  methods for left cosets which are provided generally work by converting
  [22XgU[122X  to  [22XUg^-1[122X;  applying  the  equivalent  method  for right cosets; and, if
  necessary, converting back again to left cosets.[133X
  
  [33X[0;0Y[22XG[122X acts on left cosets by [10XOnLeftInverse[110X: [22X(gU)^g_0 = g_0^-1*(gU) = (g_0^-1g)U[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa4 := Group( (1,2,3), (2,3,4) );; SetName( a4, "a4" );[127X[104X
    [4X[25Xgap>[125X [27Xk4 := Group( (1,2)(3,4), (1,3)(2,4) );; SetName( k4, "k4" );[127X[104X
    [4X[25Xgap>[125X [27Xrc := RightCosets( a4, k4 );[127X[104X
    [4X[28X[ RightCoset(k4,()), RightCoset(k4,(2,3,4)), RightCoset(k4,(2,4,3)) ][128X[104X
    [4X[25Xgap>[125X [27Xlc := LeftCosets( a4, k4 );[127X[104X
    [4X[28X[ LeftCoset((),k4), LeftCoset((2,4,3),k4), LeftCoset((2,3,4),k4) ][128X[104X
    [4X[25Xgap>[125X [27XAsSet( lc[2] );[127X[104X
    [4X[28X[ (2,4,3), (1,2,3), (1,3,4), (1,4,2) ][128X[104X
    [4X[25Xgap>[125X [27XLeftCoset( (1,4,2), k4 ) = lc[2];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XRepresentative( lc[2] );[127X[104X
    [4X[28X(2,4,3)[128X[104X
    [4X[25Xgap>[125X [27XActingDomain( lc[2] );[127X[104X
    [4X[28Xk4[128X[104X
    [4X[25Xgap>[125X [27X(1,4,3) in lc[3];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X(1,2,3)*lc[2] = lc[3];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xlc[2]^(1,3,2) = lc[3];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.2-2 [33X[0;0YInverse[133X[101X
  
  [33X[0;0YThe  inverse  of the left coset [22XgU[122X is the right coset [22XUg^-1[122X, and conversely.
  This  is  an abuse of the attribute [10XInverse[110X, since the standard requirement,
  that [22Xx*x^-1[122X is an identity, does not hold.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XInverse( rc[3] ) = lc[3];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XInverse( lc[2] ) = rc[2];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X5.3 [33X[0;0YFunctions for group homomorphisms[133X[101X
  
  [1X5.3-1 EpimorphismByGenerators[101X
  
  [33X[1;0Y[29X[2XEpimorphismByGenerators[102X( [3XG[103X, [3XH[103X ) [32X operation[133X
  
  [33X[0;0YThis function has been transferred from package [5XRCWA[105X.[133X
  
  [33X[0;0YIt  constructs  a group homomorphism which maps the generators of [22XG[122X to those
  of  [22XH[122X.  Its intended use is when [22XG[122X is a free group, and a warning is printed
  when  this  is  not the case. Note that anything may happen if the resulting
  map is not a homomorphism![133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := Group( (1,2,3), (3,4,5), (5,6,7), (7,8,9) );;[127X[104X
    [4X[25Xgap>[125X [27Xphi := EpimorphismByGenerators( FreeGroup("a","b","c","d"), G );[127X[104X
    [4X[28X[ a, b, c, d ] -> [ (1,2,3), (3,4,5), (5,6,7), (7,8,9) ][128X[104X
    [4X[25Xgap>[125X [27XPreImagesRepresentativeNC( phi, (1,2,3,4,5,6,7,8,9) );[127X[104X
    [4X[28Xd*c*b*a[128X[104X
    [4X[25Xgap>[125X [27Xa := G.1;; b := G.2;; c := G.3;; d := G.4;;[127X[104X
    [4X[25Xgap>[125X [27Xd*c*b*a;[127X[104X
    [4X[28X(1,2,3,4,5,6,7,8,9)[128X[104X
    [4X[25Xgap>[125X [27X## note that it is easy to produce nonsense: [127X[104X
    [4X[25Xgap>[125X [27Xepi := EpimorphismByGenerators( Group((1,2,3)), Group((8,9)) );[127X[104X
    [4X[28XWarning: calling GroupHomomorphismByImagesNC without checks[128X[104X
    [4X[28X[ (1,2,3) ] -> [ (8,9) ][128X[104X
    [4X[25Xgap>[125X [27XIsGroupHomomorphism( epi );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XImage( epi, (1,2,3) );                                            [127X[104X
    [4X[28X()[128X[104X
    [4X[25Xgap>[125X [27XImage( epi, (1,3,2) );[127X[104X
    [4X[28X(8,9)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-2 Pullback[101X
  
  [33X[1;0Y[29X[2XPullback[102X( [3Xhom1[103X, [3Xhom2[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XPullbackInfo[102X( [3XG[103X ) [32X attribute[133X
  
  [33X[0;0YIf  [22Xϕ_1  :  G_1 -> H[122X and [22Xϕ_2 : G_2 -> H[122X are two group homomorphisms with the
  same  range,  then their [13Xpullback[113X is the subgroup of [22XG_1 × G_2[122X consisting of
  those elements [22X(g_1,g_2)[122X such that [22Xϕ_1 g_1 = ϕ_2 g_2[122X.[133X
  
  [33X[0;0YThe   attribute   [10XPullbackInfo[110X   of   a  pullback  group  [10XP[110X  is  similar  to
  [10XDirectProductInfo[110X for a direct product of groups. Its value is a record with
  the following components:[133X
  
  [8X[10XdirectProduct[110X[8X[108X
        [33X[0;6Ythe direct product [22XG_1 × G_2[122X, and[133X
  
  [8X[10Xprojections[110X[8X[108X
        [33X[0;6Ya list with the two projections onto [22XG_1[122X and [22XG_2[122X.[133X
  
  [33X[0;0YThere  are  no  embeddings  in  this  record,  but it is possible to use the
  embeddings into the direct product, see [2XEmbedding[102X ([14XReference: Embedding[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xs4 := Group( (1,2),(2,3),(3,4) );;[127X[104X
    [4X[25Xgap>[125X [27Xs3 := Group( (5,6),(6,7) );;[127X[104X
    [4X[25Xgap>[125X [27Xc3 := Subgroup( s3, [ (5,6,7) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xf := GroupHomomorphismByImages( s4, s3, [127X[104X
    [4X[25X>[125X [27X            [(1,2),(2,3),(3,4)], [(5,6),(6,7),(5,6)] );; [127X[104X
    [4X[25Xgap>[125X [27Xi := GroupHomomorphismByImages( c3, s3, [(5,6,7)], [(5,6,7)] );; [127X[104X
    [4X[25Xgap>[125X [27XPfi := Pullback( f, i );[127X[104X
    [4X[28XGroup([ (2,3,4)(5,7,6), (1,2)(3,4) ])[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription( Pfi );[127X[104X
    [4X[28X"A4"[128X[104X
    [4X[25Xgap>[125X [27Xinfo := PullbackInfo( Pfi );[127X[104X
    [4X[28Xrec( directProduct := Group([ (1,2), (2,3), (3,4), (5,6,7) ]), [128X[104X
    [4X[28X  projections := [ [ (2,3,4)(5,7,6), (1,2)(3,4) ] -> [ (2,3,4), (1,2)(3,4) ], [128X[104X
    [4X[28X      [ (2,3,4)(5,7,6), (1,2)(3,4) ] -> [ (5,7,6), () ] ] )[128X[104X
    [4X[25Xgap>[125X [27Xg := (1,2,3)(5,6,7);; [127X[104X
    [4X[25Xgap>[125X [27XImageElm( info!.projections[1], g );[127X[104X
    [4X[28X(1,2,3)[128X[104X
    [4X[25Xgap>[125X [27XImageElm( info!.projections[2], g );[127X[104X
    [4X[28X(5,6,7) [128X[104X
    [4X[25Xgap>[125X [27Xdp := info!.directProduct;; [127X[104X
    [4X[25Xgap>[125X [27Xa := ImageElm( Embedding( dp, 1 ), (1,4,3) );; [127X[104X
    [4X[25Xgap>[125X [27Xb := ImageElm( Embedding( dp, 2 ), (5,7,6) );; [127X[104X
    [4X[25Xgap>[125X [27Xa*b in Pfi;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-3 CentralProduct[101X
  
  [33X[1;0Y[29X[2XCentralProduct[102X( [3XG1[103X, [3XG2[103X, [3XZ1[103X, [3XPhi[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCentralProductInfo[102X( [3XG[103X ) [32X attribute[133X
  
  [33X[0;0YThis  function was added by Thomas Breuer, following discussions with Hongyi
  Zhao (see [7Xhttps://github.com/gap-packages/hap/issues/73[107X).[133X
  
  [33X[0;0YLet  [3XG1[103X  and [3XG2[103X be two groups, [3XZ1[103X be a central subgroup of [3XG1[103X, and [3XPhi[103X be an
  isomorphism from [3XZ1[103X to a central subgroup of [3XG2[103X. The [13Xcentral product[113X defined
  by these arguments is the factor group of the direct product of [3XG1[103X and [3XG2[103X by
  the central subgroup [22X{ (z, ([3XPhi[103X(z))^-1) : z ∈ [3XZ1[103X }[122X.[133X
  
  [33X[0;0YThe  attribute  [2XCentralProductInfo[102X  of  a  group  [22XG[122X that has been created by
  [2XCentralProduct[102X  is  similar to [2XPullbackInfo[102X ([14X5.3-2[114X) for pullback groups. Its
  value is a record with the following components.[133X
  
  [8X[10Xprojection[110X[8X[108X
        [33X[0;6Ythe epimorphism from the direct product of [3XG1[103X and [3XG2[103X to [22XG[122X, and[133X
  
  [8X[10Xphi[110X[8X[108X
        [33X[0;6Ythe map [3XPhi[103X.[133X
  
  [33X[0;0YNote  that  one  can  access  the  direct  product as the [2XSource[102X ([14XReference:
  Source[114X) value of the [10Xprojection[110X map, and one can access [3XG1[103X and [3XG2[103X as the two
  embeddings of this direct product, see [2XEmbedding[102X ([14XReference: Embedding[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xg1 := DihedralGroup( 8 );[127X[104X
    [4X[28X<pc group of size 8 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xc1 := Centre( g1 );[127X[104X
    [4X[28XGroup([ f3 ])[128X[104X
    [4X[25Xgap>[125X [27Xcp1 := CentralProduct( g1, g1, c1, IdentityMapping( c1 ) );[127X[104X
    [4X[28XGroup([ f1, f2, f5, f3, f4, f5 ])[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( cp1 ) = IdGroup( ExtraspecialGroup( 2^5, "+" ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xg2 := QuaternionGroup( 8 );[127X[104X
    [4X[28X<pc group of size 8 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xc2 := Centre( g2 );[127X[104X
    [4X[28XGroup([ y2 ])[128X[104X
    [4X[25Xgap>[125X [27Xcp2 := CentralProduct( g2, g2, c2, IdentityMapping( c2 ) );[127X[104X
    [4X[28XGroup([ f1, f2, f5, f3, f4, f5 ])[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( cp2 ) = IdGroup( ExtraspecialGroup( 2^5, "+" ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xinfo2 := CentralProductInfo( cp2 );[127X[104X
    [4X[28Xrec( phi := IdentityMapping( Group([ y2 ]) ), [128X[104X
    [4X[28X  projection := [ f1, f2, f3, f4, f5, f6 ] -> [ f1, f2, f5, f3, f4, f5 ] )[128X[104X
    [4X[25Xgap>[125X [27XSource( Embedding( Source( info2.projection ), 1 ) ) = g2;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X5.3-4 IdempotentEndomorphisms[101X
  
  [33X[1;0Y[29X[2XIdempotentEndomorphisms[102X( [3XG[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XIdempotentEndomorphismsData[102X( [3XG[103X ) [32X attribute[133X
  [33X[1;0Y[29X[2XIdempotentEndomorphismsWithImage[102X( [3XgenG[103X, [3XR[103X ) [32X operation[133X
  
  [33X[0;0YAn  endomorphism  [22Xf  :  G  ->  G[122X  is  idempotent if [22Xf^2=f[122X. It has an image [22XR
  leqslant  G[122X;  is  the  identity map when restricted to [22XR[122X; and has a kernel [22XN[122X
  which has trivial intersection with [22XR[122X and has size [22X|G|/|R|[122X.[133X
  
  [33X[0;0YThe operation [10XIdempotentEndomorphismsWithImage(genG,R)[110X returns a list of the
  images  of  the  generating  set  [10XgenG[110X  of  a  group  [22XG[122X under the idempotent
  endomorphisms with image [22XR[122X.[133X
  
  [33X[0;0YThe  attribute  [10XIdempotentEndomorphismsData(G)[110X  returns  a  record [10Xdata[110X with
  fields  [10Xdata.gens[110X,  a  fixed generating set for [22XG[122X, and [10Xdata.images[110X a list of
  the  non-empty  outputs of [10XIdempotentEndomorphismsWithImage(genG,R)[110X obtained
  by iterating over all subgroups of [22XG[122X.[133X
  
  [33X[0;0YThe  operation [10XIdempotentEndomorphisms(G)[110X returns the list of these mappings
  obtained  using  [10XIdempotentEndomorphismsData(G)[110X.  The  first of these is the
  zero map, the second is the identity.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgens := [ (1,2,3,4), (1,2)(3,4) ];; [127X[104X
    [4X[25Xgap>[125X [27Xd8 := Group( gens );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( d8, "d8" );[127X[104X
    [4X[25Xgap>[125X [27Xc2 := Subgroup( d8, [ (2,4) ] );;[127X[104X
    [4X[25Xgap>[125X [27XIdempotentEndomorphismsWithImage( gens, c2 );[127X[104X
    [4X[28X[ [ (), (2,4) ], [ (2,4), () ] ][128X[104X
    [4X[25Xgap>[125X [27XIdempotentEndomorphismsData( d8 );[127X[104X
    [4X[28Xrec( gens := [ (1,2,3,4), (1,2)(3,4) ], [128X[104X
    [4X[28X  images := [ [ [ (), () ] ], [ [ (), (2,4) ], [ (2,4), () ] ], [128X[104X
    [4X[28X      [ [ (), (1,3) ], [ (1,3), () ] ], [128X[104X
    [4X[28X      [ [ (), (1,2)(3,4) ], [ (1,2)(3,4), (1,2)(3,4) ] ], [128X[104X
    [4X[28X      [ [ (), (1,4)(2,3) ], [ (1,4)(2,3), (1,4)(2,3) ] ], [128X[104X
    [4X[28X      [ [ (1,2,3,4), (1,2)(3,4) ] ] ] )[128X[104X
    [4X[25Xgap>[125X [27XList( last.images, L -> Length(L) );[127X[104X
    [4X[28X[ 1, 2, 2, 2, 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27XIdempotentEndomorphisms( d8 );               [127X[104X
    [4X[28X[ [ (1,2,3,4), (1,2)(3,4) ] -> [ (), () ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (), (2,4) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (2,4), () ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (), (1,3) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (1,3), () ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (), (1,2)(3,4) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (1,2)(3,4), (1,2)(3,4) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (), (1,4)(2,3) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (1,4)(2,3), (1,4)(2,3) ], [128X[104X
    [4X[28X  [ (1,2,3,4), (1,2)(3,4) ] -> [ (1,2,3,4), (1,2)(3,4) ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  quaternion group [10Xq8[110X is an example of a group with a tail: there is only
  one  subgroup  in  the  lattice which covers the identity subgroup. The only
  idempotent isomorphisms of such groups are the identity mapping and the zero
  mapping  because  the  only  pairs  [22XN,R[122X are the whole group and the identity
  subgroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xq8 := QuaternionGroup( 8 );;[127X[104X
    [4X[25Xgap>[125X [27XIdempotentEndomorphisms( q8 );[127X[104X
    [4X[28X[ [ x, y ] -> [ <identity> of ..., <identity> of ... ], [ x, y ] -> [ x, y ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-5 DirectProductOfFunctions[101X
  
  [33X[1;0Y[29X[2XDirectProductOfFunctions[102X( [3XG[103X, [3XH[103X, [3Xf1[103X, [3Xf2[103X ) [32X operation[133X
  
  [33X[0;0YGiven  group  homomorphisms  [22Xf_1  :  G_1  ->  G_2[122X and [22Xf_2 : H_1 -> H_2[122X, this
  operation  return  the  product  homomorphism [22Xf_1 × f_2 : G_1 × G_2 -> H_1 ×
  H_2[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc4 := Group( (1,2,3,4) );; [127X[104X
    [4X[25Xgap>[125X [27Xc2 := Group( (5,6) );; [127X[104X
    [4X[25Xgap>[125X [27Xf1 := GroupHomomorphismByImages( c4, c2, [(1,2,3,4)], [(5,6)] );;[127X[104X
    [4X[25Xgap>[125X [27Xc3 := Group( (1,2,3) );; [127X[104X
    [4X[25Xgap>[125X [27Xc6 := Group( (1,2,3,4,5,6) );; [127X[104X
    [4X[25Xgap>[125X [27Xf2 := GroupHomomorphismByImages( c3, c6, [(1,2,3)], [(1,3,5)(2,4,6)] );; [127X[104X
    [4X[25Xgap>[125X [27Xc4c3 := DirectProduct( c4, c3 ); [127X[104X
    [4X[28XGroup([ (1,2,3,4), (5,6,7) ])[128X[104X
    [4X[25Xgap>[125X [27Xc2c6 := DirectProduct( c2, c6 ); [127X[104X
    [4X[28XGroup([ (1,2), (3,4,5,6,7,8) ])[128X[104X
    [4X[25Xgap>[125X [27Xf := DirectProductOfFunctions( c4c3, c2c6, f1, f2 ); [127X[104X
    [4X[28X[ (1,2,3,4), (5,6,7) ] -> [ (1,2), (3,5,7)(4,6,8) ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( f, (1,4,3,2)(5,7,6) ); [127X[104X
    [4X[28X(1,2)(3,7,5)(4,8,6)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X5.3-6 DirectProductOfAutomorphismGroups[101X
  
  [33X[1;0Y[29X[2XDirectProductOfAutomorphismGroups[102X( [3XA1[103X, [3XA2[103X ) [32X operation[133X
  
  [33X[0;0YLet  [22XA_1,A_2[122X  be  groups of automorphism of groups [22XG_1,G_2[122X respectively. The
  output of this function is a group [22XA_1 × A_2[122X of automorphisms of [22XG_1 × G_2[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc9 := Group( (1,2,3,4,5,6,7,8,9) );; [127X[104X
    [4X[25Xgap>[125X [27Xac9 := AutomorphismGroup( c9 );; [127X[104X
    [4X[25Xgap>[125X [27Xq8 := QuaternionGroup( IsPermGroup, 8 );;[127X[104X
    [4X[25Xgap>[125X [27Xaq8 := AutomorphismGroup( q8 );;[127X[104X
    [4X[25Xgap>[125X [27XA := DirectProductOfAutomorphismGroups( ac9, aq8 );[127X[104X
    [4X[28X<group with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XgenA := GeneratorsOfGroup( A );;[127X[104X
    [4X[25Xgap>[125X [27XG := Source( genA[1] );[127X[104X
    [4X[28XGroup([ (1,2,3,4,5,6,7,8,9), (10,14,12,16)(11,17,13,15), (10,11,12,13)[128X[104X
    [4X[28X(14,15,16,17) ])[128X[104X
    [4X[25Xgap>[125X [27Xa := genA[1]*genA[5];  [127X[104X
    [4X[28X[ (1,2,3,4,5,6,7,8,9), (10,14,12,16)(11,17,13,15), (10,11,12,13)(14,15,16,17) [128X[104X
    [4X[28X ] -> [ (1,3,5,7,9,2,4,6,8), (10,16,12,14)(11,15,13,17), [128X[104X
    [4X[28X  (10,11,12,13)(14,15,16,17) ][128X[104X
    [4X[25Xgap>[125X [27XImageElm( a, (1,9,8,7,6,5,4,3,2)(10,14,12,16)(11,17,13,15) );[127X[104X
    [4X[28X(1,8,6,4,2,9,7,5,3)(10,16,12,14)(11,15,13,17)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
