##############################################################################
##
##  obj3.gd                      XMOD Package                    Chris Wensley
##
##  Declaration file for functions of the XMOD package.
##
#H  @(#)$Id: obj3.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/obj3_gd") := 
   "@(#)$Id: obj3.gd,v 2.007 2006/07/05 gap Exp $";

#############################################################################
##
#P  Is3dObject( <obj> ) 
#R  IsPreXSqObj ( <obj> ) 
##  A pre-crossed square is a square of pre-crossed modules 
#R  IsPreCat20bj( <obj> ) 
##  A pre-cat2-group is a square of pre-cat1 groups
##
DeclareProperty( "Is3dObject", IsObject );
DeclareRepresentation( "IsPreXSqObj", IsObject and IsAttributeStoringRep,
    [ "up2d", "down2d", "left2d", "right2d", "action", "pairing" ] );
DeclareRepresentation( " IsPreCat20bj ", IsObject and IsAttributeStoringRep,
    [ "up2d", "down2d", "left2d", "right2d" ] );

#############################################################################
##
#P  IsPerm3dObject( <obj> ) 
#P  IsFp3dObject( <obj> ) 
#P  IsPc3dObject( <obj> )
##
DeclareProperty( "IsPerm3dObject", Is3dObject );
DeclareProperty( "IsFp3dObject", Is3dObject );
DeclareProperty( "IsPc3dObject", Is3dObject );

#############################################################################
##
#P  IsPreXSq( <PM> } 
#P  IsPermPreXSq( <PM> ) 
#P  IsFpPreXSq( <PM> ) 
#P  IsPcPreXSq( <PM> }
##
DeclareProperty( "IsPreXSq", Is3dObject );
DeclareSynonym( "IsPermPreXSq", IsPreXSq and IsPerm3dObject );
DeclareSynonym( "IsFpPreXSq", IsPreXSq and IsFp3dObject );
DeclareSynonym( "IsPcPreXSq", IsPreXSq and IsPc3dObject );

#############################################################################
##
#P  IsXSq( <PM> ) 
#P  IsPermXSq( <XS> } 
#P  IsFpXSq( <XS> ) 
#P  IsPcXSq( <XS> )
##
DeclareProperty( "IsXSq", Is3dObject );
InstallTrueMethod( IsPreXSq, IsXSq );
DeclareSynonym( "IsPermXSq", IsXSq and IsPerm3dObject );
DeclareSynonym( "IsFpXSq", IsXSq and IsFp3dObject );
DeclareSynonym( "IsPcXSq", IsXSq and IsPc3dObject );

#############################################################################
##
#P  IsXPair( <map> )
#R  IsXPairObj( <obj> )
#O  XPairObj( <src>, <rng>, <map> )
#A  XPairMap( <xp> )
#O  ImageElmXPair( <xp>, <elm> ) 
##
DeclareProperty( "IsXPair", IsGeneralMapping );
DeclareRepresentation( "IsXPairObj", 
    IsXPair and IsAttributeStoringRep,
    [ "Source", "Range", "XPairMap" ] );
DeclareOperation( "XPairObj", 
    [ IsList, IsGroup, IsGeneralMapping ] );
DeclareAttribute( "XPairMap", IsXPair );
DeclareOperation( "ImageElmXPair", [ IsXPair, IsObject ] );

#############################################################################
##
#O  XPairByNormalSubgroups
#O  XPairByDerivations
##
DeclareOperation( "XPairByNormalSubgroups", 
    [ IsGroup, IsGroup, IsGroup ] );
DeclareOperation( "XPairByDerivations", [ IsXMod ] );

#############################################################################
##
#P  IsPreCat2( <PCG> ) 
#P  IsPermPreCat2( <PCG> ) 
#P  IsFpPreCat2( <PCG> ) 
#P  IsPcPreCat2( <PCG> )
##
DeclareProperty( "IsPreCat2", Is3dObject );
DeclareSynonym( "IsPermPreCat2", IsPreCat2 and IsPerm3dObject );
DeclareSynonym( "IsFpPreCat2", IsPreCat2 and IsFp3dObject ); 
DeclareSynonym( "IsPcPreCat2", IsPreCat2 and IsPc3dObject );

