This question is motivated by [this one](https://mathoverflow.net/questions/69353/an-example-of-a-rank-one-projective-r-module-that-is-not-invertible). The main point of the question (was) to try to weaken the notion of rank. After the answers and comments, it seems this is not a good way to do it, but perhaps it is still useful for anyone trying to do the same.


**Remark:** Conditions added after Hailong's comment and Tom's answer: $R$ reduced and $M$ indecomposable.


Let $R$ be a reduced noetherian ring and $M$ an indecomposable $R$-module.
For any prime $p\in\mathrm{Spec} R$ with residue field $\kappa(p)$ define
$$\delta\_M(p)=\dim (M\otimes\_R \kappa(p))$$
the local rank of $M$ at $p$.



> 
> **Question 1:** If $\delta\_M(p)=1$ for all $p$, does it follow that $M\_p\simeq R\_p$? Or more generally, if $\delta\_M$ is constant, does it imply that $M\_p$ is a free $R\_p$-module for all $p$?
> 
> 
> 


**Remarks**


**1** If $M$ is finitely generated, then by Nakayama lemma these questions are easy. (See Exercise II.5.8 on page 125 in [Hartshorne]).


**2** [Tom Goodwillie](https://mathoverflow.net/users/6666/tom-goodwillie) points out that if $R=\mathbb Z$ and $M\subset \mathbb Q$ consists of all rational numbers $a/b$ such that $b$ is square-free, then $M\_p\simeq R\_p$, but it is not invertible, so that would be too much to ask.


**3** [Yves Cornulier](https://mathoverflow.net/users/14094/yves-cornulier) shows [here](https://mathoverflow.net/questions/69353/an-example-of-a-rank-one-projective-r-module-that-is-not-invertible/69414#69414) that if $M$ is projective and $M\_p\simeq R\_p$, then $M$ is finitely generated. In other words, if the answer to (the first part of) Question 1 is "YES" then $M$ cannot be projective. So this suggests a subquestion...



> 
> **Question 1a:** 
>  Does there exist an example of an $R$ and a non-finitely generated projective $M$ for which $\delta\_M$ is constant?
> 
> 
> 


And let me include also a somewhat vague, but related question:



> 
> **Question 2:** Is the class of modules $M$ for which $\delta\_M$ is finite for all $p$ interesting? Is there some kind of a finiteness condition they satisfy? (Other than the one that this means directly). Maybe with some additional hypetheses? (projective?)
> 
> 
> 



The rank of a not necessarily finitely generated module.
Here are a few comments, too long to fit in the comments box. 


1) One can modify Tom Goodwillie's example as follows: for simplicity lets pick $R$ to be a local domain of dimension $1$ (so there are only $2$ prime ideals, $0$ and $\mathfrak m$, with residues $K$, the quotient field and $k$, the residue field of $R$ respectively). Then any module $M$ that fits into a short exact sequence:


$$0 \to k \to M \to K \to 0 $$ would satisfy: $\delta\_M(0)= \delta\_M(\mathfrak m) =1$. But $M\_{\mathfrak m} =k$ is not a free $R\_{\mathfrak m}=R$-module.


Note that one can not try the exact sequence with $k, K$ swapped, since $Ext^1\_R(k,K)=0$. On the other hand $Ext^1(K,k)$ is complicated, since projective resolutions of $K$ [depend on the continuum hypothesis](http://www.jstor.org/pss/1994890)! 


2) To weed out examples like above, perhaps more relevant than indecomposability or projectivity is to require $M$ to be *torsion-free*, so $M$ injects into $M\otimes Q(R)$ ($Q(R)$ is the total ring of quotients). 


Say we assume this and the "rank" is $1$. Then immediately we know that $M$ is a submodule of $Q(R)$, and this more or less describes $M$: at every prime $p$, once we tensor with $\kappa (p)$, basically only one denominator of $M$ (that is not in $R$) is left. When $R=\mathbb Z$, one can see the example in your 2) very clear from this point of view.


3) Finally, I am not sure we should call $\delta\_M(p)$ the local "rank". When $M$ is finitely generated, $\delta\_M(p)$ is the *minimal number of generators of $M$ locally at $p$*. Of course, if $M$ is locally free, it will be the rank, but we definitely do not want to assume that.


This perhaps explains why the easy counter-examples by me and Tom Goodwillie exist: $M$ can locally have a constant number of generators, but it generally does not mean $M$ is locally free. 


