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. Note that the analogies relating to presheaves relate equally well to copresheaves, as the opposite $X^{\mathrm{op}}$ of a set $X$ is just $X$ again.

Basics:

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}\} $ Functor $\mathcal{C}\to \mathsf{Sets}$
Function $X\to \{ \mathsf{true},\mathsf{false}\} $ Presheaf $\mathcal{C}^{\mathsf{op}}\to \mathsf{Sets}$

Powersets and categories of presheaves:

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

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

(Item 4 of Definition 2.3.1.1)
Yoneda embedding

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

()
Characteristic relation $\chi _{X}\webleft (-_{1},-_{2}\webright )$
(Item 3 of Definition 2.3.1.1)
$\textup{Hom}$ profunctor $\textup{Hom}_{\mathcal{C}}\webleft (-_{1},-_{2}\webright )$
()
The Yoneda lemma for sets

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

(Proposition 2.3.1.3)
The Yoneda lemma for categories

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

(Definition 2.1.6.1)
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 )$

(Corollary 2.3.1.4)
The Yoneda
embedding is fully faithful,

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

()
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 )$

Categories of elements:

Set Theory Category Theory
Assignment $U\mapsto \chi _{U}$ Assignment $\mathcal{F}\mapsto \int _{\mathcal{C}}\mathcal{F}$
Assignment

$U\mapsto \chi _{U}$

giving an isomorphism

$\mathcal{P}\webleft (X\webright )\cong \mathsf{Sets}\webleft (X,\{ \mathsf{t},\mathsf{f}\} \webright )$

(Item 6 of Proposition 2.3.2.3)
Assignment

$\mathcal{F}\mapsto \int _{\mathcal{C}}\mathcal{F}$

giving an equivalence

$\mathsf{PSh}\webleft (\mathcal{C}\webright )\mathrel {\smash {\overset {\scriptscriptstyle \text{eq.}}\cong }}\mathsf{DFib}\webleft (\mathcal{C}\webright )$

Functions between powersets and functors between presheaf categories:

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.4.4.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.4.5.1.1)
Inverse image functor

$f^{-1}\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.4.6.1.1)
Direct image with
compact support functor

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

()

Relations and profunctors:

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: