# Injectivity of map on sheaves $f^\sharp : \mathcal{O}_X \to f_*\mathcal{O}_Y$. Hartshorne $2.18$.

Let $$\varphi : A \to B$$ be a homomorphism of rings, and let $$f: Y = \operatorname{Spec} B \to X = \operatorname{Spec} A$$ be the induced morphism of affine schemes. Show that $$\varphi$$ is injective if and only if the map of sheaves $$f^\sharp : \mathcal{O}_X \to f_* \mathcal{O}_Y$$ is injective.

Been having trouble with this for a while now. It is a problem from the book of Hartshorne.

If we start with assuming $$\varphi$$ to be injective, then in order to show that the map on sheaves is injective it is satisfactory to prove that the map on stalks $$f^\sharp_\mathfrak{p} : \mathcal{O}_{\operatorname{Spec}A, f(\mathfrak{p})} \to \mathcal{O}_{\operatorname{Spec}B, \mathfrak{p}}$$ is injective for $$\mathfrak{p} \in \operatorname{Spec} B$$.

Now few remarks here. I've noticed that $$\mathcal{O}_{\operatorname{Spec}A, f(\mathfrak{p})} = A_{f(\mathfrak{p})}$$ and that $$\mathcal{O}_{\operatorname{Spec}B, \mathfrak{p}} = B_\mathfrak{p}$$ . We also have that $$f(\mathfrak{p})=\varphi^{-1}(\mathfrak{p})$$ so in essence we are trying to show that $$A_{\varphi^{-1}(\mathfrak{p})} \to B_\mathfrak{p}$$ is injective given that $$\varphi$$ is.

The issue comes here since apparently this is not true. Here is a link to a thread here which shows that there is a counterexample. It's likely that I'm doing something wrong here, but I cannot figure out what so any help is welcome.

• You're making a misconception that the stalks of $(f_*\mathcal{O}_Y)$ coincide with the stalks of $\mathcal{O}_Y$. Commented Apr 25, 2023 at 19:18

As I said in the comment, you are thinking that the stalks of $$f_*\mathcal{O}_Y$$ coincide with the stalks of $$\mathcal{O}_Y$$. This is cleary not true in general since direct image functor is not exact unless you assume that $$Y \longrightarrow X$$ is an immersion.

Let $$\mathfrak{p} \in \operatorname{Spec}(A)$$ be an arbitrary point, of courser we shall check that the corresponding morphism $$A_{\mathfrak{p}} \longrightarrow (f_*\mathcal{O}_Y)_{\mathfrak{p}}.$$ The problem is to compute the RHS. It can be done as follows. $$(f_*\mathcal{O}_Y)_{\mathfrak{p}} = \operatorname{colim}_{\mathfrak{p} \in U} \mathcal{O}_Y(f^{-1}(U)) = \operatorname{colim}_{\mathfrak{p} \in D(g)} \mathcal{O}_Y(f^{-1}(D(g))) = (A \setminus \mathfrak{p})^{-1}B,$$ where $$(A\setminus \mathfrak{p})$$ is viewed as a multiplicative set in $$B$$ via $$\varphi$$. To clarify this computation:

• The first equality follows from definition.
• The second equality follows from the fact that distinguished open sets form a basis of Zariski topology.
• The last one is a consequence of the fact that $$f^{-1}(D(g))= D(\varphi(g))$$ (can you prove this?)

By an abuse of notation, we can assume that $$A \subset B$$ since $$\varphi$$ is injective. So we have reduced the question to proving the canonical morphism $$A_{\mathfrak{p}} \longrightarrow (A\setminus \mathfrak{p})^{-1}B \ \ \ \ \frac{a}{s} \longmapsto \frac{a}{s}$$ is injective. This should be obvious.

Since you seem to be confused about stalks. I would say that the stalks we are taking, i.e. $$\mathcal{O}_{X,\mathfrak{p}} \longrightarrow (f_*\mathcal{O}_Y)_{\mathfrak{p}}$$ is completely different from the ones $$\mathcal{O}_{X,f(\mathfrak{q})} \longrightarrow \mathcal{O}_{Y,\mathfrak{q}}$$ coming from the definition of a morphism of locally ringed spaces (for which we require them to be local maps). The first one is obtained by taking stalks of two sheaves $$\mathcal{O}_X$$ and $$f_*\mathcal{O}_Y$$ which are both sheaves on $$X$$ so you can only speak about stalks of points of $$X$$. Another point is that the morphisms $$\mathcal{O}_{X,\mathfrak{p}} \longrightarrow (f_*\mathcal{O}_Y)_{\mathfrak{p}}$$ exist beforehand at the level of sheaves while $$\mathcal{O}_{X,f(\mathfrak{q})} \longrightarrow \mathcal{O}_{Y,\mathfrak{q}}$$ do not come from a morphism of sheaves.

