Is there an example of a module $M$ (over a commutative ring) that is not free, and such that each of its finitely generated submodule is semisimple (i.e. such that any submodule of any finitely generated submodule $N$ of $M$ is a direct factor of $N$) ?
closed as offtopic by YCor, JanChristoph SchlagePuchta, Sean Lawton, user44191, David Handelman Jun 13 at 14:35
This question appears to be offtopic. The users who voted to close gave this specific reason:
 "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – YCor, Sean Lawton, user44191, David Handelman

5$\begingroup$ Take $M=(A/\mathfrak{m})^\oplus n$ for any maximal ideal $\mathfrak{m}$, $\endgroup$ – Mohan Jun 13 at 0:14

$\begingroup$ Sounds like a mixture of 2 questions, none being researchlevel (1) find [a ring and] a nonfree semisimple module (this is very easy) (2) if every f.g. submodule of $M$ is semisimple then is $M$ semisimple (yes, classical and easy). $\endgroup$ – YCor Jun 13 at 6:23
@Mohan has already given an example in the comments. If you ask that the ring $A$ injects into $End_A(M)$, then here is an example. Let $M=\oplus {\mathbb Z}/p{\mathbb Z}$ be the $\mathbb Z$module (= an abelian group). Here $p$ runs over all primes. Then $M$ is not free and every finitely generated submodule is of the form $\oplus _{p \in S} {\mathbb Z}/p{\mathbb Z}$ where $S$ is a finite set of primes $p$. Hence $S$ is semisimple.

$\begingroup$ Thank you. Unless I am mistaken, the module $M$ is also semisimple. Is it also possible to find a example where $M$ is nonsemisimple ? $\endgroup$ – JonS Jun 13 at 3:29

$\begingroup$ If $N$ is the sum of all simple submodules of $M$, then it is an easy exercise that $N$ is semisimple. But if $v\in M\setminus N$, then $Av$ is a sum of simple modules by your assumptions, and hence $Av$ lies in $N$, contradiction. Hence $M=N$. $\endgroup$ – Venkataramana Jun 13 at 4:32