  
  [1X11 [33X[0;0YDouble Groupoids[133X[101X
  
  [33X[0;0YA  [13Xdouble groupoid[113X is a [13Xdouble category[113X in which all the category structures
  are  groupoids.  There is also a pre-crossed module associated to the double
  groupoid.  In a double groupoid, as well as objects and arrows we need a set
  of  [13Xsquares[113X.  A  square  is  bounded  by four arrows, two horizontal and two
  vertical,  and  there  is  a  [13Xhorizontal[113X  groupoid  structure and a [13Xvertical[113X
  groupoid  structure  on  these squares. A square also contains an element of
  the source group of the pre-crossed module, and its image under the boundary
  map  is  equal  to  the boundary of the square. When printing a square, this
  element is located at the centre,[133X
  
  [33X[0;0YThe  double  groupoids  constructed here are special in that all four arrows
  come from the same groupoid. We call these [13Xedge-symmetric[113X double groupoids.[133X
  
  [33X[0;0YThis  material  in  this chapter is experimental. It was started in 2023, in
  version  2.91,  and  extensively  revised in 2025, for version 2.95. Further
  extensions are likely in due course.[133X
  
  
  [1X11.1 [33X[0;0YConstructions for Double Groupoids[133X[101X
  
  [33X[0;0YIt is assumed in this chapter that the reader is familiar with constructions
  for    groupoids    given    in    the    [5XGroupoids[105X    package,    such   as
  [10XSinglePieceBasicDoubleGroupoid[110X.  Such  groupoids are [13Xbasic[113X, in that there is
  no    pre-crossed    module    involvement.    In    [5XXMod[105X    the   operation
  [10XSinglePieceDoubleGroupoid[110X  requires a groupoid and a crossed module as input
  parameters.[133X
  
  [1X11.1-1 SinglePieceDoubleGroupoid[101X
  
  [33X[1;0Y[29X[2XSinglePieceDoubleGroupoid[102X( [3Xgpd[103X, [3Xpxmod[103X ) [32X operation[133X
  
  [33X[0;0YFor  an  example  we  take for our groupoid the product of the group [22XS_3 = ⟨
  (7,8,9),  (8,9)  ⟩[122X  with  the  complete  graph  on  [22X[-6 ... -1][122X and, for our
  pre-crossed  module, the [10XX12[110X, isomorphic to [22X(D_12 -> S_3)[122X, constructed using
  [2XXModByCentralExtension[102X  ([14X2.1-5[114X).  The source of [10XX12[110X has generating set [22X{ g =
  (11,12,13,14,15,16),~ h = (12,16)(13,15) }[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgens3 := [ (7,8,9), (8,9) ];;[127X[104X
    [4X[25Xgap>[125X [27Xs3 := Group( gens3 );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( s3, "s3" ); [127X[104X
    [4X[25Xgap>[125X [27XGs3 := Groupoid( s3, [-6..-1] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( Gs3, "Gs3" ); [127X[104X
    [4X[25Xgap>[125X [27Xg := (11,12,13,14,15,16);;  h := (12,16)(13,15);;[127X[104X
    [4X[25Xgap>[125X [27Xgend12 := [ g, h ];;[127X[104X
    [4X[25Xgap>[125X [27Xd12 := Group( gend12 );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( d12, "d12" ); [127X[104X
    [4X[25Xgap>[125X [27Xpr12 := GroupHomomorphismByImages( d12, s3, gend12, gens3 );;[127X[104X
    [4X[25Xgap>[125X [27XX12 := XModByCentralExtension( pr12 );; [127X[104X
    [4X[25Xgap>[125X [27XSetName( X12, "X12" ); [127X[104X
    [4X[25Xgap>[125X [27XDisplay( X12 ); [127X[104X
    [4X[28X[128X[104X
    [4X[28XCrossed module X12 :- [128X[104X
    [4X[28X: Source group d12 has generators:[128X[104X
    [4X[28X  [ (11,12,13,14,15,16), (12,16)(13,15) ][128X[104X
    [4X[28X: Range group s3 has generators:[128X[104X
    [4X[28X  [ (7,8,9), (8,9) ][128X[104X
    [4X[28X: Boundary homomorphism maps source generators to:[128X[104X
    [4X[28X  [ (7,8,9), (8,9) ][128X[104X
    [4X[28X: Action homomorphism maps range generators to automorphisms:[128X[104X
    [4X[28X  (7,8,9) --> { source gens --> [ (11,12,13,14,15,16), (11,13)(14,16) ] }[128X[104X
    [4X[28X  (8,9) --> { source gens --> [ (11,16,15,14,13,12), (12,16)(13,15) ] }[128X[104X
    [4X[28X  These 2 automorphisms generate the group of automorphisms.[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD1 := SinglePieceDoubleGroupoid( Gs3, X12 );; [127X[104X
    [4X[25Xgap>[125X [27XD1!.groupoid;[127X[104X
    [4X[28XGs3[128X[104X
    [4X[25Xgap>[125X [27XD1!.prexmod;[127X[104X
    [4X[28XX12[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X11.1-2 SquareOfArrows[101X
  
  [33X[1;0Y[29X[2XSquareOfArrows[102X( [3Xbdy[103X, [3Xact[103X ) [32X operation[133X
  
  [33X[0;0YLet  [22XG[122X  be a groupoid with object set [22XΩ[122X and object group [22Xg[122X. Let [22X□[122X be the set
  of  squares with objects from [22XΩ[122X at each corner; plus two vertical arrows and
  two  horizontal  arrows  from  Arr[22X(G)[122X. Further, let [22XcalP = (∂ : S -> R)[122X be a
  pre-crossed  module,  and let [22Xm_1 ∈ S[122X be placed at the centre of the square.
  The  following  picture  illustrates the situation where [22Xu_1,v_1,w_1,x_1 ∈ Ω[122X
  and [22Xa_1,b_1,c_1,d_1 ∈ g[122X.[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix  @=4pc{  u_1 \ar[r]^{a_1} \ar[d]_{b_1}\ar@{}[dr] |{m_1} &
  v_1 \ar[d]^{c_1} \\ w_1 \ar[r]_{d_1} & x_1 }}[133X
  
  [124X
  
  [33X[0;0YWe  think  of  the square being [13Xbased[113X at the bottom, right-hand corner, [22Xx_1[122X.
  The  [13Xboundary[113X  of  the  square  is  the loop [22X(x_1, d_1^-1b_1^-1a_1c_1,x_1) =
  (x_1,p_1,x_1)[122X. The [13Xboundary condition[113X which [22Xm_1[122X has to satisfy is that [22X∂ m_1
  =  p_1[122X.  (Beware  a  possible source of confusion. In the example code it is
  convenient  of  define  arrow [10Xa1 := Arrow( Gs3, (7,8), -6, -5 );[110X whereas, in
  the description, [22Xa_1 = (7,8)[122X. Similarly for all the other arrows.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa1 := Arrow( Gs3, (7,8), -6, -5 );;[127X[104X
    [4X[25Xgap>[125X [27Xb1 := Arrow( Gs3, (7,9), -6, -1 );;[127X[104X
    [4X[25Xgap>[125X [27Xc1 := Arrow( Gs3, (8,9), -5, -3 );;[127X[104X
    [4X[25Xgap>[125X [27Xd1 := Arrow( Gs3, (7,8,9), -1, -3 );;[127X[104X
    [4X[25Xgap>[125X [27Xsq1 := SquareOfArrows( D1, g*h, a1, b1, c1, d1 ); [127X[104X
    [4X[28X[-6] ------------- (7,8) ------------> [-5][128X[104X
    [4X[28X  |                                     |[128X[104X
    [4X[28X(7,9)        (11,16)(12,15)(13,14)        (8,9)[128X[104X
    [4X[28X  V                                     V[128X[104X
    [4X[28X[-1] ------------ (7,8,9) -----------> [-3][128X[104X
    [4X[25Xgap>[125X [27Xm1 := ElementOfSquare( sq1 ); [127X[104X
    [4X[28X(11,16)(12,15)(13,14)[128X[104X
    [4X[25Xgap>[125X [27XUpArrow( sq1 );[127X[104X
    [4X[28X[(7,8) : -6 -> -5][128X[104X
    [4X[25Xgap>[125X [27XLeftArrow( sq1 );[127X[104X
    [4X[28X[(7,9) : -6 -> -1][128X[104X
    [4X[25Xgap>[125X [27XRightArrow( sq1 );[127X[104X
    [4X[28X[(8,9) : -5 -> -3][128X[104X
    [4X[25Xgap>[125X [27XDownArrow( sq1 );[127X[104X
    [4X[28X[(7,8,9) : -1 -> -3][128X[104X
    [4X[25Xgap>[125X [27X## check the boundary condition:[127X[104X
    [4X[25Xgap>[125X [27Xbdy1 := Boundary( D1!.prexmod );;[127X[104X
    [4X[25Xgap>[125X [27Xp1:= BoundaryOfSquare( sq1 );[127X[104X
    [4X[28X[(7,9) : -3 -> -3][128X[104X
    [4X[25Xgap>[125X [27XImageElm( bdy1, m1 );[127X[104X
    [4X[28X(7,9)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X11.1-3 HorizontalProduct[101X
  
  [33X[1;0Y[29X[2XHorizontalProduct[102X( [3Xsq1[103X, [3Xsq2[103X ) [32X operation[133X
  
  [33X[0;0YWhen defining a [13Xhorizontal composition[113X, as illustrated by[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix  @=4pc{  u_1 \ar[r]^{a_1} \ar[d]_{b_1} \ar@{}[dr]|{m_1} &
  v_1   \ar[r]^{a_2}   \ar[d]^{c_1}   \ar@{}[dr]|{m_2}   &   v_2  \ar[d]^{c_2}
  \ar@{}[dr]|=  & u_1 \ar[r]^{a_1a_2} \ar[d]_{b_1} \ar@{}[dr]|{m_1^{d_2}m_2} &
  v_2  \ar[d]^{c_2}  \\  w_1  \ar[r]_{d_1}  &  x_1  \ar[r]_{d_2}  &  x_2 & w_1
  \ar[r]_{d_1d_2} & x_2 }}[133X
  
  [124X
  
  [33X[0;0Ywe  have  to  move [22Xm_1[122X, based at [22Xx_1[122X, to the new base [22Xx_2[122X, and we do this by
  using  the  action  of the pre-crossed module of [22Xd_2[122X on [22Xm_1[122X. Notice that the
  boundary condition for the product is satisfied, since the first pre-crossed
  module axiom applies:[133X
  
  
  [24X[33X[0;6Y\partial(m_1^{d_2}m_2)    ~=~   \partial(m_1^{d_2})   (\partial   m_2)   ~=~
  d_2^{-1}(d_1^{-1}b_1^{-1}a_1c_1)d_2(d_2^{-1}c_1^{-1}a_2c_2)              ~=~
  (d_1d_2)^{-1}b_1^{-1}(a_1a_2)c_2.[133X
  
  [124X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa2 := Arrow( Gs3, (8,9), -5, -4 );; [127X[104X
    [4X[25Xgap>[125X [27Xc2 := Arrow( Gs3, (7,8), -4, -4 );;[127X[104X
    [4X[25Xgap>[125X [27Xd2 := Arrow( Gs3, (7,9), -3, -4 );;[127X[104X
    [4X[25Xgap>[125X [27Xsq2 := SquareOfArrows( D1, g^2, a2, c1, c2, d2 ); [127X[104X
    [4X[28X[-5] ------------ (8,9) -----------> [-4][128X[104X
    [4X[28X  |                                    |[128X[104X
    [4X[28X(8,9)        (11,13,15)(12,14,16)        (7,8)[128X[104X
    [4X[28X  V                                    V[128X[104X
    [4X[28X[-3] ------------ (7,9) -----------> [-4][128X[104X
    [4X[25Xgap>[125X [27Xm2 := ElementOfSquare( sq2 ); [127X[104X
    [4X[28X(11,13,15)(12,14,16)[128X[104X
    [4X[25Xgap>[125X [27XLeftArrow( sq2 ) = RightArrow( sq1 ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xsq12 := HorizontalProduct( sq1, sq2 );[127X[104X
    [4X[28X[-6] ------------ (7,9,8) -----------> [-4][128X[104X
    [4X[28X  |                                     |[128X[104X
    [4X[28X(7,9)        (11,12)(13,16)(14,15)        (7,8)[128X[104X
    [4X[28X  V                                     V[128X[104X
    [4X[28X[-1] ------------- (7,8) ------------> [-4][128X[104X
    [4X[25Xgap>[125X [27X## check the boundary condition:[127X[104X
    [4X[25Xgap>[125X [27Xed2 := ElementOfArrow( d2 );;[127X[104X
    [4X[25Xgap>[125X [27Xim1d2 := ImageElmXModAction( X12, m1, ed2 );[127X[104X
    [4X[28X(11,16)(12,15)(13,14)[128X[104X
    [4X[25Xgap>[125X [27Xm12 := ElementOfSquare( sq12 );[127X[104X
    [4X[28X(11,12)(13,16)(14,15)[128X[104X
    [4X[25Xgap>[125X [27Xim1d2 * m2 = m12;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X11.1-4 VerticalProduct[101X
  
  [33X[1;0Y[29X[2XVerticalProduct[102X( [3Xsq1[103X, [3Xsq2[103X ) [32X operation[133X
  
  [33X[0;0YSimilarly, vertical composition is illustrated by[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix @=2pc{ u_1 \ar[rr]^{a_1} \ar[dd]_{b_1} \ar@{}[ddrr]|{m_1}
  &&  v_1  \ar[dd]^{c_1}  &  & && \\ && & & u_1 \ar[rr]^{a_1} \ar[dd]_{b_1b_3}
  \ar@{}[ddrr]|{m_3m_1^{c_3}}  &&  v_1  \ar[dd]^{c_1c_3}  \\ w_1 \ar[rr]_{d_1}
  \ar[dd]_{b_3}  \ar@{}[ddrr]|{m_3}  && x_1 \ar[dd]^{c_3} &=& && \\ && & & w_3
  \ar[rr]_{d_3} && x_3 \\ w_3 \ar[rr]_{d_3} && x_3 }}[133X
  
  [124X
  
  [33X[0;0YAgain the boundary condition is satisfied:[133X
  
  
  [24X[33X[0;6Y\partial(m_3m_1^{c_3})    ~=~   (\partial   m_3)   \partial(m_1^{c_3})   ~=~
  (d_3^{-1}b_3^{-1}d_1c_3)c_3^{-1}(d_1^{-1}b_1^{-1}a_1c_1)c_3              ~=~
  d_3^{-1}(b_1b_3)^{-1}a_1(c_1c_3).[133X
  
  [124X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xb3 := Arrow( Gs3, (8,9), -1, -2 );;[127X[104X
    [4X[25Xgap>[125X [27Xc3 := Arrow( Gs3, (7,9,8), -3, -2 );;[127X[104X
    [4X[25Xgap>[125X [27Xd3 := Arrow( Gs3, (7,9), -2, -2 );;[127X[104X
    [4X[25Xgap>[125X [27Xsq3 := SquareOfArrows( D1, g, d1, b3, c3, d3 );[127X[104X
    [4X[28X[-1] ------------ (7,8,9) -----------> [-3][128X[104X
    [4X[28X  |                                     |[128X[104X
    [4X[28X(8,9)        (11,12,13,14,15,16)        (7,9,8)[128X[104X
    [4X[28X  V                                     V[128X[104X
    [4X[28X[-2] ------------- (7,9) ------------> [-2][128X[104X
    [4X[25Xgap>[125X [27Xm3 := ElementOfSquare( sq3 ); [127X[104X
    [4X[28X(11,12,13,14,15,16)[128X[104X
    [4X[25Xgap>[125X [27XUpArrow( sq3 ) = DownArrow( sq1 ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xsq13 := VerticalProduct( sq1, sq3 ); [127X[104X
    [4X[28X[-6] ---------- (7,8) ---------> [-5][128X[104X
    [4X[28X  |                                |[128X[104X
    [4X[28X(7,8,9)        (11,13)(14,16)        (7,9)[128X[104X
    [4X[28X  V                                V[128X[104X
    [4X[28X[-2] ---------- (7,9) ---------> [-2][128X[104X
    [4X[25Xgap>[125X [27X## check the boundary condition:[127X[104X
    [4X[25Xgap>[125X [27Xec3 := ElementOfArrow( c3 );;[127X[104X
    [4X[25Xgap>[125X [27Xim1c3 := ImageElmXModAction( X12, m1, ec3 );[127X[104X
    [4X[28X(11,14)(12,13)(15,16)[128X[104X
    [4X[25Xgap>[125X [27Xm13 := ElementOfSquare( sq13 );[127X[104X
    [4X[28X(11,13)(14,16)[128X[104X
    [4X[25Xgap>[125X [27Xm3 * im1c3 = m13;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  [10XHorizontalProduct[110X  and  [10XVerticalProduct[110X  commute,  so  we may construct
  products such as:[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix @=2pc{ u_1 \ar[rr]^{a_1} \ar[dd]_{b_1} \ar@{}[ddrr]|{m_1}
  && v_1 \ar[rr]^{a_2} \ar[dd]|{c_1} \ar@{}[ddrr]|{m_2} && v_2 \ar[dd]^{c_2} &
  &    &&&   \\   &&   &&   &   &   u_1   \ar[rrr]^{a_1a_2}   \ar[dd]_{b_1b_3}
  \ar@{}[ddrrr]|{m_3^{d_4}m_4\left(m_1^{d_2}m_2\right)^{c_4}}      &&&     v_2
  \ar[dd]^{c_1c_4}  \\  w_1  \ar[rr]|{d_1} \ar[dd]_{b_3} \ar@{}[ddrr]|{m_3} &&
  x_1  \ar[rr]|{d_2} \ar[dd]|{c_3} \ar@{}[ddrr]|{m_4} && x_2 \ar[dd]^{c_4} &=&
  &&&  \\  && && & & w_3 \ar[rrr]_{d_3d_4} &&& x_4 \\ w_3 \ar[rr]_{d_3} && x_3
  \ar[rr]_{d_4} && x_4 }}[133X
  
  [124X
  
  [33X[0;0Ywhere[133X
  
  
  [24X[33X[0;6Ym_3^{d_4}m_4  (m_1^{d_2}m_2)^{c_4} ~=~ (m_3m_1^{c_3})^{d_4} m_4m_2^{c_4} ~=~
  (d_3d_4)^{-1}(b_1b_3)^{-1}(a_1a_2)(c_3c_4).[133X
  
  [124X
  
  [33X[0;0YContinuing  with  our  example,  we check that the two ways of computing the
  product of four squares below agree.[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix     @=2pc{     -6     \ar[rr]^{(7,8)}     \ar[dd]_{(7,9)}
  \ar@{}[ddrr]|{gh}  &&  -5 \ar[rr]^{(8,9)} \ar[dd]|{(8,9)} \ar@{}[ddrr]|{g^2}
  &&  -4  \ar[dd]^{(7,8)}  &  &  &&&  \\  &&  &&  &  &  -6  \ar[rrr]^{(7,9,8)}
  \ar[dd]_{(7,8,9)}      \ar@{}[ddrrr]|{(11,15,13)(12,16,14)}      &&&      -4
  \ar[dd]^{(7,9,8)}  \\  -1 \ar[rr]|{(7,8,9)} \ar[dd]_{(8,9)} \ar@{}[ddrr]|{g}
  &&    -3    \ar[rr]|{(7,9)}   \ar[dd]|{(7,9,8)}   \ar@{}[ddrr]|{h}   &&   -4
  \ar[dd]^{(8,9)}  &=&  &&&  \\  &&  && & & -2 \ar[rrr]_{(7,9,8)} &&& -3 \\ -2
  \ar[rr]_{(7,9)} && -2 \ar[rr]_{(7,8)} && -3 }}[133X
  
  [124X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xc4 := Arrow( Gs3, (8,9), -4, -3 );; [127X[104X
    [4X[25Xgap>[125X [27Xd4 := Arrow( Gs3, (7,8), -2, -3 );; [127X[104X
    [4X[25Xgap>[125X [27Xsq4 := SquareOfArrows( D1, h, d2, c3, c4, d4 );;[127X[104X
    [4X[25Xgap>[125X [27XUpArrow(sq4)=DownArrow(sq2) and LeftArrow(sq4)=RightArrow(sq3); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xsq24 := VerticalProduct( sq2, sq4 ); [127X[104X
    [4X[28X[-5] ---------- (8,9) ---------> [-4][128X[104X
    [4X[28X  |                                |[128X[104X
    [4X[28X(7,9)        (11,15)(12,14)        (7,9,8)[128X[104X
    [4X[28X  V                                V[128X[104X
    [4X[28X[-2] ---------- (7,8) ---------> [-3][128X[104X
    [4X[25Xgap>[125X [27Xsq34 := HorizontalProduct( sq3, sq4 );[127X[104X
    [4X[28X[-1] ------------- (7,8) ------------> [-4][128X[104X
    [4X[28X  |                                     |[128X[104X
    [4X[28X(8,9)        (11,12)(13,16)(14,15)        (8,9)[128X[104X
    [4X[28X  V                                     V[128X[104X
    [4X[28X[-2] ------------ (7,9,8) -----------> [-3][128X[104X
    [4X[25Xgap>[125X [27Xsq1324 := HorizontalProduct( sq13, sq24 );[127X[104X
    [4X[28X[-6] ------------- (7,9,8) ------------> [-4][128X[104X
    [4X[28X  |                                        |[128X[104X
    [4X[28X(7,8,9)        (11,15,13)(12,16,14)        (7,9,8)[128X[104X
    [4X[28X  V                                        V[128X[104X
    [4X[28X[-2] ------------- (7,9,8) ------------> [-3][128X[104X
    [4X[25Xgap>[125X [27Xsq1234 := VerticalProduct( sq12, sq34 );;[127X[104X
    [4X[25Xgap>[125X [27Xsq1324 = sq1234;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X11.2 [33X[0;0YConversion of Basic Double Groupoids[133X[101X
  
  [33X[0;0YAs  mentioned  earlier,  double  groupoids  were introduced in the [5XGroupoids[105X
  package,  but  these  were  [13Xbasic  double groupoids[113X, without any pre-crossed
  module.  The  element of a square was simply its boundary. Here we introduce
  an  operation  which  converts  such  a  basic double groupoid into the more
  general case considered in this package.[133X
  
  [1X11.2-1 EnhancedBasicDoubleGroupoid[101X
  
  [33X[1;0Y[29X[2XEnhancedBasicDoubleGroupoid[102X( [3Xbdg[103X ) [32X operation[133X
  
  [33X[0;0YWe  need  to  add  a  pre-crossed module to the definition of a basic double
  groupoid.  We  choose  to  add  [22X(G  ->  G)[122X  where [22XG[122X is the root group of the
  underlying  groupoid. (This is only valid for groupoids which are the direct
  product with a complete graph.) The example is taken from section 7.1 of the
  [5XGroupoids[105X  package,  converting  basic  [10XB0[110X to [10XD0[110X, and we check that the same
  square is produced in each case.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg2 := (1,2,3,4);;  h2 := (1,3);;[127X[104X
    [4X[25Xgap>[125X [27Xgend8 := [ g2, h2 ];;[127X[104X
    [4X[25Xgap>[125X [27Xd8 := Group( gend8 );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( d8, "d8" ); [127X[104X
    [4X[25Xgap>[125X [27XGd8 := Groupoid( d8, [-9..-7] );;[127X[104X
    [4X[25Xgap>[125X [27XSetName( Gd8, "Gd8" ); [127X[104X
    [4X[25Xgap>[125X [27XB0 := SinglePieceBasicDoubleGroupoid( Gd8 );; [127X[104X
    [4X[25Xgap>[125X [27XB0!.groupoid;[127X[104X
    [4X[28XGd8[128X[104X
    [4X[25Xgap>[125X [27XB0!.objects;[127X[104X
    [4X[28X[ -9 .. -7 ][128X[104X
    [4X[25Xgap>[125X [27Xa0 := Arrow(Gd8,(),-9,-7);;    b0 := Arrow(Gd8,g2,-9,-9);;  [127X[104X
    [4X[25Xgap>[125X [27Xc0 := Arrow(Gd8,h2,-7,-8);;    d0 := Arrow(Gd8,(2,4),-9,-8);;      [127X[104X
    [4X[25Xgap>[125X [27Xbdy0 := d0![2]^-1 * b0![2]^-1 * a0![2] * c0![2];; [127X[104X
    [4X[25Xgap>[125X [27Xbsq0 := SquareOfArrows( B0, bdy0, a0, b0, c0, d0 ); [127X[104X
    [4X[28X[-9] ---------- () ---------> [-7][128X[104X
    [4X[28X  |                             |[128X[104X
    [4X[28X(1,2,3,4)        (1,4,3,2)        (1,3)[128X[104X
    [4X[28X  V                             V[128X[104X
    [4X[28X[-9] --------- (2,4) --------> [-8][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD0 := EnhancedBasicDoubleGroupoid( B0 );;[127X[104X
    [4X[25Xgap>[125X [27XD0!.prexmod;[127X[104X
    [4X[28X[d8->d8][128X[104X
    [4X[25Xgap>[125X [27Xbsq0 = SquareOfArrows( D0, bdy0, a0, b0, c0, d0 ); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X11.3 [33X[0;0YCommutative double groupoids[133X[101X
  
  [33X[0;0YA double groupoid square[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix @=4pc{ u_1 \ar[r]^{a_1} \ar[d]_{b_1}\ar@{}[dr] |{m} & v_1
  \ar[d]^{c_1} \\ w_1 \ar[r]_{d_1} & x_1 }}[133X
  
  [124X
  
  [33X[0;0Yis  [13Xcommutative[113X  if  [22Xa_1c_1  =  b_1d_1[122X, which means that its boundary is the
  identity.  So  a  double groupoid which consists only of commutative squares
  must  have  a  pre-crossed  module  with  zero boundary. Commutative squares
  compose horizontally and vertically provided only that they have the correct
  common arrow.[133X
  
  [1X11.3-1 DoubleGroupoidWithZeroBoundary[101X
  
  [33X[1;0Y[29X[2XDoubleGroupoidWithZeroBoundary[102X( [3Xgpd[103X, [3Xsrc[103X ) [32X operation[133X
  
  [33X[0;0YThe  data for a double groupoid of commutative squares therefore consists of
  a    groupoid   and   a   source   group.   We   may   use   the   operation
  [2XPreXModWithTrivialRange[102X ([14X2.3-1[114X) to provide a pre-crossed module. We take for
  our  example the groupoid [10XGd8[110X and the pre-crossed module [10XQ16[110X of section [14X2.3[114X.
  We introduce a new right arrow to construct a square which commutes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD16 := DoubleGroupoidWithZeroBoundary( Gs3, d16 );;[127X[104X
    [4X[25Xgap>[125X [27XD16!.prexmod;[127X[104X
    [4X[28X[d16->Group( [ () ] )][128X[104X
    [4X[25Xgap>[125X [27Xe16 := Arrow( Gs3, (7,9,8), -5, -3 );;[127X[104X
    [4X[25Xgap>[125X [27Xsq16 := SquareOfArrows( D16, (12,18)(13,17)(14,16), a1, b1, e16, d1 );[127X[104X
    [4X[28X[-6] -------------- (7,8) -------------> [-5][128X[104X
    [4X[28X  |                                       |[128X[104X
    [4X[28X(7,9)        (12,18)(13,17)(14,16)        (7,9,8)[128X[104X
    [4X[28X  V                                       V[128X[104X
    [4X[28X[-1] ------------- (7,8,9) ------------> [-3][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
