##############################################################################
##
#W  mwohom.gd                GAP4 package `Gpd'                  Chris Wensley
#W                                                                & Emma Moore
##
#H  @(#)Id: "gpd/gap/mwohom.gd", v.1.05 2008/11/18
##
##  Declaration file for functions in the Gpd package.
##
Revision.("gpd/gap/mwohom_gd") :=
             "@(#)$Id: mwohom.gd,v 1.05 2008/11/18 gap Exp $";

############################################################################## 
## 
#P  IsGeneralMappingWithObjects( <map> )
#P  IsNonSPGeneralMappingWithObjects( <map> )
#P  IsSPGeneralMappingWithObjects( <map> )
#P  IsMappingWithObjects( <map> )
#P  IsEndoGeneralMappingWithObjects( <map> )
#P  IsEndoMappingWithObjects( <map> )
#P  IsMagmaWithObjectsGeneralMapping( <map> ) 
#P  IsMagmaWithObjectsHomomorphism( <map> ) 
#P  IsSemigroupWithObjectsHomomorphism( <map> )
#P  IsMonoidWithObjectsHomomorphism( <map> )
#P  IsGroupoidHomomorphism( <map> )                
## 
##  Category and groupoid mapping declarations
## 
DeclareProperty( "IsGeneralMappingWithObjects", IsGeneralMapping ); 
DeclareSynonymAttr( "IsSPGeneralMappingWithObjects", 
    IsSPGeneralMapping and IsGeneralMappingWithObjects ); 
DeclareSynonymAttr( "IsNonSPGeneralMappingWithObjects", 
    IsNonSPGeneralMapping and IsGeneralMappingWithObjects ); 
DeclareSynonymAttr( "IsMappingWithObjects",
    IsGeneralMappingWithObjects and IsMapping );
DeclareSynonymAttr( "IsEndoGeneralMappingWithObjects",
    IsGeneralMappingWithObjects and IsEndoGeneralMapping );
DeclareSynonymAttr( "IsEndoMappingWithObjects",
    IsMappingWithObjects and IsEndoMapping );
DeclareSynonymAttr( "IsMagmaWithObjectsGeneralMapping", 
    IsGeneralMappingWithObjects and RespectsMultiplication );
DeclareSynonymAttr( "IsMagmaWithObjectsHomomorphism", 
    IsMagmaWithObjectsGeneralMapping and IsMapping );

#?  modify these next three to SynonymAttr's ??
DeclareProperty( "IsSemigroupWithObjectsHomomorphism", 
    IsMagmaWithObjectsHomomorphism  );
DeclareProperty( "IsMonoidWithObjectsHomomorphism", 
    IsMagmaWithObjectsHomomorphism );
DeclareProperty( "IsGroupoidHomomorphism", 
    IsMagmaWithObjectsHomomorphism );

############################################################################## 
## 
#R  IsHomomorphismToSinglePieceRep( <map> )                
#R  IsHomomorphismWithObjectsRep( <map> )
## 
##  A mapping to a single piece magma with objects is determined by:
##   - mappings from each magma in the source to the range magma,
##   - images for the objects.
##  A mapping whose range has more than one constituent 
##     requires a different representation.
## 
DeclareRepresentation( "IsHomomorphismToSinglePieceRep",
    IsMagmaWithObjectsHomomorphism and IsAttributeStoringRep 
        and IsGeneralMapping,                              #? (07/10/08) 
    [ "Source", "Range", "PieceImages" ] ); 
DeclareRepresentation( "IsHomomorphismWithObjectsRep", 
    IsMagmaWithObjectsHomomorphism and IsAttributeStoringRep 
        and IsGeneralMapping, 
    [ "Source", "Range", "PiecesOfMapping" ] );

############################################################################## 
## 
#P  IsConstantOnObjects( <map> ) 
#P  IsGeneralMappingToSinglePiece( <map> ) 
#P  IsGeneralMappingFromSinglePiece( <map> ) 
#P  IsHomomorphismToSinglePiece( <map> ) 
#P  IsHomomorphismFromSinglePiece( <map> ) 
## 
##  A mapping to a connected magma is: 
##    - a list of mappings from the constituents of the source, 
##    - a list of lists of images of objects
## 
DeclareProperty("IsConstantOnObjects", IsGeneralMappingWithObjects );  
DeclareProperty("IsGeneralMappingToSinglePiece", IsGeneralMappingWithObjects);
DeclareProperty("IsGeneralMappingFromSinglePiece", 
                 IsGeneralMappingToSinglePiece );  
DeclareSynonymAttr( "IsHomomorphismToSinglePiece", 
    IsGeneralMappingToSinglePiece and IsMagmaWithObjectsHomomorphism );
