TITLE: Why are finitely generated modules over principal artin local rings direct sums of cyclic modules?
QUESTION [19 upvotes]: I am looking for a proof of the following fact:
If $R$ is a principal artin local ring and $M$ a finitely generated $R$-module, then $M$ is a direct sum of cyclic $R$-modules.
(Apparently such rings $R$ are called, e.g. in Zariski-Samuel, special principal ideal rings.)
I almost didn't ask this question for fear that I might just be missing something obvious, but I've been unable to come up with a proof myself and I can't find one anywhere (if I am just being stupid I certainly don't mind being told). Zariski-Samuel proves a structure theorem for principal ideal rings (they are products of PID's and special PIR's), as well as the fact that a submodule of a principal ideal ring generated by n elements is generated by $\leq n$ elements. I thought perhaps the statement above could be deduced from this last fact, in a similar manner to the way one proves the corresponding result for finite modules over PID's, but the obstruction to this (as I see it) is that submodules of free $R$-modules will not in general be free (for instance, the maximal ideal of $R$ is not free, assuming $R$ is not a field, i.e., has length $\geq 2$). Essentially the naive induction on the number of generators doesn't seem to work because I can't be sure that the relevant exact sequence splits...again, maybe I'm just being foolish. I think a proof might be found in chapter VIII of Bourbaki's Algebra text, but this chapter isn't in my copy (I think maybe it's only available in French).
Incidentally, it's straightforward to show that, if such a decomposition exists, the number of times a factor of the form $R/(\pi^i)$, where $(\pi)$ is the maximal ideal of $R$ and $1\leq i\leq k$ ($k$ being the length of $R$, i.e., the index of nilpotency of $(\pi)$) is uniquely determined as the length of a quotient of $M$, for instance.
The reason I'm interested in this is because I want to know that the isomorphism type of $M$ is completely determined by the function sending $i$, $1\leq i\leq k$, to the length of $M[\pi^i]$ (the kernel of multiplication by $\pi^i$), which, assuming such a decomposition exists, is definitely the case.
Edit: I realized that my module M can (being artinian) be written as a finite direct sum of indecomposable submodules, so I guess this reduces my question to: must an indecomposable submodule of $M$ be a cyclic?

REPLY [9 votes]: The "local Artinian" assumption in OP's question can be removed as the following more general result holds (rings are supposed unital and commutative):

If $M$ is a finitely generated module over a principal ideal ring $R$ then $M$ is the direct sum of finitely many cyclic $R$-modules $R/(a_i)$ with $a_i \in R$, such that $R \neq (a_1) \supset \cdots \supseteq (a_n)$. In addition, the principal ideals $(a_i)$ are unique with respect to this property.

A principal ideal ring (PIR) is a ring whose ideals are principal, equivalently a PIR is a Noetherian Bézout ring.
The aforementioned general result follows from the existence and uniqueness of the invariant factor decomposition of Noetherian elementary divisor rings see [Theorems 9.1 and 9.3, 1]. The fact that a PIR is an elementary divisor ring in the sense of I. Kaplansky is an immediate consequence of [Theorem 12.3 and subsequent remark, 1] and can also be inferred from [Theorem 1, 2]. This fact is stated without proof in [Notes on Chapter I, 3].
By the way, it is rather unfair to allude to Zariski-Samuel's structure theorem (as T. W. Hungerford in [2] and subsequently in the wikipedia article on PIRs) when quoting the result about PIR decomposition in direct sum of domains and Artinian local rings. Indeed, this theorem was originally proved by W. Krull in 1924 and reproved by I. Kaplansky in 1949, cf. [Theorem 12.3, 1] and related comments therein.

[1] "Elementary divisors and modules", I. Kaplansky, 1949 (MR0031470).
[2] "On the structure of principal ideal rings", T. W. Hungerford, 1968 (MR0227159).
[3] "Serre's problem on projective modules", T. Y. Lam, 2006 (MR2235330).