<!-- ********************idempot******************** -->

<Chapter Label="Idemp">
<Heading>Idempotents</Heading>

<Section Label="IdempotIrr">
<Heading>Computing idempotents from character table</Heading>


<ManSection>
   <Oper Name="PrimitiveCentralIdempotentsByCharacterTable" 
         Arg="FG" />
   <Returns>
         A list of group algebra elements.
   </Returns>         
   <Description>
         The input <A>FG</A> should be a semisimple group algebra. 
         <P/>
   
         Returns the list of primitive central idempotents of <A>FG</A> 
         using the character table of <M>G</M> (<Ref Sect="Idempotents" />). 
         
<Example>
<![CDATA[
gap> QS3 := GroupRing( Rationals, SymmetricGroup(3) );;                 
gap> PrimitiveCentralIdempotentsByCharacterTable( QS3 );
[ (1/6)*()+(-1/6)*(2,3)+(-1/6)*(1,2)+(1/6)*(1,2,3)+(1/6)*(1,3,2)+(-1/6)*(1,3),
  (2/3)*()+(-1/3)*(1,2,3)+(-1/3)*(1,3,2), (1/6)*()+(1/6)*(2,3)+(1/6)*(1,2)+(1/
    6)*(1,2,3)+(1/6)*(1,3,2)+(1/6)*(1,3) ]
gap> QG:=GroupRing( Rationals , SmallGroup(24,3) );
<algebra-with-one over Rationals, with 4 generators>
gap> FG:=GroupRing( CF(3) , SmallGroup(24,3) );
<algebra-with-one over CF(3), with 4 generators>
gap> pciQG := PrimitiveCentralIdempotentsByCharacterTable(QG);;
gap> pciFG := PrimitiveCentralIdempotentsByCharacterTable(FG);;
gap> Length(pciQG);
5
gap> Length(pciFG);
7
]]>
</Example>
         
   </Description>
</ManSection>

</Section>

<!-- ********************************************************* -->

<Section Label="IdempotTesting">
<Heading>Testing lists of idempotents for completeness</Heading>

<ManSection>
   <Oper Name="IsCompleteSetOfOrthogonalIdempotents" 
         Arg="R list" />
   <Description>
         The input should be formed by a unital ring <A>R</A> 
         and a list <A>list</A> of elements of <A>R</A>. <P/>
   
         Returns <K>true</K> if the list <A>list</A> is a complete list 
         of orthogonal idempotents of <A>R</A>.
         That is, the output is <K>true</K> provided the following conditions are satisfied:<P/>
         
         <M>\cdot</M> The sum of the elements of <A>list</A> is the 
         identity of <A>R</A>, <P/>
         
         <M>\cdot</M> <M>e^2=e</M>, for every <M>e</M> in <A>list</A> and <P/>
         
         <M>\cdot</M> <M>e*f=0</M>, if <M>e</M> and <M>f</M> are elements in different 
         positions of <A>list</A>. <P/>
         
         No claim is made on the idempotents being central or primitive.
         <P/>
         
         Note that the if a non-zero element <M>t</M> of <A>R</A> 
         appears in two different positions of <A>list</A> 
         then the output is <K>false</K>, and that the list <A>list</A>
         must not contain zeroes.

<Example>
<![CDATA[
gap> QS5 := GroupRing( Rationals, SymmetricGroup(5) );;
gap> idemp := PrimitiveCentralIdempotentsByCharacterTable( QS5 );;
gap> IsCompleteSetOfOrthogonalIdempotents( QS5, idemp );
true
gap> IsCompleteSetOfOrthogonalIdempotents( QS5, [ One( QS5 ) ] );
true
gap> IsCompleteSetOfOrthogonalIdempotents( QS5, [ One( QS5 ), One( QS5 ) ] );
false
]]>
</Example>

   </Description>
</ManSection>

</Section>

<!-- ********************************************************* -->

