TITLE: Showing the support of a sheaf may not be closed (Liu 2.5)
QUESTION [9 upvotes]: This is question 2.5 of Qing Liu.
I am new in algebraic geometry and really stuck on it and can't do anything to solve it.
The question:
Let $F$ be a sheaf on $X$. Let $\operatorname{Supp} F=\{x\in X:F_x\neq 0\}$. We want to show that in general, $\operatorname{Supp} F$ is not a closed subset of $X$. Let us fix a sheaf $G$ on $X$ and a closed point $x_0\in X$. Let us define a pre-sheaf $F$ by $F(U)=G(U)$ if $x_0\notin U$ and $F(U)= \{s\in G(U):s_{x_0}=0\}$ otherwise. Show that $F$ is a sheaf and that $\operatorname{Supp} F = \operatorname{Supp}G\setminus \{x_0\}$.
I don't know how to solve this question:
To show a pre-sheaf is a sheaf I need to check the "uniqueness" and "gluing local sections".
For the uniqueness: Let $U$ be an open subset of $X$ , $s\in F(U)$, if $x_0\notin U$ , then since $G$ is a sheaf, I don't see a problem for $F$ to be a sheaf.
If $s\in F(U)$ and $x_0 \in U$ and $\{U_i\}_i$ be an open covering of $U$,then there exists an $i_0$ such that $x_0\in U_{i_0}$. the image of $s$ in the stalk $F_{x_0}$ is $s_{x_0}$. $F(U_{i_0})=\{s\in G(U):s_{x_0}=0\}$ by definition. I don't know what to do now? (so sorry and I know this is an easy question...)

REPLY [5 votes]: Side note: a presheaf $F$ has the same stalks as its sheafification $F^\#$. Thus, $\operatorname{supp}(F) = \operatorname{supp}(F^\#)$ and it suffices to find a presheaf $F$ such that $\operatorname{supp}(F)$ is not closed, if all you want to know is that the support of a sheaf may or may not be closed. This doesn't matter here because the problem tells you specifically to prove $F$ is a sheaf, but it's good to know this trick.

$\DeclareMathOperator{res}{res}$
The first thing we need to do when checking that $F$ is a sheaf is to keep in mind the entire datum of the presheaf $F$; not just the objects $F(U)$ for $U$ an open subset of $X$, but also the restriction morphisms $\res_{U, V} : F(U) \to F(V)$ when $V \subseteq U$. In this case, $\res_{U,V}$ is just the restriction (haha) of the restriction morphism $G(U) \to G(V)$ (which we check is well-defined). In this situation (where $F(U)$ is always a subset of $G(U)$ and the restriction morphisms of $F$ are induced by those of $G$), $F$ is called a subpresheaf of $G$. Nothing crazy going on here, but it's important to fully understand the object you're working with. For convenience, I will write $\sigma|_V$ to mean $\res_{U,V}(\sigma)$, since $U$ can always be determined from context.
Next, as you said, we should check "uniqueness". Remember, the uniqueness axioms says that for all open covers $\{U_i\}_{i \in I}$ of an open set $U \subseteq X$ and all $\sigma \in F(U)$, if $\sigma|_{U_i} = 0$ for all $i \in I$, then $\sigma = 0$. We should try to prove this in the most straightforward possible way:
Let $\{U_i\}_{i \in I}$ be an open cover of an open set $U \subseteq X$. Let $\sigma \in F(U)$  be arbitrary. Suppose that $\sigma|_{U_i} = 0$ for all $i \in I$. Since $F$ is a subpresheaf of $G$, we have in particular that $\sigma \in G(U)$ and $\sigma|_{U_i} = 0 \in G(U_i)$ for all $i \in I$. Since $G$ is assumed to be a sheaf, we must have $\sigma = 0$, as desired.
Indeed, this very simple argument shows that any subpresheaf of a sheaf is separated (a.k.a. satisfies the uniqueness axiom): no need to mention anything about $x_0$!
Now you just need to check gluing, which I'll omit because this proof appears in other answers.