Apologize in advance if this is a bit trivial but I am stuck on the following:
Prove that for $\varphi : R \to S$ a map between commutative rings, the prime $\mathfrak{p}$ is in the image of the induced map $\mathrm{Spec}(S) \to \mathrm{Spec}(R)$ iff $\mathfrak{p} = \varphi^{-1}(\mathfrak{p}S)$.
For instance if $\varphi : \mathbf{Q} \to \mathbf{Q} \times \mathbf{Q}$ is the map $a \mapsto (a, a)$, clearly $\mathfrak{p} = (0)$ is the unique prime ideal of $\mathbf{Q}$ and its extension $\{(0, 0)\}$ (whose contraction is $\mathfrak{p}$) is not prime (since $(1,0)(0,1) = (0,0)$).
My question: if in general $\mathfrak{p}S$ is not a choice for an element in the fiber of $\mathfrak{p}$, then what should I do? I'm surely missing something easy.
"$\Rightarrow$" If $p=P^c$, then $p^{ec}=P^{cec}=P^c=p$ (see Atiyah and Macdonald, Proposition 1.17).
"$\Leftarrow$" You know that $p=p^{ec}$. Localize everything at $p$ and thus can assume that $p$ is maximal. Take any prime ideal $P$ containing $pB$. Then $p=p^{ec}\subseteq P^c$, hence equality.