1.2.4 Tables of Analogies Between Set Theory and Category Theory

Here we record some analogies between notions in set theory and category theory. The analogies relating to presheaves relate equally well to copresheaves, as the opposite $X^{\mathrm{op}}$ of a set $X$ is just $X$ again.

The basic analogies between set theory and category theory are summarised in the following table:

Set Theory Category Theory
Enrichment in $\{ \mathsf{true},\mathsf{false}\} $ Enrichment in $\mathsf{Sets}$
Set $X$ Category $\mathcal{C}$
Element $x\in X$ Object $X\in \text{Obj}\webleft (\mathcal{C}\webright )$
Function Functor
Function $X\to \{ \mathsf{true},\mathsf{false}\} $ Copresheaf $\mathcal{C}\to \mathsf{Sets}$
Function $X\to \{ \mathsf{true},\mathsf{false}\} $ Presheaf $\mathcal{C}^{\mathsf{op}}\to \mathsf{Sets}$

The category of presheaves $\mathsf{PSh}\webleft (\mathcal{C}\webright )$ and the category of copresheaves $\mathsf{CoPSh}\webleft (\mathcal{C}\webright )$ on a category $\mathcal{C}$ are the 1-categorical counterparts to the powerset $\mathcal{P}\webleft (X\webright )$ of subsets of a set $X$. The further analogies built upon this are summarised in the following table:

Set Theory Category Theory
Powerset $\mathcal{P}\webleft (X\webright )$
(Chapter 2: Constructions With Sets, Definition 2.4.1.1.1)
Presheaf category $\mathsf{PSh}\webleft (\mathcal{C}\webright )$
(, )
Characteristic function
$\chi _{x}\colon X\to \{ \mathsf{t},\mathsf{f}\} $
(Chapter 2: Constructions With Sets, )
Representable Presheaf
$h_{X}\colon \mathcal{C}^{\mathsf{op}}\to \mathsf{Sets}$
(, of )
Characteristic embedding

$\chi _{\webleft (-\webright )}\colon X\hookrightarrow \mathcal{P}\webleft (X\webright )$

(Chapter 2: Constructions With Sets, of )
Yoneda embedding

${\text{よ}}\colon \mathcal{C}\hookrightarrow \mathsf{PSh}\webleft (\mathcal{C}\webright )$

(, )
Characteristic relation $\chi _{X}\webleft (-_{1},-_{2}\webright )\colon X\times X\to \{ \mathsf{t},\mathsf{f}\} $
(Chapter 2: Constructions With Sets, of )
$\textup{Hom}$ profunctor $\textup{Hom}_{\mathcal{C}}\webleft (-_{1},-_{2}\webright )\colon \mathcal{C}^{\mathsf{op}}\times \mathcal{C}\to \mathsf{Sets}$
()
The Yoneda lemma for sets

$\textup{Hom}_{\mathcal{P}\webleft (X\webright )}\webleft (\chi _{x},\chi _{U}\webright )\cong \chi _{U}\webleft (x\webright )$

(Chapter 2: Constructions With Sets, Proposition 2.5.5.1.1)
The Yoneda lemma for categories

$\text{Nat}\webleft (h_{X},\mathcal{F}\webright )\cong \mathcal{F}\webleft (X\webright )$

(, )
The characteristic
embedding is fully faithful,

$\textup{Hom}_{\mathcal{P}\webleft (X\webright )}\webleft (\chi _{x},\chi _{y}\webright )\cong \chi _{X}\webleft (x,y\webright )$

(Chapter 2: Constructions With Sets, Corollary 2.5.5.1.2)
The Yoneda
embedding is fully faithful,

$\text{Nat}\webleft (h_{X},h_{Y}\webright )\cong \textup{Hom}_{\mathcal{C}}\webleft (X,Y\webright )$

(, of )
Subsets are unions
of their elements,