In fact, the second one is obtained from the first one by $$$$\begin{split}\mathcal{O}_{X,f(\mathfrak{q})} = \operatorname{colim}_{f(\mathfrak{q}) \in U} \mathcal{O}_X(U) = & \longrightarrow \operatorname{colim}_{\mathfrak{q} \in f^{-1}(U)} \mathcal{O}_Y(f^{-1}(U)) = (f_*\mathcal{O}_Y)_{f(\mathfrak{q})} \\ & \longrightarrow \operatorname{colim}_{\mathfrak{q} \in V}\mathcal{O}_Y(V) = \mathcal{O}_{Y,\mathfrak{q}}.\end{split}$$$$ You can see that the second morphism is obtained by the universal property of colimits, or I can say that the indexing sets are different, one varies over open subsets of form $$f^{-1}(U)$$ and one varies over all open subsets.

• Could you clarify $\operatorname{colim}_{\mathfrak{p} \in D(g)} \mathcal{O}_Y(f^{-1}(D(g))) = (A \setminus \mathfrak{p})^{-1}B$? @alexey-do Commented Apr 25, 2023 at 19:43
• Also it's a bit confusing still how do you get $A_{\mathfrak{p}} \longrightarrow (f_*\mathcal{O}_Y)_{\mathfrak{p}}$ when this should actually be $$A_{f(\mathfrak{p})} \longrightarrow (f_*\mathcal{O}_Y)_{\mathfrak{p}}$$ for $\mathfrak{p} \in \operatorname{Spec} B$. @alexey-do Commented Apr 25, 2023 at 19:51
• @Laura I edited my answer for your first comment, for the second one you can rethink. Commented Apr 25, 2023 at 20:46
• In Hartshorne for a map $f: X \to Y$ he defines the induced map on stalks of the sheaf map $f^\sharp : \mathcal{O}_Y \to f_*\mathcal{O}_X$ as $$f^\sharp_x : \mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$$ for $x \in X$. In our case we have a map $Y \to X$ so shouldn't $\mathfrak{p}$ be in $Y = \operatorname{Spec} B$? @alexey-do Commented Apr 25, 2023 at 21:01
• @Laura I added a lot, hope it helps. Commented Apr 26, 2023 at 11:08

The sheaf $$f_* \mathcal{O}_{\mathrm{Spec} B}$$ is not the same as $$\mathcal{O}_{\mathrm{Spec} B}$$; these sheaves lie on different spaces. So there is some subtlety to taking a stalk of $$f_* \mathcal{O}_{\mathrm{Spec} B}$$: given a point $$P \in \mathrm{Spec} A$$ corresponding to a prime ideal $$\mathfrak{p}$$, the stalk of $$f_* \mathcal{O}_{\mathrm{Spec} B}$$ at $$P$$ is the ring $$S^{-1}B$$, where $$S = \varphi(A \setminus \mathfrak{p}) \subset B$$.

This is not localization at a prime of $$B$$! What you are really doing is treating $$B$$ as an $$A$$-module, and then localizing that $$A$$-module at a prime of $$A$$. The injectivity statement you want then follows from standard facts about localizing modules, rather than localizing two rings at different prime ideals.

• This makes sense and avoids the identification of the image of $\varphi$ with a subset of $B$, but still it seems that you are taking $P \in \operatorname{Spec} A$ instead of $P \in \mathrm{Spec} B$ which I think we should do? @cj-dowd Commented Apr 25, 2023 at 21:26
• @Laura The reason for this is that the sheaf $f_*\mathcal{O}_{Y}$ is a sheaf on the space $X$, so it is reasonable that localizing at a point in $X = \mathrm{Spec} A$ is related to the corresponding prime ideal of $A$. Alexey's answer explains why localizing by $\varphi(A \setminus \mathfrak{p})$ is the correct way of taking the stalk by using the definition of the stalk explicitly. Commented Apr 26, 2023 at 3:52
• I think we have $f_*\mathcal{O}_{Y}(U) = \mathcal{O}_{Y}(f^{-1}(U))$ so what do you mean by sheaf on $X$? I have not seen this type of consideration anywhere in Hartshorne where we look at the stalk map $f^\sharp_x : \mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$ for a point in the target of $f$. @cj-dowd Commented Apr 26, 2023 at 7:48