For every finitely generated module $M$ over a Noetherian local ring $(R,\mathfrak m,k)$, every minimal generating set of $M$ has the same cardinality and that is given by $\dim_k(M\otimes_R k)=\dim_k(M/\mathfrak m M) $, and is usually denoted by $\mu_R(M)$.
Now, let $f:(R,\mathfrak m,k)\to (S,\mathfrak n,\mathcal l)$ be a homomorphism of Noetherian local rings, so that $f(\mathfrak m)\subseteq \mathfrak n.$ Via $f$, $S$ admits a natural $R$-module structure $r\cdot s=f(r)s, \forall r\in R, s\in S.$ Let $M$ be a finitely generated $R$-module, hence $M\otimes_R S$ is a finitely generated $S$-module. If $n=\mu_R(M)$ , then there is an $R$-linear surjection $R^{\oplus n}\to M\to 0$ which, after tensoring with $S$, induces an $S$-linear surjection $S^{\oplus n} \to M\otimes_R S\to 0$, hence $\mu_S(M\otimes_R S)\le \mu_R(M)$.
My question:
Is it actually true that $\mu_S(M\otimes_R S)= \mu_R(M)$ ?
Yes, it is true.
$\mu_R(M)=\dim_{R/\mathfrak m}M\otimes_R R/\mathfrak m$.
$\mu_S(M\otimes_R S)=\dim_{S/\mathfrak n}(M\otimes_R S)\otimes_S S/\mathfrak n$.
But $$(M\otimes_R S)\otimes_S S/\mathfrak n\simeq M\otimes_R S/\mathfrak n\simeq (M\otimes_R R/\mathfrak m)\otimes_{R/\mathfrak m}S/\mathfrak n,$$ and the last is an $S/\mathfrak n$-vectorspace of dimension $\mu_R(M)$.