TITLE: Taking fractions $S^{-1}$ commutes with taking intersection
QUESTION [5 upvotes]: Let $N,P$ be submodules of an $R$-module $M$ and let $S$ be a multiplicative subset of $R$. I think I proved $S^{-1}(N \cap P) = S^{-1}N \cap S^{-1} P$ but since my proof is not the same as the one given in Atiyah-MacDonald on page 39 I suspect there is something wrong with it. Can you tell me please what's wrong here:
Claim: $S^{-1}(N \cap P) = S^{-1}N \cap S^{-1} P$
Proof: 
$\frac{m}{s} \in S^{-1}N \cap S^{-1} P \iff$ $\frac{m}{s} \in S^{-1}N$ and $\frac{m}{s} \in S^{-1}P \iff m \in N$ and $m \in P \iff m \in N \cap P \iff \frac{m}{s} \in S^{-1}(N \cap P)$.

REPLY [4 votes]: In your notation, it doesn't have to be the case that $m \in N$. There just needs to be an $s' \in S$ such that $s'm \in N$. For example, take $R = M = \mathbf Z$, $N = 6\mathbf Z$, and $S = \{1, 2, 2^2, \ldots\}$. But having made this change, I think you can complete your proof.