# Fibred category

Fibred categories (or fibered categories) are abstract entities in mathematics used to provide a general framework for descent theory. They formalise the various situations in geometry and algebra in which inverse images (or pull-backs) of objects such as vector bundles can be defined. As an example, for each topological space there is the category of vector bundles on the space, and for every continuous map from a topological space X to another topological space Y is associated the pullback functor taking bundles on Y to bundles on X. Fibred categories formalise the system consisting of these categories and inverse image functors. Similar setups appear in various guises in mathematics, in particular in algebraic geometry, which is the context in which fibred categories originally appeared. Fibered categories are used to define stacks, which are fibered categories (over a site) with "descent". Fibrations also play an important role in categorical semantics of type theory, and in particular that of dependent type theories.
Fibred categories were introduced by Alexander Grothendieck (1959, 1971), and developed in more detail by Jean Giraud (1964, 1971).

## Background and motivations

There are many examples in topology and geometry where some types of objects are considered to exist on or above or over some underlying base space. The classical examples include vector bundles, principal bundles, and sheaves over topological spaces. Another example is given by "families" of algebraic varieties parametrised by another variety. Typical to these situations is that to a suitable type of a map $f:X\to Y$ between base spaces, there is a corresponding inverse image (also called pull-back) operation $f^{*}$ taking the considered objects defined on $Y$ to the same type of objects on $X$. This is indeed the case in the examples above: for example, the inverse image of a vector bundle $E$ on $Y$ is a vector bundle $f^{*}(E)$ on $X$.
Moreover, it is often the case that the considered "objects on a base space" form a category, or in other words have maps (morphisms) between them. In such cases the inverse image operation is often compatible with composition of these maps between objects, or in more technical terms is a functor. Again, this is the case in examples listed above.
However, it is often the case that if $g:Y\to Z$ is another map, the inverse image functors are not strictly compatible with composed maps: if $z$ is an object over $Z$ (a vector bundle, say), it may well be that
    $f^{*}(g^{*}(z))\neq (g\circ f)^{*}(z).$
Instead, these inverse images are only naturally isomorphic. This introduction of some "slack" in the system of inverse images causes some delicate issues to appear, and it is this set-up that fibred categories formalise.
The main application of fibred categories is in descent theory, concerned with a vast generalisation of "glueing" techniques used in topology. In order to support descent theory of sufficient generality to be applied in non-trivial situations in algebraic geometry the definition of fibred categories is quite general and abstract. However, the underlying intuition is quite straightforward when keeping in mind the basic examples discussed above.

## Formal definitions

There are two essentially equivalent technical definitions of fibred categories, both of which will be described below. All discussion in this section ignores the set-theoretical issues related to "large" categories. The discussion can be made completely rigorous by, for example, restricting attention to small categories or by using universes.

### Cartesian morphisms and functors

If $\phi :F\to E$ is a functor between two categories and $S$ is an object of $E$, then the subcategory of $F$ consisting of those objects $x$ for which $\phi (x)=S$ and those morphisms $m$ satisfying $\phi (m)={\text{id}}_{S}$, is called the fibre category (or fibre) over $S$, and is denoted $F_{S}$. The morphisms of $F_{S}$ are called $S$-morphisms, and for $x,y$ objects of $F_{S}$, the set of $S$-morphisms is denoted by ${\text{Hom}}_{S}(x,y)$. The image by $\phi$ of an object or a morphism in $F$ is called its projection (by $\phi$). If $f$ is a morphism of $E$, then those morphisms of $F$ that project to $f$ are called $f$-morphisms, and the set of $f$-morphisms between objects $x$ and $y$ in $F$ is denoted by ${\text{Hom}}_{f}(x,y)$.
A morphism $m:x\to y$ in $F$ is called $\phi$-cartesian (or simply cartesian) if it satisfies the following condition:
    if $f:T\to S$ is the projection of $m$, and if $n:z\to y$ is an $f$-morphism, then there is precisely one $T$-morphism $a:z\to x$ such that $m\circ a=n$.
