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

/magnus/back_end/NilpotentGroup/include/FreeNilpotentGroupRep.h

Go to the documentation of this file.
00001 
00002 // Copyright (C) 1994 The New York Group Theory Cooperative
00003 // See magnus/doc/COPYRIGHT for the full notice.
00004 
00005 // Contents: Definition of the FreeNilpotentGroupRep class.
00006 //
00007 // Principal Author: Eugene Paderin
00008 //
00009 // Status: Draft
00010 //
00011 // Revision History:
00012 //
00013 // Special Notes:
00014 //
00015 //
00016 
00017 #ifndef _FREE_NILPOTENT_GROUP_REP_H_
00018 #define _FREE_NILPOTENT_GROUP_REP_H_
00019 
00020 #include "NilpotentGroupRep.h"
00021 #include "Chars.h"
00022 #include "LCSQuotients.h"
00023 
00024 //=====================================================================
00025 //=================== class FreeNilpotentGroupRep =====================
00026 //=====================================================================
00027 
00028 class FreeNilpotentGroupRep : public NilpotentGroupRep {
00029 
00030   //-------------------------------------------------------------------
00031   //    Constructors / initializers
00032   //-------------------------------------------------------------------
00033 
00034 public:
00035 
00036   // To construct a group with named generators, given nilpotency class
00037   FreeNilpotentGroupRep(const VectorOf<Chars>& gennames, 
00038                     int nilclass,
00039                     enum NilpotentCollector::Type collectorType 
00040                     )
00041     : NilpotentGroupRep(gennames), nilClass(nilclass),
00042       theCollector(theNumberOfGenerators, nilclass, collectorType)
00043   { }
00044 
00045 
00046   virtual void initialize() const { }
00047   //The group is already initialized
00048     
00049 
00050   //-------------------------------------------------------------------
00051   //    Accessors / modifiers
00052   //-------------------------------------------------------------------
00053 
00054   //All are inherited from NilpotentGroupRep
00055 
00056   virtual bool isInitialized() const { return true; }
00057   // True iff the group is initialized
00058 
00059   const BasicCommutators& commutators() const {
00060     return theCollector.commutators();
00061   }
00062 
00063   int nilpotencyClass() const {
00064     return nilClass;
00065   }
00066 
00067   const NGCollector& collector() const {
00068     return theCollector;
00069   }
00070 
00071   virtual VectorOf<Word> relators() const {
00072     return VectorOf<Word>() ;
00073   }
00074   // Returns the group relators (empty vector here)
00075 
00076   virtual VectorOf<Word> relationSubgroupGenerators() const {
00077     return VectorOf<Word>() ;
00078   }
00079   // Returns the generators of the relation subgroup
00080   // (empty vector here )
00081 
00082   virtual VectorOf<PolyWord> basis() const;
00083   // The basis of the group
00084   // The basis is c1, c2, c3 ... It is formed every time the method
00085   // is called, so do not abuse it.
00086   // The matter of fact is that this method is not very useful here.
00087 
00088   virtual VectorOf<Chars> basisNames() const;
00089   // The names of basic commutators
00090 
00091   static Type type( ) { return theFreeNilpotentGroupType; }
00092   // dominates FGGroupRep::type()
00093 
00094 
00095   //-------------------------------------------------------------------
00096   //    Methods dealing with the properties of the group:
00097   //-------------------------------------------------------------------
00098 
00099   //  Inherited from GroupRep:
00100 
00101   int order( ) const;
00102   Trichotomy isTrivial( ) const;
00103   Trichotomy isFinite( ) const;
00104   Trichotomy isInfinite( ) const;
00105   Trichotomy isAbelian( ) const;
00106   Trichotomy isFree( ) const;
00107 
00108   int theHirschNumber() const { 
00109     return commutators().theHirschNumber(); 
00110   }
00111   // returns the Hirsch number (the number of basic commutators)
00112   
00113   // The following methods are meaningless here
00114 
00115   bool isFreeNilpotent( int* freeRank, int* freeClass ) const {
00116     *freeRank = theNumberOfGenerators;
00117     *freeClass = nilClass;
00118     return true;
00119   }
00120   // returns true because the group is free nilpotent
00121 
00122   int minimalNilpotencyClass( ) const {
00123     return nilClass;
00124   }
00125   // returns the minimal nilpotency class of the group
00126 
00127   bool isMalcevBasis() const {
00128     return true;
00129   }
00130   // returns true iff the group basis is the Malcev basis
00131 
00132   Integer orderOfTheTorsionSubgroup( ) const {
00133     return 1;
00134   }
00135   // returns order of the torsion subgroup
00136 
00137   //PresentationForNG makePresentation() const;
00138   // produces FP presentation of the group
00139 
00140   ///////////////////////////////////////////////////////
00141   //                                                   //
00142   //  Methods which deal with morpisms                 //
00143   //                                                   //
00144   ///////////////////////////////////////////////////////
00145 
00146   VectorOf<Word> inverseAuto(const VectorOf<Word>& V) const;
00147 
00148   // *** Time consuming algorithm ! ***
00149   // Returns the inverse  of automorphism, defined by V. 
00150   // Does not make check is it automorphism or not!!!
00151 
00152   //-------------------------------------------------------------------
00153   //  Methods dealing with group elements
00154   //-------------------------------------------------------------------
00155 
00156   // Inherited from FGGroupRep:
00157 
00158   // virtual Elt makeIdentity( ) const;
00159   // returns empty Word
00160 
00161   // virtual Bool isSyntacticIdentity( const Elt& e) const;
00162 
00163   // virtual Elt firstElt( ) const;
00164   // virtual Elt nextElt( const Elt& e ) const;
00165   // virtual Elt multiply( const Elt& e1, const Elt& e2 ) const;
00166   // virtual Elt inverseOf( const Elt& e ) const;
00167   // virtual Elt raiseToPower(const Elt&, int) const;
00168   // virtual Elt conjugateBy(const Elt&, const Elt&) const;
00169   // virtual Elt commutator(const Elt&, const Elt&) const;
00170 
00171   //@ep an Elt of this group is a Word, so I left these methods unchanged.
00172   // Most of them demand more careful design of the whole hierarchy.
00173   
00174 
00175   // Inherited from NilpotentGroupRep:
00176 
00177   //Trichotomy conjugacyProblem( const Word& u, const Word& v ) const;
00178   //@ep to do
00179 
00180   //virtual Trichotomy isTrivialElt( const Elt& e ) const;
00181 
00182   //virtual bool isProperPower(const PolyWord& pw) const;
00183   // returns true iff the word is proper power
00184   //Elt eval( const Word& w ) const;
00185 
00186 
00187   // The following methods override those from FGGroupRep
00188   
00189   Trichotomy wordProblem( const Word& w ) const;
00190   
00191   Trichotomy areEqual(const Elt& e1, const Elt& e2) const;
00192 
00193   VectorOf<Word> centralizer( const Word& w) const;
00194 
00195   //------------------------------------------------------------
00196   //  Conversions from one basis to another:
00197   //------------------------------------------------------------
00198 
00199   virtual PolyWord decompose(const PolyWord& w) const {
00200     return theCollector.collect(w);
00201   }
00202   // decomposes the given word in terms of the group basis
00203 
00204   //Word toWord(const PolyWord& w) const;
00205   // Transforms the given PolyWord to a common Word in terms of
00206   // the group
00207   // Inherited
00208 
00209   virtual PolyWord toCommutatorWord(const PolyWord& pw) const {
00210     return pw;
00211   }
00212   //input: word in terms of the group basis
00213   //output: word in terms of the basic commutators (not collected)
00214   //For free nilpotent groups, these representations are identical
00215 
00216   //Chars asDecomposition(const PolyWord& decomposition) const;
00217   // Input: word in terms of group basis.
00218   // Output: text in terms of group basis.
00219   //Inherited
00220 
00221   //-----------------------------------------------------------
00222   //  Properties of the group elements:
00223   //-----------------------------------------------------------
00224 
00225   virtual int weightOf(const Word& w) const {
00226     return theCollector.weightOf(w);
00227   }
00228   // determines in which term of the lower central series w lies
00229   // nilclass + 1 if the word is trivial
00230 
00231   virtual int weightOf(const PolyWord& w) const {
00232     return theCollector.weightOf(w);
00233   }
00234   // determines in which term of the lower central series w lies
00235   // nilclass + 1 if the word is trivial
00236 
00237 
00238   virtual int orderOfBasic(Generator g) const {
00239     return 0;
00240   }
00241   //Returns order of the basic word corresponding to the generator g.
00242   //0 means infinity.
00243 
00244   virtual int orderOf(const Word& w) const {
00245     return 0;
00246   }    
00247   //Returns the order of the word given in terms of group generators
00248 
00249   virtual int orderOf(const PolyWord& w) const {
00250     return 0;
00251   }
00252   //Returns the order of the word given in terms of group basis
00253 
00254   //bool isInCommutatorSubgroup(const Word& w) const;
00255   // returns true iff w is in the commutator subgroup, i.e. can be
00256   // represented as a product of commutators
00257   //Inherited
00258 
00259   //bool isCentral(const Word& w) const;
00260   // returns true iff w lies in the group center
00261   // Slow, requires initialization
00262   //Inherited
00263 
00264   virtual void maximalRoot(const PolyWord& pw, PolyWord& root, int& power ) const;
00265   // finds maximal root of pw.
00266   // Time consuming.
00267 
00268   //bool isProperPower(const Word& w) const;
00269   // returns true iff the word is proper power
00270   // w is given in terms of the group generators.
00271   //Inherited
00272 
00273   //bool isProperPower(const PolyWord& pw) const;
00274   // returns true iff the word is proper power
00275   // pw is in terms of the group basis.
00276   //Inherited
00277 
00278   virtual LCSQuotient getLCSQuotient( int N ) const {
00279     return LCSQuotient();
00280   }
00281   // returns the N_th LCSQuotient 
00282   // can be used only after calling initialize()
00283 
00284 
00285   //-------------------------------------------------------------------
00286   // I/O:
00287   //-------------------------------------------------------------------
00288 
00289   virtual void printBasis( ostream& BClist ) const {
00290     commutators().print(BClist, theNamesOfGenerators);
00291   }
00292   // outputs the basis to a file
00293 
00294   virtual void write( ostream& ostr ) const;
00295   virtual void read( istream& istr );  //Logical const!
00296   //IPC tools
00297 
00298 
00299   //-------------------------------------------------------------------
00300   // Internal methods
00301   //-------------------------------------------------------------------
00302 
00303 protected:
00304 
00305   static void findAbelianRoot(const PolyWord& pw, PolyWord& root,
00306                               int& power );
00307   // finds the root of the given PolyWord assuming that all
00308   // the word generators commute and the word is collected
00309   
00310   static int GCDofExponents(const PolyWord& pw);
00311   // finds GCD of generators exponents
00312   // the word assumed to be collected
00313 
00314   int weightOfDecomposed( const PolyWord& pw) const;
00315   // Returns the weight of the word decomposed in terms of group basis.
00316 
00317 
00318   //-------------------------------------------------------------------
00319   //    Representation methods
00320   //-------------------------------------------------------------------
00321         
00322   PureRep* clone( ) const { return new FreeNilpotentGroupRep(*this); }
00323   // overrides NilpotentGroupRep::clone()
00324 
00325   static const Type theFreeNilpotentGroupType;
00326 
00327   Type actualType( ) const { return type(); }
00328   // overrides FGGroupRep::actualType();
00329   
00330   //-------------------------------------------------------------------
00331   // Data members:
00332   //-------------------------------------------------------------------
00333 
00334 private:
00335 
00336   // Inherited:
00337   // int theOrder;
00338   // int theNumberOfGenerators;
00339   // VectorOf<Chars> theNamesOfGenerators;
00340 
00341   int nilClass;  
00342   NGCollector theCollector;
00343 
00344 };
00345 
00346 #endif
00347 

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