# Foundations of Relative Category Theory [frct-003I]

We assume knowledge of basic categorical concepts such as categories, functors, and natural transformations. The purpose of this lecture is to develop the notion of a category over another category.

We will draw on the following materials:

Benedick Ahrens; Peter LeFanu Lumsdaine. Displayed Categories. In: Logical Methods in Computer Science. Mar 5, 2019. 10.23638/LMCS-15%281%3A20%292019. [ahrens-lumsdaine-2019]
We introduce and develop the notion of displayed categories. A displayed category over a category is equivalent to “a category and functor , but instead of having a single collection of “objects of ” with a map to the objects of , the objects are given as a family indexed by objects of , and similarly for the morphisms. This encapsulates a common way of building categories in practice, by starting with an existing category and adding extra data/properties to the objects and morphisms. The interest of this seemingly trivial reformulation is that various properties of functors are more naturally defined as properties of the corresponding displayed categories. Grothendieck fibrations, for example, when defined as certain functors, use equality on objects in their definition. When defined instead as certain displayed categories, no reference to equality on objects is required. Moreover, almost all examples of fibrations in nature are, in fact, categories whose standard construction can be seen as going via displayed categories. We therefore propose displayed categories as a basis for the development of fibrations in the type-theoretic setting, and similarly for various other notions whose classical definitions involve equality on objects. Besides giving a conceptual clarification of such issues, displayed categories also provide a powerful tool in computer formalisation, unifying and abstracting common constructions and proof techniques of category theory, and enabling modular reasoning about categories of multi-component structures. As such, most of the material of this article has been formalised in Coq over the UniMath library, with the aim of providing a practical library for use in further developments.
Jean Bénabou. Fibered categories and the foundations of naïve category theory. [benabou-1985]
En hommage à Alexandre Grothendieck.
Francis Borceux. Handbook of Categorical Algebra 2: Categories and Structures. [borceux-hca-2]
A Handbook of Categorical Algebra is designed to give, in three volumes, a detailed account of what should be known by everybody working in, or using, category theory. As such it will be a unique reference. The volumes are written in sequence, with the first being essentially self-contained, and are accessible to graduate students with a good background in mathematics. Volume 1, which is devoted to general concepts, can be used for advanced undergraduate courses on category theory. After introducing the terminology and proving the fundamental results concerning limits, adjoint functors and Kan extensions, the categories of fractions are studied in detail; special consideration is paid to the case of localizations. The remainder of the first volume studies various ‘refinements’ of the fundamental concepts of category and functor.
Bart Jacobs. Categorical logic and type theory. Studies in Logic and the Foundations of Mathematics. Jan 14, 1999. [jacobs-1999]
This book is an attempt to give a systematic presentation of both logic and type theory from a categorical perspective, using the unifying concept of fibred category. Its intended audience consists of logicians, type theorists, category theorists and (theoretical) computer scientists.
Thomas Streicher. Fibred Categories à la Jean Bénabou. Dec 16, 2022. 10.48550/arXiv.1801.02927. [streicher-fcjb]
These are notes about the theory of Fibred Categories as I have learned it from Jean Benabou. I also have used results from the Thesis of Jean-Luc Moens from 1982 in those sections where I discuss the fibered view of geometric morphisms. Thus, almost all of the contents is not due to me but most of it cannot be found in the literature since Benabou has given many talks on it but most of his work on fibered categories is unpublished. But I am solely responsible for the mistakes and for misrepresentations of his views. And certainly these notes do not cover all the work he has done on fibered categories. I just try to explain the most important notions he has come up with in a way trying to be as close as possible to his intentions and intuitions. I started these notes in 1999 when I gave a course on some of the material at a workshop in Munich. They have developed quite a lot over the years and I have tried to include most of the things I want to remember.

These lecture notes are deeply influenced by Thomas Streicher.

# Foundational Assumptions [frct-000R]

Definition (meta-category) [frct-001F]

A meta-category is defined by explaining what an object of is, and, given two objects , what a morphism from to is, together with the following operations:

