  
  [1m[4m[31m7. Crossed squares and their morphisms[0m
  
  Crossed  squares  were  introduced  by  Guin-Wal\'ery  and  Loday  (see, for
  example,  [RJ87])  as  fundamental crossed squares of commutative squares of
  spaces,  but are also of purely algebraic interest. We denote by [n] the set
  1,2,...,n.  We  use  the  n=2 version of the definition of crossed n-cube as
  given by Ellis and Steiner [GR87].
  
  A [22m[36mcrossed square[0m mathcalR consists of the following:
  
  --    Groups R_J for each of the four subsets J subseteq [2];
  
  --    a commutative diagram of group homomorphisms:
  
  \[
             \ddot{\partial}_1 : R_{[2]} \to R_{\{2\}}, \quad
             \ddot{\partial}_2 : R_{[2]} \to R_{\{1\}}, \quad
             \dot{\partial}_1 : R_{\{1\}} \to R_{\emptyset}, \quad
             \dot{\partial}_2 : R_{\{2\}} \to R_{\emptyset};
  \]
  
  --    actions  of R_emptyset on R_1}, R_2} and R_[2] which determine actions
        of R_1} on R_2} and R_[2] via dotpartial_1 and actions of R_2} on R_1}
        and R_[2] via dotpartial_2~;
  
  --    a function ~ boxtimes : R_1} times R_2} -> R_[2]~.
  
  The  following  axioms  must  be satisfied for all l in R_[2],; m,m_1,m_2 in
  R_1},; n,n_1,n_2 in R_2},; p in R_emptyset~:
  
  --    the  homomorphisms ddotpartial_1, ddotpartial_2 preserve the action of
        R_emptyset~;
  
  --    each of
  
  \[
             \ddot{\mathcal{R}}_1 = (\ddot{\partial}_1 : R_{[2]} \to
             R_{\{2\}}),~ \ddot{\mathcal{R}}_2 = (\ddot{\partial}_2 :
             R_{[2]} \to R_{\{1\}}), ~ \dot{\mathcal{R}}_1 =
             (\dot{\partial}_1 : R_{\{1\}} \to R_{\emptyset}),~
             \dot{\mathcal{R}}_2 = (\dot{\partial}_2 : R_{\{2\}} \to
             R_{\emptyset}),
  \]
  
        and the diagonal
  
  \[
             \mathcal{R}_{12} = (\partial_{12} :=
             \dot{\partial}_1\ddot{\partial}_2 =
             \dot{\partial}_2\ddot{\partial}_1 : R_{[2]} \to
             R_{\emptyset})
  \]
  
        are crossed modules (with actions via R_emptyset);
  
  --    boxtimes is a \emph{crossed pairing}:
  
  --          (m_1m_2 boxtimes n);=;(m_1 boxtimes n)^m_2;(m_2 boxtimes n)~,
  
  --          (m boxtimes n_1n_2) ;=; (m boxtimes n_2);(m boxtimes n_1)^n_2~,
  
  --          (m boxtimes n)^p ;=; (m^p boxtimes n^p)~;
  
  --    ddotpartial_1  (m  boxtimes  n)  ;=; (n^-1)^m;n \quad \mbox{and} \quad
        ddotpartial_2 (m boxtimes n) ;=; m^-1;m^n~,
  
  --    (m  boxtimes  ddotpartial_1  l)  ;=; (l^-1)^m;l \quad \mbox{and} \quad
        (ddotpartial_2 l boxtimes n) ;=; l^-1;l^n~.
  
  Note  that  the  actions of R_1} on R_2} and R_2} on R_1} via R_emptyset are
  compatible since
  
  \[
       {m_1}^{(n^m)} \;=\; {m_1}^{\dot{\partial}_2(n^m)} \;=\;
       {m_1}^{m^{-1}(\dot{\partial}_2 n)m} \;=\; (({m_1}^{m^{-1}})^n)^m~.
  \]
  
  
  [1m[4m[31m7.1 Constructions for crossed squares[0m
  
  Analogously  to the data structure used for crossed modules, crossed squares
  are  implemented  as [22m[32m3d-objects[0m. When times allows, cat2-groups will also be
  implemented,  with  conversion  between  the  two  types  of structure. Some
  standard  constructions  of  crossed squares are listed below. At present, a
  limited  number  of  constructions  are  implemented.  Morphisms  of crossed
  squares have also been implemented, though there is a lot still to do.
  
  [1m[4m[31m7.1-1 XSq[0m
  
  [1m[34m> XSq( [0m[22m[34margs[0m[1m[34m ) ______________________________________________________[0mfunction
  [1m[34m> XSqByNormalSubgroups( [0m[22m[34mP, N, M, L[0m[1m[34m ) ______________________________[0moperation
  [1m[34m> ActorXSq( [0m[22m[34mX0[0m[1m[34m ) __________________________________________________[0moperation
  [1m[34m> Transpose3dObject( [0m[22m[34mS0[0m[1m[34m ) _________________________________________[0mattribute
  [1m[34m> Name( [0m[22m[34mS0[0m[1m[34m ) ______________________________________________________[0mattribute
  
  Here are some standard examples of crossed squares.
  
  --    If  M,  N are normal subgroups of a group P, and L = M cap N, then the
        four  inclusions, L -> N,~ L -> M,~ M -> P,~ N -> P, together with the
        actions  of  P  on  M,  N  and L given by conjugation, and the crossed
        pairing
  
  \[
             \boxtimes \;:\; M \times N \to M\cap N, \quad (m,n) \mapsto
             [m,n] \,=\, m^{-1}n^{-1}mn \,=\,(n^{-1})^mn \,=\, m^{-1}m^n
  \]
  
        is   a   crossed   square.   This   construction   is  implemented  as
        [22m[32mXSqByNormalSubgroups(P,N,M,L);[0m.
  
  --    The actor mathcalA(mathcalX_0) of a crossed module mathcalX_0 has been
        described in Chapter 5. The crossed pairing is given by
  
  \[
             \boxtimes \;:\; R \times W \,\to\, S, \quad (r,\chi)
             \,\mapsto\, \chi r~.
  \]
  
        This is implemented as [22m[32mActorXSq( X0 );[0m.
  
  --    The  [22m[36mtranspose[0m  of  mathcalR  is  the  crossed  square  tildemathcalR}
        obtained   by   interchanging   R_1}  with  R_2},  ddotpartial_1  with
        ddotpartial_2, and dotpartial_1 with dotpartial_2. The crossed pairing
        is given by
  
  \[
             \tilde{\boxtimes} \;:\; R_{\{2\}} \times R_{\{1\}} \to
             R_{[2]}, \quad (n,m) \;\mapsto\; n\,\tilde{\boxtimes}\,m :=
             (m \boxtimes n)^{-1}~.
  \]
  
  The following constructions will be implemented in the next release.
  
  --    If  M, N are ordinary P-modules and A is an arbitrary abelian group on
        which P acts trivially, then there is a crossed square with sides
  
  \[
             0 : A \to N,\quad 0 : A \to M,\quad 0 : M \to P,\quad 0 : N
             \to P.
  \]
  
  --    For a group L, the automorphism crossed module rm Act L = (iota : L ->
        rm  Aut  L) splits to form the square with (iota_1 : L -> rm Inn L) on
        two sides, and (iota_2 : rm Inn L -> rm Aut L) on the other two sides,
        where  iota_1  maps l in L to the inner automorphism beta_l : L -> L,;
        l^prime -> l^-1l^primel, and $\iota_2$ is the inclusion of rm Inn L in
        rm Aut L. The actions are standard, and the crossed pairing is
  
  \[
             \boxtimes \;:\; {\rm Inn}\ L \times {\rm Inn}\ L \to L,
             \quad (\beta_l, \beta_{l^{\prime}}) \;\mapsto\; [l,
             l^{\prime}]~.
  \]
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> c := (11,12,13,14,15,16);;[0m
    [22m[35mgap> d := (12,16)(13,15);;[0m
    [22m[35mgap> cd := c*d;;[0m
    [22m[35mgap> d12 := Group( [ c, d ] );;[0m
    [22m[35mgap> s3a := Subgroup( d12, [ c^2, d ] );;[0m
    [22m[35mgap> s3b := Subgroup( d12, [ c^2, cd ] );;[0m
    [22m[35mgap> c3 := Subgroup( d12, [ c^2 ] );;[0m
    [22m[35mgap> SetName( d12, "d12");  SetName( s3a, "s3a" );[0m
    [22m[35mgap> SetName( s3b, "s3b" );  SetName( c3, "c3" );[0m
    [22m[35mgap> XSconj := XSqByNormalSubgroups( d12, s3b, s3a, c3 );[0m
    [22m[35m[  c3 -> s3b ][0m
    [22m[35m[  |      |  ][0m
    [22m[35m[ s3a -> d12 ][0m
    [22m[35mgap> Name( XSconj );[0m
    [22m[35m"[c3->s3b,s3a->d12]"[0m
    [22m[35mgap> XStrans := Transpose3dObject( XSconj );[0m
    [22m[35m[  c3 -> s3a ][0m
    [22m[35m[  |      |  ][0m
    [22m[35m[ s3b -> d12 ][0m
    [22m[35mgap> X12 := XModByNormalSubgroup( d12, s3a );[0m
    [22m[35m[s3a->d12][0m
    [22m[35mgap> XSact := ActorXSq( X12 );[0m
    [22m[35mcrossed square with:[0m
    [22m[35m      up = Whitehead[s3a->d12][0m
    [22m[35m    left = [s3a->d12][0m
    [22m[35m   right = Actor[s3a->d12][0m
    [22m[35m    down = Norrie[s3a->d12][0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m7.1-2 IsXSq[0m
  
  [1m[34m> IsXSq( [0m[22m[34mobj[0m[1m[34m ) _____________________________________________________[0mproperty
  [1m[34m> IsPerm3dObject( [0m[22m[34mobj[0m[1m[34m ) ____________________________________________[0mproperty
  [1m[34m> Is3dObject( [0m[22m[34mobj[0m[1m[34m ) ________________________________________________[0mproperty
  [1m[34m> IsPerm3dObject( [0m[22m[34mobj[0m[1m[34m ) ____________________________________________[0mproperty
  [1m[34m> IsPc3dObject( [0m[22m[34mobj[0m[1m[34m ) ______________________________________________[0mproperty
  [1m[34m> IsFp3dObject( [0m[22m[34mobj[0m[1m[34m ) ______________________________________________[0mproperty
  [1m[34m> IsPreXSq( [0m[22m[34mobj[0m[1m[34m ) __________________________________________________[0mproperty
  
  These  are  the  basic  properties  for  3dobjects,  and  crossed squares in
  particular.
  
  [1m[4m[31m7.1-3 Up2dObject[0m
  
  [1m[34m> Up2dObject( [0m[22m[34mXS[0m[1m[34m ) ________________________________________________[0mattribute
  [1m[34m> Left2dObject( [0m[22m[34mXS[0m[1m[34m ) ______________________________________________[0mattribute
  [1m[34m> Down2dObject( [0m[22m[34mXS[0m[1m[34m ) ______________________________________________[0mattribute
  [1m[34m> Right2dObject( [0m[22m[34mXS[0m[1m[34m ) _____________________________________________[0mattribute
  [1m[34m> DiagonalAction( [0m[22m[34mXS[0m[1m[34m ) ____________________________________________[0mattribute
  [1m[34m> XPair( [0m[22m[34mXS[0m[1m[34m ) _____________________________________________________[0mattribute
  [1m[34m> ImageElmXPair( [0m[22m[34mXS, pair[0m[1m[34m ) _______________________________________[0moperation
  
  In  this implementation the attributes used in the construction of a crossed
  square  [22m[32mXS[0m  are  the  four  crossed modules (2d-objects) on the sides of the
  square; the diagonal action of P on L, and the crossed pairing.
  
  The  [1mGAP[0m  development  team  have  suggested that crossed pairings should be
  implemented  as  a  special case of [22m[32mBinaryMappings[0m -- a structure which does
  not  yet  exist  in  [1mGAP[0m. As a temporary measure, crossed pairings have been
  implemented using [22m[32mMapping2ArgumentsByFunction[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> Up2dObject( XSconj );[0m
    [22m[35m[c3->s3b][0m
    [22m[35mgap> Right2dObject( XSact );[0m
    [22m[35mActor[s3a->d12][0m
    [22m[35mgap> xpconj := XPair( XSconj );;[0m
    [22m[35mgap> ImageElmXPair( xpconj, [ (1,6)(2,5)(3,4), (2,6)(3,5) ] );[0m
    [22m[35m(1,3,5)(2,4,6)[0m
    [22m[35mgap> diag := DiagonalAction( XSact );[0m
    [22m[35m[ (2,3)(6,8)(7,9), (1,2)(4,6)(5,7) ] ->[0m
    [22m[35m[ [ (11,13,15)(12,14,16), (12,16)(13,15) ] ->[0m
    [22m[35m    [ (11,15,13)(12,16,14), (12,16)(13,15) ],[0m
    [22m[35m  [ (11,13,15)(12,14,16), (12,16)(13,15) ] ->[0m
    [22m[35m    [ (11,15,13)(12,16,14), (11,13)(14,16) ] ][0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m7.2 Morphisms of crossed squares[0m
  
  This   section   describes   an   initial  implementation  of  morphisms  of
  (pre-)crossed squares.
  
  [1m[4m[31m7.2-1 Source[0m
  
  [1m[34m> Source( [0m[22m[34mmap[0m[1m[34m ) ___________________________________________________[0mattribute
  [1m[34m> Range( [0m[22m[34mmap[0m[1m[34m ) ____________________________________________________[0mattribute
  [1m[34m> Up2dMorphism( [0m[22m[34mmap[0m[1m[34m ) _____________________________________________[0mattribute
  [1m[34m> Left2dMorphism( [0m[22m[34mmap[0m[1m[34m ) ___________________________________________[0mattribute
  [1m[34m> Down2dMorphism( [0m[22m[34mmap[0m[1m[34m ) ___________________________________________[0mattribute
  [1m[34m> Right2dMorphism( [0m[22m[34mmap[0m[1m[34m ) __________________________________________[0mattribute
  
  Morphisms  of  [22m[32m3dObjects[0m are implemented as [22m[32m3dMappings[0m. These have a pair of
  3d-objects  as  source  and  range,  together with four 2d-morphisms mapping
  between  the four pairs of crossed modules on the four sides of the squares.
  These functions return [22m[32mfail[0m when invalid data is supplied.
  
  [1m[4m[31m7.2-2 IsXSqMorphism[0m
  
  [1m[34m> IsXSqMorphism( [0m[22m[34mmap[0m[1m[34m ) _____________________________________________[0mproperty
  [1m[34m> IsPreXSqMorphism( [0m[22m[34mmap[0m[1m[34m ) __________________________________________[0mproperty
  [1m[34m> IsBijective( [0m[22m[34mmor[0m[1m[34m ) _______________________________________________[0mproperty
  [1m[34m> IsAutomorphism3dObject( [0m[22m[34mmor[0m[1m[34m ) ____________________________________[0mproperty
  
  A  morphism  [22m[32mmor[0m  between  two pre-crossed squares mathcalR_1 and mathcalR_2
  consists  of  four crossed module morphisms [22m[32mUp2dMorphism( mor )[0m, mapping the
  [22m[32mUp2dObject[0m  of  mathcalR_1  to  that  of  mathcalR_2, [22m[32mLeft2dMorphism( mor )[0m,
  [22m[32mDown2dMorphism(  mor  )[0m and [22m[32mRight2dMorphism( mor )[0m. These four morphisms are
  required  to commute with the four boundary maps and to preserve the rest of
  the structure. The current version of [22m[32mIsXSqMorphism[0m does not perform all the
  required checks.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m[0m
    [22m[35mgap> ad12 := GroupHomomorphismByImages( d12, d12, [c,d], [c,d^c] );;[0m
    [22m[35mgap> as3a := GroupHomomorphismByImages( s3a, s3a, [c^2,d], [c^2,d^c] );;[0m
    [22m[35mgap> as3b := GroupHomomorphismByImages( s3b, s3b, [c^2,cd], [c^2,cd^c] );;[0m
    [22m[35mgap> idc3 := IdentityMapping( c3 );;[0m
    [22m[35mgap> upconj := Up2dObject( XSconj );;[0m
    [22m[35mgap> leftconj := Left2dObject( XSconj );; [0m
    [22m[35mgap> downconj := Down2dObject( XSconj );; [0m
    [22m[35mgap> rightconj := Right2dObject( XSconj );; [0m
    [22m[35mgap> up := XModMorphismByHoms( upconj, upconj, idc3, as3b );[0m
    [22m[35m[[c3->s3b] => [c3->s3b]][0m
    [22m[35mgap> left := XModMorphismByHoms( leftconj, leftconj, idc3, as3a );[0m
    [22m[35m[[c3->s3a] => [c3->s3a]][0m
    [22m[35mgap> down := XModMorphismByHoms( downconj, downconj, as3a, ad12 );[0m
    [22m[35m[[s3a->d12] => [s3a->d12]][0m
    [22m[35mgap> right := XModMorphismByHoms( rightconj, rightconj, as3b, ad12 );[0m
    [22m[35m[[s3b->d12] => [s3b->d12]][0m
    [22m[35mgap> autoconj := XSqMorphism( XSconj, XSconj, up, left, down, right );; [0m
    [22m[35mgap> ord := Order( autoconj );;[0m
    [22m[35mgap> Display( autoconj );[0m
    [22m[35mMorphism of crossed squares :-[0m
    [22m[35m:    Source = [c3->s3b,s3a->d12][0m
    [22m[35m:     Range = [c3->s3b,s3a->d12][0m
    [22m[35m:     order = 3[0m
    [22m[35m:    up-left: [ [ (11,13,15)(12,14,16) ], [ (11,13,15)(12,14,16) ] ][0m
    [22m[35m:   up-right: [ [ (11,13,15)(12,14,16), (11,16)(12,15)(13,14) ],[0m
    [22m[35m  [ (11,13,15)(12,14,16), (11,12)(13,16)(14,15) ] ][0m
    [22m[35m:  down-left: [ [ (11,13,15)(12,14,16), (12,16)(13,15) ],[0m
    [22m[35m  [ (11,13,15)(12,14,16), (11,13)(14,16) ] ][0m
    [22m[35m: down-right: [ [ (11,12,13,14,15,16), (12,16)(13,15) ],[0m
    [22m[35m  [ (11,12,13,14,15,16), (11,13)(14,16) ] ][0m
    [22m[35mgap> KnownPropertiesOfObject( autoconj );[0m
    [22m[35m[ "IsTotal", "IsSingleValued", "IsInjective", "IsSurjective", "Is3dMapping",[0m
    [22m[35m  "IsPreXSqMorphism", "IsXSqMorphism", "IsEndomorphism3dObject" ][0m
    [22m[35mgap> IsAutomorphism3dObject( autoconj );[0m
    [22m[35mtrue[0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
