The textbook George Kempf: Algebraic Varieties defines a presheaf as a contravariant functor from the category of the topology of a space $X$ with ordering by inclusion to Set. For a presheaf $F$, its sheaf of discontinuous sections $D(F)$ is defined as follows: for any open set $V$, we have $$D(F)(V) := \prod \limits _{x \in V} F_x ,$$ where $F_x$ is the stalk of $F$ at the point $x \in X$. Further, for any open subset $U \subseteq V$, the restriction map $D(F)(V) \to D(F)(U)$ is given by $$\left( \sigma _{(x)} \right)_{x \in V} \mapsto \left( \sigma _{(x)} \right)_{x \in U} .$$ We have an inclusion morphism $i_F : F \to D(F)$ given by $$\begin{align} V &\to D(F)(V) \\ \sigma &\mapsto (\sigma _x)_{x \in V} . \end{align}$$ The textbook then claims (Lemma 4.1.2-(b), p. 40) that any morphism of presheaves $\alpha : F \to G$ extends uniquely to a morphism $D(\alpha ) : D(F) \to D(G)$ which is given by $$\begin{align} D(F)(V) \to D(G)(V) \\ \left( \sigma _{(x)} \right)_{x \in V} \mapsto \left( \alpha _x (\sigma _{(x)}) \right)_{x \in V}, \end{align}$$ where for a point $x \in X$, $\alpha _x : F_x \to G_x$ is the map on stalks induced by $\alpha$. We thus get a commutative diagram $$\require{AMScd} \begin{CD} F @>{\alpha}>> G\\ @V{i_F}VV @V{i_G}VV \\ D(F) @>{D(\alpha )}>> D(G). \end{CD}$$
I fail to understand why this map is unique. I have the following counter-example. Consider the topological space $X = \lbrace a, b \rbrace$ with the indiscrete topology $\lbrace X, \phi \rbrace$. We define a presheaf $F$ over $X$ as $D(F)(X) := \lbrace f, g \rbrace$. Thus for any $x \in X$, we get that $F_x = \lbrace f_x \equiv f, g_x \equiv g \rbrace$ is a 2-element set. Then $D(F)(X) = \lbrace f, g \rbrace \times \lbrace f, g \rbrace$ is a 4-element set. Let $\unicode{x1D7D9} : F \to F$ be the identity morphism. This extends the identity morphism $D(F) \to D(F)$, but also to a morphism $\beta : D(F) \to D(F)$ given by: $$\beta (X) : (f_a , f_b ) \mapsto (f_a , f_b ), \ (g_a , g_b ) \mapsto (g_a , g_b ), \ (f_a, g_b) \mapsto (f_a , f_b ), \ (g_a, f_b) \mapsto (f_a , f_b ) .$$ I am wondering if the uniqueness of extension holds for only certain topological properties, such as for $T_1$ spaces, or quasi-compact $T_1$ spaces. Please help.
Your counterexample is correct*, the statement is just false. More generally, if $X$ is any indiscrete space and $S$ is a set, we can define a presheaf $F$ on $X$ by letting $F(\emptyset)=\{\star\}$ and $F(X)=S$. Then $F_x = S$ for all $x \in X$, and a morphism $D(F) \to D(F)$ extending $F \to F$ is the same as a map of sets $\alpha : S^X \to S^X$ such that $\alpha$ preserves constant functions. Surely, $\alpha$ is not unique.
I would be pretty surprised though if this uniqueness statement is used an_ywhere else in the book. We only need that there is a natural extension. I would not think more about it then.EDIT: I was wrong about thatI also doubt that there will be many examples where the extension is unique.
If you want to construct the associated sheaf using $D(F)$, just take the subsheaf $F^{s} \subseteq D(F)$ such that $ F^{s}(U)$ consists of those $s \in \prod_{x \in U} F_x$ such that for every $x \in U$ there is an open neighborhood $x \in V \subseteq U$ and an element in $F(V)$ that induces all the $s_y$ for $y \in V$. It is easy to check that $F^s$ is indeed a sheaf and that we have a morphism of presheaves $F \to F^s$ that satisfies the universal property.
*almost: you didn't define the presheaf on the empty open subset.