A cartesian morphism $m:x\to y$ is called an inverse image of its projection $f=\phi (m)$; the object $x$ is called an inverse image of $y$ by $f$.
The cartesian morphisms of a fibre category $F_{S}$ are precisely the isomorphisms of $F_{S}$. There can in general be more than one cartesian morphism projecting to a given morphism $f:T\to S$, possibly having different sources; thus there can be more than one inverse image of a given object $y$ in $F_{S}$ by $f$. However, it is a direct consequence of the definition that two such inverse images are isomorphic in $F_{T}$.
A functor $\phi :F\to E$ is also called an $E$-category, or said to make $F$ into an $E$-category or a category over $E$. An $E$-functor from an $E$-category $\phi :F\to E$ to an $E$-category $\psi :G\to E$ is a functor $\alpha :F\to G$ such that $\psi \circ \alpha =\phi$. $E$-categories form in a natural manner a 2-category, with 1-morphisms being $E$-functors, and 2-morphisms being natural transformations between $E$-functors whose components lie in some fibre.
An $E$-functor between two $E$-categories is called a cartesian functor if it takes cartesian morphisms to cartesian morphisms. Cartesian functors between two $E$-categories $F,G$ form a category ${\text{Cart}}_{E}(F,G)$, with natural transformations as morphisms. A special case is provided by considering $E$ as an $E$-category via the identity functor: then a cartesian functor from $E$ to an $E$-category $F$ is called a cartesian section. Thus a cartesian section consists of a choice of one object $x_{S}$ in $F_{S}$ for each object $S$ in $E$, and for each morphism $f:T\to S$ a choice of an inverse image $m_{f}:x_{T}\to x_{S}$. A cartesian section is thus a (strictly) compatible system of inverse images over objects of $E$. The category of cartesian sections of $F$ is denoted by
    ${\underset {\longleftarrow }{\mathrm {Lim} }}(F/E)=\mathrm {Cart} _{E}(E,F).$
In the important case where $E$ has a terminal object $e$ (thus in particular when $E$ is a topos or the category $E_{/S}$ of arrows with target $S$ in $E$) the functor
    $\epsilon \colon {\underset {\longleftarrow }{\mathrm {Lim} }}(F/E)\to F_{e},\qquad s\mapsto s(e)$
is fully faithful (Lemma 5.7 of Giraud (1964)).

### Fibred categories and cloven categories

The technically most flexible and economical definition of fibred categories is based on the concept of cartesian morphisms. It is equivalent to a definition in terms of cleavages, the latter definition being actually the original one presented in Grothendieck (1959); the definition in terms of cartesian morphisms was introduced in Grothendieck (1971) in 1960–1961.
An $E$ category $\phi :F\to E$ is a fibred category (or a fibred $E$-category, or a category fibred over $E$) if each morphism $f$ of $E$ whose codomain is in the range of projection has at least one inverse image, and moreover the composition $m\circ n$ of any two cartesian morphisms $m,n$ in $F$ is always cartesian. In other words, an $E$-category is a fibred category if inverse images always exist (for morphisms whose codomains are in the range of projection) and are transitive.
If $E$ has a terminal object $e$ and if $F$ is fibred over $E$, then the functor $\epsilon$ from cartesian sections to $F_{e}$ defined at the end of the previous section is an equivalence of categories and moreover surjective on objects.
If $F$ is a fibred $E$-category, it is always possible, for each morphism $f:T\to S$ in $E$ and each object $y$ in $F_{S}$, to choose (by using the axiom of choice) precisely one inverse image $m:x\to y$. The class of morphisms thus selected is called a cleavage and the selected morphisms are called the transport morphisms (of the cleavage). A fibred category together with a cleavage is called a cloven category. A cleavage is called normalised if the transport morphisms include all identities in $F$; this means that the inverse images of identity morphisms are chosen to be identity morphisms. Evidently if a cleavage exists, it can be chosen to be normalised; we shall consider only normalised cleavages below.
The choice of a (normalised) cleavage for a fibred $E$-category $F$ specifies, for each morphism $f:T\to S$ in $E$, a functor $f^{*}:F_{S}\to F_{T}$; on objects $f^{*}$ is simply the inverse image by the corresponding transport morphism, and on morphisms it is defined in a natural manner by the defining universal property of cartesian morphisms. The operation which associates to an object $S$ of $E$ the fibre category $F_{S}$ and to a morphism $f$ the inverse image functor $f^{*}$ is almost a contravariant functor from $E$ to the category of categories. However, in general it fails to commute strictly with composition of morphisms. Instead, if $f:T\to S$ and $g:U\to T$ are morphisms in $E$, then there is an isomorphism of functors
    $c_{f,g}\colon \quad g^{*}f^{*}\to (f\circ g)^{*}.$
