A (probably) wrong exercise from Morandi's Field and Galois theory After some efforts I realize that the following exercise is wrong:
(rings are unitary throughout the book)

Morandi's Field and Galois Theory, Appendix A, exercise 18
(b) Let $A\subseteq B$ be commutative rings, suppose that there's a subset $S$ of $A$ that is closed under multiplication, every element of $S$ is a unit in $B$, and $B=\{a/s\colon a\in A,s\in S\}$. If $a\in A-S$, show that $aB\cap A=aA$. We write $B=A_S$ when $B$ is of this form.

The next exercise is:

(c) Let $A\subseteq B$, and suppose that there's a set $S$ as in Problem 18b with $B=A_S$. If $P$ is a prime ideal of $A$ with $P\cap S=\emptyset$, show that $PB$ is a prime ideal of $B$ and that $PB\cap A=P$.

Exercise 18b is wrong. Let $A=\mathbb Z$, and $S=\{2^n\colon n\in\mathbb Z_{\ge0}\}$, then $B=\{m/2^n\colon m\in\mathbb Z,n\in\mathbb Z_{\ge0}\}$. Set $a=6$, then $aB\cap A=3\mathbb Z$, not $6A$.
The preceding paragraph says that some of these parts are standard facts of localization. I believe that there's some typo in 18b, and 18c should be right. I have no idea on the topic of localization, so I don't know how to modify it to a true statement.
Any idea? Thanks!
 A: I guess, the author meant $S^{-1}(aB \cap A) = aB$.
The general situation is as follows. Let $\varphi : A \to B$ be a homomorphism of rings and $I \trianglelefteq A$, $J \trianglelefteq B$ be ideals. We can extend $I$ to an ideal of $B$ by defining $I^e$ to be the smallest ideal of $B$ containing $\varphi(I)$ and we can contract $J$ to an ideal of $A$ by defining $J^c := \varphi^{-1}(J)$. There are always inclusions $I \subseteq I^{ec}$ and $J^{ce} \subseteq J$ and both of them may be strict in general.
In the case of localizations let $\varphi : A \to B$ be the inclusion map. Even in this special case we could have $I \subsetneq I^{ec}$ - this is exactly what you observed from $I = 6\mathbb{Z}$, because then $I^{ec} = S^{-1}(6 \mathbb{Z}) \cap \mathbb{Z} = 3B \cap \mathbb{Z} = 3 \mathbb{Z} \supsetneq 6 \mathbb{Z} = I$.
On the other hand, in the case of localization we always have $J^{ce} = J$, i.e. $S^{-1}(J \cap A) = J$ for all ideals $J$ of $B$. In particular, the above claim holds.
A: Looks like your counterexample is spot on. I'm not 100% sure if what I'm about to write was the intended problem, but it's my best guess.

Let $A\subseteq B$ be commutative rings, $S$ a multiplicative subset of $A$, $S$ a subset of the units of $B$, and $B$ as defined before. If $a$ is prime in $A$ and $aA\cap S=\emptyset$, then $aB\cap A=aA$.

The containment $aB\cap A\supseteq aA$ always holds. If $a\frac{a'}{s}=a''$, then from $aa'=a''s$ and the disjointness condition, in follows $a''\in aA$.
The reason this seems plausible is that it seems parallel with the next question and might be a stepping stone. However, I'm not a commutative algebraist, and a commutative algebraist would be more sensitive to how this problem is to fill in the proof for the statement in the body of question 18.

As for localization in general, you will find out as you study that it's a formal process for defining rings of fractions like the one you described with the set $B$. Basically given a multiplicative subset $S$ of a commutative ring $A$, you can use an equivalence relation to define a ring of fractions. In this new ring of fractions, the things inside $S$ are turned into invertible elements. 
Under certain circumstances there is a copy of $A$ inside this ring, so you can view $A$ as being expanded to this bigger ring in which there are now more units. In this language the set $B$ you described is the localization of $A$ at the set $S$.
I think the main reason for the term "localization" is that this process somehow "zooms in" on some of the information of the ring by adding inverses this way by turning elements into units. Another reason for the term localization is that if you do this with $S=A\setminus P$ where $P$ is a prime ideal of $A$, the localization is a local ring. That means you've effectively discarded information about all maximal ideals except one, and that's very "local."