<Section Label="IdempotShoda">

<Heading>Idempotents from Shoda pairs</Heading>


<ManSection>
   <Attr Name="PrimitiveCentralIdempotentsByESSP" 
         Arg="QG"  
         Comm="The PCIs realizable by ESSPs" />
   <Returns>
         A list of group algebra elements.
   </Returns>         
   <Description>
         The input <A>QG</A> should be a semisimple rational group algebra 
         of a finite group <M>G</M>. <P/>
         
         The output is the list of primitive central idempotents of the group algebra 
         <A>QG</A> realizable by extremely strong Shoda pairs (<Ref Sect="ESSPDef" />) 
         of <M>G</M>. <P/>
         
         If the list of primitive central idempotents given by the output is 
         not complete (i.e. if the group <M>G</M> is not <E> normally monomial</E>
         (<Ref Sect="NorMon" />)) then a warning is displayed.
         
<Example>
<![CDATA[
gap> QG:=GroupRing( Rationals, DihedralGroup(16) );;  
gap> PrimitiveCentralIdempotentsByESSP( QG );
[ (1/16)*<identity> of ...+(1/16)*f1+(1/16)*f2+(1/16)*f3+(1/16)*f4+(1/
    16)*f1*f2+(1/16)*f1*f3+(1/16)*f1*f4+(1/16)*f2*f3+(1/16)*f2*f4+(1/
    16)*f3*f4+(1/16)*f1*f2*f3+(1/16)*f1*f2*f4+(1/16)*f1*f3*f4+(1/
    16)*f2*f3*f4+(1/16)*f1*f2*f3*f4, (1/16)*<identity> of ...+(-1/16)*f1+(-1/
    16)*f2+(1/16)*f3+(1/16)*f4+(1/16)*f1*f2+(-1/16)*f1*f3+(-1/16)*f1*f4+(-1/
    16)*f2*f3+(-1/16)*f2*f4+(1/16)*f3*f4+(1/16)*f1*f2*f3+(1/16)*f1*f2*f4+(-1/
    16)*f1*f3*f4+(-1/16)*f2*f3*f4+(1/16)*f1*f2*f3*f4, 
  (1/16)*<identity> of ...+(-1/16)*f1+(1/16)*f2+(1/16)*f3+(1/16)*f4+(-1/
    16)*f1*f2+(-1/16)*f1*f3+(-1/16)*f1*f4+(1/16)*f2*f3+(1/16)*f2*f4+(1/
    16)*f3*f4+(-1/16)*f1*f2*f3+(-1/16)*f1*f2*f4+(-1/16)*f1*f3*f4+(1/
    16)*f2*f3*f4+(-1/16)*f1*f2*f3*f4, (1/16)*<identity> of ...+(1/16)*f1+(-1/
    16)*f2+(1/16)*f3+(1/16)*f4+(-1/16)*f1*f2+(1/16)*f1*f3+(1/16)*f1*f4+(-1/
    16)*f2*f3+(-1/16)*f2*f4+(1/16)*f3*f4+(-1/16)*f1*f2*f3+(-1/16)*f1*f2*f4+(1/
    16)*f1*f3*f4+(-1/16)*f2*f3*f4+(-1/16)*f1*f2*f3*f4, 
  (1/4)*<identity> of ...+(-1/4)*f3+(1/4)*f4+(-1/4)*f3*f4, 
  (1/2)*<identity> of ...+(-1/2)*f4 ]
gap> QG := GroupRing( Rationals, SmallGroup(24,12) );;
gap> PrimitiveCentralIdempotentsByESSP( QG );
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input! 
[ (1/24)*<identity> of ...+(1/24)*f1+(1/24)*f2+(1/24)*f3+(1/24)*f4+(1/
    24)*f1*f2+(1/24)*f1*f3+(1/24)*f1*f4+(1/24)*f2^2+(1/24)*f2*f3+(1/
    24)*f2*f4+(1/24)*f3*f4+(1/24)*f1*f2^2+(1/24)*f1*f2*f3+(1/24)*f1*f2*f4+(1/
    24)*f1*f3*f4+(1/24)*f2^2*f3+(1/24)*f2^2*f4+(1/24)*f2*f3*f4+(1/24)*f1*f2^
    2*f3+(1/24)*f1*f2^2*f4+(1/24)*f1*f2*f3*f4+(1/24)*f2^2*f3*f4+(1/24)*f1*f2^
    2*f3*f4, (1/24)*<identity> of ...+(-1/24)*f1+(1/24)*f2+(1/24)*f3+(1/
    24)*f4+(-1/24)*f1*f2+(-1/24)*f1*f3+(-1/24)*f1*f4+(1/24)*f2^2+(1/
    24)*f2*f3+(1/24)*f2*f4+(1/24)*f3*f4+(-1/24)*f1*f2^2+(-1/24)*f1*f2*f3+(-1/
    24)*f1*f2*f4+(-1/24)*f1*f3*f4+(1/24)*f2^2*f3+(1/24)*f2^2*f4+(1/
    24)*f2*f3*f4+(-1/24)*f1*f2^2*f3+(-1/24)*f1*f2^2*f4+(-1/24)*f1*f2*f3*f4+(1/
    24)*f2^2*f3*f4+(-1/24)*f1*f2^2*f3*f4, (1/6)*<identity> of ...+(-1/12)*f2+(
    1/6)*f3+(1/6)*f4+(-1/12)*f2^2+(-1/12)*f2*f3+(-1/12)*f2*f4+(1/6)*f3*f4+(-1/
    12)*f2^2*f3+(-1/12)*f2^2*f4+(-1/12)*f2*f3*f4+(-1/12)*f2^2*f3*f4 ]
]]>
</Example>
         
   </Description>
