Informally speaking, the collection of all functions on all open subsets of a space is termed as a sheaf. There are several ways of getting hold of them:

- In terms of open sets.
- In terms of stalks.
- In terms of a base of a topology.

## Germ of differentiable functions

The ring of functions on each open set $U \subset X$ of topological space $X$ is written as $\mathscr{O}(U)$. If $W \hookrightarrow V \hookrightarrow U$, then the following diagram commutes:

Two additional facts:

- Let $U_i$ be a covering of $U$, and $f_1, f_2 \in \mathscr{O}(U)$. If $f_1 = res_{U, U_i} f_2$, then $f_1 = f_2$. Thus, we can identify functions by looking at them on a covering of open sets.
- Given $f_i \in \mathscr{O}(U_i)$ all agreeing pairwise, we can glue them together to make one differentiable function on all of $U$, $f \in \mathscr{O}(U)$.

Germ of a differentiable function $f$ at a point $p$ is defined as:

$$\{f, \text{open } U \mid p \in U, f \in \mathscr{O}(U)\}$$

modulo the relation $(f, U) \sim (g, V)$, if there is some open set $W \subset U$, $p \in V$, such that $f|_W = g|_W$ (i.e. $\text{res}_{U, W} f = \text{res}_{V, W} g$). Intuitively, two functions that are the same in an open neighborhood of $p$, but different elsewhere, have the same germ. We call this set of germs at $p$ the stalk at $p$, denoted by $\mathscr{O}_p$. If $f$ is defined on $U$ and $g$ is defined on $V$, then $f + g$ is defined on $U \cap V$. If additionally, $p \in U$ then we get the map $\mathscr{O}(U) \rightarrow \mathscr{O}_p$. We're talking about germs as colimits. Moreover, $\mathscr{O}_p$ is a local ring, since it has exactly one maximal ideal $m_p \subset \mathscr{O}_p$, the ideal of germs vanishing at $p$. We can interpret the value of the function, or the value of the germ, at a point, as an element of the local ring modulo the maximal ideal: this doesn't work for all sheaves, but does work for things behaving like sheaves of functions, formalized later as a locally ringed space.

## Definition of presheaf and sheaf

We will be considering sheafs on sets, and this can be done without loss in generality. The fact that $\mathscr{F}$ is a presheaf or sheaf on topological space $X$ is written as:

A presheaf $\mathscr{F}$ on topological space $X$ is the following data:

- To each open set $U \subset X$, we have a set $\mathscr{F}(U) = \Gamma(U, \mathscr{F}) = H^0(U, \mathscr{F})$. The elements of $\mathscr{F}(U)$ are called the sections of $\mathscr{F}$.
- For each inclusion $U \hookrightarrow V$ of open sets, we have the restriction map $\text{res}_{V, U}: \mathscr{F}(V) \rightarrow \mathscr{F}(U)$.

The data is required to satisfy identity and composition:

- $\text{res}_{U, U} = \text{id}_{\mathscr{F}(U)}$.
- For the inclusion $W \hookrightarrow V \hookrightarrow U$, the following diagram commutes:

A presheaf is the same thing as a contravariant functor.

The stalk of a presheaf $\mathscr{F}$ is defined to be the set of germs of $\mathscr{F}$ at point $p$, denoted $\mathscr{F}_p$:

$$\mathscr{F}_p = \{f, \text{open } U \mid p \in U, f \in \mathscr{F}(U)\}$$

modulo the relation $(f, U) \sim (g, V)$, where $f|_W = g|_W$.

Another equivalent definition in terms of colimits is:

$$\mathscr{F}_p = \underset{\longrightarrow}{\text{Lim }} \mathscr{F}(U)$$

If $p \in U, f \in \mathscr{F}(U)$, then $\mathscr{F}_p$ is called the ring of germs of $f$ at point $p$.

A sheaf is defined as a presheaf along with two additional axioms:

- Identity axiom: Let $U_i$ be a covering of $U$, and $f_1, f_2 \in \mathscr{F}(U)$. If $f_1 = res_{U, U_i} f_2$, then $f_1 = f_2$.
- Gluability axiom: Given $f_i \in \mathscr{F}(U_i)$ all agreeing pairwise, we can glue them together to make one differentiable function on all of $U$, $f \in \mathscr{F}(U)$.

Here, the identity axiom asserts that there is atmost one way to glue, and the gluability axiom asserts that there is atleast one way to glue.

As an example, consider $\mathscr{F}(U \cup V) = \mathscr{F}(U) \times \mathscr{F}(V)$. Here, we use the fact that $\mathscr{F}(\phi)$ is the final object.

The two axioms for a sheaf can be interpreted as "exactnesss" of the equalizer exact sequence:

where identity is exactness over $\mathscr{F}(U)$, and gluability is exactness over $\prod \mathscr{F}(U_i)$.

