# Structure Sheaf of the Spectrum of a Ring

Let $A$ be a ring and $X$ be the spectrum of $A$ with the Zariski topology. For an element $f\in A$ let $X_f:=\{p\subset A\text{ prime ideal }\,|\,f\notin p\}$; the $X_f$ form a basis of the topology on $X$. Finally let $\mathcal{O}$ be the structure sheaf of $X$ (a sheaf or rings).

I have managed to show that the stalk of $\mathcal{O}$ at $\mathfrak{p}\in X$ is isomorphic to to the local ring $A_{\mathfrak{p}}$. What I'm struggling to understand though is the following:

Question 1: For $f\in A$ the ring $\mathcal{O}(X_f)$ is isomorphic to the localized ring $A_f$. Why?

Let $\mathfrak{N}$ be the nilradical of $A$. I know that the spectra of $A$ and $A/\mathfrak{N}$ are homeomorphic, but I have trouble answering this:

Question 2: Are the structure sheaves of the spectra of $A$ and $A/\mathfrak{N}$ the same?

I am very thankful for any hints, references or full out answers.

-
The second question has a negative answer because if $X = \mathrm{Spec} A$ then $\mathcal{O}_X(X) = A$. – Andrea Feb 9 '12 at 20:04
Well, let's at least get started: define a map $A_f \to \mathscr O(X_f)$ by sending $a/f^n$ to the function on $X_f$ sending $\mathfrak p$ to the image of $a/f^n$ in $A_\mathfrak p$. Injectivity shouldn't be so bad. Surjectivity is more finicky. – Dylan Moreland Feb 9 '12 at 20:10
It is prooved (questin 2) in chapter 2 in Hartshorne's Algebraic geometry. – rafaelm Feb 9 '12 at 21:01
Maybe one more comment: We have an (anti-)equivalence between the category of commutative rings (with unity) and the category of affine schemes (as is proven in any scheme-theoretic treatise on algebraic geometry), and so a positive answer to Question 2 would contradict this equivalence. – M Turgeon Feb 10 '12 at 18:57
@Carsten It is only possible to define the structure pre-sheaf this way. Then the question that should be asked is: Why is the sheafification map an isomorphism on $X_f$? The technical details are essentially identical. I don't mean to suggest that you're unaware of this (and I know this is quite an old post), but I think it's worthwhile to point this out to anybody trying to follow these comments in the future. – Slade Oct 17 '13 at 2:56

Question 2 is not true as Andrea noted. For simplicity, take any ring with non-zero nilradical, i.e. a non-reduced ring, for example $A=k[X,Y]/(X^2)$. Then $A/nil(A)=A/(\bar{X})=k[Y] \neq A$. Then $\mathcal O_X \neq \mathcal O_{X_{red}}$, where $X=Spec ~A$ and $X_{red}=Spec ~(A/nil(A))$, because $\mathcal O_X(X) = A$ and $\mathcal O_{X_{red}}(X)=k[Y]$.