For an exact sequence $0\to M_1\overset{f_1}\rightarrow\cdots\overset{f_r}\rightarrow M_r\to0$ is it true that $l(M_i)-l(M_{i+1})=l(\ker(f_i))-l(\ker(f_{i+1}))$?
$M_i$s are modules and $l(M_i)$ denotes the length of a module. Each module is of finite composition length. I couldn't fit it into the title, but the exact sequence also includes $0\rightarrow M_1$ at the beginning and $M_r\rightarrow 0$ at the end.
From the first isomophism theorem, we know that
$$M_i/\ker(f_i)\cong im(f_i)$$ and, from the definition of cokernel, we know that $$coker(f_i)=M_{i+1}/im(f_i)$$
Taking lengths, we get $$l(M_i)-l(\ker(f_i))=l(M_{i+1})-l(coker(f_i)).$$ This is almost in the form I want it to be, except I have $coker(f_i)$ instead of $\ker(f_{i+1})$. Why should they be equal?
I can see that $$coker(f_i)=M_{i+1}/im(f_i)=M_{i+1}/\ker(f_{i+1})\cong im(f_{i+1}),$$ but that's not really helping me.
Because of:
$l(coker(f_i))=l(M_{i+1})-l(\ker(f_{i+1}))$ and $l(M_i)-l(\ker(f_i))=l(M_{i+1})-l(coker(f_i))$
We have: $$l(M_i)=l(\ker(f_i))+l(\ker(f_{i+1}))$$
And $$l(M_{i+1})=l(\ker(f_{i+1}))+l(\ker(f_{i+2}))$$
Hence: $$l(M_i)-l(M_{i+1})=l(\ker(f_i))-l(\ker(f_{i+2}))$$