Showing the support of a sheaf may not be closed (Liu 2.5) 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...)
 A: This is just definition-pushing, and you've already made a good start.
To see uniqueness, let $U\subset X$ be an open subset and $\{U_i\}$ an open cover of $U$. Let $s,t\in F(U)$ and let $s_i,t_i\in F(U_i)$ be their restrictions. Then the condition that $s_i=t_i$ in $F(U_i)$ means that $s_i=t_i\in G(U_i)$, which means that $s=t$ in $G(U)$ and as $F(U)\subset G(U)$, we have that $s=t$ in $F(U)$.
To check gluing, let $s_i$ be a collection of sections of $F(U_i)$ so that $s_i|_{U_i\cap U_j}=s_j|_{U_i\cap U_j}$ as elements of $F(U_i\cap U_j)$. Then this equality is also true in $G(U_i\cap U_j)$, and by the assumption that $G$ is a sheaf, there is a section $s\in G(U)$ so that $s|_{U_i}=s_i$. This implies that $s_{x_0}=0$ (if $x_0\in U$ - if not, we have nothing to worry about), as the maps $G(U)\to G(U_i)\to G_{x_0}$ commute, so $s\in F(U)$ as well and thus $F$ satisfies gluing.
A: This kind of a statement follows from "unpacking definitions". You unpack the sheaf properties of $G$ together with their connection with $F$ to get that $F$ is a sheaf. In principle this is easy and there is nothing happening. In practice you can get lost, in particular if you are not familiar with the general concepts at play.
Since $G$ is a sheaf and $F(U)\subseteq G(U)$ for any $U$ you get uniqueness of any gluings automatically, since they are also gluings in $G$. But lets be explicit, if $U_\alpha$ is a collection of open sets and $s,s' \in F(\bigcup_\alpha U_\alpha)$ with $s\lvert_\alpha = s'\lvert_\alpha$ for all $\alpha$ we want to see that $s=s'$ must follow. Since $F(\bigcup U_\alpha)\subseteq G(\bigcup U_\alpha)$ you get that $s,s'$ are both in $G(\bigcup U_\alpha)$ with $s\lvert_\alpha = s'\lvert_\alpha$, since $G$ is a sheaf you get $s=s'$.
So whats left is to show is the existence of a gluing.
So suppose $U_\alpha$ is a collection of open sets and $s_\alpha\in F(U_\alpha)$ for all $\alpha$ with $s_\alpha\lvert_{U_\alpha\cap U_\beta} = s_\beta\lvert_{U_\alpha\cap U_\beta}$ for any $\alpha,\beta$, ie the compatibility conditions of gluing are satisfied. We want to show that there is an $s\in F(\bigcup_\alpha U_\alpha)$ with $s\lvert_\alpha = s_\alpha$ for every $\alpha$. Now since $G$ is a sheaf and $s_\alpha\in G(U_\alpha)$ you can glue them to in $G$ get an $s\in G(\bigcup_\alpha U_\alpha)$ for which $s\lvert_\alpha =s_\alpha$, we just need to check that $s\in F(\bigcup U_\alpha)$, ie that $s_{x_0}=0$ if $x_0\in\bigcup_\alpha U_\alpha$ (if $x_0\notin \bigcup_\alpha U_\alpha$ there is nothing to check). Suppose $x_0\in U_\gamma$ for a fixed $\gamma$, since $s_\gamma \in F(U_\gamma)$ this means that $(s_\gamma)_{x_0}=0$, ie there is some open set $U\subseteq U_\gamma$ containing $x_0$ for which you have that $s_\gamma \lvert_U =0$. But then:
$$s\lvert_U=(s\lvert_{U_\gamma})\lvert_{U}=s_\gamma\lvert_U=0$$
implying that $s_{x_0}=0$, ie $s\in F(\bigcup_\alpha U_\alpha)$.
A: 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.
