Direct summand of module Show that a direct summand of a direct summand is a direct summand.
I have tried it as:
Suppose $M= P+ Q $ and $P=N+N'$ . We need to show that $N$ is a direct summand of $M$. clearly, for all $m$ in $M$, we have $m=p+q$ and for all $p$ in $P$, $p=n+n'$ . Using this, $m=n+n'+q$. Also $N$ and $(N' + Q)$ intersect at 0 only.
I am not sure of this approach(because of the intersection part). I want to know is it a valid proof?
 A: Short Version
Let $M$ be an $R$-module, $N$ be a direct summand of $M$, and $Q$ be a direct summand of $N$. We want to show that $Q$ is also a direct summand of $M$. By definitions of $N$ and $P$, we have
\begin{align}
M &= N \oplus N' \\
N &= Q \oplus Q'
\end{align}
for some sub-module $N'$ of $M$ and sub-module $Q'$ of $N$ respectively. Hence, we have
$$M = (Q \oplus Q') \oplus N'$$
Since direct sums are associative up to isomorphism, we have
$$M = Q \oplus (Q' \oplus N')$$
Since $Q'$ is a sub-module of $N$ which is a sub-module of $M$, then $Q'$ is also a sub-module of $M$. Hence, $Q' \oplus N'$ is also a sub-module of $M$. In this case, we have constructed a complementary sub-module for $Q$ in $M$. Hence, $Q$ is also a direct summand of $M$.
Long Version
Let us follow OP's strategy to prove that $Q$ is a direct summand of $M$ by showing that each $m \in M$ can be expressed uniquely as $m = q + r$ for some $q \in Q$ and $r \in Q' \oplus N'$.
Since $N$ is a direct summand of $M$, then we have $m = n + n'$ uniquely for some $n \in N'$. Since $Q$ is a direct summand of $N$, then we have $n = q + q'$ uniquely for some $q \in Q$ and $q' \in Q'$.
From here, we have the unique sum $m = (q + q') + n' = q + (q' + n')$ for some $q \in Q$, $q' \in Q'$ and $n' \in N'$. By definition of direct sums, we have $q' + n' \in Q' \oplus N'$. Hence, we have the unique sum $m = q + (q' + n')$ for some $q \in Q$ and $q' + n' \in Q' \oplus N'$.
Taking $r = q' + n'$, we have $m = q + r$ uniquely for some $q \in Q$ and $r \in Q' \oplus N'$. This proves that $Q$ is also a direct summand of $M$.
