Basic definition of Inverse Limit in sheaf theory / schemes I read the book "Algebraic Geometry" by U. Görtz and whenever limits are involved I struggle for an understanding. The application of limits is mostly very basic, though; but I'm new to the concept of limits.
My example (page 60 in the book): Let $A$ be an integral domain. The structure sheaf $O_X$ on $X = \text{Spec}A$ is given by $O_X(D(f)) = A_f$ ($f\in A$) and for any $U\subseteq X$ by 
\begin{align}
O_X(U) &= \varprojlim_{D(f)\subseteq U} O_X(D(f)) \\ 
&:= \{ (s_{D(f)})_{D(f)\subseteq U} \in \prod_{D(f)\subseteq U} O_X(D(f)) \mid  \text{for all } D(g) \subseteq D(f) \subseteq U: s_{D(f)\big|D(g)} = s_{D(g)}\} \\ 
&= \bigcap_{D(f)\subseteq U} A_f.
\end{align}
I simply don't understand the last equality: In my naive understanding the elements of the last set are "fractions" and the elements of the Inverse Limit are "families of fractions".
Any hint is appreciated.
 A: My personal advice is to study a bit of category theory: it will let you understand all this stuff in a very clearer way. In fact you can easily realize that the first equality is not a definition, but a way to express a limit of an arbitrary presheaf, while the second is an isomorphism, not exactly an equality, given by the universal property defining limits. I started with Hartshorne, but without category theory as a background it's just like wandering in the dark without even a candle with you.
A: Is not the best way of defining the structure sheaf. It just uses the fact that $D(f)$ form base for the topology. To see the last isomorphism if you want you can define the sheaf of regular functions $\mathscr{R}(U)=\cap_{x\in X}A_{\frak{p}_x}$. The correct way of understanding this is that for each open it gives you the ring of regular functions on $U$ and that can be seen it as functions that are regular at each point of $U$. Notice that $\mathscr{R}(U)$ is the same as the last intersection and you have a natural map $\mathscr{R}\rightarrow \mathscr{O}_X$ that for $U\subset X$ sends $\phi\in \cap_{D(f)\subset U}A_f$ to $(\phi\mid D(f)\subset U)\in \prod A_f$ that stalk-wise is an isomorphism. 
