Length of a module (source code)

= Length of a module
{title2=$\operatorname{length}_R(M)$}
{wiki}

= Module length
{synonym}

A <module> has finite length when it admits a <composition series of a module>, and its length is the number of <simple modules> among the successive quotients. The <Krull–Schmidt theorem> concerns decompositions into indecomposable summands; the independence of composition length instead follows from the <Jordan–Hölder theorem>. A module without a finite composition series is assigned infinite length.

Length is additive in a <short exact sequence>: $\ell(M)=\ell(N)+\ell(M/N)$ when the outer modules have finite length. For example, $\mathbb Z/p^r\mathbb Z$ has length $r$, with each successive factor isomorphic to $\mathbb Z/p\mathbb Z$. The module $\mathbb Z$ has infinite length, as its descending chain $2^n\mathbb Z$ never stabilizes.