Functoriality and inverse images of sheaves I'm now learning sheaf theory from Gortz and Wedhorn's Algbraic Geometry 1 - Schemes and trying to understand the direct image and the inverse image of sheaves.
In the book, the authors said that

...... Again the construction of $f^{+}\mathcal{G}$ and hence of $f^{-1} \mathcal{G}$ is functorial in $\mathcal{G}$. Therefore we obtain a functor $f^{-1}$ from the category of presheaves on $Y$ to the category of sheaves on $X$.......

Now let me clarify the notations. In the quoted sentences, $f: X \rightarrow Y$ is a continuous map and $\mathcal{G}$ is a presheaf of $Y$. A presheaf on $X$ is defined by
$$
U \mapsto \mathrm{colim}_{V \supset f(U), V \subset Y \,  \text{open}}  \mathcal{G}(V)
$$
and the restriction maps are induced by the restriction maps of $\mathcal{G}$. We denote this presheaf by $f^{+}\mathcal{G}$, and the sheafification of it by $f^{-1}\mathcal{G}$. This is the inverse image of $\mathcal{G}$ under $f$.
My question is: What does the word "functorial" mean in the quoted sentences?
I have looked up the book Categories for the Working Mathematician by Mac Lane, and only find the definition of natural when discussing natural transformations. It seems that this is the same as the word functorial? Actually I'm lost in checking from the definition and finding what I need to verify (to show that $f^{-1} \mathcal{G}$ is functorial in $\mathcal{G}$).
I've read the question and answers on What exactly is functoriality? but still feeling hard to find out what to check.
Thank you for your helps!
 A: Since you already know what a presheaf is, it may be convenient for you to see why a presheaf is a functor. Basically it amounts to the existence of restriction maps and certain conditions on them.
Take a presheaf of sets $F$ on your topological space $X$.
The condition of being a presheaf is that:

*

*For any open set $U$ you get a set $FU$.

*Given open sets $U\subseteq V$ you obtain a restriction function $\rho^V_U:FV\to FU$.

*For any open $U$, the restriction map $\rho^U_U$ is the identity function on $FU$.

*For open sets $U\subseteq V\subseteq W$ you have $\rho^W_U=\rho^V_U\circ\rho^W_V$.

These four conditions are exactly the conditions that "$FU$ is functorial on the open sets $U$".
Writing $i^U_V:U\to V$ for the inclusion of $U$ into $V$, one could denote the corresponding restriction function as $\rho^V_U=F(i^U_V)$.
Denoting the category of open sets of $X$ by $\text{Top}_X$ and the category of sets by $\text{Set}$, then $F$ is a functor $F:\text{Top}_X^{\text{op}}\to\text{Set}$. ($\text{op}$ because $\rho^V_U=F(i^U_V)$ goes "in the opposite direction" as $i^U_V$).
If you denote the categories of sheaves on $X$ and $Y$ by $\text{Sh}X$ and $\text{Sh}Y$, respectively, then for any continuous function $f:X\to Y$ you obtain a functor $f^{-1}:\text{Sh}Y\to\text{Sh}X$. Explicitly, this means that

*

*For any sheaf $G$ on $Y$ you get a sheaf $f^{-1}G$ on $X$.

*Given a morphism $\alpha:F\to G$ of sheaves on $Y$, you obtain a morphism $f^{-1}\alpha:f^{-1}F\to f^{-1}G$ of sheaves on $X$. (Note that here $f^{-1}\alpha$ goes "in the same direction" as $\alpha$).

*For any sheaf $G$ on $Y$, the morphism $f^{-1}(\text{id}_G):f^{-1}G\to f^{-1}G$ is the identity morphism on $f^{-1}G$.

*For morphisms $F\xrightarrow{\alpha} G\xrightarrow{\beta} H$ of sheaves on $Y$ you have $f^{-1}(\beta\circ\alpha)=(f^{-1}\beta)\circ(f^{-1}\alpha)$.

So you need to check the last 3 conditions on $f^{-1}$.
