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?



Minimal set of assumptions for set theory in order to do basic category theory
To complement Tom Leinster's answer, let me try to be specific:


1. To form the product category $\mathcal{C} \times \mathcal{D}$, we need ordered pairs, which we can get from the axiom of **unordered pairs**.
2. It's probably a good idea to have the **empty set** $\emptyset$, so that the initial category exists.
3. 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**.
4. 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).
5. 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.
6. 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?


