# The naive exercise of defining (small) categories inside Zermelo's Set Theory, on purpose

I'm interested in the toy system that results from defining small categories within the boundaries of set theory, i.e., showing for any category example that each part in the definition of that category is a set, succinctly proved from the Zermelo axioms. Obviously, this isn't the way it is supposed to be done, and that's why i acknowledge my interest on this restriction as some kind of toy example. In a word, my question is: how is it done?

A more concrete question, given the related question, is: what pure set, built from set axioms, can be used for $$\mathcal{O}$$ in the set of objects $$\mathsf{Ob}(C) = \{\mathcal O\}$$ of the small category $$C$$ equiped with a group $$G$$ as its set of morphisms, $$\mathsf{Mor}(C) = G$$?

Hence, a (necessarily toy) category, defined inside the language restrictions provided by Zermelo theory, must be some ordered tuple but i don't know exactly which sets it should be equipped with besides the set of objects, the set of morphisms and a set-theoretical function evaluating to the compositions (functions $$\text{dom}$$ and $$\text{cod}$$, $$\mathsf{Mor}(C) \rightarrow \mathsf{Obj}(C)$$, too?). Moreover, the well-known examples of finite categories like those with 1 or 2 objects and discrete categories left me clueless, because they assume some abstract single point {*} or some abstract identity morphism $$\text{Id}_{a}$$ that is never made explicit and therefore i couldn't begin to think which set can be used, or from what superset previously proven take some element as the corresponding categorical concept.

Thus, a second concrete (third in total) question: given any set $$X$$, if i want the discrete category $$D=\text{Discr}{\left(X \right)}$$ such that $$\mathsf{Obj}(D)=X$$, what pure set, built from set axioms, can be used for each $$\text{Id}_{x \in X}$$ (the only thing we need, since we can't talk about composition in discrete categories)?

It is said that if you happen to know what the objects of a category really are, you may use those aspects in your statements, but then you are not expressing yourself categorically. That's why i'm seeking this as a toy example, i don't want to dispute the correct categorical way of doing things and i won't mind if the solution goes against standard categorical ideas (for starters i foresee that, set-theoretically speaking, there will be an infinite class of different discrete, one object toy categories).

Nonetheless, if you take the elements of a poset as the objects, a category can be determined taking ordered pairs (x,y) as morphisms between the x and y such that x $$\leq$$ y, and morphism composition can be understood set-theoretically. I wonder if the same can be done with the previous examples.

• I'm not sure what you think is an issue here--you can just pick whatever arbitrary sets you want. Commented Apr 9, 2023 at 4:02
• FYI, I've edited my answer to include answers to your two concrete questions. Commented Apr 9, 2023 at 7:31

First, I don't think you're doing anything "non-categorical" here - it's actually fairly common in category theory to consider how to define categories in terms of some set-theoretic foundation. (Possibly ZFC, possibly something else.)

One way to approach your question is to look at the notion of internal category, which is a way of defining a category "inside" another category. If you define a category internal to $$\mathbf{Set}$$ then you'll know exactly which sets and functions you need to define and what properties they need to have. (Small categories are exactly categories internal to $$\mathbf{Set}$$.)

Instantiating this definition in $$\mathbf{Set}$$ gives you the following:

• a set $$C_0$$ whose elements are called "objects"

• a set $$C_1$$ whose elements are called "morphisms"

• functions $$s, t\colon C_1\to C_0$$ that tell you the source (codomain) and target (domain) of a given morphism

• a function $$e\colon C_0 \to C_1$$ that takes an object and gives you its identity morphism

• a function $$c\colon C_1\times_{C_0} C_1 \to C_1$$ taking two morphisms and returning their composite.

The last one might need some unpackging. The notation $$\times_{C_1}$$ indicates a pullback of the functions $$s$$ and $$t$$. Explicitly, $$C_1\times_{C_0} C_1 = \{(X,Y) \mid X,Y\in C_0, s(Y) = t(X)\}.$$ So it's the set of pairs of morphisms such that the domain of one is the codomain of the other.

These sets and functions have to be such that a bunch of diagrams commute. But with some effort you can turn each of those diagrams into a set theoretical statement. For example, the first two on the nlab page say $$s(e(X)) = X \qquad\text{and}\qquad t(e(X)) = X \qquad \text{for all X\in C_0},$$ i.e. the domain and codomain of $$id_X$$ are $$X$$. The second pair of diagrams say that if you compose a morphism $$f\colon X\to Y$$ with a morphism $$g\colon Y\to Z$$, then the result has $$s(f;g) = X$$ and $$t(f;g) = Z$$. It would obviously take some effort to unpack all the diagrams as explicit set-theoretic statements, but in principle it's a straightforward exercise.

A more concrete question, given the related question, is: what pure set, built from set axioms, can be used for $$\mathcal{O}$$ in the set of objects $$\mathsf{Ob}(C) = \{\mathcal O\}$$ of the small category $$C$$ equiped with a group $$G$$ as its set of morphisms, $$\mathsf{Mor}(C) = G$$?
If I understand your question, you want a specific set, defined in ZF(C), that can be used for the set of objects in a category that only has one object, such as the category corresponding to a group. For this you may take $$\{\emptyset\}$$.
Or if you prefer you can take $$\{\{\emptyset\}\}$$ instead, or $$\{\{\mathbb{R}\setminus\mathbb{Q},47\}\}$$, or whatever else takes your fancy, as long as it has exactly one element - it makes no difference. Technically, for each of these choices you'll be defining a different category, but those categories will all be isomorphic, so to a category theorist they might as well be the same. This is why category theorists tend not to care what the element is, and just write $$\{*\}$$.
Thus, a second concrete (third in total) question: given any set $$X$$, if i want the discrete category $$D=\text{Discr}{\left(X \right)}$$ such that $$\mathsf{Obj}(D)=X$$, what pure set, built from set axioms, can be used for each $$\text{Id}_{x \in X}$$ (the only thing we need, since we can't talk about composition in discrete categories)?
For this the most obvious choice is $$C_1 = C_0 = X$$. So the pure set corresponding to each $$\text{Id}_x$$ will be the pure set $$x\in X$$, assumed to already be defined. But again if you want to choose something else it doesn't really matter, as long as you can define a bijection between your set and $$X$$.