# Why doesn't Hom commute with taking stalks?

I have been learning about sheaves and am thinking about the following problem. Let $F$ and $G$ be sheaves, say of abelian groups, on a space $X$. The sheaf $Hom(F, G)$ is defined by $Hom(F, G)(U)=Mor(F|_U, G|_U)$. Given a point $p \in X$ and an open set $U$ containing $p$, a morphism $\varphi: F|_U \rightarrow G|_U$ induces a homomorphism on stalks $\phi: F_p \rightarrow G_p$, which is an element of $Hom(F_p, G_p)$. Thus, by the universal property of direct limits, we have a homomorphism from $Hom(F, G)_p$ to $Hom(F_p, G_p)$. However, this is not in general injective or surjective. Why not? An example or a hint leading towards an example would be much appreciated. I have thought about this for some simple sheaves (such as skyscraper sheaves), but it seems to be true in those cases.

I am also interested in a more general answer if there is one, i.e. something category theoretic about Hom and direct limits.

-
As a supplement to Anton's answer, the identity $Hom(F,G)_p = Hom(F_p,G_p)$ holds in certain general cases. Namely, if $X$ is an algebraic (or complex) variety, the sheaves are sheaves of $\mathcal O_X$-modules, and if $F$ is coherent, then this holds. It's a good exercise to prove this, a precise statement with hints is at the end of Chapter 2 of Demailly's book on complex geometry (available for free on his website). –  Gunnar Magnusson Jan 3 '11 at 14:37
Just to clarify (since this kind of thing confused me a lot in the past), the $Hom$ in @Gunnar's comment above is as $\mathcal O_X$-modules, not as abelian groups. If it were $Hom$ as abelian groups, you could take $F$ to be a coherent skyscraper sheaf and use my first example. –  Anton Geraschenko Jan 3 '11 at 18:27

Here's an answer to your call for examples. Take $p$ to be a non-isolated closed point in your favorite topological space $X$. Let $H$ be a non-trivial abelian group.

## $Hom(F,G)_p\to Hom(F_p,G_p)$ fails to be surjective

Let $G$ be the constant sheaf $H$, and let $F$ be the skyscraper sheaf at $p$ with stalk $H$. Then $Hom(F,G)$ is the zero sheaf: any section of $F$ is trivial away from $p$, so a homomorphism would take it to a section of $G$ which is trivial away from $p$, but any section of $G$ which is trivial away from $p$ must be trivial, so every section of $F$ must be taken to the trivial section of $G$. So $Hom(F,G)_p=0$, but $Hom(F_p,G_p)=Hom(H,H)\neq 0$.

## $Hom(F,G)_p\to Hom(F_p,G_p)$ fails to be injective

Let $V=X\setminus p$, and let $F=G$ be the extension by zero of the constant sheaf $H$ on $V$ (i.e. it's the constant sheaf $H$ on $V$ and $F(U)=0$ if $U\not\subseteq V$). Then $F_p=G_p=0$, but $Hom(F,G)(U)$ contains a natural copy of $Hom(H,H)\neq 0$ for any $U$, so $Hom(F,G)_p$ contains a natural copy of $Hom(H,H)\neq 0$, so it's not zero.

-
Thanks, this was very helpful! –  Vitaly Lorman Jan 3 '11 at 20:00
For the second example, how come $Hom(F,G)(U)$ contains a natural copy of $Hom(H,H)$ for all $U$? Isn't $Hom(F,G)(U) = \mathrm{Hom}(F(U),G(U)) = \mathrm{Hom}(0,0) = 0$ if $p\in U$? –  maxymoo Mar 4 '11 at 4:59
@maxymoo: no, $Hom(F,G)(U)=Hom(F|_U,G|_U)$, which is not the same as $Hom(F(U),G(U))$. –  Anton Geraschenko Mar 4 '11 at 16:09
ah yes, an element of "sheaf hom" i.e. a sheaf morphism is a collection of morphisms, one for each open set. –  maxymoo Mar 4 '11 at 22:10
For instance, the following deduction is valid: $Hom(F_p,G_p)\cong Hom(colim_{p\in U}F(U),G_p)\cong lim_{p\in U}Hom(F(U),G_p)$. However, this looks like a very different mathematical object than the one you mentioned. Assuming, for the sake of argument, that $F(U)$ is finitely presented for all $U$, we can pull the colimit out front as well, but this doesn't really get us any closer to our stated goal.