Conditions for Internal Ring Direct Sum

Theorem
Let $\left({R, +, \circ}\right)$ be a ring.

Let $\left \langle {\left({S_k, +, \circ}\right)} \right \rangle$ be a sequence of subrings of $R$.

Then $R$ is the ring direct sum of $\left \langle {S_k} \right \rangle_{1 \le k \le n}$ iff:


 * $(1): \quad R = S_1 + S_2 + \cdots + S_n$


 * $(2): \quad \left \langle {\left({S_k, +}\right)} \right \rangle_{1 \le k \le n}$ is a sequence of independent subgroups of $\left({R, +}\right)$


 * $(3): \quad \forall k \in \left[{1 .. n}\right]: S_k$ is an ideal of $R$.

Proof
Let $S$ be the cartesian product of $\left \langle {\left({S_k, +}\right)} \right \rangle$

First note that $\phi$ is a group homomorphism from $\left({S, +}\right)$ to $\left({R, +}\right)$, as:
 * $\displaystyle \sum_{j=1}^n \left({x_j + y_j}\right) = \sum_{j=1}^n x_j + \sum_{j=1}^n y_j$ from Associativity on Indexing Set.

So $\phi$ is a ring homomorphism iff:
 * $\displaystyle \left({\sum_{j=1}^n x_j}\right) \circ \left({\sum_{j=1}^n y_j}\right) = \sum_{j=1}^n \left({x_j \circ y_j}\right)$

Now, let:
 * $\left({S, +, \circ}\right)$ be the cartesian product of $\left \langle {\left({S_k, +, \circ}\right)} \right \rangle$
 * $\phi: S \to R$ be the mapping defined as:
 * $\phi\left({\left({x_1, x_2, \ldots, x_n}\right)}\right) = x_1 + x_2 + \cdots x_n$

Clearly $\phi$ is a surjection iff $(1)$ holds.

By Internal Direct Product Generated by Subgroups, $\phi$ is a ring isomorphism iff $(1)$ and $(2)$ hold.

Let $\phi: S \to R$ be a ring isomorphism.

By Canonical Injection from Ideal of External Direct Product of Rings, $\operatorname{in}_k \left({S_k}\right)$ is an ideal of $S$.

So $\phi \left({\operatorname{in}_k \left({S_k}\right)}\right)$ is an ideal of $R$.

But $\phi$ and $\operatorname{pr}_k$ coincide on $\operatorname{in}_k \left({S_k}\right)$.

So:
 * $\phi \left({\operatorname{in}_k \left({S_k}\right)}\right) = \operatorname{pr}_k \left({\operatorname{in}_k \left({S_k}\right)}\right) = S_k$

and so $(3)$ holds.

Now suppose $(3)$ holds, and the $S_k$ are all ideals of $R$.

By $(2)$ and Condition for Subgroups to be Independent, we have:
 * $i \ne j \implies S_i \cap S_j = \left\{{0_R}\right\}$

So for all $\left({x_1, x_2, \ldots, x_n}\right), \left({y_1, y_2, \ldots, y_n}\right) \in S$:

because as $S_i, S_j$ are ideals, we have:
 * $x_i \circ j_j = S_i \cap S_j = \left\{{0}\right\}$

Hence the three conditions are sufficient for $\phi$ to be a ring isomorphism.