Previously: Topology as a Dietary Choice.
Category theory lets us change the focus from individual objects to relationships between them. Since topology is defined using open sets, we’d start by concentrating on relations between sets.
One such obvious relation is inclusion. It imposes a categorical structure on the subsets of a given set . We draw arrows between two sets whenever one is a subset of the other. These arrows satisfy the axioms of a category: there is an identity arrow for every object (every set is its own subset) and arrows compose (inclusion is transitive). Not every pair of objects is connected by an arrow–some sets are disjoint, others overlap only partially. We may include the whole space as the terminal object (with arrows coming from every subset) and the empty set
as the initial object (with arrows going to every set). As categories go, this is a thin category, because there is at most one arrow between any two objects.

Every topological space gives thus rise to a thin category that abstracts the structure of its open sets. But the real reason for defining a topology is to be able to talk about continuous functions. These are functions between topological spaces such that the inverse image of every open set is open. Here, again, category theory tells us not to think about the details of how these functions are defined, but rather what we can do with them. And not just one function at a time, but the whole bunch at once.
So let’s talk about sets of functions. We have our topological space , and to each open subset
we will assign a set of continuous function on it. These could be functions to real or complex numbers, or whatever–we don’t care. All we care about is that they form a set.
Since open sets in form a (thin) category, we are talking about assigning to each object (open set)
its own set (of continuous functions)
. Notice however that these sets of functions are not independent of each other. If one open set is a subset of another, it inherits all the functions defined over the larger set. These are the same functions, the only difference being that their arguments are restricted to a smaller subset. For instance, given two sets
and a function
, there is a function
such that
on
.

Let’s restate these statements in the categorical language. We already have a category of open sets with inclusion. The sets of functions on these open sets are objects in the category
. We have defined a mapping
between these two categories that assigns sets of functions to open sets.
Notice that we are dealing with two different categories whose objects are sets. One has inclusions as arrows, the other has functions as arrows. (To confuse matters even more, the objects in the second category represent sets of functions.)
To define a functor between categories, we also need a mapping of arrows to accompany the mapping of objects. An arrow means that
. Corresponding to it, we have a function
that assigns to each
its restriction
.

Together, these mappings define a functor . The “op” notation means that the directions of arrows are reversed: the functor is “contravariant.”
A functor must preserve the structure of a category, that is identity and composition. In our case this follows from the fact that an identity maps to a trivial do-nothing restriction, and that restrictions compose:
for
.
There is a special name for contravariant functors from any category to
. They are called presheaves, exactly because they were first introduced in the context of topology as precursors of “shaves.” Consequently, the simpler functors
had to be confusingly called co-presheaves.
Presheaves on form their own category, often denoted by
, with natural transformations as arrows.
Next: Sheaves and Topology.




