Category theory

What is Category Theory?

Category theory is a branch of mathematics that provides a unifying framework for studying structures and their relationships across various mathematical disciplines. In the definition of category, it is used the term collection. The term "collection" is deliberately flexible, as the objects and morphisms of a category are not required to form a set in the sense of Zermelo-Fraenkel (ZF) set theory. This flexibility is key to understanding the relationship between category theory and set theory.

Collections vs. Sets: Proper Classes

In category theory, the collection of objects in a category is not necessarily a set. For example:

In the category Set, the objects are all sets, which form a proper class—a collection too large to be a set in ZF set theory. This is because the "set of all sets" leads to paradoxes like Russell’s paradox and thus cannot exist as a set.
Similarly, categories like Grp (all groups) or Top (all topological spaces) have objects that form proper classes.

In ZF set theory, everything is a set, and the axioms govern how sets are constructed. A proper class is an informal notion for a collection of sets that satisfies a property (e.g., all sets, all groups) but cannot be a set itself due to the axiom of restricted comprehension. For instance, the collection {xx=x} (all sets) is a proper class because there is no set containing all sets. In ZF, proper classes are not formal objects; they are discussed meta-theoretically as collections defined by formulas.

The term collection in category theory is a general, intuitive concept that may refer to either sets or proper classes, depending on the category. Small categories, like those with a finite number of objects or objects forming a set (e.g., finite sets), have set-sized collections, while large categories, like Set, involve proper classes.

graph TD
  A[Category Theory] --> B[Categories]
  B --> C[Objects]
  B --> D[Morphisms]
  C --> E["Collection of Objects and Morphisms"]
  D --> E
  E --> F["Sets"]
  E --> G["Proper classes"]
  F-->H[Small category]
  G-->I[Large category]

Category Theory and ZF: Independent Foundations

Category theory and ZF set theory are distinct foundational frameworks for mathematics, neither strictly above nor below the other:

For example, the category Set can be formalized in ZF by defining its objects as all sets and morphisms as functions, but the collection of all sets is a proper class, not a set. Category theory’s flexibility allows it to work with such large collections without requiring them to be sets.

Formalizing Large Collections

To handle proper classes formally, mathematicians often extend or modify ZF:

These frameworks provide ways to formalize the "collections" of category theory, but category theory itself remains agnostic about the specific foundation, focusing on structural properties.

graph TD
  A[Foundations] --> B["ZF Set Theory"]
  A --> C["NBG Set Theory"]
  A --> D["Grothendieck Universes"]
  A --> E["MK Set Theory"]
  
  B --- B1["Everything is a Set"]:::thirdOrder
  B1 --- B2["Proper Classes are Meta-theoretical"]:::thirdOrder
  B2 --- B3["No 'set of all sets'"]:::thirdOrder
  
  C --- C1["Sets vs Classes"]:::thirdOrder
  C1 --- C2["Proper Classes are Formal"]:::thirdOrder
  C2 --- C3["Conservative over ZF"]:::thirdOrder
  
  classDef thirdOrder fill:#d4f1f9,stroke:#05b2dc,color:#333