In this elementary tutorial, we give a brief introduction on how to use the package GradedLieAlgebras.
The most common way to construct a Lie algebra is by means of the constructor lieAlgebra, which produces a free Lie algebra on the generators given in input.


The above list is the dimensions in degrees 1 to 5 of the free Lie algebra on two generators (of degree 1). To get an explicit basis in a certain degree, use basis(ZZ,LieAlgebra).


The basis elements in degree 3 given above should be interpreted as [$a$, [$b$, $a$ ]] and [$b$, [$b$, $a$]]. To multiply two Lie elements, use LieElement LieElement. The operator SPACE is right associative, so writing ($a$ $a$ $a$ $b$) as input gives the Lie monomial [$a$, [$a$, [$a$, $b$]]], which in output is written in the same way as input. A linear combination of Lie monomials is written in the natural way.

The output is a linear combination of the basis elements of degree 5.

The element $p$ in $L$ may be used to define a quotient Lie algebra by the ideal generated by $p$.


As expected, the dimension in degree 5 of $Q$ is 1 less than that of $L$.
When $L$ is a big free Lie algebra it may be better to define the relations in a "formal" manner. For an example, see Minimal models, Extalgebras and Koszul duals.
A generator for a Lie algebra may be any variable name including indexed variables. Also, the same names can be used in different Lie algebras or even rings. Use use(LieAlgebra) to switch between Lie algebras.








