Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
5214 lines (4696 sloc) 175 KB
\input{preamble}
% OK, start here.
%
\begin{document}
\title{Sheaves on Spaces}
\maketitle
\phantomsection
\label{section-phantom}
\tableofcontents
\section{Introduction}
\label{section-introduction}
\noindent
Basic properties of sheaves on topological spaces
will be explained in this document.
A reference is \cite{Godement}.
\medskip\noindent
This will be superseded by the discussion of sheaves
over sites later in the documents. But perhaps it makes
sense to briefly define some of the notions here.
\section{Basic notions}
\label{section-sheaves-basic}
\noindent
The following is a list of basic notions in topology.
\begin{enumerate}
\item Let $X$ be a topological space. The phrase: ``Let
$U = \bigcup_{i \in I} U_i$ be an open covering'' means the
following: $I$ is a set and for each $i \in I$ we are given
an open subset $U_i \subset X$ such that $U$ is the
union of the $U_i$. It is allowed to have $I = \emptyset$
in which case there are no $U_i$ and $U = \emptyset$.
It is also allowed, in case $I \not = \emptyset$ to have
any or all of the $U_i$ be empty.
\item etc, etc.
\end{enumerate}
\section{Presheaves}
\label{section-presheaves}
\begin{definition}
\label{definition-presheaf}
Let $X$ be a topological space.
\begin{enumerate}
\item A {\it presheaf $\mathcal{F}$ of sets on $X$} is a rule which
assigns to each open $U \subset X$ a set $\mathcal{F}(U)$ and
to each inclusion $V \subset U$ a map
$\rho^U_V : \mathcal{F}(U) \to \mathcal{F}(V)$ such that
$\rho^U_U = \text{id}_{\mathcal{F}(U)}$ and
whenever $W \subset V \subset U$ we have
$\rho^U_W = \rho^V_W \circ \rho ^U_V$.
\item A {\it morphism $\varphi : \mathcal{F} \to \mathcal{G}$
of presheaves of sets on $X$} is a rule which assigns to each
open $U \subset X$ a map of sets $\varphi : \mathcal{F}(U)
\to \mathcal{G}(U)$ compatible with restriction maps,
i.e., whenever $V \subset U \subset X$ are open the
diagram
$$
\xymatrix{
\mathcal{F}(U) \ar[r]^\varphi \ar[d]^{\rho^U_V} &
\mathcal{G}(U) \ar[d]^{\rho^U_V} \\
\mathcal{F}(V) \ar[r]^\varphi & \mathcal{G}(V)
}
$$
commutes.
\item The category of presheaves of sets on $X$ will be denoted
$\textit{PSh}(X)$.
\end{enumerate}
\end{definition}
\noindent
The elements of the set $\mathcal{F}(U)$ are called
the {\it sections} of $\mathcal{F}$ over $U$.
For every $V \subset U$ the map
$\rho^U_V : \mathcal{F}(U) \to \mathcal{F}(V)$
is called the {\it restriction map}. We will use the
notation $s|_V := \rho^U_V(s)$ if $s\in \mathcal{F}(U)$.
This notation is consistent with the notion of restriction
of functions from topology because if $W \subset V \subset U$
and $s$ is a section of $\mathcal{F}$ over $U$ then
$s|_W = (s|_V)|_W$ by the property of the restriction maps
expressed in the definition above.
\medskip\noindent
Another notation that is often used is to indicate sections
over an open $U$ by the symbol $\Gamma(U, -)$ or by
$H^0(U, -)$. In other words, the following equalities
are tautological
$$
\Gamma(U, \mathcal{F}) = \mathcal{F}(U) = H^0(U, \mathcal{F}).
$$
In this chapter we will not use this notation, but in others
we will.
\begin{definition}
\label{definition-constant-presheaf}
Let $X$ be a topological space. Let $A$ be a set.
The {\it constant presheaf with value $A$} is the
presheaf that assigns the set $A$ to every open
$U \subset X$, and such that all restriction mappings
are $\text{id}_A$.
\end{definition}
\section{Abelian presheaves}
\label{section-abelian-presheaves}
\noindent
In this section we briefly point out some features of the
category of presheaves that allow one to define presheaves
of abelian groups.
\begin{example}
\label{example-singleton-presheaf}
Let $X$ be a topological space $X$. Consider a rule $\mathcal{F}$ that
associates to every open subset a singleton set. Since every set
has a unique map into a singleton set, there exist unique restriction
maps $\rho^U_V$. The resulting structure is a presheaf of sets.
It is a final object in the category of presheaves of sets, by the
property of singleton sets mentioned above. Hence it is
also unique up to unique isomorphism. We will sometimes write $*$
for this presheaf.
\end{example}
\begin{lemma}
\label{lemma-product-presheaves}
Let $X$ be a topological space. The category of presheaves of sets
on $X$ has products (see
Categories, Definition \ref{categories-definition-product}).
Moreover, the set of
sections of the product $\mathcal{F} \times \mathcal{G}$
over an open $U$ is the product of the sets of sections of
$\mathcal{F}$ and $\mathcal{G}$ over $U$.
\end{lemma}
\begin{proof}
Namely, suppose $\mathcal{F}$ and $\mathcal{G}$ are
presheaves of sets on the topological space $X$.
Consider the rule $U \mapsto \mathcal{F}(U) \times \mathcal{G}(U)$,
denoted $\mathcal{F} \times \mathcal{G}$. If $V \subset U \subset X$
are open then define the restriction mapping
$$
(\mathcal{F} \times \mathcal{G})(U)
\longrightarrow
(\mathcal{F} \times \mathcal{G})(V)
$$
by mapping $(s, t) \mapsto (s|_V, t|_V)$. Then it is immediately
clear that $\mathcal{F} \times \mathcal{G}$ is a presheaf.
Also, there are projection maps
$p : \mathcal{F} \times \mathcal{G} \to \mathcal{F}$
and
$q : \mathcal{F} \times \mathcal{G} \to \mathcal{G}$.
We leave it to the reader to show that
for any third presheaf $\mathcal{H}$ we have
$\Mor(\mathcal{H}, \mathcal{F} \times \mathcal{G})
= \Mor(\mathcal{H}, \mathcal{F}) \times
\Mor(\mathcal{H}, \mathcal{G})$.
\end{proof}
\noindent
Recall that if $(A, + : A \times A \to A, - : A \to A, 0\in A)$
is an abelian group, then the zero and the negation maps are
uniquely determined by the addition law. In other words, it
makes sense to say ``let $(A, +)$ be an abelian group''.
\begin{lemma}
\label{lemma-abelian-presheaves}
Let $X$ be a topological space.
Let $\mathcal{F}$ be a presheaf of sets.
Consider the following types of structure on $\mathcal{F}$:
\begin{enumerate}
\item For every open $U$ the structure of an abelian group
on $\mathcal{F}(U)$ such that all restriction maps are
abelian group homomorphisms.
\item A map of presheaves
$+ : \mathcal{F} \times \mathcal{F} \to \mathcal{F}$,
a map of presheaves $- : \mathcal{F} \to \mathcal{F}$
and a map $0 : * \to \mathcal{F}$
(see Example \ref{example-singleton-presheaf})
satisfying all the axioms of $+, -, 0$ in a usual
abelian group.
\item A map of presheaves
$+ : \mathcal{F} \times \mathcal{F} \to \mathcal{F}$,
a map of presheaves $- : \mathcal{F} \to \mathcal{F}$
and a map $0 : * \to \mathcal{F}$
such that for each open $U \subset X$ the quadruple
$(\mathcal{F}(U), +, -, 0)$ is an abelian group,
\item A map of presheaves $+ : \mathcal{F} \times \mathcal{F}
\to \mathcal{F}$ such that for every open $U \subset X$
the map $+ : \mathcal{F}(U) \times \mathcal{F}(U) \to \mathcal{F}(U)$
defines the structure of an abelian group.
\end{enumerate}
There are natural bijections between the collections of
types of data (1) - (4) above.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
The lemma says that to give an abelian group object $\mathcal{F}$
in the category of presheaves is the same as giving a presheaf of sets
$\mathcal{F}$ such that all the sets $\mathcal{F}(U)$ are endowed
with the structure of an abelian group and such that all the restriction
mappings are group homomorphisms. For most algebra structures
we will take this approach to (pre)sheaves of such objects, i.e.,
we will define a (pre)sheaf of such objects to be a (pre)sheaf
$\mathcal{F}$ of sets all of whose sets of sections $\mathcal{F}(U)$
are endowed with this structure compatibly with the restriction
mappings.
\begin{definition}
\label{definition-abelian-presheaves}
Let $X$ be a topological space.
\begin{enumerate}
\item A {\it presheaf of abelian groups on $X$} or an
{\it abelian presheaf over $X$}
is a presheaf of sets $\mathcal{F}$ such that for each open
$U \subset X$ the set $\mathcal{F}(U)$ is endowed with
the structure of an abelian group, and such that all restriction
maps $\rho^U_V$ are homomorphisms of abelian groups, see
Lemma \ref{lemma-abelian-presheaves} above.
\item A {\it morphism of abelian presheaves over $X$}
$\varphi : \mathcal{F} \to \mathcal{G}$ is a morphism of presheaves
of sets which induces
a homomorphism of abelian groups $\mathcal{F}(U) \to \mathcal{G}(U)$
for every open $U \subset X$.
\item The category of presheaves of abelian groups on $X$ is denoted
$\textit{PAb}(X)$.
\end{enumerate}
\end{definition}
\begin{example}
\label{example-direct-sum-points}
Let $X$ be a topological space. For each $x \in X$ suppose
given an abelian group $M_x$. For $U \subset X$ open
we set
$$
\mathcal{F}(U) = \bigoplus\nolimits_{x \in U} M_x.
$$
We denote a typical element in this abelian group by
$\sum_{i = 1}^n m_{x_i}$, where $x_i \in U$ and $m_{x_i} \in M_{x_i}$.
(Of course we may always choose our representation such that
$x_1, \ldots, x_n$ are pairwise distinct.)
We define for $V \subset U \subset X$ open a restriction
mapping $\mathcal{F}(U) \to \mathcal{F}(V)$ by
mapping an element $s = \sum_{i = 1}^n m_{x_i}$
to the element $s|_V = \sum_{x_i \in V} m_{x_i}$.
We leave it to the reader to verify that this is a
presheaf of abelian groups.
\end{example}
\section{Presheaves of algebraic structures}
\label{section-presheaves-structures}
\noindent
Let us clarify the definition
of presheaves of algebraic structures.
Suppose that $\mathcal{C}$ is a category and
that $F : \mathcal{C} \to \textit{Sets}$ is
a faithful functor. Typically $F$ is a ``forgetful''
functor. For an object $M \in \Ob(\mathcal{C})$
we often call $F(M)$ the {\it underlying set} of the
object $M$. If $M \to M'$ is a morphism in $\mathcal{C}$
we call $F(M) \to F(M')$ the {\it underlying map of sets}.
In fact, we will often not distinguish between an object
and its underlying set, and similarly for morphisms.
So we will say a map of sets $F(M) \to F(M')$
is a {\it morphism of algebraic structures}, if it is
equal to $F(f)$ for some morphism $f : M \to M'$
in $\mathcal{C}$.
\medskip\noindent
In analogy with Definition \ref{definition-abelian-presheaves}
above a ``presheaf of objects of $\mathcal{C}$'' could be
defined by the following data:
\begin{enumerate}
\item a presheaf of sets $\mathcal{F}$, and
\item for every open $U \subset X$ a choice
of an object $A(U) \in \Ob(\mathcal{C})$
\end{enumerate}
subject to the following conditions (using the phraseology above)
\begin{enumerate}
\item for every open $U \subset X$ the set $\mathcal{F}(U)$
is the underlying set of $A(U)$, and
\item for every $V \subset U \subset X$ open
the map of sets $\rho_V^U: \mathcal{F}(U) \to \mathcal{F}(V)$
is a morphism of algebraic structures.
\end{enumerate}
In other words, for every $V \subset U$ open in $X$
the restriction mappings $\rho^U_V$ is the image
$F(\alpha^U_V)$ for some unique morphism
$\alpha^U_V : A(U) \to A(V)$ in the category $\mathcal{C}$.
The uniqueness is forced by the condition that $F$ is
faithful; it also implies that
$\alpha^U_W = \alpha^V_W \circ \alpha^U_V$
whenever $W \subset V \subset U$ are open in $X$.
The system $(A(-), \alpha^U_V)$ is what we will define as a
presheaf with values in $\mathcal{C}$ on $X$, compare
Sites, Definition \ref{sites-definition-presheaf}.
We recover our presheaf of sets $(\mathcal{F}, \rho_V^U)$
via the rules $\mathcal{F}(U) = F(A(U))$ and
$\rho_V^U = F(\alpha_V^U)$.
\begin{definition}
\label{definition-presheaf-values-in-category}
Let $X$ be a topological space.
Let $\mathcal{C}$ be a category.
\begin{enumerate}
\item A {\it presheaf $\mathcal{F}$ on $X$ with values in $\mathcal{C}$}
is given by a rule which assigns to every open $U \subset X$
an object $\mathcal{F}(U)$ of $\mathcal{C}$
and to each inclusion $V \subset U$
a morphism $\rho_V^U : \mathcal{F}(U) \to \mathcal{F}(V)$
in $\mathcal{C}$ such that whenever $W \subset V \subset U$
we have $\rho_W^U = \rho_W^V \circ \rho_V^U$.
\item A {\it morphism $\varphi : \mathcal{F} \to \mathcal{G}$
of presheaves with value in $\mathcal{C}$} is given by a
morphism $\varphi : \mathcal{F}(U) \to \mathcal{G}(U)$
in $\mathcal{C}$ compatible with restriction morphisms.
\end{enumerate}
\end{definition}
\begin{definition}
\label{definition-underlying-presheaf-sets}
Let $X$ be a topological space. Let $\mathcal{C}$ be a category.
Let $F : \mathcal{C} \to \textit{Sets}$ be a faithful functor.
Let $\mathcal{F}$ be a presheaf on $X$ with values in $\mathcal{C}$.
The presheaf of sets $U \mapsto F(\mathcal{F}(U))$
is called the {\it underlying presheaf of sets of $\mathcal{F}$}.
\end{definition}
\noindent
It is customary to use the same letter $\mathcal{F}$ to denote
the underlying presheaf of sets, and this makes
sense according to our discussion preceding
Definition \ref{definition-presheaf-values-in-category}.
In particular, the phrase ``let $s \in \mathcal{F}(U)$''
or ``let $s$ be a section of $\mathcal{F}$ over $U$'' signifies
that $s \in F(\mathcal{F}(U))$.
\medskip\noindent
This notation and these definitions apply in particular to:
{\it Presheaves of (not necessarily abelian) groups, rings, modules
over a fixed ring, vector spaces over a fixed field, } etc and
{\it morphisms between these}.
\section{Presheaves of modules}
\label{section-presheaves-modules}
\noindent
Suppose that $\mathcal{O}$ is a presheaf of rings on $X$.
We would like to define the notion of a presheaf of
$\mathcal{O}$-modules over $X$. In analogy with Definition
\ref{definition-abelian-presheaves} we are tempted to define
this as a sheaf of sets $\mathcal{F}$ such that for every open
$U \subset X$ the set $\mathcal{F}(U)$ is endowed with the structure
of an $\mathcal{O}(U)$-module compatible with restriction mappings
(of $\mathcal{F}$ and $\mathcal{O}$). However, it is customary
(and equivalent) to define it as in the following definition.
\begin{definition}
\label{definition-presheaf-modules}
Let $X$ be a topological space, and let $\mathcal{O}$ be
a presheaf of rings on $X$.
\begin{enumerate}
\item A {\it presheaf of $\mathcal{O}$-modules}
is given by an abelian presheaf $\mathcal{F}$ together with a
map of presheaves of sets
$$
\mathcal{O} \times \mathcal{F} \longrightarrow \mathcal{F}
$$
such that for every open $U \subset X$ the map
$\mathcal{O}(U) \times \mathcal{F}(U) \to \mathcal{F}(U)$
defines the structure of an $\mathcal{O}(U)$-module
structure on the abelian group $\mathcal{F}(U)$.
\item A {\it morphism $\varphi : \mathcal{F} \to \mathcal{G}$
of presheaves of $\mathcal{O}$-modules} is a morphism of abelian presheaves
$\varphi : \mathcal{F} \to \mathcal{G}$ such that
the diagram
$$
\xymatrix{
\mathcal{O} \times \mathcal{F} \ar[r] \ar[d]_{\text{id} \times \varphi} &
\mathcal{F} \ar[d]^{\varphi} \\
\mathcal{O} \times \mathcal{G} \ar[r] &
\mathcal{G}
}
$$
commutes.
\item The set of $\mathcal{O}$-module morphisms as above is
denoted $\Hom_\mathcal{O}(\mathcal{F}, \mathcal{G})$.
\item The category of presheaves of $\mathcal{O}$-modules
is denoted $\textit{PMod}(\mathcal{O})$.
\end{enumerate}
\end{definition}
\noindent
Suppose that $\mathcal{O}_1 \to \mathcal{O}_2$ is a
morphism of presheaves of rings on $X$. In this case,
if $\mathcal{F}$ is a presheaf of $\mathcal{O}_2$-modules
then we can think of $\mathcal{F}$ as a presheaf of
$\mathcal{O}_1$-modules by using the composition
$$
\mathcal{O}_1 \times \mathcal{F}
\to
\mathcal{O}_2 \times \mathcal{F}
\to
\mathcal{F}.
$$
We sometimes denote this by $\mathcal{F}_{\mathcal{O}_1}$
to indicate the restriction of rings. We call this
the {\it restriction of $\mathcal{F}$}. We obtain the
restriction functor
$$
\textit{PMod}(\mathcal{O}_2)
\longrightarrow
\textit{PMod}(\mathcal{O}_1)
$$
\medskip\noindent
On the other hand, given a presheaf of $\mathcal{O}_1$-modules
$\mathcal{G}$
we can construct a presheaf of $\mathcal{O}_2$-modules
$\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G}$
by the rule
$$
\left(\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G}\right)(U)
=
\mathcal{O}_2(U) \otimes_{\mathcal{O}_1(U)} \mathcal{G}(U)
$$
The index $p$ stands for ``presheaf'' and not ``point''.
This presheaf is called the tensor product presheaf. We obtain
the {\it change of rings} functor
$$
\textit{PMod}(\mathcal{O}_1)
\longrightarrow
\textit{PMod}(\mathcal{O}_2)
$$
\begin{lemma}
\label{lemma-adjointness-tensor-restrict-presheaves}
With $X$, $\mathcal{O}_1$, $\mathcal{O}_2$, $\mathcal{F}$ and
$\mathcal{G}$ as above there exists a canonical bijection
$$
\Hom_{\mathcal{O}_1}(\mathcal{G}, \mathcal{F}_{\mathcal{O}_1})
=
\Hom_{\mathcal{O}_2}(
\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G},
\mathcal{F}
)
$$
In other words, the restriction and change of rings functors
are adjoint to each other.
\end{lemma}
\begin{proof}
This follows from the fact that for a ring map
$A \to B$ the restriction functor and the change
of ring functor are adjoint to each other.
\end{proof}
\section{Sheaves}
\label{section-sheaves}
\noindent
In this section we explain the sheaf condition.
\begin{definition}
\label{definition-sheaf}
Let $X$ be a topological space.
\begin{enumerate}
\item A {\it sheaf $\mathcal{F}$ of sets on $X$} is a presheaf
of sets which satisfies the following additional property: Given
any open covering $U = \bigcup_{i \in I} U_i$ and any collection
of sections $s_i \in \mathcal{F}(U_i)$, $i \in I$ such that
$\forall i, j\in I$
$$
s_i|_{U_i \cap U_j} = s_j|_{U_i \cap U_j}
$$
there exists a unique section $s \in \mathcal{F}(U)$ such that
$s_i = s|_{U_i}$ for all $i \in I$.
\item A {\it morphism of sheaves of sets} is simply a
morphism of presheaves of sets.
\item The category of sheaves of sets on $X$ is denoted
$\Sh(X)$.
\end{enumerate}
\end{definition}
\begin{remark}
\label{remark-confusion}
There is always a bit of confusion as to whether it is
necessary to say something about the set of sections of
a sheaf over the empty set $\emptyset \subset X$.
It is necessary, and we already did if you read the
definition right. Namely, note that the empty set is
covered by the empty open covering, and hence the ``collection
of section $s_i$'' from the definition above actually form
an element of the empty product which is the final object
of the category the sheaf has values in. In other words,
if you read the definition right you automatically deduce
that $\mathcal{F}(\emptyset) = \textit{a final object}$,
which in the case of a sheaf of sets is a singleton.
If you do not like this argument, then you can just require
that $\mathcal{F}(\emptyset) = \{*\}$.
\medskip\noindent
In particular, this condition will then ensure that if
$U, V \subset X$ are open and {\it disjoint} then
$$
\mathcal{F}(U \cup V) = \mathcal{F}(U) \times \mathcal{F}(V).
$$
(Because the fibre product over a final object is a product.)
\end{remark}
\begin{example}
\label{example-basic-continuous-maps}
Let $X$, $Y$ be topological spaces.
Consider the rule $\mathcal{F}$ wich associates to
the open $U \subset X$ the set
$$
\mathcal{F}(U) = \{ f : U \to Y \mid f \text{ is continuous}\}
$$
with the obvious restriction mappings. We claim that
$\mathcal{F}$ is a sheaf. To see this suppose that
$U = \bigcup_{i\in I} U_i$ is an open covering, and
$f_i \in \mathcal{F}(U_i)$, $i\in I$ with
$f_i |_{U_i \cap U_j} = f_j|_{U_i \cap U_j}$ for all $i, j \in I$.
In this case define $f : U \to Y$ by setting $f(u)$
equal to the value of $f_i(u)$ for any $i \in I$ such that
$u \in U_i$. This is well defined by assumption. Moreover,
$f : U \to Y$ is a map such that its restriction to $U_i$
agrees with the continuous map $U_i$. Hence clearly $f$ is
continuous!
\end{example}
\noindent
We can use the result of the example to define constant
sheaves. Namely, suppose that $A$ is a set. Endow $A$ with
the discrete topology. Let $U \subset X$ be an open subset.
Then we have
$$
\{ f : U \to A \mid f\text{ continuous}\}
=
\{ f : U \to A \mid f\text{ locally constant}\}.
$$
Thus the rule which assigns to an open all locally
constant maps into $A$ is a sheaf.
\begin{definition}
\label{definition-constant-sheaf}
Let $X$ be a topological space. Let $A$ be a set.
The {\it constant sheaf with value $A$} denoted $\underline{A}$, or
$\underline{A}_X$ is the sheaf that assigns to an open $U \subset X$
the set of all locally constant maps $U \to A$ with restriction mappings
given by restrictions of functions.
\end{definition}
\begin{example}
\label{example-sheaf-product-pointwise}
Let $X$ be a topological space. Let $(A_x)_{x \in X}$ be
a family of sets $A_x$ indexed by points $x \in X$. We are
going to construct a sheaf of sets $\Pi$ from this data.
For $U \subset X$ open set
$$
\Pi(U) = \prod\nolimits_{x \in U} A_x.
$$
For $V \subset U \subset X$ open define
a restriction mapping by the following rule: An element
$s = (a_x)_{x\in U} \in \Pi(U)$ restricts
to $s|_V = (a_x)_{x \in V}$. It is obvious that this
defines a presheaf of sets. We claim this is a sheaf.
Namely, let $U = \bigcup U_i$ be an open covering.
Suppose that $s_i \in \Pi(U_i)$ are
such that $s_i$ and $s_j$ agree over $U_i \cap U_j$. Write
$s_i = (a_{i, x})_{x\in U_i}$. The compatibility condition implies that
$a_{i, x} = a_{j, x}$ in the set $A_x$ whenever $x \in U_i \cap U_j$.
Hence there exists a unique element $s = (a_x)_{x\in U}$
in $\Pi(U) = \prod_{x\in U} A_x$ with the property that
$a_x = a_{i, x}$ whenever $x \in U_i$ for some $i$. Of course this
element $s$ has the property that $s|_{U_i} = s_i$ for all $i$.
\end{example}
\begin{example}
\label{example-direct-sum-points-not-sheaf}
Let $X$ be a topological space.
Suppose for each $x\in X$ we are given an abelian group $M_x$.
Consider the presheaf $\mathcal{F} : U \mapsto \bigoplus_{x \in U} M_x$
defined in Example \ref{example-direct-sum-points}. This
is not a sheaf in general. For example, if $X$ is an infinite set
with the discrete topology, then the sheaf condition
would imply that $\mathcal{F}(X) = \prod_{x\in X} \mathcal{F}(\{x\})$
but by definition we have $\mathcal{F}(X)
= \bigoplus_{x \in X} M_x = \bigoplus_{x \in X} \mathcal{F}(\{x\})$.
And an infinite direct sum is in general different from an infinite
direct product.
\medskip\noindent
However, if $X$ is a topological space such that every open
of $X$ is quasi-compact, then $\mathcal{F}$ {\it is} a sheaf.
This is left as an exercise to the reader.
\end{example}
\section{Abelian sheaves}
\label{section-abelian-sheaves}
\begin{definition}
\label{definition-abelian-sheaf}
Let $X$ be a topological space.
\begin{enumerate}
\item An {\it abelian sheaf on $X$} or
{\it sheaf of abelian groups on $X$}
is an abelian presheaf on $X$ such that the underlying presheaf of
sets is a sheaf.
\item The category of sheaves of abelian groups
is denoted $\textit{Ab}(X)$.
\end{enumerate}
\end{definition}
\noindent
Let $X$ be a topological space.
In the case of an abelian presheaf $\mathcal{F}$ the sheaf
condition with regards to an open covering $U = \bigcup U_i$
is often expressed by saying that the complex of abelian groups
$$
0 \to \mathcal{F}(U)
\to \prod\nolimits_i \mathcal{F}(U_i)
\to \prod\nolimits_{(i_0, i_1)} \mathcal{F}(U_{i_0} \cap U_{i_1})
$$
is exact. The first map is the usual one, whereas the second
maps the element $(s_i)_{i \in I}$ to the element
$$
(
s_{i_0}|_{U_{i_0} \cap U_{i_1}} -
s_{i_1}|_{U_{i_0} \cap U_{i_1}}
)_{(i_0, i_1)}
\in \prod\nolimits_{(i_0, i_1)} \mathcal{F}(U_{i_0} \cap U_{i_1})
$$
\section{Sheaves of algebraic structures}
\label{section-sheaves-structures}
\noindent
Let us clarify the definition of sheaves of certain types of structures.
First, let us reformulate the sheaf condition. Namely, suppose that
$\mathcal{F}$ is a presheaf of sets on the topological space $X$.
The sheaf condition can be reformulated as follows. Let
$U = \bigcup_{i\in I} U_i$ be an open covering. Consider the
diagram
$$
\xymatrix{
\mathcal{F}(U) \ar[r]
&
\prod\nolimits_{i\in I}
\mathcal{F}(U_i)
\ar@<1ex>[r] \ar@<-1ex>[r]
&
\prod\nolimits_{(i_0, i_1) \in I \times I}
\mathcal{F}(U_{i_0} \cap U_{i_1})
}
$$
Here the left map is defined by the rule
$s \mapsto \prod_{i \in I} s|_{U_i}$. The two maps
on the right are the maps
$$
\prod\nolimits_i s_i
\mapsto
\prod\nolimits_{(i_0, i_1)} s_{i_0}|_{U_{i_0} \cap U_{i_1}}
\text{ resp. }
\prod\nolimits_i s_i
\mapsto
\prod\nolimits_{(i_0, i_1)} s_{i_1}|_{U_{i_0} \cap U_{i_1}}.
$$
The sheaf condition exactly says that the left arrow
is the equalizer of the right two. This generalizes
immediately to the case of presheaves with values in a
category as long as the category has products.
\begin{definition}
\label{definition-sheaf-values-in-category}
Let $X$ be a topological space. Let $\mathcal{C}$ be
a category with products. A presheaf $\mathcal{F}$ with
values in $\mathcal{C}$ on $X$ is a {\it sheaf}
if for every open covering the diagram
$$
\xymatrix{
\mathcal{F}(U) \ar[r]
&
\prod\nolimits_{i\in I}
\mathcal{F}(U_i)
\ar@<1ex>[r] \ar@<-1ex>[r]
&
\prod\nolimits_{(i_0, i_1) \in I \times I}
\mathcal{F}(U_{i_0} \cap U_{i_1})
}
$$
is an equalizer diagram in the category $\mathcal{C}$.
\end{definition}
\noindent
Suppose that $\mathcal{C}$ is a category and that
$F : \mathcal{C} \to \textit{Sets}$ is a faithful functor.
A good example to keep in mind is the case where $\mathcal{C}$
is the category of abelian groups and $F$ is the forgetful functor.
Consider a presheaf $\mathcal{F}$ with values in $\mathcal{C}$ on $X$.
We would like to reformulate the condition above in terms
of the underlying presheaf of sets
(Definition \ref{definition-underlying-presheaf-sets}).
Note that the underlying
presheaf of sets is a sheaf of sets if and only if all the
diagrams
$$
\xymatrix{
F(\mathcal{F}(U)) \ar[r]
&
\prod\nolimits_{i\in I}
F(\mathcal{F}(U_i))
\ar@<1ex>[r] \ar@<-1ex>[r]
&
\prod\nolimits_{(i_0, i_1) \in I \times I}
F(\mathcal{F}(U_{i_0} \cap U_{i_1}))
}
$$
of sets -- after applying the forgetful functor $F$ -- are
equalizer diagrams! Thus we would like $\mathcal{C}$ to have
products and equalizers and we would like $F$ to commute with
them. This is equivalent to the condition that $\mathcal{C}$
has limits and that $F$ commutes with them, see
Categories, Lemma \ref{categories-lemma-limits-products-equalizers}.
But this is not yet good enough
(see Example \ref{example-sheaves-topological-spaces});
we also need $F$ to {\it reflect isomorphisms}.
This property means that given a morphism
$f : A \to A'$ in $\mathcal{C}$, then $f$ is
an isomorphism if (and only if) $F(f)$ is a bijection.
\begin{lemma}
\label{lemma-sheaves-structure}
Suppose the category $\mathcal{C}$ and
the functor $F : \mathcal{C} \to \textit{Sets}$
have the following properties:
\begin{enumerate}
\item $F$ is faithful,
\item $\mathcal{C}$ has limits and $F$ commutes with them, and
\item the functor $F$ reflects isomorphisms.
\end{enumerate}
Let $X$ be a topological space. Let $\mathcal{F}$
be a presheaf with values in $\mathcal{C}$.
Then $\mathcal{F}$ is a sheaf if and only if the
underlying presheaf of sets is a sheaf.
\end{lemma}
\begin{proof}
Assume that $\mathcal{F}$ is a sheaf. Then
$\mathcal{F}(U)$ is the equalizer of the diagram
above and by assumption we see $F(\mathcal{F}(U))$
is the equalizer of the corresponding diagram
of sets. Hence $F(\mathcal{F})$ is a sheaf of sets.
\medskip\noindent
Assume that $F(\mathcal{F})$ is a sheaf.
Let $E \in \Ob(\mathcal{C})$ be the
equalizer of the two parallel arrows in
Definition \ref{definition-sheaf-values-in-category}.
We get a canonical morphism $\mathcal{F}(U) \to E$,
simply because $\mathcal{F}$ is a presheaf.
By assumption, the induced map $F(\mathcal{F}(U)) \to F(E)$
is an isomorphism, because $F(E)$ is the equalizer
of the corresponding diagram of sets. Hence we
see $\mathcal{F}(U) \to E$ is an isomorphism
by condition (3) of the lemma.
\end{proof}
\noindent
The lemma in particular applies to
{\it sheaves of groups, rings, algebras over a fixed ring, modules
over a fixed ring, vector spaces over a fixed field, } etc.
In other words, these are presheaves of groups, rings,
modules over a fixed ring, vector spaces over a fixed field, etc
such that the underlying presheaf of sets is a sheaf.
\begin{example}
\label{example-C0-sheaf-rings}
Let $X$ be a topological space. For each open $U \subset X$ consider
the $\mathbf{R}$-algebra
$\mathcal{C}^{0}(U) = \{ f : U \to \mathbf{R} \mid f\text{ is continuous}\}$.
There are obvious restriction mappings that turn this into a
presheaf of $\mathbf{R}$-algebras over $X$.
By Example \ref{example-basic-continuous-maps} it is a sheaf of sets.
Hence by the Lemma \ref{lemma-sheaves-structure} it is a sheaf of
$\mathbf{R}$-algebras over $X$.
\end{example}
\begin{example}
\label{example-sheaves-topological-spaces}
Consider the category of topological spaces $\textit{Top}$.
There is a natural faithful functor $\textit{Top} \to \textit{Sets}$
which commutes with products and equalizers. But it does
not reflect isomorphisms. And, in fact it turns out that
the analogue of Lemma \ref{lemma-sheaves-structure} is wrong.
Namely, suppose $X = \mathbf{N}$ with the discrete
topology. Let $A_i$, for $i \in \mathbf{N}$ be a discrete
topological space. For any subset $U \subset \mathbf{N}$
define $\mathcal{F}(U) = \prod_{i\in U} A_i$ with the
discrete topology. Then this is a presheaf of topological
spaces whose underlying presheaf of sets is a sheaf, see
Example \ref{example-sheaf-product-pointwise}.
However, if each $A_i$ has at least two elements, then
this is not a sheaf of topological spaces
according to Definition \ref{definition-sheaf-values-in-category}.
The reader may check that putting the {\it product topology} on
each $\mathcal{F}(U) = \prod_{i\in U} A_i$ does lead to a sheaf
of topological spaces over $X$.
\end{example}
\section{Sheaves of modules}
\label{section-sheaves-modules}
\begin{definition}
\label{definition-sheaf-modules}
Let $X$ be a topological space.
Let $\mathcal{O}$ be a sheaf of rings on $X$.
\begin{enumerate}
\item A {\it sheaf of $\mathcal{O}$-modules} is a presheaf
of $\mathcal{O}$-modules $\mathcal{F}$,
see Definition \ref{definition-presheaf-modules},
such that the underlying presheaf of abelian groups $\mathcal{F}$
is a sheaf.
\item A {\it morphism of sheaves of $\mathcal{O}$-modules}
is a morphism of presheaves of $\mathcal{O}$-modules.
\item Given sheaves of $\mathcal{O}$-modules
$\mathcal{F}$ and $\mathcal{G}$ we denote
$\Hom_\mathcal{O}(\mathcal{F}, \mathcal{G})$
the set of morphism of sheaves of $\mathcal{O}$-modules.
\item The category of sheaves of $\mathcal{O}$-modules
is denoted $\textit{Mod}(\mathcal{O})$.
\end{enumerate}
\end{definition}
\noindent
This definition kind of makes sense even if $\mathcal{O}$ is just a
presheaf of rings, although we do not know any examples where
this is useful, and we will avoid using the terminology
``sheaves of $\mathcal{O}$-modules''
in case $\mathcal{O}$ is not a sheaf of rings.
\section{Stalks}
\label{section-stalks}
\noindent
Let $X$ be a topological space. Let $x \in X$ be a point.
Let $\mathcal{F}$ be a presheaf of sets on $X$.
The {\it stalk of $\mathcal{F}$ at $x$} is the set
$$
\mathcal{F}_x
=
\colim_{x\in U} \mathcal{F}(U)
$$
where the colimit is over the set of open neighbourhoods
$U$ of $x$ in $X$. The set of open neighbourhoods is
partially ordered by (reverse) inclusion:
We say $U \geq U' \Leftrightarrow U \subset U'$.
The transition maps in the system are
given by the restriction maps of $\mathcal{F}$.
See Categories, Section \ref{categories-section-posets-limits}
for notation and terminology regarding (co)limits over systems.
Note that the colimit is a directed colimit.
Thus it is easy to describe $\mathcal{F}_x$. Namely,
$$
\mathcal{F}_x
=
\{
(U, s)
\mid
x\in U, s\in \mathcal{F}(U)
\}/\sim
$$
with equivalence relation given by $(U, s) \sim (U', s')$ if and only if
there exists an open $U'' \subset U \cap U'$ with $x \in U''$ and
$s|_{U''} = s'|_{U''}$. By abuse of notation we will often denote
$(U, s)$, $s_x$, or even $s$ the corresponding element in $\mathcal{F}_x$.
Also we will say $s = s'$ in $\mathcal{F}_x$ for two local sections
of $\mathcal{F}$ defined in an open neighbourhood of $x$ to denote that
they have the same image in $\mathcal{F}_x$.
\medskip\noindent
An obvious consequence of this definition is that
for any open $U \subset X$ there is a canonical map
$$
\mathcal{F}(U)
\longrightarrow
\prod\nolimits_{x \in U} \mathcal{F}_x
$$
defined by $s \mapsto \prod_{x \in U} (U, s)$. Think about it!
\begin{lemma}
\label{lemma-sheaf-subset-stalks}
Let $\mathcal{F}$ be a sheaf of sets on the topological space $X$.
For every open $U \subset X$ the map
$$
\mathcal{F}(U)
\longrightarrow
\prod\nolimits_{x \in U} \mathcal{F}_x
$$
is injective.
\end{lemma}
\begin{proof}
Suppose that $s, s' \in \mathcal{F}(U)$ map to the same element
in every stalk $\mathcal{F}_x$ for all $x \in U$. This means that
for every $x \in U$, there exists an open $V^x \subset U$,
$x \in V^x$ such that $s|_{V^x} = s'|_{V^x}$. But then
$U = \bigcup_{x \in U} V^x$ is an open covering. Thus by the
uniqueness in the sheaf condition we see that $s = s'$.
\end{proof}
\begin{definition}
\label{definition-separated}
Let $X$ be a topological space.
A presheaf of sets $\mathcal{F}$ on $X$ is {\it separated}
if for every open $U \subset X$ the map
$\mathcal{F}(U) \to \prod_{x \in U} \mathcal{F}_x$ is
injective.
\end{definition}
\noindent
Another observation is that the construction of the stalk
$\mathcal{F}_x$ is functorial in the presheaf $\mathcal{F}$.
In other words, it gives a functor
$$
\textit{PSh}(X) \longrightarrow \textit{Sets},
\ \mathcal{F} \longmapsto \mathcal{F}_x.
$$
This functor is called the {\it stalk functor}.
Namely, if $\varphi : \mathcal{F} \to \mathcal{G}$ is
a morphism of presheaves, then we define
$\varphi_x : \mathcal{F}_x \to \mathcal{G}_x$
by the rule $(U, s) \mapsto (U, \varphi(s))$.
To see that this works we have to check that
if $(U, s) = (U', s')$ in $\mathcal{F}_x$ then also
$(U, \varphi(s)) = (U', \varphi(s'))$ in $\mathcal{G}_x$.
This is clear since $\varphi$ is compatible with the
restriction mappings.
\begin{example}
\label{example-stalk-constant-presheaf}
Let $X$ be a topological space. Let $A$ be a set.
Denote temporarily $A_p$ the constant presheaf
with value $A$ ($p$ for presheaf -- not for point).
There is a canonical map of presheaves
$A_p \to \underline{A}$ into the constant sheaf with
value $A$. For every point we have canonical
bijections $A = (A_p)_x = \underline{A}_x$, where
the second map is induced by functoriality from
the map $A_p \to \underline{A}$.
\end{example}
\begin{example}
\label{example-germs-functions}
Suppose $X = \mathbf{R}^n$ with the Euclidean topology.
Consider the presheaf of $\mathcal{C}^\infty$ functions
on $X$, denoted $\mathcal{C}^\infty_{\mathbf{R}^n}$.
In other words, $\mathcal{C}^\infty_{\mathbf{R}^n}(U)$ is the set
of $\mathcal{C}^\infty$-functions $f : U \to \mathbf{R}$.
As in Example \ref{example-basic-continuous-maps}
it is easy to show that this is a sheaf. In fact it
is a sheaf of $\mathbf{R}$-vector spaces.
\medskip\noindent
Next, let $x \in X = \mathbf{R}^n$ be a point. How do
we think of an element in the stalk $\mathcal{C}^\infty_{\mathbf{R}^n, x}$?
Such an element is given by a $\mathcal{C}^\infty$-function
$f$ whose domain contains $x$. And a pair of such
functions $f$, $g$ determine
the same element of the stalk if they agree in a neighbourhood
of $x$. In other words, an element if $\mathcal{C}^\infty_{\mathbf{R}^n, x}$
is the same thing as what is sometimes called
a {\it germ of a $\mathcal{C}^\infty$-function at $x$}.
\end{example}
\begin{example}
\label{example-sheaf-product-pointwise-stalk}
Let $X$ be a topological space. Let $A_x$ be a set for each $x \in X$.
Consider the sheaf $\mathcal{F} : U \mapsto \prod_{x\in U} A_x$ of Example
\ref{example-sheaf-product-pointwise}. We would just like to point
out here that the stalk $\mathcal{F}_x$ of $\mathcal{F}$ at $x$
is in general {\it not} equal to the set $A_x$. Of course there is
a map $\mathcal{F}_x \to A_x$, but that is in general the best you
can say. For example, suppose $x = \lim x_n$ with $x_n \not = x_m$ for
all $n \not = m$ and suppose that $A_y = \{0, 1\}$ for all $y \in X$. Then
$\mathcal{F}_x$ maps onto the (infinite) set of tails of sequences
of $0$s and $1$s. Namely, every open neighbourhood of $x$ contains almost
all of the $x_n$. On the other hand, if every neighbourhood of $x$ contains
a point $y$ such that $A_y = \emptyset$, then $\mathcal{F}_x = \emptyset$.
\end{example}
\section{Stalks of abelian presheaves}
\label{section-stalks-abelian-presheaves}
\noindent
We first deal with the case of abelian groups as
a model for the general case.
\begin{lemma}
\label{lemma-stalk-abelian-presheaf}
Let $X$ be a topological space. Let $\mathcal{F}$ be a presheaf
of abelian groups on $X$. There exists a unique structure of an
abelian group on $\mathcal{F}_x$ such that for every
$U \subset X$ open, $x\in U$ the map $\mathcal{F}(U) \to \mathcal{F}_x$
is a group homomorphism. Moreover,
$$
\mathcal{F}_x
=
\colim_{x\in U} \mathcal{F}(U)
$$
holds in the category of abelian groups.
\end{lemma}
\begin{proof}
We define addition of a pair of elements
$(U, s)$ and $(V, t)$ as the pair $(U \cap V, s|_{U\cap V} +
t|_{U \cap V})$. The rest is easy to check.
\end{proof}
\noindent
What is crucial in the proof above is that the partially ordered set of open
neighbourhoods is a directed set (Categories, Definition
\ref{categories-definition-directed-set}). Namely, the coproduct
of two abelian groups $A, B$ is the direct sum $A \oplus B$, whereas
the coproduct in the category of sets is the disjoint
union $A \amalg B$, showing that colimits in the category
of abelian groups do not agree with colimits in the
category of sets in general.
\section{Stalks of presheaves of algebraic structures}
\label{section-stalks-presheaves-structures}
\noindent
The proof of Lemma \ref{lemma-stalk-abelian-presheaf} will work
for any type of algebraic structure such that directed
colimits commute with the forgetful functor.
\begin{lemma}
\label{lemma-stalk-presheaf-values-in-category}
Let $\mathcal{C}$ be a category. Let $F : \mathcal{C} \to \textit{Sets}$
be a functor. Assume that
\begin{enumerate}
\item $F$ is faithful, and
\item directed colimits exist in $\mathcal{C}$ and $F$ commutes with
them.
\end{enumerate}
Let $X$ be a topological space. Let $x \in X$. Let $\mathcal{F}$
be a presheaf with values in $\mathcal{C}$.
Then
$$
\mathcal{F}_x = \colim_{x\in U} \mathcal{F}(U)
$$
exists in $\mathcal{C}$. Its underlying set is equal to the
stalk of the underlying presheaf of sets of $\mathcal{F}$.
Furthermore, the construction $\mathcal{F} \mapsto \mathcal{F}_x$
is a functor from the category of presheaves with values in
$\mathcal{C}$ to $\mathcal{C}$.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
By the very definition, all the morphisms $\mathcal{F}(U)
\to \mathcal{F}_x$ are morphisms in the category $\mathcal{C}$
which (after applying the forgetful functor $F$) turn into
the corresponding maps for the underlying sheaf of sets.
As usual we will not distinguish between the morphism
in $\mathcal{C}$ and the underlying map of sets, which
is permitted since $F$ is faithful.
\medskip\noindent
This lemma applies in particular to:
{\it Presheaves of (not necessarily abelian) groups, rings, modules
over a fixed ring, vector spaces over a fixed field}.
\section{Stalks of presheaves of modules}
\label{section-stalk-presheaves-modules}
\begin{lemma}
\label{lemma-stalk-module}
Let $X$ be a topological space.
Let $\mathcal{O}$ be a presheaf of rings on $X$.
Let $\mathcal{F}$ be a presheaf of $\mathcal{O}$-modules.
Let $x \in X$.
The canonical map $\mathcal{O}_x \times \mathcal{F}_x
\to \mathcal{F}_x$ coming from the multiplication map
$\mathcal{O} \times \mathcal{F} \to \mathcal{F}$ defines
a $\mathcal{O}_x$-module structure on the abelian group
$\mathcal{F}_x$.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-stalk-tensor-presheaf-modules}
Let $X$ be a topological space.
Let $\mathcal{O} \to \mathcal{O}'$ be a morphism of
presheaves of rings on $X$.
Let $\mathcal{F}$ be a presheaf of $\mathcal{O}$-modules.
Let $x \in X$. We have
$$
\mathcal{F}_x \otimes_{\mathcal{O}_x} \mathcal{O}'_x
=
(\mathcal{F} \otimes_{p, \mathcal{O}} \mathcal{O}')_x
$$
as $\mathcal{O}'_x$-modules.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\section{Algebraic structures}
\label{section-algebraic-structures}
\noindent
In this section we mildly formalize the notions we have
encountered in the sections above.
\begin{definition}
\label{definition-algebraic-structure}
A {\it type of algebraic structure} is given by a category $\mathcal{C}$
and a functor $F : \mathcal{C} \to \textit{Sets}$ with the
following properties
\begin{enumerate}
\item $F$ is faithful,
\item $\mathcal{C}$ has limits and $F$ commutes with limits,
\item $\mathcal{C}$ has filtered colimits and $F$ commutes with them, and
\item $F$ reflects isomorphisms.
\end{enumerate}
\end{definition}
\noindent
We make this definition to point out the properties
we will use in a number of arguments below. But we will
not actually study this notion in any great detail, since we
are prohibited from studying ``big'' categories by convention,
except for those listed in
Categories, Remark \ref{categories-remark-big-categories}.
Among those the following have the required properties.
\begin{lemma}
\label{lemma-list-algebraic-structures}
The following categories, endowed with the obvious forgetful
functor, define types of algebraic structures:
\begin{enumerate}
\item The category of pointed sets.
\item The category of abelian groups.
\item The category of groups.
\item The category of monoids.
\item The category of rings.
\item The category of $R$-modules for a fixed ring $R$.
\item The category of Lie algebras over a fixed field.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
From now on we will think of a (pre)sheaf of algebraic structures
and their stalks, in terms of the underlying (pre)sheaf of sets.
This is allowable by Lemmas \ref{lemma-sheaves-structure} and
\ref{lemma-stalk-presheaf-values-in-category}.
\medskip\noindent
In the rest of this section we point out some results
on algebraic structures that will be useful in the future.
\begin{lemma}
\label{lemma-properties-algebraic-structures}
Let $(\mathcal{C}, F)$ be a type of algebraic structure.
\begin{enumerate}
\item $\mathcal{C}$ has a final object $0$ and $F(0) = \{ * \}$.
\item $\mathcal{C}$ has products and $F(\prod A_i) = \prod F(A_i)$.
\item $\mathcal{C}$ has fibre products and
$F(A \times_B C) = F(A)\times_{F(B)}F(C)$.
\item $\mathcal{C}$ has equalizers, and if $E \to A$
is the equalizer of $a, b : A \to B$, then
$F(E) \to F(A)$ is the equalizer of $F(a), F(b) : F(A) \to F(B)$.
\item $A \to B$ is a monomorphism if and only if
$F(A) \to F(B)$ is injective.
\item if $F(a) : F(A) \to F(B)$ is surjective, then
$a$ is an epimorphism.
\item given $A_1 \to A_2 \to A_3 \to \ldots$, then
$\colim A_i$ exists and $F(\colim A_i) = \colim F(A_i)$,
and more generally for any filtered colimit.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted. The only interesting statement is (5) which
follows because $A \to B$ is a monomorphism if and only if
$A \to A \times_B A$ is an isomorphism, and then applying
the fact that $F$ reflects isomorphisms.
\end{proof}
\begin{lemma}
\label{lemma-image-contained-in}
Let $(\mathcal{C}, F)$ be a type of algebraic structure.
Suppose that $A, B, C \in \Ob(\mathcal{C})$.
Let $f : A \to B$ and $g : C \to B$ be morphisms of
$\mathcal{C}$. If $F(g)$ is injective, and
$\Im(F(f)) \subset \Im(F(g))$, then
$f$ factors as $f = g \circ t$ for some morphism
$t : A \to C$.
\end{lemma}
\begin{proof}
Consider $A \times_B C$. The assumptions imply that
$F(A \times_B C) = F(A) \times_{F(B)} F(C) = F(A)$.
Hence $A = A \times_B C$ because $F$ reflects isomorphisms.
The result follows.
\end{proof}
\begin{example}
\label{example-application-lemma-image-contained-in}
The lemma will be applied often to the following situation.
Suppose that we have a diagram
$$
\xymatrix{
A \ar[r] & B \ar[d] \\
C \ar[r] & D
}
$$
in $\mathcal{C}$. Suppose $C \to D$ is injective on underlying
sets, and suppose that the composition $A \to B \to D$ has
image on underlying sets in the image of $C \to D$.
Then we get a commutative diagram
$$
\xymatrix{
A \ar[r] \ar[d] & B \ar[d] \\
C \ar[r] & D
}
$$
in $\mathcal{C}$.
\end{example}
\begin{example}
\label{example-sheaf-product-pointwise-algebraic-structure}
Let $F : \mathcal{C} \to \textit{Sets}$ be a
type of algebraic structures.
Let $X$ be a topological space. Suppose that
for every $x \in X$ we are given an object
$A_x \in \text{ob}(\mathcal{C})$. Consider the presheaf
$\Pi$ with values in $\mathcal{C}$ on $X$ defined by the rule
$\Pi(U) = \prod_{x \in U} A_x$ (with obvious restriction
mappings). Note that the associated presheaf of sets
$U \mapsto F(\Pi(U)) = \prod_{x \in U} F(A_x)$ is a sheaf
by Example \ref{example-sheaf-product-pointwise}.
Hence $\Pi$ is a sheaf of algebraic structures
of type $(\mathcal{C} , F)$. This gives many examples
of sheaves of abelian groups, groups, rings, etc.
\end{example}
\section{Exactness and points}
\label{section-exactness-points}
\noindent
In any category we have the notion of epimorphism, monomorphism,
isomorphism, etc.
\begin{lemma}
\label{lemma-points-exactness}
Let $X$ be a topological space. Let $\varphi : \mathcal{F} \to \mathcal{G}$
be a morphism of sheaves of sets on $X$.
\begin{enumerate}
\item The map $\varphi$ is a monomorphism in the category of sheaves
if and only if for all $x \in X$ the map
$\varphi_x : \mathcal{F}_x \to \mathcal{G}_x$
is injective.
\item The map $\varphi$ is an epimorphism in the category of sheaves
if and only if for all $x \in X$ the map
$\varphi_x : \mathcal{F}_x \to \mathcal{G}_x$
is surjective.
\item The map $\varphi$ is an isomorphism in the category of sheaves
if and only if for all $x \in X$ the map
$\varphi_x : \mathcal{F}_x \to \mathcal{G}_x$
is bijective.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
It follows that in the category of sheaves of sets
the notions epimorphism and monomorphism can be described
as follows.
\begin{definition}
\label{definition-injective-surjective}
Let $X$ be a topological space.
\begin{enumerate}
\item A presheaf $\mathcal{F}$ is called a {\it subpresheaf} of a presheaf
$\mathcal{G}$ if $\mathcal{F}(U) \subset \mathcal{G}(U)$ for all open
$U \subset X$ such that the restriction maps of $\mathcal{G}$ induce the
restriction maps of $\mathcal{F}$. If $\mathcal{F}$ and
$\mathcal{G}$ are sheaves, then $\mathcal{F}$ is called a {\it subsheaf}
of $\mathcal{G}$. We sometimes indicate this by the notation
$\mathcal{F} \subset \mathcal{G}$.
\item A morphism of presheaves of sets $\varphi : \mathcal{F} \to \mathcal{G}$
on $X$ is called {\it injective} if and only if
$\mathcal{F}(U) \to \mathcal{G}(U)$ is injective for all $U$ open in $X$.
\item A morphism of presheaves of sets $\varphi : \mathcal{F} \to \mathcal{G}$
on $X$ is called {\it surjective} if and only if
$\mathcal{F}(U) \to \mathcal{G}(U)$ is surjective for all $U$ open in $X$.
\item A morphism of sheaves of sets $\varphi : \mathcal{F} \to \mathcal{G}$
on $X$ is called {\it injective} if and only if
$\mathcal{F}(U) \to \mathcal{G}(U)$ is injective for all $U$ open in $X$.
\item A morphism of sheaves of sets $\varphi : \mathcal{F} \to \mathcal{G}$
on $X$ is called {\it surjective} if and only if for every open
$U$ of $X$ and every section $s$ of $\mathcal{G}(U)$ there exists an
open covering $U = \bigcup U_i$ such that $s|_{U_i}$ is in
the image of $\mathcal{F}(U_i) \to \mathcal{G}(U)$ for all $i$.
\end{enumerate}
\end{definition}
\begin{lemma}
\label{lemma-characterize-epi-mono}
Let $X$ be a topological space.
\begin{enumerate}
\item Epimorphisms (resp.\ monomorphisms) in the category of
presheaves are exactly the surjective (resp.\ injective) maps
of presheaves.
\item Epimorphisms (resp.\ monomorphisms) in the category of
sheaves are exactly the surjective (resp.\ injective) maps
of sheaves, and are exactly those maps with are surjective
(resp.\ injective) on all the stalks.
\item The sheafification of a surjective (resp.\ injective)
morphism of presheaves of sets is surjective (resp.\ injective).
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-check-homomorphism-stalks}
let $X$ be a topological space.
Let $(\mathcal{C}, F)$ be a type of algebraic structure.
Suppose that $\mathcal{F}$, $\mathcal{G}$ are sheaves on $X$
with values in $\mathcal{C}$.
Let $\varphi : \mathcal{F} \to \mathcal{G}$
be a map of the underlying sheaves of sets.
If for all points $x \in X$ the map
$\mathcal{F}_x \to \mathcal{G}_x$
is a morphism of algebraic structures,
then $\varphi$ is a morphism of sheaves of algebraic structures.
\end{lemma}
\begin{proof}
Let $U$ be an open subset of $X$. Consider the diagram of
(underlying) sets
$$
\xymatrix{
\mathcal{F}(U) \ar[r] \ar[d] &
\prod_{x \in U} \mathcal{F}_x \ar[d] \\
\mathcal{G}(U) \ar[r] &
\prod_{x \in U} \mathcal{G}_x
}
$$
By assumption, and previous results, all but the left vertical
arrow are morphisms of algebraic structures. In addition the
bottom horizontal arrow is injective,
see Lemma \ref{lemma-sheaf-subset-stalks}.
Hence we conclude by Lemma \ref{lemma-image-contained-in},
see also Example \ref{example-application-lemma-image-contained-in}
\end{proof}
\noindent
Short exact sequences of abelian sheaves, etc will be discussed
in the chapter on sheaves of modules. See
Modules, Section \ref{modules-section-kernels}.
\section{Sheafification}
\label{section-sheafification}
\noindent
In this section we explain how to get the sheafification
of a presheaf on a topological space. We will use stalks
to describe the sheafification in this case. This is different
from the general procedure described in Sites, Section
\ref{sites-section-sheafification}, and perhaps somewhat
easier to understand.
\medskip\noindent
The basic construction is the following. Let $\mathcal{F}$ be a presheaf
of sets on a topological space $X$.
For every open $U \subset X$ we define
$$
\mathcal{F}^{\#}(U)
=
\{
(s_u) \in \prod\nolimits_{u \in U} \mathcal{F}_u
\text{ such that }(*)
\}
$$
where $(*)$ is the property:
\begin{itemize}
\item[$(*)$] For every $u \in U$, there exists an open neighbourhood
$u \in V \subset U$, and a section $\sigma \in \mathcal{F}(V)$
such that for all $v \in V$ we have $s_v = (V, \sigma)$
in $\mathcal{F}_v$.
\end{itemize}
Note that $(*)$ is a condition for each $u \in U$,
and that given $u \in U$ the truth of this condition
depends only on the values $s_v$ for $v$ in any open neighbourhood
of $u$. Thus it is clear that,
if $V \subset U \subset X$ are open, the projection maps
$$
\prod\nolimits_{u \in U} \mathcal{F}_u
\longrightarrow
\prod\nolimits_{v \in V} \mathcal{F}_v
$$
maps elements of $\mathcal{F}^{\#}(U)$ into $\mathcal{F}^{\#}(V)$.
In other words, we get the structure of a presheaf of sets
on $\mathcal{F}^{\#}$.
\medskip\noindent
Furthermore, the map $\mathcal{F}(U) \to \prod_{u \in U} \mathcal{F}_u$
described in Section \ref{section-stalks} clearly has image
in $\mathcal{F}^{\#}(U)$. In addition, if $V \subset U \subset X$ are
open then we have the following commutative diagram
$$
\xymatrix{
\mathcal{F}(U) \ar[r] \ar[d] &
\mathcal{F}^{\#}(U) \ar[r] \ar[d] &
\prod_{u\in U} \mathcal{F}_u \ar[d] \\
\mathcal{F}(V) \ar[r] &
\mathcal{F}^{\#}(V) \ar[r] &
\prod_{v\in V} \mathcal{F}_v
}
$$
where the vertical maps are induced from the
restriction mappings. Thus we see that
there is a canonical morphism of presheaves
$\mathcal{F} \to \mathcal{F}^{\#}$.
\medskip\noindent
In Example \ref{example-sheaf-product-pointwise} we saw
that the rule $\Pi(\mathcal{F}) : U \mapsto \prod_{u\in U} \mathcal{F}_u$
is a sheaf, with obvious restriction mappings. And by construction
$\mathcal{F}^{\#}$ is a subpresheaf of this. In other words, we
have morphisms of presheaves
$$
\mathcal{F} \to \mathcal{F}^\# \to \Pi(\mathcal{F}).
$$
In addition the rule that associates to $\mathcal{F}$
the sequence above is clearly functorial in the presheaf $\mathcal{F}$.
This notation will be
used in the proofs of the lemmas below.
\begin{lemma}
\label{lemma-sheafification-sheaf}
The presheaf $\mathcal{F}^{\#}$ is a sheaf.
\end{lemma}
\begin{proof}
It is probably better for the reader to find their own explanation
of this than to read the proof here. In fact the lemma is true
for the same reason as why the presheaf of continuous
function is a sheaf, see Example \ref{example-basic-continuous-maps}
(and this analogy can be made precise using the ``espace \'etal\'e'').
\medskip\noindent
Anyway, let $U = \bigcup U_i$ be an open covering.
Suppose that $s_i = (s_{i, u})_{u \in U_i} \in \mathcal{F}^{\#}(U_i)$
such that $s_i$ and $s_j$ agree over $U_i \cap U_j$.
Because $\Pi(\mathcal{F})$ is a sheaf,
we find an element $s = (s_u)_{u\in U}$ in $\prod_{u\in U} \mathcal{F}_u$
restricting to $s_i$ on $U_i$. We have to check property $(*)$.
Pick $u \in U$. Then $u \in U_i$ for some $i$. Hence by $(*)$ for $s_i$,
there exists a $V$ open, $u \in V \subset U_i$
and a $\sigma \in \mathcal{F}(V)$
such that $s_{i, v} = (V, \sigma)$ in $\mathcal{F}_v$
for all $v \in V$. Since $s_{i, v} = s_v$ we get $(*)$ for $s$.
\end{proof}
\begin{lemma}
\label{lemma-stalk-sheafification}
Let $X$ be a topological space.
Let $\mathcal{F}$ be a presheaf of sets on $X$.
Let $x \in X$. Then $\mathcal{F}_x = \mathcal{F}^\#_x$.
\end{lemma}
\begin{proof}
The map $\mathcal{F}_x \to \mathcal{F}^\#_x$
is injective, since already the map
$\mathcal{F}_x \to \Pi(\mathcal{F})_x$ is injective.
Namely, there is a canonical map $\Pi(\mathcal{F})_x \to \mathcal{F}_x$
which is a left inverse to the map $\mathcal{F}_x \to \Pi(\mathcal{F})_x$,
see Example \ref{example-sheaf-product-pointwise-stalk}.
To show that it is surjective, suppose that
$\overline{s} \in \mathcal{F}^\#_x$.
We can find an open neighbourhood $U$ of $x$ such that
$\overline{s}$ is the equivalence class of $(U, s)$
with $s \in \mathcal{F}^\#(U)$.
By definition, this means there exists an open neighbourhood
$V \subset U$ of $x$ and a section $\sigma \in \mathcal{F}(V)$
such that $s|_V$ is the image of $\sigma$ in $\Pi(\mathcal{F})(V)$.
Clearly the class of $(V, \sigma)$ defines an element of
$\mathcal{F}_x$ mapping to $\overline{s}$.
\end{proof}
\begin{lemma}
\label{lemma-sheafify-universal}
Let $\mathcal{F}$ be a presheaf of sets on $X$.
Any map $\mathcal{F} \to \mathcal{G}$ into a sheaf of sets
factors uniquely as
$\mathcal{F} \to \mathcal{F}^\# \to \mathcal{G}$.
\end{lemma}
\begin{proof}
Clearly, there is a commutative diagram
$$
\xymatrix{
\mathcal{F} \ar[r] \ar[d] &
\mathcal{F}^\# \ar[r] \ar[d] &
\Pi(\mathcal{F}) \ar[d] \\
\mathcal{G} \ar[r] &
\mathcal{G}^\# \ar[r] &
\Pi(\mathcal{G}) \\
}
$$
So it suffices to prove that $\mathcal{G} = \mathcal{G}^\#$.
To see this it suffices to prove, for every point $x \in X$ the
map $\mathcal{G}_x \to \mathcal{G}^\#_x$ is bijective, by
Lemma \ref{lemma-points-exactness}. And this is
Lemma \ref{lemma-stalk-sheafification} above.
\end{proof}
\noindent
This lemma really says that there is an adjoint pair
of functors: $i : \Sh(X) \to \textit{PSh}(X)$
(inclusion) and $\# : \textit{PSh}(X) \to \Sh(X)$
(sheafification). The formula is that
$$
\Mor_{\textit{PSh}(X)}(\mathcal{F}, i(\mathcal{G}))
=
\Mor_{\Sh(X)}(\mathcal{F}^\#, \mathcal{G})
$$
which says that sheafification is a left adjoint of
the inclusion functor. See Categories, Section
\ref{categories-section-adjoint}.
\begin{example}
\label{example-sheafify-constant}
See Example \ref{example-stalk-constant-presheaf} for notation.
The map $A_p \to \underline{A}$ induces a map
$A_p^\# \to \underline{A}$. It is easy to see that this
is an isomorphism. In words: The sheafification
of the constant presheaf with value $A$ is the
constant sheaf with value $A$.
\end{example}
\begin{lemma}
\label{lemma-separated-presheaf-into-sheaf}
Let $X$ be a topological space.
A presheaf $\mathcal{F}$ is separated (see
Definition \ref{definition-separated}) if and only if
the canonical map $\mathcal{F} \to \mathcal{F}^\#$ is injective.
\end{lemma}
\begin{proof}
This is clear from the construction of $\mathcal{F}^\#$ in this
section.
\end{proof}
\section{Sheafification of abelian presheaves}
\label{section-sheafify-abelian-presheaves}
\noindent
The following strange looking lemma is likely unnecessary, but
very convenient to deal with sheafification of presheaves
of algebraic structures.
\begin{lemma}
\label{lemma-diagram-fibre-product}
Let $X$ be a topological space. Let $\mathcal{F}$ be
a presheaf of sets on $X$. Let $U \subset X$ be open.
There is a canonical fibre product diagram
$$
\xymatrix{
\mathcal{F}^\#(U) \ar[d] \ar[r] &
\Pi(\mathcal{F})(U) \ar[d] \\
\prod_{x \in U} \mathcal{F}_x
\ar[r] &
\prod_{x \in U} \Pi(\mathcal{F})_x
}
$$
where the maps are the following:
\begin{enumerate}
\item The left vertical map has components
$\mathcal{F}^\#(U) \to \mathcal{F}^\#_x = \mathcal{F}_x$
where the equality is Lemma \ref{lemma-stalk-sheafification}.
\item The top horizontal map comes from the
map of presheaves $\mathcal{F} \to \Pi(\mathcal{F})$ described
in Section \ref{section-sheafification}.
\item The right vertical map has obvious component
maps $\Pi(\mathcal{F})(U) \to \Pi(\mathcal{F})_x$.
\item The bottom horizontal map has components
$\mathcal{F}_x \to \Pi(\mathcal{F})_x$
which come from the map of presheaves
$\mathcal{F} \to \Pi(\mathcal{F})$ described
in Section \ref{section-sheafification}.
\end{enumerate}
\end{lemma}
\begin{proof}
It is clear that the diagram commutes. We have to show
it is a fibre product diagram. The bottom horizontal arrow
is injective since all the maps $\mathcal{F}_x \to \Pi(\mathcal{F})_x$
are injective (see beginning proof of
Lemma \ref{lemma-stalk-sheafification}).
A section $s \in \Pi(\mathcal{F})(U)$ is in $\mathcal{F}^\#$ if and
only if $(*)$ holds. But $(*)$ says that around every point
the section $s$ comes from a section of $\mathcal{F}$. By definition
of the stalk functors, this is equivalent to saying that
the value of $s$ in every stalk $\Pi(\mathcal{F})_x$ comes
from an element of the stalk $\mathcal{F}_x$. Hence the lemma.
\end{proof}
\begin{lemma}
\label{lemma-sheafify-abelian-presheaf}
Let $X$ be a topological space.
Let $\mathcal{F}$ be an abelian presheaf on $X$.
Then there exists a unique structure of
abelian sheaf on $\mathcal{F}^\#$ such that
$\mathcal{F} \to \mathcal{F}^\#$ is a morphism
of abelian presheaves. Moreover, the following adjointness
property holds
$$
\Mor_{\textit{PAb}(X)}(\mathcal{F}, i(\mathcal{G}))
=
\Mor_{\textit{Ab}(X)}(\mathcal{F}^\#, \mathcal{G}).
$$
\end{lemma}
\begin{proof}
Recall the sheaf of sets $\Pi(\mathcal{F})$ defined in
Section \ref{section-sheafification}. All the stalks
$\mathcal{F}_x$ are abelian groups, see
Lemma \ref{lemma-stalk-abelian-presheaf}.
Hence $\Pi(\mathcal{F})$ is a sheaf of abelian groups by
Example \ref{example-sheaf-product-pointwise-algebraic-structure}.
Also, it is clear that the map $\mathcal{F} \to \Pi(\mathcal{F})$
is a morphism of abelian presheaves. If we show that
condition $(*)$ of Section \ref{section-sheafification} defines a subgroup
of $\Pi(\mathcal{F})(U)$ for all open subsets $U \subset X$,
then $\mathcal{F}^\#$ canonically inherits the structure of abelian sheaf.
This is quite easy to do by hand, and we leave it to the
reader to find a good simple argument. The argument we use here,
which generalizes to presheaves of algebraic structures is the following:
Lemma \ref{lemma-diagram-fibre-product} show that
$\mathcal{F}^\#(U)$ is the fibre product of a diagram
of abelian groups. Thus $\mathcal{F}^\#$ is an abelian
subgroup as desired.
\medskip\noindent
Note that at this point $\mathcal{F}^\#_x$ is an abelian
group by Lemma \ref{lemma-stalk-abelian-presheaf}
and that $\mathcal{F}_x \to \mathcal{F}^\#_x$ is a
bijection (Lemma \ref{lemma-stalk-sheafification})
and a homomorphism of abelian groups. Hence
$\mathcal{F}_x \to \mathcal{F}^\#_x$ is an isomorphism
of abelian groups. This will be used below without further mention.
\medskip\noindent
To prove the adjointness property we use the adjointness
property of sheafification of presheaves of sets. For example
if $\psi : \mathcal{F} \to i(\mathcal{G})$ is morphism of presheaves
then we obtain a morphism of sheaves
$\psi' : \mathcal{F}^\# \to \mathcal{G}$. What we have to do is to check
that this is a morphism of abelian sheaves. We may do this
for example by noting that it is true on stalks,
by Lemma \ref{lemma-stalk-sheafification}, and then using
Lemma \ref{lemma-check-homomorphism-stalks} above.
\end{proof}
\section{Sheafification of presheaves of algebraic structures}
\label{section-sheafification-presheaves-structures}
\begin{lemma}
\label{lemma-sheafify-presheaf-structures}
Let $X$ be a topological space.
Let $(\mathcal{C}, F)$ be a type of algebraic structure.
Let $\mathcal{F}$ be a presheaf with values in $\mathcal{C}$
on $X$. Then there exists a sheaf $\mathcal{F}^\#$ with values
in $\mathcal{C}$ and a morphism $\mathcal{F} \to \mathcal{F}^\#$
of presheaves with values in $\mathcal{C}$ with the
following properties:
\begin{enumerate}
\item The map $\mathcal{F} \to \mathcal{F}^\#$ identifies
the underlying sheaf of sets of $\mathcal{F}^\#$ with
the sheafification of the underlying presheaf of sets of $\mathcal{F}$.
\item For any morphism $\mathcal{F} \to \mathcal{G}$, where
$\mathcal{G}$ is a sheaf with values in $\mathcal{C}$ there exists
a unique factorization $\mathcal{F} \to \mathcal{F}^\# \to \mathcal{G}$.
\end{enumerate}
\end{lemma}
\begin{proof}
The proof is the same as the proof of
Lemma \ref{lemma-sheafify-abelian-presheaf},
with repeated application of
Lemma \ref{lemma-image-contained-in} (see also
Example \ref{example-application-lemma-image-contained-in}).
The main idea however, is to define $\mathcal{F}^\#(U)$
as the fibre product in $\mathcal{C}$ of the diagram
$$
\xymatrix{
&
\Pi(\mathcal{F})(U) \ar[d] \\
\prod_{x \in U} \mathcal{F}_x
\ar[r] &
\prod_{x \in U} \Pi(\mathcal{F})_x
}
$$
compare Lemma \ref{lemma-diagram-fibre-product}.
\end{proof}
\section{Sheafification of presheaves of modules}
\label{section-sheafification-presheaves-modules}
\begin{lemma}
\label{lemma-sheafification-presheaf-modules}
Let $X$ be a topological space.
Let $\mathcal{O}$ be a presheaf of rings on $X$.
Let $\mathcal{F}$ be a presheaf $\mathcal{O}$-modules.
Let $\mathcal{O}^\#$ be the sheafification of $\mathcal{O}$.
Let $\mathcal{F}^\#$ be the sheafification of $\mathcal{F}$
as a presheaf of abelian groups. There exists a map of
sheaves of sets
$$
\mathcal{O}^\# \times \mathcal{F}^\#
\longrightarrow
\mathcal{F}^\#
$$
which makes the diagram
$$
\xymatrix{
\mathcal{O} \times \mathcal{F} \ar[r] \ar[d] &
\mathcal{F} \ar[d] \\
\mathcal{O}^\# \times \mathcal{F}^\# \ar[r] &
\mathcal{F}^\#
}
$$
commute and which makes $\mathcal{F}^\#$ into a sheaf
of $\mathcal{O}^\#$-modules. In addition, if $\mathcal{G}$
is a sheaf of $\mathcal{O}^\#$-modules, then any morphism
of presheaves of $\mathcal{O}$-modules $\mathcal{F} \to \mathcal{G}$
(into the restriction of $\mathcal{G}$ to a $\mathcal{O}$-module)
factors uniquely as $\mathcal{F} \to \mathcal{F}^\# \to \mathcal{G}$
where $\mathcal{F}^\# \to \mathcal{G}$ is a morphism of
$\mathcal{O}^\#$-modules.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
This actually means that the functor
$i : \textit{Mod}(\mathcal{O}^\#) \to \textit{PMod}(\mathcal{O})$
(combining restriction and including sheaves into presheaves)
and the sheafification functor of the lemma
${}^\# : \textit{PMod}(\mathcal{O}) \to \textit{Mod}(\mathcal{O}^\#)$
are adjoint. In a formula
$$
\Mor_{\textit{PMod}(\mathcal{O})}(\mathcal{F}, i\mathcal{G})
=
\Mor_{\textit{Mod}(\mathcal{O}^\#)}(\mathcal{F}^\#, \mathcal{G})
$$
\medskip\noindent
Let $X$ be a topological space.
Let $\mathcal{O}_1 \to \mathcal{O}_2$ be
a morphism of sheaves of rings on $X$.
In Section \ref{section-presheaves-modules}
we defined a restriction functor
and a change of rings functor on presheaves of modules
associated to this situation.
\medskip\noindent
If $\mathcal{F}$ is a sheaf of $\mathcal{O}_2$-modules
then the restriction $\mathcal{F}_{\mathcal{O}_1}$
of $\mathcal{F}$ is clearly a sheaf
of $\mathcal{O}_1$-modules. We obtain the restriction functor
$$
\textit{Mod}(\mathcal{O}_2)
\longrightarrow
\textit{Mod}(\mathcal{O}_1)
$$
\medskip\noindent
On the other hand, given a sheaf of $\mathcal{O}_1$-modules
$\mathcal{G}$ the presheaf of $\mathcal{O}_2$-modules
$\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G}$
is in general not a sheaf. Hence we define the
{\it tensor product sheaf}
$\mathcal{O}_2 \otimes_{\mathcal{O}_1} \mathcal{G}$
by the formula
$$
\mathcal{O}_2 \otimes_{\mathcal{O}_1} \mathcal{G}
=
(\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G})^\#
$$
as the sheafification of our construction for presheaves.
We obtain the {\it change of rings} functor
$$
\textit{Mod}(\mathcal{O}_1)
\longrightarrow
\textit{Mod}(\mathcal{O}_2)
$$
\begin{lemma}
\label{lemma-adjointness-tensor-restrict}
With $X$, $\mathcal{O}_1$, $\mathcal{O}_2$, $\mathcal{F}$ and
$\mathcal{G}$ as above there exists a canonical bijection
$$
\Hom_{\mathcal{O}_1}(\mathcal{G}, \mathcal{F}_{\mathcal{O}_1})
=
\Hom_{\mathcal{O}_2}(
\mathcal{O}_2 \otimes_{\mathcal{O}_1} \mathcal{G},
\mathcal{F}
)
$$
In other words, the restriction and change of rings functors
are adjoint to each other.
\end{lemma}
\begin{proof}
This follows from
Lemma \ref{lemma-adjointness-tensor-restrict-presheaves}
and the fact that
$\Hom_{\mathcal{O}_2}(
\mathcal{O}_2 \otimes_{\mathcal{O}_1} \mathcal{G},
\mathcal{F}
)
=
\Hom_{\mathcal{O}_2}(
\mathcal{O}_2 \otimes_{p, \mathcal{O}_1} \mathcal{G},
\mathcal{F}
)$
because $\mathcal{F}$ is a sheaf.
\end{proof}
\begin{lemma}
\label{lemma-stalk-tensor-sheaf-modules}
Let $X$ be a topological space.
Let $\mathcal{O} \to \mathcal{O}'$ be a morphism of
sheaves of rings on $X$.
Let $\mathcal{F}$ be a sheaf $\mathcal{O}$-modules.
Let $x \in X$. We have
$$
\mathcal{F}_x \otimes_{\mathcal{O}_x} \mathcal{O}'_x
=
(\mathcal{F} \otimes_\mathcal{O} \mathcal{O}')_x
$$
as $\mathcal{O}'_x$-modules.
\end{lemma}
\begin{proof}
Follows directly from Lemma \ref{lemma-stalk-tensor-presheaf-modules}
and the fact that taking stalks commutes with sheafification.
\end{proof}
\section{Continuous maps and sheaves}
\label{section-presheaves-functorial}
\noindent
Let $f : X \to Y$ be a continuous map of topological spaces.
We will define the pushforward and pullback functors for
presheaves and sheaves.
\medskip\noindent
Let $\mathcal{F}$ be a presheaf of sets on $X$. We define the
{\it pushforward} of $\mathcal{F}$ by the rule
$$
f_*\mathcal{F}(V) = \mathcal{F}(f^{-1}(V))
$$
for any open $V \subset Y$.
Given $V_1 \subset V_2 \subset Y$ open the restriction map
is given by the commutativity of the diagram
$$
\xymatrix{
f_*\mathcal{F}(V_2) \ar[d] \ar@{=}[r] &
\mathcal{F}(f^{-1}(V_2)) \ar[d]^{\text{restriction for }\mathcal{F}} \\
f_*\mathcal{F}(V_1) \ar@{=}[r] &
\mathcal{F}(f^{-1}(V_1))
}
$$
It is clear that this defines a presheaf of sets. The construction
is clearly functorial in the presheaf $\mathcal{F}$ and hence
we obtain a functor
$$
f_* : \textit{PSh}(X) \longrightarrow \textit{PSh}(Y).
$$
\begin{lemma}
\label{lemma-pushforward-sheaf}
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{F}$ be a sheaf of sets on $X$.
Then $f_*\mathcal{F}$ is a sheaf on $Y$.
\end{lemma}
\begin{proof}
This immediately follows from the fact that
if $V = \bigcup V_j$ is an open covering in $Y$,
then $f^{-1}(V) = \bigcup f^{-1}(V_j)$ is an open covering in $X$.
\end{proof}
\noindent
As a consequence we obtain a functor
$$
f_* : \Sh(X) \longrightarrow \Sh(Y).
$$
This is compatible with composition in the following
strong sense.
\begin{lemma}
\label{lemma-pushforward-composition}
Let $f : X \to Y$ and $g : Y \to Z$ be continuous maps
of topological spaces. The functors $(g \circ f)_*$
and $g_* \circ f_*$ are equal (on both presheaves
and sheaves of sets).
\end{lemma}
\begin{proof}
This is because $(g \circ f)_*\mathcal{F}(W) =
\mathcal{F}((g \circ f)^{-1}W)$ and
$(g_* \circ f_*)\mathcal{F}(W) = \mathcal{F}(f^{-1} g^{-1} W)$
and $(g \circ f)^{-1}W = f^{-1} g^{-1} W$.
\end{proof}
\noindent
Let $\mathcal{G}$ be a presheaf of sets on $Y$.
The {\it pullback presheaf} $f_p\mathcal{G}$
of a given presheaf $\mathcal{G}$ is defined as the left adjoint
of the pushforward $f_*$ on presheaves. In other words it
should be a presheaf $f_p \mathcal{G}$ on $X$ such that
$$
\Mor_{\textit{PSh}(X)}(f_p\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{PSh}(Y)}(\mathcal{G}, f_*\mathcal{F}).
$$
By the Yoneda lemma this determines the pullback uniquely.
It turns out that it actually exists.
\begin{lemma}
\label{lemma-pullback-presheaves}
Let $f : X \to Y$ be a continuous map.
There exists a functor
$f_p : \textit{PSh}(Y) \to \textit{PSh}(X)$
which is left adjoint to $f_*$. For a presheaf
$\mathcal{G}$ it is determined by the rule
$$
f_p\mathcal{G}(U) = \colim_{f(U) \subset V} \mathcal{G}(V)
$$
where the colimit is over the collection of open neighbourhoods
$V$ of $f(U)$ in $Y$. The colimits are over
directed partially ordered sets.
(The restriction mappings of $f_p\mathcal{G}$ are explained in the proof.)
\end{lemma}
\begin{proof}
The colimit is over the partially ordered set consisting of open subsets
$V \subset Y$ which contain $f(U)$ with ordering by reverse inclusion.
This is a directed partially ordered set, since if $V, V'$ are in it then
so is $V \cap V'$. Furthermore, if
$U_1 \subset U_2$, then every open neighbourhood of $f(U_2)$
is an open neighbourhood of $f(U_1)$. Hence the system defining
$f_p\mathcal{G}(U_2)$ is a subsystem of the one defining
$f_p\mathcal{G}(U_1)$ and we obtain a restriction map (for
example by applying the generalities in Categories,
Lemma \ref{categories-lemma-functorial-colimit}).
\medskip\noindent
Note that the construction of the colimit is clearly functorial
in $\mathcal{G}$, and similarly for the restriction mappings.
Hence we have defined $f_p$ as a functor.
\medskip\noindent
A small useful remark is that there exists
a canonical map $\mathcal{G}(U) \to f_p\mathcal{G}(f^{-1}(U))$,
because the system of open neighbourhoods
of $f(f^{-1}(U))$ contains the element $U$. This is compatible
with restriction mappings. In other words, there is a
canonical map $i_\mathcal{G} : \mathcal{G} \to f_* f_p \mathcal{G}$.
\medskip\noindent
Let $\mathcal{F}$ be a presheaf of sets on $X$.
Suppose that $\psi : f_p\mathcal{G} \to \mathcal{F}$
is a map of presheaves of sets. The corresponding map
$\mathcal{G} \to f_*\mathcal{F}$ is the map
$f_*\psi \circ i_\mathcal{G} :
\mathcal{G} \to f_* f_p \mathcal{G} \to f_* \mathcal{F}$.
\medskip\noindent
Another small useful remark is that there exists a
canonical map $c_\mathcal{F} : f_p f_* \mathcal{F} \to \mathcal{F}$.
Namely, let $U \subset X$ open.
For every open neighbourhood $V \supset f(U)$ in $Y$
there exists a map
$f_*\mathcal{F}(V) = \mathcal{F}(f^{-1}(V))\to \mathcal{F}(U)$,
namely the restriction map on $\mathcal{F}$. And this is compatible
with the restriction mappings between values of $\mathcal{F}$
on $f^{-1}$ of varying opens containing $f(U)$. Thus we obtain
a canonical map $f_p f_* \mathcal{F}(U) \to \mathcal{F}(U)$.
Another trivial verification shows that these maps are compatible
with restriction maps and define a map $c_\mathcal{F}$
of presheaves of sets.
\medskip\noindent
Suppose that $\varphi : \mathcal{G} \to f_*\mathcal{F}$
is a map of presheaves of sets. Consider $f_p\varphi :
f_p \mathcal{G} \to f_p f_* \mathcal{F}$.
Postcomposing with $c_\mathcal{F}$ gives the desired map
$c_\mathcal{F} \circ f_p\varphi : f_p\mathcal{G} \to \mathcal{F}$.
We omit the verification that this construction is inverse
to the construction in the other direction given above.
\end{proof}
\begin{lemma}
\label{lemma-stalk-pullback-presheaf}
Let $f : X \to Y$ be a continuous map.
Let $x \in X$. Let $\mathcal{G}$ be a presheaf of sets on $Y$.
There is a canonical bijection of stalks
$(f_p\mathcal{G})_x = \mathcal{G}_{f(x)}$.
\end{lemma}
\begin{proof}
This you can see as follows
\begin{eqnarray*}
(f_p\mathcal{G})_x
& = &
\colim_{x \in U} f_p\mathcal{G}(U) \\
& = &
\colim_{x \in U} \colim_{f(U) \subset V} \mathcal{G}(V) \\
& = &
\colim_{f(x) \in V} \mathcal{G}(V) \\
& = &
\mathcal{G}_{f(x)}
\end{eqnarray*}
Here we have used
Categories, Lemma \ref{categories-lemma-colimits-commute},
and the fact that any $V$ open in $Y$ containing $f(x)$
occurs in the third description above. Details omitted.
\end{proof}
\noindent
Let $\mathcal{G}$ be a sheaf of sets on $Y$.
The {\it pullback sheaf} $f^{-1}\mathcal{G}$ is defined
by the formula
$$
f^{-1}\mathcal{G} = (f_p\mathcal{G})^\# .
$$
Sheafification is a left adjoint to the inclusion
of sheaves in presheaves, and $f_p$ is a left
adjoint to $f_*$ on presheaves. As a formal consequence
we obtain that $f^{-1}$ is a left adjoint of
pushforward on sheaves. In other words,
$$
\Mor_{\Sh(X)}(f^{-1}\mathcal{G}, \mathcal{F})
=
\Mor_{\Sh(Y)}(\mathcal{G}, f_*\mathcal{F}).
$$
The formal argument is given in the setting of abelian
sheaves in the next section.
\begin{lemma}
\label{lemma-stalk-pullback}
Let $x \in X$. Let $\mathcal{G}$ be a sheaf of sets on $Y$.
There is a canonical bijection of stalks
$(f^{-1}\mathcal{G})_x = \mathcal{G}_{f(x)}$.
\end{lemma}
\begin{proof}
This is a combination of Lemmas \ref{lemma-stalk-sheafification}
and \ref{lemma-stalk-pullback-presheaf}.
\end{proof}
\begin{lemma}
\label{lemma-pullback-composition}
Let $f : X \to Y$ and $g : Y \to Z$ be continuous maps
of topological spaces. The functors $(g \circ f)^{-1}$
and $f^{-1} \circ g^{-1}$ are canonically isomorphic.
Similarly $(g \circ f)_p \cong f_p \circ g_p$ on
presheaves.
\end{lemma}
\begin{proof}
To see this
use that adjoint functors are unique up to unique isomorphism,
and Lemma \ref{lemma-pushforward-composition}.
\end{proof}
\begin{definition}
\label{definition-f-map}
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{F}$ be a sheaf of sets on $X$ and
let $\mathcal{G}$ be a sheaf of sets on $Y$.
An {\it $f$-map $\xi : \mathcal{G} \to \mathcal{F}$}
is a collection of maps
$\xi_V : \mathcal{G}(V) \to \mathcal{F}(f^{-1}(V))$
indexed by open subsets $V \subset Y$ such that
$$
\xymatrix{
\mathcal{G}(V) \ar[r]_{\xi_V} \ar[d]_{\text{restriction of }\mathcal{G}} &
\mathcal{F}(f^{-1}V) \ar[d]^{\text{restriction of }\mathcal{F}} \\
\mathcal{G}(V') \ar[r]^{\xi_{V'}} &
\mathcal{F}(f^{-1}V')
}
$$
commutes for all $V' \subset V \subset Y$ open.
\end{definition}
\begin{lemma}
\label{lemma-f-map}
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{F}$ be a sheaf of sets on $X$ and
let $\mathcal{G}$ be a sheaf of sets on $Y$.
There are canonical bijections between the following three sets:
\begin{enumerate}
\item The set of maps $\mathcal{G} \to f_*\mathcal{F}$.
\item The set of maps $f^{-1}\mathcal{G} \to \mathcal{F}$.
\item The set of $f$-maps $\xi : \mathcal{G} \to \mathcal{F}$.
\end{enumerate}
\end{lemma}
\begin{proof}
We leave the easy verification to the reader.
\end{proof}
\noindent
It is sometimes convenient to think about $f$-maps
instead of maps between sheaves either on $X$ or on $Y$.
We define composition of $f$-maps as follows.
\begin{definition}
\label{definition-composition-f-maps}
Suppose that $f : X \to Y$ and $g : Y \to Z$ are continuous
maps of topological spaces. Suppose that $\mathcal{F}$ is
a sheaf on $X$, $\mathcal{G}$ is a sheaf on $Y$, and
$\mathcal{H}$ is a sheaf on $Z$.
Let $\varphi : \mathcal{G} \to \mathcal{F}$ be an $f$-map.
Let $\psi : \mathcal{H} \to \mathcal{G}$ be an $g$-map.
The {\it composition of $\varphi$ and $\psi$} is the
$(g \circ f)$-map $\varphi \circ \psi$ defined
by the commutativity of the diagrams
$$
\xymatrix{
\mathcal{H}(W) \ar[rr]_{(\varphi \circ \psi)_W}
\ar[rd]_{\psi_W} & &
\mathcal{F}(f^{-1}g^{-1}W) \\
&
\mathcal{G}(g^{-1}W)
\ar[ru]_{\varphi_{g^{-1}W}}
}
$$
\end{definition}
\noindent
We leave it to the reader to verify that this works.
Another way to think about this is to think of
$\varphi \circ \psi$ as the composition
$$
\mathcal{H}
\xrightarrow{\psi}
g_*\mathcal{G}
\xrightarrow{g_*\varphi}
g_* f_* \mathcal{F} = (g \circ f)_* \mathcal{F}
$$
Now, doesn't it seem that thinking about $f$-maps is somehow
easier?
\medskip\noindent
Finally, given a continuous map $f : X \to Y$, and an
$f$-map $\varphi : \mathcal{G} \to \mathcal{F}$ there is
a natural map on stalks
$$
\varphi_x : \mathcal{G}_{f(x)} \longrightarrow \mathcal{F}_x
$$
for all $x \in X$. The image of a representative $(V, s)$
of an element in $\mathcal{G}_{f(x)}$ is mapped to the
element in $\mathcal{F}_x$ with representative $(f^{-1}V,
\varphi_V(s))$. We leave it to the reader to see that this
is well defined. Another way to state it is that it is the
unique map such that all diagrams
$$
\xymatrix{
\mathcal{F}(f^{-1}V) \ar[r] &
\mathcal{F}_x \\
\mathcal{G}(V) \ar[r] \ar[u]^{\varphi_V} &
\mathcal{G}_{f(x)} \ar[u]^{\varphi_x}
}
$$
(for $x \in V \subset Y$ open) commute.
\begin{lemma}
\label{lemma-compose-f-maps-stalks}
Suppose that $f : X \to Y$ and $g : Y \to Z$ are continuous
maps of topological spaces. Suppose that $\mathcal{F}$ is
a sheaf on $X$, $\mathcal{G}$ is a sheaf on $Y$, and
$\mathcal{H}$ is a sheaf on $Z$.
Let $\varphi : \mathcal{G} \to \mathcal{F}$ be an $f$-map.
Let $\psi : \mathcal{H} \to \mathcal{G}$ be an $g$-map.
Let $x \in X$ be a point. The map on stalks
$(\varphi \circ \psi)_x : \mathcal{H}_{g(f(x))}
\to \mathcal{F}_x$ is the composition
$$
\mathcal{H}_{g(f(x))}
\xrightarrow{\psi_{f(x)}}
\mathcal{G}_{f(x)}
\xrightarrow{\varphi_x}
\mathcal{F}_x
$$
\end{lemma}
\begin{proof}
Immediate from Definition \ref{definition-composition-f-maps}
and the definition of the map on stalks above.
\end{proof}
\section{Continuous maps and abelian sheaves}
\label{section-abelian-presheaves-functorial}
\noindent
Let $f : X \to Y$ be a continuous map.
We claim there are functors
\begin{eqnarray*}
f_* : \textit{PAb}(X) & \longrightarrow & \textit{PAb}(Y) \\
f_* : \textit{Ab}(X) & \longrightarrow & \textit{Ab}(Y) \\
f_p : \textit{PAb}(Y) & \longrightarrow & \textit{PAb}(X) \\
f^{-1} : \textit{Ab}(Y) & \longrightarrow & \textit{Ab}(X)
\end{eqnarray*}
with similar properties to their counterparts in
Section \ref{section-presheaves-functorial}.
To see this we argue in the following way.
\medskip\noindent
Each of the functors will be constructed in the same
way as the corresponding functor in
Section \ref{section-presheaves-functorial}.
This works because all the colimits in that section
are directed colimits (but we will work through it below).
\medskip\noindent
First off, given an abelian presheaf $\mathcal{F}$ on $X$ and
an abelian presheaf $\mathcal{G}$ on $Y$ we define
\begin{eqnarray*}
f_*\mathcal{F}(V) & = & \mathcal{F}(f^{-1}(V)) \\
f_p\mathcal{G}(U) & = & \colim_{f(U) \subset V} \mathcal{G}(V)
\end{eqnarray*}
as abelian groups. The restriction mappings are the same as
the restriction mappings for presheaves of sets (and they are
all homomorphisms of abelian groups).
\medskip\noindent
The assignments $\mathcal{F} \mapsto f_*\mathcal{F}$ and
$\mathcal{G} \to f_p\mathcal{G}$ are functors on
the categories of presheaves of abelian groups.
This is clear, as (for example) a map of abelian presheaves
$\mathcal{G}_1 \to \mathcal{G}_2$ gives rise to a map of
directed systems
$\{\mathcal{G}_1(V)\}_{f(U) \subset V} \to
\{\mathcal{G}_2(V)\}_{f(U) \subset V}$
all of whose maps are homomorphisms
and hence gives rise to a homomorphism of abelian groups
$f_p\mathcal{G}_1(U) \to f_p\mathcal{G}_2(U)$.
\medskip\noindent
The functors $f_*$ and $f_p$ are adjoint on the
category of presheaves of abelian groups, i.e., we have
$$
\Mor_{\textit{PAb}(X)}(f_p\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{PAb}(Y)}(\mathcal{G}, f_*\mathcal{F}).
$$
To prove this, note that the map
$i_\mathcal{G} : \mathcal{G} \to f_* f_p\mathcal{G}$ from the proof
of Lemma \ref{lemma-pullback-presheaves}
is a map of abelian presheaves. Hence if
$\psi : f_p\mathcal{G} \to \mathcal{F}$
is a map of abelian presheaves, then the corresponding map
$\mathcal{G} \to f_*\mathcal{F}$ is the map
$f_*\psi \circ i_\mathcal{G} :
\mathcal{G} \to f_* f_p \mathcal{G} \to f_* \mathcal{F}$
is also a map of abelian presheaves. For the other direction
we point out that the map
$c_\mathcal{F} : f_p f_* \mathcal{F} \to \mathcal{F}$
from the proof of Lemma \ref{lemma-pullback-presheaves} is a
map of abelian presheaves as well (since it is made out of restriction
mappings of $\mathcal{F}$ which are all homomorphisms). Hence
given a map of abelian presheaves $\varphi : \mathcal{G} \to f_*\mathcal{F}$
the map
$c_\mathcal{F} \circ f_p\varphi : f_p\mathcal{G} \to \mathcal{F}$
is a map of abelian presheaves as well. Since these constructions
$\psi \mapsto f_*\psi$ and $\varphi \mapsto c_\mathcal{F} \circ f_p\varphi$
are inverse to each other as constructions on maps of presheaves of sets
we see they are also inverse to each other on maps of abelian presheaves.
\medskip\noindent
If $\mathcal{F}$ is an abelian sheaf on $Y$, then $f_*\mathcal{F}$
is an abelian sheaf on $X$. This is true because of the definition
of an abelian sheaf and because this is true for sheaves of sets,
see Lemma \ref{lemma-pushforward-sheaf}. This defines the functor
$f_*$ on the category of abelian sheaves.
\medskip\noindent
We define $f^{-1}\mathcal{G} = (f_p\mathcal{G})^\#$ as before.
Adjointness of $f_*$ and $f^{-1}$ follows formally as in
the case of presheaves of sets. Here is the argument:
\begin{eqnarray*}
\Mor_{\textit{Ab}(X)}(f^{-1}\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{PAb}(X)}(f_p\mathcal{G}, \mathcal{F}) \\
& = &
\Mor_{\textit{PAb}(Y)}(\mathcal{G}, f_*\mathcal{F}) \\
& = &
\Mor_{\textit{Ab}(Y)}(\mathcal{G}, f_*\mathcal{F})
\end{eqnarray*}
\begin{lemma}
\label{lemma-pullback-abelian-stalk}
Let $f : X \to Y$ be a continuous map.
\begin{enumerate}
\item Let $\mathcal{G}$ be an abelian presheaf on $Y$.
Let $x \in X$. The bijection
$\mathcal{G}_{f(x)} \to (f_p\mathcal{G})_x$ of
Lemma \ref{lemma-stalk-pullback-presheaf} is an isomorphism of abelian groups.
\item Let $\mathcal{G}$ be an abelian sheaf on $Y$.
Let $x \in X$. The bijection
$\mathcal{G}_{f(x)} \to (f^{-1}\mathcal{G})_x$ of
Lemma \ref{lemma-stalk-pullback} is an isomorphism of abelian groups.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\noindent
Given a continuous map $f : X \to Y$ and sheaves of abelian
groups $\mathcal{F}$ on $X$, $\mathcal{G}$ on $Y$, the notion
of an {\it $f$-map $\mathcal{G} \to \mathcal{F}$
of sheaves of abelian groups} makes sense. We can just define
it exactly as in Definition \ref{definition-f-map} (replacing maps
of sets with homomorphisms of abelian groups) or we can
simply say that it is the same as a map of abelian
sheaves $\mathcal{G} \to f_*\mathcal{F}$. We will use this
notion freely in the following. The group of $f$-maps between
$\mathcal{G}$ and $\mathcal{F}$ will be in canonical bijection
with the groups
$\Mor_{\textit{Ab}(X)}(f^{-1}\mathcal{G}, \mathcal{F})$
and
$\Mor_{\textit{Ab}(Y)}(\mathcal{G}, f_*\mathcal{F})$.
\medskip\noindent
Composition of $f$-maps is defined in exactly the
same manner as in the case of $f$-maps of sheaves of
sets. In addition, given an $f$-map $\mathcal{G} \to \mathcal{F}$
as above, the induced maps on stalks
$$
\varphi_x : \mathcal{G}_{f(x)} \longrightarrow \mathcal{F}_x
$$
are abelian group homomorphisms.
\section{Continuous maps and sheaves of algebraic structures}
\label{section-presheaves-structures-functorial}
\noindent
Let $(\mathcal{C}, F)$ be a type of algebraic structure.
For a topological space $X$ let us introduce the notation:
\begin{enumerate}
\item $\textit{PSh}(X, \mathcal{C})$ will be the category
of presheaves with values in $\mathcal{C}$.
\item $\Sh(X, \mathcal{C})$ will be the category
of sheaves with values in $\mathcal{C}$.
\end{enumerate}
Let $f : X \to Y$ be a continuous map of topological spaces.
The same arguments as in the previous section show
there are functors
\begin{eqnarray*}
f_* : \textit{PSh}(X, \mathcal{C}) &
\longrightarrow &
\textit{PSh}(Y, \mathcal{C}) \\
f_* : \Sh(X, \mathcal{C}) &
\longrightarrow &
\Sh(Y, \mathcal{C}) \\
f_p : \textit{PSh}(Y, \mathcal{C}) &
\longrightarrow &
\textit{PSh}(X, \mathcal{C}) \\
f^{-1} : \Sh(Y, \mathcal{C}) &
\longrightarrow &
\Sh(X, \mathcal{C})
\end{eqnarray*}
constructed in the same manner and with the same
properties as the functors constructed for abelian
(pre)sheaves. In particular there are commutative diagrams
$$
\xymatrix{
\textit{PSh}(X, \mathcal{C}) \ar[r]^{f_*} \ar[d]^F &
\textit{PSh}(Y, \mathcal{C}) \ar[d]^F &
\Sh(X, \mathcal{C}) \ar[r]^{f_*} \ar[d]^F &
\Sh(Y, \mathcal{C}) \ar[d]^F
\\
\textit{PSh}(X) \ar[r]^{f_*} &
\textit{PSh}(Y) &
\Sh(X) \ar[r]^{f_*} &
\Sh(Y)
\\
\textit{PSh}(Y, \mathcal{C}) \ar[r]^{f_p} \ar[d]^F &
\textit{PSh}(X, \mathcal{C}) \ar[d]^F &
\Sh(Y, \mathcal{C}) \ar[r]^{f^{-1}} \ar[d]^F &
\Sh(X, \mathcal{C}) \ar[d]^F
\\
\textit{PSh}(Y) \ar[r]^{f_p} &
\textit{PSh}(X) &
\Sh(Y) \ar[r]^{f^{-1}} &
\Sh(X)
}
$$
\medskip\noindent
The main formulas to keep in mind are the following
\begin{eqnarray*}
f_*\mathcal{F}(V) & = & \mathcal{F}(f^{-1}(V)) \\
f_p\mathcal{G}(U) & = & \colim_{f(U) \subset V} \mathcal{G}(V) \\
f^{-1}\mathcal{G} & = & (f_p\mathcal{G})^\# \\
(f_p\mathcal{G})_x & = & \mathcal{G}_{f(x)} \\
(f^{-1}\mathcal{G})_x & = & \mathcal{G}_{f(x)}
\end{eqnarray*}
Each of these formulas has the property that they hold in the
category $\mathcal{C}$ and that upon taking underlying
sets we get the corresponding formula for presheaves of sets.
In addition we have the adjointness properties
\begin{eqnarray*}
\Mor_{\textit{PSh}(X, \mathcal{C})}(f_p\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{PSh}(Y, \mathcal{C})}(\mathcal{G}, f_*\mathcal{F}) \\
\Mor_{\Sh(X, \mathcal{C})}(f^{-1}\mathcal{G}, \mathcal{F})
& = &
\Mor_{\Sh(Y, \mathcal{C})}(\mathcal{G}, f_*\mathcal{F}).
\end{eqnarray*}
To prove these, the main step is to construct the maps
$$
i_\mathcal{G} : \mathcal{G} \longrightarrow f_*f_p\mathcal{G}
$$
and
$$
c_\mathcal{F} : f_p f_* \mathcal{F} \longrightarrow \mathcal{F}
$$
which occur in the proof of Lemma \ref{lemma-pullback-presheaves} as
morphisms of presheaves with values in $\mathcal{C}$. This may be safely
left to the reader since the constructions are exactly the same
as in the case of presheaves of sets.
\medskip\noindent
Given a continuous map $f : X \to Y$ and sheaves of algebraic
structures $\mathcal{F}$ on $X$, $\mathcal{G}$ on $Y$, the notion
of an {\it $f$-map $\mathcal{G} \to \mathcal{F}$
of sheaves of algebraic structures} makes sense. We can just define
it exactly as in Definition \ref{definition-f-map} (replacing maps
of sets with morphisms in $\mathcal{C}$) or we can
simply say that it is the same as a map of sheaves of algebraic
structures $\mathcal{G} \to f_*\mathcal{F}$. We will use this
notion freely in the following. The set of $f$-maps between
$\mathcal{G}$ and $\mathcal{F}$ will be in canonical bijection
with the sets
$\Mor_{\Sh(X, \mathcal{C})}(f^{-1}\mathcal{G}, \mathcal{F})$
and
$\Mor_{\Sh(Y, \mathcal{C})}(\mathcal{G}, f_*\mathcal{F})$.
\medskip\noindent
Composition of $f$-maps is defined in exactly the
same manner as in the case of $f$-maps of sheaves of
sets. In addition, given an $f$-map $\mathcal{G} \to \mathcal{F}$
as above, the induced maps on stalks
$$
\varphi_x : \mathcal{G}_{f(x)} \longrightarrow \mathcal{F}_x
$$
are homomorphisms of algebraic structures.
\begin{lemma}
\label{lemma-f-map-sets-algebraic-structures}
Let $f : X \to Y$ be a continuous map of topological spaces.
Suppose given sheaves of algebraic structures
$\mathcal{F}$ on $X$, $\mathcal{G}$ on $Y$. Let
$\varphi : \mathcal{G} \to \mathcal{F}$ be an $f$-map
of underlying sheaves of sets. If for every $V \subset Y$ open the
map of sets $\varphi_V : \mathcal{G}(V) \to \mathcal{F}(f^{-1}V)$
is the effect of a morphism in $\mathcal{C}$ on underlying sets,
then $\varphi$ comes from a unique $f$-morphism between
sheaves of algebraic structures.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\section{Continuous maps and sheaves of modules}
\label{section-presheaves-modules-functorial}
\noindent
The case of sheaves of modules is more complicated.
The reason is that the natural setting for defining
the pullback and pushforward functors, is the setting
of ringed spaces, which we will define below. First
we state a few obvious lemmas.
\begin{lemma}
\label{lemma-pushforward-presheaf-module}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a presheaf of rings on $X$. Let
$\mathcal{F}$ be a presheaf of $\mathcal{O}$-modules.
There is a natural map of underlying presheaves of sets
$$
f_*\mathcal{O} \times f_*\mathcal{F}
\longrightarrow
f_*\mathcal{F}
$$
which turns $f_*\mathcal{F}$ into a presheaf of
$f_*\mathcal{O}$-modules. This construction is
functorial in $\mathcal{F}$.
\end{lemma}
\begin{proof}
Let $V \subset Y$ is open. We define the map of the lemma
to be the map
$$
f_*\mathcal{O}(V) \times f_*\mathcal{F}(V)
=
\mathcal{O}(f^{-1}V) \times \mathcal{F}(f^{-1}V)
\to
\mathcal{F}(f^{-1}V)
=
f_*\mathcal{F}(V).
$$
Here the arrow in the middle is the multiplication map on $X$.
We leave it to the reader to see this is compatible with
restriction mappings and defines a structure of
$f_*\mathcal{O}$-module on $f_*\mathcal{F}$.
\end{proof}
\begin{lemma}
\label{lemma-pullback-presheaf-module}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a presheaf of rings on $Y$. Let
$\mathcal{G}$ be a presheaf of $\mathcal{O}$-modules.
There is a natural map of underlying presheaves of sets
$$
f_p\mathcal{O} \times f_p\mathcal{G}
\longrightarrow
f_p\mathcal{G}
$$
which turns $f_p\mathcal{G}$ into a presheaf of $f_p\mathcal{O}$-modules.
This construction is functorial in $\mathcal{G}$.
\end{lemma}
\begin{proof}
Let $U \subset X$ is open. We define the map of the lemma
to be the map
\begin{eqnarray*}
f_p\mathcal{O}(U) \times f_p\mathcal{G}(U)
& = &
\colim_{f(U) \subset V} \mathcal{O}(V)
\times
\colim_{f(U) \subset V} \mathcal{G}(V) \\
& = &
\colim_{f(U) \subset V} (\mathcal{O}(V)\times \mathcal{G}(V)) \\
& \to &
\colim_{f(U) \subset V} \mathcal{G}(V) \\
& = &
f_p\mathcal{G}(U).
\end{eqnarray*}
Here the arrow in the middle is the multiplication map on $Y$.
The second equality holds because directed colimits commute
with finite limits, see
Categories, Lemma \ref{categories-lemma-directed-commutes}.
We leave it to the reader to see this is compatible with
restriction mappings and defines a structure of
$f_p\mathcal{O}$-module on $f_p\mathcal{G}$.
\end{proof}
\noindent
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{O}_X$ be a presheaf of rings on $X$ and
let $\mathcal{O}_Y$ be a presheaf of rings on $Y$.
So at the moment we have defined functors
\begin{eqnarray*}
f_* : \textit{PMod}(\mathcal{O}_X) &
\longrightarrow &
\textit{PMod}(f_*\mathcal{O}_X) \\
f_p : \textit{PMod}(\mathcal{O}_Y) &
\longrightarrow &
\textit{PMod}(f_p\mathcal{O}_Y)
\end{eqnarray*}
These satisfy some compatibilities as follows.
\begin{lemma}
\label{lemma-adjoint-push-pull-presheaves-modules}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a presheaf of rings on $Y$.
Let $\mathcal{G}$ be a presheaf of $\mathcal{O}$-modules.
Let $\mathcal{F}$ be a presheaf of $f_p\mathcal{O}$-modules.
Then
$$
\Mor_{\textit{PMod}(f_p\mathcal{O})}(f_p\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{PMod}(\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
$$
Here we use
Lemmas \ref{lemma-pullback-presheaf-module}
and \ref{lemma-pushforward-presheaf-module}, and we think of
$f_*\mathcal{F}$ as an $\mathcal{O}$-module via the map
$i_\mathcal{O} : \mathcal{O} \to f_*f_p\mathcal{O}$
(defined first in the proof of Lemma \ref{lemma-pullback-presheaves}).
\end{lemma}
\begin{proof}
Note that we have
$$
\Mor_{\textit{PAb}(X)}(f_p\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{PAb}(Y)}(\mathcal{G}, f_*\mathcal{F}).
$$
according to Section \ref{section-abelian-presheaves-functorial}.
So what we have to prove is that under this correspondence, the
subsets of module maps correspond. In addition, the correspondence
is determined by the rule
$$
(\psi : f_p\mathcal{G} \to \mathcal{F})
\longmapsto
(f_*\psi \circ i_\mathcal{G} :
\mathcal{G} \to f_* \mathcal{F})
$$
and in the other direction by the rule
$$
(\varphi : \mathcal{G} \to f_* \mathcal{F})
\longmapsto
(c_\mathcal{F} \circ f_p\varphi : f_p\mathcal{G} \to \mathcal{F})
$$
where $i_\mathcal{G}$ and $c_\mathcal{F}$ are as in
Section \ref{section-abelian-presheaves-functorial}.
Hence, using the functoriality of $f_*$ and $f_p$ we see that
it suffices to check that the maps
$i_\mathcal{G} : \mathcal{G} \to f_* f_p \mathcal{G}$ and
$c_\mathcal{F} : f_p f_* \mathcal{F} \to \mathcal{F}$
are compatible with module structures, which we leave to the reader.
\end{proof}
\begin{lemma}
\label{lemma-adjoint-pull-push-presheaves-modules}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a presheaf of rings on $X$.
Let $\mathcal{F}$ be a presheaf of $\mathcal{O}$-modules.
Let $\mathcal{G}$ be a presheaf of $f_*\mathcal{O}$-modules.
Then
$$
\Mor_{\textit{PMod}(\mathcal{O})}(
\mathcal{O} \otimes_{p, f_pf_*\mathcal{O}} f_p\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{PMod}(f_*\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
$$
Here we use
Lemmas \ref{lemma-pullback-presheaf-module}
and \ref{lemma-pushforward-presheaf-module}, and we use
the map $c_\mathcal{O} : f_pf_*\mathcal{O} \to \mathcal{O}$
in the definition of the tensor product.
\end{lemma}
\begin{proof}
This follows from the equalities
\begin{eqnarray*}
\Mor_{\textit{PMod}(\mathcal{O})}(
\mathcal{O} \otimes_{p, f_pf_*\mathcal{O}} f_p\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{PMod}(f_pf_*\mathcal{O})}(
f_p\mathcal{G}, \mathcal{F}_{f_pf_*\mathcal{O}}) \\
& = &
\Mor_{\textit{PMod}(f_*\mathcal{O})}(\mathcal{G},
f_*(\mathcal{F}_{f_pf_*\mathcal{O}})) \\
& = &
\Mor_{\textit{PMod}(f_*\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
\end{eqnarray*}
The first equality is
Lemma \ref{lemma-adjointness-tensor-restrict-presheaves}.
The second equality is
Lemma \ref{lemma-adjoint-push-pull-presheaves-modules}.
The third equality is given by the equality
$f_*(\mathcal{F}_{f_pf_*\mathcal{O}}) = f_*\mathcal{F}$
of abelian sheaves which is $f_*\mathcal{O}$-linear. Namely,
$\text{id}_{f_*\mathcal{O}}$ corresponds to $c_\mathcal{O}$
under the adjunction described in the proof of
Lemma \ref{lemma-pullback-presheaves}
and thus
$\text{id}_{f_*\mathcal{O}} = f_*c_\mathcal{O} \circ i_{f_*\mathcal{O}}$.
\end{proof}
\begin{lemma}
\label{lemma-pushforward-module}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a sheaf of rings on $X$. Let
$\mathcal{F}$ be a sheaf of $\mathcal{O}$-modules.
The pushforward $f_*\mathcal{F}$, as defined in
Lemma \ref{lemma-pushforward-presheaf-module}
is a sheaf of $f_*\mathcal{O}$-modules.
\end{lemma}
\begin{proof}
Obvious from the definition and Lemma \ref{lemma-pushforward-sheaf}.
\end{proof}
\begin{lemma}
\label{lemma-pullback-module}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a sheaf of rings on $Y$. Let
$\mathcal{G}$ be a sheaf of $\mathcal{O}$-modules.
There is a natural map of underlying presheaves of sets
$$
f^{-1}\mathcal{O} \times f^{-1}\mathcal{G}
\longrightarrow
f^{-1}\mathcal{G}
$$
which turns $f^{-1}\mathcal{G}$ into a
sheaf of $f^{-1}\mathcal{O}$-modules.
\end{lemma}
\begin{proof}
Recall that $f^{-1}$ is defined as the composition of the
functor $f_p$ and sheafification. Thus the lemma
is a combination of Lemma \ref{lemma-pullback-presheaf-module}
and Lemma \ref{lemma-sheafification-presheaf-modules}.
\end{proof}
\noindent
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{O}_X$ be a sheaf of rings on $X$ and
let $\mathcal{O}_Y$ be a sheaf of rings on $Y$.
So now we have defined functors
\begin{eqnarray*}
f_* : \textit{Mod}(\mathcal{O}_X) &
\longrightarrow &
\textit{Mod}(f_*\mathcal{O}_X) \\
f^{-1} : \textit{Mod}(\mathcal{O}_Y) &
\longrightarrow &
\textit{Mod}(f^{-1}\mathcal{O}_Y)
\end{eqnarray*}
These satisfy some compatibilities as follows.
\begin{lemma}
\label{lemma-adjoint-push-pull-modules}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a sheaf of rings on $Y$.
Let $\mathcal{G}$ be a sheaf of $\mathcal{O}$-modules.
Let $\mathcal{F}$ be a sheaf of $f^{-1}\mathcal{O}$-modules.
Then
$$
\Mor_{\textit{Mod}(f^{-1}\mathcal{O})}(f^{-1}\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{Mod}(\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
$$
Here we use
Lemmas \ref{lemma-pullback-module}
and \ref{lemma-pushforward-module}, and we think of
$f_*\mathcal{F}$ as an $\mathcal{O}$-module by restriction via
$\mathcal{O} \to f_*f^{-1}\mathcal{O}$.
\end{lemma}
\begin{proof}
Argue by the equalities
\begin{eqnarray*}
\Mor_{\textit{Mod}(f^{-1}\mathcal{O})}(f^{-1}\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{Mod}(f_p\mathcal{O})}(f_p\mathcal{G}, \mathcal{F}) \\
& = &
\Mor_{\textit{Mod}(\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
\end{eqnarray*}
where the second is
Lemmas \ref{lemma-adjoint-push-pull-presheaves-modules}
and the first is by Lemma \ref{lemma-sheafification-presheaf-modules}.
\end{proof}
\begin{lemma}
\label{lemma-adjoint-pull-push-modules}
Let $f : X \to Y$ be a continuous map of topological spaces.
Let $\mathcal{O}$ be a sheaf of rings on $X$.
Let $\mathcal{F}$ be a sheaf of $\mathcal{O}$-modules.
Let $\mathcal{G}$ be a sheaf of $f_*\mathcal{O}$-modules.
Then
$$
\Mor_{\textit{Mod}(\mathcal{O})}(
\mathcal{O} \otimes_{f^{-1}f_*\mathcal{O}} f^{-1}\mathcal{G}, \mathcal{F})
=
\Mor_{\textit{Mod}(f_*\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
$$
Here we use
Lemmas \ref{lemma-pullback-module}
and \ref{lemma-pushforward-module}, and we use
the canonical map $f^{-1}f_*\mathcal{O} \to \mathcal{O}$
in the definition of the tensor product.
\end{lemma}
\begin{proof}
This follows from the equalities
\begin{eqnarray*}
\Mor_{\textit{Mod}(\mathcal{O})}(
\mathcal{O} \otimes_{f^{-1}f_*\mathcal{O}} f^{-1}\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{Mod}(f^{-1}f_*\mathcal{O})}(
f^{-1}\mathcal{G}, \mathcal{F}_{f^{-1}f_*\mathcal{O}}) \\
& = &
\Mor_{\textit{Mod}(f_*\mathcal{O})}(\mathcal{G}, f_*\mathcal{F}).
\end{eqnarray*}
which are a combination of
Lemma \ref{lemma-adjointness-tensor-restrict}
and \ref{lemma-adjoint-push-pull-modules}.
\end{proof}
\noindent
Let $f : X \to Y$ be a continuous map.
Let $\mathcal{O}_X$ be a (pre)sheaf of rings on $X$ and
let $\mathcal{O}_Y$ be a (pre)sheaf of rings on $Y$.
So at the moment we have defined functors
\begin{eqnarray*}
f_* : \textit{PMod}(\mathcal{O}_X) &
\longrightarrow &
\textit{PMod}(f_*\mathcal{O}_X) \\
f_* : \textit{Mod}(\mathcal{O}_X) &
\longrightarrow &
\textit{Mod}(f_*\mathcal{O}_X) \\
f_p : \textit{PMod}(\mathcal{O}_Y) &
\longrightarrow &
\textit{PMod}(f_p\mathcal{O}_Y) \\
f^{-1} : \textit{Mod}(\mathcal{O}_Y) &
\longrightarrow &
\textit{Mod}(f^{-1}\mathcal{O}_Y)
\end{eqnarray*}
Clearly, usually the pair of functors $(f_*, f^{-1})$
on sheaves of modules are not adjoint, because their target categories
do not match. Namely, as we saw above, it works only if by some miracle the
sheaves of rings $\mathcal{O}_X, \mathcal{O}_Y$ satisfy the
relations $\mathcal{O}_X = f^{-1}\mathcal{O}_Y$ and
$\mathcal{O}_Y = f_*\mathcal{O}_X$. This is almost never
true in practice. We interrupt the discussion to define
the correct notion of morphism for which a suitable adjoint
pair of functors on sheaves of modules exists.
\section{Ringed spaces}
\label{section-ringed-spaces}
\noindent
Let $X$ be a topological space and let $\mathcal{O}_X$
be a sheaf of rings on $X$. We are supposed to
think of the sheaf of rings $\mathcal{O}_X$ as a sheaf of functions
on $X$. And if $f : X \to Y$ is a ``suitable'' map, then by composition
a function on $Y$ turns into a function on $X$.
Thus there should be a natural
$f$-map from $\mathcal{O}_Y$ to $\mathcal{O}_X$
See Definition \ref{definition-f-map}, and the remarks in
previous sections for terminology. For a precise example, see
Example \ref{example-continuous-map-ringed} below. Here is the
relevant abstract definition.
\begin{definition}
\label{definition-ringed-space}
A {\it ringed space} is a pair $(X, \mathcal{O}_X)$ consisting
of a topological space $X$ and a sheaf of rings $\mathcal{O}_X$
on $X$. A {\it morphism of ringed spaces}
$(X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$ is a pair
consisting of a continuous map $f : X \to Y$ and an
$f$-map of sheaves of rings
$f^\sharp : \mathcal{O}_Y \to \mathcal{O}_X$.
\end{definition}
\begin{example}
\label{example-continuous-map-ringed}
Let $f : X \to Y$ be a continuous map of topological spaces.
Consider the sheaves of continuous real valued functions
$\mathcal{C}^0_X$ on $X$ and $\mathcal{C}^0_Y$ on $Y$,
see Example \ref{example-C0-sheaf-rings}. We claim that there
is a natural $f$-map $f^\sharp : \mathcal{C}^0_Y \to \mathcal{C}^0_X$
associated to $f$. Namely, we simply define it by the
rule
\begin{eqnarray*}
\mathcal{C}^0_Y(V) & \longrightarrow & \mathcal{C}^0_X(f^{-1}V) \\
h & \longmapsto & h \circ f
\end{eqnarray*}
Strictly speaking we should write $f^\sharp(h) = h \circ f|_{f^{-1}(V)}$.
It is clear that this is a family of maps as in
Definition \ref{definition-f-map} and compatible with the $\mathbf{R}$-algebra
structures. Hence it is an $f$-map of sheaves of $\mathbf{R}$-algebras, see
Lemma \ref{lemma-f-map-sets-algebraic-structures}.
\medskip\noindent
Of course there are lots of other situations where there is
a canonical morphism of ringed spaces associated to a geometrical
type of morphism. For example, if $M$, $N$ are $\mathcal{C}^\infty$-manifolds
and $f : M \to N$ is a infinitely differentiable map, then
$f$ induces a canonical morphism of ringed spaces
$(M, \mathcal{C}_M^\infty) \to (N, \mathcal{C}^\infty_N)$.
The construction (which is identical to the above) is left
to the reader.
\end{example}
\noindent
It may not be completely obvious how to compose morphisms of
ringed spaces hence we spell it out here.
\begin{definition}
\label{definition-composition-maps-ringed-spaces}
Let
$(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$ and
$(g, g^\sharp) : (Y, \mathcal{O}_Y) \to (Z, \mathcal{O}_Z)$
be morphisms of ringed spaces. Then we define
the {\it composition of morphisms of ringed spaces}
by the rule
$$
(g, g^\sharp) \circ (f, f^\sharp) = (g \circ f, f^\sharp \circ g^\sharp).
$$
Here we use composition of $f$-maps defined in
Definition \ref{definition-composition-f-maps}.
\end{definition}
\section{Morphisms of ringed spaces and modules}
\label{section-ringed-spaces-functoriality-modules}
\noindent
We have now introduced enough notation so that we are able to
define the pullback and pushforward of modules along a morphism
of ringed spaces.
\begin{definition}
\label{definition-pushforward}
Let $(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
be a morphism of ringed spaces.
\begin{enumerate}
\item Let $\mathcal{F}$ be a sheaf of $\mathcal{O}_X$-modules.
We define the {\it pushforward} of $\mathcal{F}$ as the
sheaf of $\mathcal{O}_Y$-modules which as a sheaf
of abelian groups equals $f_*\mathcal{F}$ and with
module structure given by the restriction
via $f^\sharp : \mathcal{O}_Y \to f_*\mathcal{O}_X$
of the module structure given
in Lemma \ref{lemma-pushforward-module}.
\item Let $\mathcal{G}$ be a sheaf of $\mathcal{O}_Y$-modules.
We define the {\it pullback} $f^*\mathcal{G}$ to be the
sheaf of $\mathcal{O}_X$-modules defined by the formula
$$
f^*\mathcal{G}
=
\mathcal{O}_X \otimes_{f^{-1}\mathcal{O}_Y} f^{-1}\mathcal{G}
$$
where the ring map $f^{-1}\mathcal{O}_Y \to \mathcal{O}_X$
is the map corresponding to $f^\sharp$, and where the module
structure is given by Lemma \ref{lemma-pullback-module}.
\end{enumerate}
\end{definition}
\noindent
Thus we have defined functors
\begin{eqnarray*}
f_* : \textit{Mod}(\mathcal{O}_X)
& \longrightarrow &
\textit{Mod}(\mathcal{O}_Y) \\
f^* : \textit{Mod}(\mathcal{O}_Y)
& \longrightarrow &
\textit{Mod}(\mathcal{O}_X)
\end{eqnarray*}
The final result on these functors is that they are indeed
adjoint as expected.
\begin{lemma}
\label{lemma-adjoint-pullback-pushforward-modules}
Let $(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
be a morphism of ringed spaces.
Let $\mathcal{F}$ be a sheaf of $\mathcal{O}_X$-modules.
Let $\mathcal{G}$ be a sheaf of $\mathcal{O}_Y$-modules.
There is a canonical bijection
$$
\Hom_{\mathcal{O}_X}(f^*\mathcal{G}, \mathcal{F})
=
\Hom_{\mathcal{O}_Y}(\mathcal{G}, f_*\mathcal{F}).
$$
In other words: the functor $f^*$ is the left adjoint to
$f_*$.
\end{lemma}
\begin{proof}
This follows from the work we did before:
\begin{eqnarray*}
\Hom_{\mathcal{O}_X}(f^*\mathcal{G}, \mathcal{F})
& = &
\Mor_{\textit{Mod}(\mathcal{O}_X)}(
\mathcal{O}_X \otimes_{f^{-1}\mathcal{O}_Y} f^{-1}\mathcal{G}, \mathcal{F}) \\
& = &
\Mor_{\textit{Mod}(f^{-1}\mathcal{O}_Y)}(
f^{-1}\mathcal{G}, \mathcal{F}_{f^{-1}\mathcal{O}_Y}) \\
& = &
\Hom_{\mathcal{O}_Y}(\mathcal{G}, f_*\mathcal{F}).
\end{eqnarray*}
Here we use Lemmas \ref{lemma-adjointness-tensor-restrict}
and \ref{lemma-adjoint-push-pull-modules}.
\end{proof}
\begin{lemma}
\label{lemma-push-pull-composition-modules}
Let $f : X \to Y$ and $g : Y \to Z$ be morphisms of ringed spaces.
The functors $(g \circ f)_*$ and $g_* \circ f_*$ are equal.
There is a canonical isomorphism of functors
$(g \circ f)^* \cong f^* \circ g^*$.
\end{lemma}
\begin{proof}
The result on pushforwards is a consequence of Lemma
\ref{lemma-pushforward-composition} and our definitions.
The result on pullbacks follows from this by the same
argument as in the proof of Lemma \ref{lemma-pullback-composition}.
\end{proof}
\noindent
Given a morphism of ringed spaces
$(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$,
and a sheaf of $\mathcal{O}_X$-modules $\mathcal{F}$,
a sheaf of $\mathcal{O}_Y$-modules $\mathcal{G}$ on $Y$,
the notion of an {\it $f$-map $\varphi : \mathcal{G} \to \mathcal{F}$
of sheaves of modules} makes sense. We can just define
it as an $f$-map $\varphi : \mathcal{G} \to \mathcal{F}$
of abelian sheaves such that for all open $V \subset Y$ the map
$$
\mathcal{G}(V) \longrightarrow \mathcal{F}(f^{-1}V)
$$
is an $\mathcal{O}_Y(V)$-module map. Here we think of
$\mathcal{F}(f^{-1}V)$ as an $\mathcal{O}_Y(V)$-module
via the map $f^\sharp_V : \mathcal{O}_Y(V) \to \mathcal{O}_X(f^{-1}V)$.
The set of $f$-maps between
$\mathcal{G}$ and $\mathcal{F}$ will be in canonical bijection
with the sets
$\Mor_{\textit{Mod}(\mathcal{O}_X)}(f^*\mathcal{G}, \mathcal{F})$
and
$\Mor_{\textit{Mod}(\mathcal{O}_Y)}(\mathcal{G}, f_*\mathcal{F})$.
See above.
\medskip\noindent
Composition of $f$-maps is defined in exactly the
same manner as in the case of $f$-maps of sheaves of
sets. In addition, given an $f$-map $\mathcal{G} \to \mathcal{F}$
as above, and $x \in X$ the induced map on stalks
$$
\varphi_x : \mathcal{G}_{f(x)} \longrightarrow \mathcal{F}_x
$$
is an $\mathcal{O}_{Y, f(x)}$-module map where the
$\mathcal{O}_{Y, f(x)}$-module structure on $\mathcal{F}_x$
comes from the $\mathcal{O}_{X, x}$-module structure via
the map $f^\sharp_x : \mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$.
Here is a related lemma.
\begin{lemma}
\label{lemma-stalk-pullback-modules}
Let $(f, f^\sharp) : (X, \mathcal{O}_X) \to (Y, \mathcal{O}_Y)$
be a morphism of ringed spaces.
Let $\mathcal{G}$ be a sheaf of $\mathcal{O}_Y$-modules.
Let $x \in X$. Then
$$
(f^*\mathcal{G})_x =
\mathcal{G}_{f(x)}
\otimes_{\mathcal{O}_{Y, f(x)}}
\mathcal{O}_{X, x}
$$
as $\mathcal{O}_{X, x}$-modules where the tensor product on the right
uses $f^\sharp_x : \mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$.
\end{lemma}
\begin{proof}
This follows from Lemma \ref{lemma-stalk-tensor-sheaf-modules}
and the identification of the stalks of pullback sheaves
at $x$ with the corresponding stalks at $f(x)$. See the
formulae in Section \ref{section-presheaves-structures-functorial}
for example.
\end{proof}
\section{Skyscraper sheaves and stalks}
\label{section-skyscraper-sheaves}
\begin{definition}
\label{definition-skyscraper-sheaf}
Let $X$ be a topological space.
\begin{enumerate}
\item Let $x \in X$ be a point. Denote $i_x : \{x\} \to X$ the inclusion map.
Let $A$ be a set and think of $A$ as a sheaf on the one point space $\{x\}$.
We call $i_{x, *}A$ the {\it skyscraper sheaf at $x$ with value $A$}.
\item If in (1) above $A$ is an abelian group then we think of
$i_{x, *}A$ as a sheaf of abelian groups on $X$.
\item If in (1) above $A$ is an algebraic structure then we think
of $i_{x, *}A$ as a sheaf of algebraic structures.
\item If $(X, \mathcal{O}_X)$ is a ringed space, then we think
of $i_x : \{x\} \to X$ as a morphism of ringed spaces
$(\{x\}, \mathcal{O}_{X, x}) \to (X, \mathcal{O}_X)$
and if $A$ is a $\mathcal{O}_{X, x}$-module, then we think
of $i_{x, *}A$ as a sheaf of $\mathcal{O}_X$-modules.
\item We say a sheaf of sets $\mathcal{F}$ is a {\it skyscraper sheaf}
if there exists an point $x$ of $X$ and a set $A$ such
that $\mathcal{F} \cong i_{x, *}A$.
\item We say a sheaf of abelian groups $\mathcal{F}$ is a
{\it skyscraper sheaf} if there exists an point $x$ of $X$
and an abelian group $A$ such that $\mathcal{F} \cong i_{x, *}A$
as sheaves of abelian groups.
\item We say a sheaf of algebraic structures $\mathcal{F}$ is a
{\it skyscraper sheaf} if there exists an point $x$ of $X$
and an algebraic structure $A$ such that $\mathcal{F} \cong i_{x, *}A$
as sheaves of algebraic structures.
\item If $(X, \mathcal{O}_X)$ is a ringed space and
$\mathcal{F}$ is a sheaf of $\mathcal{O}_X$-modules, then
we say $\mathcal{F}$ is a {\it skyscraper sheaf} if there
exists a point $x \in X$ and a $\mathcal{O}_{X, x}$-module
$A$ such that $\mathcal{F} \cong i_{x, *}A$
as sheaves of $\mathcal{O}_X$-modules.
\end{enumerate}
\end{definition}
\begin{lemma}
\label{lemma-skyscraper-stalks}
Let $X$ be a topological space, $x \in X$ a point, and
$A$ a set. For any point $x' \in X$ the stalk of the
skyscraper sheaf at $x$ with value $A$ at $x'$ is
$$
(i_{x, *}A)_{x'} =
\left\{
\begin{matrix}
A & \text{if} & x' \in \overline{\{x\}} \\
\{*\} & \text{if} & x' \not\in \overline{\{x\}}
\end{matrix}
\right.
$$
A similar description holds for the case of
abelian groups, algebraic structures and
sheaves of modules.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-stalk-skyscraper-adjoint}
Let $X$ be a topological space, and let $x \in X$ a point.
The functors $\mathcal{F} \mapsto \mathcal{F}_x$ and
$A \mapsto i_{x, *}A$ are adjoint. In a formula
$$
\Mor_{\textit{Sets}}(\mathcal{F}_x, A)
=
\Mor_{\Sh(X)}(\mathcal{F}, i_{x, *}A).
$$
A similar statement holds for the case of
abelian groups, algebraic structures. In the case of
sheaves of modules we have
$$
\Hom_{\mathcal{O}_{X, x}}(\mathcal{F}_x, A)
=
\Hom_{\mathcal{O}_X}(\mathcal{F}, i_{x, *}A).
$$
\end{lemma}
\begin{proof}
Omitted. Hint: The stalk functor can be
seen as the pullback functor for the morphism $i_x : \{x\} \to X$.
Then the adjointness follows from adjointness of
$i_x^{-1}$ and $i_{x, *}$ (resp.\ $i_x^*$ and $i_{x, *}$
in the case of sheaves of modules).
\end{proof}
\section{Limits and colimits of presheaves}
\label{section-limits-presheaves}
\noindent
Let $X$ be a topological space.
Let $\mathcal{I} \to \textit{PSh}(X)$, $i \mapsto \mathcal{F}_i$
be a diagram.
\begin{enumerate}
\item Both $\lim_i \mathcal{F}_i$ and $\colim_i \mathcal{F}_i$
exist.
\item For any open $U \subset X$ we have
$$
(\lim_i \mathcal{F}_i)(U) =
\lim_i \mathcal{F}_i(U)
$$
and
$$
(\colim_i \mathcal{F}_i)(U) =
\colim_i \mathcal{F}_i(U).
$$
\item Let $x \in X$ be a point. In general the stalk of
$\lim_i \mathcal{F}_i$ at $x$ is not equal to
the limit of the stalks. But if the diagram category is finite
then it is the case. In other words, the stalk functor is
left exact (see Categories, Definition \ref{categories-definition-exact}).
\item Let $x \in X$. We always have
$$
(\colim_i \mathcal{F}_i)_x =
\colim_i \mathcal{F}_{i, x}.
$$
\end{enumerate}
The proofs are all easy.
\section{Limits and colimits of sheaves}
\label{section-limits-sheaves}
\noindent
Let $X$ be a topological space.
Let $\mathcal{I} \to \Sh(X)$, $i \mapsto \mathcal{F}_i$
be a diagram.
\begin{enumerate}
\item Both $\lim_i \mathcal{F}_i$ and $\colim_i \mathcal{F}_i$
exist.
\item The inclusion functor $i : \Sh(X) \to \textit{PSh}(X)$
commutes with limits. In other words, we may compute the limit
in the category of sheaves as the limit in the category of
presheaves. In particular, for any open $U \subset X$ we have
$$
(\lim_i \mathcal{F}_i)(U) = \lim_i \mathcal{F}_i(U).
$$
\item The inclusion functor $i : \Sh(X) \to \textit{PSh}(X)$
does not commute with colimits in general (not even
with finite colimits -- think surjections). The colimit is
computed as the sheafification of the colimit in the
category of presheaves:
$$
\colim_i \mathcal{F}_i =
\Big(U \mapsto \colim_i \mathcal{F}_i(U)\Big)^\#.
$$
\item Let $x \in X$ be a point. In general the stalk of
$\lim_i \mathcal{F}_i$ at $x$ is not equal to
the limit of the stalks. But if the diagram category is finite
then it is the case. In other words, the stalk functor is
left exact.
\item Let $x \in X$. We always have
$$
(\colim_i \mathcal{F}_i)_x = \colim_i \mathcal{F}_{i, x}.
$$
\item The sheafification functor
${}^\# : \textit{PSh}(X) \to \Sh(X)$ commutes with all
colimits, and with finite limits. But it does not commute
with all limits.
\end{enumerate}
The proofs are all easy. Here is an example of what is true for directed
colimits of sheaves.
\begin{lemma}
\label{lemma-directed-colimits-sections}
Let $X$ be a topological space. Let $I$ be a directed set.
Let $(\mathcal{F}_i, \varphi_{ii'})$ be a system of sheaves of sets
over $I$, see
Categories, Section \ref{categories-section-posets-limits}.
Let $U \subset X$ be an open subset.
Consider the canonical map
$$
\Psi :
\colim_i \mathcal{F}_i(U)
\longrightarrow
\left(\colim_i \mathcal{F}_i\right)(U)
$$
\begin{enumerate}
\item If all the transition maps are injective then
$\Psi$ is injective for any open $U$.
\item If $U$ is quasi-compact, then $\Psi$ is injective.
\item If $U$ is quasi-compact and all the transition maps are injective
then $\Psi$ is an isomorphism.
\item If $U$ has a cofinal system of open coverings
$\mathcal{U} : U = \bigcup_{j\in J} U_j$ with
$J$ finite and $U_j \cap U_{j'}$ quasi-compact
for all $j, j' \in J$, then $\Psi$ is bijective.
\end{enumerate}
\end{lemma}
\begin{proof}
Assume all the transition maps are injective. In this case the presheaf
$\mathcal{F}' : V \mapsto \colim_i \mathcal{F}_i(V)$ is
separated (see Definition \ref{definition-separated}).
By the discussion above we have
$(\mathcal{F}')^\# = \colim_i \mathcal{F}_i$.
By Lemma \ref{lemma-separated-presheaf-into-sheaf} we see that
$\mathcal{F}' \to (\mathcal{F}')^\#$ is injective. This proves (1).
\medskip\noindent
Assume $U$ is quasi-compact.
Suppose that $s \in \mathcal{F}_i(U)$ and
$s' \in \mathcal{F}_{i'}(U)$ give rise to elements on
the left hand side which have the same image under $\Psi$.
Since $U$ is quasi-compact this means there exists
a finite open covering $U = \bigcup_{j = 1, \ldots, m} U_j$
and for each $j$ an index $i_j \in I$, $i_j \geq i$, $i_j \geq i'$
such that $\varphi_{ii_j}(s) = \varphi_{i'i_j}(s')$.
Let $i''\in I$ be $\geq$ than all of the $i_j$.
We conclude that $\varphi_{ii''}(s)$ and $\varphi_{i'i''}(s)$
agree on the opens $U_j$ for all $j$ and hence that
$\varphi_{ii''}(s) = \varphi_{i'i''}(s)$. This proves (2).
\medskip\noindent
Assume $U$ is quasi-compact and all transition maps injective.
Let $s$ be an element of the target of $\Psi$.
Since $U$ is quasi-compact
there exists a finite open covering $U = \bigcup_{j = 1, \ldots, m} U_j$,
for each $j$ an index $i_j \in I$ and $s_j \in \mathcal{F}_{i_j}(U_j)$
such that $s|_{U_j}$ comes from $s_j$ for all $j$.
Pick $i \in I$ which is $\geq$ than all of the $i_j$.
By (1) the sections $\varphi_{i_ji}(s_j)$ agree over the
overlaps $U_j \cap U_{j'}$. Hence they glue to a section
$s' \in \mathcal{F}_i(U)$ which maps to $s$ under $\Psi$.
This proves (3).
\medskip\noindent
Assume the hypothesis of (4).
Let $s$ be an element of the target of $\Psi$.
By assumption there exists a finite open covering
$U = \bigcup_{j = 1, \ldots, m} U_j$, with $U_j \cap U_{j'}$
quasi-compact for all $j, j' \in J$ and
for each $j$ an index $i_j \in I$ and $s_j \in \mathcal{F}_{i_j}(U_j)$
such that $s|_{U_j}$ is the image of $s_j$ for all $j$.
Since $U_j \cap U_{j'}$ is quasi-compact we can apply (2)
and we see that there exists an $i_{jj'} \in I$,
$i_{jj'} \geq i_j$, $i_{jj'} \geq i_{j'}$ such that
$\varphi_{i_ji_{jj'}}(s_j)$ and $\varphi_{i_{j'}i_{jj'}}(s_{j'})$
agree over $U_j \cap U_{j'}$. Choose an index $i \in I$
wich is bigger or equal than all the $i_{jj'}$. Then we see that
the sections $\varphi_{i_ji}(s_j)$ of $\mathcal{F}_i$ glue
to a section of $\mathcal{F}_i$ over $U$. This section is mapped
to the element $s$ as desired.
\end{proof}
\begin{example}
\label{example-conditions-needed-colimit}
Let $X = \{s_1, s_2, \xi_1, \xi_2, \xi_3, \ldots\}$ as a set.
Declare a subset $U \subset X$ to be open
if $s_1 \in U$ or $s_2 \in U$ implies $U$ contains all of the
$\xi_i$. Let $U_n = \{\xi_n, \xi_{n + 1}, \ldots\}$, and
let $j_n : U_n \to X$ be the inclusion map.
Set $\mathcal{F}_n = j_{n, *}\underline{\mathbf{Z}}$.
There are transition maps $\mathcal{F}_n \to \mathcal{F}_{n + 1}$.
Let $\mathcal{F} = \colim \mathcal{F}_n$.
Note that $\mathcal{F}_{n, \xi_m} = 0$ if $m < n$
because $\{\xi_m\}$ is an open subset of $X$ which misses $U_n$.
Hence we see that $\mathcal{F}_{\xi_n} = 0$ for all $n$.
On the other hand the stalk $\mathcal{F}_{s_i}$, $i = 1, 2$
is the colimit
$$
M = \colim_n \prod\nolimits_{m \geq n} \mathbf{Z}
$$
which is not zero. We conclude that the sheaf
$\mathcal{F}$ is the direct sum of the
skyscraper sheaves with value $M$ at the closed points
$s_1$ and $s_2$. Hence $\Gamma(X, \mathcal{F}) = M \oplus M$.
On the other hand, the reader can verify that
$\colim_n \Gamma(X, \mathcal{F}_n) = M$.
Hence some condition is necessary in part (4)
of Lemma \ref{lemma-directed-colimits-sections} above.
\end{example}
\noindent
There is a version of the previous lemma dealing with sheaves on a diagram
of spectral spaces. To state it we introduce some notation.
Let $\mathcal{I}$ be a cofiltered index category.
Let $i \mapsto X_i$ be a diagram of spectral spaces over $\mathcal{I}$
such that for $a : j \to i$ in $\mathcal{I}$ the corresponding map
$f_a : X_j \to X_i$ is spectral. Set $X = \lim X_i$ and denote
$p_i : X \to X_i$ the projection.
\begin{lemma}
\label{lemma-compute-pullback-to-limit}
In the situation described above, let $i \in \Ob(\mathcal{I})$ and let
$\mathcal{G}$ be a sheaf on $X_i$. For $U_i \subset X_i$
quasi-compact open we have
$$
p_i^{-1}\mathcal{G}(p_i^{-1}(U_i)) =
\colim_{a : j \to i} f_a^{-1}\mathcal{G}(f_a^{-1}(U_i))
$$
\end{lemma}
\begin{proof}
Let us prove the canonical map
$\colim_{a : j \to i} f_a^{-1}\mathcal{G}(f_a^{-1}(U_i)) \to
p_i^{-1}\mathcal{G}(p_i^{-1}(U_i))$ is injective.
Let $s, s'$ be sections of $f_a^{-1}\mathcal{G}$
over $f_a^{-1}(U_i)$ for some $a : j \to i$. For
$b : k \to j$ let $Z_k \subset f_{a \circ b}^{-1}(U_i)$
be the closed subset of points $x$ such that the image of
$s$ and $s'$ in the stalk $(f_{a \circ b}^{-1}\mathcal{G})_x$
are different. If $Z_k$ is nonempty for all $b : k \to j$, then by
Topology, Lemma \ref{topology-lemma-inverse-limit-spectral-spaces-nonempty}
we see that $\lim_{b : k \to j} Z_k$ is nonempty too.
Then for $x \in \