# Kerodon

$\Newextarrow{\xRightarrow}{5,5}{0x21D2}$

### 2.1.2 Examples of $2$-Categories

We now collect some natural examples of non-strict $2$-categories.

Example 2.1.2.1 (Correspondences). Let $\operatorname{\mathcal{C}}$ be a category containing a pair of objects $X$ and $Y$. A correspondence from $X$ to $Y$ is an object $M \in \operatorname{\mathcal{C}}$ together with a pair of morphisms $X \xleftarrow {f} M \xrightarrow {g} Y$ in $\operatorname{\mathcal{C}}$. The correspondences from $X$ to $Y$ can be regarded as the objects of a category $\operatorname{\mathcal{M}}_{X,Y}$, where a morphism from $(M,f,g)$ to $(M',f',g')$ in $\operatorname{\mathcal{M}}_{X,Y}$ is given by a morphism $u: M \rightarrow M'$ for which the diagram

$\xymatrix { & M \ar [dd]^{u} \ar [dr]^{ g } \ar [dl]_{f} & \\ X & & Y \\ & M' \ar [ul]^{f'} \ar [ur]_{g'} & }$

commutes.

Assume now that the category $\operatorname{\mathcal{C}}$ admits fiber products. We can then construct a $2$-category $\operatorname{Corr}(\operatorname{\mathcal{C}})$ as follows:

• The objects of $\operatorname{Corr}(\operatorname{\mathcal{C}})$ are the objects of $\operatorname{\mathcal{C}}$.

• For every pair of objects $X,Y \in \operatorname{\mathcal{C}}$, we take $\underline{\operatorname{Hom}}_{ \operatorname{Corr}(\operatorname{\mathcal{C}})}(X,Y)$ to be the category $\operatorname{\mathcal{M}}_{X,Y}$; in particular, $1$-morphisms from $X$ to $Y$ in the category $\operatorname{Corr}(\operatorname{\mathcal{C}})$ can be identified with correspondences from $X$ to $Y$.

• For every triple of objects $X,Y,Z \in \operatorname{\mathcal{C}}$, the composition law

$\circ : \underline{\operatorname{Hom}}_{\operatorname{Corr}(\operatorname{\mathcal{C}})}( Y, Z) \times \underline{\operatorname{Hom}}_{\operatorname{Corr}(\operatorname{\mathcal{C}})}( X, Y) \rightarrow \underline{\operatorname{Hom}}_{ \operatorname{Corr}(\operatorname{\mathcal{C}})}( X, Z )$

is given on objects by the construction $(N, M) \mapsto M \times _{Y} N$.

• For every object $X \in \operatorname{\mathcal{C}}$, the identity $1$-morphism from $X$ to itself in $\operatorname{\mathcal{C}}$ is given by the correspondence $X \xleftarrow { \operatorname{id}_ X } X \xrightarrow { \operatorname{id}_ X} X$. Moreover, for every $1$-morphism $X \leftarrow M \rightarrow Y$ in $\operatorname{\mathcal{C}}$, the left and right unit constraints

$\lambda _{M}: M \times _{Y} Y \Rightarrow M \quad \quad \rho _{M}: X \times _{X} M \Rightarrow M$

are the isomorphisms given by projection onto the first and second factor, respectively.

• For every triple of composable $1$-morphisms

$W \xrightarrow {M} X \xrightarrow {N} Y \xrightarrow {P} Z$

in $\operatorname{Corr}(\operatorname{\mathcal{C}})$, the associativity constraint $\alpha _{P,N,M}: P \circ (N \circ M) \Rightarrow (P \circ N) \circ M$ is the canonical isomorphism of iterated fiber products $(M \times _{W} N) \times _{Y} P \simeq M \times _{W} (N \times _{Y} P)$.

We will refer to $\operatorname{Corr}(\operatorname{\mathcal{C}})$ as the $2$-category of correspondences in $\operatorname{\mathcal{C}}$.

Example 2.1.2.2 (Bimodules). We define a $2$-category $\mathrm{Bimod}$ as follows:

• The objects of $\mathrm{Bimod}$ are associative rings.

• For every pair of associative rings $A$ and $B$, we take $\underline{\operatorname{Hom}}_{\mathrm{Bimod}}( B, A)$ to be the category whose objects are $A$-$B$ bimodules: that is, abelian groups $M = {}_{A}^{}M_{B}$ equipped with commuting actions of $A$ on the left and $B$ on the right.

• For every triple of associative rings $A$, $B$, and $C$, we take the composition law

$\underline{\operatorname{Hom}}_{\mathrm{Bimod}}( B, A) \times \underline{\operatorname{Hom}}_{\mathrm{Bimod}}( C,B ) \rightarrow \underline{\operatorname{Hom}}_{\mathrm{Bimod}}( C, A)$

to be the relative tensor product functor

$( M, N ) \mapsto M {\otimes _{B}} N$
• For every associative ring $A$, we take the identity object of $\underline{\operatorname{Hom}}_{\mathrm{Bimod}}( A, A)$ to be the ring $A$, regarded as a bimodule over itself.

• For every $A$-$B$ bimodule $M = {}_{A}^{}M_{B}$, we define the left and right unit constraints

$\lambda _{M}: A \otimes _{A} M \xRightarrow {\sim } M \quad \quad \rho _{M}: M \otimes _{B} B \xRightarrow {\sim } M$

by the formulae $\lambda _{M}(a \otimes x) = ax$ and $\rho _{M}(x \otimes b) = xb$.

• For every quadruple of associative rings $A$, $B$, $C$, and $D$ equipped with bimodules $M = {}_{A}^{}M_ B$, $N = {}_{B}^{}N_ C$, and $P = {}_{C}^{}P_ D$, we define the associativity constraint

$\alpha _{M,N,P}: M \otimes _{B} (N \otimes _{C} P) \xRightarrow {\sim } ( M \otimes _{B} N) \otimes _{C} P$

to be the isomorphism characterized by the identity $\alpha _{M, N, P}(x \otimes (y \otimes z)) = (x \otimes y) \otimes z$.

Example 2.1.2.3 (Group Cocycles). Let $G$ be a group with identity element $1 \in G$, and let $\Gamma$ be an abelian group on which $G$ acts by automorphisms; we denote the action of an element $g \in G$ by $(\gamma \in \Gamma ) \mapsto g(\gamma ) \in \Gamma$. A $3$-cocycle on $G$ with values in $\Gamma$ is a map of sets

$\alpha : G \times G \times G \rightarrow \Gamma \quad \quad (h,g,f) \mapsto \alpha _{h,g,f}.$

which satisfies the equations

2.1
\begin{eqnarray} \label{equation:cocycle-identity} h( \alpha _{g,f,e} ) - \alpha _{hg, f,e} + \alpha _{h, gf, e} - \alpha _{h, g, fe} + \alpha _{h,g,f} = 0 \end{eqnarray}

for every quadruple of elements $e,f,g,h \in G$.

To every $3$-cocycle $\alpha$ as above, we can associate a $2$-category $\operatorname{\mathcal{C}}$ as follows:

• The $2$-category $\operatorname{\mathcal{C}}$ has a single object, which we will denote by $X$.

• The $1$-morphisms in $\operatorname{\mathcal{C}}$ from $X$ to itself are the elements of the group $G$. Composition of $1$-morphisms is given by the multiplication on $G$, and the identity $1$-morphism $\operatorname{id}_{X}$ is the unit element $1 \in G$.

• For every pair of $1$-morphisms $f,g: X \rightarrow X$, the collection of $2$-morphisms from $f$ to $g$ is given by

$\operatorname{Hom}_{ \underline{\operatorname{Hom}}_{\operatorname{\mathcal{C}}}(X,X) }( f, g) = \begin{cases} \Gamma & \text{ if } f = g \\ \emptyset & \text{ otherwise. } \end{cases}$
• Given an element $f \in G$ and a pair of $2$-morphisms $\gamma , \delta : f \Rightarrow f$ in $\operatorname{\mathcal{C}}$ (which we can identify with elements of the abelian group $\Gamma$), the vertical composition $f \xRightarrow {\gamma } f \xRightarrow {\delta } f$ is given by the sum $\gamma + \delta$ (formed in the abelian group $\Gamma$).

• Given a pair of $1$-morphisms $f,g: X \rightarrow X$ (which we identify with elements of $G$) and a pair of $2$-morphisms $\gamma : f \Rightarrow f$, $\delta : g \Rightarrow g$ (which we identify with elements of $\Gamma$), the horizontal composition $\delta \circ \gamma : (g \circ f) \Rightarrow (g \circ f)$ is given by the sum $g(\gamma ) + \delta$ (formed in the abelian group $\Gamma$).

• For every composable triple of $1$-morphisms $X \xrightarrow {f} X \xrightarrow {g} X \xrightarrow {h} X$, the associativity constraint $h \circ (g \circ f) \xRightarrow {\sim } (h \circ g) \circ f$ is given the value of the $3$-cocycle $\alpha$ on the triple $(h,g,f) \in G \times G \times G$.

• For every $1$-morphism $f: X \rightarrow Y$ in $\operatorname{\mathcal{C}}$, the left and right unit constraints are given by

$\rho _{f} = - \alpha _{f,1,1} \quad \quad \lambda _{f} = \alpha _{1,1,f}.$

Unwinding the definitions, we see that the pentagon identity for $\operatorname{\mathcal{C}}$ reduces to the condition that $\alpha$ is a $3$-cocycle (equation (2.1) above). For every pair of elements $f,g \in G$, applying (2.1) to the quadruple $(g,1,1,f)$ yields the identity

$\alpha _{g \cdot 1, 1,f} + \alpha _{g, 1, 1 \cdot f} = g( \alpha _{1,1,f} ) + \alpha _{g,1 \cdot 1,f} + \alpha _{g,1,1}$

Subtracting $\alpha _{g,1,f}$ from both sides and invoking the definitions of $\rho _{g}$ and $\lambda _{f}$, we obtain the identity

$\alpha _{g,1,f} = g( \lambda _{f} ) - \rho _{g},$

which is equivalent to the triangle identity for $\operatorname{\mathcal{C}}$.

Remark 2.1.2.4. Let $G$ be a group, let $\Gamma$ be an abelian group equipped with an action of $G$ by automorphisms, and let $\operatorname{\mathcal{C}}$ be the $2$-category obtained by applying the construction of Example 2.1.2.3 to some $3$-cocycle $\alpha : G \times G \times G \rightarrow \Gamma$. We can describe $\operatorname{\mathcal{C}}$ informally as follows: it is a $2$-category whose $1$-morphisms are the elements of the group $G$, whose $2$-morphisms are the elements of the abelian group $\Gamma$, and whose associativity constraint is the $3$-cocycle $\alpha$.

Remark 2.1.2.5. Let $G$ be a group with identity element $1 \in G$, let $\Gamma$ be an abelian group on which $G$ acts by automorphisms, let $\alpha : G \times G \times G \rightarrow \Gamma$ be a $3$-cocycle, and let $\operatorname{\mathcal{C}}$ be the $2$-category of Example 2.1.2.3. The following conditions are equivalent:

• The $3$-cocycle $\alpha$ is normalized: that is, it satisfies the equation $\alpha _{g,1,f} = 0$ for every pair of elements $f,g \in G$ (note that this assumption guarantees that $\alpha _{1,g,f} = 0 = \alpha _{g,f,1}$, by virtue of our assumption that $\alpha$ is a $3$-cocycle; compare with Proposition 2.1.1.11).

• The $2$-category $\operatorname{\mathcal{C}}$ is strictly unitary, in the sense of Variant 2.1.1.5. That is, the left and right unit constraints

$\lambda _{f}: 1 \circ f \Rightarrow f = f \quad \quad \rho _{f}: f \circ 1 \Rightarrow f$

are the identity $2$-morphism in $\operatorname{\mathcal{G}}$, for each $1$-morphism $f$ of $\operatorname{\mathcal{C}}$.