These isomorphisms satisfy the following two compatibilities:
* $c_{f,\mathrm {id} _{T}}=c_{\mathrm {id} _{S},f}=\mathrm {id} _{f^{*}}$
* for three consecutive morphisms $h,g,f\colon \quad V\to U\to T\to S$ and object $x\in F_{S}$ the following holds: $c_{f,g\circ h}\cdot c_{g,h}(f^{*}(x))=c_{f\circ g,h}(x)\cdot h^{*}(c_{f,g}(x)).$
It can be shown (see Grothendieck (1971) section 8) that, inversely, any collection of functors $f^{*}:F_{S}\to F_{T}$ together with isomorphisms $c_{f,g}$ satisfying the compatibilities above, defines a cloven category. These collections of inverse image functors provide a more intuitive view on fibred categories; and indeed, it was in terms of such compatible inverse image functors that fibred categories were introduced in Grothendieck (1959).
The paper by Gray referred to below makes analogies between these ideas and the notion of fibration of spaces.
These ideas simplify in the case of groupoids, as shown in the paper of Brown referred to below, which obtains a useful family of exact sequences from a fibration of groupoids.

### Splittings and split fibred categories

A (normalised) cleavage such that the composition of two transport morphisms is always a transport morphism is called a splitting, and a fibred category with a splitting is called a split (fibred) category. In terms of inverse image functors the condition of being a splitting means that the composition of inverse image functors corresponding to composable morphisms $f,g$ in $E$ equals the inverse image functor corresponding to $f\circ g$. In other words, the compatibility isomorphisms $c_{f,g}$ of the previous section are all identities for a split category. Thus split $E$-categories correspond exactly to true functors from $E$ to the category of categories.
Unlike cleavages, not all fibred categories admit splittings. For an example, see below.

### Co-cartesian morphisms and co-fibred categories

One can invert the direction of arrows in the definitions above to arrive at corresponding concepts of co-cartesian morphisms, co-fibred categories and split co-fibred categories (or co-split categories). More precisely, if $\phi :F\to E$ is a functor, then a morphism $m:x\to y$ in $F$ is called co-cartesian if it is cartesian for the opposite functor $\phi ^{\text{op}}:F^{\text{op}}\to E^{\text{op}}$. Then $m$ is also called a direct image and $y$ a direct image of $x$ for $f=\phi (m)$. A co-fibred $E$-category is an $E$-category such that direct image exists for each morphism in $E$ and that the composition of direct images is a direct image. A co-cleavage and a co-splitting are defined similarly, corresponding to direct image functors instead of inverse image functors.

## Properties
### The 2-categories of fibred categories and split categories

The categories fibred over a fixed category $E$ form a 2-category $\mathbf {Fib} (E)$, where the category of morphisms between two fibred categories $F$ and $G$ is defined to be the category ${\text{Cart}}_{E}(F,G)$ of cartesian functors from $F$ to $G$.
Similarly the split categories over $E$ form a 2-category $\mathbf {Scin} (E)$ (from French catégorie scindée), where the category of morphisms between two split categories $F$ and $G$ is the full sub-category ${\text{Scin}}_{E}(F,G)$ of $E$-functors from $F$ to $G$ consisting of those functors that transform each transport morphism of $F$ into a transport morphism of $G$. Each such morphism of split $E$-categories is also a morphism of $E$-fibred categories, i.e., ${\text{Scin}}_{E}(F,G)\subset {\text{Cart}}_{E}(F,G)$.
There is a natural forgetful 2-functor $i:\mathbf {Scin} (E)\to \mathbf {Fib} (E)$ that simply forgets the splitting.

### Existence of equivalent split categories

