Solution (source code)

= Solution

A Lie algebra is <Semisimple Lie algebra>[semisimple] when its soluble radical is zero. Its <Killing form> is
$$
B_L(x,y)=\operatorname{tr}(\operatorname{ad}x\,\operatorname{ad}y).
$$
The radical of this invariant symmetric form is an ideal. The solvability result behind the <Cartan criterion for semisimplicity> applied to that ideal shows that it is soluble; semisimplicity therefore makes it zero. Hence $B_L$ is nondegenerate.

An abelian subalgebra $H$ is a <Cartan subalgebra> when its elements are semisimple and it is maximal toral, equivalently when $C_L(H)=H$. An arbitrary abelian subalgebra need not lie in one: in $\mathfrak{sl}_2$, the line spanned by the nilpotent matrix $e$ is abelian, whereas every element of a Cartan subalgebra is semisimple.

Let $H=C_L(h_0)$ for a regular $h_0\in H$, as allowed. Generalized eigenspaces of $\operatorname{ad}h_0$ give
$$
L=H\oplus[h_0,L].
$$
If $x\in H$ is orthogonal to $H$, invariance gives
$$
B_L(x,[h_0,y])=B_L([x,h_0],y)=0.
$$
Thus $x$ is orthogonal to all of $L$, and nondegeneracy gives $x=0$. Therefore $B_L|_H$ is nondegenerate.

The commuting semisimple maps $\{\operatorname{ad}h:h\in H\}$ can be simultaneously diagonalized. Consequently
$$
\boxed{L=H\oplus\bigoplus_{\alpha\in\Phi}L_\alpha,\qquad
L_\alpha=\{x:[h,x]=\alpha(h)x\ \forall h\in H\}.}
$$
Here $L_0=C_L(H)=H$, the nonzero weights $\Phi\subseteq H^*$ are the roots, and the Jacobi identity gives $[L_\alpha,L_\beta]\subseteq L_{\alpha+\beta}$.