What is the inverse image of a sheaf Let $f : X \rightarrow Y$ be a continuous map of topological spaces and $\mathcal{G}$ a sheaf on $Y$.
What exactly is $f^{-1}\mathcal{G}$? It seems like we should be able to describe the sections $f^{-1}\mathcal{G}(U)$ over some open subset $U$ as equivalence classes of germs, but I get confused when I try and think what exactly the elements of $f^{-1}\mathcal{G}(U)$ are.
 A: Well, the definition is quite natural: To give a presheaf, you tell what its section are. So let $U$ be an open subset of $X$. Then
$$ f_{pre}^{-1}\mathcal G (U) := \lim_{V \supseteq f(U)} \mathcal G(V)$$
where $V$ ranges over the open subsets of $Y$ containing $f(U)$. The reason we have to get fancy and use limits, is that $f$ is not necessarily an open mapping. So what does this mean? Sections of $f_{pre}^{-1}\mathcal G(U)$ are equivalence classes $[s,V]$, where $[t,W] \sim [s,V]$ is there is some $U^\prime$ contained in both $V,W$ and containing $f(U)$ such that the restrictions of $s,t$ are equal in $U^\prime$. However, this is not a sheaf (if anyone has an example, where the sheaf properties fails, I'd be happy to see it), so we have to sheafify. But the essence is clear.
This is very technical, so lets see this for a few examples.


*

*If $f$ is the inclusion of a point $x$ in $Y$, $f:\{pt\} \to Y$, then $f^{-1}\mathcal G$ is just the stalk  $\mathcal G_x$.

*If $f$ is an open mapping (for example if $f$ is flat), then $f^{-1}\mathcal G (U)$ is just $\mathcal G (f(U))$.


Also: When dealing with coherent sheaves, one defines $f^\ast \mathcal F := f^{-1}\mathcal F \otimes _{f^{-1}\mathcal O_Y } \mathcal O_X$. In the affine case, this just corresponds to tensor products of the corresponding modules. I.e. if a $A \to B$ is induced by $\mathrm{Spec} B \to \mathrm{Spec} A$, and $\mathcal F= M^\sim$ is the sheaf associated to the $A$-module $M$, then $f^\ast \mathcal F$is just the sheaf associated to the $B$-module $M \otimes_A B$.
A note about sheafyfing: Sometimes a presheaf is not a sheaf, so one must sheafify. The sheafification is "just" the best approximation of $\mathcal F$ such that the stalks are the same. Thus $f^{-1}_{pre}\mathcal G$ and its sheafification $f^{-1}\mathcal G$ agrees for sufficiently small open sets.
A: @Fredrik
you ask for an example of a presheaf $\mathscr F = f_{pre}^{-1} (\mathscr G )$ which is not a sheaf:
Take a topological space $Y$, choose $X$ as two disjoint copies of $Y$ and set
$$f: X \longrightarrow Y$$
the canonical projection. Take $\mathscr G$ a sheaf on $Y$. For $V \subset Y$ open and $U := f^{-1}(V)$ we have $\mathscr F(U) = \mathscr G(V)$. On the other hand,
$$(f^{-1} \mathscr G) (U) := \mathscr F^{sh}(U)=\mathscr G(V) \times{} \mathscr G(V)$$
with the associated sheaf $\mathscr F^{sh}$.
Note. Due to comments changed coproduct to product.
A: It seems to me -- as a warning, I haven't written anything down -- that you could define $f^{-1}\mathscr{G}$ as follows. Over an open set $U \subset X$ a section is an element $(s_p)_{p \in U}$ of $\prod_{p \in U} \mathscr{G}_{f(p)}$ such that for each $p \in U$ there is a neighborhood $U' \subset U$ of $p$, an open set $V$ of $Y$ containing $f(U')$, and a section $t \in \mathscr{G}(V)$ such that $s_q = t_{f(q)}$ for $q \in U'$. This should just be a race through the definitions.
So that's not very deep, but on the other hand if you think of a sheaf as being given by its stalks and a rule for when a given collection of germs is compatible and actually comes from a section then it's very natural.
A: It is exactly what Hoot said. If you know the stalks then you just take the sheaf of sections, meaning locally compatible maps $s:U\rightarrow \coprod_{x\in U}\mathscr{F}_x$. In this case $\mathscr{F}_x=f^{-1}\mathscr{G}_x=\mathscr{G}_{f(x)}$. 
Another way of seeing this is by the Etalé Space of a presheaf. In general if $\mathscr{F}$ is a presheaf on $Y$ you can define $\mathscr{F}^\sharp=\coprod_{x\in Y}\mathscr{F}_x$ and a natural projection $\pi:\mathscr{F}^\sharp\rightarrow Y$ collapsing all points of $\mathscr{F}_x$ onto $x$. You can define a topology on $\mathscr{F}^\sharp$ that makes $\pi$ a local homeomorphism. A subset $W\subset \mathscr{F}^\sharp$ is open if $W=s(V)=\{s_x\in\mathscr{F}^\sharp\mid x\in V\}$ for some $V\subset Y$ open and $s\in \Gamma(V,\mathscr{F})$. Finally if $f^{-1}\mathscr{F}^\sharp$ is the topological pull-back of $\mathscr{F}^\sharp$ by $f:X\rightarrow Y$. This as set is just $\{(x,s)\in X\times\mathscr{F}^\sharp\mid f(x)=\pi(s)\}$. 
$$\begin{array}{ccc}
f^{-1}\mathscr{F}^\sharp&\rightarrow&\mathscr{F}^\sharp\\
\downarrow&&\downarrow\\
U&\rightarrow&Y
\end{array}$$
Finally you can see $f^{-1}\mathscr{F}(U)$ as $Hom_Y(U,\mathscr{F}^\sharp)$. So continuous maps from $U$ to $\mathscr{F}^\sharp$ that makes everything commute.
