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

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

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