Example 1.
We define 4 different Cartan matrices and calculate their standard forms and root type.
Here are the standard forms, permutation matrices and root types.
For each example the second output is a permutation matrix which transforms the given input Cartan matrix to its standard form.
Example 2.
We define a 21-dimensional simple Lie algebra and calculate its root type.
Initialize this Lie algebra.
Find a Cartan subalgebra.
Find the root space decomposition.
Find the roots, positive roots and a choice of simple roots.
Find the Cartan matrix.
Transform the Cartan matrix to standard form. Here we use the second calling sequence. The command CartanMatrixToStandardForm now returns a permuted set of simple roots for which the Cartan matrix will be in standard form.
Check the result by re-calculating the Cartan matrix with respect to the permuted set of roots. We get the standard form immediately.
The root type of our 21-dimensional Lie algebra is