##############################################################################
##
#W  gpdmor.gd                  Gpd Package                       Chris Wensley
#W                                                                & Emma Moore
##
##  Declaration file for functions in the Gpd package.
##
#H  @(#)$Id: gpdmor.gd,v 1.01 2006/05/16 gap Exp $
##
#Y  Copyright (C) 1999,2001 University of St. Andrews, North Haugh,
#Y                          St. Andrews, Fife KY16 9SS, Scotland
##
Revision.("gpd/gap/gpdmor_gd") := 
   "@(#)$Id: gpdmor.gd,v 1.01 2006/05/16 gap Exp $";

############################################################################## 
## 
#P  IsMathCatMapping( <map> )
#P  IsMathCatMorphism( <mor> )
#P  IsGroupoidMorphism( <mor> )                
## 
##  Category and groupoid morphism declarations
## 
DeclareProperty( "IsMathCatMapping", IsGeneralMapping );
DeclareProperty( "IsMathCatMorphism", 
    IsMathCatMapping and RespectsMultiplication and RespectsOne );
DeclareProperty( "IsGroupoidMorphism", IsMathCatMorphism and RespectsInverses);

############################################################################## 
## 
#R  IsMorphismToConnectedGroupoidRep( <mor> )                
#R  IsGroupoidMorphismRep( <mor> )
## 
##  A morphism to a connected groupoid is determined by:
##     homomorphisms from each group in the source to the range group,
##     images for the objects.
##  A morphism whose range has more than one component 
##     requires a different representation.
## 
DeclareRepresentation( "IsMorphismToConnectedGroupoidRep",
    IsGroupoidMorphism and IsAttributeStoringRep, 
    [ "Source", "Range", "ComponentImages" ] ); 
DeclareRepresentation( "IsGroupoidMorphismRep", 
    IsGroupoidMorphism and IsAttributeStoringRep,
    [ "Source", "Range", "ComponentsOfMorphism" ] );

############################################################################## 
## 
#P  IsMorphismToConnectedGroupoid( <mor> )
## 
##  A morphism to a connected groupoid is: 
##      a list of homomorphisms from the components of the source, 
##      a list of lists of images of objects
## 
DeclareProperty( "IsMorphismToConnectedGroupoid",
    IsMorphismToConnectedGroupoidRep );  

############################################################################# 
## 
#F  GroupoidMorphism( <args> )              
## 
DeclareGlobalFunction( "GroupoidMorphism" );

############################################################################# 
## 
#O  MorphismToConnectedGroupoidNC( <src>, <rng>, <comp> )  
#O  MorphismToConnectedGroupoid( <src>, <rng>, <comp> )  
#O  MorphismOfConnectedGroupoids( <src>, <rng>, <imo>, <hom> )  
#O  GroupoidMorphismWithCommonRange( <src>, <rng>, <mors> )
#O  GroupoidMorphismByComponentsNC( <g1>, <g2>, <mors> )  
#O  GroupoidMorphismByComponents( <g1>, <g2>, <list> )  
#O  GroupoidMorphismByUnion( <comps> )
## 
DeclareOperation( "MorphismToConnectedGroupoidNC",
  [ IsGroupoid, IsConnectedGroupoid, IsHomogeneousList ] );
DeclareOperation( "MorphismToConnectedGroupoid",
  [ IsGroupoid, IsConnectedGroupoid, IsHomogeneousList ] );
DeclareOperation( "MorphismOfConnectedGroupoids",
  [ IsConnectedGroupoid, IsConnectedGroupoid, IsHomogeneousList, 
    IsGroupHomomorphism ] );
DeclareOperation( "GroupoidMorphismWithCommonRange", 
    [ IsGroupoid, IsConnectedGroupoid, IsHomogeneousList ] );
DeclareOperation( "GroupoidMorphismByComponentsNC",
    [ IsGroupoid, IsGroupoid, IsHomogeneousList ] );
DeclareOperation( "GroupoidMorphismByComponents",
    [ IsGroupoid, IsGroupoid, IsHomogeneousList ] );
DeclareOperation( "GroupoidMorphismByUnion", [ IsHomogeneousList ] );

############################################################################# 
## 
#O  IsomorphismNewObjects( <gpd>, <obs> )
#A  IsomorphismPermGroupoid( <gpd> )
#A  IsomorphismSmallPermGroupoid( <gpd> )
DeclareOperation( "IsomorphismNewObjects", [ IsGroupoid, IsHomogeneousList ] );
DeclareAttribute( "IsomorphismPermGroupoid", IsGroupoid );
DeclareAttribute( "IsomorphismSmallPermGroupoid", IsGroupoid );

############################################################################# 
## 
#A  ComponentImages( <mor> )
## #A  HomsOfMorphism( <mor> ) 
#A  ComponentsOfMorphism( <mor> )                                    
#A  Partition OfSource( <mor> )
#A  ImagesOfObjects( <mor> ) 
## 
DeclareAttribute( "ComponentImages", IsMorphismToConnectedGroupoidRep );
## DeclareAttribute( "HomsOfMorphism", IsMorphismToConnectedGroupoid );  
DeclareAttribute( "ComponentsOfMorphism", IsGroupoidMorphismRep );  
DeclareAttribute( "PartitionOfSource", IsGroupoidMorphismRep );
DeclareAttribute( "ImagesOfObjects", IsGroupoidMorphism );  

############################################################################# 
## 
#P  IsInjectiveOnObjects( <mor> )                        
#P  IsSurjectiveOnObjects( <mor> )                        
#P  IsBijectiveOnObjects( <mor> )                        
##
DeclareProperty( "IsInjectiveOnObjects", IsGroupoidMorphism );  
DeclareProperty( "IsSurjectiveOnObjects", IsGroupoidMorphism );  
DeclareProperty( "IsBijectiveOnObjects", IsGroupoidMorphism );  
  
############################################################################# 
## 
#P  IsGroupoidEndomorphism( <mor> )                        
#P  IsGroupoidAutomorphism( <mor> )                        
##
DeclareProperty( "IsGroupoidEndomorphism", IsGroupoidMorphism );  
DeclareProperty( "IsGroupoidAutomorphism", IsGroupoidMorphism );  
  
############################################################################# 
## 
#A  InverseMorphism( <mor> )                                    
## 
DeclareAttribute( "InverseMorphism",
    IsGroupoidMorphism and IsInjective and IsSurjective );  
  
############################################################################# 
## 
#O  InclusionMappingGroupoids( <G>, <H> )
#O  RestrictionMappingGroupoids( <hom>, <src>, <rng> )
## #O  MappingToIdentityGroupoid( <G>, <H> )
## 
DeclareOperation( "InclusionMappingGroupoids", [ IsGroupoid, IsGroupoid ] );
DeclareOperation( "RestrictionMappingGroupoids", 
    [ IsGroupoidMorphism, IsGroupoid, IsGroupoid ] );

############################################################################## 
## 
#E  gpdmor.gd  . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here 
## 
