Examples of a Lie algebra with basis#

class sage.categories.examples.lie_algebras_with_basis.AbelianLieAlgebra(R, gens)#

Bases: CombinatorialFreeModule

An example of a Lie algebra: the abelian Lie algebra.

This class illustrates a minimal implementation of a Lie algebra with a distinguished basis.

class Element#

Bases: IndexedFreeModuleElement

lift()#

Return the lift of self to the universal enveloping algebra.

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: elt = L.an_element()
sage: elt.lift()
3*P[F[2]] + 2*P[F[1]] + 2*P[F[]]
bracket_on_basis(x, y)#

Return the Lie bracket on basis elements indexed by x and y.

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: L.bracket_on_basis(Partition([4,1]), Partition([2,2,1]))
0
lie_algebra_generators()#

Return the generators of self as a Lie algebra.

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: L.lie_algebra_generators()
Lazy family (Term map from Partitions to
 An example of a Lie algebra: the abelian Lie algebra on the
 generators indexed by Partitions over Rational
 Field(i))_{i in Partitions}
sage.categories.examples.lie_algebras_with_basis.Example#

alias of AbelianLieAlgebra

class sage.categories.examples.lie_algebras_with_basis.IndexedPolynomialRing(R, indices, **kwds)#

Bases: CombinatorialFreeModule

Polynomial ring whose generators are indexed by an arbitrary set.

Todo

Currently this is just used as the universal enveloping algebra for the example of the abelian Lie algebra. This should be factored out into a more complete class.

algebra_generators()#

Return the algebra generators of self.

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: UEA = L.universal_enveloping_algebra()
sage: UEA.algebra_generators()
Lazy family (algebra generator map(i))_{i in Partitions}
one_basis()#

Return the index of element \(1\).

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: UEA = L.universal_enveloping_algebra()
sage: UEA.one_basis()
1
sage: UEA.one_basis().parent()
Free abelian monoid indexed by Partitions
product_on_basis(x, y)#

Return the product of the monomials indexed by x and y.

EXAMPLES:

sage: L = LieAlgebras(QQ).WithBasis().example()
sage: UEA = L.universal_enveloping_algebra()
sage: I = UEA._indices
sage: UEA.product_on_basis(I.an_element(), I.an_element())
P[F[]^4*F[1]^4*F[2]^6]