Inverse image functor

In mathematics, specifically in algebraic topology and algebraic geometry, an inverse image functor is a contravariant construction of sheaves; here “contravariant” in the sense given a map formula_1, the inverse image functor is a functor from the category of sheaves on "Y" to the category of sheaves on "X". The direct image functor is the primary operation on sheaves, with the simplest definition. The inverse image exhibits some relatively subtle features.
Definition.
Suppose we are given a sheaf formula_2 on formula_3 and that we want to transport formula_2 to formula_5 using a continuous map formula_6. 
We will call the result the "inverse image" or pullback sheaf formula_7. If we try to imitate the direct image by setting 
for each open set formula_9 of formula_5, we immediately run into a problem: formula_11 is not necessarily open. The best we could do is to approximate it by open sets, and even then we will get a presheaf and not a sheaf. Consequently, we define formula_7 to be the sheaf associated to the presheaf:
For example, if formula_19 is just the inclusion of a point formula_20 of formula_3, then formula_22 is just the stalk of formula_23 at this point.
The restriction maps, as well as the functoriality of the inverse image follows from the universal property of direct limits.
When dealing with morphisms formula_6 of locally ringed spaces, for example schemes in algebraic geometry, one often works with sheaves of formula_25-modules, where formula_25 is the structure sheaf of formula_3. Then the functor formula_28 is inappropriate, because in general it does not even give sheaves of formula_29-modules. In order to remedy this, one defines in this situation for a sheaf of formula_30-modules formula_31 its inverse image by
Properties.
However, the morphisms formula_42 and formula_43 are "almost never" isomorphisms. 
For example, if formula_47 denotes the inclusion of a closed subset, the stalk of formula_48 at a point formula_49 is canonically isomorphic to formula_50 if formula_20 is in formula_52 and formula_53 otherwise. A similar adjunction holds for the case of sheaves of modules, replacing formula_54 by formula_55.