</ManSection>

<Heading>Idempotents from Shoda pairs</Heading>


<ManSection>
   <Attr Name="PrimitiveCentralIdempotentsByStrongSP" 
         Arg="FG"  
         Comm="The PCIs realizable by SSPs" />
   <Returns>
         A list of group algebra elements.
   </Returns>         
   <Description>
         The input <A>FG</A> should be a semisimple group algebra 
         of a finite group <M>G</M> whose coefficient field 
         <M>F</M> is either a finite field or the field <M>&QQ;</M> 
         of rationals. <P/>
         
         If <M> F = &QQ; </M> then the output is the list of primitive central 
         idempotents of the group algebra <A>FG</A> realizable by strong
         Shoda pairs (<Ref Sect="SSPDef" />) of <M>G</M>. <P/>
         
         If <M>F</M> is a finite field then the output is the list of primitive
         central idempotents of <A>FG</A> realizable by strong Shoda pairs 
         <M>(K,H)</M> of <M>G</M> and <M>q</M>-cyclotomic classes modulo the 
         index of <M>H</M> in <M>K</M> (<Ref Sect="CyclotomicClass" />). <P/>
         
         If the list of primitive central idempotents given by the output is 
         not complete (i.e. if the group <M>G</M> is not <E>strongly monomial</E>
         (<Ref Sect="StMon" />)) then a warning is displayed.
         