DeclareSynonymAttr( "IsHomomorphismFromSinglePiece", 
    IsGeneralMappingFromSinglePiece and IsMagmaWithObjectsHomomorphism );

############################################################################# 
##  
##  MagmaWithObjectsHomomorphism( <args> )
## 
DeclareGlobalFunction( "MagmaWithObjectsHomomorphism" ); 

############################################################################# 
## 
#O  MagmaHomomorphismFromSinglePieceNC( <src>, <rng>, <hom>, <imobs> )  
#O  MagmaHomomorphismFromSinglePiece( <src>, <rng>, <hom>, <imobs> )  
#O  HomomorphismToSinglePieceNC( <src>, <rng>, <piece images> )  
#O  HomomorphismToSinglePiece( <src>, <rng>, <piece images> )  
#O  HomomorphismByUnionNC( <g1>, <g2>, <mors> )  
#O  HomomorphismByUnion( <g1>, <g2>, <list> )  
#O  MagmaHomomorphismFromSinglePieceGeneratorsImages( <src>, <rng>, <gens>, <ims> )
## 
DeclareOperation( "MagmaHomomorphismFromSinglePieceNC",
  [ IsSinglePiece, IsSinglePiece, IsMagmaHomomorphism, IsHomogeneousList ] );
DeclareOperation( "MagmaHomomorphismFromSinglePiece",
  [ IsSinglePiece, IsSinglePiece, IsMagmaHomomorphism, IsHomogeneousList ] );
DeclareOperation( "HomomorphismToSinglePieceNC",
  [ IsMagmaWithObjects, IsSinglePiece, IsHomogeneousList ] );
DeclareOperation( "HomomorphismToSinglePiece",
  [ IsMagmaWithObjects, IsSinglePiece, IsHomogeneousList ] );
DeclareOperation( "HomomorphismByUnionNC",
    [ IsMagmaWithObjects, IsMagmaWithObjects, IsHomogeneousList ] );
DeclareOperation( "HomomorphismByUnion",
    [ IsMagmaWithObjects, IsMagmaWithObjects, IsHomogeneousList ] );
DeclareOperation( "MagmaHomomorphismFromSinglePieceGeneratorsImages",
  [ IsSinglePiece, IsSinglePiece, IsHomogeneousList, IsHomogeneousList ] );

############################################################################# 
## 
#O  IsomorphismNewObjects( <mag>, <obs> )
## 
DeclareOperation( "IsomorphismNewObjects", 
    [ IsDomainWithObjects, IsHomogeneousList ] );

############################################################################# 
## 
#A  PieceImages( <map> )
#A  HomsOfMapping( <map> ) 
#A  PiecesOfMapping( <map> )                                    
#A  Partition OfSource( <map> )
#A  ImagesOfObjects( <map> ) 
#A  LeftProdsOfRays( <map> ) 
## 
DeclareAttribute( "PieceImages", IsHomomorphismToSinglePieceRep );
DeclareAttribute( "HomsOfMapping", IsHomomorphismToSinglePiece );  
DeclareAttribute( "PiecesOfMapping", IsHomomorphismWithObjectsRep );  
DeclareAttribute( "PartitionOfSource", IsHomomorphismWithObjectsRep );
DeclareAttribute( "ImagesOfObjects", IsMagmaWithObjectsHomomorphism ); 
DeclareAttribute( "LeftProdsOfRays", IsMagmaWithObjectsHomomorphism ); 

############################################################################# 
## 
#P  IsInjectiveWithObjects( <map> )                        
#P  IsSurjectiveWithObjects( <map> )                        
#P  IsBijectiveWithObjects( <map> ) 
#P  IsEndomorphismWithObjects( <map> ) 
#P  IsAutomorphismWithObjects( <map> ) 
##
DeclareProperty( "IsInjectiveWithObjects", IsMagmaWithObjectsHomomorphism );  
DeclareProperty( "IsSurjectiveWithObjects", IsMagmaWithObjectsHomomorphism );  
DeclareProperty( "IsBijectiveWithObjects", IsMagmaWithObjectsHomomorphism );  
DeclareProperty( "IsEndomorphismWithObjects", IsMagmaWithObjectsHomomorphism );
DeclareProperty( "IsAutomorphismWithObjects", IsMagmaWithObjectsHomomorphism );
  
############################################################################# 
## 
#A  InverseMapping( <map> )                                    
## 
DeclareAttribute( "InverseMapping",
    IsMagmaWithObjectsHomomorphism and IsInjectiveWithObjects 
                                   and IsSurjectiveWithObjects );  
  
############################################################################## 
## 
#E  mwohom.gd  . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here 
## 
