  
  [1X4 [33X[0;0Y[5XLAGUNA[105X[101X[1X functions[133X[101X
  
  
  [1X4.1 [33X[0;0YGeneral functions for group algebras[133X[101X
  
  [1X4.1-1 IsGroupAlgebra[101X
  
  [29X[2XIsGroupAlgebra[102X( [3XKG[103X ) [32X property
  
  [33X[0;0YA  group  ring  over a field is called a group algebra. For a group ring [3XKG[103X,
  [10XIsGroupAlgebra[110X  returns [9Xtrue[109X, if the underlying ring of [3XKG[103X is a field; [9Xfalse[109X
  is  returned  otherwise.  This  property will be set automatically for every
  group ring created by the function [10XGroupRing[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAlgebra( GroupRing( GF( 2 ), DihedralGroup( 16 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAlgebra( GroupRing( Integers, DihedralGroup( 16 ) ) );[127X[104X
    [4X[28Xfalse      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-2 IsFModularGroupAlgebra[101X
  
  [29X[2XIsFModularGroupAlgebra[102X( [3XKG[103X ) [32X property
  
  [33X[0;0YA  group  algebra [22XKG[122X over a field [22XK[122X is called [13Xmodular[113X, if the characteristic
  of  the  field [22XK[122X divides the order of some element in [22XG[122X. For a group algebra
  [3XKG[103X of a finite group [22XG[122X, [10XIsModularGroupAlgebra[110X returns [9Xtrue[109X, if [3XKG[103X is modular
  according  to  this  definition;  [9Xfalse[109X is returned otherwise. This property
  will  be  set automatically for every group algebra, created by the function
  [10XGroupRing[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsFModularGroupAlgebra( GroupRing( GF( 2 ), SymmetricGroup( 6 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsFModularGroupAlgebra( GroupRing( GF( 2 ), CyclicGroup( 3 ) ) );[127X[104X
    [4X[28Xfalse  [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-3 IsPModularGroupAlgebra[101X
  
  [29X[2XIsPModularGroupAlgebra[102X( [3XKG[103X ) [32X property
  
  [33X[0;0YA  group  algebra  [22XKG[122X  is  said  to  be  [22Xp[122X-modular,  if  [22XK[122X  is  a  field  of
  characteristic [22Xp[122X and [22XG[122X is a finite [22Xp[122X-group for the same prime [22Xp[122X. For a group
  algebra  [3XKG[103X  of a finite group [22XG[122X, [10XIsPModularGroupAlgebra[110X returns [9Xtrue[109X, if [3XKG[103X
  is [22Xp[122X-modular according to this definition; [9Xfalse[109X is returned otherwise. This
  property  will  be set automatically for every group algebra, created by the
  function [10XGroupRing[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsPModularGroupAlgebra( GroupRing( GF( 2 ), DihedralGroup( 16 ) ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsPModularGroupAlgebra( GroupRing( GF( 2 ), SymmetricGroup( 6 ) ) );[127X[104X
    [4X[28Xfalse        [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-4 UnderlyingGroup[101X
  
  [29X[2XUnderlyingGroup[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe underlying group of a group ring[133X
  
  [33X[0;0YThis  attribute  stores the underlying group of a group ring [3XKG[103X. In fact, it
  refers  to  the attribute [10XUnderlyingMagma[110X which returns the same result, and
  was introduced for group rings for convenience, and for teaching purposes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF ( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XG := UnderlyingGroup( KG );[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>  [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-5 UnderlyingRing[101X
  
  [29X[2XUnderlyingRing[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe underlying ring of a group ring[133X
  
  [33X[0;0YThis  attribute  stores  the underlying ring of a group ring [3XKG[103X. In fact, it
  refers  to the attribute [10XLeftActingDomain[110X which returns the same result, and
  was introduced for group rings for convenience, and for teaching purposes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingRing( KG );[127X[104X
    [4X[28XGF(2)     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.1-6 UnderlyingField[101X
  
  [29X[2XUnderlyingField[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe underlying field of a group algebra[133X
  
  [33X[0;0YThis  attribute  stores the underlying field of a group algebra [3XKG[103X. In fact,
  it  refers  to the attribute [10XLeftActingDomain[110X which returns the same result,
  and  was  introduced  for  group  algebras for convenience, and for teaching
  purposes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingField( KG );[127X[104X
    [4X[28XGF(2)    [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.2 [33X[0;0YOperations with group algebra elements[133X[101X
  
  [1X4.2-1 Support[101X
  
  [29X[2XSupport[102X( [3Xx[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ysupport of x as a list of elements of the underlying group[133X
  
  [33X[0;0YReturns  the  support  of  a group ring element [3Xx[103X. The support of a non-zero
  element  [22Xx  =  α_1  ⋅ g_1 + α_2 ⋅ g_2 + ⋯ + α_k ⋅ g_k[122X of a group ring is the
  list  of  elements  [22Xg_i  ∈  G[122X for which the coefficient [22Xα_i[122X is non-zero. The
  support of the zero element of a group ring is defined to be the empty list.
  This method is also applicable to elements of magma rings.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[28X# First we create an element x to use in in the series of examples.[128X[104X
    [4X[28X# We map the minimal generating system of the group G to its group algebra[128X[104X
    [4X[28X# and denote their images as a and b[128X[104X
    [4X[25Xgap>[125X [27XG:=DihedralGroup(16);; KG:=GroupRing(GF(2),G);;[127X[104X
    [4X[25Xgap>[125X [27Xl := List( MinimalGeneratingSet( G ), g -> g^Embedding( G, KG ) );[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2 ][128X[104X
    [4X[25Xgap>[125X [27Xa := l[1]; b := l[2]; e := One( KG ); # we denote the identity by e[127X[104X
    [4X[28X(Z(2)^0)*f1[128X[104X
    [4X[28X(Z(2)^0)*f2[128X[104X
    [4X[28X(Z(2)^0)*<identity> of ...[128X[104X
    [4X[25Xgap>[125X [27Xx := ( e + a ) * ( e + b );[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XSupport( x );[127X[104X
    [4X[28X[ <identity> of ..., f1, f2, f1*f2 ]     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-2 CoefficientsBySupport[101X
  
  [29X[2XCoefficientsBySupport[102X( [3Xx[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ycoefficients  of  support  elements  as  list  of  elements of the
            underlying ring[133X
  
  [33X[0;0YReturns  a list that contains the coefficients corresponding to the elements
  of  [10XSupport(  x  )[110X in the same order as the elements appear in [10XSupport( x )[110X.
  This method is also applicable to elements of magma rings.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XCoefficientsBySupport( x );[127X[104X
    [4X[28X[ Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0 ]   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-3 TraceOfMagmaRingElement[101X
  
  [29X[2XTraceOfMagmaRingElement[102X( [3Xx[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Yan element of the underlying ring[133X
  
  [33X[0;0YReturns  the trace of a group ring element [3Xx[103X. By definition, the trace of an
  element  [22Xx  =  α_1 ⋅ 1 + α_2 ⋅ g_2 + ⋯ + α_k ⋅ g_k[122X is equal to [22Xα_1[122X, that is,
  the  coefficient of the identity element in [22XG[122X. The trace of the zero element
  is zero. This method is also applicable to elements of magma rings.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XTraceOfMagmaRingElement( x );[127X[104X
    [4X[28XZ(2)^0        [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-4 Length[101X
  
  [29X[2XLength[102X( [3Xx[103X ) [32X attribute
  
  [33X[0;0YThe  length  of  an  element  of  a group ring [3Xx[103X is defined as the number of
  elements in its support. This method is also applicable to elements of magma
  rings.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XLength( x );[127X[104X
    [4X[28X4     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-5 Augmentation[101X
  
  [29X[2XAugmentation[102X( [3Xx[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe sum of coefficients of a group ring element[133X
  
  [33X[0;0YThe augmentation of a group ring element [22Xx = α_1 ⋅ g_1 + α_2 ⋅ g_2 + ⋯ + α_k
  ⋅ g_k[122X is the sum of its coefficients [22Xα_1 + α_2 + ⋯ + α_k[122X. The method is also
  applicable to elements of magma rings.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XAugmentation( x );[127X[104X
    [4X[28X0*Z(2)     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-6 PartialAugmentations[101X
  
  [29X[2XPartialAugmentations[102X( [3XKG[103X, [3Xx[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Ya  list  of  partial  augmentations  and a list of conjugacy class
            representatives[133X
  
  [33X[0;0YThe partial augmentation of an element [22Xx = α_1 ⋅ g_1 + α_2 ⋅ g_2 + ⋯ + α_k ⋅
  g_k[122X of the group ring [22XKG[122X, corresponding to the conjugacy class of an element
  [22Xg[122X  from the underlying group [22XG[122X is the sum of coefficients [22Xα_i[122X taken over all
  [22Xg_i[122X  such  that  [22Xg_i[122X  is conjugated to [22Xg[122X. The function returns a list of two
  lists, the first one is a list of partial augmentations, and the second is a
  list  of representatives of appropriate conjugacy classes of elements of the
  group [22XG[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xy := x + a*b^2;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2+(Z(2)^[128X[104X
    [4X[28X0)*f1*f3[128X[104X
    [4X[25Xgap>[125X [27XPartialAugmentations( KG, y );[127X[104X
    [4X[28X[ [ Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0 ], [ <identity> of ..., f1, f2, f1*f2 ] ]    [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-7 Involution[101X
  
  [29X[2XInvolution[102X( [3Xx[103X[[, [3Xf[103X], [3Xs[103X] ) [32X operation
  [6XReturns:[106X  [33X[0;10Yan element of a group ring[133X
  
  [33X[0;0YLet  [22XKG[122X  be  a  group ring, [22Xf[122X be a homomorphism from the group [22XG[122X to the unit
  group of the ring [22XK[122X. Furthermore, let [22Xs[122X be a mapping [22XG → G[122X, such that [22Xs^2[122X is
  the  identity  mapping  on  [22XG[122X  and  for every element [22Xg ∈ G[122X [22Xf(g*s(g))[122X equals
  [22Xf(s(g)*g)[122X and equals the identity element of the ring [22XK[122X. Then the involution
  of [22XKG[122X induced by [22Xf[122X and [22Xs[122X is defined by [22Xα_1 ⋅ g_1 + α_2 ⋅ g_2 + ⋯ + α_k ⋅ g_k
  ↦ α_1 ⋅ f(g_1) ⋅ s(g_1) + α_2 ⋅ f(g_2) ⋅ s(g_2) + ⋯ + α_k ⋅ f(g_k) ⋅ s(g_k)[122X.[133X
  
  [33X[0;0YThe  method  returns  the image of [3Xx[103X under the involution of [22XKG[122X induced by [22Xf[122X
  and  [22Xs[122X.  If  the mapping [22Xf[122X is omitted, [22Xf[122X is assumed to map everything to the
  identity element of the ring [22XK[122X. If both mappings are omitted, it returns the
  result of so-called classical involution, induced by the mapping [22Xx ↦ x^-1[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XInvolution( x );[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f1*f2+(Z(2)^0)*f2*f3*f4[128X[104X
    [4X[25Xgap>[125X [27Xl := List( MinimalGeneratingSet( G ), g -> g^Embedding( G, KG ) );[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2 ][128X[104X
    [4X[25Xgap>[125X [27XList( l, Involution ); # check how involution acts on elements of G[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2*f3*f4 ][128X[104X
    [4X[25Xgap>[125X [27XList( l, g -> g^-1 );[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2*f3*f4 ]     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-8 IsSymmetric[101X
  
  [29X[2XIsSymmetric[102X( [3Xx[103X ) [32X attribute
  
  [33X[0;0YAn  element  of  a  group  ring is called [13Xsymmetric[113X if it is fixed under the
  classical involution. This property is checked here.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsSymmetric( x );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsSymmetric( x * Involution( x ) );[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-9 IsUnitary[101X
  
  [29X[2XIsUnitary[102X( [3Xx[103X ) [32X attribute
  
  [33X[0;0YA unit of a group ring is called unitary if the classical involution inverts
  it. This property is checked here.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsUnitary(x);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xl:=List(MinimalGeneratingSet(G),g -> g^Embedding(G,KG));[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2 ][128X[104X
    [4X[25Xgap>[125X [27XList(l,IsUnitary); # check that elements of G are unitary[127X[104X
    [4X[28X[ true, true ]   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-10 IsUnit[101X
  
  [29X[2XIsUnit[102X( [[3XKG[103X, ][3Xx[103X ) [32X method
  
  [33X[0;0YThis  method  improves  a  standard  [5XGAP[105X  functionality  for  modular  group
  algebras.[133X
  
  [33X[0;0YIn  the  two-argument  version the method returns [9Xtrue[109X if [3Xx[103X is an invertible
  element  of  the  modular  group algebra [3XKG[103X and [9Xfalse[109X otherwise. This can be
  done  very  quickly by checking whether the augmentation of the element [3Xx[103X is
  non-zero.[133X
  
  [33X[0;0YIf  the  first  argument  is  omitted,  then  [5XLAGUNA[105X  constructs the group [22XH[122X
  generated  by the support of [3Xx[103X, and, if this group is a finite [22Xp[122X-group, then
  checks  whether  the coefficients of [3Xx[103X belong to a field [22XF[122X of characteristic
  [22Xp[122X.  If this is the case, then [10XIsUnit( FH, x )[110X is called; otherwise, standard
  [5XGAP[105X method is used.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XIsUnit( KG, x ); # clearly, is not a unit due to augmentation zero[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xy := One( KG ) + x; # this should give a unit[127X[104X
    [4X[28X(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27XIsUnit( KG, y );[127X[104X
    [4X[28Xtrue       [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-11 InverseOp[101X
  
  [29X[2XInverseOp[102X( [3Xx[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ythe inverse element of an element of a group ring[133X
  
  [33X[0;0YThis  method  improves  a  standard  [5XGAP[105X  functionality  for  modular  group
  algebras. It calculates the inverse of a group algebra element. The user can
  also invoke this function by typing [10X x^-1 [110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xy;[127X[104X
    [4X[28X(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2[128X[104X
    [4X[25Xgap>[125X [27Xy^-1;[127X[104X
    [4X[28X(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f3+(Z(2)^0)*f4+(Z(2)^0)*f1*f2+(Z(2)^[128X[104X
    [4X[28X0)*f1*f3+(Z(2)^0)*f1*f4+(Z(2)^0)*f2*f4+(Z(2)^0)*f1*f2*f4+(Z(2)^0)*f2*f3*f4+([128X[104X
    [4X[28XZ(2)^0)*f1*f2*f3*f4[128X[104X
    [4X[25Xgap>[125X [27Xy * y^-1;[127X[104X
    [4X[28X(Z(2)^0)*<identity> of ...    [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-12 BicyclicUnitOfType1[101X
  
  [29X[2XBicyclicUnitOfType1[102X( [[3XKG[103X, ][3Xa[103X, [3Xg[103X ) [32X operation
  [29X[2XBicyclicUnitOfType2[102X( [[3XKG[103X, ][3Xa[103X, [3Xg[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Yan element of a group ring[133X
  
  [33X[0;0Ylet  [22Xa[122X  be  an element of order [22Xn[122X of a group [22XG[122X. We put [22Xα = 1 + a + a^2 + ...
  +a^n-1[122X.  Then  [22X(a-1)*g*α[122X  and  [22Xα*g*(a-1)[122X  are nilpotent of index two for any
  element  [22Xg[122X  of  the group [22XG[122X not containing in the normalizer [22XN_G(⟨ a ⟩)[122X, and
  the units [22Xu_a,g = 1 + (a-1) * g * α[122X and [22Xv_a,g = 1 + α * g * (a-1)[122X are called
  [13Xbicyclic  units[113X  of  the  1st and 2nd type respectively. Note that [22Xu_a,g[122X and
  [22Xv_a,g[122X  may  coincide for some [22Xa[122X and [22Xg[122X, but in general this does not hold. In
  the  three-argument  version  these methods construct bicyclic units of both
  types  when  [3Xa[103X  and [3Xg[103X are elements of the underlying group [22XG[122X of a group ring
  [3XKG[103X.  The  two-argument  version  accepts images of elements [3Xa[103X and [3Xg[103X from the
  underlying  group in the group ring [22XKG[122X obtained using the mapping [10XEmbedding(
  G,  KG  )[110X.  Note  that it is not actually checked that [22Xg[122X is not contained in
  [22XN_G(⟨ a ⟩)[122X, because this is verified in [2XBicyclicUnitGroup[102X ([14X4.4-13[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup(32,6);[127X[104X
    [4X[28X<pc group of size 32 with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(2), G );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27Xg := MinimalGeneratingSet( G );[127X[104X
    [4X[28X[ f1, f2 ][128X[104X
    [4X[25Xgap>[125X [27Xg[1] in Normalizer( G, Subgroup( G, [g[2]] ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xg[2] in Normalizer( G, Subgroup( G, [g[1]] ) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xg := List( g, x -> x^Embedding( G, KG ) );[127X[104X
    [4X[28X[ (Z(2)^0)*f1, (Z(2)^0)*f2 ][128X[104X
    [4X[25Xgap>[125X [27XBicyclicUnitOfType1(g[1],g[2]) = BicyclicUnitOfType2(g[1],g[2]);[127X[104X
    [4X[28Xfalse                                                                       [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.2-13 BassCyclicUnit[101X
  
  [29X[2XBassCyclicUnit[102X( [[3XZG[103X, ][3Xg[103X, [3Xk[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Yan element of a group ring[133X
  
  [33X[0;0YLet  [3Xg[103X be an element of order [22Xn[122X of the group [22XG[122X, and 1 < [3Xk[103X < [22Xn[122X be such that [3Xk[103X
  and  [22Xn[122X  are  coprime,  then  [3Xk[103X^Phi([22Xn[122X)  is  congruent to 1 modulo [22Xn[122X. The unit
  b(g,k)= ( \sum_{j=0}^{k-1} g^j )^Phi(n) + ( (1-k^Phi(n))/n ) * Hat(g), where
  Hat(g)  =  g + g^2 + ... + g^n, is called a [13XBass cyclic unit[113X of the integral
  group ring [3XZG[103X.[133X
  
  [33X[0;0YThe  three-argument  version  constructs the Bass cyclic unit [22Xb(g,k)[122X for the
  element [3Xg[103X from the underlying group [22XG[122X of the group ring [3XZG[103X. The two-argument
  version  accepts  the  image  of  [3Xg[103X  in the group ring [22XZG[122X obtained using the
  mapping [10XEmbedding( G, KG )[110X.[133X
  
  [33X[0;0YRemark  that  when [22XG[122X is a finite nilpotent group, the group generated by the
  Bass  cyclic  units  contain a subgroup of finite index in the centre of the
  unit group of [3XZG[103X [JPS96].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricGroup( 5 );;[127X[104X
    [4X[25Xgap>[125X [27XZS := GroupRing( Integers, S );;[127X[104X
    [4X[25Xgap>[125X [27Xf := Embedding( S, ZS );;[127X[104X
    [4X[25Xgap>[125X [27XBassCyclicUnit( ZS, (1,3,2,5,4) , 3 );[127X[104X
    [4X[28X(1)*()+(-2)*(1,2,4,3,5)+(-2)*(1,3,2,5,4)+(3)*(1,4,5,2,3)+(1)*(1,5,3,4,2)[128X[104X
    [4X[25Xgap>[125X [27XBassCyclicUnit( (1,3,2,5,4)^f, 3 ); [127X[104X
    [4X[28X(1)*()+(-2)*(1,2,4,3,5)+(-2)*(1,3,2,5,4)+(3)*(1,4,5,2,3)+(1)*(1,5,3,4,2)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.3 [33X[0;0YImportant attributes of group algebras[133X[101X
  
  [1X4.3-1 AugmentationHomomorphism[101X
  
  [29X[2XAugmentationHomomorphism[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya homomorphism from a group ring to the underlying ring[133X
  
  [33X[0;0YThe  mapping which maps an element of a group ring [22XKG[122X to its augmentation is
  a  homomorphism  from  [22XKG[122X  onto  the  ring [22XK[122X; see [2XAugmentation[102X ([14X4.2-5[114X). This
  attribute stores this homomorphism for the group ring [3XKG[103X.[133X
  
  [33X[0;0YPlease  note  that  for  calculation  of the augmentation of an element of a
  group  ring  the  user  is  strongly recommended to use [2XAugmentation[102X ([14X4.2-5[114X)
  which works much faster than [10XAugmentationHomomorphism[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := GF( 2 ); G := SymmetricGroup( 3 ); FG := GroupRing( F, G );[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27Xe := Embedding( G,FG );[127X[104X
    [4X[28X<mapping: SymmetricGroup( [ 1 .. 3 ] ) -> AlgebraWithOne( GF(2), ... ) >[128X[104X
    [4X[25Xgap>[125X [27Xx := (1,2)^e; y := (1,3)^e;[127X[104X
    [4X[28X(Z(2)^0)*(1,2)[128X[104X
    [4X[28X(Z(2)^0)*(1,3)[128X[104X
    [4X[25Xgap>[125X [27Xa := AugmentationHomomorphism( FG );[127X[104X
    [4X[28X[ (Z(2)^0)*(1,2,3), (Z(2)^0)*(1,2) ] -> [ Z(2)^0, Z(2)^0 ][128X[104X
    [4X[25Xgap>[125X [27Xx^a; y^a; ( x + y )^a; # this is slower[127X[104X
    [4X[28XZ(2)^0[128X[104X
    [4X[28XZ(2)^0[128X[104X
    [4X[28X0*Z(2)   [128X[104X
    [4X[25Xgap>[125X [27XAugmentation(x); Augmentation(y); Augmentation( x + y ); # this is faster[127X[104X
    [4X[28XZ(2)^0[128X[104X
    [4X[28XZ(2)^0[128X[104X
    [4X[28X0*Z(2)   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-2 AugmentationIdeal[101X
  
  [29X[2XAugmentationIdeal[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Yan ideal of a group ring[133X
  
  [33X[0;0YIf  [22XKG[122X  is  a  group ring, then its augmentation ideal [22XA[122X is generated by all
  elements  of  the  form  [22Xg-1[122X,  where  [22Xg  ∈ G[122X \ { [22X1[122X }. The augmentation ideal
  consists  of  all  elements  of  [22XFG[122X  with  augmentation  [22X0[122X; see [2XAugmentation[102X
  ([14X4.2-5[114X).  This method changes a standard [5XGAP[105X functionality for modular group
  algebras and returns the augmentation ideal of a modular group algebra [3XKG[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XAugmentationIdeal( KG );[127X[104X
    [4X[28X<two-sided ideal in <algebra-with-one over GF(2), with 4 generators>,[128X[104X
    [4X[28X  (dimension 15)>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-3 RadicalOfAlgebra[101X
  
  [29X[2XRadicalOfAlgebra[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Yan ideal of a group algebra[133X
  
  [33X[0;0YThis method improves a standard [5XGAP[105X functionality for modular group algebras
  of  finite  [22Xp[122X-groups.  Since  in  this case the radical of the group algebra
  coincides  with  its  augmentation  ideal,  this method simply checks if the
  algebra  [3XKG[103X  is  a  [22Xp[122X-modular  group  algebra,  and,  if yes, it returns the
  augmentation ideal; otherwise, the standard [5XGAP[105X method will be used.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XRadicalOfAlgebra( KG );[127X[104X
    [4X[28X<two-sided ideal in <algebra-with-one over GF(2), with 4 generators>,[128X[104X
    [4X[28X  (dimension 15)>[128X[104X
    [4X[25Xgap>[125X [27XRadicalOfAlgebra( KG ) = AugmentationIdeal( KG );[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-4 WeightedBasis[101X
  
  [29X[2XWeightedBasis[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya  record  of  two  components:  weighted basis elements and their
            weights[133X
  
  [33X[0;0YThe argument [3XKG[103X must be a [22Xp[122X-modular group algebra.[133X
  
  [33X[0;0YFor a group algebra [22XKG[122X, let [22XA[122X denote the augmentation ideal, and assume that
  [22Xc[122X  is  the  smallest  number such that [22XA^c=0[122X. Then a weighted basis of [22XKG[122X is
  some  basis  [22Xb_1, ..., b_n[122X for the augmentation ideal [22XA[122X, for which there are
  indices  [22Xi_1=1, ..., i_c-1[122X such that [22Xb_i_k, ..., b_n[122X is a basis for [22XA^k[122X. The
  weight  of  an  element [22Xb_i[122X of a weighted basis is the unique integer [22Xw[122X such
  that  [22Xb_i[122X  belongs  to  [22Xw[122X-th  power of [22XA[122X but does not belong to its [22X(w+1)[122X-th
  power.[133X
  
  [33X[0;0YNote  that  this  function  actually constructs a basis for the [13Xaugmentation
  ideal[113X  of  [3XKG[103X  and  not  for  [3XKG[103X  itself.  Since  the augmentation ideal has
  co-dimension 1 in [10XKG[110X, a basis for [10XKG[110X can be easily obtained by adjoining the
  identity element of the group.[133X
  
  [33X[0;0YThe  method  returns a record whose basis entry is the basis and the weights
  entry  is  a  list  of  the corresponding weights the of basis elements. See
  Section [14X3.3[114X for more details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), ElementaryAbelianGroup( 4 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XWeightedBasis( KG );[127X[104X
    [4X[28Xrec([128X[104X
    [4X[28X  weightedBasis := [ (Z(2)^0)*<identity> of ...+(Z(2)^0)*f2,[128X[104X
    [4X[28X      (Z(2)^0)*<identity> of ...+(Z(2)^0)*f1,[128X[104X
    [4X[28X      (Z(2)^0)*<identity> of ...+(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2 ],[128X[104X
    [4X[28X  weights := [ 1, 1, 2 ] )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-5 AugmentationIdealPowerSeries[101X
  
  [29X[2XAugmentationIdealPowerSeries[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya list of ideals of a group algebra[133X
  
  [33X[0;0YThe  argument  [3XKG[103X  is  a  [22Xp[122X-modular group algebra. The method returns a list
  whose  elements  are  the  terms of the augmentation ideal filtration of [3XKG[103X,
  that   is  [10XAugmentationIdealPowerSeries(A)[i][110X  is  the  [22Xi[122X-th  power  of  the
  augmentation ideal of [3XKG[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XAugmentationIdealPowerSeries( KG );[127X[104X
    [4X[28X[ <algebra of dimension 15 over GF(2)>, <algebra of dimension 13 over GF(2)>,[128X[104X
    [4X[28X  <algebra of dimension 11 over GF(2)>, <algebra of dimension 9 over GF(2)>,[128X[104X
    [4X[28X  <algebra of dimension 7 over GF(2)>, <algebra of dimension 5 over GF(2)>,[128X[104X
    [4X[28X  <algebra of dimension 3 over GF(2)>, <algebra of dimension 1 over GF(2)>,[128X[104X
    [4X[28X  <algebra over GF(2)> ][128X[104X
    [4X[25Xgap>[125X [27XLength(last);[127X[104X
    [4X[28X9      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-6 AugmentationIdealNilpotencyIndex[101X
  
  [29X[2XAugmentationIdealNilpotencyIndex[102X( [3XKG[103X ) [32X attribute
  
  [33X[0;0YFor  the [22Xp[122X-modular group algebra [3XKG[103X the method returns the smallest number [22Xn[122X
  such  that  [22XA^n=0[122X, where [22XA[122X is the augmentation ideal of [3XKG[103X. This can be done
  using  Jenning's  theory  without the explicit calculations of the powers of
  the augmentation ideal.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XAugmentationIdealNilpotencyIndex( KG );[127X[104X
    [4X[28X9      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-7 AugmentationIdealOfDerivedSubgroupNilpotencyIndex[101X
  
  [29X[2XAugmentationIdealOfDerivedSubgroupNilpotencyIndex[102X( [3XKG[103X ) [32X attribute
  
  [33X[0;0YFor  the  [22Xp[122X-modular  group  algebra  [3XKG[103X this attribute stores the nilpotency
  index of the augmentation ideal of [22XKG'[122X where [22XG'[122X denotes the derived subgroup
  of [22XG[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XAugmentationIdealOfDerivedSubgroupNilpotencyIndex( KG );[127X[104X
    [4X[28X4[128X[104X
    [4X[25Xgap>[125X [27XD := DerivedSubgroup( UnderlyingGroup( KG ) );[127X[104X
    [4X[28XGroup([ f3, f4 ])[128X[104X
    [4X[25Xgap>[125X [27XKD := GroupRing( GF( 2 ), D );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XAugmentationIdealNilpotencyIndex( KD );[127X[104X
    [4X[28X4       [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.3-8 LeftIdealBySubgroup[101X
  
  [29X[2XLeftIdealBySubgroup[102X( [3XKG[103X, [3XH[103X ) [32X operation
  [29X[2XRightIdealBySubgroup[102X( [3XKG[103X, [3XH[103X ) [32X operation
  [29X[2XTwoSidedIdalBySubgroup[102X( [3XKG[103X, [3XH[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Yan ideal of a group ring[133X
  
  [33X[0;0YLet  [3XKG[103X be a group ring of a group [22XG[122X over the ring [22XK[122X, and [3XH[103X be a subgroup of
  [22XG[122X. Then the set [22XJ_l(H)[122X of all elements of [3XKG[103X of the form[133X
  
  
        [33X[1;6Y[24X[33X[0;0Y\sum_{h \in H} x_h(h-1)[133X [124X[133X
  
  
  [33X[0;0Yis the left ideal in [3XKG[103X generated by all elements [22Xh-1[122X with [22Xh[122X in [22XH[122X. The right
  ideal  [22XJ_r(H)[122X is defined analogously. These operations are used to consrtuct
  such  ideals,  taking  into  account  the  fact,  that  the  ideal [22XJ_l(H)[122X is
  two-sided  if  and  only  if  [3XH[103X  is  normal in [22XG[122X. An attempt of constructing
  two-sided ideal for a non-normal subgroup [3XH[103X will lead to an error message.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(2), DihedralGroup(16) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XG := DihedralGroup(16);[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(2), G );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XD := DerivedSubgroup( G );[127X[104X
    [4X[28XGroup([ f3, f4 ])[128X[104X
    [4X[25Xgap>[125X [27XLeftIdealBySubgroup( KG, D );[127X[104X
    [4X[28X<two-sided ideal in <algebra-with-one over GF(2), with 4 generators>,[128X[104X
    [4X[28X  (dimension 12)>                              [128X[104X
    [4X[25Xgap>[125X [27XH := Subgroup( G, [ GeneratorsOfGroup(G)[1] ]);[127X[104X
    [4X[28XGroup([ f1 ])[128X[104X
    [4X[25Xgap>[125X [27XIsNormal( G, H );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XLeftIdealBySubgroup( KG, H );[127X[104X
    [4X[28X<left ideal in <algebra-with-one over GF(2), with 4 generators>, (dimension 8[128X[104X
    [4X[28X )>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.4 [33X[0;0YComputations with the unit group[133X[101X
  
  [1X4.4-1 NormalizedUnitGroup[101X
  
  [29X[2XNormalizedUnitGroup[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya group generated by group algebra elements[133X
  
  [33X[0;0YDetermines  the  normalized  unit group of a [22Xp[122X-modular group algebra [3XKG[103X over
  the  field  of  [22Xp[122X  elements.  Returns the normalized unit group as the group
  generated by certain elements of [3XKG[103X; see Section [14X3.3[114X for more details.[133X
  
  [33X[0;0YFor    efficient    computations    the   user   is   recommended   to   use
  [2XPcNormalizedUnitGroup[102X ([14X4.4-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XV := NormalizedUnitGroup( KG );[127X[104X
    [4X[28X<group of size 32768 with 15 generators>[128X[104X
    [4X[25Xgap>[125X [27Xu := GeneratorsOfGroup( V )[4];[127X[104X
    [4X[28X(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2  [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-2 PcNormalizedUnitGroup[101X
  
  [29X[2XPcNormalizedUnitGroup[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya group given by power-commutator presentation[133X
  
  [33X[0;0YThe  argument  [3XKG[103X is a [22Xp[122X-modular group algebra over the field of [22Xp[122X elements.
  [10XPcNormalizedUnitGroup[110X  returns  the  normalized  unit group of [3XKG[103X given by a
  power-commutator   presentation.   The   generators   in   this   polycyclic
  presentation  correspond  to  the  weighted  basis  elements of [3XKG[103X. For more
  details, see Section [14X3.3[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XW := PcNormalizedUnitGroup( KG );[127X[104X
    [4X[28X<pc group of size 32768 with 15 generators>[128X[104X
    [4X[25Xgap>[125X [27Xw := GeneratorsOfGroup( W )[4];[127X[104X
    [4X[28Xf4       [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-3 NaturalBijectionToPcNormalizedUnitGroup[101X
  
  [29X[2XNaturalBijectionToPcNormalizedUnitGroup[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya homomorphism of groups[133X
  
  [33X[0;0YThe  normalised unit group of a [22Xp[122X-modular group algebra [22XKG[122X over the field of
  [22Xp[122X  elements  can  be  computed using two methods, namely [2XNormalizedUnitGroup[102X
  ([14X4.4-1[114X)  and  [2XPcNormalizedUnitGroup[102X  ([14X4.4-2[114X).  These  two methods return two
  different objects, and they can be used for different types of computations.
  The  elements  of  [10XNormalizedUnitGroup(KG)[110X  are represented in their natural
  group algebra representation, and hence they can easily be identified in the
  group algebra. However, the more quickly constructed [10XNormalizedUnitGroup(KG)[110X
  is  often not suitable for further fast calculations. Hence one will have to
  use  [10XPcNormalizedUnitGroup(KG)[110X  if  one  wants  to find some group theoretic
  properties  of  the normalized unit group. This method returns the bijection
  from  [10XNormalizedUnitGroup([3XKG[103X[10X)[110X onto [10XPcNormalizedUnitGroup([3XKG[103X[10X)[110X. This bijection
  can  be used to map the result of a computation in [10XPcNormalizedUnitGroup([3XKG[103X[10X)[110X
  into [10XNormalizedUnitGroup([3XKG[103X[10X)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xf := NaturalBijectionToPcNormalizedUnitGroup( KG );[127X[104X
    [4X[28XMappingByFunction( <group of size 32768 with 15 generators>, <pc group of size\[128X[104X
    [4X[28X 32768 with 15 generators>, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27Xu := GeneratorsOfGroup( V )[4];;[127X[104X
    [4X[25Xgap>[125X [27Xu^f;[127X[104X
    [4X[28Xf4   [128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup( V )[4]^f = GeneratorsOfGroup( W )[4];[127X[104X
    [4X[28Xtrue      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-4 NaturalBijectionToNormalizedUnitGroup[101X
  
  [29X[2XNaturalBijectionToNormalizedUnitGroup[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya homomorphism of groups[133X
  
  [33X[0;0YFor  a [22Xp[122X-modular group algebra [3XKG[103X over the field of [22Xp[122X elements this function
  returns  the  inverse of the mapping [2XNaturalBijectionToPcNormalizedUnitGroup[102X
  ([14X4.4-3[114X)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xt := NaturalBijectionToNormalizedUnitGroup(KG);;[127X[104X
    [4X[25Xgap>[125X [27Xw := GeneratorsOfGroup(W)[4];;[127X[104X
    [4X[25Xgap>[125X [27Xw^t;[127X[104X
    [4X[28X(Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f1*f2    [128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup( W )[4]^t = GeneratorsOfGroup( V )[4];[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-5 Embedding[101X
  
  [29X[2XEmbedding[102X( [3XH[103X, [3XV[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Ya homomorphism from an underlying group to a normalized unit group
            in pc-presentation[133X
  
  [33X[0;0YLet  [3XH[103X  be a subgroup of a group [22XG[122X and [3XV[103X be the normalized unit group of the
  group   algebra   [22XKG[122X   given   by  the  power-commutator  presentation  (see
  [2XPcNormalizedUnitGroup[102X   ([14X4.4-2[114X).   Then   [10XEmbedding(  H,  V  )[110X  returns  the
  homomorphism from [3XH[103X to [3XV[103X, which is the composition of [10XEmbedding( H, KG )[110X and
  [10XNaturalBijectionToPcNormalizedUnitGroup( KG )[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := DihedralGroup( 16 );[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), G );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XV:=PcNormalizedUnitGroup( KG );[127X[104X
    [4X[28X<pc group of size 32768 with 15 generators>[128X[104X
    [4X[25Xgap>[125X [27Xucs := UpperCentralSeries( V );[127X[104X
    [4X[28X[ <pc group of size 32768 with 15 generators>,[128X[104X
    [4X[28X  <pc group of size 4096 with 12 generators>,[128X[104X
    [4X[28X  Group([ f3*f5*f13*f15, f7, f15, f13*f15, f14*f15, f11*f13*f14*f15, f12,[128X[104X
    [4X[28X      f9*f12, f10 ]),[128X[104X
    [4X[28X  Group([ f3*f5*f13*f15, f7, f15, f13*f15, f14*f15, f11*f13*f14*f15 ]),[128X[104X
    [4X[28X  Group([  ]) ][128X[104X
    [4X[25Xgap>[125X [27Xf := Embedding( G, V );[127X[104X
    [4X[28X[ f1, f2, f3, f4 ] -> [ f2, f1, f3, f7 ][128X[104X
    [4X[25Xgap>[125X [27XG1 := Image( f, G ); [127X[104X
    [4X[28XGroup([ f2, f1, f3, f7 ])[128X[104X
    [4X[25Xgap>[125X [27XH := Intersection( ucs[2], G1 ); # compute intersection in V(KG)[127X[104X
    [4X[28XGroup([ f3, f7, f3*f7 ])[128X[104X
    [4X[25Xgap>[125X [27XT:=PreImage( f, H );             # find its preimage in G[127X[104X
    [4X[28XGroup([ f3, f4, f3*f4 ])[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( T ); [127X[104X
    [4X[28X[ 4, 1 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-6 Units[101X
  
  [29X[2XUnits[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe unit group of a group ring[133X
  
  [33X[0;0YThis  improves  a  standard  [5XGAP[105X functionality for modular group algebras of
  finite  [22Xp[122X-groups  over the field of [22Xp[122X elements. It returns the unit group of
  [3XKG[103X  as  a  direct product of [10XUnits(K)[110X and [10XNormalizedUnitGroup(KG)[110X, where the
  latter  is  generated  by  certain  elements  of  [3XKG[103X; see Chapter [14X3[114X for more
  details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XU := Units( KG );[127X[104X
    [4X[28X#I  LAGUNA package: Computing the unit group ...[128X[104X
    [4X[28X<group of size 32768 with 15 generators>[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup( U )[5]; # now elements of U are already in KG[127X[104X
    [4X[28X(Z(2)^0)*f2+(Z(2)^0)*f3+(Z(2)^0)*f2*f3[128X[104X
    [4X[25Xgap>[125X [27XFH := GroupRing( GF(3), SmallGroup(27,3) );[127X[104X
    [4X[28X<algebra-with-one over GF(3), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XT := Units( FH );[127X[104X
    [4X[28X#I  LAGUNA package: Computing the unit group ...[128X[104X
    [4X[28X<group of size 5083731656658 with 27 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := GeneratorsOfGroup( T )[1];[127X[104X
    [4X[28XDirectProductElement( [ Z(3), (Z(3)^0)*<identity> of ... ] )[128X[104X
    [4X[25Xgap>[125X [27Xx in FH;[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xx[1] * x[2] in FH; # how to get the corresponding element of FH[127X[104X
    [4X[28Xtrue [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-7 PcUnits[101X
  
  [29X[2XPcUnits[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya group given by power-commutator presentation[133X
  
  [33X[0;0YReturns  the  unit  group  of  [3XKG[103X  as  a  direct  product  of  [10XUnits(K)[110X  and
  [10XPcNormalizedUnitGroup(KG)[110X, where the latter is a group given by a polycyclic
  presentation. See Section [14X3.4[114X for more details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XW := PcUnits( KG );[127X[104X
    [4X[28X<pc group of size 32768 with 15 generators>[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup( W )[5];[127X[104X
    [4X[28Xf5   [128X[104X
    [4X[25Xgap>[125X [27XFH := GroupRing( GF(3), SmallGroup(27,3) );[127X[104X
    [4X[28X<algebra-with-one over GF(3), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XT := PcUnits(FH);[127X[104X
    [4X[28X<group of size 5083731656658 with 27 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := GeneratorsOfGroup( T )[2];[127X[104X
    [4X[28XDirectProductElement( [ Z(3)^0, f1 ] )                      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-8 IsGroupOfUnitsOfMagmaRing[101X
  
  [29X[2XIsGroupOfUnitsOfMagmaRing[102X( [3XU[103X ) [32X property
  
  [33X[0;0YThis  property  will be automatically set [9Xtrue[109X, if [3XU[103X is a group generated by
  some units of a magma ring, including [10XUnits(KG)[110X and [10XNormalizedUnitgroup(KG)[110X.
  Otherwise this property will not be bound.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsGroupOfUnitsOfMagmaRing( NormalizedUnitGroup( KG ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGroupOfUnitsOfMagmaRing( Units( KG ) );[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-9 IsUnitGroupOfGroupRing[101X
  
  [29X[2XIsUnitGroupOfGroupRing[102X( [3XU[103X ) [32X property
  
  [33X[0;0YThis  property  will  be automatically set [9Xtrue[109X, if [3XU[103X is the unit group of a
  [22Xp[122X-modular  group  algebra,  obtained  either by [10XUnits(KG)[110X or by [10XPcUnits(KG)[110X.
  Otherwise this property will not be bound.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsUnitGroupOfGroupRing( Units( KG ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsUnitGroupOfGroupRing( PcUnits( KG ) );[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-10 IsNormalizedUnitGroupOfGroupRing[101X
  
  [29X[2XIsNormalizedUnitGroupOfGroupRing[102X( [3XU[103X ) [32X property
  
  [33X[0;0YThis  property  will  be automatically set [9Xtrue[109X, if [3XU[103X is the normalized unit
  group    of    a    [22Xp[122X-modular    group    algebra,    obtained   either   by
  [10XNormalizedUnitGroup(KG)[110X  or  by  [10XPcNormalizedUnitGroup(KG)[110X.  Otherwise  this
  property will not be bound.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsNormalizedUnitGroupOfGroupRing( NormalizedUnitGroup( KG ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsNormalizedUnitGroupOfGroupRing( PcNormalizedUnitGroup( KG ) );[127X[104X
    [4X[28Xtrue     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-11 UnderlyingGroupRing[101X
  
  [29X[2XUnderlyingGroupRing[102X( [3XU[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya group ring[133X
  
  [33X[0;0YIf [3XU[103X is the (normalized) unit group of a [22Xp[122X-modular group algebra [22XKG[122X obtained
  using  one  of the functions [10XUnits(KG)[110X, [10XPcUnits(KG)[110X, [10XNormalizedUnitGroup(KG)[110X
  or  [10XPcNormalizedUnitGroup(KG)[110X, then the attribute [10XUnderlyingGroupRing[110X stores
  [22XKG[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingGroupRing( Units( KG ) );[127X[104X
    [4X[28X<algebra-with-one of dimension 16 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingGroupRing( PcUnits( KG ) );[127X[104X
    [4X[28X<algebra-with-one of dimension 16 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingGroupRing( NormalizedUnitGroup( KG ) );[127X[104X
    [4X[28X<algebra-with-one of dimension 16 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingGroupRing( PcNormalizedUnitGroup( KG ) );[127X[104X
    [4X[28X<algebra-with-one of dimension 16 over GF(2)>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-12 UnitarySubgroup[101X
  
  [29X[2XUnitarySubgroup[102X( [3XU[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe subgroup of the unit group[133X
  
  [33X[0;0YLet  [3XU[103X  be  the normalized unit group of a group ring in either natural (see
  [2XNormalizedUnitGroup[102X  ([14X4.4-1[114X)) or power-commutator (see [2XPcNormalizedUnitGroup[102X
  ([14X4.4-2[114X))  presentation.  The  attribute  stores  the  unitary subgroup of [3XU[103X,
  generated  by  all unitary units of [3XU[103X (see [2XIsUnitary[102X ([14X4.2-9[114X)). The method is
  straightforward, so it is not recommended to run it for large groups.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 8 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XU := NormalizedUnitGroup( KG );[127X[104X
    [4X[28X<group of size 128 with 7 generators>[128X[104X
    [4X[25Xgap>[125X [27XHU := UnitarySubgroup( U );[127X[104X
    [4X[28X<group with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( HU );[127X[104X
    [4X[28X[ 64, 261 ][128X[104X
    [4X[25Xgap>[125X [27XV := PcNormalizedUnitGroup( KG );[127X[104X
    [4X[28X<pc group of size 128 with 7 generators>[128X[104X
    [4X[25Xgap>[125X [27XHV := UnitarySubgroup( V );[127X[104X
    [4X[28XGroup([ f1, f2, f5, f6, f7 ])[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( HV );[127X[104X
    [4X[28X[ 64, 261 ][128X[104X
    [4X[25Xgap>[125X [27XImage(NaturalBijectionToPcNormalizedUnitGroup( KG ), HU ) = HV;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-13 BicyclicUnitGroup[101X
  
  [29X[2XBicyclicUnitGroup[102X( [3XU[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe subgroup of the unit group, generated by bicyclic units[133X
  
  [33X[0;0YLet  [3XU[103X  be  the normalized unit group of a group ring in either natural (see
  [2XNormalizedUnitGroup[102X  ([14X4.4-1[114X)) or power-commutator (see [2XPcNormalizedUnitGroup[102X
  ([14X4.4-2[114X))  presentation. The attribute stores the subgroup of [3XU[103X, generated by
  all  bicyclic  units  [22Xu_g,h[122X  and [22Xv_g,h[122X (see [2XBicyclicUnitOfType1[102X ([14X4.2-12[114X) and
  [2XBicyclicUnitOfType2[102X  ([14X4.2-12[114X)),  where  [22Xg[122X and [22Xh[122X run over the elements of the
  underlying group, and [22Xh[122X do not belongs to the normalizer of [22X⟨ g ⟩[122X in [22XG[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 8 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XU := NormalizedUnitGroup( KG );[127X[104X
    [4X[28X<group of size 128 with 7 generators>[128X[104X
    [4X[25Xgap>[125X [27XBU := BicyclicUnitGroup( U );[127X[104X
    [4X[28X<group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( BU );[127X[104X
    [4X[28X[ 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XV := PcNormalizedUnitGroup( KG );[127X[104X
    [4X[28X<pc group of size 128 with 7 generators>[128X[104X
    [4X[25Xgap>[125X [27XBV := BicyclicUnitGroup( V );[127X[104X
    [4X[28XGroup([ f5*f6, f6*f7 ])[128X[104X
    [4X[25Xgap>[125X [27XIdGroup( BV );[127X[104X
    [4X[28X[ 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XImage( NaturalBijectionToPcNormalizedUnitGroup( KG ), BU ) = BV;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.4-14 GroupBases[101X
  
  [29X[2XGroupBases[102X( [3XKG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya list of lists of group rings elements[133X
  
  [33X[0;0YThe  subgroup  [22XB[122X  of  the  normalized  unit group of the group algebra [22XKG[122X is
  called a [13Xgroup basis[113X, if the elements of [22XB[122X are linearly independent over the
  field  [22XK[122X  and  [22XKB=KG[122X.  If  [3XKG[103X  is a [22Xp[122X-modular group algebra, then [10XGroupBases[110X
  returns  a  list  of  representatives  of the conjugacy classes of the group
  bases of the group algebra [3XKG[103X in its normalised unit group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD8 := DihedralGroup( 8 );[127X[104X
    [4X[28X<pc group of size 8 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XK := GF(2);[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[25Xgap>[125X [27XKD8 := GroupRing( GF( 2 ), D8 );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xgb := GroupBases( KD8 );;[127X[104X
    [4X[25Xgap>[125X [27XLength( gb );[127X[104X
    [4X[28X32[128X[104X
    [4X[25Xgap>[125X [27Xgb[1];[127X[104X
    [4X[28X[ (Z(2)^0)*<identity> of ..., (Z(2)^0)*f3,[128X[104X
    [4X[28X  (Z(2)^0)*f1*f2+(Z(2)^0)*f2*f3+(Z(2)^0)*f1*f2*f3,[128X[104X
    [4X[28X  (Z(2)^0)*f2+(Z(2)^0)*f1*f2+(Z(2)^0)*f1*f2*f3,[128X[104X
    [4X[28X  (Z(2)^0)*<identity> of ...+(Z(2)^0)*f2+(Z(2)^0)*f3+(Z(2)^0)*f2*f3+(Z(2)^[128X[104X
    [4X[28X    0)*f1*f2*f3, (Z(2)^0)*f2+(Z(2)^0)*f1*f3+(Z(2)^0)*f2*f3,[128X[104X
    [4X[28X  (Z(2)^0)*<identity> of ...+(Z(2)^0)*f2+(Z(2)^0)*f3+(Z(2)^0)*f1*f2+(Z(2)^[128X[104X
    [4X[28X    0)*f2*f3, (Z(2)^0)*f1+(Z(2)^0)*f2+(Z(2)^0)*f2*f3 ][128X[104X
    [4X[25Xgap>[125X [27XLength( last );[127X[104X
    [4X[28X8    [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.5 [33X[0;0YThe Lie algebra of a group algebra[133X[101X
  
  [1X4.5-1 LieAlgebraByDomain[101X
  
  [29X[2XLieAlgebraByDomain[102X( [3XA[103X ) [32X method
  
  [33X[0;0YThis  method  takes  a  group  algebra  as  its argument, and constructs its
  associated  Lie  algebra  in  which  the  product  is the bracket operation:
  [22X[a,b]=ab-ba[122X.  It  is  recommended that the user never calls this method. The
  Lie  algebra  for  an  associative  algebra should normally be created using
  [10XLieAlgebra(  A  )[110X.  When  [10XLieAlgebra[110X is first invoked, it constructs the Lie
  algebra  for  [3XA[103X  using  [10XLieAlgebraByDomain[110X.  After  that  it stores this Lie
  algebra and simply returns it if [10XLieAlgebra[110X is called again.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup(3);; FG := GroupRing( GF( 2 ), G );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-2 IsLieAlgebraByAssociativeAlgebra[101X
  
  [29X[2XIsLieAlgebraByAssociativeAlgebra[102X( [3XL[103X ) [32X Category
  
  [33X[0;0YThis  category  signifies  that the Lie algebra [3XL[103X was constructed as the Lie
  algebra  associated  with  an associative algebra (this piece of information
  cannot be obtained later).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(3), DihedralGroup(16) );[127X[104X
    [4X[28X<algebra-with-one over GF(3), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra ( KG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(3)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieAlgebraByAssociativeAlgebra( L );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-3 UnderlyingAssociativeAlgebra[101X
  
  [29X[2XUnderlyingAssociativeAlgebra[102X( [3XL[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe underlying associative algebra of a Lie algebra[133X
  
  [33X[0;0YIf  a  Lie  algebra  [3XL[103X  is  constructed from an associative algebra, then it
  remembers this underlying associative algebra as one of its attributes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(2), DihedralGroup(16) ); [127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra ( KG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingAssociativeAlgebra( L );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27Xlast = KG;[127X[104X
    [4X[28Xtrue  [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-4 NaturalBijectionToLieAlgebra[101X
  
  [29X[2XNaturalBijectionToLieAlgebra[102X( [3XA[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya mapping[133X
  
  [33X[0;0YThe  natural  linear  bijection  between  the  (isomorphic,  but  not equal)
  underlying  vector spaces of an associative algebra [3XA[103X and its associated Lie
  algebra  is  stored  as  an attribute of [3XA[103X. Note that this is a vector space
  isomorphism between two algebras, but not an algebra isomorphism.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := GF( 2 ); G := SymmetricGroup( 3 ); FG := GroupRing( F, G );[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27Xt := NaturalBijectionToLieAlgebra( FG );; [127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[25Xgap>[125X [27Xa := Random( FG );[127X[104X
    [4X[28X(Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2)+(Z(2)^0)*(1,3)[128X[104X
    [4X[25Xgap>[125X [27Xa * a;                     # product in the associative algebra[127X[104X
    [4X[28X(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2)[128X[104X
    [4X[25Xgap>[125X [27Xb := a^t;[127X[104X
    [4X[28XLieObject( (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2)+(Z(2)^0)*(1,3) )[128X[104X
    [4X[25Xgap>[125X [27Xb * b; # product in the Lie algebra (commutator) - must be zero![127X[104X
    [4X[28XLieObject( <zero> of ... )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-5 NaturalBijectionToAssociativeAlgebra[101X
  
  [29X[2XNaturalBijectionToAssociativeAlgebra[102X( [3XL[103X ) [32X attribute
  
  [33X[0;0YThis is the inverse of the previous linear bijection, stored as an attribute
  of the Lie algebra [3XL[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup(3); FG := GroupRing( GF( 2 ), G );[127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27Xs := NaturalBijectionToAssociativeAlgebra( L );;[127X[104X
    [4X[25Xgap>[125X [27XInverseGeneralMapping( s ) = NaturalBijectionToLieAlgebra( FG );[127X[104X
    [4X[28Xtrue   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-6 IsLieAlgebraOfGroupRing[101X
  
  [29X[2XIsLieAlgebraOfGroupRing[102X( [3XL[103X ) [32X property
  
  [33X[0;0YIf  a Lie algebra [3XL[103X is constructed from an associative algebra which happens
  to be in fact a group ring, it has many nice properties that can be used for
  fast algorithms, so this information is stored as a property.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := GF( 2 ); G := SymmetricGroup( 3 ); FG := GroupRing( F, G );[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieAlgebraOfGroupRing( L );[127X[104X
    [4X[28Xtrue   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-7 UnderlyingGroup[101X
  
  [29X[2XUnderlyingGroup[102X( [3XL[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe underlying group[133X
  
  [33X[0;0YThe  underlying  group  of  a Lie algebra [3XL[103X that is constructed from a group
  ring   is   defined  as  the  underlying  group  of  this  group  ring;  see
  [2XUnderlyingGroup[102X ([14X4.1-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := GF( 2 ); G := SymmetricGroup( 3 ); FG := GroupRing( F, G );[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XUnderlyingGroup( L );[127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[25Xgap>[125X [27XLeftActingDomain( L );[127X[104X
    [4X[28XGF(2)   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-8 Embedding[101X
  
  [29X[2XEmbedding[102X( [3XU[103X, [3XL[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Ya mapping, which is a composition of two mappings[133X
  
  [33X[0;0YLet  [22XFG[122X  be  a  group  ring,  let [3XU[103X be a submagma of [22XG[122X, and let [3XL[103X be the Lie
  algebra  associated  with  [22XFG[122X.  Then  [10XEmbedding([3XU[103X[10X,  [3XL[103X[10X  )[110X returns the obvious
  mapping  from  [3XU[103X to [3XL[103X (as the composition of the mappings [10XEmbedding( [3XU[103X[10X, FG )[110X
  and [10XNaturalBijectionToLieAlgebra( FG )[110X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := GF( 2 ); G := SymmetricGroup( 3 ); FG := GroupRing( F, G );[127X[104X
    [4X[28XGF(2)[128X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27Xf := Embedding( G, L );;[127X[104X
    [4X[25Xgap>[125X [27X(1,2)^f + (1,3)^f;[127X[104X
    [4X[28XLieObject( (Z(2)^0)*(1,2)+(Z(2)^0)*(1,3) )   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-9 LieCentre[101X
  
  [29X[2XLieCentre[102X( [3XL[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya Lie algebra[133X
  
  [33X[0;0YThe  centre  of  the Lie algebra associated with a group ring corresponds to
  the  centre of the underlying group ring, and it can be calculated very fast
  by  considering  the conjugacy classes of the group. This method returns the
  centre of [3XL[103X using this idea.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup( 256, 400 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 256 with 8 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 8 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XC := LieCentre( L );[127X[104X
    [4X[28X<Lie algebra of dimension 28 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XD := LieDerivedSubalgebra( L );[127X[104X
    [4X[28X#I  LAGUNA package: Computing the Lie derived subalgebra ...[128X[104X
    [4X[28X<Lie algebra of dimension 228 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27Xc := Dimension( C ); d := Dimension( D ); l := Dimension( L );[127X[104X
    [4X[28X28[128X[104X
    [4X[28X228[128X[104X
    [4X[28X256[128X[104X
    [4X[25Xgap>[125X [27Xc + d = l; # This is always the case for Lie algebras of group algebras! [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-10 LieDerivedSubalgebra[101X
  
  [29X[2XLieDerivedSubalgebra[102X( [3XL[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya Lie algebra[133X
  
  [33X[0;0YIf  [3XL[103X  is  the  Lie  algebra  associated with a group ring, then this method
  returns  the  Lie  derived subalgebra of [3XL[103X. This can be done very fast using
  the conjugacy classes of the underlying group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup( 256, 400 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 256 with 8 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 8 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XC := LieCentre( L );[127X[104X
    [4X[28X<Lie algebra of dimension 28 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XD := LieDerivedSubalgebra( L );[127X[104X
    [4X[28X#I  LAGUNA package: Computing the Lie derived subalgebra ...    [128X[104X
    [4X[28X<Lie algebra of dimension 228 over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27Xl := Dimension( L ); c := Dimension( C ); d := Dimension( D );[127X[104X
    [4X[28X256[128X[104X
    [4X[28X28[128X[104X
    [4X[28X228[128X[104X
    [4X[25Xgap>[125X [27Xc + d = l; # This is always the case for Lie algebras of group algebras![127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-11 IsLieAbelian[101X
  
  [29X[2XIsLieAbelian[102X( [3XL[103X ) [32X method
  
  [33X[0;0YThe Lie algebra [3XL[103X of an associative algebra [22XA[122X is Lie abelian, if and only if
  [22XA[122X is abelian, so this method refers to [10XIsAbelian( A )[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup( 3 ); FG := GroupRing( GF( 2 ), G); [127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );          [127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsAbelian( G );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsAbelian( L );    # This command should not be used for Lie algebras![127X[104X
    [4X[28Xtrue                    [128X[104X
    [4X[25Xgap>[125X [27XIsLieAbelian( L ); # Instead, IsLieAbelian is the correct command.[127X[104X
    [4X[28Xfalse   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-12 IsLieSolvable[101X
  
  [29X[2XIsLieSolvable[102X( [3XL[103X ) [32X method
  
  [33X[0;0YIn [PPS73] Passi, Passman, and Sehgal have classified all groups [22XG[122X such that
  the Lie algebra associated with the group ring is solvable. This method uses
  their classification, making it considerably faster than the more elementary
  method which just calculates Lie commutators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup( 256, 400 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 256 with 8 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 8 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieSolvable( L );                       # This is very fast.[127X[104X
    [4X[28X#I  LAGUNA package: Checking Lie solvability ...[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XList( LieDerivedSeries( L ), Dimension ); # This is very slow.[127X[104X
    [4X[28X#I  LAGUNA package: Computing the Lie derived subalgebra ...[128X[104X
    [4X[28X[ 256, 228, 189, 71, 0 ]   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-13 IsLieNilpotent[101X
  
  [29X[2XIsLieNilpotent[102X( [3XL[103X ) [32X method
  
  [33X[0;0YIn [PPS73] Passi, Passman, and Sehgal have classified all groups [22XG[122X such that
  the Lie algebra associated with the group ring is Lie nilpotent. This method
  uses  their  classification,  making  it  considerably  faster than the more
  elementary method which just calculates Lie commutators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup( 256, 400 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 256 with 8 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 8 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieNilpotent( L );                           # This is very fast.[127X[104X
    [4X[28X#I  LAGUNA package: Checking Lie nilpotency ...[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XList( LieLowerCentralSeries( L ), Dimension ); # This is very slow.[127X[104X
    [4X[28X#I  LAGUNA package: Computing the Lie derived subalgebra ...[128X[104X
    [4X[28X[ 256, 228, 222, 210, 191, 167, 138, 107, 76, 54, 29, 15, 6, 0 ]   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-14 IsLieMetabelian[101X
  
  [29X[2XIsLieMetabelian[102X( [3XL[103X ) [32X property
  
  [33X[0;0YIn  [LR86]  Levin and Rosenberger have classified all groups [22XG[122X such that the
  Lie  algebra  associated  with the group ring is Lie metabelian. This method
  uses  their  classification,  making  it  considerably  faster than the more
  elementary method which just calculates Lie commutators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SmallGroup( 256, 400 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 256 with 8 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 8 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieMetabelian( L );[127X[104X
    [4X[28Xfalse   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-15 IsLieCentreByMetabelian[101X
  
  [29X[2XIsLieCentreByMetabelian[102X( [3XL[103X ) [32X property
  
  [33X[0;0YIn  [Ros02]  the  third  author of this package classified all groups [22XG[122X such
  that   the   Lie   algebra   associated   with   the   group   ring  is  Lie
  centre-by-metabelian.   This  method  uses  the  classification,  making  it
  considerably  faster  than  the more elementary method which just calculates
  Lie commutators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup( 3 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );       [127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XIsLieMetabelian( L );                                             [127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsLieCentreByMetabelian( L );[127X[104X
    [4X[28Xtrue   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-16 CanonicalBasis[101X
  
  [29X[2XCanonicalBasis[102X( [3XL[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ybasis of a Lie algebra[133X
  
  [33X[0;0YThe  canonical  basis  of a group algebra [22XFG[122X is formed by the elements of [22XG[122X.
  Here  [3XL[103X  is  the  Lie algebra associated with [22XFG[122X, and the method returns the
  images of the elements of [22XG[122X in [3XL[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup( 3 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );       [127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XB := CanonicalBasis( L );[127X[104X
    [4X[28XCanonicalBasis( <Lie algebra of dimension 6 over GF(2)> )[128X[104X
    [4X[25Xgap>[125X [27XElements( B );[127X[104X
    [4X[28X[ LieObject( (Z(2)^0)*() ), LieObject( (Z(2)^0)*(2,3) ),[128X[104X
    [4X[28X  LieObject( (Z(2)^0)*(1,2) ), LieObject( (Z(2)^0)*(1,2,3) ),[128X[104X
    [4X[28X  LieObject( (Z(2)^0)*(1,3,2) ), LieObject( (Z(2)^0)*(1,3) ) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-17 IsBasisOfLieAlgebraOfGroupRing[101X
  
  [29X[2XIsBasisOfLieAlgebraOfGroupRing[102X( [3XB[103X ) [32X property
  
  [33X[0;0YA  basis  [3XB[103X  has  this property if the preimages of the basis vectors in the
  group algebra form a group. It can be verified if a basis has this property.
  This  is  important  for  the  speed  of  the  calculation  of the structure
  constants table; see [2XStructureConstantsTable[102X ([14X4.5-18[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup( 3 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28XSym( [ 1 .. 3 ] )[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );    [127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XB := CanonicalBasis( L );[127X[104X
    [4X[28XCanonicalBasis( <Lie algebra of dimension 6 over GF(2)> )[128X[104X
    [4X[25Xgap>[125X [27XIsBasisOfLieAlgebraOfGroupRing( B );[127X[104X
    [4X[28Xtrue   [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-18 StructureConstantsTable[101X
  
  [29X[2XStructureConstantsTable[102X( [3XB[103X ) [32X method
  
  [33X[0;0YA very fast implementation for calculating the structure constants table for
  the Lie algebra [10XL[110X associated with a group ring with respect to its canonical
  basis [3XB[103X using its special structure; see [2XCanonicalBasis[102X ([14X4.5-16[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := CyclicGroup( 2 ); FG := GroupRing( GF( 2 ), G ); [127X[104X
    [4X[28X<pc group of size 2 with 1 generators>[128X[104X
    [4X[28X<algebra-with-one over GF(2), with 1 generators>[128X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( FG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XB := CanonicalBasis( L );[127X[104X
    [4X[28XCanonicalBasis( <Lie algebra of dimension 2 over GF(2)> )[128X[104X
    [4X[25Xgap>[125X [27XStructureConstantsTable( B );    [127X[104X
    [4X[28X#I  LAGUNA package: Computing the structure constants table ...   [128X[104X
    [4X[28X[ [ [ [  ], [  ] ], [ [  ], [  ] ] ], [ [ [  ], [  ] ], [ [  ], [  ] ] ], -1, [128X[104X
    [4X[28X  0*Z(2) ]  [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-19 LieUpperNilpotencyIndex[101X
  
  [29X[2XLieUpperNilpotencyIndex[102X( [3XKG[103X ) [32X attribute
  
  [33X[0;0YIn  a  modular  group  algebra  [22XKG[122X  the [13Xupper Lie power series[113X is defined as
  follows:   [22XKG^(1)=KG[122X,  [22XKG^(n+1)[122X  is  the  associative  ideal,  generated  by
  [22X[KG^(n),KG][122X.  The  upper Lie nilpotency index [22Xt^L(G)[122X of the group algebra [22XKG[122X
  is  defined  to  be  the  smallest  number  [22Xn[122X  such that [22XKG^(n)=0[122X. It can be
  calculated  very  fast using Lie dimension subgroups [Sha91], that is, using
  only  information  about  the  underlying  group;  see [2XLieDimensionSubgroups[102X
  ([14X4.6-4[114X).  This  is  why it is stored as an attribute of the group algebra [3XKG[103X
  rather than that of its associated Lie algebra.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XLieUpperNilpotencyIndex( KG );[127X[104X
    [4X[28X5      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-20 LieLowerNilpotencyIndex[101X
  
  [29X[2XLieLowerNilpotencyIndex[102X( [3XKG[103X ) [32X attribute
  
  [33X[0;0YIn  a  modular  group  algebra  [22XKG[122X  the [13Xlower Lie power series[113X is defined as
  follows:  [22XKG^[n][122X  is  the  associative ideal, generated by all (left-normed)
  Lie-products [22X[x_1, x_2, dots, x_n][122X, [22Xx_i ∈ KG[122X. The lower Lie nilpotency index
  [22Xt_L(G)[122X  of the group algebra [22XKG[122X is defined to be the minimal smallest [22Xn[122X such
  that  [22XKG^[n]=0[122X.  In  [Du92] the Jennings' conjecture was proved, which means
  that  the nilpotency class of the normalized unit group of the modular group
  algebra [22XKG[122X is equal to [22Xt_L(G)-1[122X.[133X
  
  [33X[0;0YThis  allows  to express lower Lie nilpotency index via the nilpotency class
  of the normalized unit group, and with its polycyclic presentation, provided
  by  [5XLAGUNA[105X,  this  will  be  faster  than  elementary  calculations with Lie
  commutators.  As  the  previous  attribute,  this index is also stored as an
  attribute of the group algebra [3XKG[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF( 2 ), DihedralGroup( 16 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XLieLowerNilpotencyIndex( KG );[127X[104X
    [4X[28X5     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.5-21 LieDerivedLength[101X
  
  [29X[2XLieDerivedLength[102X( [3XL[103X ) [32X attribute
  
  [33X[0;0YLet  [22XL[122X  be a Lie algebra. The [13XLie derived series[113X of [22XL[122X is defined as follows:
  [22Xδ^[0](L)  =  L[122X  and  [22Xδ^[n](L)  =  [δ^[n-1](L),  δ^[n-1](L)][122X. [22XL[122X is called Lie
  solvable  if  there exists an integer [22Xm[122X such that [22Xδ^[m](L) = 0[122X. In this case
  the  integer  [22Xm[122X is called the [13XLie derived length[113X of [22XL[122X, and it is returned by
  this function.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF ( 2 ), DihedralGroup( 16 ) );;[127X[104X
    [4X[25Xgap>[125X [27XL := LieAlgebra( KG );[127X[104X
    [4X[28X#I  LAGUNA package: Constructing Lie algebra ...[128X[104X
    [4X[28X<Lie algebra over GF(2)>[128X[104X
    [4X[25Xgap>[125X [27XLieDerivedLength( L );[127X[104X
    [4X[28X#I  LAGUNA package: Computing the Lie derived subalgebra ...[128X[104X
    [4X[28X3                                                            [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X4.6 [33X[0;0YOther commands[133X[101X
  
  [1X4.6-1 SubgroupsOfIndexTwo[101X
  
  [29X[2XSubgroupsOfIndexTwo[102X( [3XG[103X ) [32X attribute
  
  [33X[0;0YReturns  a  list  of  subgroups  of  [22XG[122X  with  index  two. Such subgroups are
  important for the investigation of the Lie structure of the group algebra [22XKG[122X
  in the case of characteristic 2.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSubgroupsOfIndexTwo( DihedralGroup( 16 ) );[127X[104X
    [4X[28X[ Group([ f3, f4, f1 ]), Group([ f3, f4, f2 ]), Group([ f3, f4, f1*f2 ]) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.6-2 DihedralDepth[101X
  
  [29X[2XDihedralDepth[102X( [3XU[103X ) [32X method
  
  [33X[0;0YFor  a  finite  2-group [3XU[103X, the function returns its [13Xdihedral depth[113X, which is
  defined  to  be  the  maximal  number  [22Xd[122X  such  that  [3XU[103X  contains a subgroup
  isomorphic to the dihedral group of order [22X2^d+1[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKD8 := GroupRing( GF(2), DihedralGroup( 8 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XUD8 := PcNormalizedUnitGroup( KD8 );[127X[104X
    [4X[28X<pc group of size 128 with 7 generators>[128X[104X
    [4X[25Xgap>[125X [27XDihedralDepth( UD8 );[127X[104X
    [4X[28X2      [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.6-3 DimensionBasis[101X
  
  [29X[2XDimensionBasis[102X( [3XG[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Yrecord  with  two  components:  `dimensionBasis'  (list  of  group
            elements) and `weights' (list of weights)[133X
  
  [33X[0;0YFor  a  finite  [22Xp[122X-group [3XG[103X, returns its Jennings basis as it was described in
  Section [14X3.3[114X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := DihedralGroup( 16 );[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>  [128X[104X
    [4X[25Xgap>[125X [27XDimensionBasis( G );[127X[104X
    [4X[28Xrec( dimensionBasis := [ f1, f2, f3, f4 ], weights := [ 1, 1, 2, 4 ] )    [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.6-4 LieDimensionSubgroups[101X
  
  [29X[2XLieDimensionSubgroups[102X( [3XG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ylist of subgroups[133X
  
  [33X[0;0YFor  a  finite [22Xp[122X-group [3XG[103X, returns the series of its Lie dimension subgroups.
  The [22Xm[122X-th Lie dimension subgroup [22XD_(m)[122X is the intersection of the group [22XG[122X and
  [22X1+KG^(m)[122X, where [22XKG^(m)[122X is the [22Xm[122X-th term of the upper Lie power series of [22XKG[122X;
  see [2XLieUpperNilpotencyIndex[102X ([14X4.5-19[114X)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := DihedralGroup( 16 );[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>  [128X[104X
    [4X[25Xgap>[125X [27XLieDimensionSubgroups( G );[127X[104X
    [4X[28X[ <pc group of size 16 with 4 generators>, Group([ f3, f4 ]), Group([ f4 ]),[128X[104X
    [4X[28X  Group([ <identity> of ... ]) ]     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.6-5 LieUpperCodimensionSeries[101X
  
  [29X[2XLieUpperCodimensionSeries[102X( [3XKG[103X ) [32X attribute
  [29X[2XLieUpperCodimensionSeries[102X( [3XG[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ylist of subgroups[133X
  
  [33X[0;0YA  notion of upper Lie codimension subgroups was introduced in [CS06]. For a
  finite  [22Xp[122X-group  [3XG[103X, [22XC_i[122X is the set of all elements [22Xg[122X in [3XG[103X, such that the Lie
  commutator  [22X[  g, g_1, ..., g_i ][122X of the length [22Xi+1[122X is equal to zero for all
  [22Xg_1,  ...,  g_i[122X  from  [3XG[103X,  and  [22XC_0  =  1[122X. By Du's theorem (see [Du92]), [22XC_i[122X
  coincides  with the intersection of [22XG[122X and the i-th term of the upper central
  series  [22X1=Z_0  <  Z_1 < Z_2 < ... < Z_n = V(KG)[122X of the normalized unit group
  [22XV(KG)[122X.  This  fact is used in [5XLAGUNA[105X to speed up computation of this series.
  Since  [22XV(KG)[122X  is  involved  in  computation, for the first time the argiment
  should  be the group ring [3XKG[103X, but later you can also apply it to the group [3XG[103X
  itself.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := DihedralGroup(16);[127X[104X
    [4X[28X<pc group of size 16 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XKG := GroupRing( GF(2), G );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XLieUpperCodimensionSeries( KG );[127X[104X
    [4X[28X[ Group([ f1, f2, f3, f4 ]), Group([ f3, f4, f3*f4 ]), Group([ f4 ]), [128X[104X
    [4X[28X  Group([ f4 ]), Group([  ]) ][128X[104X
    [4X[25Xgap>[125X [27XLieUpperCodimensionSeries( G );[127X[104X
    [4X[28X[ Group([ f1, f2, f3, f4 ]), Group([ f3, f4, f3*f4 ]), Group([ f4 ]), [128X[104X
    [4X[28X  Group([ f4 ]), Group([  ]) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X4.6-6 LAGInfo[101X
  
  [29X[2XLAGInfo[102X[32X info class
  
  [33X[0;0Y[10XLAGInfo[110X is a special Info class for [5XLAGUNA[105X algorithms. It has 5 levels: 0, 1
  (default),   2,   3   and  4.  To  change  info  level  to  [10Xk[110X,  use  command
  [10XSetInfoLevel(LAGInfo, k)[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetInfoLevel( LAGInfo, 2 );[127X[104X
    [4X[25Xgap>[125X [27XKD8 := GroupRing( GF( 2 ), DihedralGroup( 8 ) );[127X[104X
    [4X[28X<algebra-with-one over GF(2), with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XUD8 := PcNormalizedUnitGroup( KD8 );[127X[104X
    [4X[28X#I  LAGInfo: Computing the pc normalized unit group ...[128X[104X
    [4X[28X#I  LAGInfo: Calculating weighted basis ...[128X[104X
    [4X[28X#I  LAGInfo: Calculating dimension basis ...[128X[104X
    [4X[28X#I  LAGInfo: dimension basis finished ![128X[104X
    [4X[28X#I  LAGInfo: Weighted basis finished ![128X[104X
    [4X[28X#I  LAGInfo: Computing the augmentation ideal filtration...[128X[104X
    [4X[28X#I  LAGInfo: Filtration finished ![128X[104X
    [4X[28X#I  LAGInfo: finished, converting to PcGroup[128X[104X
    [4X[28X<pc group of size 128 with 7 generators>     [128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
