In a Krull--Schmidt category, if $$ X_{1}\oplus X_{2}\oplus \cdots \oplus X_{r}\cong Y_{1}\oplus Y_{2}\oplus \cdots \oplus Y_{s}, $$ where the $X_{i}$ and $Y_j$ are all indecomposable, then $r = s$, and there exists a permutation $\pi$ such that $X_{\pi (i)}\cong Y_{i}$, for all $i$.

I believe this works for the abelian category of not-necessarily finite-dimensional modules over a simple Lie algebra $\frak{g}$, where we no longer require that the number of summands is finite, but I can't seem to prove it. Does somebody know of a "nice" proof?

Also, those there exist a notion of an "infinite Krull-Schmidt category" abstracting these properties? If so, when does is a general abelian of ""infinite Krull-Schmidt type"?