Examples of a finite dimensional Lie algebra with basis¶
- class sage.categories.examples.finite_dimensional_lie_algebras_with_basis.AbelianLieAlgebra(R, n=None, M=None, ambient=None)[source]¶
Bases:
Parent
,UniqueRepresentation
An example of a finite dimensional Lie algebra with basis: the abelian Lie algebra.
Let \(R\) be a commutative ring, and \(M\) an \(R\)-module. The abelian Lie algebra on \(M\) is the \(R\)-Lie algebra obtained by endowing \(M\) with the trivial Lie bracket (\([a, b] = 0\) for all \(a, b \in M\)).
This class illustrates a minimal implementation of a finite dimensional Lie algebra with basis.
INPUT:
R
– base ringn
– (optional) a nonnegative integer (default:None
)M
– an \(R\)-module (default: the free \(R\)-module of rankn
) to serve as the ground space for the Lie algebraambient
– (optional) a Lie algebra; if this is set, then the resulting Lie algebra is declared a Lie subalgebra ofambient
OUTPUT:
The abelian Lie algebra on \(M\).
- class Element(parent, value)[source]¶
Bases:
Element
Initialize
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: TestSuite(a).run()
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> TestSuite(a).run()
- lift()[source]¶
Return the lift of
self
to the universal enveloping algebra.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: elt = 2*a + 2*b + 3*c sage: elt.lift() # needs sage.combinat sage.libs.singular 2*b0 + 2*b1 + 3*b2
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> elt = Integer(2)*a + Integer(2)*b + Integer(3)*c >>> elt.lift() # needs sage.combinat sage.libs.singular 2*b0 + 2*b1 + 3*b2
- monomial_coefficients(copy=True)[source]¶
Return the monomial coefficients of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: elt = 2*a + 2*b + 3*c sage: elt.monomial_coefficients() {0: 2, 1: 2, 2: 3}
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> elt = Integer(2)*a + Integer(2)*b + Integer(3)*c >>> elt.monomial_coefficients() {0: 2, 1: 2, 2: 3}
- to_vector(order=None, sparse=False)[source]¶
Return
self
as a vector inself.parent().module()
.See the docstring of the latter method for the meaning of this.
EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: elt = 2*a + 2*b + 3*c sage: elt.to_vector() (2, 2, 3)
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> elt = Integer(2)*a + Integer(2)*b + Integer(3)*c >>> elt.to_vector() (2, 2, 3)
- ambient()[source]¶
Return the ambient Lie algebra of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: S = L.subalgebra([2*a+b, b + c]) sage: S.ambient() == L True
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> S = L.subalgebra([Integer(2)*a+b, b + c]) >>> S.ambient() == L True
- basis()[source]¶
Return the basis of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.basis() Finite family {0: (1, 0, 0), 1: (0, 1, 0), 2: (0, 0, 1)}
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.basis() Finite family {0: (1, 0, 0), 1: (0, 1, 0), 2: (0, 0, 1)}
- basis_matrix()[source]¶
Return the basis matrix of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.basis_matrix() [1 0 0] [0 1 0] [0 0 1]
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.basis_matrix() [1 0 0] [0 1 0] [0 0 1]
- from_vector(v, order=None)[source]¶
Return the element of
self
corresponding to the vectorv
inself.module()
.Implement this if you implement
module()
; see the documentation ofsage.categories.lie_algebras.LieAlgebras.module()
for how this is to be done.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: u = L.from_vector(vector(QQ, (1, 0, 0))); u (1, 0, 0) sage: parent(u) is L True
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> u = L.from_vector(vector(QQ, (Integer(1), Integer(0), Integer(0)))); u (1, 0, 0) >>> parent(u) is L True
- gens()[source]¶
Return the generators of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.gens() ((1, 0, 0), (0, 1, 0), (0, 0, 1))
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.gens() ((1, 0, 0), (0, 1, 0), (0, 0, 1))
- ideal(gens)[source]¶
Return the Lie subalgebra of
self
generated by the elements of the iterablegens
.This currently requires the ground ring \(R\) to be a field.
EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: L.subalgebra([2*a+b, b + c]) An example of a finite dimensional Lie algebra with basis: the 2-dimensional abelian Lie algebra over Rational Field with basis matrix: [ 1 0 -1/2] [ 0 1 1]
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> L.subalgebra([Integer(2)*a+b, b + c]) An example of a finite dimensional Lie algebra with basis: the 2-dimensional abelian Lie algebra over Rational Field with basis matrix: [ 1 0 -1/2] [ 0 1 1]
- is_ideal(A)[source]¶
Return if
self
is an ideal of the ambient spaceA
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: L.is_ideal(L) True sage: S1 = L.subalgebra([2*a+b, b + c]) sage: S1.is_ideal(L) True sage: S2 = L.subalgebra([2*a+b]) sage: S2.is_ideal(S1) True sage: S1.is_ideal(S2) False
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> L.is_ideal(L) True >>> S1 = L.subalgebra([Integer(2)*a+b, b + c]) >>> S1.is_ideal(L) True >>> S2 = L.subalgebra([Integer(2)*a+b]) >>> S2.is_ideal(S1) True >>> S1.is_ideal(S2) False
- leading_monomials()[source]¶
Return the set of leading monomials of the basis of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: I = L.ideal([2*a + b, b + c]) sage: I.leading_monomials() ((1, 0, 0), (0, 1, 0))
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> I = L.ideal([Integer(2)*a + b, b + c]) >>> I.leading_monomials() ((1, 0, 0), (0, 1, 0))
- lie_algebra_generators()[source]¶
Return the basis of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.basis() Finite family {0: (1, 0, 0), 1: (0, 1, 0), 2: (0, 0, 1)}
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.basis() Finite family {0: (1, 0, 0), 1: (0, 1, 0), 2: (0, 0, 1)}
- lift(x)[source]¶
Return the lift of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.gens() sage: L.lift(a) b0 sage: L.lift(b).parent() is L.universal_enveloping_algebra() True sage: I = L.ideal([a + 2*b, b + 3*c]) sage: I.lift(I.basis()[0]) (1, 0, -6)
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.gens() >>> L.lift(a) b0 >>> L.lift(b).parent() is L.universal_enveloping_algebra() True >>> I = L.ideal([a + Integer(2)*b, b + Integer(3)*c]) >>> I.lift(I.basis()[Integer(0)]) (1, 0, -6)
- module()[source]¶
Return an \(R\)-module which is isomorphic to the underlying \(R\)-module of
self
.See
sage.categories.lie_algebras.LieAlgebras.module()
for an explanation.In this particular example, this returns the module \(M\) that was used to construct
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.module() Vector space of dimension 3 over Rational Field sage: a, b, c = L.lie_algebra_generators() sage: S = L.subalgebra([2*a+b, b + c]) sage: S.module() Vector space of degree 3 and dimension 2 over Rational Field Basis matrix: [ 1 0 -1/2] [ 0 1 1]
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.module() Vector space of dimension 3 over Rational Field >>> a, b, c = L.lie_algebra_generators() >>> S = L.subalgebra([Integer(2)*a+b, b + c]) >>> S.module() Vector space of degree 3 and dimension 2 over Rational Field Basis matrix: [ 1 0 -1/2] [ 0 1 1]
- subalgebra(gens)[source]¶
Return the Lie subalgebra of
self
generated by the elements of the iterablegens
.This currently requires the ground ring \(R\) to be a field.
EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: L.subalgebra([2*a+b, b + c]) An example of a finite dimensional Lie algebra with basis: the 2-dimensional abelian Lie algebra over Rational Field with basis matrix: [ 1 0 -1/2] [ 0 1 1]
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> L.subalgebra([Integer(2)*a+b, b + c]) An example of a finite dimensional Lie algebra with basis: the 2-dimensional abelian Lie algebra over Rational Field with basis matrix: [ 1 0 -1/2] [ 0 1 1]
- universal_enveloping_algebra()[source]¶
Return the universal enveloping algebra of
self
.EXAMPLES:
sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.universal_enveloping_algebra() Noncommutative Multivariate Polynomial Ring in b0, b1, b2 over Rational Field, nc-relations: {}
>>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.universal_enveloping_algebra() Noncommutative Multivariate Polynomial Ring in b0, b1, b2 over Rational Field, nc-relations: {}
- sage.categories.examples.finite_dimensional_lie_algebras_with_basis.Example[source]¶
alias of
AbelianLieAlgebra