As an example, consider the restriction of sheaf $\mathscr{F}$ on $U$, $\mathscr{F}|_U = \mathscr{F}|_U(V)$ for all open subsets $V \subset U$.

As another example, consider the skyscraper sheaf. Suppose $X$ is a topological space, $p \in X$, and $S$ is a set. Let $i_p : p \rightarrow X$ be the inclusion; then $i_{p, *}S$ is defined by:

$$i_{p, *}S(U) = \begin{cases} S \quad p \in U \\ \{e\} \quad p \notin U \end{cases}$$

where $\{e\}$ is any one-point set. This is called the skyscraper sheaf, because the informal picture looks like a skyscraper at point $p$.

Let $X$ be a topological space, and $S$ a set. Then, $\underline{S}_{\text{pre}}(U) = S$ for all open sets $U$, and $\underline{S}_{\text{pre}}$ is called the constant presheaf associated to $S$.

Let $\mathscr{F}(U)$ be maps to $S$ that are locally constant; i.e. for any point $p \in U$, there is an open neighborhood of $p$ where the function is constant. This is called the constant sheaf associated to $S$, and is denoted by $\underline{S}$.

Suppose $\pi : X \rightarrow Y$ is a continuous map, and $\mathscr{F}$ is a presheaf on $X$. Then define $\pi_* \mathscr{F}$ by $\pi_* \mathscr{F}(V) = \mathscr{F}(\pi^{-1}(V))$, where $V$ is an open subset of $Y$. Then, $\pi_* \mathscr{F}$ is called the pushforward of $\mathscr{F}$ by $\pi$. The skyscraper sheaf can be interpreted as a pushforward of the constant sheaf $\underline{S}$ on a one-point space $p$, under the inclusion morphism $i_p : \{p\} \rightarrow X$.

Example: Suppose $\mathscr{O}_X$ is a sheaf of rings on topological space $X$; i.e. a sheaf on $X$ with values in the category of rings. Then, $(X, \mathscr{O}_X)$ is called a ringed space, and $\mathscr{O}_X$ is called the structuce sheaf of the ringed space. Sections of $\mathscr{O}_X$ on an open subset $U$ are called the functions on $U$. The stalk of $\mathscr{O}_X$ at point $p$ is represented as $\mathscr{O}_{X, p}$.

Just as we have modules over a ring, we have $\mathscr{O}_X$-modules over the sheaf of rings $\mathscr{O}_X$. The definition of $\mathscr{O}_X$-module is a sheaf of abelian groups of $\mathscr{F}$ along with the following additional structure: for each $U$, the sheaf $\mathscr{F}(U)$ is an $\mathscr{O}_X(U)$-module, and given $U \subset V$, the following diagram commutes:

Just as an $A$-module generalizes the notion of an abelian group, since an abelian group is the same thing as a $\mathbb{Z}$-module, an $\mathscr{O}_X$-module generalizes the notion of a sheaf of abelian groups, as the latter is the same thing as a $\underline{\mathbb{Z}}$-module.

## Morphisms of presheaves and sheaves

A morphism of presheaves or sheaves, $\phi : \mathscr{F} \rightarrow \mathscr{G}$, is the data of maps $\phi(U) : \mathscr{F}(U) \rightarrow \mathscr{G}(U)$, for all $U$, behaving well with respect to the restriction: if $U \hookrightarrow V$, then the following diagram commutes:

An example of a morphism of sheaves is that from differentiable functions on $\mathbb{R}$ to continuous functions; this is a forgetful map, forgetting that functions are differentiable, and only remembering that they are continuous.

If we interpret a presheaf on $X$ as a functor from the category of open sets, then a morphism of presheaves on $X$ is a natural transform.

Suppose $\mathscr{F}, \mathscr{G}$ are two sheaves in topological space $X$; then we define $\textit{Hom}(\mathscr{F}, \mathscr{G})$ as:

This is a sheaf, called sheaf $\textit{Hom}$, of sets on $X$. The functor is contravariant in its first argument and covariant in its second argument. $\textit{Hom}$, however, does not commute with taking stalks; i.e. $\textit{Hom}(\mathscr{F}, \mathscr{G})_p$ is not isomorphic to $\textit{Hom}(\mathscr{F}_p, \mathscr{G}_p)$.

We can make module-like constructions using presheaves of abelian groups on a topological space $X$. We can clearly add maps of presheaves to get another map of presheaves. Indeed, $(\phi + \psi)(V) = \phi(V) + \psi(V)$. We say that presheaves of abelian groups form an additive category.

