This is exercise $20.13$ in Eisenbud. I ask a subproblem of it.
For $R$ a reduced a ring and $M$ a finitely generated projective $R$-module show:
The function $\mu_M(P)=\dim_{R_P/PR_P}(M_P/PM_P)$ is locally constant on $\mathrm{Spec}(R)$.
It is not hard to prove this assuming $M$ is finitely presented. How to do it in a general case.