Solution (source code)

= Solution

Let $S=A\setminus\mathfrak p$, let $S$ act on $B$ through $\varphi$, and write $\mathfrak pB$ for the <extension of an ideal> generated by $\varphi(\mathfrak p)$. Since $\kappa(\mathfrak p)=S^{-1}(A/\mathfrak p)$, the <fiber ring> has the canonical presentations
$$
C=B\otimes_A\kappa(\mathfrak p)\cong S^{-1}(B/\mathfrak pB)\cong S^{-1}B/\mathfrak pS^{-1}B.
$$
The first <isomorphism> sends $b\otimes(\bar a/s)$ to $\varphi(a)b/s$ modulo $\mathfrak pB$. Its inverse sends the class of $b/s$ to $b\otimes(\bar1/s)$. The tensor balancing relation, reduction modulo $\mathfrak p$ and the fraction relations show that these maps are well-defined and inverse. Thus the description is canonical and does not depend on chosen representatives.

Suppose $\mathfrak q$ is a <prime ideal> of $B$ with $\varphi^{-1}(\mathfrak q)=\mathfrak p$. Then $\mathfrak pB\subseteq\mathfrak q$ and $\mathfrak q$ is disjoint from $\varphi(S)$. Its <localization> $S^{-1}\mathfrak q$ is a proper prime, since the quotient is the <localization> of the <integral domain> $B/\mathfrak q$. It contains $\mathfrak pS^{-1}B$, and therefore gives a prime
$$
\mathfrak q\longmapsto\mathfrak Q=S^{-1}\mathfrak q/\mathfrak pS^{-1}B\quad\text{in }C.
$$
Conversely, for a prime $\mathfrak Q\subset C$, take its contraction $\mathfrak q$ under the <ring homomorphism> $\psi:B\to C$, $b\mapsto b\otimes1$. Contraction preserves primality. Every $\varphi(a)$ with $a\in\mathfrak p$ maps to zero, while every $\varphi(s)$ with $s\in S$ maps to a <unit> and hence cannot belong to a proper prime. Thus $\varphi^{-1}(\mathfrak q)=\mathfrak p$.

These constructions are inverse. For a prime disjoint from $\varphi(S)$, the fraction $b/1$ belongs to its localized extension exactly when some $s\in S$ has $\varphi(s)b\in\mathfrak q$; primality then implies $b\in\mathfrak q$. In the other direction, every element of $C$ has a representative $b/s$, and membership in $\mathfrak Q$ is equivalent to membership of $b/1$ because the denominator is a <unit>. Hence $\mathfrak Q$ is recovered by extending its contraction and quotienting. We have proved the canonical <fiber of the map on spectra> correspondence:
$$
\boxed{\{\mathfrak q\in\operatorname{Spec}B:\varphi^{-1}(\mathfrak q)=\mathfrak p\}\ \cong\ \operatorname{Spec}(B\otimes_A\kappa(\mathfrak p)).}
$$
If a denominator maps to zero, the fiber ring is the zero ring and both sets are empty; the same argument includes this case.