##############################################################################
##
#W  obj2.gd                        XMOD Package                  Chris Wensley
#W                                                                 & Murat Alp
##
##  Declaration file for functions of the XMOD package.
##
#H  @(#)$Id: obj2.gd,v 2.007 2006/07/05 gap Exp $
##
#Y  Copyright (C) 1999,2001 University of St. Andrews, North Haugh,
#Y                          St. Andrews, Fife KY16 9SS, Scotland
##
Revision.("xmod/gap/obj2_gd") := 
   "@(#)$Id: obj2.gd,v 2.007 2006/07/05 gap Exp $";

#############################################################################
##
#V  InfoXMod
##
DeclareInfoClass( "InfoXMod" );

#############################################################################
##
#P  Is2dObject( <obj> )
#R  IsPreXModObj( <obj> )
##    A pre-crossed module is a group homomorphism which preserves an action
#R  IsPreCat1Obj( <obj> )
##    A pre-cat1-group is a pair of group endomorphisms with a common image
##
DeclareProperty( "Is2dObject", IsObject );
DeclareRepresentation( "IsPreXModObj", IsObject and IsAttributeStoringRep,
      [ "boundary", "action" ] );
DeclareRepresentation( "IsPreCat1Obj", IsObject and IsAttributeStoringRep,
    [ "tail", "head", "rangeEmbedding" ] );

#############################################################################
##
#P  IsPerm2dObject( <obj> )
#P  IsFp2dObject( <obj> )
#P  IsPc2dObject( <obj> )
##
DeclareProperty( "IsPerm2dObject", Is2dObject );
DeclareProperty( "IsFp2dObject", Is2dObject );
DeclareProperty( "IsPc2dObject", Is2dObject );

#############################################################################
##
#P  IsPreXMod( <PM> )
#P  IsPermPreXMod( <PM> )
#P  IsFpPreXMod( <PM> )
#P  IsPcPreXMod( <PM> )
##
DeclareProperty( "IsPreXMod", Is2dObject );
DeclareSynonym( "IsPermPreXMod", IsPreXMod and IsPerm2dObject );
DeclareSynonym( "IsFpPreXMod", IsPreXMod and IsFp2dObject );
DeclareSynonym( "IsPcPreXMod", IsPreXMod and IsPc2dObject );

#############################################################################
##
#P  IsXMod( <PM> )
#P  IsPermXMod( <XM> )
#P  IsFpXMod( <XM> )
#P  IsPcXMod( <XM> )
##
DeclareProperty( "IsXMod", Is2dObject );
InstallTrueMethod( IsPreXMod, IsXMod );
DeclareSynonym( "IsPermXMod", IsXMod and IsPerm2dObject );
DeclareSynonym( "IsFpXMod", IsXMod and IsFp2dObject );
DeclareSynonym( "IsPcXMod", IsXMod and IsPc2dObject );

#############################################################################
##
#P  IsPreCat1( <PCG> )
#P  IsPermPreCat1( <PCG> )
#P  IsFpPreCat1( <PCG> )
#P  IsPcPreCat1( <PCG> )
##
DeclareProperty( "IsPreCat1", Is2dObject );
DeclareSynonym( "IsPermPreCat1", IsPreCat1 and IsPerm2dObject );
DeclareSynonym( "IsFpPreCat1", IsPreCat1 and IsFp2dObject );
DeclareSynonym( "IsPcPreCat1", IsPreCat1 and IsPc2dObject );

#############################################################################
##
#P  IsCat1( <C1G> )
#P  IsPermCat1( <CG> )
#P  IsFpCat1( <CG> )
#P  IsPcCat1( <CG> )
##
DeclareProperty( "IsCat1", Is2dObject );
DeclareSynonym( "IsPermCat1", IsCat1 and IsPerm2dObject );
DeclareSynonym( "IsFpCat1", IsCat1 and IsFp2dObject );
DeclareSynonym( "IsPcCat1", IsCat1 and IsPc2dObject );

