# Atiyah-Macdonald Exercise 5.1: Doubt about detail in final step

I'm working on Atiyah-Macdonald Exercise 5.1:

Let $$f:A\to B$$ be an integral homomorphism of rings. Show that $$f^*:\mathrm{Spec}(B)\to\mathrm{Spec}(A)$$ maps closed sets to closed sets.

Here $$f^*$$ takes the prime ideal $$\mathfrak q\subset B$$ to the prime ideal $$f^{-1}(\mathfrak q)\subset A$$.

So far I've shown that for any ideal $$I\subset B$$ we have $$f^*(V(I))\subseteq V(f^{-1}(I))$$, where $$V(I)$$ denotes the set of prime ideals of $$B$$ containing $$I$$, and likewise for $$V(f^{-1}(I))$$ and primes containing $$f^{-1}(I)$$ in $$A$$. Thus $$f^*$$ takes $$V(I)$$ into $$V(f^{-1}(I))$$. Now I want to show that $$f^*$$ maps $$V(I)$$ onto $$V(f^{-1}(I))$$. To this end, I've shown that given any prime $$\mathfrak p\in V(f^{-1}(I))$$ there exists a prime $$\mathfrak q\subset B$$ such that $$f^*(\mathfrak q) = \mathfrak p$$.

However, I'm stuck trying to show that $$\mathfrak q$$ is actually in $$V(I)$$, that is, that $$I\subset\mathfrak q$$. I've seen a number of worked solutions to this problem that don't mention this at all, so I'm not sure if it's 1) obvious or 2) unnecessary, and I'm having trouble seeing why in either case. How can we prove this, or why is it not necessary to do so?

If it would help to know how I constructed $$\mathfrak q$$: Suppose $$\mathfrak p\in V(f^{-1}(I))$$, and note that $$f(\mathfrak p)$$ is prime in $$f(A)$$ since $$f$$ is surjective onto $$f(A)$$ and $$\ker f\subset f^{-1}(I)\subset\mathfrak p$$. Since $$f$$ is integral, $$B$$ is integral over $$f(A)$$, so by the going-up theorem there is some prime ideal $$\mathfrak q$$ of $$B$$ such that $$\mathfrak q\cap f(A)=f(\mathfrak p)$$. And now $$f^*(\mathfrak q) = f^{-1}(\mathfrak q) = f^{-1}(\mathfrak q\cap f(A)) = f^{-1}(f(\mathfrak p)) = \mathfrak p + \ker f = \mathfrak p$$.

I don’t know whether your construction can be completed, i.e. that one can show that any such $$\mathfrak{q}$$ must contain $$I$$, because I agree with you that it isn’t immediately obvious why it should.
One could circumvent this difficulty by applying going-up to $$A/f^{-1}(I)\to B/I$$, because then the inclusion comes for free.
Edit: here’s an example to show that it can happen that $$\mathfrak{q}$$ doesn’t contain $$I$$: take $$f:A=k[x^2]\to B=k[x]$$ and $$I=(x+1)\subseteq B$$ (with $$k$$ a field of characteristic $$0$$). Then $$f^{-1}(I)=(x^2-1)$$ which is prime inside $$A$$, so take $$\mathfrak{p}=f^{-1}(I)$$. But then $$\mathfrak{q}=(x-1)$$ is a prime ideal of $$B$$ laying over $$\mathfrak{p}$$, but it doesn’t contain $$I$$. So one can’t just pick any of the ideals laying over $$\mathfrak{p}$$.