Grothendieck construction

The Grothendieck construction (named after Alexander Grothendieck) is a construction used in the mathematical field of category theory. It is a fundamental construction in the theory of descent, in the theory of stacks, and in fibred category theory. In categorical logic, the construction is used to model the relationship between a type theory and a logic over that type theory, and allows for the translation of concepts from indexed category theory into fibred category theory, such as Lawvere's concept of hyperdoctrine.

The Grothendieck construction was first studied for the special case presheaves of sets by Mac Lane, where it was called the category of elements.

Motivation
If $$\left\{ A_i \right\}_{i\in I}$$ is a family of sets indexed by another set, one can form the disjoint union or coproduct

$$\coprod_{i\in I} A_i$$,

which is the set of all ordered pairs $$(i,a)$$ such that $$a\in A_i$$. The disjoint union set is naturally equipped with a "projection" map

$$\pi : \coprod_{i\in I} A_i\to I$$

defined by

$$\pi(i,a)=i$$.

From the projection $$\pi$$ it is possible to reconstruct the original family of sets $$\left\{ A_i \right\}_{i\in I}$$ up to a canonical bijection, as for each $$i\in I, A_i\cong \pi^{-1}(\{i\})$$ via the bijection $$a\mapsto (i,a)$$. In this context, for $$i\in I$$, the preimage $$\pi^{-1}(\{i\})$$ of the singleton set $$\{i\}$$ is called the "fiber" of $$\pi$$ over $$i$$, and any set $$B$$ equipped with a choice of function $$f : B\to I$$ is said to be "fibered" over $$I$$. In this way, the disjoint union construction provides a way of viewing any family of sets indexed by $$I$$ as a set "fibered" over $$I$$, and conversely, for any set $$f : B\to I$$ fibered over $$I$$, we can view it as the disjoint union of the fibers of $$f$$. Jacobs has referred to these two perspectives as "display indexing" and "pointwise indexing".

The Grothendieck construction generalizes this to categories. For each category $$\mathcal{C}$$, family of categories $$\{F(c)\}_{c\in\mathcal{C}}$$ indexed by the objects of $$\mathcal{C}$$ in a functorial way, the Grothendieck construction returns a new category $$\mathcal{E}$$ fibered over $$\mathcal{C}$$ by a functor $$\pi$$ whose fibers are the categories $$\{F(c)\}_{c\in\mathcal{C}}$$.

Definition
Let $$F\colon \mathcal{C} \rightarrow \mathbf{Cat}$$ be a functor from any small category to the category of small categories. The Grothendieck construction for $$F$$ is the category $$\Gamma(F)$$ (also written $$\textstyle\int_{\textstyle\mathcal{C}} F$$, $$\textstyle\mathcal{C} \int F$$ or $$F \rtimes \mathcal{C}$$), with Composition of morphisms is defined by $$(f,g) \circ (f',g') = (f \circ f', g \circ F(f)(g'))$$.
 * objects being pairs $$(c,x)$$, where $$c\in \operatorname{obj}(\mathcal{C})$$ and $$x\in \operatorname{obj}(F(c))$$; and
 * morphisms in $$\operatorname{hom}_{\Gamma(F)}((c_1,x_1),(c_2,x_2))$$ being pairs $$(f, g)$$ such that $$f: c_1 \to c_2$$ in $$\mathcal{C}$$, and $$g: F(f)(x_1) \to x_2$$ in $$F(c_2)$$.

Example
If $$G$$ is a group, then it can be viewed as a category, $$\mathcal{C}_G,$$ with one object and all morphisms invertible. Let $$F:\mathcal{C}_G\to\mathbf{Cat}$$ be a functor whose value at the sole object of $$\mathcal{C}_G$$ is the category $$\mathcal{C}_H,$$ a category representing the group $$H$$ in the same way. The requirement that $$F$$ be a functor is then equivalent to specifying a group homomorphism $$\varphi:G\to\operatorname{Aut}(H),$$ where $$\operatorname{Aut}(H)$$ denotes the group of automorphisms of $$H.$$ Finally, the Grothendieck construction, $$F \rtimes \mathcal{C}_G,$$ results in a category with one object, which can again be viewed as a group, and in this case, the resulting group is (isomorphic to) the semidirect product $$H \rtimes_\varphi G.$$