I was reading the proof that every R-module M of an artinian semisimple ring R is the direct sum of all irreducible R-submodules M. In the proof they stated that the set $$\mathcal{F}:=\{N\subset M: N \text{ is the direct sum of its irreducible submodules}\}$$ has a maximal element. I was trying to see why such a maximal element exists.
My attempt: Let $\{N_i\}_{i\in I}\subset \mathcal{F}$ be a total ordered subset of $\mathcal{F}$ ($I$ is any indexation set). I want to prove that $N=\cup_{i\in I} N_i$ belongs to $\mathcal{F}$. We know that for each $i\in I$ there's an indexation set $J_i$ such that $N_i=\bigoplus_{k_i\in J_i} M_{k_i}$ with $M_{k_i}$ irreducible submodules of $N_i$. Define $$\Lambda :=\cup_{i\in I}\{k_i\in J_i:M_{k_i}=M_{k_{io}} \text{ for some }i_o\in I\setminus\{i\} \text{ and } k_{i_o}\in J_{i_o}\}$$
Obviously $\sum_{k_i\in (\cup_{i\in I} J_i)\setminus \Lambda} M_{k_i}$ is direct sum, but I got stuck for adding only one time such irreducible submodules $M_{i_k}$ associated to $\Lambda$ to asure the direct sum.
It appears that the proof you are reading is incorrect. There is no straightforward way to show that $\mathcal{F}$ is closed under unions of chains; knowing that each $N_i$ is a direct sum of simple submodules is not particularly helpful for proving that $\bigcup N_i$ is a direct sum of simple submodules.
For a correct proof, you want to use a different poset which forces the direct sum decompositions in such a chain to be "compatible". Here's one way to formulate it. Instead of using your poset $\mathcal{F}$, use the poset $$\mathcal{G}= \left\{(N,S):N\subseteq M\text{ is a submodule, $S$ is a set of simple submodules of $N$, and }N=\bigoplus_{A\in S}A\right\}$$ ordered by saying $(N,S)\leq (N',S')$ if $N\subseteq N'$ and $S\subseteq S'$.
Now suppose you have a chain $\{(N_i,S_i):i\in I\}\subseteq\mathcal{G}$; I claim that $(N,S)\in \mathcal{G}$ where $N=\bigcup N_i$ (or $N=\{0\}$ if the chain is empty) and $S=\bigcup S_i$, and so $(N,S)$ is an upper bound for the chain. It is clear that $N$ is a submodule of $M$, $S$ is a set of simple submodules of $N$, and $N$ is the sum of the elements of $S$. It remains to show that this sum is direct. If the sum were not direct, this would mean there are finitely many elements $A_1,\dots,A_n\in S$ and elements $a_j,b_j\in A_j$ such that $\sum a_j=\sum b_j$ but $a_j\neq b_j$ for some $j$. But there is some $i\in I$ such that $A_1,\dots,A_n$ are all in $S_i$, and so this would contradict the fact that $N_i$ is the direct sum of the elements of $S_i$.