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

/magnus/back_end/SessionManager/include/SMSubgroup.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: SMSubgroup.h,v 1.11 2000/03/03 01:35:20 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1995 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Declaration of classes SMSubgroup, SIC, SCM
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _SMSubgroup_H_
00018 #define _SMSubgroup_H_
00019 
00020 #include "AlgebraicObject.h"
00021 #include "SMFPGroup.h"
00022 #include "SGofFreeGroup.h"
00023 #include "NGSubgroupProblems.h"
00024 #include "AbelianSGPresentation.h"
00025 #include "AbelianProblems.h"
00026 #include "ToddCoxeter.h"
00027 #include "HToddCoxeter.h"
00028 #include "SGNilpotentQuotients.h"
00029 
00030 
00031 class CyclicDecompositionOfFactorProperty : public AbelianGroupProperty {
00032 public:
00033   CyclicDecompositionOfFactorProperty( const AbelianGroup& data )
00034     : AbelianGroupProperty(data) {}
00035   PropertyType actualType()   const { return type(); }
00036   static PropertyType type() { return theTypeID; }
00037   Chars propertyName() const { return "CyclicDecompositionOfFactor"; }
00038 protected:
00039   GenericProperty* clone() const { 
00040     return new CyclicDecompositionOfFactorProperty(*this); 
00041   }
00042 private:
00043   static const PropertyType theTypeID;
00044 };
00045 
00046 class AbelianSubgroupPresentationProperty 
00047   : public AbelianSGPresentationProperty {
00048 public:
00049   AbelianSubgroupPresentationProperty(const AbelianSGPresentation& data)
00050     : AbelianSGPresentationProperty(data) {}
00051   PropertyType actualType()   const { return type(); }
00052   static PropertyType type() { return theTypeID; }
00053   Chars propertyName() const { return "AbelianSubgroupPresentation"; }
00054 protected:
00055   GenericProperty* clone() const { 
00056     return new AbelianSubgroupPresentationProperty(*this); 
00057   }
00058 private:
00059   static const PropertyType theTypeID;
00060 };
00061 
00062 class IsPureSubgroupProperty : public NoDataProperty {
00063 public:
00064   IsPureSubgroupProperty() : NoDataProperty() {}
00065   PropertyType actualType()   const { return type(); }
00066   static PropertyType type() { return theTypeID; }
00067   Chars propertyName() const { return "IsPureSubgroup"; }
00068 protected:
00069   GenericProperty* clone() const { return new IsPureSubgroupProperty(*this); }
00070 private:
00071   static const PropertyType theTypeID;
00072 };
00073 
00074 class IsCentralSubgroupProperty : public NoDataProperty {
00075 public:
00076   IsCentralSubgroupProperty() : NoDataProperty() {}
00077   PropertyType actualType()   const { return type(); }
00078   static PropertyType type() { return theTypeID; }
00079   Chars propertyName() const { return "IsCentralSubgroup"; }
00080 protected:
00081   GenericProperty* clone() const { 
00082     return new IsCentralSubgroupProperty(*this); 
00083   }
00084 private:
00085   static const PropertyType theTypeID;
00086 };
00087 
00088 class IsNormalSubgroupProperty : public NoDataProperty {
00089 public:
00090   IsNormalSubgroupProperty() : NoDataProperty() {}
00091   PropertyType actualType()   const { return type(); }
00092   static PropertyType type() { return theTypeID; }
00093   Chars propertyName() const { return "IsNormalSubgroup"; }
00094 protected:
00095   GenericProperty* clone() const { 
00096     return new IsNormalSubgroupProperty(*this); 
00097   }
00098 private:
00099   static const PropertyType theTypeID;
00100 };
00101 
00102 class IsAbelianSubgroupProperty : public NoDataProperty {
00103 public:
00104   IsAbelianSubgroupProperty() : NoDataProperty() {}
00105   PropertyType actualType()   const { return type(); }
00106   static PropertyType type() { return theTypeID; }
00107   Chars propertyName() const { return "IsAbelianSubgroup"; }
00108 protected:
00109   GenericProperty* clone() const { return new IsAbelianSubgroupProperty(*this); }
00110 private:
00111   static const PropertyType theTypeID;
00112 };
00113 
00114 class IsTrivialSubgroupProperty : public NoDataProperty {
00115 public:
00116   IsTrivialSubgroupProperty() : NoDataProperty() {}
00117   PropertyType actualType()   const { return type(); }
00118   static PropertyType type() { return theTypeID; }
00119   Chars propertyName() const { return "IsTrivialSubgroup"; }
00120 protected:
00121   GenericProperty* clone() const { 
00122     return new IsTrivialSubgroupProperty(*this); 
00123   }
00124 private:
00125   static const PropertyType theTypeID;
00126 };
00127 
00128 class IndexOfSubgroupProperty : public IntProperty {
00129 public:
00130   IndexOfSubgroupProperty(const int& data) : IntProperty(data) {}
00131   PropertyType actualType()   const { return type(); }
00132   static PropertyType type() { return theTypeID; }
00133   Chars propertyName() const { return "IndexOfSubgroup"; }
00134 protected:
00135   GenericProperty* clone() const { return new IndexOfSubgroupProperty(*this);}
00136 private:
00137   static const PropertyType theTypeID;
00138 };
00139 
00140 class SGNilpotentQuotientsProperty : public SGNilpGroupAssocProperty {
00141 public:
00142   SGNilpotentQuotientsProperty(
00143     const AssociationsOf<int,SGOfNilpotentGroup*>& data
00144     ) : SGNilpGroupAssocProperty(data) {}
00145   PropertyType actualType()   const { return type(); }
00146   static PropertyType type() { return theTypeID; }
00147   Chars propertyName() const { return "SGNilpotentQuotients"; }
00148 protected:
00149   GenericProperty* clone() const { 
00150     return new SGNilpotentQuotientsProperty(*this); 
00151   }
00152 private:
00153   static const PropertyType theTypeID;
00154 };
00155 
00156 class SubgroupOfNilpotentGroupProperty : public SGOfNilpotentGroupProperty {
00157 public:
00158   SubgroupOfNilpotentGroupProperty( const SGOfNilpotentGroup& data )
00159     : SGOfNilpotentGroupProperty( data ) {}
00160   PropertyType actualType()   const { return type(); }
00161   static PropertyType type() { return theTypeID; }
00162   Chars propertyName() const { return "SubgroupOfNilpotentGroup"; }
00163 protected:
00164   GenericProperty* clone() const { 
00165     return new SubgroupOfNilpotentGroupProperty(*this); 
00166   }
00167 private:
00168   static const PropertyType theTypeID;
00169 };
00170 
00171 
00172 // ------------------------------ SIC ------------------------------------- //
00173 
00174 
00175 class SIC : public InformationCenter, protected FEData
00176 {  
00177 public:
00178   
00179   /////////////////////////////////////////////////////////////////////////
00180   //                                                                     //
00181   // Constructors:                                                       //
00182   //                                                                     //
00183   /////////////////////////////////////////////////////////////////////////
00184   
00185   SIC( OID subgroup_oid );
00186 
00187   ~SIC( );
00188 
00189 
00190   /////////////////////////////////////////////////////////////////////////
00191   //                                                                     //
00192   // Abelianization of the factor group                                  //
00193   //                                                                     //
00194   /////////////////////////////////////////////////////////////////////////
00195 
00196   void putHaveCyclicDecompositionOfFactor( const AbelianGroup& );
00197 
00198   bool haveCyclicDecompositionOfFactor( ) const;
00199 
00200   const AbelianGroup& getCyclicDecompositionOfFactor( ) const;
00201 
00202   void putHaveCyclicDecomposition( const AbelianSGPresentation& );
00203 
00204   void putHavePrimaryDecomposition( const AbelianSGPresentation& );
00205 
00206   bool haveCyclicDecomposition( ) const;
00207 
00208   bool havePrimaryDecomposition( ) const;
00209 
00210   const AbelianSGPresentation& getSGPresentation( ) const;
00211 
00212   // Methods for nilpotent subgroups
00213   void putHaveSGOfNGPreimageInitialized( const SGOfNilpotentGroup& );
00214 
00215   bool haveSGOfNGPreimageInitialized( ) const;
00216 
00217   void putHaveSGOfNGinitialized( const SGOfNilpotentGroup& );
00218 
00219   bool haveSGOfNGinitialized( ) const;
00220 
00221   const SGOfNilpotentGroup& getSGOfNilpotentGroup( ) const;
00222 
00223   // Methods for subgroup nilpotent quotients
00224 
00225   void putHaveSGNilpotentQuotInited( const SGOfNilpotentGroup& theQuot, 
00226                                      int theClass );
00227 
00228   bool haveSGNilpotentQuotInited(int theClass) const;
00229 
00230   const SGOfNilpotentGroup& getSGNilpotentQuotInited(int theClass) const;
00231 
00232 
00233 
00234   void putHaveCompleteCayleyGraph( const SubgroupGraph& S );
00235 
00236   bool haveCompleteCayleyGraph( ) const;
00237 
00238   const SubgroupGraph& getCompleteCayleyGraph( ) const;
00239 
00240   // Methods for word decomposer.
00241 
00242   void putHaveWordDecomposer( const DecomposeInSubgroupOfFPGroup& D );
00243 
00244   bool haveWordDecomposer( ) const;
00245 
00246   const DecomposeInSubgroupOfFPGroup& getWordDecomposer( ) const;
00247 
00248   //////////////////////////////////////////////////////////
00249   //
00250   // Schreier Transversal
00251   //
00252   /////////////////////////////////////////////////////////
00253 
00254   void putHaveSchreierTransvl(const PermutationRepresentation&);
00255   
00256   bool haveSchreierTransvl()const;
00257   
00258   const PermutationRepresentation& getSchreierTransvl()const;
00259   
00260   Trichotomy isPure() const;
00261   void putIsPure(bool ispure);
00262 
00263   Trichotomy isCentral() const;
00264   void putIsCentral( bool iscentral);
00265 
00266   Trichotomy isNormal() const;
00267   void putIsNormal( bool isnormal);
00268 
00269   Trichotomy isAbelian() const;
00270   void putIsAbelian( bool isabelian);
00271 
00272   Trichotomy isTrivial() const;
00273   void putIsTrivial( bool istrivial);
00274 
00275   int index() const;
00276   bool haveIndex() const;
00277   void putIndex(const int& index);
00278   /////////////////////////////////////////////////////////////////////////
00279   //                                                                     //
00280   // Data Members:                                                       //
00281   //                                                                     //
00282   /////////////////////////////////////////////////////////////////////////
00283 private:
00284   OID subgroupOID;
00285   // Need this for composing messages about what has been found.
00286 
00287   AssociationsOf<int,SGOfNilpotentGroup*>& getSGNilpotentQuotients() const;
00288 
00289   //AbelianGroup* theAbelianGroup;
00290   //AbelianSGPresentation* theAbelianSGPresentation;
00291   //SGOfNilpotentGroup* theSGOfNilpotentGroup;
00292   //Trichotomy isPureSubgroup;
00293   //Trichotomy isCentralSubgroup;
00294   //Trichotomy isNormalSubgroup;
00295   //Trichotomy isAbelianSubgroup;
00296   //Trichotomy isTrivialSubgroup;
00297   //int theIndex;
00298   //PermutationRepresentation* permutationRepresentation;
00299 
00300   //AssociationsOf<int, SGOfNilpotentGroup*> theSGNilpotentQuotients;
00301   //SubgroupGraph *theCompleteCayleyGraph;
00302   //DecomposeInSubgroupOfFPGroup *theWordDecomposer;
00303 };
00304 
00305 
00306 // ------------------------------- SCM ------------------------------------- //
00307 
00308 
00309 class SCM : public Supervisor
00310 {
00311 public:
00312 
00313   /////////////////////////////////////////////////////////////////////////
00314   //                                                                     //
00315   // Constructors:                                                       //
00316   //                                                                     //
00317   /////////////////////////////////////////////////////////////////////////
00318 
00319   SCM( class SMSubgroup& S );
00320 
00321   /////////////////////////////////////////////////////////////////////////
00322   //                                                                     //
00323   // Accessors:                                                          //
00324   //                                                                     //
00325   /////////////////////////////////////////////////////////////////////////
00326 
00327   SMSubgroup& getSubgroup( ) const { return theSubgroup; }
00328 
00329 
00330   /////////////////////////////////////////////////////////////////////////
00331   //                                                                     //
00332   // Front End Interfacing:                                              //
00333   //                                                                     //
00334   /////////////////////////////////////////////////////////////////////////
00335 
00336   void viewStructure(ostream& ostr) const { }
00337 
00338 
00339   /////////////////////////////////////////////////////////////////////////
00340   //                                                                     //
00341   // Subordinate Computation Managers:                                   //
00342   //                                                                     //
00343   /////////////////////////////////////////////////////////////////////////
00344 
00345   Subordinate<SCM,AbelianInvariantsOfFactor> abelianInvariantsOfFactor;
00346   Subordinate<SCM,AbelianSGInvariants> abelianSGInvariants;
00347   Subordinate<SCM,SGOfNGinitializeProblem> initializeSGOfNG;
00348   Subordinate<SCM,SGOfNGinitPreimageProblem> initPreimageSGOfNG;
00349   Subordinate<SCM,SGIndexToddCoxeter> sgToddCoxeter;
00350   Subordinate<SCM,SGIndexToddCoxeter> sgGHToddCoxeter;
00351 
00352   Subordinate<SCM,SGNilpotentQuotients> sgNilpotentQuotients;
00353   Subordinate<SCM,NormalClosure> normalClosure;
00354   /////////////////////////////////////////////////////////////////////////
00355   //                                                                     //
00356   // Control:                                                            //
00357   //                                                                     //
00358   /////////////////////////////////////////////////////////////////////////
00359 
00360   void takeControl( );        // overrides ComputationManager
00361 
00362 
00363   /////////////////////////////////////////////////////////////////////////
00364   //                                                                     //
00365   // State Transitions:                                                  //
00366   //                                                                     //
00367   /////////////////////////////////////////////////////////////////////////
00368 
00369   void start( ) { }           // overrides ComputationManager
00370 
00371   void terminate( ) { }       // overrides ComputationManager
00372 
00373 
00374 private:
00375 
00376   /////////////////////////////////////////////////////////////////////////
00377   //                                                                     //
00378   // Data Members:                                                       //
00379   //                                                                     //
00380   /////////////////////////////////////////////////////////////////////////
00381 
00382   class SMSubgroup& theSubgroup;
00383 
00384   bool didFastChecks;
00385   // The takeControl method does some sneaky checks of obvious properties
00386   // (this should be formalized, since they are not always that fast).
00387   // This records the first call, so that they are not done over and over.
00388 
00389 };
00390 
00391 
00392 // ----------------------------- SMSubgroup -------------------------------- //
00393 
00394 class SMSubgroup : public AlgebraicObject
00395 {
00396 public:
00397 
00398   /////////////////////////////////////////////////////////////////////////
00399   //                                                                     //
00400   // Constructors:                                                       //
00401   //                                                                     //
00402   /////////////////////////////////////////////////////////////////////////
00403 
00404   SMSubgroup(SMFPGroup& G, const SGofFreeGroup& S, const Chars heritage,
00405             Chars def = Chars());
00406 
00407   SMSubgroup(SMFPGroup& G)
00408     : AlgebraicObject(""), theGroup(G), theSubgroup( *((SGofFreeGroup*)0) ),
00409       sic( oid() ), theSCM( 0 )
00410   { }
00411   //Bogus ctor; see `But no' comment in Menu.h
00412 
00413   /////////////////////////////////////////////////////////////////////////
00414   //                                                                     //
00415   // Accessors:                                                          //
00416   //                                                                     //
00417   /////////////////////////////////////////////////////////////////////////
00418 
00419   SGofFreeGroup getSubgroup( ) const { return theSubgroup; }
00420 
00421   SMFPGroup& getParent( ) const { return theGroup; }
00422 
00423   SCM& scm() const { return *theSCM; }
00424 
00425 
00426         InformationCenter* infoCenter()       { return &sic; }
00427   const InformationCenter* infoCenter() const { return &sic; }
00428 
00429   /////////////////////////////////////////////////////////////////////////
00430   //                                                                     //
00431   // Front End Interfacing:                                              //
00432   //                                                                     //
00433   /////////////////////////////////////////////////////////////////////////
00434 
00435   static const char* type( ) { return "SMSubgroup"; }
00436 
00437   const char* typeID( ) const { return type(); }         // overrides SMObject
00438 
00439   const IconID iconID( ) const { return IconID::subgroup; }
00440   // overrides SMObject
00441 
00442   void viewStructure(ostream& ostr) const;               // overrides SMObject
00443 
00444   void printProperties(ostream& ostr) const;             // overrides SMObject
00445 
00446   void printDefinition(ostream& ostr) const;             // overrides SMObject
00447 
00448 
00449 protected:
00450 
00451   /////////////////////////////////////////////////////////////////////////
00452   //                                                                     //
00453   // Restricted Access:                                                  //
00454   //                                                                     //
00455   /////////////////////////////////////////////////////////////////////////
00456 
00457   void readMessage(istream&) { }                         // overrides SMObject
00458 
00459 
00460   /////////////////////////////////////////////////////////////////////////
00461   //                                                                     //
00462   // Data Members:                                                       //
00463   //                                                                     //
00464   /////////////////////////////////////////////////////////////////////////
00465 
00466 public:
00467 
00468   SIC sic;
00469 
00470 private:
00471 
00472   const SGofFreeGroup theSubgroup;
00473 
00474   SMFPGroup& theGroup;
00475 
00476   SCM* theSCM;  // TheObjects removes scm when this is removed.
00477 
00478   Chars definition;
00479   // This is a definition of the subgroup. If the string is empty, then
00480   // printDefinition outputs some "standard" definition:
00481   //          gp(<list-of-generators>)
00482   //
00483   // The alternative definition can be put in the constructor.
00484 };
00485 
00486 #endif

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