$M$ being the direct sum of submodules $(M_i)_{i \in I}$ is equivalent to a certain map (between $\operatorname{Hom}$-sets) being an isomorphism.

category-theorycommutative-algebramodules

I am currently trying to prove a remark in Bosch: Algebraic Geometry and Commutative Algebra (chapter 1.4):

Consider a family $(M_i)_{i \in I}$ of submodules in $M$. Then the inclusion maps $\iota_i \colon M_i \hookrightarrow M$ determine an $R$-module homomorphism
$$ \Phi \colon \operatorname{Hom}_R(M,N) \longrightarrow \prod_{i \in I} \operatorname{Hom}_R(M_i,N), \qquad \varphi \longmapsto (\varphi \circ \iota_i)_{i \in I} .$$ It is easily seen that $\Phi$ is an isomorphism for all R-modules $N$ if and only if $M$ is the direct sum of the submodules $M_i \subseteq M$.

I managed to prove the if-part of the claimed equivalence but am struggling with the only-if-part.

So let $(M_i)_{i \in I}$ be a family of submodules of an $R$-module $M$ and suppose $\Phi$ is an isomorphism for all $R$-modules $N$. We want to show that $ \sum_{i \in I} M_i = M $ and that this sum is in fact direct.

We can choose $N := \hat\oplus_{i \in I} M_i $, by which I denote the external direct sum of the $M_i$. Consider the family $(\tau_j)_{j \in I}$ of canonical homomorphisms $\tau_j \colon M_j \hookrightarrow \hat\oplus_{i \in I} M_i$ (with $\tau_j(m) := (\delta_{ji} m)_{i \in I}$). Since $\Phi$ is bijective, there is exactly one homomorphism $\varphi \colon M \rightarrow \hat\oplus_{i \in I} M_i$ with $ \Phi(\varphi) = (\tau_j)_{j \in I} $, i.e. with $\varphi \vert_{M_j} = \tau_j$ for all $j \in I$.

Now let $\sum_{i \in I} m_i \in \sum_{i \in I} M_i $ be arbitrary with $\sum_{i \in I} m_i = 0$. Then
$$ (0)_{i \in I} = \varphi(0) = \varphi\left( \sum_{i \in I} m_i \right) = \sum_{i \in I} \varphi(m_i) = \sum_{i \in I} \tau_i(m_i) = (m_i)_{i \in I}, $$
which implies $m_i = 0$ for all $i \in I$. Thus we have shown that the sum $\sum_{i \in I} M_i$ is indeed direct.

This is my problem: In order to show that $\sum_{i \in I} M_i$ is already the whole of $M$, I now wanted to take an arbitrary $m \in M$, map it to some $\varphi(m) = (m_i)_{i \in I} \in \hat\oplus_{i \in I} M_i $ and then claim $ m = \sum_{i \in I} m_i$ ($\in \sum_{i \in I} M_i$). If we knew for example that $ \varphi $ was injective, this would follow, since both $ \varphi(m) = (m_j)_{j \in I} $ and $$\varphi\left(\sum_{i \in I} m_i\right) = \sum_{i \in I} \varphi(m_i) = \sum_{i \in I} \varphi\vert_{M_i}(m_i) = \sum_{i \in I} \tau_i(m_i) = \sum_{i \in I} (\delta_{ij}m_i)_{j \in I} = (m_j)_{j \in I}. $$
I am struggling to show the injectivity of $\varphi$. I also have not really used that $\Phi$ is injective anywhere yet. What am I missing? Any hints much appreciated. 🙂

N.B.: In the book, the remark serves as a prelude to the universal mapping property of direct sums. So I do not want to use this universal property at this stage.

Edit: Changed the proof for the directness of the sum $\sum_{i \in I} M_i$ due to a comment of Daniel Schepler.

Best Answer

$\newcommand{\hom}{\operatorname{Hom}}$I know you don't want it just yet but for future reference here is the 'easy' way (the key observation being the second isomorphism):

$$\hom_R(M,N)\cong\prod_{i\in I}\hom_R(M_i,N)\cong\hom_R\left(\bigoplus_{i\in I}M_i,N\right)$$Naturally in $N$; use Yoneda lemma to conclude. We can make that more concrete: plug in $N=M$, plug in $\mathrm{Id}_M$ into the left hand side, find a morphism $\bigoplus_{i\in I}M_i\to N$ in the right hand side. Then plug in $N=\bigoplus_{i\in I}M_i$ in the right hand side and $\mathrm{Id}_{\bigoplus_{i\in I}M_i}$, find a morphism $M\to\bigoplus_{i\in I}M_i$ in the left hand side. It will follow these morphisms are mutually inverse so that $M\cong\bigoplus_{i\in I}M_i$ (via the inclusions $M_i\to M)$. Here, in the abstract proof, $\bigoplus$ is denoting "external" direct sum but since each $M_i\subseteq M$ we'd get $M=\bigoplus_{i\in I}M_i$ internally.

You seem to have been following along these lines already. In the below I instead use $\iota_i$ for the map $M_i\hookrightarrow\bigoplus_{i\in I}M_i$ (for internal direct sum).

Define $\varphi:M\to\bigoplus_{i\in I}M_i$, as you have done, through $\Phi^{-1}((\tau_i)_{i\in I})$. Conclude from the existence of $\varphi$ that the $M_\bullet$ are internally linearly disjoint. Redefine $\bigoplus_{i\in I}M_i$ to be the internal direct sum and redefine $\varphi$ accordingly by replacing the $\tau_i$ with the $\iota_i$, so that $\varphi$ maps $M$ to a submodule of $M$. We want to procure an inverse to $\varphi$. Well, of course there is the submodule inclusion $\psi:\bigoplus_{i\in I}M_i\hookrightarrow M$.

By construction, $\varphi\psi$ is the identity; $\varphi$'s restriction to every $M_i$ is by definition the inclusion $M_i\hookrightarrow M$.

For the converse $\psi\varphi:M\to M$, this is the identity if and only if $\Phi(\psi\varphi)$ is $(M_i\hookrightarrow M)_{i\in I}$ since we have assumed $\Phi$ is an isomorphism. On $m\in M_i$, $\psi\varphi(m)=\psi\varphi(\iota_i(m))=\psi\circ\Phi(\varphi)_i(m)=\psi(\iota_i(m))=m$ as required.

It follows that the internal sum $\bigoplus_{i\in I}M_i$ is literally equal to $M$.