#############################################################################
##
#P  IsCat2( <C1G> ) 
#P  IsPermCat2( <CG> ) 
#P  IsFpCat2( <CG> ) 
#P  IsPcCat2( <CG> )
##
DeclareProperty( "IsCat2", Is3dObject );
DeclareSynonym( "IsPermCat2", IsCat2 and IsPerm3dObject );
DeclareSynonym( "IsFpCat2", IsCat2 and IsFp3dObject );
DeclareSynonym( "IsPcCat2", IsCat2 and IsPc3dObject );

#############################################################################
##
#0  PreXSqObj( <bdy>, <act> ) 
#A  Up2dObject( <PS> ) 
#A  Down2dObject ( <PS> ) 
#A  Left2dObject( <PS> ) 
#A  Right2dObject( <PS> ) 
#A  DiagonalAction( <PS> ) 
#A  XPair( <PS> )
##
DeclareOperation( "PreXSqObj", 
    [ IsPreXMod, IsPreXMod, IsPreXMod, IsPreXMod, IsObject, IsObject] );
DeclareAttribute( "Up2dObject", IsPreXSq );
DeclareAttribute( "Left2dObject", IsPreXSq );
DeclareAttribute( "Down2dObject", IsPreXSq );
DeclareAttribute( "Right2dObject", IsPreXSq );
DeclareAttribute( "DiagonalAction", IsPreXSq );
DeclareAttribute( "XPair", IsPreXSq );

#############################################################################
##
#F  XSq( <args> ) 
#0  AsXSq( <arg> ) 
#0  XSqByXMods( <up>, <left>, <down>, <right>, <action>, <pairing> ) 
#0  XSqByNormalSubgroups( <P>, <N>, <M>, <L> )
#A  ActorXSq( <xmod> )
#A  Transpose3dObject( <xsq> )
##
DeclareGlobalFunction( "XSq" );
DeclareOperation( "XSqByXMods", 
  [ IsXMod, IsXMod, IsXMod, IsXMod, IsGroupHomomorphism, IsXPair ] );
DeclareOperation( "XSqByNormalSubgroups", 
    [ IsGroup, IsGroup, IsGroup, IsGroup ] );
DeclareAttribute( "ActorXSq", IsXMod );
DeclareAttribute( "Transpose3dObject", Is3dObject );

#############################################################################
##
#P  IsTrivialAction3dObject( <obj> ) 
#P  IsNormalSub3dObject( <obj> ) 
#P  IsAutomorphismGroup3dObject( <XS> ) 
#P  IsAbelianSquare3dObject( <obj> ) 
#P  IsFreeXSq( <XS> )
##
DeclareProperty( "IsTrivialAction3dObject", Is3dObject );
DeclareProperty( "IsNormalSub3dObject", Is3dObject );
DeclareProperty( "IsCentralExtension3dObject", Is3dObject );
DeclareProperty( "IsAutomorphismGroup3dObject", Is3dObject );
DeclareProperty( "IsAbelianSquare3dObject", Is3dObject );
DeclareProperty( "IsFreeXSq", IsPreXSqObj );

#############################################################################
##
#0  IsSubPreXSq( <obj> ) 
#0  IsSubXSq( <obj> ) 
#0  IsSubPreCat2( <obj> ) 
#0  IsSubCat2( <obj> )
##
DeclareOperation( "IsSubPreXSq", [ Is3dObject, Is3dObject ] );
DeclareOperation( "IsSubXSq", [ Is3dObject, Is3dObject ] );
DeclareOperation( "IsSubPreCat2", [ Is3dObject, Is3dObject ] );
DeclareOperation( "IsSubCat2", [ Is3dObject, Is3dObject ] );