<Example>
<![CDATA[
gap> QG:=GroupRing( Rationals, AlternatingGroup(4) );;           
gap> PrimitiveCentralIdempotentsByStrongSP( QG );
[ (1/12)*()+(1/12)*(2,3,4)+(1/12)*(2,4,3)+(1/12)*(1,2)(3,4)+(1/12)*(1,2,3)+(1/
    12)*(1,2,4)+(1/12)*(1,3,2)+(1/12)*(1,3,4)+(1/12)*(1,3)(2,4)+(1/12)*
    (1,4,2)+(1/12)*(1,4,3)+(1/12)*(1,4)(2,3),
  (1/6)*()+(-1/12)*(2,3,4)+(-1/12)*(2,4,3)+(1/6)*(1,2)(3,4)+(-1/12)*(1,2,3)+(
    -1/12)*(1,2,4)+(-1/12)*(1,3,2)+(-1/12)*(1,3,4)+(1/6)*(1,3)(2,4)+(-1/12)*
    (1,4,2)+(-1/12)*(1,4,3)+(1/6)*(1,4)(2,3),
  (3/4)*()+(-1/4)*(1,2)(3,4)+(-1/4)*(1,3)(2,4)+(-1/4)*(1,4)(2,3) ]
gap> QG := GroupRing( Rationals, SmallGroup(24,3) );;
gap> PrimitiveCentralIdempotentsByStrongSP( QG );;
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input! 
gap> FG := GroupRing( GF(2), Group((1,2,3)) );;
gap> PrimitiveCentralIdempotentsByStrongSP( FG );
[ (Z(2)^0)*()+(Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2), 
  (Z(2)^0)*(1,2,3)+(Z(2)^0)*(1,3,2) ]
gap> FG := GroupRing( GF(5), SmallGroup(24,3) );; 
gap> PrimitiveCentralIdempotentsByStrongSP( FG );;
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input! 
]]>
</Example>
         
   </Description>
</ManSection>


<ManSection>
   <Func Name="PrimitiveCentralIdempotentsBySP" 
         Arg="QG"  
         Comm="The list of PCIs of QG realizable by Shoda pairs" />
   <Returns>
         A list of group algebra elements.
   </Returns>         
   <Description>
         The input should be a rational group algebra of a finite group <M>G</M>. <P/>
   
         Returns a list containing all the primitive central idempotents <M>e</M>
         of the rational group algebra <A>QG</A> such that <M>\chi(e)\ne 0</M> 
         for some irreducible monomial character <M>\chi</M> of <M>G</M>. <P/>
          
         The output is the list of all primitive central idempotents of <A>QG</A>
         if and only if <M>G</M> is monomial, otherwise a warning message is displayed. 

