Solution (source code)

= Solution

A <Cartan subalgebra> $\mathfrak h$ of a complex semisimple Lie algebra is a maximal commuting subalgebra consisting of semisimple elements. A nonzero functional $\alpha\in\mathfrak h^*$ is a root when its space in the <root-space decomposition>
$$
\mathfrak g_\alpha
=\{X:[H,X]=\alpha(H)X\text{ for every }H\in\mathfrak h\}
$$
is nonzero. A <Cartan-Weyl basis> combines a basis of $\mathfrak h$ with root vectors $E_\alpha\in\mathfrak g_\alpha$.

A choice of regular hyperplane divides roots into positive and negative roots. The <simple roots> are the positive roots that are not sums of two positive roots; they form a basis of the real root span. The <Cartan matrix> is
$$
A_{ij}=\frac{2(\alpha_i,\alpha_j)}{(\alpha_j,\alpha_j)},
$$
up to the equivalent transposed indexing convention.