#############################################################################
##
#O  PreXModObj( <bdy>, <act> )
#A  Boundary( <PM> )
#A  AutoGroup( <PM> )
#A  XModAction( <PM> )
##
DeclareOperation( "PreXModObj",
    [ IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareAttribute( "Boundary", IsPreXMod );
DeclareAttribute( "AutoGroup", IsPreXMod );
DeclareAttribute( "XModAction", IsPreXMod );

#############################################################################
##
#A  PeifferSubgroup( <obj> )
#O  PeifferSubgroupPreXMod( <PM> )
#O  PeifferSubgroupPreCat1( <P1C> )
##
DeclareAttribute( "PeifferSubgroup", Is2dObject );
DeclareOperation( "PeifferSubgroupPreXMod", [ IsPreXMod ] );
DeclareOperation( "PeifferSubgroupPreCat1", [ IsPreCat1 ] );

#############################################################################
##
#O  PreXModByBoundaryAndAction( <bdy>, <act> )
##
DeclareOperation( "PreXModByBoundaryAndAction",
   [ IsGroupHomomorphism, IsGroupHomomorphism ] );

#############################################################################
##
#F  XMod( <args> )
#O  AsXMod( <arg> )
#O  XModByBoundaryAndAction( <bdy>, <act> )
#O  XModByTrivialAction( <f> )
#O  XModByNormalSubgroup( <G>, <N> )
#O  XModByCentralExtension( <hom> )
#O  XModByGroupOfAutomorphisms( <G>, <A> )
#F  XModByAutomorphismGroup( <args> )
#A  XModByInnerAutomorphismGroup( <G> )
#O  XModByAbelianModule( <R> )
#A  XModByPeifferQuotient( <PM> )
##
DeclareGlobalFunction( "XMod" );
DeclareOperation( "AsXMod", [ IsObject ] );
DeclareOperation( "XModByBoundaryAndAction",
   [ IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareOperation( "XModByTrivialAction", [ IsGroupHomomorphism ] );
DeclareOperation( "XModByNormalSubgroup", [ IsGroup, IsGroup ] );
DeclareOperation( "XModByCentralExtension", [ IsGroupHomomorphism ] );
DeclareOperation( "XModByGroupOfAutomorphisms", 
    [ IsGroup, IsGroupOfAutomorphisms ] );
DeclareGlobalFunction( "XModByAutomorphismGroup" );
DeclareAttribute( "XModByInnerAutomorphismGroup", IsGroup );
DeclareOperation( "XModByAbelianModule", [ IsAbelianModule ] );
DeclareAttribute( "XModByPeifferQuotient", IsPreXMod );

#############################################################################
##
#P  IsTrivialAction2dObject( <obj> )
#P  IsNormalSub2dObject( <obj> )
#P  IsCentralExtension2dObject( <obj> )
#P  IsAutomorphismGroup2dObject( <XM> )
#P  IsAbelianModule2dObject( <obj> )
#P  IsFreeXMod( <XM> )
##
DeclareProperty( "IsTrivialAction2dObject", Is2dObject );
DeclareProperty( "IsNormalSub2dObject", Is2dObject );
DeclareProperty( "IsCentralExtension2dObject", Is2dObject );
DeclareProperty( "IsAutomorphismGroup2dObject", Is2dObject );
DeclareProperty( "IsAbelianModule2dObject", Is2dObject );
DeclareProperty( "IsFreeXMod", IsPreXModObj );

#############################################################################
##
#O  IsSubPreXMod( <obj> )
#O  IsSubXMod( <obj> )
#O  IsSubPreCat1( <obj> )
#O  IsSubCat1( <obj> )
##
DeclareOperation( "IsSubPreXMod", [ Is2dObject, Is2dObject ] );
DeclareOperation( "IsSubXMod", [ Is2dObject, Is2dObject ] );
DeclareOperation( "IsSubPreCat1", [ Is2dObject, Is2dObject ] );
DeclareOperation( "IsSubCat1", [ Is2dObject, Is2dObject ] );

##############################################################################
##
#O  Sub2dObject( <obj>, <src>, <rng> )
#O  SubPreXMod( <PM, Ssrc, Srng> )
#O  SubXMod( <PM, Ssrc, Srng> )
#O  SubPreCat1( <C>, <H> )                           
##
DeclareOperation( "Sub2dObject", [ Is2dObject, IsGroup, IsGroup ] );
DeclareOperation( "SubPreXMod", [ IsPreXMod, IsGroup, IsGroup ] );
DeclareOperation( "SubXMod", [ IsXMod, IsGroup, IsGroup ] );
DeclareOperation( "SubPreCat1", [ IsPreCat1, IsGroup, IsGroup ] );
DeclareOperation( "SubCat1", [ IsCat1, IsGroup, IsGroup ] );

#############################################################################
##
#O  IdentitySub2dObject( <obj> )
#A  IdentitySubPreXMod( <obj> )
#A  IdentitySubXMod( <obj> )
#A  IdentitySubPreCat1( <obj> )
#A  IdentitySubCat1( <obj> )
#P  IsIdentityCat1( <C1G> )
##
DeclareOperation( "IdentitySub2dObject", [ Is2dObject ] );
DeclareAttribute( "IdentitySubPreXMod", IsPreXMod );
DeclareAttribute( "IdentitySubXMod", IsXMod );
DeclareAttribute( "IdentitySubPreCat1", IsPreCat1 );
DeclareAttribute( "IdentitySubCat1", IsCat1 );
DeclareProperty( "IsIdentityCat1", IsCat1 );

#############################################################################
##
#O  PreCat1Obj( <arg> )
#A  Head( <PCG> )
#A  Tail( <PCG> )
#A  RangeEmbedding( <PCG> )
#A  KernelEmbedding( <C> )
##
DeclareOperation( "PreCat1Obj",
    [ IsGroupHomomorphism, IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareAttribute( "Head", IsPreCat1 );
DeclareAttribute( "Tail", IsPreCat1 );
DeclareAttribute( "RangeEmbedding", IsPreCat1 );
DeclareAttribute( "KernelEmbedding", IsPreCat1 );

#############################################################################
##
#F  PreCat1( <arg> )
#O  PreCat1ByTailHeadEmbedding( <t>, <h>, <e> )
#O  PreCat1ByEndomorphisms( <tail>, <head> )
#O  PreCat1ByNormalSubgroup( <G>, <N> )
#A  Reverse( <PCG> )
##
DeclareGlobalFunction( "PreCat1" );
DeclareOperation( "PreCat1ByTailHeadEmbedding",
    [ IsGroupHomomorphism, IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareOperation( "PreCat1ByEndomorphisms",
    [ IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareOperation( "PreCat1ByNormalSubgroup", [ IsGroup, IsGroup ] );
DeclareAttribute( "Reverse", IsPreCat1 );

#############################################################################
##
#O  PreXModByPreCat1( <PCG> )
#O  PreCat1ByPreXMod( <PM> )
#A  XModOfCat1( <C1G> )
#O  XModByCat1( <C1G> )
#A  Cat1OfXMod( <XM> )
#O  Cat1ByXMod( <XM> )
##
DeclareOperation( "PreXModByPreCat1", [ IsPreCat1 ] );
DeclareOperation( "PreCat1ByPreXMod", [ IsPreXMod ] );
DeclareAttribute( "XModOfCat1", IsCat1 );
DeclareOperation( "XModByCat1", [ IsCat1 ] );
DeclareAttribute( "Cat1OfXMod", IsXMod );
DeclareOperation( "Cat1ByXMod", [ IsXMod ] );

#############################################################################
##
#A  SourceEmbedding( <XM> )
##
##  homomorphism from Source(XM) to Source(Cat1OfXMod(XM))
##
DeclareAttribute( "SourceEmbedding", IsPreXMod );

#############################################################################
##
#F  Cat1( <arg> )
#O  Cat1Select( <size>, <gpnum>, <num> )
#O  Cat1ByPeifferQuotient( <PM> )
##
DeclareGlobalFunction( "Cat1" );
DeclareOperation( "Cat1Select", [ IsInt, IsInt, IsInt ] );
DeclareOperation( "Cat1ByPeifferQuotient", [ IsPreCat1 ] );

#############################################################################
##
#A  DirectProduct2dInfo( <D> )
##
DeclareAttribute( "DirectProduct2dInfo", Is2dObject, "mutable" );

#############################################################################
##
#A  NormalSubXMods( <XM> )
#A  NormalSubXCat1s( <C1G> )
##
DeclareAttribute( "NormalSubXMods", IsXMod );
DeclareAttribute( "NormalSubCat1s", IsCat1 );

#############################################################################
##
#E  obj2.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here

