# A formula for the minimum number of generators of a module over a semilocal ring

Let $R$ be a commutative ring with only finitely many maximal ideals $\mathfrak m_1,\ldots,\mathfrak m_r$. Let $M$ be a finitely generated $R$-module. Then $$\mu_R(M)=\max\{\dim_{R/\mathfrak m_i}M/\mathfrak m_iM\mid 1\leq i\leq r\},$$ where $\mu_R(M)$ is the minimum number of generators of $M$ as $R$-module.

How can I prove this?

Of course the inequality $\geq$ is trivial; what I want to prove is that $\dim_{R/\mathfrak m_i}M/\mathfrak m_iM\leq\mu_R(M)$.

I was trying to prove it first if $R$ is a finite product of fields but I wasn't succesful; any help?

-
I have a strong feeling wxu's answer in your previous problem might hold the key, although I have not checked. – rschwieb May 29 '12 at 0:29
I change \mathrm{dim} to \dim and \mathrm{max} to \max. Both are standard usage. One of the differences in the outcome is that in a "displayed" setting, \max_{x\in S} will look like this: $\displaystyle\max_{x\in S}$, with the subscript directly below $\max$ (that last feature doesn't work in an "inline" setting). Another difference is that in things like $a\max b$, you automatically get proper spacing before and after $\max$, so you don't need to add spacing by hand. – Michael Hardy May 29 '12 at 2:07

Well, for simplicity of writing, we assume $r=2$, that is, $R$ has only two maximal ideals. Pick $x_i,y_j\in M$ and assume the images of $x_1,\ldots, x_n$ is a basis of $M/\mathfrak{m}_1M$, and the images of $y_1,\ldots,y_m$ is a basis of $M/\mathfrak{m}_2M$, and assume $n\leq m$. Now consider the map $$(R/\mathfrak{m}_1\mathfrak{m}_2R)^m\to M/\mathfrak{m}_1M\times M/\mathfrak{m}_2M$$ sending $e_i$ to $(x_i,y_i)$ for $i=1,\ldots,n$, and $e_{k}\to (x_1,y_k)$ for $k\geq n+1$ if it exists, where $e_l$ is a basis of LHS. This map is surjective. Now lifting this map gives a map $R^m\to M$, and by Nakayma's lemma, $R^m\to M$ is surjective.
Maybe we should think about the baby case: $R=k_1\times k_2$, $M=k_1\times k^2_2$, what is a generating set of $M$ as $R$-module?
How can you prove that $(x_i,y_j)$, with $i\neq j$, belongs to the image of the defined map? – user26857 Jan 6 '13 at 17:07
@YACP, by Chinese remainder theorem, $R/\mathfrak{m}_1\mathfrak{m}_2\cong R/\mathfrak{m}_1\times R/\mathfrak{m}_2$ as $R$-modules. I just pick a surjective $R$-morphism $(R/\mathfrak{m}_1)^l\times (R/\mathfrak{m}_2)^l\to M/\mathfrak{m}_1\times M/\mathfrak{m}_2$. – wxu Jan 26 '13 at 16:56