# Double groupoid

In mathematics, especially in higher-dimensional algebra and homotopy theory, a double groupoid generalises the notion of groupoid and of category to a higher dimension.

## Definition

A double groupoid D is a higher-dimensional groupoid involving a relationship for both 'horizontal' and 'vertical' groupoid structures. (A double groupoid can also be considered as a generalization of certain higher-dimensional groups.) The geometry of squares and their compositions leads to a common representation of a double groupoid in the following diagram:
where M is a set of 'points', H and V are, respectively, 'horizontal' and 'vertical' groupoids, and S is a set of 'squares' with two compositions. The composition laws for a double groupoid D make it also describable as a groupoid internal to the category of groupoids.
Given two groupoids H and V over a set M, there is a double groupoid $\Box (H,V)$ with H,V as horizontal and vertical edge groupoids, and squares given by quadruples
       ${\begin{pmatrix}&h&\\[-0.9ex]v&&v'\\[-0.9ex]&h'&\end{pmatrix}}$
for which one assumes always that h, h′ are in H and v, v′ are in V, and that the initial and final points of these edges match in M as suggested by the notation; that is for example sh = sv, th = sv', ..., etc. The compositions are to be inherited from those of H,V; that is:
       ${\begin{pmatrix}&h&\\[-0.9ex]v&&v'\\[-0.9ex]&h'&\end{pmatrix}}\circ _{1}{\begin{pmatrix}&h'&\\[-0.9ex]w&&w'\\[-0.9ex]&h''&\end{pmatrix}}={\begin{pmatrix}&h&\\[-0.9ex]vw&&v'w'\\[-0.9ex]&h''&\end{pmatrix}}$
and
       ${\begin{pmatrix}&h&\\[-0.9ex]v&&v'\\[-0.9ex]&h'&\end{pmatrix}}\circ _{2}{\begin{pmatrix}&k&\\[-0.9ex]v'&&v''\\[-0.9ex]&k'&\end{pmatrix}}={\begin{pmatrix}&hk&\\[-0.9ex]v&&v''\\[-0.9ex]&h'k'&\end{pmatrix}}$
This construction is the right adjoint to the forgetful functor which takes the double groupoid as above, to the pair of groupoids H,V over M.
Other related constructions are that of a double groupoid with connection and homotopy double groupoids. The homotopy double groupoid of a pair of pointed spaces is a key element of the proof of a two-dimensional Seifert-van Kampen Theorem, first proved by Brown and Higgins in 1978, and given an extensive treatment in the book.

## Examples

An easy class of examples can be cooked up by considering crossed modules, or equivalently the data of a morphism of groups
   $[G_{1}\xrightarrow {\phi } G_{0}]$
which has an equivalent description as the groupoid internal to the category of groups
   $s,t:G_{0}\times G_{1}\to G_{0}$
where
   ${\begin{matrix}s(g_{0},g_{1})=g_{0}&t(g_{0},g_{1})=\phi (g_{1})g_{0}\end{matrix}}$
are the structure morphisms for this groupoid. Since groups embed in the category of groupoids sending a group $G$ to the category ${\textbf {B}}G$ with a single object and morphisms giving the group $G$, the structure above gives a double groupoid. Let's give an explicit example: from the group extension
   $1\to \mathbb {Z} _{4}\to Q_{8}\to \mathbb {Z} _{2}\to 1$
and the embedding of $\mathbb {Z} _{2}\to \mathbb {Z} _{4}$, there is an associated double groupoid from the two term complex of groups
   $Q_{8}\to \mathbb {Z} _{4}$
with kernel is $\mathbb {Z} _{4}$ and cokernel is given by $\mathbb {Z} _{2}$. This gives an associated homotopy type $X$ with
   $\pi _{1}(X)=\mathbb {Z} _{2}$ and $\pi _{2}(X)=\mathbb {Z} _{4}$
Its postnikov invariant can be determined by the class of $Q_{8}\to \mathbb {Z} _{4}$ in the group cohomology group $H^{3}(\mathbb {Z} _{2},\mathbb {Z} _{4})\cong \mathbb {Z} /2$. Because this is not a trivial crossed-module, it's postnikov invariant is $1$, giving a homotopy type which is not equivalent to the geometric realization of a simplicial abelian group.

## Homotopy double groupoid

A generalisation to dimension 2 of the fundamental groupoid on a set of base points was given by Brown and Higgins in 1978 as follows. Let $(X,A,C)$ be a triple of spaces, i.e. $C\subseteq A\subseteq X$. Define $\rho (X,A,C)$ to be the set of homotopy classes rel vertices of maps of a square into X which take the edges into A and the vertices into C. It is not entirely trivial to prove that the natural compositions of such squares in two directions are inherited by these homotopy classes to give a double groupoid, which also has an extra structure of so-called connections necessary to discuss the idea of commutative cube in a double groupoid. This double groupoid is used in an essential way to prove a two-dimensional Seifert-van Kampen theorem, which gives new information and computations on second relative homotopy groups as part of a crossed module. For more information, see Part I of the book by Brown, Higgins, Sivera listed below.

## Double groupoid category

The category whose objects are double groupoids and whose morphisms are double groupoid homomorphisms that are double groupoid diagram (D) functors is called the double groupoid category, or the category of double groupoids.