# Category theory $\subset$ Set theory or vice versa?

I just started reading the ABC of category theory using the appendix of a text, the first chapter of a text that I have never read, and above all (I found out now that they handle well the theory) the wikipedia pages. I want to know only this: in all three sources are given the definition of the category, and in all three I noticed that it's not possible to treat categories in set theory. The reason strikes the eye immediately when it is assumed that the objects are contained in classes, in particular the example of the category of sets. I ask then how it is treated the theory because from what I'm reading I do not understand (indeed in the second source it seems that develops internally to set theory). I think it needs some extension of set theory for treating them.

-
See ncatlab.org/nlab/show/Grothendieck+universe for one option. – Qiaochu Yuan Apr 28 '13 at 8:04
Set theory can be modeled within category theory; and vice versa. However there are arguments that using categories for foundations of set theory is not sufficient because we make implicit use of sets in the meta-theory. – Asaf Karagila Apr 28 '13 at 8:09
You can do quite a bit of pure category theory within the confines of ordinary set theory (by focusing on category-theoretic analogues of what is studied in a first course about rings and modules, say), but for most applications one wants to be able to talk about categories whose collection of objects is "large" in some sense. – Zhen Lin Apr 28 '13 at 8:13

The relationship between category theory and set theory is much complex. I suppose that by set theory you mean ZFC. In such context you can define what are categories, functors and natural transformations and develop most of the basic theory. The problems arise when you want to deal with huge categories such as $\mathbf{Set}$ (the category of all small set and function between set) which clearly cannot be defined in a ZFC. Anyway there are some trick to solve this problem similar to the one used in ZFC to talk about the class of all ordinals or the class of all set: the idea is to introduce some symbolic abbreviations to threat formally sets and functions as forming a category. For instance you can introduce a predicate $x \in \mathcal {Ob}(\mathbf{Set})$ as equivalent to $x=x$ a predicate $f \in \mathcal {Ar}(\mathbf{Set})$ as symbolic abbreviation for $\exists a,b \ f \colon a \to b$, and do the same for composition and identities. In this way you have formally introduced the structure of category between your sets and with other similar trick you can built most of (if not all, I'm not so sure) the theory of categories in ZFC.

Of course for simplicity and having more control is also possible to consider some other set theories as NBG or Tarski-Grothendieck which solve the size issues imposing the restriction the object and arrow sets of categories must belong to some special sets (called universes) which are closed under some operations (powerset, pairing, union, etcetcetc, in which is possible model ZFC).

About the title of the question: is true that category theory can be developed internally to a set theory, any way the converse it's true because sets can be naturally viewed as discrete categories, this point of view seems to be important in some context of type theory in which sets aren't unstructured objects but are types which have an equivalence relations, the identity, which is represented by the category/groupoid structure of discrete categories.

Hope this help.

-
That sets can be viewed as discrete categories, does not imply that set theory is part of category theory ... – Martin Brandenburg Apr 28 '13 at 18:25
@MartinBrandenburg I totally agree with you, but of course I suppose that one should explicit say what does it mean by category theory. On the other end functor between discrete categories are just functions, so the category of sets and the category of discrete categories are isomorphic and so set theory can be internalized in category theory (or more exactly in the theory of categories and functors). – Giorgio Mossa Apr 28 '13 at 21:23

I suggest you to read (at least parts of) the following nice paper:

http://arxiv.org/pdf/0810.1279v2.pdf

From the abstract: "Questions of set-theoretic size play an essential role in category theory, especially the distinction between sets and proper classes (or small sets and large sets). There are many diﬀerent ways to formalize this, and which choice is made can have noticeable eﬀects on what categorical constructions are permissible. In this expository paper we summarize and compare a number of such “set-theoretic foundations for category theory,” and describe their implications for the everyday use of category theory"

I hope this helps.

The answer to your question "Category theory $\subset$ Set theory or vice versa?" has been given in the comment to your question of Asaf Karagila.

-
Thanks a lot. This pdf is just what I wanted. But thanks also to Youan for the link.First, however, I will read this pdf. In both reference is made to the universal set, I already knew this axiom from set theory, but did not know that he had a connection with the theory of categories.A few hours ago I got the idea it could there be some connection,basing myself on the first chapter of the book I mentioned,because it presents a short axiomatization of set theory in which the axiom appears. However,it does not specify anything about his relationship with the categories,defined immediately after. – Bento Apr 28 '13 at 10:01
@Bento What book is it? – magma Apr 30 '13 at 8:14
@magma it's Cohomology and differential forms of Izu Vaisman. – Bento May 3 '13 at 22:49

Both category theory and set theory can be seen as formal theories in the general sense of mathematical logic. It is well-known that category theory can be developed inside set theory (perhaps including Grothendieck's axiom of universes). But Lawvere has also shown the converse, via the ETCS. More generally one can quote Grothendieck's topos theory, which is actually a categorical refinement of set theory (which is just the topos corresponding to a point). So in somse sense category theory and set theory contain each other.

-
Thank you very much for having linked the opposite. – Bento Apr 28 '13 at 11:52