example of a presheaf I'm now trying to understand some of category theory, I think I can understand the concept of sheaf but I can not understand the difference between sheaves and presheaves.
I asked someones about it and they told me that it could be helpful if I can find an example of a presheaf that does not be a sheaf in a topology space of 3 points with the discrete topology.
But I have not idea of what this could be. So any help will be very appreciated.
Thanks.
 A: Consider the space $\mathbb R$ and the sheaf of sets $F$ such that for each open set $U$ the set $F(U)$ is the set of constant functions whose integral is at most $1$.
Is it a sheaf?
A: You are looking for presheaves that are not sheaves, it seems.
Where gluing fails.
One class of presheaves that do not satisfy the gluing axiom (but satisfy the locality axiom) can suggestively be summarized as "presheaves of functions where the functions are required to satisfy some finiteness property." Finiteness can mean bounded, or compact support, or finite support or … Mariano Suárez-Álvarez example is of this type.
Let me give a specific (rather involved) example of this kind: The presheaf of bounded holomorphic functions on a Riemann surface. Namely, let $X$ be a Riemann surface. For an open set $U\subseteq X$, let $\mathcal{B}(U)$ be the $\mathbb{C}$-algebra of bounded holomorphic functions $U\rightarrow \mathbb{C}$. For $U\subseteq V$, consider the usual restriction morphisms $\mathcal{B}(V)\rightarrow\mathcal{B}(U)$. This gives a presheaf which satisfies the locality axiom. This presheaf, however, does not satisfy the gluing axiom.

To see this, let $x\in X$. Take a chart $\phi\colon U \rightarrow V$ around $x$ which is centered at $x$. Since the map $\mathbb{C}\rightarrow \mathbb{C};z\rightarrow \alpha z$ is a biholomorphism iff $\alpha\in\mathbb{C}\setminus\{0\}$, we can without loss of generality assume that the open unit disc $D=\{z\in\mathbb{C}\ \colon \vert z \vert <1\}$ is contained in $V$. Without loss of generality further assume that $D=V$. (If this is not the case, consider $\phi^{-1}(D)$ instead of $U$ and restrict $\phi$ to $\phi^{-1}(D)$.) Next, define the function $ f\colon D\rightarrow \mathbb{C};z\mapsto \frac{1}{1-z}$. Now, let $\{V_i\}$ be an open cover of $D$ such that each $V_i$ is a contained in a centered open disc of radius strictly smaller than $1$. (For instance, for every $n\in\mathbb{N}_{>1}$ you could take any open cover of the open disc of radius $1-\frac{1}{n}$ and then consider the union of all these covers over $\mathbb{N}_{>1}.$) Since $\phi$ is a homeomorphism, the open cover $\{V_i\}$ of $D$ induces an open cover $\{U_i\}$ of $U$.
Now, for each $i$, define the restricted functions $f_i\colon=(f\circ\phi)\restriction_{U_i}$. Since $f$, as well as every transition map of $X$, is holomorphic, all the $f_i$ are holomorphic. By construction of the sets $U_i$, since $f$ is bounded on any disc of radius $<1$, all the $f_i$ are bounded. Again by construction, all the $f_i$ are additionally compatible, i.e. they agree on the overlap of their domains.
If the presheaf $\mathcal{B}$ satisfied the gluing axiom, there would be a section $\hat{f}\in \mathcal{B}(U)$ such that $\hat{f}\restriction_{U_i}=f_i$ for all $i$. By construction, $\hat{f}$ would have to be equal to $f\circ \phi$. However, $f\circ\phi$ is unbounded, since $f$ is.

With slight modifications, we could have replaced $X$ by any finite-dimensional real manifold $M$ and $\mathcal{B}$ by the presheaf of bounded (infinitely) real-differentiable functions on $M$.
Where locality fails.
Looking for presheaves that do not satisfy the locality axiom by considering presheaves of functions seems like a bad idea. If the restriction morphisms are restrictions of functions, locality is essentially guaranteed.
One example of a presheaf that does not satisfy the locality axiom is the following presheaf of abelian groups.

Consider the sheaf $\mathcal{O}^{\ast}_{\mathbb{C}}$ of non-vanishing holomorphic functions on $\mathbb{C}$ which assigns to an open set $U\subseteq \mathbb{C}$ the abelian group of non-vanishing holomorphic functions $U\rightarrow \mathbb{C}$. Similarly, define the sheaf $\mathcal{O}_{\mathbb{C}}$ of holomorphic functions on $\mathbb{C}$. For every open set $U\subseteq X$, consider the group homomorphism $\operatorname{exp}\colon \mathcal{O}_{\mathbb{C}}(U)\rightarrow \mathcal{O}^\ast_{\mathbb{C}}(U); f \mapsto {\operatorname{exp}} \circ f$. Now, consider the presheaf of abelian groups that assigns to an open set $U\subseteq X$ the quotient group $\mathcal{O}_{\mathbb{C}}^\ast(U)/\operatorname{exp}(\mathcal{O}_{\mathbb{C}}(U))$. The restriction morphisms of this presheaf are those induced by the restriction morphisms of $\mathcal{O}_{\mathbb{C}}^\ast$. That this presheaf does not satisfy the locality axiom can be proven by using the fact that a complex logarithm cannot be defined on the whole complex plane.

