Direct product decomposition of theories of modules

?0. This paper is mainly concerned with describing complete theories of modules by decomposing them (up to elementary equivalence) into direct products of simpler modules. In ?1, I give a decomposition theorem which works for arbitrary direct product theories T. Given such a T, I define T-indecomposable structures and show that every model of T is elementarily equivalent to a direct product of T-indecomposable models of T. In ?2, I show that if R is a commutative ring then every R-module a? is elementarily equivalent to f1 MqlM, where M ranges over the maximal ideals of R and Q/M is the localization of Q at M. This is applied to prove that if R is a commutative von Neumann regular ring and TR is the theory of Rmodules then the TR-indecomposables are precisely the cyclic modules of the form RIM where M is a maximal ideal. In ?3, I use the decomposition established in ?2 to characterize the on-categorical and w-stable modules over a countable commutative von Neumann regular ring and the superstable modules over a commutative von Neumann regular ring of arbitrary cardinality. In the process, I also prove several general characterizations of w-stable and superstable modules; e.g., if R is any countable ring, then an R-module is w-stable if and only if every R-module elementarily equivalent to it is equationally compact.