Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/Group/include/FreeGroupRep.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: FreeGroupRep.h,v 1.11 2000/03/03 02:44:13 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1994 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of the FreeGroupRep class.
00009 //
00010 // Principal Authors: Stephane Collart, Roger Needham
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _FREE_GROUP_REP_H_
00018 #define _FREE_GROUP_REP_H_
00019 
00020 #include "FGGroupRep.h"
00021 #include "File.h"
00022 
00023 struct FreeGroupRep : FGGroupRep {
00024   
00025 public:
00026   
00027 // Constructors:
00028 
00029   // Copy constructor and operator= provided by compiler (do deep copy).
00030   
00031   FreeGroupRep( int rank ) : FGGroupRep( rank ) { }
00032   
00033   FreeGroupRep( const VectorOf<Chars>& gennames ) :
00034     FGGroupRep( gennames ) { }
00035   
00036   // Destructor provided by compiler.
00037 
00038 // Operators:
00039 
00040   private:
00041   FreeGroupRep& operator = ( const FreeGroupRep& fgr ); // disable assignment
00042   public:
00043   
00044 // Representation methods:
00045 
00046   PureRep* clone( ) const { return new FreeGroupRep(*this); }
00047   // overrides PureRep* FGGroupRep::clone();
00048 
00049   static const Type theFreeGroupType;
00050 
00051   static Type type( ) { return theFreeGroupType; }
00052   // dominates FGGroup::type()
00053 
00054   Type actualType( ) const { return type(); }
00055   // overrides FGGroup::actualType()
00056 
00057 // Group structure methods:
00058 
00059   int order( ) const;
00060   // overrides int FGGroupRep::order() const;
00061   Trichotomy isTrivial( ) const;
00062   // overrides int FGGroupRep::isTrivial() const;
00063   Trichotomy isFinite( ) const;
00064   // overrides int FGGroupRep::isFinite() const;
00065   Trichotomy isInfinite( ) const;
00066   // overrides int FGGroupRep::isInfinite() const;
00067   Trichotomy isAbelian( ) const;
00068   // overrides int FGGroupRep::isAbelian() const;
00069 
00070   bool compare( const GroupRep* G ) const;
00071   // overrides int FGGroupRep::compare() const;
00072 
00073   VectorOf<Word> nielsenBasis(const VectorOf<Word>& V) const; 
00074   // Returns a nielsen basis for the subgroup generated by `V'.
00075 
00076   Bool isAutomorphism(const VectorOf<Word>& V) const;
00077   // Returns TRUE iff generating vector `V' defines an 
00078   // automorphism of this group. The length of `V' should be
00079   // equal to the rank of this group.
00080 
00081   Bool isInnerAutomorphism(const VectorOf<Word>& V) const;
00082   // Returns TRUE iff generating vector `V' defines an inner
00083   // automorphism of this group. The length of `V' should be
00084   // equal to the rank of this group and it should define an
00085   // automorphism.
00086 
00087   bool isIAAutomorphism(const VectorOf<Word>& V) const;
00088   // Returns `true' iff generating vector `V' defines an 
00089   // IA-automorphism of this group. The length of `V' should be
00090   // equal to the rank of this group and it should define an
00091   // automorphism.
00092 
00093   VectorOf<Word> inverseAutomorphism(const VectorOf<Word>& V) const;
00094   // Returns a generating vector for the inverse automorphism.
00095   // `V' should define an automorphism of this group.
00096 
00097 // Methods dealing with group elements:
00098   
00099   // Inhertited from FGGroupRep:
00100   // virtual Elt makeIdentity( ) const;
00101   // virtual Bool isSyntacticIdentity(const Elt&) const;
00102 
00103   Trichotomy isTrivialElt( const Elt& e ) const
00104         { return Trichotomy( eval(e) == Word() ); }
00105   // overrides FGGroupRep::isTrivialElt()
00106 
00107   Elt eval( const Word& w ) const;
00108   // overrides
00109   Trichotomy areEqual(const Elt& e1, const Elt& e2) const;
00110   // overrides
00111   Trichotomy wordProblem( const Word& w ) const;
00112   // overrides
00113   Trichotomy conjugacyProblem( const Word& u, const Word& v ) const;
00114   // overrides
00115 
00116   Trichotomy conjugacyProblem( const Word& u, const Word& v ,Word& c) const;
00117   
00118   Bool inCommutatorSG(const Word& w) const;
00119   // Returns TRUE iff `w' is in the commutator subgroup.
00120 
00121   Bool isCommutator(const Word& w, Word& u1, Word& u2) const;
00122   // Returns TRUE iff `w' is a commutator. If TRUE, `u1' and `u2'
00123   // are set to words such that w = [u1,u2].
00124 
00125   Chars productOfCommutators( const Word& w , File& file );
00126   // If the word is in derived subgroup this procedure rewrites the 
00127   // word as a product of commutators.
00128   
00129   Chars productOfSquares( const Word& w , File& file );
00130   // If the word is in the subgroup generated by all squares this procedure 
00131   // rewrites it as a product of squares.
00132   
00133   Word getN_thElement( int n ) const;
00134 
00135   int numberOfElement( const Word& w ) const;
00136   
00137   // I/O:
00138   
00139   void printOn(ostream&) const;
00140   // overrides void FGGroupRep::printOn() const;
00141   GroupRep* readFrom(istream&, Chars&) const;
00142   // overrides FGGroupRep::
00143 
00144 
00145 public:
00146 
00147   class NielsenBasis {
00148   public:
00149     NielsenBasis( const VectorOf<Word>& vec,
00150                   const VectorOf<Chars>& namesOfGenerators, 
00151                   bool writeToFile );
00152     // Copy ctor, operator= and dtor supplied by compiler.
00153 
00154     VectorOf<Word> oldGenerators( ) const { return theOldGenerators; }
00155     VectorOf<Word> newGenerators( );
00156     VectorOf<Word> expressNewGensInOldGens( );
00157     Chars getFileName( ) const; 
00158   private:
00159     void computeNielsenBasis( );
00160     void printParentGroup( ostream& ostr ) const;
00161     void printWord( ostream& ostr, const Word& w ) const;
00162     void printBasis( ostream& ostr, const VectorOf<Word>& basis, bool lineByLine ) const;
00163     void printTransformation( ostream& ostr, const VectorOf<Word>& basis, 
00164                               int i, int g1, int g2 ) const;
00165 
00166     // Data members:
00167     VectorOf<Chars> theNamesOfGenerators;
00168     VectorOf<Word> theOldGenerators;
00169     VectorOf<Word> theNewGenerators;
00170     VectorOf<Word> newGeneratorsExprssedInOldGerators;
00171     Chars theFileName;
00172     bool keepDetails;
00173     bool basisComputed;
00174   };
00175 
00176 // No new data members.
00177 
00178 private:
00179   
00180   // getN_thElement()'s accessories:
00181 
00182   Word getN_thWord( int n, int numberOfGenerators ) const;
00183   Generator numToGen( int n ) const;
00184   int genToNum( Generator g ) const;
00185   
00186 };
00187 
00188 #endif

Generated at Tue Jun 19 09:49:36 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001