Let’s begin with looking at some fundamental objects that generalise the notion of sets of functions on a space. We will use these objects to define schemes later on. They are called *sheaves*.

First, some definitions. Let be a topological space and let be the poset category of its open sets, ordered by inclusion. So there is a unique arrow in if and only if . For any category , a **-valued presheaf** on is a functor . (The target category is usually a “set-like” category like sets, abelian groups, rings, algebras or modules, but in principle it can be anything.) If are open sets in then the -morphisms are called *restriction maps*.

The reason these maps are called restrictions is clear – presheaves are modelled on the collection of (continuous/differentiable/holomorphic/etc.) functions defined locally on a topological space. Normally, spaces do not have many globally-defined functions, and understanding the functions defined on open subsets of the space gives us lots of information about the space. So it is natural to think of as the set (group/ring/etc.) of functions defined on an open subset .

But this forgets loads of information about what happens on the overlaps between sets. In particular, if we cover an open subset with open subsets and we have a function for each open set such that their restrictions on overlaps agree, then we know all these functions “glue together” to give a function such that the restriction of to is . This leads us to the concept of a **sheaf**.

**Definition 1**: Let be a topological space and let be a category. A -valued **sheaf** on is a presheaf on such that for each open set and open cover , the diagram

*is an equaliser diagram, where the first morphism is the universal map into the product, and the second pair of morphisms are given by the products of and over and .*

Wow! This is all pretty abstract. What does this mean? If (as I will almost always do from now on) you allow to be a category of “sets with some possible extra structure” – let’s think of sets or abelian groups for now – then you can consider the elements of these groups , which are called **sections**. Then the diagram above encodes the following data:

- If are sections whose restrictions to each are equal, then they are equal.
- If you have sections for each that agree on overlaps then there is a
*unique*section such that .

To concentrate our attention around a point , we take the **stalk** of a presheaf, which is the colimit

Elements of the stalk are called **germs**, which are equivalence classes where is a section and two such classes are considered equal if there is an open set on which the restrictions of and agree. The stalk is basically the collection of functions defined infinitesimally close to .

Now let’s talk about (pre)sheaf morphisms. A morphism of two -valued presheaves on a topological space is just a natural transformation of the corresponding functors. A morphism of sheaves is just a morphism of presheaves. So we have a category of -valued presheaves on which is just the functor category . Saying sheaf morphisms are just presheaf morphisms amounts to saying the category of -sheaves on is a full subcategory of .

I won’t bother saying too much about sheaf morphisms because you can read it all in Ravi Vakil’s excellent (and free!) notes, but the nice thing is that for *sheaves* (unlike presheaves), lots of properties are determined by the stalks of the sheaf, because we can glue together local information to get global information about the whole sheaf. For example, one can define injections and isomorphisms on the components of the natural transformations for sheaves, and it turns out these conditions are equivalent to those conditions holding on the stalks. Furthermore, you can also define surjective sheaf morphisms and exact sequences of sheaves, and these all interact nicely with the stalk structure, so you just need to check local information.

Next time, we’ll have a look the left adjoint of the inclusion functor , which is called *sheafification.*