I am working on theory of category and I found this exercise. I tried a lot but I didn't know how I could do. Let $A$ a discrete valuation ring. Show that the category of sheaves of abelian groups on $Spec(A)$ is equivalent to the category which objects are defined as below:
$\{ f: S \rightarrow L \ \quad S,L\in Ab \}$ and if we take two morphisms $f: S \rightarrow L$ and $f': S' \rightarrow L'$ then $g\circ f = f' \circ g'$ with $g: L \rightarrow L'$ and $g': S \rightarrow L$.
I would really appreciate your answers. Thanks!
Let us write $X=\operatorname{Spec} A$. It seems that your main confusion is about what the topology on $X$ looks like in this case. If $A$ is a discrete valuation ring, it has two prime ideals $P=\{0\}$ and $Q$, the maximal ideal. So $X=\{P,Q\}$.
Now we need to determine the topology on $X$. By definition, a subset of $X$ is open iff it is a union of sets of the form $D(f)=\{x\in X:f\not\in x\}$ for elements $f\in A$. So, we must determine these sets $D(f)$. If $f=0$, then $D(f)=\emptyset$. If $f\not\in Q$, then $f$ is a unit, so $D(f)=X$. Finally, if $f\in Q$ is nonzero, then $f\in Q$ but $f\not\in P$, so $D(f)=\{P\}$. Since any union of these sets will again just give another one of these sets, we conclude that there are three open subsets of $X$: $\emptyset,\{P\}$, and $X$.
So a presheaf $F$ on $X$ consists of three abelian groups $F(X)$, $F(\{P\})$, and $F(\emptyset)$ together with restriction homomorphisms $F(X)\to F(\{P\})$ and $F(\{P\})\to F(\emptyset)$. For $F$ to be a sheaf, it needs to satisfy the gluing axiom, but in this case it is rather trivial, since no open subset of $X$ can be written as a union of other open subsets in a nontrivial way. The only restriction imposed is that $F(\emptyset)$ must be a trivial group, since $\emptyset$ is covered by the union of no open sets (this is true for a sheaf on any space).
So, since $F(\emptyset)$ must be trivial, we lose no information by ignoring it, and the data we are left with is two abelian groups $F(X)$ and $F(\{P\})$ together with a homomorphism $F(X)\to F(\{P\})$. This is exactly the data of the category you are asked to show is equivalent. I will leave it to you to write out all the details and verify that this really does give an equivalence of categories.