$\mathcal{O}(Spec(A) \setminus \{x\})$, where $A$ is the local ring of the origin Let $A$ be the local ring of the origin in $\mathbb{A}^2$. I have to find $\mathcal{O}(U)$, where $U=Spec(A) \setminus \{x\}$, with $x$ is the closed point.
I solved the exercise in the following way:
$A=\{\frac{f}{g}: g(0,0) \ne 0\}$ and $\mathcal{O}(U)=A_{(0,0)}$. But $A_{(0,0)}=A$. I've done right this exercise? I think my solutions is very simplified and I'm not convinced that it's right.
Can you help me, please?
 A: You're not quite right. The answer is that $\mathcal{O}(U) = A$. This is because the structure sheaf is basically just a sheaf of "regular functions", and functions in algebraic geometry only encode codimension-1 data. Ie, the zeros and poles of functions on a space $X$ are both closed codimension 1 subschemes. Thus, when you remove the closed (codimension-2) point $x$ of Spec $A$, you're asking for functions which are now allowed to have poles at $x$. However, because $x$ is codimension 2, this isn't enough to give you more functions (a function on 2-dimensional space never has a single pole. If it has poles, it will have poles along a plane curve). Thus, to get more functions you have to allow them to have poles at a codimension 1 subscheme (ie, at a plane curve). Note that your answer would have been correct if $A$ were the local ring of a curve.
Anyway, here's a proof:
Observe that your $U$ is the union of the (infinitely many) distinguished open sets $D(f)$ for $f\in (x,y)\subset A$.
On the other hand, for any global section $h\in\mathcal{O}(U)$. You may restrict $h$ to a global section of $D(f)$ for every $f\in (x,y)$. For any single $D(f)$, we have $\mathcal{O}(U)\subsetneq \mathcal{O}(D(f)) = A_f$, but because the $D(f)$'s for $f\in (x,y)$ cover $U$, by the gluing property of sheaves, we get that $\mathcal{O}(U)= \bigcap_{f\in (x,y)}\mathcal{O}(D(f)) = \bigcap_{f\in(x,y)} A_f$, where the intersections are taken in $Frac(A) = A_{(0,0)}$. It's clear that this intersection is just $A$.
Note that $\mathcal{O}(U)\ne Frac(A)$ because $Frac(A)$ is just the set of all rational functions $f/g$, and any such global section on $U$ should restrict to a global section of every $D(f)$ for $f\in (x,y)$. On the other hand, $1/x\in Frac(A)$, but $1/x$ isn't in $D(y)$.