1. for each object , an identity map ,
2. for any two maps and , a composite map ,
3. such that the following equations hold:
Remark (collections) [frct-003J]

In the definition of meta-category, we have not imposed any restrictions on what kinds of things the objects and morphisms are; our definition is pre-mathematical, so we do not assume beforehand that there is a such thing as a collection of “all” meta-categories.

We may define analogous notions of meta-functor, etc. But we do not assume that the notion of “all meta-functors ” is well-defined; the notion is entirely schematic.

Assumption. We assume a meta-category whose objects we will refer to as “collections”. We assume that the meta-category of all collections satisfies the axioms of Lawvere’s ETCS.

Definition (category) [frct-001G]
A category is defined to be a meta-category whose objects are defined to be the elements of some collection, and for any two objects the morphisms are defined to be the elements of some collection.
Remark (cartesian closure of the meta-category of all categories) [frct-003K]

Consequently there exists a meta-category of all categories. Following Lawvere (but deviating from some other authors that ground the notion of meta-categories in classes) we notice that is cartesian closed; in other words, all functor categories exist regardless of size.

Assumption. At times we may assume that there exists a category of collections that we will refer to as sets, such that is closed under the axioms of ETCS. Rather than work with at all times, our approach is to use the tools of relative category theory to objectify the notions of “small” and “locally small” category over any category , generalizing the role of from classical category theory.

# Displayed Categories and Fibrations [frct-0008]

Definition (displayed category) [frct-0000]

Let be a category. A displayed category over is defined by the following data according to (Ahrens and Lumsdaine):

1. for each object , a collection of displayed objects ,

2. for each morphism and displayed objects and , a family of collections of displayed morphisms , an element of which shall denote by ,

3. for each and , a displayed morphism ,

4. for each and in and objects , a function

that we will denote like ordinary (diagrammatic) function composition,

5. such that the following equations hold:

Note that these are well-defined because of the corresponding laws for the base category .

Notation (square brackets for subscripts) [frct-003R]
When we have too many subscripts, we will write instead of .

Definition (cartesian morphisms) [frct-0001]

Let be displayed over , and let ; a morphism in is called cartesian over when for any and there exists a unique with . We visualize this unique factorization of through over as follows:

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{x}, ne = \bar{y}, sw = x, north = \bar{f}, south = f, se = y, nw/style = pullback, } \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {u}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (ne); \draw[->] (u) to node [sloped,below] {m} (sw); \draw[->,exists] (u') to node [desc] {\bar{m}} (nw); \end{tikzpicture}$

Above we have used the “pullback corner” to indicate as a cartesian map. We return to this in our discussion of the self-indexing (the fundamental self-indexing) of a category.

Definition (cartesian fibration) [frct-0002]

A displayed category over is said to be a cartesian fibration, when for each morphism and displayed object , there exists a displayed object and a cartesian morphism in the sense of cartesian morphisms. Note that the pair is unique up to unique isomorphism, so being a cartesian fibration is a property of a displayed category.

There are other variations of fibration. For instance, is said to be an isofibration when the condition above holds just for isomorphisms in the base.

# The Fundamental Self-Indexing [frct-0003]

Construction (the fundamental self-indexing) [frct-001X]

Let be an ordinary category; there is an important displayed category over given fiberwise by the slices of .

1. For , we define to be the collection of pairs .
2. For , we define to be the collection of commuting squares in the following configuration:
$\DiagramSquare{ height = 1.7cm, nw = \bar{x}, ne = \bar{y}, sw = x, se = y, west = p\Sub{x}, east = p\Sub{y}, south = f, north = \bar{f}, west/style = {->,exists}, east/style = {->,exists}, north/style = {->,exists}, }$
Exercise [frct-001Y]
Prove that from the fundamental self-indexing is a cartesian fibration if and only if has pullbacks.

# The Generalized Pullback Lemma [frct-0014]

In light of the fundamental self-indexing, the following result for displayed categories generalizes the ordinary “pullback lemma.”

Lemma (generalized pullback lemma) [frct-001H]

Let , and suppose that is cartesian over . Then is cartesian over if and only if is cartesian over .

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ height = 1.5cm, west/style = lies over, east/style = lies over, nw/style = pullback, sw = y, nw = \bar{y}, se = z, ne = \bar{z}, south = g, north = \bar{g}, } \node (x*) [dotted pullback, left = of nw] {\bar{x}}; \node (x) [left = of sw] {x}; \draw[->] (x*) to node [above] {\bar{f}} (nw); \draw[lies over] (x*) to (x); \draw[->] (x) to node [below] {f} (sw); \end{tikzpicture}$
Proof.