While not all fibred categories admit a splitting, each fibred category is in fact equivalent to a split category. Indeed, there are two canonical ways to construct an equivalent split category for a given fibred category $F$ over $E$. More precisely, the forgetful 2-functor $i:\mathbf {Scin} (E)\to \mathbf {Fib} (E)$ admits a right 2-adjoint $S$ and a left 2-adjoint $L$ (Theorems 2.4.2 and 2.4.4 of Giraud 1971), and $S(F)$ and $L(F)$ are the two associated split categories. The adjunction functors $S(F)\to F$ and $F\to L(F)$ are both cartesian and equivalences (ibid.). However, while their composition $S(F)\to L(F)$ is an equivalence (of categories, and indeed of fibred categories), it is not in general a morphism of split categories. Thus the two constructions differ in general. The two preceding constructions of split categories are used in a critical way in the construction of the stack associated to a fibred category (and in particular stack associated to a pre-stack).

## Categories fibered in groupoids

There is a related construction to fibered categories called categories fibered in groupoids. These are fibered categories $p:{\mathcal {F}}\to {\mathcal {C}}$ such that any subcategory of ${\mathcal {F}}$ given by
* Fix an object $c\in {\text{Ob}}({\mathcal {C}})$
* The objects of the subcategory are $x\in {\text{Ob}}({\mathcal {F}})$ where $p(x)=c$
* The arrows are given by $f:x\to y$ such that $p(f)={\text{id}}_{c}$
is a groupoid denoted ${\mathcal {F}}_{c}$. The associated 2-functors from the Grothendieck construction are examples of stacks. In short, the associated functor $F_{p}:{\mathcal {C}}^{op}\to {\text{Groupoids}}$ sends an object $c$ to the category ${\mathcal {F}}_{c}$, and a morphism $d\to c$ induces a functor from the fibered category structure. Namely, for an object $x\in {\text{Ob}}({\mathcal {F}}_{c})$ considered as an object of ${\mathcal {F}}$, there is an object $y\in {\text{Ob}}({\mathcal {F}})$ where $p(y)=d$. This association gives a functor ${\mathcal {F}}_{c}\to {\mathcal {F}}_{d}$ which is a functor of groupoids.

## Examples
### Fibered categories

* The functor ${\text{Ob}}:{\textbf {Cat}}\to {\textbf {Set}}$, sending a category to its set of objects, is a fibration. For a set $S$, the fiber consists of categories $C$ with ${\text{Ob}}(C)=S$. The cartesian arrows are the fully faithful functors.
* Categories of arrows: For any category $E$ the category of arrows $A(E)$ in $E$ has as objects the morphisms in $E$, and as morphisms the commutative squares in $E$ (more precisely, a morphism from $f:X\to T$ to $g:Y\to S$ consists of morphisms $a:X\to Y$ and $b:T\to S$ such that $bf=ga$). The functor which takes an arrow to its target makes $A(E)$ into an $E$-category; for an object $S$ of $E$ the fibre $E_{S}$ is the category $E_{/S}$ of $S$-objects in $E$, i.e., arrows in $E$ with target $S$. Cartesian morphisms in $A(E)$ are precisely the cartesian squares in $E$, and thus $A(E)$ is fibred over $E$ precisely when fibre products exist in $E$.
* Fibre bundles: Fibre products exist in the category ${\text{Top}}$ of topological spaces and thus by the previous example $A({\text{Top}})$ is fibred over ${\text{Top}}$. If ${\text{Fib}}$ is the full subcategory of $A({\text{Top}})$ consisting of arrows that are projection maps of fibre bundles, then ${\text{Fib}}_{S}$ is the category of fibre bundles on $S$ and ${\text{Fib}}$ is fibred over ${\text{Top}}$. A choice of a cleavage amounts to a choice of ordinary inverse image (or pull-back) functors for fibre bundles.
* Vector bundles: In a manner similar to the previous examples the projections $p:V\to S$ of real (complex) vector bundles to their base spaces form a category ${\text{Vect}}_{\mathbb {R} }$ (${\text{Vect}}_{\mathbb {C} }$) over ${\text{Top}}$ (morphisms of vector bundles respecting the vector space structure of the fibres). This ${\text{Top}}$-category is also fibred, and the inverse image functors are the ordinary pull-back functors for vector bundles. These fibred categories are (non-full) subcategories of ${\text{Fib}}$.
* Sheaves on topological spaces: The inverse image functors of sheaves make the categories ${\text{Sh}}(S)$ of sheaves on topological spaces $S$ into a (cleaved) fibred category ${\text{Sh}}$ over ${\text{Top}}$. This fibred category can be described as the full sub-category of $A({\text{Top}})$ consisting of étalé spaces of sheaves. As with vector bundles, the sheaves of groups and rings also form fibred categories of ${\text{Top}}$.
* Sheaves on topoi: If $E$ is a topos and $S$ is an object in $E$, the category $E_{S}$ of $S$-objects is also a topos, interpreted as the category of sheaves on $S$. If $f:T\to S$ is a morphism in $E$, the inverse image functor $f^{*}$ can be described as follows: for a sheaf $F$ on $E_{S}$ and an object $p:U\to T$ in $E_{T}$ one has $f^{*}F(U)={\text{Hom}}_{T}(U,f^{*}F)$ equals ${\text{Hom}}_{S}(f\circ p,F)=F(U)$. These inverse image make the categories $E_{S}$ into a split fibred category on $E$. This can be applied in particular to the "large" topos $TOP$ of topological spaces.
* Quasi-coherent sheaves on schemes: Quasi-coherent sheaves form a fibred category over the category of schemes. This is one of the motivating examples for the definition of fibred categories.
* Fibred category admitting no splitting: A group $G$ can be considered as a category with one object and the elements of $G$ as the morphisms, composition of morphisms being given by the group law. A group homomorphism $f:G\to H$ can then be considered as a functor, which makes $G$ into a $H$-category. It can be checked that in this set-up all morphisms in $G$ are cartesian; hence $G$ is fibred over $H$ precisely when $f$ is surjective. A splitting in this setup is a (set-theoretic) section of $f$ which commutes strictly with composition, or in other words a section of $f$ which is also a homomorphism. But as is well known in group theory, this is not always possible (one can take the projection in a non-split group extension).
* Co-fibred category of sheaves: The direct image functor of sheaves makes the categories of sheaves on topological spaces into a co-fibred category. The transitivity of the direct image shows that this is even naturally co-split.

