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

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

Go to the documentation of this file.
```00001 // Copyright (C) 1994 The New York Group Theory Cooperative
00002 // See magnus/doc/COPYRIGHT for the full notice.
00003
00004 // Contents: Definition of the NilpotentGroup class.
00005 //
00006 // Principal Author: Eugene Paderin
00007 //
00008 // Status: Draft
00009 //
00010 // Revision History:
00011 //
00012 // Special Notes:
00013 //
00014 // * There are numerous ways to represent the group element:
00015 //   1. As Word in terms of group generators.
00016 //   2. As PolyWord in terms of basic commutators (not collected).
00017 //   3. As PolyWord in terms of basic commutators (collected).
00018 //   4. As PolyWord in terms of the group basis (collected).
00019 //   (For free nilpotent groups, cases 3 and 4 are identical.)
00020 //
00021 //   We always explicitly specify the form we mean.
00022 //
00023 // * Also bear in mind that:
00024 //
00025 //   1. You can transform Word to PolyWord and vice versa:
00026 //        Word w;
00027 //        PolyWord pw = w;
00028 //        w = pw;
00029 //
00030 //   2. You can evaluate PolyWord expressed in terms of basis A
00031 //      if you know how basic words of A are expressed in terms of
00032 //      basis B. The result is a PolyWord in terms of B:
00033 //        PolyWord pwInA;
00034 //        VectorOf<PolyWord> AinB;
00035 //        PolyWord pwInB = pwInA.evaluate(AinB);
00036 //
00037 //   3. You can write the given PolyWord in readable form using toChars:
00038 //        PolyWord pw;
00039 //        VectorOf<Chars> basisNames;
00040 //        Chars output = pw.toChars(basisNames);
00041 //
00042 //   4. You can collect the PolyWord given in terms of basic commutators:
00043 //        NilpotentGroup ng;
00044 //        PolyWord nonCollectedPW;
00045 //        PolyWord collectedPW = ng.collector().collect(nonCollectedPW);
00046 //
00047
00048
00049 #ifndef _NILPOTENT_GROUP_H_
00050 #define _NILPOTENT_GROUP_H_
00051
00052 #include "NilpotentGroupRep.h"
00053 #include "FGGroup.h"
00054 #include "LCSQuotients.h"
00055
00056 //=====================================================================
00057 //================== class NilpotentGroup =============================
00058 //=====================================================================
00059
00060
00061 class NilpotentGroup : public DerivedObjectOf<FGGroup, NilpotentGroupRep> {
00062
00063 public:
00064
00065   //-------------------------------------------------------------------
00066   //    Constructors / initializers
00067   //-------------------------------------------------------------------
00068
00069   // To construct a group with named generators, given nilpotency class
00070
00071   //FPNilpotentGroup
00072   NilpotentGroup(const VectorOf<Chars>& gennames,
00073                  int nilclass,
00074                  const VectorOf<Word>& rels,
00075                  enum NilpotentCollector::Type colType
00076                                            = NilpotentCollector::STANDARD
00077                  );
00078
00079
00080   //FreeNilpotentGroup
00081   NilpotentGroup(const VectorOf<Chars>& gennames,
00082                  int nilclass,
00083                  enum NilpotentCollector::Type collectorType
00084                                            = NilpotentCollector::STANDARD
00085                  );
00086
00087   // To construct a group with unnamed generators, given nilpotency class
00088
00089   //FPNilpotentGroup
00090   NilpotentGroup(int numOfGen,
00091                  int nilclass,
00092                  const VectorOf<Word>& rels,
00093                  enum NilpotentCollector::Type colType
00094                                           = NilpotentCollector::STANDARD
00095                  );
00096
00097   //FreeNilpotentGroup
00098   NilpotentGroup(int numOfGen,
00099                  int nilclass,
00100                  enum NilpotentCollector::Type collectorType
00101                                           = NilpotentCollector::STANDARD
00102                  );
00103
00104
00105   void initialize() const {
00106     look()->initialize();
00107   }
00108   // Initializes the group.
00109   // FP initialization means computing of LCS factors.
00110   // Free NG is always initialized; nevertheless, you should always invoke
00111   // initialize(), for the group definition may be changed in the future.
00112   // pseudo-virtual
00113
00114   //-------------------------------------------------------------------
00115   //    Accessors
00116   //-------------------------------------------------------------------
00117
00118   // Inherited from Group:
00119   static Type type( ) { return NilpotentGroupRep::type(); }
00120   // dominates FGGroup::type();
00121
00122   // Inherited from FGGroup:
00123   //  Type actualType() const; // pseudo-virtual
00124   //  int numberOfGenerators( ) const;
00125   //  Chars nameOfGenerator(int i) const;
00126   //  VectorOf<Chars> namesOfGenerators( ) const;
00127
00128   bool isInitialized() const {
00129     return look()->isInitialized();
00130   }
00131   // True iff the group is initialized
00132   // pseudo-virtual
00133
00134   VectorOf<Word> relators() const {
00135     return look()->relators();
00136   }
00137   // Returns the group relators (empty vector if the group is free nilpotent)
00138   // pseudo-virtual
00139
00140   VectorOf<Word> relationSubgroupGenerators() const {
00141     return look()->relationSubgroupGenerators();
00142   }
00143   // Returns the generators of the relation subgroup
00144   // (empty vector if the group is free nilpotent)
00145   // pseudo-virtual
00146
00147   VectorOf<PolyWord> basis() const {
00148     return look()->basis();
00149   }
00150   // The basis of the group, in terms of basic commutators (collected).
00151   // pseudo-virtual
00152
00153   VectorOf<Chars> basisNames() const {
00154     return look()->basisNames();
00155   }
00156   // The names of the basis words
00157   // pseudo-virtual
00158
00159   const BasicCommutators& commutators() const {
00160     return look()->commutators();
00161   }
00162   //Returns the basic commutators of the group's free preimage
00163
00164   int nilpotencyClass() const {
00165     return look()->nilpotencyClass();
00166   }
00167   // Returns the nilpotency class
00168
00169   const NGCollector collector() const {
00170     return look()->collector();
00171   }
00172   // Returns the current collector
00173
00174
00175   //-------------------------------------------------------------------
00176   //    Methods dealing with the properties of the group:
00177   //-------------------------------------------------------------------
00178
00179   // Inherited from FGGroup, redefined within Rep:
00180   //  int order( ) const;
00181   // Trichotomy isTrivial( ) const; // pseudo-virtual
00182   // Trichotomy isFinite( ) const; // pseudo-virtual
00183   // Trichotomy isInfinite( ) const; // pseudo-virtual
00184   // Trichotomy isAbelian( ) const; // pseudo-virtual
00185
00186   virtual int theHirschNumber() const {
00187     return look()->theHirschNumber();
00188   }
00189   // returns the Hirsch number (the number of basic words
00190   // of infinite order)
00191   // pseudo-virtual
00192
00193
00194   // The following methods are meaningful only for FP nilpotent groups
00195
00196
00197   bool isFreeNilpotent( int* freeRank, int* freeClass ) const {
00198     return look()->isFreeNilpotent(freeRank,freeClass );
00199   }
00200   // returns true iff the group is free nilpotent or has free
00201   // nilpotent presentation.
00202   // in this case also returns its rank and nilpotency class.
00203   // pseudo-virtual
00204
00205   int minimalNilpotencyClass( ) const {
00206     return look()->minimalNilpotencyClass( );
00207   }
00208   // returns the minimal nilpotency class of the group
00209   // pseudo-virtual
00210
00211   bool isMalcevBasis() const {
00212     return look()->isMalcevBasis();
00213   }
00214   // returns truey iff the group basis is the Malcev basis
00215   // (has no words of finite order)
00216   // pseudo-virtual
00217
00218   Integer orderOfTheTorsionSubgroup( ) const {
00219     return look()-> orderOfTheTorsionSubgroup( );
00220   }
00221   // returns order of the torsion subgroup
00222   // pseudo-virtual
00223
00224   PresentationForNG makePresentation() const {
00225     return look()->makePresentation();
00226   }
00227   // produces FP presentation of the group
00228
00229   VectorOf<Word> getLCSterm(int i) const {
00230      return look()->getLCSterm(i);
00231   }
00232   // returns the generators of --th term of lower central series
00233
00234   LCSQuotient getLCSQuotient( int N ) const {
00235     return look()->getLCSQuotient(N);
00236   }
00237   // returns the N_th LCSQuotient
00238   // can be used only after calling initialize()
00239
00240
00241   //-------------------------------------------------------------------
00242   //  Methods dealing with group elements (inherited):
00243   //-------------------------------------------------------------------
00244
00245   // Inherited from FGGroup:
00246   // Elt makeIdentity( ) const;
00247   // Bool isSyntacticIdentity(const Elt& e) const;
00248   // Elt firstElt( ) const;
00249   // Elt nextElt(const Elt& e) const;
00250   // Elt multiply(const Elt& e1, const Elt& e2) const;
00251   // Elt inverseOf(const Elt& e) const;
00252   // Elt raiseToPower(const Elt& e, int n) const;
00253   // Elt conjugateBy(const Elt& e1, const Elt& e2) const;
00254   // Elt commutator(const Elt& e1, const Elt& e2) const;
00255
00256   //@ep an Elt of this group is a Word, so I left these methods unchanged.
00257   // Most of them demand more careful design of the whole hierarchy.
00258
00259
00260   // The following methods are inherited and redefined within Rep
00261
00262   // Elt eval( const Word& w ) const;
00263   // Trichotomy wordProblem( const Word& w ) const;
00264   // Trichotomy conjugacyProblem( const Word& u, const Word& v ) const;
00265   // Trichotomy isTrivialElt( const Elt& e ) const; // pseudo-virtual
00266   // Trichotomy areEqual(const Elt& e1, const Elt& e2) const;
00267
00268
00269   // Below are methods specific for this class
00270
00271   ///////////////////////////////////////////////////////
00272   //                                                   //
00273   //  Methods which deal with morpisms                 //
00274   //                                                   //
00275   ///////////////////////////////////////////////////////
00276
00277   VectorOf<Word> inverseAuto(const VectorOf<Word>& V) const{
00278     return look()->inverseAuto(V);
00279   }
00280   // *** Time consuming algorithm ! ***
00281   // Returns the inverse  of automorphism, defined by V.
00282   // Does not make check is it automorphism or not!!!
00283
00284   //------------------------------------------------------------
00285   //  Conversions from one basis to another:
00286   //------------------------------------------------------------
00287
00288   PolyWord decompose(const Word& w) const {
00289     return look()->decompose(w);
00290   }
00291   // decomposes the given word in terms of the group basis
00292   // input: word in terms of group generators
00293   // output: word in terms of group basis.
00294   // pseudo-virtual
00295
00296   PolyWord decompose(const PolyWord& w) const {
00297     return look()->decompose(w);
00298   }
00299   // decomposes the given word in terms of the group basis
00300   // input: word in terms of basic commutators (not collected)
00301   // output: word in terms of group basis.
00302
00303   Word toWord(const PolyWord& pw) const {
00304     return look()->toWord(pw);
00305   }
00306   //input: word in terms of the group basis
00307   //output: word in terms of the group generators
00308
00309
00310   PolyWord toCommutatorWord(const PolyWord& pw) const {
00311     return look()->toCommutatorWord(pw);
00312   }
00313   //input: word in terms of the group basis
00314   //output: word in terms of the basic commutators (not collected)
00315
00316   Chars asDecomposition(const PolyWord& decomposition) const {
00317     return look()->asDecomposition(decomposition);
00318   }
00319   // Input: word in terms of group basis.
00320   // Output: text in terms of group basis.
00321   // pseudo-virtual
00322
00323
00324   //-----------------------------------------------------------
00325   //  Properties of the group elements:
00326   //-----------------------------------------------------------
00327
00328   int weightOf(const Word& w) const {
00329     return look()->weightOf(w);
00330   }
00331   // determines in which term of the lower central series w lies
00332   // nilClass + 1 if the word is trivial
00333
00334   int weightOf(const PolyWord& w) const {
00335     return look()->weightOf(w);
00336   }
00337   // determines in which term of the lower central series w lies
00338   // nilClass + 1 if the word is trivial
00339   //w is given in terms of the group basis
00340
00341   int orderOfBasic(Generator g) const {
00342     return look()->orderOfBasic(g);
00343   }
00344   //Returns order of the basic word corresponding to the generator g.
00345   //0 means infinity.
00346
00347   int orderOf(const Word& w) const {
00348     return look()->orderOf(w);
00349   }
00350   //Returns the order of the word given in terms of group generators
00351
00352   int orderOf(const PolyWord& w) const {
00353     return look()->orderOf(w);
00354   }
00355   //Returns the order of the word given in terms of group basis
00356
00357   VectorOf<Word> centralizer( const Word& w) const {
00358     return look()->centralizer(w);
00359   }
00360
00361   bool isInCommutatorSubgroup(const Word& w) const {
00362     return look()->isInCommutatorSubgroup(w);
00363   }
00364   // returns true iff w is in the commutator subgroup, i.e. can be
00365   // represented as a product of commutators
00366
00367   bool isCentral(const Word& w) const {
00368     return look()->isCentral(w);
00369   }
00370   // returns true iff w lies in the group center
00371   // Slow, requires initialization
00372
00373   void maximalRoot(const Word& w, PolyWord& root, int& power ) const {
00374     look()->maximalRoot(w, root, power);
00375   }
00376   // finds maximal root of pw.
00377   // w is given in terms of the group generators.
00378   // root is in terms of the group basis.
00379
00380   void maximalRoot(const PolyWord& pw, PolyWord& root, int& power ) const {
00381     look()->maximalRoot(pw, root, power);
00382   }
00383   // finds maximal root of pw.
00384   // pw is in terms of the group basis.
00385   // root is in terms of the group basis.
00386   // pseudo-virtual
00387
00388   bool isProperPower(const Word& w) const {
00389     return look()->isProperPower(w);
00390   }
00391   // returns true iff the word is proper power
00392   // w is given in terms of the group generators.
00393
00394   bool isProperPower(const PolyWord& pw) const {
00395     return look()->isProperPower(pw);
00396   }
00397   // returns true iff the word is proper power
00398   // pw is in terms of the group basis.
00399
00400
00401   //-------------------------------------------------------------------
00402   // I/O:
00403   //-------------------------------------------------------------------
00404
00405   // Inherited from FGGroup:
00406
00407   //  Word readWord(istream& istr, Chars& errMesg) const
00408   //  void printWord( ostream& ostr, const Word& w ) const
00409   //@ep temporarily disabled
00410
00411   // Native:
00412
00413   void printBasis( ostream& BClist ) const {
00414     look()->printBasis(BClist);
00415   }
00416   // outputs the basis to a file
00417   // pseudo-virtual
00418
00419
00420   //-------------------------------------------------------------------
00421   // Special methods
00422   //-------------------------------------------------------------------
00423
00424 protected:
00425
00426   // Special wrapping constructor to wrap new representations (returned
00427   // by eg. delegated methods) and for base initialisation by derived
00428   // classes:
00429
00430   NilpotentGroup( NilpotentGroupRep* newrep )
00431     : DerivedObjectOf<FGGroup,NilpotentGroupRep>(newrep) { }
00432
00433   static VectorOf<Chars> defaultNames(int num);
00434   // Produces vector of words "x1", "x2", .....
00435   // These are default names for group generators.
00436
00437
00438 };
00439
00440
00441 #endif
00442
```

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