How can we prove that $D(f)\backsimeq\operatorname{Spec} A_f$?

Let $$D(f)=\operatorname{Spec}A - V(f)=\{p\in \operatorname{Spec} A:f\notin p\}$$ be the principal open subsets of $\operatorname{Spec}A$ with the Zariski topology. I'm trying to prove that $D(f)\backsimeq \operatorname{Spec} A_f$, where $A_f$ is the localization of $A$ at $f$.

If we consider the canonical homomorphism $\varphi:A\to A_f$ given by $\varphi (a) = \frac {a}{1}$, we can define $\varphi':\operatorname{Spec} A_f\to \operatorname{Spec} A$, given by $\varphi'(p)=\varphi^{-1}(p),\forall p\in \operatorname{Spec}A_f$.

I'm having trouble proving that this map is surjective.

Thanks.


Solution 1:

It's not surjective. The image will only consist of $D(f)$, i.e., those prime ideals of $A$ that do not contain $f$. To see that the image is indeed $D(f)$, take a prime ideal $p \in D(f)$ and check that $pA_f$ is a prime ideal of $A_f$ whose preimage under $\varphi$ is $p$.

Solution 2:

Prove more generally that for a multiplicative subset $S \subseteq A$ the maps

$\begin{array}{c} \{\mathfrak{p} \in \mathrm{Spec}(A) : \mathfrak{p} \cap S = \emptyset\} & \cong & \mathrm{Spec}(A_S) \\ \mathfrak{p} & \longrightarrow & \mathfrak{p} A_S \\ \phi^{-1}(\mathfrak{q}) & \longleftarrow & \mathfrak{q} \end{array}$

are well-defined, continuous and inverse to each other.