I know this is a classic, but there are details which bother me deeply. I just began studying Scheme Theory and I know just about the basic definitions of schemes (about the first pages of Harris and Eisenbud's The Geometry of Schemes). I wanted to do the following exercice in a more general setting:
Set $A$ a commutative unitary ring, $R=A[X,Y]$, and $\mathbb{A}_A^2=$ Spec($R$) the associated scheme. Now in this situation, the ideal $I=(X,Y)$ may not even be prime, but we still have the closed set $V(I)\subset \mathbb{A}_A^2$, and we set $U=\mathbb{A}_A^2-V(I)$. Now the objective is to show that this scheme, if it isn't empty, isn't affine. It's empty iff $A=0$.
Now we know that we get a covering of $U$ by the standard opens $D(X)$ and $D(Y)$. Plus we get $D(X)\cap D(Y)=D(XY)$: basic properties of Zariski topology.
Now this induces a diagram of rings of sections via restrictions:
\begin{array} & & \Gamma(D(X),\mathcal{O}_{\mathbb{A}_A^2}) &\\ & \nearrow & & \searrow & & \searrow\\ \Gamma(\mathbb{A}_A^2,\mathcal{O}_{\mathbb{A}_A^2}) & & {}^i\longrightarrow & & \Gamma(U,\mathcal{O}_{\mathbb{A}_A^2}) & \rightarrow & \Gamma(D(XY),\mathcal{O}_{\mathbb{A}_A^2})\\ & \searrow & & \nearrow & & \nearrow\\ & \Gamma(D(Y),\mathcal{O}_{\mathbb{A}_A^2}) &\\ \end{array}
(Sorry for the messy arrows)
Now I get the usual sheaf property over $U=D(X)\cup D(Y)$: $$0\rightarrow \Gamma(U,\mathcal{O}_{\mathbb{A}_A^2}) \rightarrow \Gamma(D(X),\mathcal{O}_{\mathbb{A}_A^2})\times \Gamma(D(Y),\mathcal{O}_{\mathbb{A}_A^2}) \rightrightarrows \Gamma(D(XY),\mathcal{O}_{\mathbb{A}_A^2})$$ is exact. Now we know that for $f\in R$ we get $\Gamma(D(f),\mathcal{O}_{\mathbb{A}_A^2})=R[1/f]$ and the obvious maps between localisations are our restrictions. So basically I get $$\Gamma(U,\mathcal{O}_{\mathbb{A}_A^2})= \left\{\left(\frac{P}{X^m},\frac{Q}{Y^n}\right)\bigg|\ P,Q\in R,\ \frac{P}{X^m}\bigg|_{D(XY)}=\frac{Q}{Y^n}\bigg|_{D(XY)} \right\}$$
Thus by universal construction I get that my arrow $i:\ \Gamma(\mathbb{A}_A^2,\mathcal{O}_{\mathbb{A}_A^2})\rightarrow \Gamma(U,\mathcal{O}_{\mathbb{A}_A^2})$ is simply the map that sends $P\in R$ to $(P_X,P_Y)$ where $P_X$ is just $P$ seen in $R[1/X]$ and idem for $P_Y$.
- First question: is the description of $\Gamma(U,\mathcal{O}_{\mathbb{A}_A^2})$ and the morphism $i$ correct?
Here is the fancy part: I know that $X$ and $Y$ are regular in $R$ so my restriction maps are actually ring monomorphisms. More precisely, I can embed $\Gamma(D(X),\mathcal{O}_{\mathbb{A}_A^2})$, $\Gamma(D(Y),\mathcal{O}_{\mathbb{A}_A^2})$, $\Gamma(D(XY),\mathcal{O}_{\mathbb{A}_A^2})$ and $\Gamma(\mathbb{A}_A^2,\mathcal{O}_{\mathbb{A}_A^2})$ into $A[X,X^{-1},Y,Y^{-1}]$. In order to embed $\Gamma(U,\mathcal{O}_{\mathbb{A}_A^2})$ I take $\left(\frac{P}{X^m},\frac{Q}{Y^n}\right)\in \Gamma(D(XY),\mathcal{O}_{\mathbb{A}_A^2})$ and I map it to $\frac{P}{X^m}=\frac{Q}{Y^n}\in A[X,X^{-1},Y,Y^{-1}]$.
Now that all of this is in place I want to show that if $\frac{P}{X^m}=\frac{Q}{Y^n}$ then $m=n=0$ and $P=Q$.
- Are ther any conditions on the ring $A$ for this to be true? I supposed only that $A\neq 0$. Is it enough?
If this is verified then I see that my arrow $i$ is not only injective by the fact that $X$ and $Y$ are regular, but that it is even surjective: $i$ is an isomorphism.
Now comes the more theoretical part: If $U$ were affine then we would get that by the obvious open immersion map $U\hookrightarrow\mathbb{A}_A^2$ induces the ring ismorphism $i$.
- This is where it gets tricky: is it by the Yoneda lemma that we can conclude that the immersion $U\hookrightarrow\mathbb{A}_A^2$ is an ismorphism, or by the equivalence of categories AffSch$\longrightarrow$Rings? Or is it the same? I didn't fully grasp this result.
Thus we are finished since it implies that the canonical inclusion of topological spaces $U\hookrightarrow\mathbb{A}_A^2$ is in fact a homeomorphism which is absurd since it isn't surjective.
I tried to put as much detail as I could in order to be as precise as I can be. I think it is important to show every detail of ones reasoning when learning something new. I hope someone can shed some light on these questions.