[proofplan]
We use the definition of an internal direct sum: $M=A\oplus B$ means that $M=A+B$ and $A\cap B=\{0_M\}$. The equality $M=A+B$ gives existence of decompositions, while the trivial intersection forces uniqueness by subtracting two decompositions. Conversely, unique decomposition gives existence, hence $M=A+B$, and comparing the two decompositions $x=x+0_M=0_M+x$ for $x\in A\cap B$ forces $x=0_M$.
[/proofplan]
custom_env
admin
[step:Use the internal direct sum conditions to prove existence and uniqueness]Assume $M=A\oplus B$ as an internal direct sum. By definition, this means
\begin{align*}
M=A+B
\end{align*}
and
\begin{align*}
A\cap B=\{0_M\}.
\end{align*}
Let $m\in M$. Since $M=A+B$, there exist $a\in A$ and $b\in B$ such that
\begin{align*}
m=a+b.
\end{align*}
This proves existence.
To prove uniqueness, suppose $(a,b),(a',b')\in A\times B$ satisfy
\begin{align*}
m=a+b=a'+b'.
\end{align*}
Subtracting $a'$ and $b$ in the additive group of $M$ gives
\begin{align*}
a-a'=b'-b.
\end{align*}
Because $A$ is a submodule and $a,a'\in A$, we have $a-a'\in A$. Because $B$ is a submodule and $b',b\in B$, we have $b'-b\in B$. Hence the common element $a-a'=b'-b$ lies in $A\cap B$. Since $A\cap B=\{0_M\}$, it follows that
\begin{align*}
a-a'=0_M.
\end{align*}
Therefore $a=a'$, and substituting into $a+b=a'+b'$ gives $b=b'$. Thus the ordered pair $(a,b)$ is unique.[/step]
custom_env
admin
[guided]Assume $M=A\oplus B$ as an internal direct sum. The phrase “internal direct sum” means two separate facts: first, every element of $M$ belongs to the submodule sum $A+B$; second, the overlap between $A$ and $B$ is only the zero element. In symbols,
\begin{align*}
M=A+B
\end{align*}
and
\begin{align*}
A\cap B=\{0_M\}.
\end{align*}
Let $m\in M$. Since $M=A+B$, the definition of the sum of two submodules gives elements $a\in A$ and $b\in B$ such that
\begin{align*}
m=a+b.
\end{align*}
This is exactly the existence part of the desired decomposition.
Now we prove that no other ordered pair can give the same element. Suppose $(a,b),(a',b')\in A\times B$ both decompose $m$, so
\begin{align*}
m=a+b=a'+b'.
\end{align*}
We compare these two expressions by moving all $A$-terms to one side and all $B$-terms to the other. Using the additive group structure of the module $M$, we subtract $a'$ and $b$ to obtain
\begin{align*}
a-a'=b'-b.
\end{align*}
The point of this rearrangement is that the left-hand side is visibly in $A$, while the right-hand side is visibly in $B$. Indeed, $A$ is a submodule, so it is closed under subtraction; since $a,a'\in A$, we have $a-a'\in A$. Likewise, $B$ is a submodule, so since $b',b\in B$, we have $b'-b\in B$. Therefore the common element $a-a'=b'-b$ belongs to $A\cap B$.
The internal direct sum hypothesis says $A\cap B=\{0_M\}$. Hence
\begin{align*}
a-a'=0_M.
\end{align*}
Thus $a=a'$. Substituting this equality into $a+b=a'+b'$ gives $b=b'$. Therefore the pair $(a,b)$ is unique.[/guided]
custom_env
admin
[step:Use unique decompositions to recover the internal direct sum conditions]
Assume that for every $m\in M$ there exists a unique ordered pair $(a,b)\in A\times B$ such that
\begin{align*}
m=a+b.
\end{align*}
First, the existence part gives $M\subset A+B$. The reverse inclusion $A+B\subset M$ holds because $A$ and $B$ are submodules of $M$. Therefore
\begin{align*}
M=A+B.
\end{align*}
It remains to prove that $A\cap B=\{0_M\}$. Since $A$ and $B$ are submodules of $M$, both contain $0_M$, so
\begin{align*}
\{0_M\}\subset A\cap B.
\end{align*}
Let $x\in A\cap B$. Then $x\in A$ and $x\in B$. Since $0_M\in A$ and $0_M\in B$, the element $x$ has two decompositions:
\begin{align*}
x=x+0_M
\end{align*}
with $(x,0_M)\in A\times B$, and
\begin{align*}
x=0_M+x
\end{align*}
with $(0_M,x)\in A\times B$. By uniqueness of the ordered pair representing $x$, we have
\begin{align*}
(x,0_M)=(0_M,x).
\end{align*}
Thus $x=0_M$. Hence $A\cap B\subset \{0_M\}$, and therefore
\begin{align*}
A\cap B=\{0_M\}.
\end{align*}
We have shown $M=A+B$ and $A\cap B=\{0_M\}$, so by the definition of internal direct sum,
\begin{align*}
M=A\oplus B.
\end{align*}
[/step]