  
  [1m[4m[31m5. Crossed products[0m
  
  The package [1mWedderga[0m provides functions to construct crossed products over a
  group  with  coefficients in an associative ring with identity, and with the
  multiplication  determined  by  a  given  action  and  twisting (see [1m7.6[0m for
  definitions). This can be done using the function [1m[34mCrossedProduct[0m ([1m5.1-1[0m).
  
  Note  that  this function does not check the associativity conditions, so in
  fact  it  is the NC-version of itself, and its output will be always assumed
  to  be  associative.  For  all  crossed  products  that  appear  in [1mWedderga[0m
  algorithms  their  associativity  follows from theoretical arguments, so the
  usage of NC-method in the package is safe. If the user will try to construct
  a  crossed product with his own action and twisting, he/she should check the
  associativity  conditions himself/herself to make it sure that the result is
  correct.
  
  
  [1m[4m[31m5.1 Construction of crossed products[0m
  
  [1m[4m[31m5.1-1 CrossedProduct[0m
  
  [1m[34m> CrossedProduct( [0m[22m[34mR, G, act, twist[0m[1m[34m ) ______________________________[0mattribute
  [1mReturns:[0m  Ring in the category [22m[32mIsCrossedProduct[0m.
  
  The input should be formed by:
  
  * an associative ring [22m[34mR[0m,
  
  * a group [22m[34mG[0m,
  
  *  a  function  [22m[34mact(RG,g)[0m  on  two  arguments: the crossed product [22m[34mRG[0m and an
  element  [22m[34mg[0m  in  G. It must return a mapping from [22m[34mR[0m to [22m[34mR[0m which can be applied
  via the "[22m[32m\^[0m" operation, and
  
  *  a function [22m[34mtwist(RG,g,h)[0m on three arguments: the crossed product [22m[34mRG[0m and a
  pair of elements of [22m[34mG[0m. It must return an invertible element of [22m[34mR[0m.
  
  Returns  the  crossed  product  of  [22m[34mG[0m  over  the  ring [22m[34mR[0m with action [22m[34mact[0m and
  twisting [22m[34mtwist[0m.
  
  The  resulting  crossed  product  belongs  to the category [22m[32mIsCrossedProduct[0m,
  which is defined as a subcategory of [22m[32mIsFLMLORWithOne[0m.
  
  An example of the trivial action:
  
  [22m[35m-----------------------------  Log  ------------------------------[0m
    [22m[35mact := function(RG,a)[0m
    [22m[35m    return IdentityMapping( LeftActingDomain( RG ) );[0m
    [22m[35mend;[0m
  [22m[35m------------------------------------------------------------------[0m
  
  and the trivial twisting:
  
  [22m[35m-----------------------------  Log  ------------------------------[0m
    [22m[35mtwist := function( RG , g, h )[0m
    [22m[35m    return One( LeftActingDomain( RG ) );[0m
    [22m[35mend;[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Let  n  be  a  positive  integer  and xi_n an n-th complex primitive root of
  unity. The natural action of the group of units of Z_n, the ring of integers
  modulo n, on Q (xi_n) can be defined as follows:
  
  [22m[35m-----------------------------  Log  ------------------------------[0m
    [22m[35mact := function(RG,a)[0m
    [22m[35m    return ANFAutomorhism( LeftActingDomain( RG ) , Int( a ) );[0m
    [22m[35mend;[0m
  [22m[35m------------------------------------------------------------------[0m
  
  In  the  following example one constructs the Hamiltonian quaternion algebra
  over the rationals as a crossed products of the group of units of the cyclic
  group of order 2 over Q (i)=GaussianRationals. One realizes the cyclic group
  of  order  2  as  the  group  of  units  of Z / 4 Z and one uses the natural
  isomorphism Z / 4 Z -> Gal( Q (i)/ Q ) to describe the action.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> R := GaussianRationals;[0m
    [22m[35mGaussianRationals[0m
    [22m[35mgap> G := Units( ZmodnZ(4) );[0m
    [22m[35m<group with 1 generators>[0m
    [22m[35mgap> act := function(RG,g)[0m
    [22m[35m> return ANFAutomorphism( LeftActingDomain(RG), Int(g) );[0m
    [22m[35m> end;[0m
    [22m[35mfunction( RG, g ) ... end[0m
    [22m[35mgap> twist1 := function( RG, g, h )[0m
    [22m[35m> if IsOne(g) or IsOne(h) then[0m
    [22m[35m>    return One(LeftActingDomain(RG));[0m
    [22m[35m> else[0m
    [22m[35m>    return -One(LeftActingDomain(RG));[0m
    [22m[35m> fi;[0m
    [22m[35m> end;[0m
    [22m[35mfunction( RG, g, h ) ... end[0m
    [22m[35mgap> RG := CrossedProduct( R, G, act, twist1 );[0m
    [22m[35m<crossed product over GaussianRationals of a group of size 2>[0m
    [22m[35mgap> i := E(4) * One(G)^Embedding(G,RG); [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))[0m
    [22m[35mgap> j := ZmodnZObj(3,4)^Embedding(G,RG); [0m
    [22m[35m(ZmodnZObj( 3, 4 ))*(1)[0m
    [22m[35mgap> i^2;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-1)[0m
    [22m[35mgap> j^2;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-1)[0m
    [22m[35mgap> i*j+j*i;  [0m
    [22m[35m<zero> of ...[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  One can construct the following generalized quaternion algebra with the same
  action and a different twisting
  
  \[
       \Q (i,j|i^2=-1,j^2=-3,ji=-ij)
  \]
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> twist2:=function(RG,g,h)[0m
    [22m[35m> if IsOne(g) or IsOne(h) then[0m
    [22m[35m>     return One(LeftActingDomain( RG ));[0m
    [22m[35m> else[0m
    [22m[35m>     return -3*One(LeftActingDomain( RG ));[0m
    [22m[35m> fi;[0m
    [22m[35m> end;[0m
    [22m[35mfunction( RG, g, h ) ... end[0m
    [22m[35mgap> RG := CrossedProduct( R, G, act, twist2 );  [0m
    [22m[35m<crossed product over GaussianRationals of a group of size 2>[0m
    [22m[35mgap> i := E(4) * One(G)^Embedding(G,RG); [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))[0m
    [22m[35mgap> j := ZmodnZObj(3,4)^Embedding(G,RG);  [0m
    [22m[35m(ZmodnZObj( 3, 4 ))*(1)[0m
    [22m[35mgap> i^2;                           [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-1)[0m
    [22m[35mgap> j^2;                                [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-3)[0m
    [22m[35mgap> i*j+j*i;                       [0m
    [22m[35m<zero> of ...[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  In  the  following  example  one  shows  how  to  construct  the Hamiltonian
  quaternion  algebra  over  the  rationals using the rationals as coefficient
  ring and the Klein group as the underlying group.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> C2 := CyclicGroup(2);[0m
    [22m[35m<pc group of size 2 with 1 generators>[0m
    [22m[35mgap> G := DirectProduct(C2,C2);[0m
    [22m[35m<pc group of size 4 with 2 generators>[0m
    [22m[35mgap> act := function(RG,a)[0m
    [22m[35m>     return IdentityMapping( LeftActingDomain(RG));[0m
    [22m[35m> end;[0m
    [22m[35mfunction( RG, a ) ... end[0m
    [22m[35mgap> twist := function( RG, g , h )[0m
    [22m[35m> local one,g1,g2,h1,h2,G;[0m
    [22m[35m> G := UnderlyingMagma( RG );[0m
    [22m[35m> one := One( C2 );[0m
    [22m[35m> g1 := Image( Projection(G,1), g );[0m
    [22m[35m> g2 := Image( Projection(G,2), g );[0m
    [22m[35m> h1 := Image( Projection(G,1), h );[0m
    [22m[35m> h2 := Image( Projection(G,2), h );[0m
    [22m[35m> if g = One( G ) or h = One( G ) then return 1;[0m
    [22m[35m>   elif IsOne(g1) and not IsOne(g2) and not IsOne(h1) and not IsOne(h2)[0m
    [22m[35m>     then return 1;[0m
    [22m[35m>   elif not IsOne(g1) and IsOne(g2) and IsOne(h1) and not IsOne(h2)[0m
    [22m[35m>     then return 1;[0m
    [22m[35m>   elif not IsOne(g1) and not IsOne(g2) and not IsOne(h1) and IsOne(h2)[0m
    [22m[35m>     then return 1;[0m
    [22m[35m>   else return -1;[0m
    [22m[35m> fi;[0m
    [22m[35m> end;[0m
    [22m[35mfunction( RG, g, h ) ... end[0m
    [22m[35mgap> HQ := CrossedProduct( Rationals, G, act, twist );[0m
    [22m[35m<crossed product over Rationals of a group of size 4>[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Changing the rationals by the integers as coefficient ring one can construct
  the Hamiltonian quaternion ring.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> HZ := CrossedProduct( Integers, G, act, twist );[0m
    [22m[35m<crossed product over Integers of a group of size 4>[0m
    [22m[35mgap> i := GeneratorsOfGroup(G)[1]^Embedding(G,HZ); [0m
    [22m[35m(f1)*(1)[0m
    [22m[35mgap> j := GeneratorsOfGroup(G)[2]^Embedding(G,HZ);[0m
    [22m[35m(f2)*(1)[0m
    [22m[35mgap> i^2;[0m
    [22m[35m(<identity> of ...)*(-1)[0m
    [22m[35mgap> j^2; [0m
    [22m[35m(<identity> of ...)*(-1)[0m
    [22m[35mgap> i*j+j*i;                                      [0m
    [22m[35m<zero> of ...[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  One  can  extract  the  arguments  used  for the construction of the crossed
  product using the following attributes:
  
  * [22m[32mLeftActingDomain[0m for the coefficient ring.
  
  * [22m[32mUnderlyingMagma[0m for the underlying group.
  
  * [22m[32mActionForCrossedProduct[0m for the action.
  
  * [22m[32mTwistingForCrossedProduct[0m for the twisting.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m  [0m
    [22m[35mgap> LeftActingDomain(HZ);[0m
    [22m[35mIntegers[0m
    [22m[35mgap> G:=UnderlyingMagma(HZ);[0m
    [22m[35m<pc group of size 4 with 2 generators>[0m
    [22m[35mgap> ac := ActionForCrossedProduct(HZ);[0m
    [22m[35mfunction( RG, a ) ... end[0m
    [22m[35mgap> List( G , x -> ac( HZ, x ) );[0m
    [22m[35m[ IdentityMapping( Integers ), IdentityMapping( Integers ),[0m
    [22m[35m  IdentityMapping( Integers ), IdentityMapping( Integers ) ][0m
    [22m[35mgap> tw := TwistingForCrossedProduct( HZ );[0m
    [22m[35mfunction( RG, g, h ) ... end[0m
    [22m[35mgap> List( G, x -> List( G , y -> tw( HZ, x, y ) ) );[0m
    [22m[35m[ [ 1, 1, 1, 1 ], [ 1, -1, -1, 1 ], [ 1, 1, -1, -1 ], [ 1, -1, 1, -1 ] ]  [0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Some   more   examples  of  crossed  products  coming  from  the  [22m[36mWedderburn
  decomposition[0m ([1m7.3[0m) of group algebras.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> G := SmallGroup(32,50);[0m
    [22m[35m<pc group of size 32 with 5 generators>[0m
    [22m[35mgap> A := SimpleAlgebraByCharacter( GroupRing(Rationals,G), Irr(G)[17]) ;[0m
    [22m[35m( <crossed product with center Rationals over GaussianRationals of a group of \[0m
    [22m[35msize 2>^[ 2, 2 ] )[0m
    [22m[35mgap> SimpleAlgebraByCharacterInfo( GroupRing(Rationals,G), Irr(G)[17]) ;[0m
    [22m[35m[ 2, Rationals, 4, [ 2, 3, 2 ] ][0m
    [22m[35mgap> B := LeftActingDomain(A);[0m
    [22m[35m<crossed product with center Rationals over GaussianRationals of a group of si\[0m
    [22m[35mze 2>[0m
    [22m[35mgap> L := LeftActingDomain(B);[0m
    [22m[35mGaussianRationals[0m
    [22m[35mgap> H := UnderlyingMagma( B );[0m
    [22m[35m<group of size 2 with 2 generators>[0m
    [22m[35mgap> Elements(H);[0m
    [22m[35m[ ZmodnZObj( 1, 4 ), ZmodnZObj( 3, 4 ) ][0m
    [22m[35mgap> i := E(4) * One(H)^Embedding(H,B);[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))[0m
    [22m[35mgap> j := ZmodnZObj(3,4)^Embedding(H,B);[0m
    [22m[35m(ZmodnZObj( 3, 4 ))*(1)[0m
    [22m[35mgap> i^2;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-1)[0m
    [22m[35mgap> j^2;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(-1)[0m
    [22m[35mgap> i*j+j*i;[0m
    [22m[35m<zero> of ...[0m
    [22m[35mgap> ac := ActionForCrossedProduct( B );[0m
    [22m[35mfunction( RG, a ) ... end[0m
    [22m[35mgap> tw := TwistingForCrossedProduct( B );[0m
    [22m[35mfunction( RG, a, b ) ... end[0m
    [22m[35mgap> List( H , x -> ac( B, x ) );[0m
    [22m[35m[ IdentityMapping( GaussianRationals ), ANFAutomorphism( GaussianRationals,[0m
    [22m[35m    3 ) ][0m
    [22m[35mgap> List( H , x -> List( H , y -> tw( B, x, y ) ) );[0m
    [22m[35m[ [ 1, 1 ], [ 1, -1 ] ][0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> QG:=GroupRing( Rationals, SmallGroup(24,3) );;[0m
    [22m[35mgap> WedderburnDecomposition(QG);[0m
    [22m[35m[ Rationals, CF(3), ( Rationals^[ 3, 3 ] ),[0m
    [22m[35m  <crossed product with center Rationals over GaussianRationals of a group of \[0m
    [22m[35msize 2>, <crossed product with center CF(3) over AsField( CF(3), CF([0m
    [22m[35m    12) ) of a group of size 2> ][0m
    [22m[35mgap> R:=WedderburnDecomposition( QG )[4];[0m
    [22m[35m<crossed product with center Rationals over GaussianRationals of a group of si\[0m
    [22m[35mze 2>[0m
    [22m[35mgap> IsCrossedProduct(R);[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsAlgebra(R);[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsRing(R);       [0m
    [22m[35mtrue[0m
    [22m[35mgap> LeftActingDomain( R );[0m
    [22m[35mGaussianRationals[0m
    [22m[35mgap> AsList( UnderlyingMagma( R ) );[0m
    [22m[35m[ ZmodnZObj( 1, 4 ), ZmodnZObj( 3, 4 ) ][0m
    [22m[35mgap> Print( ActionForCrossedProduct( R ) ); Print("\n");[0m
    [22m[35mfunction ( RG, a )[0m
    [22m[35m    local  cond, redu;[0m
    [22m[35m    cond := OperationRecord( RG ).cond;[0m
    [22m[35m    redu := OperationRecord( RG ).redu;[0m
    [22m[35m    return[0m
    [22m[35m     ANFAutomorphism( CF( cond ), Int( PreImagesRepresentative( redu, a ) ) );[0m
    [22m[35mend[0m
    [22m[35mgap> Print( TwistingForCrossedProduct( R ) ); Print("\n");                     [0m
    [22m[35mfunction ( RG, a, b )[0m
    [22m[35m    local  orderroot, cocycle;[0m
    [22m[35m    orderroot := OperationRecord( RG ).orderroot;[0m
    [22m[35m    cocycle := OperationRecord( RG ).cocycle;[0m
    [22m[35m    return E( orderroot ) ^ Int( cocycle( a, b ) );[0m
    [22m[35mend[0m
    [22m[35mgap> IsAssociative(R);[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsFinite(R);           [0m
    [22m[35mfalse[0m
    [22m[35mgap> IsFiniteDimensional(R);[0m
    [22m[35mtrue[0m
    [22m[35mgap> AsList(Basis(R));[0m
    [22m[35m[ (ZmodnZObj( 1, 4 ))*(1), (ZmodnZObj( 3, 4 ))*(1) ] [0m
    [22m[35mgap> GeneratorsOfLeftOperatorRingWithOne(R);[0m
    [22m[35m[ (ZmodnZObj( 1, 4 ))*(1), (ZmodnZObj( 3, 4 ))*(1) ][0m
    [22m[35mgap> One(R);[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(1)[0m
    [22m[35mgap> Zero(R);[0m
    [22m[35m<zero> of ...[0m
    [22m[35mgap> Characteristic(R);[0m
    [22m[35m0[0m
    [22m[35mgap> CenterOfCrossedProduct(R);[0m
    [22m[35mRationals[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Next  example  shows  how  one can use [1m[34mCrossedProduct[0m to produce generalized
  quaternion  algebras.  Note that one can construct quaternion algebras using
  [1mGAP[0m function [22m[32mQuaternionAlgebra[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> Quat := function(R,a,b)[0m
    [22m[35m>[0m
    [22m[35m> local G,act,twist;[0m
    [22m[35m>[0m
    [22m[35m> if not(a in R and b in R and a <> Zero(R) and b <> Zero(R) ) then[0m
    [22m[35m> Error("<a>  and <b> must be non zero elements of <R>!!!");[0m
    [22m[35m> fi;[0m
    [22m[35m>[0m
    [22m[35m> G := SmallGroup(4,2);[0m
    [22m[35m>[0m
    [22m[35m> act := function(RG,a)[0m
    [22m[35m>     return IdentityMapping( LeftActingDomain(RG));[0m
    [22m[35m> end;[0m
    [22m[35m>[0m
    [22m[35m> twist := function( RG, g , h )[0m
    [22m[35m> local one,g1,g2;[0m
    [22m[35m> one := One(G);[0m
    [22m[35m> g1 := G.1;[0m
    [22m[35m> g2 := G.2;[0m
    [22m[35m> if   g = one or h = one then[0m
    [22m[35m>   return One(R);[0m
    [22m[35m> elif g = g1 then[0m
    [22m[35m>   if h = g2 then[0m
    [22m[35m>     return One(R);[0m
    [22m[35m>   else[0m
    [22m[35m>     return a;[0m
    [22m[35m>   fi;[0m
    [22m[35m> elif g = g2 then[0m
    [22m[35m>   if h = g1 then[0m
    [22m[35m>     return -One(R);[0m
    [22m[35m>   elif h=g2 then[0m
    [22m[35m>     return b;[0m
    [22m[35m>   else[0m
    [22m[35m>     return -b;[0m
    [22m[35m>   fi;[0m
    [22m[35m> else[0m
    [22m[35m>   if h = g1 then[0m
    [22m[35m>     return -b;[0m
    [22m[35m>   elif h=g2 then[0m
    [22m[35m>     return b;[0m
    [22m[35m>   else[0m
    [22m[35m>     return -a*b;[0m
    [22m[35m>   fi;[0m
    [22m[35m> fi;[0m
    [22m[35m> end;[0m
    [22m[35m> return CrossedProduct(R,G,act,twist);[0m
    [22m[35m> end;[0m
    [22m[35mfunction( R, a, b ) ... end[0m
    [22m[35mgap> HQ := Quat(Rationals,2,3);[0m
    [22m[35m<crossed product over Rationals of a group of size 4>[0m
    [22m[35mgap> G := UnderlyingMagma(HQ);[0m
    [22m[35m<pc group of size 4 with 2 generators>[0m
    [22m[35mgap> tw := TwistingForCrossedProduct( HQ );[0m
    [22m[35mfunction( RG, g, h ) ... end[0m
    [22m[35mgap> List( G, x -> List( G, y -> tw( HQ, x, y ) ) );[0m
    [22m[35m[ [ 1, 1, 1, 1 ], [ 1, 3, -1, -3 ], [ 1, 1, 2, 2 ], [ 1, 3, -3, -6 ] ][0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m5.2 Crossed product elements and their properties[0m
  
  [1m[4m[31m5.2-1 ElementOfCrossedProduct[0m
  
  [1m[34m> ElementOfCrossedProduct( [0m[22m[34mFam, zerocoeff, coeffs, elts[0m[1m[34m ) __________[0mproperty
  
  Returns the element m_1*c_1 + ... + m_n*c_n of a crossed product, where [22m[34melts[0m
  =  [  m_1, m_2, ..., m_n ] is a list of magma elements, [22m[34mcoeffs[0m = [ c_1, c_2,
  ...,  c_n  ]  is  a  list of coefficients. The output belongs to the crossed
  product  whose  elements  lie  in  the  family  [22m[34mFam[0m. The zero element of the
  coefficient ring containing c_i must be given as [22m[34mzerocoeff[0m, and later can be
  obtained using [22m[32mZeroCoefficient[0m.
  
  The  output  will  be  in the category [22m[32mIsElementOfCrossedProduct[0m, which is a
  subcategory  of  [22m[32mIsRingElementWithInverse[0m.  It  will  have  the presentation
  [22m[32mIsCrossedProductObjDefaultRep[0m.
  
  Similarly  to  magma  rings,  one  can  obtain  the list of coefficients and
  elements with [22m[32mCoefficientsAndMagmaElements[0m .
  
  Also  note from the example below and several other examples in this chapter
  that  instead of [22m[32mElementOfCrossedProduct[0m one can use [22m[32mEmbedding[0m to embed into
  the  crossed  product elements of the coefficient ring and of the underlying
  magma.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> QG := GroupRing( Rationals, SmallGroup(24,3) );[0m
    [22m[35m<algebra-with-one over Rationals, with 4 generators>[0m
    [22m[35mgap> R := WedderburnDecomposition( QG )[4];[0m
    [22m[35m<crossed product with center Rationals over GaussianRationals of a group of si\[0m
    [22m[35mze 2>[0m
    [22m[35mgap> H := UnderlyingMagma( R );;[0m
    [22m[35mgap> fam := ElementsFamily( FamilyObj( R ) );;[0m
    [22m[35mgap> g := ElementOfCrossedProduct( fam, 0, [ 1, E(4) ], AsList(H) );[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(1)+(ZmodnZObj( 3, 4 ))*(E(4))[0m
    [22m[35mgap> CoefficientsAndMagmaElements( g );    [0m
    [22m[35m[ ZmodnZObj( 1, 4 ), 1, ZmodnZObj( 3, 4 ), E(4) ][0m
    [22m[35mgap> t := List( H, x -> x^Embedding( H, R ) );[0m
    [22m[35m[ (ZmodnZObj( 1, 4 ))*(1), (ZmodnZObj( 3, 4 ))*(1) ][0m
    [22m[35mgap> t[1] + t[2]*E(4);  [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(1)+(ZmodnZObj( 3, 4 ))*(E(4))[0m
    [22m[35mgap> g = t[1] + E(4)*t[2];[0m
    [22m[35mfalse[0m
    [22m[35mgap> g = t[1] + t[2]*E(4);[0m
    [22m[35mtrue[0m
    [22m[35mgap> h := ElementOfCrossedProduct( fam, 0, [ E(4), 1 ], AsList(H) );     [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))+(ZmodnZObj( 3, 4 ))*(1)[0m
    [22m[35mgap> g+h;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(1+E(4))+(ZmodnZObj( 3, 4 ))*(1+E(4))[0m
    [22m[35mgap> g*E(4);[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))+(ZmodnZObj( 3, 4 ))*(-1)[0m
    [22m[35mgap> E(4)*g;     [0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(E(4))+(ZmodnZObj( 3, 4 ))*(1)[0m
    [22m[35mgap> g*h;[0m
    [22m[35m(ZmodnZObj( 1, 4 ))*(2*E(4))[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
