Equivalence of Cohen-Macaulay type definitions

I knew that the type of Cohen-Macaulay had these two definitions:

  • Let $ (R, mathfrak {m}, k) $ to be a local group Cohen-Macaulay (noetherian); $ M $ a finish $ R $-module of depth t. The number $ r (M) = dim_k Ext_R ^ t (k, M) $ is called Cohen-Macaulay type $ M $.
  • M & # 39; said $ beta_i (M) $ Betti numbers in a minimal free resolution of $ M $ ($ M $ is a $ R $as before) then the type of Cohen-Macaulay $ M $ is the last non-zero Betti number, is it $ r (M) = beta_s (M) $.

I would therefore ask how to prove the equivalence of these two definitions. There are books in which I can find this proof?