# The distinguished open sets are affine subschemes

If $Y=$ Spec$A$ is an affine scheme and $D(f)\subseteq Y$ (with $f\in A$) is a distinguished open, I want to show that $(D(f),\mathscr O_{Y|D(f)})$ is an affine scheme. Below there is my attempt of proof, but I've found a little problem, please help me to fix it.

Preliminary notations

If $(X,\mathscr O_X)$ and $(Y,\mathscr O_Y)$ are two schemes then a morphism between them is simply a morphism of locally ringed spaces $(\varphi, \varphi^{\flat})$.

$\varphi: X\rightarrow Y$ is a continuous map and $\varphi^{\flat}: \mathscr O_Y\rightarrow{\varphi_{\ast}\mathscr O}_X$ is a morphism of sheaves (of rings) on $X$ such that the corresponding map (by adjunction) $\varphi^{\#}:{\varphi^{-1}\mathscr O}_Y\rightarrow \mathscr O_X$ has the property that the induced map on stalks $\varphi_x^{\#}:\mathscr O_{Y,\varphi(x)}\rightarrow \mathscr O_{X,x}$ is a local homomorphism of local rings for every $x\in X$. Practically to give a morphism of schemes I can exhibit a couple $(\varphi, \varphi^{\flat})$ or, in alternative, a couple $(\varphi, \varphi^{\#})$ (with the above notations) but in both cases the map $\varphi_x^{\#}$ should be a local homomorphism.

Data: $A$ is a ring, $Y=$ Spec$A$ and $X=$ Spec$A_f$ with $f\in A$. Clearly $\mathscr O_Y$ and $\mathscr O_X$ are the relative structure sheaves.

Claim: $(D(f),\mathscr O_{Y|D(f)})\cong (X,\mathscr O_X)$

My proof: By an important fact from commutative algebra we know that $X$ is homeomorphic to $D(f)$ by $\varphi$; this homeomorphism $\varphi$ is induced by the canonical map $A\rightarrow A_f$. Now I will show a map $\psi_x:\mathscr O_{Y,\varphi(x)}\rightarrow \mathscr O_{X,x}$ that is an isomorphism of local rings for any $x\in X$. Then we have finished because we can say that exits a map $\varphi^{\#}$ such that $\varphi^{\#}_x=\psi_x$ for any $x\in X$.

Since $\mathscr O_{Y,\varphi(x)}=A_{\varphi(x)}$ (remember $x$ is a prime ideal) and $\mathscr O_{X,x}=(A_f)_x$, the isomorphism $\psi_x$ is the obviuous one.

The problem: Is it enough to give the maps $\varphi^{\#}_x=\psi_x$ at level of the stalks? Who does ensure that once $\psi_x$ is given for every $x$, does exist $\varphi^{\#}$ such that $\varphi^{\#}_x=\psi_x$?

Edit:

For a simpler proof, maybe, I should use the following fact

I can take the identity of $A_f$ (it represent the global section of $X$ and $Y$) and then show that the corresponding map between $X$ and $Y$ is an isomorphism of schemes.

• The definition of morphism of schemes (which is really just morphism of locally ringed spaces) is not quite right. $\phi$ should be a continuous map of the underlying top. spaces, and then the other map should be a map of sheaves. Jun 1, 2013 at 20:18
• uhm, yes you are right! Jun 1, 2013 at 21:04
• Edited! I had changed many times the notations and so the definition of morphism between schemes was terribly wrong. Jun 1, 2013 at 21:12

You don't just want to prove that $$D(f)$$ is isomorphic to $$\mathrm{Spec}(A_f)$$ as locally ringed spaces via some random isomorphism. The ring map $$\psi:A\rightarrow A_f$$ (localization map) induces a morphism of schemes $$g=\mathrm{Spec}(\psi):X=\mathrm{Spec}(A_f)\rightarrow Y=\mathrm{Spec}(A)$$. As you seem to already know, the underlying map of topological spaces is a homeomorphism onto $$D(f)$$, which is an open subset of $$Y$$.

In general, a morphism of locally ringed spaces $$g:X\rightarrow Y$$ is called an open immersion if $$g$$ induces (on the underlying topological spaces) a homeomorphism onto an open subset of the target and $$g_x^\sharp:\mathscr{O}_{Y,g(x)}\rightarrow\mathscr{O}_{X,x}$$ is an isomorphism for each $$x\in X$$. It is equivalent for there to exist an open subset $$V$$ of $$Y$$ and an isomorphism of locally ringed spaces $$h:X\cong V$$ such that $$i\circ h=g$$, where $$i:V\hookrightarrow Y$$ is the canonical inclusion morphism and $$V$$ is regarded as a locally ringed space in the standard way, by restricting the structure sheaf of $$Y$$. If $$g$$ is an open immersion in the first sense, then $$V=g(X)$$ is open in $$Y$$, and there is a unique isomorphism $$h:X\cong V$$ with $$i\circ h=g$$.

So you just need to prove that the map $$g$$ is an open immersion. You already have the topological part, so the sheaf part amounts to proving that for each prime ideal $$\mathfrak{q}$$ of $$A_f$$, the map of stalks $$g_\mathfrak{q}^\sharp:A_{\psi^{-1}(\mathfrak{q})}\rightarrow (A_f)_{\mathfrak{q}}$$, is an isomorphism. Note that this map is given, by definition, by $$a/s\mapsto\psi(a)/\psi(s)$$, using the standard description of localizations as equivalence classes of fractions. Basic properties of localization tell you that $$\mathfrak{q}$$ has the form $$\mathfrak{p}A_f$$ for a unique prime ideal $$\mathfrak{p}$$ of $$A$$ not containing $$f$$, i.e. $$\mathfrak{p}\in D(f)$$, and the inverse image $$\psi^{-1}(\mathfrak{q})$$ is $$\mathfrak{p}$$. So you are reduced to the following claim: if $$\mathfrak{p}\in D(f)$$, then the canonical map induced by $$\psi$$, $$A_\mathfrak{p}\rightarrow(A_f)_{\mathfrak{p}A_f}$$, is an isomorphism.

You can prove this by explicitly manipulating fractions, but that's kind of messy in my opinion. I think it is better to observe that the map in question is defined solely in terms of the universal property of localization. Namely, the composite of localization maps $$A\rightarrow A_f\rightarrow (A_f)_{\mathfrak{p}A_f}$$ visibly sends $$A\setminus\mathfrak{p}$$ into the units of the target ring, so there is a unique $$A$$-algebra map $$A_\mathfrak{p}\rightarrow (A_f)_{\mathfrak{p}A_f}$$. This is $$g_{\mathfrak{p}A_f}^\#$$. Using similar considerations, you can, via the universal property of localization, produce a ring map in the other direction, and then verify, now using the uniqueness in the universal property, that the composite of the two maps in both directions is the identity on the appropriate ring, i.e., the maps are inverses of one another.

So, your approach is more or less correct in spirit, but somewhat out of order. It is not enough to show that the local rings of two locally ringed spaces match up, i.e., this does not yield a morphism in general (it is true that two morphisms which have the same effect on topological spaces and induce the same maps of local rings are equal, but you cannot necessarily start with maps on local rings and produce a morphism). You have to start with the morphism (which you have, induced by $$\psi$$), and then prove that the canonical maps on stalks induced by $$\psi$$ are isomorphisms.

• Dear Keenan, +1 for this nice answer. @OP The isomorphism that $g_{\mathfrak{p}A_f}^\sharp$ that Keenan is asking you to prove is actually a specific case of the following more general fact in commutative algebra: Let $S,T$ be multiplicative sets in a commutative ring $A$ with $S \subseteq T$ and let $\varphi : A \to S^{-1}A$ be the canonical morphism. Then $T^{-1}A \cong \varphi(T)^{-1}S^{-1}(A)$. In Kennan's answer we can take $S = \{1,f,f^2,\ldots\}$ and $T = A - \mathfrak{p}$.
– user38268
Jun 1, 2013 at 23:18
• This is a wonderfully clear explanation: +1. Jun 2, 2013 at 7:17
• Dear @Benja: your commment nicely puts Keenan's isomorphism in perspective: +1. Jun 2, 2013 at 7:25
• Dear @Georges, Thank you for the kind words. Jun 5, 2013 at 17:07
• @GeorgesElencwajg: Sir, can you kindly give any reference to the equivalence stated in second paragraph? I am in urgent need of knowing the proof. Jul 13, 2014 at 9:41