Let $\mathfrak{g}$ be a real semisimple Lie algebra. Then there are simple ideals $\mathfrak{g}_1,\ldots,\mathfrak{g}_n \subseteq \mathfrak{g}$, unique up to order, such that $$ \mathfrak{g} = \mathfrak{g}_1 \oplus \ldots \oplus \mathfrak{g}_n $$ and every ideal of $\mathfrak{g}$ is a sum of some of these simple ideals.
Are the following two statements equivalent?
- each $\mathfrak{g}_i$ is noncompact
- $\mathfrak{g}$ does not contain a nontrivial compact ideal
Clearly 2. implies 1., but I'm not sure about the converse. Here, a Lie algebra $\mathfrak{g}$ is called compact if it is the Lie algebra of a compact Lie group or equivalently, if $\text{Int}(\mathfrak{g})$ is compact.
(Here, $\text{Int}(\mathfrak{g})$ denotes the adjoint group of $\mathfrak{g}$, that is, the unique Lie group whose Lie algebra is the image of the adjoint representation of $\mathfrak{g}$.)