Suppose first that is cartesian. To see that is cartesian, we must construct a unique factorization as follows:

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{x}, ne = \bar{y}, sw = x, north = \bar{f}, south = f, se = y, nw/style = pullback, ne/style = pullback, } \node (z') [right = 2cm of ne] {\bar{z}}; \node (z) [right = 2cm of se] {z}; \draw[lies over] (z') to (z); \draw[->] (se) to node [below] {g} (z); \draw[->] (ne) to node [desc] {\bar{g}} (z'); \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {u}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (z'); \draw[->] (u) to node [sloped,below] {m} (sw); \draw[->,exists] (u') to (nw); \end{tikzpicture}$

Because is cartesian, we can factor for a unique . Then, because is cartesian, we can further factor for a unique . We conclude that there is a unique for which , as required.

Conversely, suppose that is cartesian. To see that is cartesian, we must construct a unique factorization as follows:

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{x}, ne = \bar{y}, sw = x, north = \bar{f}, south = f, se = y, ne/style = pullback, } \node (z') [right = 2cm of ne] {\bar{z}}; \node (z) [right = 2cm of se] {z}; \draw[lies over] (z') to (z); \draw[->] (se) to node [below] {g} (z); \draw[->] (ne) to node [desc] {\bar{g}} (z'); \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {u}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (ne); \draw[->] (u) to node [sloped,below] {m} (sw); \draw[->,exists] (u') to (nw); \end{tikzpicture}$

Because is cartesian, we can factor for a unique . On the other hand, because is cartesian, there is a unique for which ; as both and satisfy this condition, we conclude . Therefore, there is a unique for which , as required.

# An Alternative Definition of Fibration [frct-0029]

Warning. Some authors including Grothendieck give an equivalent definition of cartesian fibration that factors through a nonequivalent definition of cartesian morphisms. Such authors refer to our notion of cartesian morphism as hypercartesian (see Streicher).

Definition (hypocartesian morphisms) [frct-002A]