<Example>
<![CDATA[
gap> QG := GroupRing( Rationals, SymmetricGroup(4) );
<algebra-with-one over Rationals, with 2 generators>
gap> pci:=PrimitiveCentralIdempotentsBySP( QG );
[ (1/24)*()+(1/24)*(3,4)+(1/24)*(2,3)+(1/24)*(2,3,4)+(1/24)*(2,4,3)+(1/24)*
    (2,4)+(1/24)*(1,2)+(1/24)*(1,2)(3,4)+(1/24)*(1,2,3)+(1/24)*(1,2,3,4)+(1/
    24)*(1,2,4,3)+(1/24)*(1,2,4)+(1/24)*(1,3,2)+(1/24)*(1,3,4,2)+(1/24)*
    (1,3)+(1/24)*(1,3,4)+(1/24)*(1,3)(2,4)+(1/24)*(1,3,2,4)+(1/24)*(1,4,3,2)+(
    1/24)*(1,4,2)+(1/24)*(1,4,3)+(1/24)*(1,4)+(1/24)*(1,4,2,3)+(1/24)*(1,4)
    (2,3), (1/24)*()+(-1/24)*(3,4)+(-1/24)*(2,3)+(1/24)*(2,3,4)+(1/24)*
    (2,4,3)+(-1/24)*(2,4)+(-1/24)*(1,2)+(1/24)*(1,2)(3,4)+(1/24)*(1,2,3)+(-1/
    24)*(1,2,3,4)+(-1/24)*(1,2,4,3)+(1/24)*(1,2,4)+(1/24)*(1,3,2)+(-1/24)*
    (1,3,4,2)+(-1/24)*(1,3)+(1/24)*(1,3,4)+(1/24)*(1,3)(2,4)+(-1/24)*
    (1,3,2,4)+(-1/24)*(1,4,3,2)+(1/24)*(1,4,2)+(1/24)*(1,4,3)+(-1/24)*(1,4)+(
    -1/24)*(1,4,2,3)+(1/24)*(1,4)(2,3), (3/8)*()+(-1/8)*(3,4)+(-1/8)*(2,3)+(
    -1/8)*(2,4)+(-1/8)*(1,2)+(-1/8)*(1,2)(3,4)+(1/8)*(1,2,3,4)+(1/8)*
    (1,2,4,3)+(1/8)*(1,3,4,2)+(-1/8)*(1,3)+(-1/8)*(1,3)(2,4)+(1/8)*(1,3,2,4)+(
    1/8)*(1,4,3,2)+(-1/8)*(1,4)+(1/8)*(1,4,2,3)+(-1/8)*(1,4)(2,3), 
  (3/8)*()+(1/8)*(3,4)+(1/8)*(2,3)+(1/8)*(2,4)+(1/8)*(1,2)+(-1/8)*(1,2)(3,4)+(
    -1/8)*(1,2,3,4)+(-1/8)*(1,2,4,3)+(-1/8)*(1,3,4,2)+(1/8)*(1,3)+(-1/8)*(1,3)
    (2,4)+(-1/8)*(1,3,2,4)+(-1/8)*(1,4,3,2)+(1/8)*(1,4)+(-1/8)*(1,4,2,3)+(-1/
    8)*(1,4)(2,3), (1/6)*()+(-1/12)*(2,3,4)+(-1/12)*(2,4,3)+(1/6)*(1,2)(3,4)+(
    -1/12)*(1,2,3)+(-1/12)*(1,2,4)+(-1/12)*(1,3,2)+(-1/12)*(1,3,4)+(1/6)*(1,3)
    (2,4)+(-1/12)*(1,4,2)+(-1/12)*(1,4,3)+(1/6)*(1,4)(2,3) ]
gap> IsCompleteSetOfPCIs(QG,pci);
true
gap> QS5 := GroupRing( Rationals, SymmetricGroup(5) );;
gap> pci:=PrimitiveCentralIdempotentsBySP( QS5 );;
Wedderga: Warning!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input!
gap> IsCompleteSetOfPCIs( QS5 , pci );
false
]]>
</Example>

The output of <Ref Func="PrimitiveCentralIdempotentsBySP" /> contains 
the output of <Ref Func="PrimitiveCentralIdempotentsByStrongSP" />, 
possibly properly.

<Example>
<![CDATA[
gap> QG := GroupRing( Rationals, SmallGroup(48,28) );;
gap> pci:=PrimitiveCentralIdempotentsBySP( QG );;
Wedderga: Warning!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input! 
gap> Length(pci);    
6
gap> spci:=PrimitiveCentralIdempotentsByStrongSP( QG );;  
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input! 
gap> Length(spci);
5
gap> IsSubset(pci,spci);          
true
gap> QG:=GroupRing(Rationals,SmallGroup(1000,86));
<algebra-with-one over Rationals, with 6 generators>
gap> IsCompleteSetOfPCIs( QG , PrimitiveCentralIdempotentsBySP(QG) );
true
gap> IsCompleteSetOfPCIs( QG , PrimitiveCentralIdempotentsByStrongSP(QG) );
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input!
false
]]>
</Example>

   </Description>
</ManSection>

</Section>

<Section Label="PI">
<Heading>Complete set of orthogonal primitive idempotents from Shoda pairs and cyclotomic classes</Heading>


