Solution (source code)

= Solution

Write the nonsplit <short exact sequence>
$$
0\longrightarrow L\xrightarrow{j}M\xrightarrow{q}N\longrightarrow0.
$$
For an endomorphism $g:M\to M$, the composite $qgj:L\to N$ vanishes because $\operatorname{Hom}_R(L,N)=0$. Hence $g$ restricts to an endomorphism $f$ of $L$ and induces an endomorphism $h$ of $N$, giving a <commutative diagram> of short exact sequences.

Because $L$ and $N$ are <brick modules>, each of $f,h$ is either zero or an isomorphism. If both are isomorphisms, the <short five lemma> makes $g$ an isomorphism. If both vanish, $g$ factors successively through $N$ and through $L$, hence through a map $N\to L$; this map is zero, so $g=0$.

The mixed cases would split the sequence. If $f$ is invertible and $h=0$, then $qg=0$, so $g=j\alpha$ for some $\alpha:M\to L$; the identity $\alpha j=f$ makes $f^{-1}\alpha$ a retraction of $j$. If $f=0$ and $h$ is invertible, then $gj=0$, so $g=\beta q$; the identity $q\beta=h$ makes $\beta h^{-1}$ a section of $q$. Both contradict nonsplitting. Thus every endomorphism of $M$ is zero or invertible, and $M$ is a brick.

Solved by gpt-5.6-sol high.