# restriction map in a Sheaf of $\mathcal{O}_X$ modules

Let $R$ be a commutative ring with identity and $M$ be an $R$-module. I have trouble understanding the restriction map in the definition of the sheaf of $\mathcal{O}_X$ modules. Explicitly, let $f,g\in R$ s.t. $D(g)\subseteq D(f)$, then what is the map $M_f\to M_g$. My main difficulty is understanding what kind of module homomorphism to expect, since the left hand side module is over $R_f$ while the one on the right is over $R_g$. Most books I flipped through, said "it is defined similarly" referring to the definition of the restriction maps in the structure sheaf of Spec$R$

-
If $D(g) \subset D(f)$, then some power of $g$ is a multiple of $f$. That is due to the fact that the radical of an ideal, is precisely the intersection of all of the prime ideals containing it. Then the restriction map is just the localization map $R_f \to R_{fg} = R_g$. Take a look at the first chapter of "Geometry of Schemes", by Eisenbud and Harris.
I'm glad to help. Your intuition is not wrong, remember that a $R_f$-module is still an $R$ module, so no harm is done considering the localization map inside the category of $R$-modules. –  shamovic Mar 6 '11 at 17:32
@shamovic: Thanks. I considered that. However, in defining the sheaf of $\mathcal{O}_X$ modules, the books said that any open set $U$ is assigned an $\mathcal{O}_X$-module (so for instance, $M_f$ is considered as an $R_f$-module). So perhaps it's better to dispense with the idea of considering the presheaf as a functor in this case. –  Yan Etor Mar 6 '11 at 18:05
@Yan: The presheaf is a functor to the category of abelian groups. The $\mathcal O_X$-module structure is an additional structure, which says that $\mathcal M(U)$ is a module over $\mathcal O_X(U)$ (for each open set $U$) in a manner compatible with restriciton maps. –  Matt E Mar 6 '11 at 20:41
@Yan Etor: I guess that $\mathcal{O}_X$ is a functor to a more intricate category. It has objects $(R_f,M_f)$ where $M_f:R_f-module$ and morphisms $(r,m)$ where $r:R_f\to R_g, r^*:(R_g-module)\to (R_f-module), m:M_f\to r^*(M_g)$. This is a Grothendieck construction for the indexed category of rings and modules. The function $-^*$ comes from that indexed category. –  beroal Mar 6 '11 at 20:54