Esempio n. 1
0
PolyWord MalcevSet::makeCommutator( PolyWord& pw1, PolyWord& pw2 ) {

  // commute words

  PolyWord comm = commutatorOfInverses(pw1, pw2);
  comm.freelyReduce();
  return comm;
}
Esempio n. 2
0
void NilpotentGroupRep::mapToClass( PolyWord& pw, int theClass ) const {

  if( theClass >= nilpotencyClass() ) return;

  PolyWordIterator iter(pw);
  
  for( iter.startFromLeft(); ! iter.done(); ) {
    if( commutators().weightOf( ord( iter.thisLetter().gen ) ) > theClass )
      iter.removeThisLetter();
    else
      iter.stepRight();
  }

  pw.freelyReduce();
}