August 2024



Previously: Presheaves and Topology.

In all branches of science we sooner or later encounter the global vs. local duality. Topology is no different.

In topology we have the global definition of continuity: counter-images of all open sets are open. But we perceive a discontinuity as a local jump. How are the two pictures related, and can we express this topologically, that is without talking about sizes and distances?

All we have at our disposal are open sets, so exactly what properties of open sets are the most relevant? They do form a (thin) category with inclusions as arrows, but so does any set of subsets. As it turns out open sets can be stitched together to create coverings. Such coverings let us zoom in on finer and finer details, thus creating the bridge between the global and the local picture.

Open sets are plump–they can easily fill the bulk of space. They are also skinless, so they can’t touch each other without some overlap. That makes them perfect for constructing covers.

Covering, unlike tiling, requires overlapping. To create a leak-free roof, you need your tiles to overlap. The idea is that, if we were defining functions over a tiling, it would be possible for them to make sudden jumps at tile boundaries. Open coverings overlap, so such functions have to flow continuously.

IMG_0427

An open cover of a set u is a family of open sets \{u_i\} such that u is their union:

u = \bigcup_{i \in I} u_i

Here I is a set used for indexing the family.

If we have a continuous function f defined over u, then all its restrictions f|_{u_i} are also continuous (this follows from the condition that an intersection of open sets is open). Thus going from global to local is easy.

The converse is more interesting. Suppose that we have a family of functions f_i, one per each open set u_i, and we want to reconstruct the global function f defined over the set u covered by u_i‘s. This is only possible if the individual functions agree on overlaps.

Take two functions: f_i defined over u_i, and f_j defined over u_j. If the two sets overlap, each of the functions can be restricted to the overlap u_i \cap u_j. We want these restrictions to be equal:

f_i|_{u_i \cap u_j} = f_j|_{u_i \cap u_j}

IMG_0427

If all individual continuous functions agree on the overlaps then they uniquely determine a global continuous function f defined over the whole set u. You can stitch or collate functions that are defined locally.

In the language of category theory we talk about functions in bulk. We define a functor–a presheaf P–that maps all open sets to sets of continuous functions. In this language, to an open cover \{u_i\} corresponds a family of functions \{f_i\} that are members of the individual sets P u_i. Every such selection forms a giant I-indexed tuple, that is an element of the cartesian product:

\{f_i | i \in I\} \in \prod_{i} P u_i

Similarly, we can gather functions that are defined over the intersections of sets into a product:

\prod_{i j} P (u_i \cap u_j)

(Notice that every empty intersection corresponds to a single trivial function that we call absurd in Haskell.)

Set inclusions generate function restrictions. In particular, for every intersection u_i \cap u_j we have a pair of restrictions:
IMG_0427

f_i \mapsto f_i|_{u_i \cap u_j}

f_j \mapsto f_j|_{u_i \cap u_j}

These restrictions can be seen as functions between sets:

P u_i \to P (u_i \cap u_j)

P u_j \to P (u_i \cap u_j)

If all such restrictions are pairwise equal, we call \{f_i\} a matching family, and for every such matching family there is a unique element f \in P u such that f_i = f|_{u_i}, for all i.

These pairs of restrictions define two mappings between our big products:

p, q : \prod_i P u_i \rightrightarrows \prod_{i j} P (u_i \cap u_j)

Think of each function as acting on a tuple \{f_k\} and producing a matrix indexed by elements of I:

(p\; \{f_k\})_{i j} = f_i|_{u_i \cap u_j}

(q\; \{f_k\})_{i j} = f_j|_{u_i \cap u_j}

Our matching condition can be expressed in the language of category theory by saying that the following diagram is an equalizer of p and q (the two parallel arrows):

P u \xrightarrow{e} \prod_i P u_i \rightrightarrows \prod_{i j} P (u_i \cap u_j)

Here e is defined as mapping a function f \in P u to a tuple of its restrictions \{ f|{u_i}\}. These restrictions are then required to match when further restricted by p and q to all possible intersections.

A presheaf P is called a sheaf if, for every open covering \{u_i\}, a matching family \{f_i\} uniquely determines the element of P u of the equalizer above. This element corresponds to the function f that is the result of stitching of individual functions.

Notice that, even though we tried to use the categorical language as much as possible, we still had to rely on the language of sets to define coverings. To abstract away from set theory and traditional topology, we need to talk about sites.

Next: Coverages and Sites .


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 X. 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 \emptyset 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.

IMG_0415

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 X, and to each open subset u 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 X form a (thin) category, we are talking about assigning to each object (open set) u its own set (of continuous functions) P u. 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 v \subseteq u and a function f \colon u \to \mathbb R, there is a function f|_{v} \colon v \to \mathbb R such that f|_{v} = f on v.

IMG_0415

Let’s restate these statements in the categorical language. We already have a category X of open sets with inclusion. The sets of functions on these open sets are objects in the category \mathbf{Set}. We have defined a mapping P 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 v \to u means that v \subseteq u. Corresponding to it, we have a function P u \to P v that assigns to each f \in P u its restriction f|_{v} \in P v.

IMG_0415

Together, these mappings define a functor P \colon X^{op} \to \mathbf{Set}. 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 u \subseteq u maps to a trivial do-nothing restriction, and that restrictions compose: (f|_v)|_w = f|_w for w \subseteq v \subseteq u.

There is a special name for contravariant functors from any category \mathcal C to \mathbf{Set}. They are called presheaves, exactly because they were first introduced in the context of topology as precursors of “shaves.” Consequently, the simpler functors \mathcal C \to \mathbf{Set} had to be confusingly called co-presheaves.

Presheaves on \mathcal C form their own category, often denoted by \hat{\mathcal C}, with natural transformations as arrows.

Next: Sheaves and Topology.