I'm reading Faisceaux Algébriques Cohérents (Serre), no.36 lemma 2. The proof of that lemma states that the preimage of zero of a global section of a sheaf is closed when the sheaf is locally constant.
I know the preimage of zero is open (because it is a sheaf), but I can't understand why locally constant implies it closed.
This is an abstract of the above comments.
Serre uses the "espace étalé" version of sheaves, so let me recall the definition of constant and locally constant sheaves.
A sheaf $F$ on $X$ is said to be constant if there exist a discrete set $E$ such that $F$ is homeomorphic to $X\times E$ with the product topology, and such that the projection $\pi:F\rightarrow X$ corresponds to the first projection. In that case, there is a bijection between sections of $F$ defined on an open subset $U$ and continuous function $U\rightarrow E$.
The bijection is the following : given a section $s:U\rightarrow F$, compose with the homeomorphism $F\simeq X\times E$ and compose with the second projection. This gives a continuous map $f:U\rightarrow E$. Conversely, given a continuous map $f:U\rightarrow E$, takes its graph, that is, consider the map $U\rightarrow X\times E$ where the first coordinate is simply the inclusion, and the second coordinate is $f$. Finally, compose with the homeomorphism $X\times E\simeq F$ to get a section $U\rightarrow F$.
You should check that this correspondence is indeed a bijection.
A sheaf $F$ is said to be locally constant if there exists a open covering $X=\bigcup U_i$ such that the restriction $F_i$ of $F$ to $U_i$ is constant.
Now let us prove that if $s$ is a section of a locally constant sheaf of abelian groups, then the set where $s(x)=0$ is closed.
Let $x\in X$ be a point where $s(x)\neq 0$. There exist an open neighborhood $U$ of $x$ such that $F$ is constant on $U$ with value $E$. Hence the section corresponds to a continuous map $f:U\rightarrow E$. But then, we have $\{x\in U, s(x)\neq 0\}=f^{-1}(E\setminus\{0\})$ which is open. So the complementary of the zero set of $s$ is open.