nLab category of classes



The category of classes has classes as objects and maps of classes as morphisms.

In the Zermelo-Fraenkel set theory, a class is a proposition PP with a designated free variable xx. We interpret P(x)P(x) as saying that xx belongs to the class PP. We also write xPx\in P, while understanding that PP is not a set, but xx is.

For example, any set AA is a class, whose proposition is aAa\in A and the designated free variable is aa.

The proposition a=aa=a defines the class of all sets, which does not arise via the above construction from any set.

Relations and maps

Given two classes AA and BB, we can form their product A×BA\times B as the class A×BA\times B such that P(x)P(x) means x=(a,b)x=(a,b) for some aAa\in A and bBb\in B, where (a,b)(a,b) denotes the usual ordered pair constructed in Zermelo-Fraenkel set theory as (a,b)={{a},{a,b}}(a,b)=\{\{a\},\{a,b\}\} or (a,b)={{,a},{b}}(a,b)=\{\{\emptyset,a\},\{b\}\} or (a,b)={{{},a},{b}}(a,b)=\{\{\{\emptyset\},a\},\{b\}\}.

If P(x)P(x) implies Q(x)Q(x), we say that PP is a subclass of QQ.

A relation from AA to BB is a subclass of A×BA\times B.

A map ff from AA to BB is a relation RR from AA to BB such that for any aAa\in A there is a unique bBb\in B such that R(a,b)R(a,b). In this case we write f(a)f(a) for this unique bb, so f(a)=bf(a)=b means R(a,b)R(a,b).

Maps of classes can be composed in the usual manner, which produces a category.

Here a category is understood in the sense of a first-order logic with two sorts (objects and morphisms), but at no point we attempt to consider all classes as a single unified whole.

A family ff of classes indexed by a class II is a map of classes f:TIf\colon T\to I. The class indexed by iIi\in I is the preimage f *{i}f^*\{i\}. Such families can be pulled back along maps of classes JIJ\to I and pushed forward along maps IJI\to J.

We can now define large categories as having a class of objects, a class of morphisms, together with composition and identities satisfying the usual axioms. The category of classes considered above is not a large category in this sense.

We do not require large categories to be locally small.


Suppose II is a large category. An II-indexed diagram of classes is defined as follows. First, we have an II-indexed family of classes f:TIf\colon T\to I. Secondly, we have a transition map

tr:{(t,h)tT,hMor(I),f(t)=dom(h)}T,tr\colon\{(t,h)\mid t\in T, h\in Mor(I), f(t)=dom(h)\}\to T,

which is a map of classes such that f(tr(t,h))=codom(h)f(tr(t,h))=codom(h). (The domain of trtr is a class because tt and hh are sets.) Finally, the transition map satisfies the usual axioms expected from a functor.

For any large category II and a class CC we can define the constant diagram indexed by II with value CC. We take T=I×CT=I\times C with f:TIf\colon T\to I being the projection map. The transition map sends (t,h)t(t,h)\mapsto t.

Limits and colimits as adjoint functors

For any large category II we have a constant diagram functor that sends a class CC to the constant diagram on CC.

We can talk about left and right adjoint functors to this functor in the sense of a first-order logic with two sorts (objects and morphisms), augmented with symbols for the functor, its adjoint, together with unit and counit maps that satisfy the triangle identities.


The category of classes admits all small limits.

First, it admits equalizers: the equalizer of f,g:ABf,g\colon A\to B is the subclass EE of AA defined by E(e)=(eAf(e)=g(e))E(e)=(e\in A \wedge f(e)=g(e)).

Secondly, it admits small products: the small product of an II-indexed family of classes f:TIf\colon T\to I, where II is an arbitrary set (considered as a class when used with ff) can be constructed as the class PP such that pPp\in P if pp is a map of sets? whose domain is II and for all iIi\in I we have p(i)Tp(i)\in T and f(p(i))=if(p(i))=i. (Observe that PP is indeed a class.)

Finally, it admits all small limits because the usual reduction of small limits to equalizers of small products continues to work provided that we adhere to the above convention on the definition of families of classes.


The category of classes admits all colimits indexed by arbitrary large categories II, i.e., large colimits.

First, the standard reduction of II-indexed colimits to a coequalizer of a pair of arrows between coproducts indexed by Mor(I)Mor(I) and Ob(I)Ob(I) still works in this context since class-indexed families of classes can be pulled back along source and target maps Mor(I)Ob(I)Mor(I)\to Ob(I).

Secondly, class-indexed coproducts of classes can be computed simply by taking the total class TT of the corresponding class-indexed family f:TIf\colon T\to I of classes.

Thirdly, coequalizers of classes exist by Scott's trick. Observe that given a pair of arrows f,g:XYf,g:X\to Y between classes, we can define an equivalence relation on YY by saying that y~yy~y' if there is a map h:[0,n]Yh:[0,n]\to Y such that h(0)=yh(0)=y, h(n)=yh(n)=y' and for any i[0,n)i\in[0,n) there is xXx\in X such that h(i)=f(x)h(i)=f(x) and h(i+1)=g(x)h(i+1)=g(x) or h(i)=g(x)h(i)=g(x) and h(i+1)=f(x)h(i+1)=f(x). The quotient of YY by this equivalence relation exists by Scott's trick and is precisely the desired coequalizer.

Other categorical properties

The category of classes is a regular category: the obvious notion of image factorization is stable under pullbacks. It is also a Barr-exact category: every equivalence relation RR on a class CC is induced by the quotient map CC/RC\to C/R.

It is also an infinitary extensive category, where “infinitary” means “class-indexed”. Indeed, pullbacks of coproduct injections along arbitrary maps of classes exist and class-indexed coproducts are disjoint and stable under pullback.

It is also well-pointed: for every two maps between classes f,g:XYf,g:X\rightarrow Y and every element xXx\in X, if f(x)=g(y)f(x) = g(y), then f=gf = g, and the category of classes is not the terminal category.

It likewise has all objects corresponding to large cardinals, most notably a natural numbers object. Otherwise, the category of finite sets FinSet is vacuously a category of classes, as the notions of ‘finitary’ and ‘class-indexed’/‘infinitary’ coincide.

As such, the category of classes is a well-pointed infinitary Heyting or Boolean pretopos, depending upon the external logic used, with a natural numbers object and other large cardinals, and where “infinitary” is used in the rather strong sense of “class-indexed”.

The category of classes is not cartesian closed or locally cartesian closed and does not have power objects. Indeed, the class of all sets SS does not have a power object, or, equivalently, there is no internal hom Hom(S,{0,1})Hom(S,\{0,1\}).

Category with class structure

The category of classes is a primordial example of a category with class structure. Its open maps are precisely those maps of classes f:TIf\colon T\to I such that f *{i}f^*\{i\} is a set for each iIi\in I. Small maps coincide with open maps. The powerclass of a class CC is the class of all sets AA such that AA is a subclass of CC. The universal class is the class of all sets.

Last revised on July 22, 2023 at 14:50:18. See the history of this page for a list of all contributions to it.