### Category fibered in groupoids

One of the main examples of categories fibered in groupoids comes from groupoid objects internal to a category ${\mathcal {C}}$. So given a groupoid object
    $x{\overset {s}{\underset {t}{\rightrightarrows }}}y$
there is an associated groupoid object
    $h_{x}{\overset {s}{\underset {t}{\rightrightarrows }}}h_{y}$
in the category of contravariant functors ${\underline {\text{Hom}}}({\mathcal {C}}^{op},{\text{Sets}})$ from the yoneda embedding. Since this diagram applied to an object $z\in {\text{Ob}}({\mathcal {C}})$ gives a groupoid internal to sets
    $h_{x}(z){\overset {s}{\underset {t}{\rightrightarrows }}}h_{y}(z)$
there is an associated small groupoid ${\mathcal {G}}$. This gives a contravariant 2-functor $F:{\mathcal {C}}^{op}\to {\text{Groupoids}}$, and using the Grothendieck construction, this gives a category fibered in groupoids over ${\mathcal {C}}$. Note the fiber category over an object is just the associated groupoid from the original groupoid in sets.

#### Group quotient

Given a group object $G$ acting on an object $X$ from $a:G\to {\text{Aut}}(X)$, there is an associated groupoid object
    $G\times X{\underset {t}{\overset {s}{\rightrightarrows }}}X$
where $s:G\times X\to X$ is the projection on $X$ and $t:G\times X\to X$ is the composition map $G\times X\xrightarrow {\left(a,{\text{id}}\right)} {\text{Aut}}(X)\times X\xrightarrow {(f,x)\mapsto f(x)} X$. This groupoid gives an induced category fibered in groupoids denoted $p:[X/G]\to {\mathcal {C}}$.

#### Two-term chain complex

For an abelian category ${\mathcal {A}}$ any two-term complex
    ${\mathcal {E}}_{1}\xrightarrow {d} {\mathcal {E}}_{0}$
has an associated groupoid
    $s,t:{\mathcal {E}}_{1}\oplus {\mathcal {E}}_{0}\rightrightarrows {\mathcal {E}}_{0}$
where
    ${\begin{aligned}s(e_{1}+e_{0})&=e_{0}\\t(e_{1}+e_{0})&=d(e_{1})+e_{0}\end{aligned}}$
this groupoid can then be used to construct a category fibered in groupoids. One notable example of this is in the study of the cotangent complex for local-complete intersections and in the study of exalcomm.