Given free modules $N \le M$ of finite rank over a PID $R$, it's well-known that there is a basis $\{x\_1,\ldots,x\_n\}$ of $M$ and there are $e\_1,\ldots,e\_n \in R$ such that $\{e\_ix\_i\mid e\_i \neq 0\}$ is a basis of $N$.


Now my question is, if this property also holds for chains of submodules. 


Formally: Let $L \le N$ with $N,M$ as above. Is there a basis $\{ x\_1, \ldots, x\_n \}$ of $M$ and are there $e\_i, f\_i\in R$ such that $\{e\_ix\_i\mid e\_i \neq 0\}$ is a basis of $N$ and $\{f\_ie\_ix\_i\mid e\_i\neq 0 \wedge f\_i \neq 0\}$ is a basis of $L$ ? 


This is true for fields but I have no idea if it also holds for all PIDs. 


N.b. I asked this question on [math.stackexchange](https://math.stackexchange.com/questions/1651033/elementary-divisors-for-chains-of-submodules) some days ago but got no answer. 



Elementary divisors for chains of submodules
No. For example, let $R=\mathbb{Z}$, $M=\mathbb{Z}^2$, $N$ the subgroup generated by $(4,0)$ and $(2,1)$, and $L$ the subgroup generated by $(8,0)$ and $(0,2)$.


Then $M/N$ and $N/L$ are both isomorphic to $\mathbb{Z}/4\mathbb{Z}$, so if there were bases as described in the question, $M/L$ would have to be isomorphic to $\mathbb{Z}/16\mathbb{Z}$ or to $\mathbb{Z}/4\mathbb{Z}\oplus\mathbb{Z}/4\mathbb{Z}$.


But $M/L\cong\mathbb{Z}/8\mathbb{Z}\oplus\mathbb{Z}/2\mathbb{Z}$.


This example is based on the fact that there is a short exact sequence
$$0\to\mathbb{Z}/4\mathbb{Z}\to\mathbb{Z}/8\mathbb{Z}\oplus\mathbb{Z}/2\mathbb{Z}\to\mathbb{Z}/4\mathbb{Z}\to0.$$


