Let $M$ be a finitely generated projective module over a commutative ring $R$ with finitely maximal ideals. Also assume that $M$ has constant rank i.e. rank of $M_P$ as $R_P$-module remains constant as $P$ varies over all prime ideals of $R$. How to show that $M$ is free ?
I'm allowed to assume that finitely generated projective modules over local rings are free.
My try: Let $J$ be the Jacobson radical of $R$. Then $R/J$ is a finite direct product of fields. Now $M/JM$ is a projective $R/J$-module. Now I'll be done if I can show $M/JM$ is free over $R/J$. Unfortunately I'm unable to show this last part.
Please help.
As you say, one may reduce to the case when $R$ is a finite direct product of fields. Say $R = \prod_{i=1}^{n} F_{i}$, and $M$ has constant rank $r \in \mathbb{N}$. Let $e_{1}, \ldots, e_{n}$ be the corresponding standard idempotents of $R$, and put $J_{i} = e_{i}R$; it is both an ideal of $R$ and a ring (not a subring of $R$, though!) which is isomorphic to $F_{i}$. The maximal ideals $P_{1}, \ldots, P_{n}$ of $R$ are given by $P_{i} = \bigoplus_{j \neq i} e_{i}R$. Here is the outline of an approach, whose details I leave to you.
$(1)$ Show that the localization $R_{P_{i}} \cong F_{i}$, so that $M_{P_{i}}$ is a free $F_{i}$-module of rank $r$. Observe that the isomorphism $M_{P_{i}} \cong F_{i}^{r}$ is also an isomorphism of $R$-modules, suitably interpreted.
$(2)$ Show that $M \cong \prod_{i=1}^{n} J_{i}M$ as $R$-modules.
$(3)$ Show that $M_{P_{i}} \cong J_{i}M$ as $R$-modules.
$(4)$ Use $(1)$-$(3)$ to conclude that $M \cong R^{r}$ as $R$-modules.