KacMoody provides tools for studying symmetrizable Kac–Moody algebras and their representations, using a generalized Cartan matrix as input. Roots and weights are recorded together with their underlying Cartan data. When the Cartan matrix is singular, weights also retain the coordinates that Dynkin labels alone do not determine. Formal characters indicate whether they are exact or partial, together with the range of coefficients that has been determined.
The exceptional Lie algebra $G_2$ acts on a seven-dimensional vector space. We can use characters to split its tensor spaces into irreducible representations:
|
|
|
Let $V$ denote this representation. The input {1,0} is its highest weight in Dynkin labels; the two coordinates follow the node order shown by dynkinDiagram D. The character C, returned by finiteCharacter, records the weights of $V$ and their multiplicities. characterDimension adds these multiplicities; the final output says that $\dim V=7$.
Multiplying characters gives the character of a tensor product. decomposeCharacter then finds its irreducible summands:
|
The keys are highest-weight Dynkin tuples. An entry (a,b) => m means $m$ copies of the irreducible representation with highest weight $a\omega_1+b\omega_2$, written $V(a,b)$ below. In particular, $V(0,0)=\mathbb C$ is the trivial representation and $V(1,0)=V$. Thus the output means $$V\otimes V\cong \mathbb C\oplus V\oplus V(0,1)\oplus V(2,0), \qquad 49=1+7+14+27.$$ Here $V(0,1)$ is the fourteen-dimensional adjoint representation: the Lie algebra $\mathfrak g_2$ acting on itself.
We can separate the symmetric and alternating tensors in this same tensor product. First, use symmetricPowerDecomposition for the symmetric square:
|
This is the decomposition $$\operatorname{Sym}^2 V\cong\mathbb C\oplus V(2,0), \qquad 28=1+27.$$ The single trivial summand implies that $V$ has an invariant symmetric bilinear form, unique up to scalar. In particular, $V$ is isomorphic to its dual.
Next, use exteriorPowerDecomposition for the alternating square:
|
The output means $$\bigwedge^2 V\cong V\oplus\mathfrak g_2, \qquad 21=7+14.$$ The symmetric and alternating pieces together recover all $28+21=49$ dimensions of $V\otimes V$.
Finally, an alternating trilinear form on $V$ is an element of $\bigwedge^3 V^*$. Use dualCharacter to pass to the dual, then ask for the third exterior power:
|
This translates to $$\bigwedge^3 V^*\cong\mathbb C\oplus V\oplus V(2,0), \qquad 35=1+7+27.$$ The trivial representation occurs once, so the space of $G_2$-invariant alternating trilinear forms on $V$ is one-dimensional. A nonzero such form is therefore unique up to scalar.
Many of the same commands apply in finite, affine, and indefinite type. The package determines the Cartan type from the matrix and computes roots and their multiplicities, characters of finite-dimensional highest-weight representations, restrictions to reductive Levi subalgebras, and Kostant cohomology for arbitrary standard parabolics. Weight multiplicities can also be computed by several independent formulas. Kazhdan–Lusztig polynomials are available in every symmetrizable type, since each Bruhat interval is finite. In infinite type, one can compute a BGG resolution through a specified homological degree. Further finite-type computations include structural invariants, Borel–Weil–Bott cohomology, Demazure characters, symmetric and exterior powers, and highest-weight crystals.
In finite type, toLieAlgebra and toRootSystem convert the same Cartan matrix to objects from LieAlgebraRepresentations and WeylGroups. This gives direct access to their explicit matrices, Hasse diagrams, Gelfand-Tsetlin patterns, and related constructions.
For the definitions underlying the package, begin with Mathematical background. For concrete input conventions, continue with Reading diagrams and coordinates, which explains how the displayed node labels, Cartan-matrix entries, roots, weights, and parabolic inputs fit together.
This documentation describes version 2.0 of KacMoody, released July 18, 2026.
If you have used this package in your research, please cite it as follows:
|
The object KacMoody is a package, defined in KacMoody.m2, with auxiliary files in KacMoody/.
The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/KacMoody/Documentation.m2:157:0.