In exercise 1.2.6 of the french version (seems like it is also the case of the english version) of Algebre Commutative by Bourbaki, a function $\lambda$ was defined to assign each $R$-module the maximal length of its presentation. Here, the presentation (of length $n$) is defined to be an exact sequence $L_n \to L_{n-1} \to \cdots \to L_0 \to M \to 0$, with $L_i$ finitely generated and free and no other restrictions, and $\lambda(M)$ is the least upper bound for integers $n$ such that $M$ admits a presentation of length $n$. When $M$ is not finitely generated, let $\lambda(M)=-1$. My question is that, is this indeed well-defined?
Given two exact sequences $E \to N \to 0$ and $0 \to A \to B$, one can 'glue' them together: $E \to N \to A \to B$ with the connecting morphism $N \to A$ defined to be $0$. Therefore, we are able to infinitely extend any presentation... Right?
In my mind, the correct definition should be:
$\lambda(M)$ is the minimal $n$ such that $M$ admits an exact sequence $0 \to L_n \to L_{n-1} \to \cdots \to L_0 \to M \to 0$ with $L_i$ free.
Edit:
Well, it seems like the definitions the book is giving and I am giving are unrelated. There was a Prove that for any module $M$ over a noetherian ring $R$, $\lambda(M)$ equals $\infty$ or $-1$.