If $\phi : \mathscr{F} \rightarrow \mathscr{G}$ is a morphism of presheaves, then the kernel of this map is defined by $(\text{ker}_\text{pre}\phi)(U) := \text{ker }\phi(U)$. $\text{ker}_\text{pre}\phi \rightarrow \mathscr{F}$ satisfies the universal property for kernels. The cokernel is defined similarly. It can readily be verified that presheaves of abelian groups form an abelian category.

Sheaves of abelian groups also form an abelian category, albeit with an additional complication of sheafification. $\text{Ab}_X$ forms an additive category, just as with presheaves, and the definition of kernel of a sheaf gives us no problems; in fact $\text{ker}_\text{pre}\phi := \text{ker }\phi$. The issue arises in cokernels.

## Sheafification

Lots of properties of sheaves can be checked at the level of stalks. This isn't true of presheaves, and reflects the local nature of sheaves.

Suppose $\mathscr{F}$ is a sheaf of abelian groups of $X$, and $s$ is a global section of $\mathscr{F}$. Let the support of $s$ be the points $p \in X$ where $s$ has a nonzero germ:

$$\text{Supp}(s) = \{p \in X \mid s_p \neq 0 \text{ in } \mathscr{F}_p\}$$

We can think of this as the subset of $X$ "where section $s$ lives". The complement is the locus where $s$ is the $0$-section.

We say that an element $\prod_{p \in U} s_p$ of $\prod_{p \in U} \mathscr{F}_p$ consists of compatible germs, for all $p \in U$, if there is some representative

$$\{U_p \text{ open in } U, \tilde{s}_p \in \mathscr{F}(U_p)\}$$

for $s_p$ (where $p \in U_p \subset U$), such that the germ $\tilde{s}_p$ is $s_q$ for all $q \in U_p$. Equivalently, there an open cover $\{U_i\}$ of $U$ and sections $f_i \in \mathscr{F}(U_i)$, such that if $p \in U_i$, then $s_p$ is the germ of $s_i$ at $p$. Hence, any section $s$ of $\mathscr{F}$ over $U$ gives a choice of compatible germs for $U$.

Just as groupification gives an abelian group that best approximates to an abelian semigroup, sheafification gives a sheaf that best approximates to a presheaf, with an analogus universal property. If $\mathscr{F}$ is a presheaf, then $\text{sh} : \mathscr{F} \rightarrow \mathscr{F}^\text{sh}$ on $X$ is the sheafification of $\mathscr{F}$. If $\mathscr{F}^\text{sh}$ is a sheaf, then for any sheaf $\mathscr{G}$, and the presheaf morphism $g : \mathscr{F} \rightarrow \mathscr{G}$, there exists a unique morphism of sheaves $f : \mathscr{F}^\text{sh} \rightarrow \mathscr{G}$ making the following diagram commute:

Next, we want to show that any presheaf has a sheafification. Indeed, define $\mathscr{F}^\text{sh}(U)$ to be the set of compatible germs of the presheaf $\mathscr{F}$ over $U$. More precisely, $\mathscr{F}^\text{sh}(U) = \{(f_p \in \mathscr{F}_p)_{p \in U}\}$ such that for all $p \in U$, there exists an open neighborhood $V$ of $p$ contained in $U$, and $s \in \mathscr{F}(V)$ with $s_q = f_q$ for all $q \in V$. Here, $s_q$ means the germ of $s$ at $q$; i.e. the image of $s$ in the stalk $\mathscr{F}_q$.

Let $\phi : \mathscr{F} \rightarrow \mathscr{G}$ be a morphism of sheaves on topological space $X$. Then $\mathscr{G}$ is called the quotient sheaf of $\mathscr{F}$ if $\phi$ is an epimorphism in the category of sheaves, or equivalently if $\phi$ is surjective on the level of stalks: $\phi_p : \mathscr{F}_p \rightarrow \mathscr{G}_p$ is surjective for all $p \in X$. Monomorphism and epimorphism - sheafiness and quotient sheafiness - may be checked at the level of stalks.

As an example, consider the exponential exact sequence. Let $X = \mathbb{C}$ in classical topology, $\mathscr{O}_X$ be the sheaf of holomorphic functions, and $\mathscr{O}^*_X$ be the sheaf of invertible holomorphic functions. This is a sheaf of abelian groups under multiplication. We have the map:

where $\underline{\mathbb{Z}}$ is the constant sheaf associated to $\mathbb{Z}$.

## Sheaves on a base

We have discussed how to get a hold of sheaves using stalks (invoking compatible germs), and we describe the second way now. Suppose we have the sheaf $\mathscr{F}$ on topological space, and a base ${B_i}$ of open sets on $X$. Then, consider the following information:

We can recover the sheaf from this information, because we can recover stalks when germs are compatible.

