The Krull-Schmidt theorem says that the decomposition of a finite-length module as a direct sum of indecomposable modules is unique up to isomorphisms and permutations of the indecomposable modules. Is there a counterexample to this if you replace "finite-length" with "finitely generated"? That is, is there an example of a finitely generated module $N$ over a ring such that $N$ has two inequivalent decompositions to direct sums of indecomposable modules?
I know the example must be of infinite length. I believe it exists but still cannot find it.
Have you got any ideas?
Let $R$ be any Dedekind domain that is not a PID and let $I\subset R$ be a non-principal ideal. Then $I$ is a finitely generated projective $R$-module, so it is a direct summand of $R^n$ for some $n$. Writing $R/I$ as a direct sum of indecomposable modules, we get a decomposition of $R^n\cong I\oplus R/I$ as a direct sum of indecomposable modules, where one of the indecomposable modules is $I$. This decomposition is then inequivalent to the decomposition $R^n\cong R\oplus R\oplus\dots\oplus R$, since $I$ is not principal.
(More generally, a similar construction works for any Noetherian ring $R$ which is indecomposable as a module over itself and over which there is a finitely generated projective module that is not free. (The Noetherian condition is needed to be sure that the decomposition can be refined to one consisting of indecomposable modules.))