Let be displayed over , and let ; a morphism in is called hypocartesian over when for any and there exists a unique with as follows:

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{x}, ne = \bar{y}, sw = x, north = \bar{f}, south = f, se = y, } \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {x}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (ne); \draw[double] (u) to (sw); \draw[->,exists] (u') to node [desc] {i} (nw); \end{tikzpicture}$
Remark [frct-003G]
Cartesian morphisms are clearly hypocartesian (setting and ), but the converse does not hold. The problem is that in an arbitrary displayed category, hypocartesian morphisms may not be closed under composition.
Lemma (hypocartesian = cartesian in a cartesian fibration) [frct-002C]

Let be a cartesian fibration in the sense of cartesian fibration, and let be displayed over . The displayed morphism is cartesian if and only if it is hypocartesian.

Proof.

Any cartesian map is clearly hypocartesian. To see that a hypocartesian map in a cartesian fibration is cartesian, we consider the cartesian lift of under :

$\DiagramSquare{ height = 1.5cm, west/style = lies over, east/style = lies over, nw/style = pullback, nw = \bar{x}\tick, ne = \bar{y}, se = y, sw = x, south = f, north = \bar{f}\tick, north/style = {->,exists}, }$

As the cartesian lift is also hypocartesian, it follows that there is a unique vertical isomorphism identifying with factoring through . Being cartesian over is clearly stable under isomorphism, hence we conclude that is cartesian from the fact that is cartesian.

Grothendieck defines a fibration in terms of (what we refer to as) hypocartesian morphisms rather than (what we refer to as) cartesian morphisms, and therefore imposes the additional constraint that the hypocartesian morphisms be closed under composition. In equivalence with Grothendieck's fibrations below, we verify that these two definitions of cartesian fibration coincide.

Lemma (equivalence with Grothendieck's fibrations) [frct-002B]

Let be displayed over . Then is a cartesian fibration if and only if the following two conditions hold:

1. Hypocartesian lifts. For each and there exists a displayed object and hypocartesian morphism .
2. Closure under composition. If and are hypocartesian, then is hypocartesian.
Proof.

Suppose first that is a cartesian fibration in our sense. Then has hypocartesian lifts because it has cartesian lifts. For closure under composition, fix hypocartesian ; because hypocartesian and cartesian maps coincide in a cartesian fibration we know that are also cartesian and hence by the generalized pullback lemma so is the composite ; therefore it follows that is also hypocartesian.

Conversely, suppose that is a cartesian fibration in the sense of Grothendieck, and let be the hypocartesian lift of at ; we shall see that is also a cartesian lift of at by constructing a unique factorization as follows:

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{x}, ne = \bar{y}, sw = x, north = \bar{f}, south = f, se = y, } \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {u}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (ne); \draw[->] (u) to node [sloped,below] {m} (sw); \draw[->,exists] (u') to (nw); \end{tikzpicture}$

Let be the hypocartesian lift of at , where . By hypothesis, the composite is hypocartesian, so factors uniquely through over :

$\begin{tikzpicture}[diagram] \SpliceDiagramSquare{ west/style = lies over, east/style = lies over, north/node/style = upright desc, height = 1.5cm, nw = \bar{u}', ne = \bar{y}, sw = u, north = \bar{m};\bar{f}, south = m;f, se = y, } \node (u') [above left = 1.5cm of nw,xshift=-.5cm] {\bar{u}}; \node (u) [above left = 1.5cm of sw,xshift=-.5cm] {u}; \draw[lies over] (u') to (u); \draw[->,bend left=30] (u') to node [sloped,above] {\bar{h}} (ne); \draw[double] (u) to (sw); \draw[->,exists] (u') to node [desc] {i} (nw); \end{tikzpicture}$

The composite is the required (cartesian) factorization of through over . To see that is the unique such map, we observe that all morphisms factor uniquely through over as a consequence of being hypocartesian.

Remark (two ways to generalize pullbacks) [frct-002D]
Hypocartesian and cartesian morphisms can be thought of as two distinct ways to generalize the concept of a pullback, depending on what one considers the essential properties of pullbacks. Hypocartesian morphisms more directly generalize the “little picture” universal property of pullbacks as limiting cones, whereas cartesian morphisms generalize the “big picture” dynamics of the pullback pasting lemma. As we have seen in hypocartesian = cartesian in a cartesian fibration these two notions coincide in any cartesian fibration; the instance of this result for the fundamental self-indexing verifies that pullbacks can be equivalently presented in terms of cartesian morphisms, as we have pointed out in #frct-001Y.

# Displayed and Fibered Functors [frct-0004]

Let be displayed over and let be displayed over . If is an ordinary functor, than a displayed functor from to over is given by the following data:

1. for each displayed object , a displayed object ,

2. for each displayed morphism , a displayed morphism ,

3. such that the assignment preserves displayed identities and displayed composition.

From this notion, we can see that the variation of displayed categories over their base categories itself has a “displayed categorical” structure; up to size issues, we could speak of the displayed bicategory of displayed categories.

Note. The correct notion of morphism between cartesian fibrations is given by displayed functors that preserve cartesian maps. We will call these fibered functors.

# Fiber Categories and Vertical Maps [frct-0005]

Let be a category displayed over . A vertical map in is defined to be one that lies over the identity map in . For every