Submodules of a direct sum of irreducible submodules I've found the following question in a textbook and I'm very confused on the very last part of the question regarding submodules of a direct sum of irreducible submodules.  Here's the problem:
A module is irreducible if its submodules are itself and the zero module. Let $M$ be a module over a commutative ring $R$ with unity, and assume that $M \cong N \oplus P$ for two irreducible $R$ modules $N,P$.  Let $Q$ be a nonzero $R$ submodule of $M$.  Prove that following:
a) As $R$ modules, $N \cong R/I$, for ideal $I$ of $R$.
b) If $Q \cap N \neq \{0\}$, then $Q=M$ or $Q=N$.
c) If $Q \cap N = \{0\}$, then $M \cong Q \oplus N$.
d) If $N$ and $P$ are not isomorphic as $R$ modules, then the only submodules of $M$ are $\{0\},N,P,M$.
part a-c is a very straightforward application of some basic theorems, and the definition they give of irreducibility.  However, part d seems to be contradictory.
I start by supposing the contrapositive.  Let $Q \subset M$ be an $R$ submodule of $M$ which is not $\{0\},N,P,M$. Implicitly, the external direct sum of modules doesn't contain $N,P$, but instead we are identifying $N \cong \iota(N)$ and $P \cong \iota(P)$under the canonical injections into the direct sum $P \oplus N$.  So in actuality, we are supposing that $Q \neq \{0\}, \iota(N),\iota(P),M$.
If $Q \cap \iota(N) \neq \{0\}$, then $Q=M$ or $Q=\iota(N)$ by b) (again in part b) we must be implicitly identifying $N$ with $\iota(N)$ for this to make sense), so this can't be true.  Hence $Q \cap \iota(N) = \{0\}$.  However then by c), we have that $M \cong Q \oplus N$. But in particular, if $Q \cap \iota(N) = \{0\}$, then $Q \subset \iota(P)$ (the isomorphic image of $P$ in $P \oplus N$ under the canonical inclusion).  This module is also irreducible since $P$ is, and since $Q \neq \{0\}$, this forces $\iota(P) \neq \{0\}$, and so $Q \cap \iota(P) \subset \iota(P)$ is a nonzero submodule of an irreducible $R$ module $\iota(P)$.  Hence $Q = \iota(P)$, but this contradicts that $Q \neq \iota(P)$...
Can someone help point out what I'm missing here / where I'm going wrong?  Thank you.
 A: The argument is very reminiscent of the group theoretic one for Goursat's Lemma.
Let $Q$ be a submodule of $M$. Then $\iota(N)\cap Q$ is (isomorphic to) a submodule of $N$, so it is either trivial or all of $\iota(N)$. Likewise with $ \iota(P)$.
If $Q$ contains both $\iota(P)$ and $\iota(N)$, then $Q=M$.
If $Q$ contains $\iota(N)$ and has at least one other element, $(n,p)$ with $p\neq 0$, then it also contains $(n,p)-(n,0) = (0,p)$, so the intersection with $\iota(P)$ is nontrivial, and we again get $Q=M$. If it contains no such elements, then $Q=\iota(N)$.
Symmetrically if $Q$ contains $\iota(P)$.
So assume the intersections of $Q$ with $\iota(N)$ and with $\iota(P)$ are both trivial. Consider now the projections $\pi_N(Q)$ and $\pi_P(Q)$. If $\pi_N(Q)$ is trivial, then $Q\subseteq\iota(P)$, so $Q$ is either trivial or $\iota(Q)$. Symmetrically with $\pi_P(Q)$.
So we are down to the case where the intersections with $\iota(N)$ and $\iota(P)$ are trivial, but the projections are surjective.
I claim that for each $n\in N$ there exists a unique $p\in P$ such that $(n,p)\in Q$. Indeed, because the projection $\pi_N$ is surjective, there is at least one $p$. And if $(n,p),(n,p')\in Q$, then $(0,p-p')=(n,p)-(n,p')\in Q\cap\iota(P)$, so $p=p'$. Symmetrically with every $p\in P$ there exists a unique $n\in N$ such that $(n,p)\in Q$.
Define $f\colon N\to P$ by letting $f(n)=p$, where $(n,p)\in Q$.
It is straightforward to check that $f$ is a module isomorphism, which proves that if $N\oplus P$ has any submodules other than the four listed, then $N\cong P$, and these submodules are the "graphs" of isomorphisms $N\to P$.
