Proving that $(M \otimes_A N)_q = M_p \otimes_{A_p} N_q$ for a prime $q$ lying over $p$

Let $$f : A \to B$$ be a morphism between unital commutative rings. We can thus consider $$B$$-modules as $$A$$-modules via this map, and $$A$$-modules as $$B$$-modules via tensoring with $$- \otimes_A B$$.

Not let $$M$$ and $$N$$ be $$A$$- and $$B$$-modules respectively. Given a prime $$q$$ of $$B$$ and lying over a prime $$p$$ in $$A$$, we know that $$f$$ descends to a map between the respective localizations and so a similar correspondence as above holds for their respective modules.

I want to show that $$M_p \otimes_{A_p} N_q \simeq (M \otimes_A N)_q,$$ as $$B_q$$-modules.

My reasoning is as follows: since

$$(M \otimes_A N)_q \simeq M \otimes_A N \otimes_B B_q \simeq M \otimes_A N_q,$$

and $$N_q$$ is a $$B_q$$-module, it is an $$A_p$$-module, hence $$N_q \simeq A_p \otimes_{A_p} N_q$$ and therefore

$$(M\otimes _A N)_q \simeq M \otimes_A A_p \otimes_{A_p} N_q \simeq M_p \otimes_{A_p} B_q.$$

This sounds okay but I am using the "associativity of tensor product with respect to different rings" without caring much about it.

A sanity check and/or a reference would be much appreciated.

• It seems like your concern is the justification that if $M$ is a right $A$-module, $N$ is a $(A,B)$-bimodule, and $L$ is a left $B$-module, then $(M\otimes_A N)\otimes_B L\cong M\otimes_A (N\otimes_B L)$. Does this answer your question? Aug 17, 2020 at 2:07
• I guess that, yes, that answers it; although I'd appreciate if you could look at my argument just in case there is a mistake somewhere. Aug 17, 2020 at 3:27
• Your argument works! The fact that the tensor product is "associative over multiple rings" is the content of my link, and your solution has simply applied this multiple times. Aug 17, 2020 at 3:31
• Awesome. Can you make the comment into an answer? Aug 17, 2020 at 3:31

Your argument works! You've simply applied the fact that if $$f : A\to B$$ is a ring morphism, $$M$$ is a right $$A$$-module, $$N$$ is a $$(A,B)$$-bimodule, and $$L$$ is a left $$B$$-module, then $$(M\otimes_A N)\otimes_B L\cong M\otimes_A (N\otimes_B L)$$ (see here). Let us call this fact $$(*).$$ As you know, if $$M$$ is an $$R$$-module and $$S\subseteq R$$ is a multiplicative set, then $$S^{-1}M\cong M\otimes_R S^{-1}R;$$ call this fact $$(**).$$ Then your argument is the following computation: \begin{align*} (M\otimes_A N)_q &\cong (M\otimes_A N)\otimes_B B_q\qquad\quad\textrm{(using (**))}\\ &\cong M\otimes_A(N\otimes_B B_q)\qquad\quad\textrm{(using (*))}\\ &\cong M\otimes_A N_q\qquad\qquad\qquad\textrm{(using (**))}\\ &\cong M\otimes_A (A_p\otimes_{A_p} N_q)\qquad\textrm{because }R\otimes_R M\cong M\\ &\cong (M\otimes_A A_p)\otimes_{A_p} N_q\qquad\textrm{(using (*))}\\ &\cong M_p\otimes_{A_p} N_q\qquad\qquad\quad\textrm{(using (**))}. \end{align*}