Foundations
In CatDat, we work with the following convenient set-theoretic foundation for category theory.
Sets, collections, and hypercollections
We work with ZFC and two Grothendieck universes, which we denote by . Thus, in principle everything is a set, but we rename them as follows to introduce three "levels of size":
- The sets in are renamed to sets (sometimes also small sets).
- The sets in are renamed to collections (sometimes also large sets).
- All available sets are renamed to hypercollections (which may or may not lie in ).
For example, is a set, is a collection, and is a hypercollection. The collection consists of all sets, and the hypercollection consists of all collections. Every set is also a collection, and every collection is also a hypercollection. There is a collection that consists of all groups, a collection of all topological spaces, etc.
Note that sets, collections, and hypercollections all satisfy the ZFC axioms. In this sense, (hyper)collections behave in the same way as sets. This is crucial for category theory. For example, we can form the collection of all maps between two collections. This basic property is not satisfied by classes, which are not adequate for category theory. For example, there is a collection that consists of all maps .
Just imagine three copies of ZFC embedded into each other, each representing a "level of size". Grothendieck universes are merely an implementation detail, which we can and will drop from now on. Sets are on level 1, collections on level 2, and hypercollections on level 3. Concrete mathematical objects such as numbers or functions can be thought of as living on level 0 (even though they are usually modeled as sets in ZFC).

The levels are not defined by cardinality alone. For example, is a collection with just one element, but it is not a set (since otherwise would be a set). In particular, not every finite collection is a set. However, every finite collection is isomorphic to a set.
In our framework, there is no way to group all hypercollections into a single mathematical object; for this, one would need a third Grothendieck universe , but such a grouping is usually not required.
A family of collections is called small when its index collection is a set.
Categories
A category consists of a pair of collections , whose elements are called objects and morphisms, respectively, together with maps
- (identity),
- (source),
- (target),
- (composition),
such that the usual axioms of a category are satisfied. The domain of consists of all pairs of morphisms with , and we write for their composition. Instead of one usually writes for the identity morphism of . Formally, a category is a tuple
of collections (and hence a collection itself). We write and . Instead of , we often write .
When is a morphism with and , we write . We write or for the collection of such morphisms. This collection need not be a set. If it is a set for all , the category is called locally small.
A small category is defined as above, but using sets and (instead of collections). A hypercategory is defined similarly using hypercollections and . Every small category is a category, and every category is a hypercategory. Notice that there is a collection of all small categories , and likewise a hypercollection of all categories .
For example, the category of sets has , the collection of all sets. The category of groups has , the collection of all groups. Other typical categories (topological spaces, graphs, metric spaces, etc.) are constructed as usual. All these examples are locally small.
Collections are the objects of a hypercategory .
Functors
A functor between two categories (or small categories, or hypercategories) is defined as usual; it consists of maps and satisfying the functor axioms. Between two categories there is a collection of all functors, just as between two small categories there is a set of all functors.
Small categories and functors form the category of small categories, which is locally small. There is also a hypercategory consisting of all categories. For instance, is an object of , but not of .
If are two functors, a morphism (a natural transformation) is defined as a map satisfying the usual naturality condition. These morphisms form a collection .
If are categories, we can construct the functor category as usual. There is no set-theoretic issue, since collections behave like sets. If is small and is locally small, then is locally small. This extra assumption on is one of many indications that categories should not be assumed locally small by default. For example, one could not even form the category of endofunctors of a general category under such a restriction, and hence no category of monads.
It is better to state explicitly when the assumption of being locally small is needed.
Representable Functors
If is any category and , we have the Hom-functor
defined as usual, but taking values in the hypercategory of all collections. The Yoneda lemma and its corollaries can be proved without assuming that is locally small. If is locally small, then takes values in .
Adjunctions are defined as usual via natural isomorphisms of functors valued in . No local smallness assumption is required. Equivalently, they can be defined via morphisms of functors and satisfying the triangle identities.
Limits and Colimits
Let be a category. If is a functor (in this context called a diagram), a cone over is an object equipped with morphisms for all such that for every morphism the evident triangle commutes. Cones form a category, and a terminal object in this category is called a limit of . The dual notion is a colimit.
Unless stated otherwise, we consider only small diagrams and hence small limits and colimits, i.e. those where is a small (or essentially small) category. This is because large limits rarely exist and it is cumbersome to specify "small" each time.
There are special types of limits, such as equalizers, products, and cofiltered limits, and their duals, such as coequalizers, coproducts, and filtered colimits. By convention, products and coproducts are indexed by a set, not a collection (unless stated otherwise). Filtered colimits are indexed by a small filtered category (unless stated otherwise).
Well-powered categories
If is an object of a category, the collection of all monomorphisms need not be a set. If, for every , there exists a small family of such monomorphisms such that every monomorphism is isomorphic over to one in the family, then the category is called well-powered. The dual notion of being well-copowered is defined using epimorphisms . Every small category is well-powered, but there are many well-powered categories that are not small and not even equivalent to a small category.
Conclusion
There is much more to say about set-theoretic foundations for category theory (in fact, many papers have been written on the subject, and the approach developed above is just one of many approaches), but this suffices for the purposes of CatDat.