In Hartshorne P109 he defines a sheaf $\mathcal{F}$ of $O_X$-modules to be locally free if there is an open cover of X, s.t. on each U, $\mathcal{F}|U$ is a free $O_X|U$ module of rank $I$. Then if X is connected, rank $I$ is globally well-defined. Here $(X,O_X)$ is any ringed topological space(e.g. not necessarily the structure sheaf of a ring). A similar definition is here link text

However, it didn't seem obvious to me that if $V$ is a smaller open set included in $U$(say $U$ connected), then the number of copies $J$ of $(O_X|V)^J=\mathcal{F}|V$ would remain the same, because in general the restriction map of the sheaf $O_X$ or $\mathcal{F}$ from $U$ to $V$ need be neither subjective nor injective, why would the index $J$ stay the same as $I$?

4 Answers
4

The first one (the one you correctly say is neither surjective nor injective in general) is that on sections: for $\mathcal{F}$ a sheaf on a scheme $X$ and two open subsets $V \subseteq U$, there is a map $\mathcal{F}(U) \to \mathcal{F}(V)$.

On the other hand, the inclusion map $i_{VU}: V \to U$ induces a functor $i_{VU}^{-1}$ from the category of sheaves on $U$ to the category of sheaves on $V$. This is called restriction of sheaves. By functoriality, $W \subseteq V \subseteq U$ yields $i_{WV}^{-1}\circ i_{VU}^{-1} = i_{WU}^{-1}$, so the notation is usually shortened to just $ -|_{W}$.

The second one is the one that you want to look at: the statement is then that $\mathcal{F}|\_{U} \cong \mathcal{O}_X^{\oplus I}|\_{U}$ implies $\mathcal{F}|\_{V} \cong \mathcal{O}_X^{\oplus I}|\_{V}$ for $V \subseteq U$.

Locally free means not just that $F(U)$ is a free $O_X(U)$-module for an open cover of $U$'s, but that as a sheaf the restriction $F|_U$ is isomorphic to a direct sum of copies of $O_X|_U$. In particular, this gives an isomorphism of $F(V)$ with a corresponding sum of copies of $O_X(V)$ for every open subset $V\subseteq U$.

Let $\mathcal{F}$ be a locally free sheaf on $X$. For any $x$ in $X$ there exists $x \in U \subset_{open} X $ such that

$\mathcal{F}|_U \cong \mathcal{O}_X|_U^{(I)}$ $ \ \ \ \ (\star)$.

In particular, for each $y$ in this particular $U$, one has $\mathcal{F}_y \cong \mathcal{O}_{X,y}^{(I)}$ (which is given by the isomorphism above!!!).

Suppose now $X$ is connected and $\mathcal{F}$ is locally free (we need this). Fix an indexing set $I$ (and I think I need to take this $I$ to be one of the indexing sets from $(\star)$ above). The properties of $\mathcal{F}$ show that the set

When $(X,\mathcal{O}_X)$ is an arbitrary ringed space, the sheaf $\mathcal{O}_X$ could be supported on some subset of $X$. Outside this support, the stalks are zero and don't have the invariant dimension property. The rank is only defined (as a locally constant function on $X$) when the support of $O_X$ is the whole $X$, which is the case when $(X,\mathcal{O}_X)$ is a locally ringed space such as a scheme.