<ManSection>
   <Oper Name="PrimitiveIdempotentsNilpotent" 
         Arg="FG,H,K,C,args"  
         Comm="The PIs realized by a SSP and a cyclotomic class for a nilpotent group G" />
   <Returns>
         A list of orthogonal primitive idempotents.
   </Returns>         
   <Description>
         The input <A>FG</A> should be a semisimple group algebra 
         of a finite nilpotent group <M>G</M> whose coefficient field 
         <M>F</M> is a finite field. 
         <A>H</A> and <A>K</A> should form a strong Shoda pair <M>(H,K)</M> of <M>G</M>.
         <A>args</A> is a list containing an epimorphism map <A>epi</A> from <M>N_G(K)</M> to <M>N_G(K)/K</M>
         and a generator <A>gq</A> of <M>H/K</M>.
         <M>C</M> is the <M>|F|</M>-cyclotomic class modulo <M>[H:K]</M> 
         (w.r.t. the generator <M>gq</M> of <M>H/K</M>) <P/>
         
         The output is a complete set of orthogonal primitive idempotents 
         of the simple algebra <M>FGe_C(G,H,K)</M> (<Ref Sect="TheoryPI" />). 
         
<Example>
<![CDATA[
gap> G:=DihedralGroup(8);; 
gap> F:=GF(3);;                     
gap> FG:=GroupRing(F,G);;
gap> H:=StrongShodaPairs(G)[5][1];
Group([ f1*f2*f3, f3 ])
gap> K:=StrongShodaPairs(G)[5][2];
Group([ f1*f2 ])
gap> N:=Normalizer(G,K); 
Group([ f1*f2*f3, f3 ])
gap> epi:=NaturalHomomorphismByNormalSubgroup(N,K);
[ f1*f2*f3, f3 ] -> [ f1, f1 ]
gap> QHK:=Image(epi,H); 
Group([ f1, f1 ])
gap> gq:=MinimalGeneratingSet(QHK)[1]; 
f1
gap> C:=CyclotomicClasses(Size(F),Index(H,K))[2];
[ 1 ]
gap> PrimitiveIdempotentsNilpotent(FG,H,K,C,[epi,gq]);
[ (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3)^0)*f1*f2+(Z(3))*f1*f2*f3, 
  (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3))*f1*f2+(Z(3)^0)*f1*f2*f3 ]
]]>
</Example>
         
   </Description>
</ManSection>


<ManSection>
   <Oper Name="PrimitiveIdempotentsTrivialTwisting" 
         Arg="FG,H,K,C,args"  
         Comm="The PIs realized by a SSP and a cyclotomic class for a simple component with trivial twisting" />
   <Returns>
         A list of orthogonal primitive idempotents.
   </Returns>         
   <Description>
         The input <A>FG</A> should be a semisimple group algebra 
         of a finite group <M>G</M> whose coefficient field 
         <M>F</M> is a finite field.
         <A>H</A> and <A>K</A> should form a strong Shoda pair <M>(H,K)</M> of <M>G</M>.
         <A>args</A> is a list containing an epimorphism map <A>epi</A> from <M>N_G(K)</M> to <M>N_G(K)/K</M>
         and a generator <A>gq</A> of <M>H/K</M>.
         <M>C</M> is the <M>|F|</M>-cyclotomic class modulo <M>[H:K]</M> 
         (w.r.t. the generator <M>gq</M> of <M>H/K</M>).
         The input parameters should be such that the simple component <M>FGe_C(G,H,K)</M> has a trivial twisting. <P/>
         
         The output is a complete set of orthogonal primitive idempotents 
         of the simple algebra <M>FGe_C(G,H,K)</M> (<Ref Sect="TheoryPI" />). 
         
