Lie Algebras Given By Structure Coefficients¶
AUTHORS:
- Travis Scrimshaw (2013-05-03): Initial version 
- class sage.algebras.lie_algebras.structure_coefficients.LieAlgebraWithStructureCoefficients(R, s_coeff, names, index_set, category=None, prefix=None, bracket=None, latex_bracket=None, string_quotes=None, **kwds)[source]¶
- Bases: - FinitelyGeneratedLieAlgebra,- IndexedGenerators- A Lie algebra with a set of specified structure coefficients. - The structure coefficients are specified as a dictionary \(d\) whose keys are pairs of basis indices, and whose values are dictionaries which in turn are indexed by basis indices. The value of \(d\) at a pair \((u, v)\) of basis indices is the dictionary whose \(w\)-th entry (for \(w\) a basis index) is the coefficient of \(b_w\) in the Lie bracket \([b_u, b_v]\) (where \(b_x\) means the basis element with index \(x\)). - INPUT: - R– a ring, to be used as the base ring
- s_coeff– dictionary, indexed by pairs of basis indices (see below), and whose values are dictionaries which are indexed by (single) basis indices and whose values are elements of \(R\)
- names– list or tuple of strings
- index_set– (default:- names) list or tuple of hashable and comparable elements
 - OUTPUT: - A Lie algebra over - Rwhich (as an \(R\)-module) is free with a basis indexed by the elements of- index_set. The \(i\)-th basis element is displayed using the name- names[i]. If we let \(b_i\) denote this \(i\)-th basis element, then the Lie bracket is given by the requirement that the \(b_k\)-coefficient of \([b_i, b_j]\) is- s_coeff[(i, j)][k]if- s_coeff[(i, j)]exists, otherwise- -s_coeff[(j, i)][k]if- s_coeff[(j, i)]exists, otherwise \(0\).- EXAMPLES: - We create the Lie algebra of \(\QQ^3\) under the Lie bracket defined by \(\times\) (cross-product): - sage: L = LieAlgebra(QQ, 'x,y,z', {('x','y'): {'z':1}, ('y','z'): {'x':1}, ('z','x'): {'y':1}}) sage: (x,y,z) = L.gens() sage: L.bracket(x, y) z sage: L.bracket(y, x) -z - >>> from sage.all import * >>> L = LieAlgebra(QQ, 'x,y,z', {('x','y'): {'z':Integer(1)}, ('y','z'): {'x':Integer(1)}, ('z','x'): {'y':Integer(1)}}) >>> (x,y,z) = L.gens() >>> L.bracket(x, y) z >>> L.bracket(y, x) -z - class Element[source]¶
- Bases: - StructureCoefficientsElement
 - change_ring(R)[source]¶
- Return a Lie algebra with identical structure coefficients over - R.- INPUT: - R– a ring
 - EXAMPLES: - sage: L.<x,y,z> = LieAlgebra(ZZ, {('x','y'): {'z':1}}) sage: L.structure_coefficients() Finite family {('x', 'y'): z} sage: LQQ = L.change_ring(QQ) sage: LQQ.structure_coefficients() Finite family {('x', 'y'): z} sage: LSR = LQQ.change_ring(SR) # needs sage.symbolic sage: LSR.structure_coefficients() # needs sage.symbolic Finite family {('x', 'y'): z} - >>> from sage.all import * >>> L = LieAlgebra(ZZ, {('x','y'): {'z':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.structure_coefficients() Finite family {('x', 'y'): z} >>> LQQ = L.change_ring(QQ) >>> LQQ.structure_coefficients() Finite family {('x', 'y'): z} >>> LSR = LQQ.change_ring(SR) # needs sage.symbolic >>> LSR.structure_coefficients() # needs sage.symbolic Finite family {('x', 'y'): z} 
 - dimension()[source]¶
- Return the dimension of - self.- EXAMPLES: - sage: L = LieAlgebra(QQ, 'x,y', {('x','y'):{'x':1}}) sage: L.dimension() 2 - >>> from sage.all import * >>> L = LieAlgebra(QQ, 'x,y', {('x','y'):{'x':Integer(1)}}) >>> L.dimension() 2 
 - from_vector(v, order=None, coerce=True)[source]¶
- Return an element of - selffrom the vector- v.- EXAMPLES: - sage: L.<x,y,z> = LieAlgebra(QQ, {('x','y'): {'z':1}}) sage: L.from_vector([1, 2, -2]) x + 2*y - 2*z - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','y'): {'z':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.from_vector([Integer(1), Integer(2), -Integer(2)]) x + 2*y - 2*z 
 - module(sparse=True)[source]¶
- Return - selfas a free module.- EXAMPLES: - sage: L.<x,y,z> = LieAlgebra(QQ, {('x','y'):{'z':1}}) sage: L.module() Sparse vector space of dimension 3 over Rational Field - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','y'):{'z':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.module() Sparse vector space of dimension 3 over Rational Field 
 - monomial(k)[source]¶
- Return the monomial indexed by - k.- EXAMPLES: - sage: L.<x,y,z> = LieAlgebra(QQ, {('x','y'): {'z':1}}) sage: L.monomial('x') x - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','y'): {'z':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.monomial('x') x 
 - some_elements()[source]¶
- Return some elements of - self.- EXAMPLES: - sage: L = lie_algebras.three_dimensional(QQ, 4, 1, -1, 2) sage: L.some_elements() [X, Y, Z, X + Y + Z] - >>> from sage.all import * >>> L = lie_algebras.three_dimensional(QQ, Integer(4), Integer(1), -Integer(1), Integer(2)) >>> L.some_elements() [X, Y, Z, X + Y + Z] 
 - structure_coefficients(include_zeros=False)[source]¶
- Return the dictionary of structure coefficients of - self.- EXAMPLES: - sage: L = LieAlgebra(QQ, 'x,y,z', {('x','y'): {'x':1}}) sage: L.structure_coefficients() Finite family {('x', 'y'): x} sage: S = L.structure_coefficients(True); S Finite family {('x', 'y'): x, ('x', 'z'): 0, ('y', 'z'): 0} sage: S['x','z'].parent() is L True - >>> from sage.all import * >>> L = LieAlgebra(QQ, 'x,y,z', {('x','y'): {'x':Integer(1)}}) >>> L.structure_coefficients() Finite family {('x', 'y'): x} >>> S = L.structure_coefficients(True); S Finite family {('x', 'y'): x, ('x', 'z'): 0, ('y', 'z'): 0} >>> S['x','z'].parent() is L True 
 - term(k, c=None)[source]¶
- Return the term indexed by - iwith coefficient- c.- EXAMPLES: - sage: L.<x,y,z> = LieAlgebra(QQ, {('x','y'): {'z':1}}) sage: L.term('x', 4) 4*x - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','y'): {'z':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.term('x', Integer(4)) 4*x