##############################################################################
##
##  gp3obj.gd                 GAP4 package `XMod'                Chris Wensley
##
##  Declaration file for functions of the XMOD package.
##
#H  @(#)Id: "xmod/gap/gp3obj.gd", v.2.11 2008/05/02 
## 
##  This file declares generic methods for (pre-)crossed squares and
##  (pre-)cat2-groups.
##
#Y  Copyright (C) 2008, Chris Wensley,  
#Y  School of Computer Science, Bangor University, U.K. 
#Y
#Y  This program is free software; you can redistribute it and/or
#Y  modify it under the terms of the GNU General Public License
#Y  as published by the Free Software Foundation; either version 2
#Y  of the License, or (at your option) any later version.
#Y
#Y  This program is distributed in the hope that it will be useful,
#Y  but WITHOUT ANY WARRANTY; without even the implied warranty of
#Y  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
#Y  See the GNU General Public License for more details.
#Y
#Y  You should have received a copy of the GNU General Public License along 
#Y  with this program; if not, write to the Free Software Foundation, Inc., 
#Y  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 

#############################################################################
##
#P  Is3dDomain( <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( "Is3dDomain", IsDomain );
DeclareRepresentation( "IsPreXSqObj", Is3dDomain and IsAttributeStoringRep,
    [ "up2d", "down2d", "left2d", "right2d", "action", "pairing" ] );
DeclareRepresentation( " IsPreCat20bj ", IsObject and IsAttributeStoringRep,
    [ "up2d", "down2d", "left2d", "right2d" ] );

#############################################################################
##
#P  IsPerm3dDomain( <obj> ) 
#P  IsFp3dDomain( <obj> ) 
#P  IsPc3dDomain( <obj> )
##
DeclareProperty( "IsPerm3dDomain", Is3dDomain );
DeclareProperty( "IsFp3dDomain", Is3dDomain );
DeclareProperty( "IsPc3dDomain", Is3dDomain );

#############################################################################
##
#P  IsPreXSq( <PM> } 
#P  IsPermPreXSq( <PM> ) 
#P  IsFpPreXSq( <PM> ) 
#P  IsPcPreXSq( <PM> }
##
DeclareProperty( "IsPreXSq", Is3dDomain );
DeclareSynonym( "IsPermPreXSq", IsPreXSq and IsPerm3dDomain );
DeclareSynonym( "IsFpPreXSq", IsPreXSq and IsFp3dDomain );
DeclareSynonym( "IsPcPreXSq", IsPreXSq and IsPc3dDomain );

#############################################################################
##
#P  IsXSq( <PM> ) 
#P  IsPermXSq( <XS> } 
#P  IsFpXSq( <XS> ) 
#P  IsPcXSq( <XS> )
##
DeclareProperty( "IsXSq", Is3dDomain );
InstallTrueMethod( IsPreXSq, IsXSq );
DeclareSynonym( "IsPermXSq", IsXSq and IsPerm3dDomain );
DeclareSynonym( "IsFpXSq", IsXSq and IsFp3dDomain );
DeclareSynonym( "IsPcXSq", IsXSq and IsPc3dDomain );

#############################################################################
##
#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", Is3dDomain );
DeclareSynonym( "IsPermPreCat2", IsPreCat2 and IsPerm3dDomain );
DeclareSynonym( "IsFpPreCat2", IsPreCat2 and IsFp3dDomain ); 
DeclareSynonym( "IsPcPreCat2", IsPreCat2 and IsPc3dDomain );

#############################################################################
##
#P  IsCat2( <C1G> ) 
#P  IsPermCat2( <CG> ) 
#P  IsFpCat2( <CG> ) 
#P  IsPcCat2( <CG> )
##
DeclareProperty( "IsCat2", Is3dDomain );
DeclareSynonym( "IsPermCat2", IsCat2 and IsPerm3dDomain );
DeclareSynonym( "IsFpCat2", IsCat2 and IsFp3dDomain );
DeclareSynonym( "IsPcCat2", IsCat2 and IsPc3dDomain );

#############################################################################
##
#0  PreXSqObj( <bdy>, <act> ) 
#A  Up2dDomain( <PS> ) 
#A  Down2dDomain ( <PS> ) 
#A  Left2dDomain( <PS> ) 
#A  Right2dDomain( <PS> ) 
#A  DiagonalAction( <PS> ) 
#A  XPair( <PS> )
##
DeclareOperation( "PreXSqObj", 
    [ IsPreXMod, IsPreXMod, IsPreXMod, IsPreXMod, IsObject, IsObject] );
DeclareAttribute( "Up2dDomain", IsPreXSq );
DeclareAttribute( "Left2dDomain", IsPreXSq );
DeclareAttribute( "Down2dDomain", IsPreXSq );
DeclareAttribute( "Right2dDomain", 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  Transpose3dDomain( <xsq> )
##
DeclareGlobalFunction( "XSq" );
DeclareOperation( "XSqByXMods", 
  [ IsXMod, IsXMod, IsXMod, IsXMod, IsGroupHomomorphism, IsXPair ] );
DeclareOperation( "XSqByNormalSubgroups", 
    [ IsGroup, IsGroup, IsGroup, IsGroup ] );
DeclareAttribute( "ActorXSq", IsXMod );
DeclareAttribute( "Transpose3dDomain", Is3dDomain );

#############################################################################
##
#P  IsTrivialAction3dDomain( <obj> ) 
#P  IsNormalSub3dDomain( <obj> ) 
#P  IsAutomorphismGroup3dDomain( <XS> ) 
#P  IsAbelianSquare3dDomain( <obj> ) 
#P  IsFreeXSq( <XS> )
##
DeclareProperty( "IsTrivialAction3dDomain", Is3dDomain );
DeclareProperty( "IsNormalSub3dDomain", Is3dDomain );
DeclareProperty( "IsCentralExtension3dDomain", Is3dDomain );
DeclareProperty( "IsAutomorphismGroup3dDomain", Is3dDomain );
DeclareProperty( "IsAbelianSquare3dDomain", Is3dDomain );
DeclareProperty( "IsFreeXSq", IsPreXSqObj );

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

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

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

#############################################################################
##
#0  PreCat20bj ( <arg> ) 
#A  Up2dDomain( <PCG> ) 
#A  Down2dDomain( <PCG> ) 
#A  Left2dDomain( <PCG> ) 
#A  Right2dDomain( <PCG> ) 
##
DeclareOperation( "PreCat20bj", 
    [ IsPreCat1, IsPreCat1, IsPreCat1, IsPreCat1 ] );
DeclareAttribute( "Up2dDomain", IsPreCat2 );
DeclareAttribute( "Down2dDomain", IsPreCat2 );
DeclareAttribute( "Left2dDomain", IsPreCat2 ); 
DeclareAttribute( "Right2dDomain", 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", Is3dDomain, "mutable" );

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

#############################################################################
##
#E gp3obj.gd . . . . . . . . . . . . . . . . . . . . . . . . . . .  ends here
