$C=A \cdot B$ matrices and exact sequence of $DVR$-modules I'm looking for a proof or a reference for the following statement:
Let $R$ be a DVR (Discrete Valuation Ring) and $p$ a prime element, and let $\mathfrak a$, $\mathfrak b$ and $\mathfrak c$ be finitely generated $p$-modules. A $p$-module is a right $R$-module $V$ such that $Vp^e = 0$ for some $e \in \mathbb N$. Let $\alpha,$ $\beta$ and $\gamma$ be the invariant factors of   $\mathfrak a$, $\mathfrak b$ and $\mathfrak c$ (we mean that for example $\mathfrak a = \oplus_i R/Rp^{\alpha_i}$ ). Suppose we know that $$0 \to \mathfrak b \to \mathfrak c \to \mathfrak a \to 0$$ is exact. Then there exist matrices $A$, $B$ and $C$ with entries in $R$ and invariant factors $\alpha$, $\beta$ and $\gamma$ (we mean that $A$ can be transofrmed with elementary rows/columns operations into a diagonal matrix $d_A=(p^{\alpha_1}, \cdots, p^{\alpha_n})$) such that $C= A \cdot B$.
I know how we can prove the converse: given matrices $C=AB$, we take as modules the cokernels of the maps $A,B,C$ as maps $R^n \to R^n$, and applying the snake lemma to the obvious diagram consisting of $A$, $B$, $C$ and the Identity Map.
Thanks!
 A: Remark. Note that there is no need to mention $\alpha$, $\beta$, and $\gamma$. Indeed, the relation between $A$ and $\mathfrak a$ is that there is a short exact sequence
$$0 \to R^n \stackrel A\to R^n \to \mathfrak a \to 0.$$
Since $A$ has nonzero determinant (i.e. $A$ is injective), the quotient $\mathfrak a$ is torsion. Conversely, for any finitely generated torsion $R$-module $\mathfrak a$, there exists such a matrix $A$, necessarily of nonzero determinant. Indeed, one can choose a surjection $R^n \twoheadrightarrow \mathfrak a$. Then the kernel will be free since a submodule of a free module over a DVR is free. The kernel has rank $n$ since $\mathfrak a$ has rank $0$ and rank is additive.
The statement that $A$ can be transformed into a diagonal matrix $\operatorname{diag}(p^{\alpha_1},\ldots,p^{\alpha_r})$ is the content of the Smith normal form (see e.g. wikipedia); this holds for any matrix over a PID. In particular, this does not impose extra conditions on $A$.
Thus, we may rephrase the question in terms of the 'obvious diagram': given $n\times n$-matrices $A$, $B$, and $C$ over $R$ with nonzero determinant with $C = AB$, we get a commutative diagram with exact rows
$$\begin{array}{ccccccccc}0 & \to & R^n & \stackrel B\to & R^n & \to & \mathfrak b & \to & 0 \\ & & \stackrel{C}{}\downarrow \ \ & & \ \downarrow \stackrel{A}{} & & \downarrow \\ 0 & \to & R^n & \stackrel{\operatorname{id}}\to & R^n & \to & 0 & \to & \ 0. \end{array}\label{Dia 1}\tag{1}$$
The snake lemma gives a short exact sequence $0 \to \mathfrak b \to \mathfrak c \to \mathfrak a \to 0$.
Question. Conversely, given such a sequence $0 \to \mathfrak b \to \mathfrak c \to \mathfrak a \to 0$, does there exist a diagram (\ref{Dia 1}) giving rise to this short exact sequence?
Answer. You can always do this, for $n$ the number of cyclic factors of $\mathfrak c$ (i.e. the minimum number of generators for $\mathfrak c$). Note that a priori $\mathfrak a$, $\mathfrak b$, and $\mathfrak c$ need not have the same number of cyclic factors.
Proof. Choose a surjection $R^n \to \mathfrak c$. Consider the induced surjection $R^n \twoheadrightarrow \mathfrak c \twoheadrightarrow \mathfrak a$. This gives a presentation
$$0 \to F_1 \stackrel A\to F_0 \to \mathfrak a \to 0$$
as above, where $F_0$ and $F_1$ are free of rank $n$ (with different names to avoid confusion). Under the map $F_0 \to \mathfrak c$, we see that $F_1$ maps to $\mathfrak b$, because both are the kernels of the respective maps to $\mathfrak a$.
The map $F_1 \to \mathfrak b$ is surjective since $F_0 \to \mathfrak c$ is. Let $F_2$ be its kernel; it is again free of rank $n$. This gives the commutative diagram
$$\begin{array}{ccccccccc}0 & \to & F_2 & \to & F_1 & \to & \mathfrak b & \to & 0 \\ & & \downarrow & & \downarrow & & \downarrow \\ 0 & \to & F_0 & \stackrel{\operatorname{id}}\to & F_0 & \to & 0 & \to & \ 0. \end{array}$$
This gives a diagram as (\ref{Dia 1}), by writing $F_i \cong R^n$ and naming the appropriate maps $A$, $B$, and $C$. One easily checks that it induces the short exact sequence we started with. $\square$
