# Nilpotent Lie algebras¶

AUTHORS:

• Eero Hakavuori (2018-08-16): initial version

class sage.algebras.lie_algebras.nilpotent_lie_algebra.FreeNilpotentLieAlgebra(R, r, s, names, naming, category, **kwds)

Return the free nilpotent Lie algebra of step s with r generators.

The free nilpotent Lie algebra $$L$$ of step $$s$$ with $$r$$ generators is the quotient of the free Lie algebra on $$r$$ generators by the $$(s+1)$$-th term of the lower central series. That is, the only relations in the Lie algebra $$L$$ are anticommutativity, the Jacobi identity, and the vanishing of all brackets of length more than $$s$$.

INPUT:

• R – the base ring

• r – an integer; the number of generators

• s – an integer; the nilpotency step of the algebra

• names – (optional) a string or a list of strings used to name the basis elements; if names is a string, then names for the basis will be autogenerated as determined by the naming parameter

• naming – (optional) a string; the naming scheme to use for the basis; valid values are:

• 'index' - (default for $$r < 10$$) the basis elements are names_w, where w are Lyndon words indexing the basis

• 'linear' - (default for $$r \geq 10$$) the basis is indexed names_1, …, names_n in the ordering of the Lyndon basis

Note

The 'index' naming scheme is not supported if $$r \geq 10$$ since it leads to ambiguous names.

EXAMPLES:

We compute the free step 4 Lie algebra on 2 generators and verify the only non-trivial relation $$[[X_1,[X_1,X_2]],X_2] = [X_1,[[X_1,X_2],X_2]]$$:

sage: L = LieAlgebra(QQ, 2, step=4)
sage: L.basis().list()
[X_1, X_2, X_12, X_112, X_122, X_1112, X_1122, X_1222]
sage: X_1, X_2 = L.basis().list()[:2]
sage: L[[X_1, [X_1, X_2]], X_2]
X_1122
sage: L[[X_1, [X_1, X_2]], X_2] == L[X_1, [[X_1, X_2], X_2]]
True


The linear naming scheme on the same Lie algebra:

sage: K = LieAlgebra(QQ, 2, step=4, names='Y', naming='linear')
sage: K.basis().list()
[Y_1, Y_2, Y_3, Y_4, Y_5, Y_6, Y_7, Y_8]
sage: K.inject_variables()
Defining Y_1, Y_2, Y_3, Y_4, Y_5, Y_6, Y_7, Y_8
sage: Y_2.bracket(Y_3)
-Y_5
sage: Y_5.bracket(Y_1)
-Y_7
sage: Y_3.bracket(Y_4)
0


A fully custom naming scheme on the Heisenberg algebra:

sage: L = LieAlgebra(ZZ, 2, step=2, names=('X', 'Y', 'Z'))
sage: a, b, c = L.basis()
sage: L.basis().list()
[X, Y, Z]
sage: a.bracket(b)
Z


An equivalent way to define custom names for the basis elements and bind them as local variables simultaneously:

sage: L.<X,Y,Z> = LieAlgebra(ZZ, 2, step=2)
sage: L.basis().list()
[X, Y, Z]
sage: X.bracket(Y)
Z


A free nilpotent Lie algebra is a stratified nilpotent Lie algebra:

sage: L = LieAlgebra(QQ, 3, step=3)
sage: L.category()
Category of finite dimensional stratified lie algebras with basis over Rational Field
sage: L in LieAlgebras(QQ).Nilpotent()
True


Being graded means that each basis element has a degree:

sage: L in LieAlgebras(QQ).Graded()
True
sage: L.homogeneous_component_basis(1).list()
[X_1, X_2, X_3]
sage: L.homogeneous_component_basis(2).list()
[X_12, X_13, X_23]
sage: L.homogeneous_component_basis(3).list()
[X_112, X_113, X_122, X_123, X_132, X_133, X_223, X_233]

class sage.algebras.lie_algebras.nilpotent_lie_algebra.NilpotentLieAlgebra_dense(R, s_coeff, names, index_set, step=None, **kwds)

A nilpotent Lie algebra $$L$$ over a base ring.

INPUT:

• R – the base ring

• s_coeff – a dictionary of structural coefficients

• names – (default:None) list of strings to use as names of basis elements; if None, the names will be inferred from the structural coefficients

• index_set – (default:None) list of hashable and comparable elements to use for indexing

• step – (optional) an integer; the nilpotency step of the Lie algebra if known; otherwise it will be computed when needed

• category – (optional) a subcategory of finite dimensional nilpotent Lie algebras with basis

EXAMPLES:

The input to a NilpotentLieAlgebra_dense should be of the same form as to a LieAlgebraWithStructureCoefficients:

sage: L.<X,Y,Z,W> = LieAlgebra(QQ, {('X','Y'): {'Z': 1}}, nilpotent=True)
sage: L
Nilpotent Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
sage: L[X, Y]
Z
sage: L[X, W]
0


If the parameter names is omitted, then the terms appearing in the structural coefficients are used as names:

sage: L = LieAlgebra(QQ, {('X','Y'): {'Z': 1}}, nilpotent=True); L
Nilpotent Lie algebra on 3 generators (X, Y, Z) over Rational Field