A category is called a groupoid if all its morphisms are invertible. In the synthetic setting, we need to phrase this condition for arbitrary terms of the arrow category, as follows.

Definition 2.4.1 (Groupoid). We say that a category \(C\) is a groupoid if in an arbitrary categorical context, every morphism expression \(f\colon x \to y\) in \(C\) is an isomorphism. Explicitly: for every category \(\Gamma\) and every functor \(f\colon \Gamma \to \Ar(C)\), there exists a dashed arrow \(\tilde{f}\) making the following diagram commute: Commutative diagram; see the PDF for its LaTeX source

The following result provides various alternative formulations for a category to be a groupoid:

Proposition 2.4.2. Let \(X\) be a category. Then the following conditions are equivalent:

  1. (1) The category \(X\) is a groupoid;

  2. (2) The functor \(\pi_{\Iso}\colon \Iso(X) \to \Ar(X)\) admits a section, in the sense of Definition 1.3.2;

  3. (3) The functor \(p_{[1]}^*\colon X \to \Ar(X)\), induced by the map \(p_{[1]}\colon [1] \to *\), admits a section;

  4. (4) The functor \(p_{[1]}^*\colon X \to \Ar(X)\) is an equivalence.

Proof

To see that (1) implies (2), take \(\Gamma = \Ar(X)\) and let \(f = \id_{\Ar(X)}\), so that \(s = \tilde{f}\) provides a section. Conversely, if \(s\colon \Ar(X) \to \Iso(X)\) is a section of \(\pi_{\Iso}\), a lift \(\tilde{f}\) of \(f\) may be given as \(\tilde{f} := s \circ f\).

The fact that (2) and (3) are equivalent is immediate from the following commutative diagram: Commutative diagram; see the PDF for its LaTeX source using that the map \(i\) is an equivalence by Axiom F. Finally, note that the functor \((p_{[1]})^*\) always admits a retraction given by \(\ev_0\colon \Ar(X) \to X\), and thus the equivalence between (3) and (4) is an instance of Lemma 1.3.3.

Convention 2.4.3. From now on we will mostly take (4) as our working definition of groupoids.

Example 2.4.4. The terminal category \(*\) is a groupoid: there is a commutative triangle Commutative diagram; see the PDF for its LaTeX source and since the bottom and right diagonal maps are equivalences (see Lemma 1.7.9) the claim follows by 2-out-of-3.

Example 2.4.5. If \(X\) and \(Y\) are groupoids, then their product \(X \times Y\) is a groupoid. This is an immediate consequence of Lemma 1.7.10.

Lemma 2.4.6. Let \(C \to D\) be an equivalence of categories. Then \(C\) is a groupoid if and only if \(D\) is a groupoid.

Proof

This follows from the following commutative diagram: Commutative diagram; see the PDF for its LaTeX source Here the bottom functor is again an equivalence by the functoriality of functor categories, Construction 1.7.7.

Lemma 2.4.7. Let \(X\) be a groupoid. Then for every category \(C\), the functor category \(\Fun(C,X)\) is a groupoid.

Proof

This follows from the fact that the map \(\Fun(C,X) \to \Ar(\Fun(C,X))\) is equivalent to the map \(\Fun(C,X) \to \Fun(C,\Ar(X))\) induced by the equivalence \(X \iso \Ar(X)\).

Lemma 2.4.8. Groupoids are closed under retracts: if \(X\) is a groupoid and \(Y\) is a retract of \(X\), then \(Y\) is also a groupoid.

Proof

If \(Y\) is a retract of \(X\), then the functor \(Y \to \Ar(Y)\) is a retract of the functor \(X \to \Ar(X)\). In particular, if the latter is an equivalence then so is the former by Lemma 1.3.9.

Lemma 2.4.9. Consider functors \(f\colon X \to C\) and \(g\colon Y \to C\) and assume that \(X\) and \(Y\) are groupoids. Then the pullback \(X \times_C Y\) is a groupoid.

Proof

The functor \(X \times_C Y \to \Ar(X \times_C Y)\) factors as \[ X \times_C Y \iso X \times_{\Ar(C)} Y \iso \Ar(X) \times_{\Ar(C)} \Ar(Y) \simeq \Ar(X \times_C Y). \] Here the second functor is an equivalence since \(X\) and \(Y\) are groupoids. The last equivalence is Lemma 1.7.11. Finally, we claim that the first functor is a pullback of the diagonal of the embedding \(i\colon C \to \Ar(C)\) from Corollary 2.3.7 and hence is an equivalence. To see this, consider the following commutative diagram: Commutative diagram; see the PDF for its LaTeX source The right bottom square, the right outer rectangle and the top outer rectangle are pullback squares by Lemma 1.6.13. It thus follows from Lemma 1.6.11 that also the top left square is a pullback square.

Lemma 2.4.10. Consider a pullback square Commutative diagram; see the PDF for its LaTeX source of categories. If \(X\), \(Y\) and \(Y'\) are groupoids, then so is \(X'\).

Proof

This is a special case of Lemma 2.4.9.

Lemma 2.4.11. The empty category \(\emptyset\) is a groupoid.

Proof

We need to show that the functor \(\emptyset \to \Ar(\emptyset)\) is an equivalence, or equivalently that the map \(\ev_0\colon \Ar(\emptyset) \to \emptyset\) is an equivalence. But this is immediate from Axiom B.4'.