The Category of all sets and functions between them denoted by
Formally, Morphisms are pairs
(this is because codomain of
See also Category of Relations and Category of Partial Functions
and note:
but what are sets actually?
In Zermelo-Fraenkel Set Theory, we take the perspective that there are some sets
and there is a notion of
In particular, everything is a set, so nonsensical questions like “is
actually make sense (and the answer depends on the convention we took).
In Category Theory, we would much rather look at sets as some objects
and then have functions between them be other “things”.
We need to list a slightly different set of axioms,
but we can still capture the intuitive notion of a set.
The difference now is that there is no notion of
The elements of a set
(where
This notion is formalized as a Generalized Element
This way, the elements of a set like
while a function
It no longer makes sense to ask if
because the functions are no longer sets themselves.
This better captures the usual mathematical intuition we have about sets.
Lemma
Category
Proof
Note that all injective functions are left cancellable
so they are Monomorphisms.
Let
whenever
Pick
Set
Then
Thus Monomorphisms are exactly the injective functions.
Similarly, all surjective functions are right cancellable, thus Epimorphisms.
Let
for any
Let
Note
for any
Then for any
and thus
Thus Monomorphism + Epimorphism