<Example>
<![CDATA[
gap> G:=DihedralGroup(8);; 
gap> F:=GF(3);;                     
gap> FG:=GroupRing(F,G);;
gap> H:=StrongShodaPairs(G)[5][1];
Group([ f1*f2*f3, f3 ])
gap> K:=StrongShodaPairs(G)[5][2];
Group([ f1*f2 ])
gap> N:=Normalizer(G,K); 
Group([ f1*f2*f3, f3 ])
gap> epi:=NaturalHomomorphismByNormalSubgroup(N,K);
[ f1*f2*f3, f3 ] -> [ f1, f1 ]
gap> QHK:=Image(epi,H); 
Group([ f1, f1 ])
gap> gq:=MinimalGeneratingSet(QHK)[1]; 
f1
gap> C:=CyclotomicClasses(Size(F),Index(H,K))[2];
[ 1 ]
gap> PrimitiveIdempotentsTrivialTwisting(FG,H,K,C,[epi,gq]);
[ (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3)^0)*f1*f2+(Z(3))*f1*f2*f3, 
  (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3))*f1*f2+(Z(3)^0)*f1*f2*f3 ]
]]>
</Example>
         
   </Description>
</ManSection>


</Section>

</Chapter>

<!-- ********************************************************* -->

<!-- the following two sections were commented out by AK

<Section Label="IdempotSubgroups">
<Heading>Idempotents determined by subgroups</Heading>


<ManSection>
   <Oper Name="IdempotentBySubgroups" 
         Arg="QG K H"  
         Comm="Epsilon(QG,K,H)" />
   <Oper Name="IdempotentBySubgroups" 
         Arg="FG K H c"  
         Comm="Epsilon(G,K,H,C)" />
   <Returns>
         An idempotent of a group algebra.
   </Returns>         
   <Description>
        The versions with three input data computes <M>\varepsilon(K,H)</M>
        as an element of the rational group algebra <M>&QQ; G</M>, where <M>K</M>
        is a subgroup of <M>G</M> and <M>H</M> is a normal subgroup of <M>K</M>. 
        (see Section <Ref Sect="IdempotentsSbgps"/>). <P/>
                 
        The versions with three input data computes <M>\varepsilon_C(K,H)</M>
        as an element of the group algebra <M>FG</M>, where <M>F</M> is a finite 
        field of order <M>q</M> and <M>G</M> is a finite group of order coprime 
        with <M>q</M>. Moreover <M>K</M> should be a subgroup of <M>G</M>, 
        <M>H</M> a normal subgroup of <M>K</M>  such that <M>K/H</M> is cyclic 
        and <M>C</M> is a <M>q</M>-cyclotomic class module <M>[K:H]</M> 
        (see Section <Ref Sect="CyclotomicClass"/>).
        The cyclotomic class can be given either by the cyclotomic class itself 
        or by a representative, that is an integer.

<Example>
<![CDATA[
gap> G:=SymmetricGroup(5);;
gap> K:=Group([(1,2,3,4)]);;
gap> H:=Group( () );;
gap> FG:=GroupRing(GF(7),G);
<algebra-with-one over GF(7), with 2 generators>
gap> QG:=GroupRing(Rationals,G);
<algebra-with-one over Rationals, with 2 generators>
gap> IdempotentBySubgroups(QG,K,H);
(1/2)*()+(-1/2)*(1,3)(2,4)
gap> IdempotentBySubgroups(FG,K,H,1);
(Z(7)^4)*()+(Z(7))*(1,3)(2,4)
gap> IdempotentBySubgroups(FG,K,H,[1,3]);
(Z(7)^4)*()+(Z(7))*(1,3)(2,4)
]]>
</Example>

The output of <E>IdempotentBySubgroups</E> is an idempotent in the corresponding group algebra.

   </Description>
</ManSection>


<ManSection>
   <Oper Name="CentralElementBySubgroups" 
         Arg="QG K H"  
         Comm="" />
   <Oper Name="CentralElementBySubgroups" 
         Arg="FG K H c"  
         Comm="" />
   <Returns>
         A central element of a group algebra.
   </Returns>         
   <Description>
          The versions with three input data computes <M>e(G,K,H)</M>
          as an element of the rational group algebra <M>&QQ; G</M>, where <M>K</M>
          is a subgroup of <M>G</M> and <M>H</M> is a normal subgroup of <M>K</M>. 
          (see Section <Ref Sect="SPDef"/>). <P/>
                   
          The versions with three input data computes <M>e_C(G,K,H)</M>
          as an element of the group algebra <M>FG</M>, where <M>F</M> is a finite 
          field of order <M>q</M> and <M>G</M> is a finite group of order coprime 
          with <M>q</M>. Moreover <M>K</M> should be a subgroup of <M>G</M>, 
          <M>H</M> a normal subgroup of <M>K</M> such that <M>K/H</M> is cyclic 
          and <M>C</M> is a <M>q</M>-cyclotomic class module <M>[K:H]</M> 
          (see Section <Ref Sect="CyclotomicClass"/>). 
          The cyclotomic class can be given either by the cyclotomic class itself 
          or by a representative, that is an integer.

<Example>
<![CDATA[
gap> G:=SymmetricGroup(5);;
gap> K:=Group([(1,2,3,4)]);;
gap> H:=Group( () );;
gap> FG:=GroupRing(GF(7),G);
<algebra-with-one over GF(7), with 2 generators>
gap> QG:=GroupRing(Rationals,G);
<algebra-with-one over Rationals, with 2 generators>
gap> CentralElementBySubgroups(QG,K,H);
(15/2)*()+(-1/2)*(2,3)(4,5)+(-1/2)*(2,4)(3,5)+(-1/2)*(2,5)(3,4)+(-1/2)*(1,2)
(4,5)+(-1/2)*(1,2)(3,4)+(-1/2)*(1,2)(3,5)+(-1/2)*(1,3)(4,5)+(-1/2)*(1,3)
(2,4)+(-1/2)*(1,3)(2,5)+(-1/2)*(1,4)(3,5)+(-1/2)*(1,4)(2,3)+(-1/2)*(1,4)
(2,5)+(-1/2)*(1,5)(3,4)+(-1/2)*(1,5)(2,3)+(-1/2)*(1,5)(2,4)
gap> CentralElementBySubgroups(FG,K,H,1);
(Z(7)^4)*()+(Z(7))*(2,3)(4,5)+(Z(7))*(2,4)(3,5)+(Z(7))*(2,5)(3,4)+(Z(7))*(1,2)
(4,5)+(Z(7))*(1,2)(3,4)+(Z(7))*(1,2)(3,5)+(Z(7))*(1,3)(4,5)+(Z(7))*(1,3)
(2,4)+(Z(7))*(1,3)(2,5)+(Z(7))*(1,4)(3,5)+(Z(7))*(1,4)(2,3)+(Z(7))*(1,4)
(2,5)+(Z(7))*(1,5)(3,4)+(Z(7))*(1,5)(2,3)+(Z(7))*(1,5)(2,4)
gap> CentralElementBySubgroups(FG,K,H,[1,3]);
(Z(7)^4)*()+(Z(7))*(2,3)(4,5)+(Z(7))*(2,4)(3,5)+(Z(7))*(2,5)(3,4)+(Z(7))*(1,2)
(4,5)+(Z(7))*(1,2)(3,4)+(Z(7))*(1,2)(3,5)+(Z(7))*(1,3)(4,5)+(Z(7))*(1,3)
(2,4)+(Z(7))*(1,3)(2,5)+(Z(7))*(1,4)(3,5)+(Z(7))*(1,4)(2,3)+(Z(7))*(1,4)
(2,5)+(Z(7))*(1,5)(3,4)+(Z(7))*(1,5)(2,3)+(Z(7))*(1,5)(2,4)
]]>
</Example>

The output of <C>CentralElementBySubgroups</C> is central in the 
corresponding group algebra.
If some additional conditions are satisfied then it is also an 
idempotent but in general it could be not idempotent. 
For example this is the case if <M>(K,H)</M> is a strong
Shoda pair of <M>G</M>.

   </Description>
</ManSection>

-->