$\displaystyle U=\bigcup _{x\in U}\webleft\{ x\webright\} $
or
$\displaystyle \chi _{U}=\mkern -18mu\operatorname*{\text{colim}}_{\chi _{x}\in \mathsf{Sets}\webleft (U,\{ \mathsf{t},\mathsf{f}\} \webright )}\webleft (\chi _{x}\webright )$

Presheaves are colimits
of representables,

$\displaystyle \mathcal{F}\cong \operatorname*{\text{colim}}_{h_{X}\in \int _{\mathcal{C}}\mathcal{F}}\webleft (h_{X}\webright )$

()

We summarise the analogies between un/straightening in set theory and category theory in the following table:

Set Theory Category Theory
Assignment $U\mapsto \chi _{U}$ Assignment $\mathcal{F}\mapsto \int _{\mathcal{C}}\mathcal{F}$
(the category
of elements)
Un/straightening isomorphism
$\mathcal{P}\webleft (X\webright )\cong \mathsf{Sets}\webleft (X,\{ \mathsf{t},\mathsf{f}\} \webright )$

(Chapter 2: Constructions With Sets, of )
Un/straightening equivalence
$\mathsf{PSh}\webleft (\mathcal{C}\webright )\mathrel {\smash {\overset {\scriptscriptstyle \text{eq.}}\cong }}\mathsf{DFib}\webleft (\mathcal{C}\webright )$

()

We summarise the analogies between functions $\mathcal{P}\webleft (A\webright )\to \mathcal{P}\webleft (B\webright )$ and functors $\mathsf{PSh}\webleft (\mathcal{C}\webright )\to \mathsf{PSh}\webleft (\mathcal{D}\webright )$ in the following table:

Set Theory Category Theory
Direct image function

$f_{*}\colon \mathcal{P}\webleft (X\webright )\to \mathcal{P}\webleft (Y\webright )$

(Chapter 2: Constructions With Sets, Definition 2.6.1.1.1)
Direct image functor

$F_{*}\colon \mathsf{PSh}\webleft (\mathcal{C}\webright )\to \mathsf{PSh}\webleft (\mathcal{D}\webright )$

()
Inverse image function

$f^{-1}\colon \mathcal{P}\webleft (Y\webright )\to \mathcal{P}\webleft (X\webright )$

(Chapter 2: Constructions With Sets, Definition 2.6.2.1.1)
Inverse image functor

$F^{*}\colon \mathsf{PSh}\webleft (\mathcal{D}\webright )\to \mathsf{PSh}\webleft (\mathcal{C}\webright )$

()
Direct image with
compact support function

$f_{!}\colon \mathcal{P}\webleft (X\webright )\to \mathcal{P}\webleft (Y\webright )$

(Chapter 2: Constructions With Sets, Definition 2.6.3.1.1)
Direct image with
compact support functor

$F_{!}\colon \mathsf{PSh}\webleft (\mathcal{C}\webright )\to \mathsf{PSh}\webleft (\mathcal{D}\webright )$

()

We summarise the analogies between functions relations and profunctors in the following table:

Set Theory Category Theory
Relation

$R\colon X\times Y\to \{ \mathsf{t},\mathsf{f}\} $

Profunctor

$\mathfrak {p}\colon \mathcal{D}^{\mathsf{op}}\times \mathcal{C}\to \mathsf{Sets}$

Relation

$R\colon X\to \mathcal{P}\webleft (Y\webright )$

Profunctor

$\mathfrak {p}\colon \mathcal{C}\to \mathsf{PSh}\webleft (\mathcal{D}\webright )$

Relation as a cocontinuous
morphism of posets

$R\colon \webleft (\mathcal{P}\webleft (X\webright ),\subset \webright )\to \webleft (\mathcal{P}\webleft (Y\webright ),\subset \webright )$

Profunctor as a
colimit-preserving functor

$\mathfrak {p}\colon \mathsf{PSh}\webleft (\mathcal{C}\webright )\to \mathsf{PSh}\webleft (\mathcal{D}\webright )$


Noticed something off, or have any comments? Feel free to reach out!


You can also use the contact form below: