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)[source]¶
- Bases: - NilpotentLieAlgebra_dense- Return the free nilpotent Lie algebra of step - swith- rgenerators.- 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– integer; the number of generators
- s– integer; the nilpotency step of the algebra
- names– (optional) string or list of strings used to name the basis elements; if- namesis a string, then names for the basis will be autogenerated as determined by the- namingparameter
- 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- ware Lyndon words indexing the basis
- 'linear'– (default for \(r \geq 10\)) the basis is indexed- names_1, …,- names_nin 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 - >>> from sage.all import * >>> L = LieAlgebra(QQ, Integer(2), step=Integer(4)) >>> L.basis().list() [X_1, X_2, X_12, X_112, X_122, X_1112, X_1122, X_1222] >>> X_1, X_2 = L.basis().list()[:Integer(2)] >>> L[[X_1, [X_1, X_2]], X_2] X_1122 >>> 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 - >>> from sage.all import * >>> K = LieAlgebra(QQ, Integer(2), step=Integer(4), names='Y', naming='linear') >>> K.basis().list() [Y_1, Y_2, Y_3, Y_4, Y_5, Y_6, Y_7, Y_8] >>> K.inject_variables() Defining Y_1, Y_2, Y_3, Y_4, Y_5, Y_6, Y_7, Y_8 >>> Y_2.bracket(Y_3) -Y_5 >>> Y_5.bracket(Y_1) -Y_7 >>> 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 - >>> from sage.all import * >>> L = LieAlgebra(ZZ, Integer(2), step=Integer(2), names=('X', 'Y', 'Z')) >>> a, b, c = L.basis() >>> L.basis().list() [X, Y, Z] >>> 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 - >>> from sage.all import * >>> L = LieAlgebra(ZZ, Integer(2), step=Integer(2), names=('X', 'Y', 'Z',)); (X, Y, Z,) = L._first_ngens(3) >>> L.basis().list() [X, Y, Z] >>> 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 - >>> from sage.all import * >>> L = LieAlgebra(QQ, Integer(3), step=Integer(3)) >>> L.category() Category of finite dimensional stratified Lie algebras with basis over Rational Field >>> 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] - >>> from sage.all import * >>> L in LieAlgebras(QQ).Graded() True >>> L.homogeneous_component_basis(Integer(1)).list() [X_1, X_2, X_3] >>> L.homogeneous_component_basis(Integer(2)).list() [X_12, X_13, X_23] >>> L.homogeneous_component_basis(Integer(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)[source]¶
- Bases: - LieAlgebraWithStructureCoefficients- A nilpotent Lie algebra \(L\) over a base ring. - INPUT: - R– the base ring
- s_coeff– 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– integer (optional); 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_denseshould 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 - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('X','Y'): {'Z': Integer(1)}}, nilpotent=True, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4) >>> L Nilpotent Lie algebra on 4 generators (X, Y, Z, W) over Rational Field >>> L[X, Y] Z >>> L[X, W] 0 - If the parameter - namesis 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 - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('X','Y'): {'Z': Integer(1)}}, nilpotent=True); L Nilpotent Lie algebra on 3 generators (X, Y, Z) over Rational Field