A sheaf on $\{B_i\}$ is the following information. For each base in $\{B_i\}$, we have the set $F(B_i)$. If $B_i \subset B_j$, then we have $\text{res}_{B_j, B_i} : F(B_j) \rightarrow F(B_i)$ with $\text{res}_{B_i, B_i} = id_{F(B_i)}$. Further, if $B_i \subset B_j \subset B_k$, then $\text{res}_{B_k, B_i} = \text{res}_{B_j, B_i} \circ \text{res}_{B_k, B_j}$. This is the definition of presheaf on a base. For the definition of sheaf on a base, we need two additional axioms:

- The base identity axiom. If $B = \cup B_i$, then if $f, g \in F(B)$ such that $\text{res}_{B, B_i} f = \text{res}_{B, B_i} g$ for all $i$, then $f = g$.
- The base gluability axiom. If $B = \cup B_i$, and we have $f_i \in B_i$ such that $f_i$ agress with $f_j$ on any basic open set $B_i \cap B_j$, then there exists $f \in B$ such that $\text{res}_{B, B_i} f_i = f$ for all $i$.

Suppose $B_i$ is a base on $X$, and $F$ is a sheaf of sets on this base, then there exists sheaf $\mathscr{F}$ extending $F$, with isomorphisms $\mathscr{F}(B_i) \cong F(B_i)$ agreeing with restriction maps. This sheaf $\mathscr{F}$ is unique upto isomorphism. To prove this, let $\mathscr{F}$ be the sheaf of compatible germs of $F$. Define stalk of a presheaf $F$ on a base $p \in X$ by $F_p = \underset{\longrightarrow}{\text{Lim }} F(B_i)$ where colimit is over all $B_i$ in the base containing $p$. A family of germs in open set $U$ is compatible near $p$ if there is a section $s$ over some $B_i$ containing $p$ such that the germs over $B_i$ are the germs of $s$; more precisely,

$$\mathscr{F}(U) = \{(f_p \in F_p)_{p \in U}\}$$

such that for all $p \in U$ there exists $B$ with $p \in B \subset U$, $s \in F(B)$, with $s_q = f_q$ for all $q \in B$, where $B$ is in our base. This a sheaf for the same reason a sheaf of compatible germs was. Now, we claim that $F(B) \rightarrow \mathscr{F}(B)$ is an isomorphism, and that $\mathscr{F}$ is unique upto isomorphism, completing our proof.

## Sheaves are abelian categories

We will see that sheaves of abelian groups and $\mathscr{O}_X$-modules are abelian categories. The properties of kernels, cokernels, exactness and so forth can be understood at the level of stalks (which are just abelian groups), and compatibility of germs will come for free.

We have shown that the category of sheaves is an additive category. To show that it is an abelian category, we must show that $\phi : \mathscr{F} \rightarrow \mathscr{G}$ has a kernel and cokernel. We have already shown that it has a kernel: the presheaf kernel is a sheaf, and is a kernel in the category of sheaves. Further, $\phi : \mathscr{F} \rightarrow \mathscr{G}$ has a cokernel in the category of presheaves: call it $\mathscr{H}_\text{pre}$, and let $\text{sh} : \mathscr{H}_\text{pre} \rightarrow \mathscr{H}$ be its sheafification. Then the cokernel is the colimit of the diagram:

Now, the morphism $\mathscr{G} \rightarrow \mathscr{H}$ is a cokernel of $\phi$ in the category of sheaves. To prove this, consider the following diagram, where $\mathscr{E}$ is any sheaf:

We construct:

We want to show that there is a unique morphism $\mathscr{H} \rightarrow \mathscr{E}$. Since $\mathscr{H}_\text{pre}$ is a cokernel in the category of presheaves, there exists a unique morphism of presheaves $\mathscr{H}_\text{pre} \rightarrow \mathscr{E}$. By universality of sheafification, there is a unique morphism $\mathscr{H} \rightarrow \mathscr{E}$ making the diagram commute. Hence, we have shown that the sheaves of abelian groups over topological space $X$ form an abelian category. Everything we've discussed carries over to sheaves of $\mathscr{O}_X$-modules identically, because a sequence of $\mathscr{O}_X$-modules is exact iff the underlying sequence of abelian groups is exact.

## Inverse image sheaf

Given continuous map $\pi : X \rightarrow Y$, we get $\pi^{-1} : Y \rightarrow X$. Define $\pi^{-1}$ as left-adjoint to $\pi_*$. We then get canonical maps from $\pi^{-1}\pi_* \mathscr{F} \rightarrow \mathscr{F}$ associated to the identity morphism $\text{Mor}_Y(\pi_* \mathscr{F}, \pi_* \mathscr{F})$ and $\mathscr{G} \rightarrow \pi_*\pi^{-1} \mathscr{G}$ associated to the identity morphism $\text{Mor}_X(\pi^{-1}\mathscr{G}, \pi^{-1}\mathscr{G})$: