Minimal set of assumptions for set theory in order to do basic category theory Consider a normal first course on category theory (say up to and including the statement and proof) of the adjoint functor theorem (AFT). What are the minimal assumptions for the definition of a set one needs to make in order that everything works? As far as I understand, up to and including the AFT there is very little one needs besides that fact that sets should have elements and that we have avoided Russell's paradox. So what is a minimal set of axioms allowing this to work?
 A: To complement Tom Leinster's answer, let me try to be specific:

*

*To form the product category $\mathcal{C} \times \mathcal{D}$, we need ordered pairs, which we can get from the axiom of unordered pairs.


*It's probably a good idea to have the empty set $\emptyset$, so that the initial category exists.


*My experience from type theory leads me to believe that we want function extensionality, or else we cannot reasonably work with functors and natural transformations (which are functions). Function extensionalty is equivalent to set-theoretic extensionalty.


*To form the hom-set $\mathrm{Hom}(A,B) = \{f \in \mathcal{C}_1 \mid \mathrm{dom}(f) = A \land \mathrm{cod}(f) = B\}$ we seemingly need bounded separation. It's a little more difficult to see whether we need unbounded separation (my guess would be that we can work pretty nicely without it).


*To form functor categories, we need powersets. Indeed, given any set $A$, its powerset may be generated as the set of objects of the functor category $2^A$, where $2$ is the discrete category on two objects.


*There are two functors form the terminal category $\mathbf{1}$ to the arrow category $\bullet \to \bullet$. If we think their coequalizer exists (in the category of small categories) then we believe in the axiom of infinity, because the coequalier is the monoid of natural numbers.
I am pretty sure the axiom of choice and excluded middle are not needed for general category theory, and foundation also seems quite irrelevant. How about union and replacement?
A: You ask what assumptions on sets are needed in a "normal first course on category theory". There are several possible kinds of answer, and this is an answer of the practical kind, i.e. from the empirical and pedagogical point of view. It's based on having assisted with the teaching of such courses by multiple other people, and having delivered such courses many times myself (though it's not for me to say whether my courses were "normal" :-) ). And, for that matter, having once upon a time been a student in a first course on category theory.
In all these courses, as far as I remember, no assumptions on sets were ever stated at all. The definition of category was given without mentioning sets. Some vague word such as "collection" may have been used, or perhaps the definition began "a category consists of objects...", or maybe the word "class" came into it (but in an informal way too).
At some point, there will have been some declaration such as "we make a naive distinction between small categories, in which the collection of all maps is a set, and large categories, where they don't". As you say, that's needed before one gets to the adjoint functor theorems. And there will have been some similarly phrased definition of locally small category, which is needed in order to state the Yoneda lemma. The definitions of small and locally small do rely on a notion of set, but in the courses I'm thinking of, no axioms on sets were stated. Just as in a course on representation theory or differential geometry or more or less anything else, students were simply assumed to know how sets behaved.
One can discuss whether this approach is good or bad. I'm not making a case here. I'm just stating the empirical fact that this is how category theory is often taught, and that generations of students have successfully learned category theory this way. In that sense, no assumptions on sets are needed. But as I said, there are other possible kinds of answer, for different interpretations of your question.
