I've met a problem in my algebra exercises.
Let $M_1,M_2,\ldots,M_n$ be submodules of $M$ such that each $M/M_i$ has finite length. Prove that $M/(M_1\cap M_2 \cap \cdots\cap M_n)$ has finite length. Moreover, determine a formula for computing this length.
I've tried some examples for this.
Let
$$
M=\mathbb{Z},M_1=4\mathbb{Z},M_2=9\mathbb{Z},M_3=6\mathbb{Z}
$$
Denote $c(M)$ be the length of module $M$.
We have,
$$
c(M/M_1)=c(M/M_2)=c(M/M_3)=2
$$
$$
c(M/(M_1\cap M_2))=4,c(M/(M_1\cap M_3))=3
$$
It seems that it should be the $\sum_{i=1}^nc(M/M_i)$ minus something showing the relations between $M_i$. But I cant figure it out.
Can you please help? Thank you!
EDIT:
A summary of the answer:
Thanks to Georges Elencwajg's help, the formula should be:
$$
\begin{align*}
\phantom{=}&c(M/(M_1\cap M_2 \cap \cdots\cap M_n))\\
&=c(M/M_1)+\cdots+c(M/M_n)\\
&\quad{}-(c(M/(M_1+M_2))+c(M/(M_1+M_3))+\cdots+c(M/(M_{n-1}+M_n)))\\
&\quad{}+(c(M/(M_1+M_2+M_3))+\cdots+c(M/(M_{n-2}+M_{n-1}+M_n)))\\
&\qquad{}\vdots\\
&\quad{}+(-1)^{n-1}c(M/(M_1+\cdots+M_n))
\end{align*}
$$