##############################################################################
##
#0  Sub3dObject( <obj>, <src>, <rng> ) 
#0  SubPreXSq( <PM, Ssrc, Srng> ) 
#0  SubXSq( <PM, Ssrc, Srng> ) 
#0  SubPreCat2( <C>, <H> )
##
DeclareOperation( "Sub3dObject", [ Is3dObject, IsGroup, IsGroup ] );
DeclareOperation( "SubPreXSq", [ IsPreXSq, IsGroup, IsGroup ] );
DeclareOperation( "SubXSq", [ IsXSq, IsGroup, IsGroup ] );
DeclareOperation( "SubPreCat2", [ IsPreCat2, IsGroup, IsGroup ] );
DeclareOperation( "SubCat2", [ IsCat2, IsGroup, IsGroup ] );

#############################################################################
##
#0  IdentitySub3dObject( <obj> ) 
#A  IdentitySubPreXSq( <obj> ) 
#A  IdentitySubXSq( <obj> ) 
#A  IdentitySubPreCat2( <obj> ) 
#A  IdentitySubCat2( <obj> ) 
#P  IsIdentityCat2( <C1G> )
##
DeclareOperation( "IdentitySub3dObject", [ Is3dObject ] );
DeclareAttribute( "IdentitySubPreXSq", IsPreXSq );
DeclareAttribute( "IdentitySubXSq", IsXSq );
DeclareAttribute( "IdentitySubPreCat2", IsPreCat2 );
DeclareAttribute( "IdentitySubCat2", IsCat2 );
DeclareProperty( "IsIdentityCat2", IsCat2 );

#############################################################################
##
#0  PreCat20bj ( <arg> ) 
#A  Up2dObject( <PCG> ) 
#A  Down2dObject( <PCG> ) 
#A  Left2dObject( <PCG> ) 
#A  Right2dObject( <PCG> ) 
##
DeclareOperation( "PreCat20bj", 
    [ IsPreCat1, IsPreCat1, IsPreCat1, IsPreCat1 ] );
DeclareAttribute( "Up2dObject", IsPreCat2 );
DeclareAttribute( "Down2dObject", IsPreCat2 );
DeclareAttribute( "Left2dObject", IsPreCat2 ); 
DeclareAttribute( "Right2dObject", IsPreCat2 );

#############################################################################
##
#F  PreCat2( <arg> ) 
#0  PreCat2ByPreCat1s( <up>, <down>, <left>, <right> )
##
DeclareGlobalFunction( "PreCat2" );
DeclareOperation( "PreCat2ByPreCat1s ", 
    [ IsPreCat1, IsPreCat1, IsPreCat1, IsPreCat1 ] );

#############################################################################
##
#0  PreXSqByPreCat2( <PCG> ) 
#0  PreCat2ByPreXSq( <PS> } 
#A  XSqOfCat2( <C1G> } 
#0  XSqByCat2( <C1G> } 
#A  Cat20fXSq( <XS> ) 
#0  Cat2ByXSq( <XS> )
##
DeclareOperation( "PreXSqByPreCat2", [ IsPreCat2 ] );
DeclareOperation( "PreCat2ByPreXSq", [ IsPreXSq ] );
DeclareAttribute( "XSqOfCat2", IsCat2 );
DeclareOperation( "XSqByCat2", [ IsCat2 ] );
DeclareAttribute( "Cat20fXSq", IsXSq );
DeclareOperation( "Cat2ByXSq", [ IsXSq ] );

#############################################################################
##
#F  Cat2( <arg> }
##
DeclareGlobalFunction( "Cat2" );

#############################################################################
##
#A  DirectProduct3dInfo( <D> }
##
DeclareAttribute( "DirectProduct3dInfo", Is3dObject, "mutable" );

#############################################################################
##
#A  NormalSubXSqs( <XS> } #A NormalSubXCat2s( <C1G> }
##
DeclareAttribute( "NormalSubXSqs", IsXSq ); 
DeclareAttribute( "NormalSubCat2s", IsCat2 );

#############################################################################
##
#E obj3.gd ........................................................ ends here
