Finite Dimensional Lie Algebras With Basis¶
AUTHORS:
- Travis Scrimshaw (07-15-2013): Initial implementation 
- class sage.categories.finite_dimensional_lie_algebras_with_basis.FiniteDimensionalLieAlgebrasWithBasis(base_category)[source]¶
- Bases: - CategoryWithAxiom_over_base_ring- Category of finite dimensional Lie algebras with a basis. - Todo - Many of these tests should use non-abelian Lie algebras and need to be added after Issue #16820. - class ElementMethods[source]¶
- Bases: - object- adjoint_matrix(sparse=False)[source]¶
- Return the matrix of the adjoint action of - self.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.an_element().adjoint_matrix() [0 0 0] [0 0 0] [0 0 0] sage: L.an_element().adjoint_matrix(sparse=True).is_sparse() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.an_element().adjoint_matrix() [0 0 0] [0 0 0] [0 0 0] >>> L.an_element().adjoint_matrix(sparse=True).is_sparse() True - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: x.adjoint_matrix() [0 1] [0 0] sage: y.adjoint_matrix() [-1 0] [ 0 0] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> x.adjoint_matrix() [0 1] [0 0] >>> y.adjoint_matrix() [-1 0] [ 0 0] - We verify that this forms a representation: - sage: # needs sage.combinat sage.modules sage: sl3 = lie_algebras.sl(QQ, 3) sage: e1, e2 = sl3.e(1), sl3.e(2) sage: e12 = e1.bracket(e2) sage: E1, E2 = e1.adjoint_matrix(), e2.adjoint_matrix() sage: E1 * E2 - E2 * E1 == e12.adjoint_matrix() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> sl3 = lie_algebras.sl(QQ, Integer(3)) >>> e1, e2 = sl3.e(Integer(1)), sl3.e(Integer(2)) >>> e12 = e1.bracket(e2) >>> E1, E2 = e1.adjoint_matrix(), e2.adjoint_matrix() >>> E1 * E2 - E2 * E1 == e12.adjoint_matrix() True 
 - to_vector(sparse=False, order=None)[source]¶
- Return the vector in - g.module()corresponding to the element- selfof- g(where- gis the parent of- self).- Implement this if you implement - g.module(). See- sage.categories.lie_algebras.LieAlgebras.module()for how this is to be done.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.an_element().to_vector() (0, 0, 0) sage: L.an_element().to_vector(sparse=True) (0, 0, 0) sage: # needs sage.combinat sage.groupssage.modules sage: D = DescentAlgebra(QQ, 4).D() sage: L = LieAlgebra(associative=D) sage: L.an_element().to_vector() (1, 1, 1, 1, 1, 1, 1, 1) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.an_element().to_vector() (0, 0, 0) >>> L.an_element().to_vector(sparse=True) (0, 0, 0) >>> # needs sage.combinat sage.groupssage.modules >>> D = DescentAlgebra(QQ, Integer(4)).D() >>> L = LieAlgebra(associative=D) >>> L.an_element().to_vector() (1, 1, 1, 1, 1, 1, 1, 1) 
 
 - class ParentMethods[source]¶
- Bases: - object- as_finite_dimensional_algebra()[source]¶
- Return - selfas a- FiniteDimensionalAlgebra.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = lie_algebras.cross_product(QQ) sage: x, y, z = L.basis() sage: F = L.as_finite_dimensional_algebra() sage: X, Y, Z = F.basis() sage: x.bracket(y) Z sage: X * Y Z - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = lie_algebras.cross_product(QQ) >>> x, y, z = L.basis() >>> F = L.as_finite_dimensional_algebra() >>> X, Y, Z = F.basis() >>> x.bracket(y) Z >>> X * Y Z 
 - casimir_element(order=2, UEA=None, force_generic=False, basis=False)[source]¶
- Return a Casimir element of order - orderin the universal enveloping algebra of- self.- A Casimir element of order \(k\) is a distinguished basis element for the center of \(U(\mathfrak{g})\) of homogeneous degree \(k\) (that is, it is an element of \(U_k \setminus U_{k-1}\), where \(\{U_i\}_{i=0}^{\infty}\) is the natural filtration of \(U(\mathfrak{g})\)). When \(\mathfrak{g}\) is a simple Lie algebra, then this spans \(Z(U(\mathfrak{g}))_k\). - INPUT: - order– (default:- 2) the order of the Casimir element
- UEA– (optional) the universal enveloping algebra implementation to return the result in
- force_generic– boolean (default:- False); if- Truefor the quadratic order, then this uses the default algorithm (otherwise this is ignored)
- basis– boolean (default:- False); if- True, this returns a basis of all Casimir elements of order- orderas a list
 - ALGORITHM: - For the quadratic order (i.e., - order=2), then this uses \(K^{ij}\), the inverse of the Killing form matrix, to compute \(C_{(2)} = \sum_{i,j} K^{ij} X_i \cdots X_j\), where \(\{X_1, \ldots, X_n\}\) is a basis for \(\mathfrak{g}\). Otherwise this solves the system of equations\[f_{aj}^b \kappa^{jc\cdots d} + f_{aj}^c \kappa^{cj\cdots d} \cdots + f_{aj}^d \kappa^{bc \cdots j}\]- for the symmetric tensor \(\kappa^{i_1 \cdots i_k}\), where \(k\) is the - order. This system comes from \([X_i, C_{(k)}] = 0\) with\[C_{(k)} = \sum_{i_1, \ldots, i_k}^n \kappa^{i_1 \cdots i_k} X_{i_1} \cdots X_{i_k}.\]- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['A', 1]) sage: C = L.casimir_element(); C 1/8*b1^2 + 1/2*b0*b2 - 1/4*b1 sage: U = L.universal_enveloping_algebra() sage: all(g * C == C * g for g in U.gens()) True sage: U = L.pbw_basis() sage: C = L.casimir_element(UEA=U); C 1/2*PBW[alpha[1]]*PBW[-alpha[1]] + 1/8*PBW[alphacheck[1]]^2 - 1/4*PBW[alphacheck[1]] sage: all(g * C == C * g for g in U.algebra_generators()) True sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['B', 2]) sage: U = L.pbw_basis() sage: C = L.casimir_element(UEA=U) sage: all(g * C == C * g for g in U.algebra_generators()) True sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['C', 3]) sage: U = L.pbw_basis() sage: C = L.casimir_element(UEA=U) sage: all(g * C == C * g for g in U.algebra_generators()) True sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['A', 1]) sage: C4 = L.casimir_element(order=4, UEA=L.pbw_basis()); C4 4*PBW[alpha[1]]^2*PBW[-alpha[1]]^2 + 2*PBW[alpha[1]]*PBW[alphacheck[1]]^2*PBW[-alpha[1]] + 1/4*PBW[alphacheck[1]]^4 - PBW[alphacheck[1]]^3 - 4*PBW[alpha[1]]*PBW[-alpha[1]] + 2*PBW[alphacheck[1]] sage: all(g * C4 == C4 * g for g in L.pbw_basis().algebra_generators()) True sage: # needs sage.combinat sage.modules sage: L = lie_algebras.Heisenberg(QQ, 2) sage: L.casimir_element() 0 sage: # needs sage.combinat sage.modules sage: g = LieAlgebra(QQ, cartan_type=['D',2]) sage: U = g.pbw_basis() sage: U.casimir_element(2, basis=True) [2*PBW[alpha[2]]*PBW[-alpha[2]] + 1/2*PBW[alphacheck[2]]^2 - PBW[alphacheck[2]], 2*PBW[alpha[1]]*PBW[-alpha[1]] + 1/2*PBW[alphacheck[1]]^2 - PBW[alphacheck[1]]] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(1)]) >>> C = L.casimir_element(); C 1/8*b1^2 + 1/2*b0*b2 - 1/4*b1 >>> U = L.universal_enveloping_algebra() >>> all(g * C == C * g for g in U.gens()) True >>> U = L.pbw_basis() >>> C = L.casimir_element(UEA=U); C 1/2*PBW[alpha[1]]*PBW[-alpha[1]] + 1/8*PBW[alphacheck[1]]^2 - 1/4*PBW[alphacheck[1]] >>> all(g * C == C * g for g in U.algebra_generators()) True >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['B', Integer(2)]) >>> U = L.pbw_basis() >>> C = L.casimir_element(UEA=U) >>> all(g * C == C * g for g in U.algebra_generators()) True >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['C', Integer(3)]) >>> U = L.pbw_basis() >>> C = L.casimir_element(UEA=U) >>> all(g * C == C * g for g in U.algebra_generators()) True >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(1)]) >>> C4 = L.casimir_element(order=Integer(4), UEA=L.pbw_basis()); C4 4*PBW[alpha[1]]^2*PBW[-alpha[1]]^2 + 2*PBW[alpha[1]]*PBW[alphacheck[1]]^2*PBW[-alpha[1]] + 1/4*PBW[alphacheck[1]]^4 - PBW[alphacheck[1]]^3 - 4*PBW[alpha[1]]*PBW[-alpha[1]] + 2*PBW[alphacheck[1]] >>> all(g * C4 == C4 * g for g in L.pbw_basis().algebra_generators()) True >>> # needs sage.combinat sage.modules >>> L = lie_algebras.Heisenberg(QQ, Integer(2)) >>> L.casimir_element() 0 >>> # needs sage.combinat sage.modules >>> g = LieAlgebra(QQ, cartan_type=['D',Integer(2)]) >>> U = g.pbw_basis() >>> U.casimir_element(Integer(2), basis=True) [2*PBW[alpha[2]]*PBW[-alpha[2]] + 1/2*PBW[alphacheck[2]]^2 - PBW[alphacheck[2]], 2*PBW[alpha[1]]*PBW[-alpha[1]] + 1/2*PBW[alphacheck[1]]^2 - PBW[alphacheck[1]]] - Todo - Use the symmetry of the tensor to reduce the number of equations and/or variables to solve. 
 - center()[source]¶
- Return the center of - self.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: Z = L.center(); Z An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field sage: Z.basis_matrix() [1 0 0] [0 1 0] [0 0 1] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> Z = L.center(); Z An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field >>> Z.basis_matrix() [1 0 0] [0 1 0] [0 0 1] 
 - centralizer(S)[source]¶
- Return the centralizer of - Sin- self.- INPUT: - S– a subalgebra of- selfor a list of elements that represent generators for a subalgebra
 - See also - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: S = L.centralizer([a + b, 2*a + c]); S An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field sage: S.basis_matrix() [1 0 0] [0 1 0] [0 0 1] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> S = L.centralizer([a + b, Integer(2)*a + c]); S An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field >>> S.basis_matrix() [1 0 0] [0 1 0] [0 0 1] 
 - centralizer_basis(S)[source]¶
- Return a basis of the centralizer of - Sin- self.- INPUT: - S– a subalgebra of- selfor a list of elements that represent generators for a subalgebra
 - See also - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: L.centralizer_basis([a + b, 2*a + c]) [(1, 0, 0), (0, 1, 0), (0, 0, 1)] sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(QQ, 2) sage: H.centralizer_basis(H) [z] sage: # needs sage.combinat sage.groups sage.modules sage: D = DescentAlgebra(QQ, 4).D() sage: L = LieAlgebra(associative=D) sage: L.centralizer_basis(L) [D{}, D{1} + D{1, 2} + D{2, 3} + D{3}, D{1, 2, 3} + D{1, 3} + D{2}] sage: D.center_basis() (D{}, D{1} + D{1, 2} + D{2, 3} + D{3}, D{1, 2, 3} + D{1, 3} + D{2}) sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.centralizer_basis([a, c]) [a, b, c] sage: L.centralizer_basis([a, e]) [c] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> L.centralizer_basis([a + b, Integer(2)*a + c]) [(1, 0, 0), (0, 1, 0), (0, 0, 1)] >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(QQ, Integer(2)) >>> H.centralizer_basis(H) [z] >>> # needs sage.combinat sage.groups sage.modules >>> D = DescentAlgebra(QQ, Integer(4)).D() >>> L = LieAlgebra(associative=D) >>> L.centralizer_basis(L) [D{}, D{1} + D{1, 2} + D{2, 3} + D{3}, D{1, 2, 3} + D{1, 3} + D{2}] >>> D.center_basis() (D{}, D{1} + D{1, 2} + D{2, 3} + D{3}, D{1, 2, 3} + D{1, 3} + D{2}) >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.centralizer_basis([a, c]) [a, b, c] >>> L.centralizer_basis([a, e]) [c] 
 - chevalley_eilenberg_complex(M=None, dual=False, sparse=True, ncpus=None)[source]¶
- Return the Chevalley-Eilenberg complex of - self.- Let \(\mathfrak{g}\) be a Lie algebra and \(M\) be a right \(\mathfrak{g}\)-module. The Chevalley-Eilenberg complex is the chain complex on \[C_{\bullet}(\mathfrak{g}, M) = M \otimes \bigwedge\nolimits^{\bullet} \mathfrak{g},\]- where the differential is given by \[d(m \otimes g_1 \wedge \cdots \wedge g_p) = \sum_{i=1}^p (-1)^{i+1} (m g_i) \otimes g_1 \wedge \cdots \wedge \hat{g}_i \wedge \cdots \wedge g_p + \sum_{1 \leq i < j \leq p} (-1)^{i+j} m \otimes [g_i, g_j] \wedge g_1 \wedge \cdots \wedge \hat{g}_i \wedge \cdots \wedge \hat{g}_j \wedge \cdots \wedge g_p.\]- INPUT: - M– (default: the trivial 1-dimensional module) one of the following:- a module \(M\) with an action of - self
- a dictionary whose keys are basis elements and values are matrices representing a Lie algebra homomorphism defining the representation 
 
- dual– boolean (default:- False); if- True, causes the dual of the complex to be computed
- sparse– boolean (default:- True); whether to use sparse or dense matrices
- ncpus– (optional) how many cpus to use
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = lie_algebras.sl(ZZ, 2) sage: C = L.chevalley_eilenberg_complex(); C Chain complex with at most 4 nonzero terms over Integer Ring sage: ascii_art(C) [-2 0 0] [0] [ 0 1 0] [0] [0 0 0] [ 0 0 -2] [0] 0 <-- C_0 <-------- C_1 <----------- C_2 <---- C_3 <-- 0 sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['C',2]) sage: C = L.chevalley_eilenberg_complex() # long time sage: [C.free_module_rank(i) for i in range(11)] # long time [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1] sage: # needs sage.combinat sage.modules sage: g = lie_algebras.sl(QQ, 2) sage: E, F, H = g.basis() sage: n = g.subalgebra([F, H]) sage: ascii_art(n.chevalley_eilenberg_complex()) [ 0] [0 0] [-2] 0 <-- C_0 <------ C_1 <----- C_2 <-- 0 sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'y':1}}) sage: f = ({x: Matrix([[1,0],[0,0]]), y: Matrix([[0,1],[0,0]])}) sage: C = L.chevalley_eilenberg_complex(f); C Chain complex with at most 3 nonzero terms over Rational Field sage: ascii_art(C) [ 0 -1] [ 2 0] [1 0 0 1] [ 0 0] [0 0 0 0] [ 0 1] 0 <-- C_0 <---------- C_1 <-------- C_2 <-- 0 sage: ascii_art(L.chevalley_eilenberg_complex(f, sparse=False)) [ 0 -1] [ 2 0] [1 0 0 1] [ 0 0] [0 0 0 0] [ 0 1] 0 <-- C_0 <---------- C_1 <-------- C_2 <-- 0 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = lie_algebras.sl(ZZ, Integer(2)) >>> C = L.chevalley_eilenberg_complex(); C Chain complex with at most 4 nonzero terms over Integer Ring >>> ascii_art(C) [-2 0 0] [0] [ 0 1 0] [0] [0 0 0] [ 0 0 -2] [0] 0 <-- C_0 <-------- C_1 <----------- C_2 <---- C_3 <-- 0 >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['C',Integer(2)]) >>> C = L.chevalley_eilenberg_complex() # long time >>> [C.free_module_rank(i) for i in range(Integer(11))] # long time [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1] >>> # needs sage.combinat sage.modules >>> g = lie_algebras.sl(QQ, Integer(2)) >>> E, F, H = g.basis() >>> n = g.subalgebra([F, H]) >>> ascii_art(n.chevalley_eilenberg_complex()) [ 0] [0 0] [-2] 0 <-- C_0 <------ C_1 <----- C_2 <-- 0 >>> L = LieAlgebra(QQ, {('x','y'): {'y':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> f = ({x: Matrix([[Integer(1),Integer(0)],[Integer(0),Integer(0)]]), y: Matrix([[Integer(0),Integer(1)],[Integer(0),Integer(0)]])}) >>> C = L.chevalley_eilenberg_complex(f); C Chain complex with at most 3 nonzero terms over Rational Field >>> ascii_art(C) [ 0 -1] [ 2 0] [1 0 0 1] [ 0 0] [0 0 0 0] [ 0 1] 0 <-- C_0 <---------- C_1 <-------- C_2 <-- 0 >>> ascii_art(L.chevalley_eilenberg_complex(f, sparse=False)) [ 0 -1] [ 2 0] [1 0 0 1] [ 0 0] [0 0 0 0] [ 0 1] 0 <-- C_0 <---------- C_1 <-------- C_2 <-- 0 - REFERENCES: 
 - cohomology(deg=None, M=None, sparse=True, ncpus=None)[source]¶
- Return the Lie algebra cohomology of - self.- The Lie algebra cohomology is the cohomology of the Chevalley-Eilenberg cochain complex (which is the dual of the Chevalley-Eilenberg chain complex). - Let \(\mathfrak{g}\) be a Lie algebra and \(M\) a left \(\mathfrak{g}\)-module. It is known that \(H^0(\mathfrak{g}; M)\) is the subspace of \(\mathfrak{g}\)-invariants of \(M\): \[H^0(\mathfrak{g}; M) = M^{\mathfrak{g}} = \{ m \in M \mid g m = 0 \text{ for all } g \in \mathfrak{g} \}.\]- Additionally, \(H^1(\mathfrak{g}; M)\) is the space of derivations \(\mathfrak{g} \to M\) modulo the space of inner derivations, and \(H^2(\mathfrak{g}; M)\) is the space of equivalence classes of Lie algebra extensions of \(\mathfrak{g}\) by \(M\). - INPUT: - deg– the degree of the homology (optional)
- M– (default: the trivial module) a right module of- self
- sparse– boolean (default:- True); whether to use sparse matrices for the Chevalley-Eilenberg chain complex
- ncpus– (optional) how many cpus to use when computing the Chevalley-Eilenberg chain complex
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = lie_algebras.so(QQ, 4) sage: L.cohomology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 0 over Rational Field, 2: Vector space of dimension 0 over Rational Field, 3: Vector space of dimension 2 over Rational Field, 4: Vector space of dimension 0 over Rational Field, 5: Vector space of dimension 0 over Rational Field, 6: Vector space of dimension 1 over Rational Field} sage: # needs sage.combinat sage.modules sage: L = lie_algebras.Heisenberg(QQ, 2) sage: L.cohomology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 4 over Rational Field, 2: Vector space of dimension 5 over Rational Field, 3: Vector space of dimension 5 over Rational Field, 4: Vector space of dimension 4 over Rational Field, 5: Vector space of dimension 1 over Rational Field} sage: # needs sage.combinat sage.modules sage: d = {('x', 'y'): {'y': 2}} sage: L.<x,y> = LieAlgebra(ZZ, d) sage: L.cohomology() {0: Z, 1: Z, 2: C2} - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = lie_algebras.so(QQ, Integer(4)) >>> L.cohomology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 0 over Rational Field, 2: Vector space of dimension 0 over Rational Field, 3: Vector space of dimension 2 over Rational Field, 4: Vector space of dimension 0 over Rational Field, 5: Vector space of dimension 0 over Rational Field, 6: Vector space of dimension 1 over Rational Field} >>> # needs sage.combinat sage.modules >>> L = lie_algebras.Heisenberg(QQ, Integer(2)) >>> L.cohomology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 4 over Rational Field, 2: Vector space of dimension 5 over Rational Field, 3: Vector space of dimension 5 over Rational Field, 4: Vector space of dimension 4 over Rational Field, 5: Vector space of dimension 1 over Rational Field} >>> # needs sage.combinat sage.modules >>> d = {('x', 'y'): {'y': Integer(2)}} >>> L = LieAlgebra(ZZ, d, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.cohomology() {0: Z, 1: Z, 2: C2} - See also - REFERENCES: 
 - derivations_basis()[source]¶
- Return a basis for the Lie algebra of derivations of - selfas matrices.- A derivation \(D\) of an algebra is an endomorphism of \(A\) such that \[D([a, b]) = [D(a), b] + [a, D(b)]\]- for all \(a, b \in A\). The set of all derivations form a Lie algebra. - EXAMPLES: - We construct the derivations of the Heisenberg Lie algebra: - sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(QQ, 1) sage: H.derivations_basis() ( [1 0 0] [0 1 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [1 0 0] [0 1 0] [0 0 0] [0 0 0] [0 0 1], [0 0 0], [0 0 0], [0 0 1], [1 0 0], [0 1 0] ) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(QQ, Integer(1)) >>> H.derivations_basis() ( [1 0 0] [0 1 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [1 0 0] [0 1 0] [0 0 0] [0 0 0] [0 0 1], [0 0 0], [0 0 0], [0 0 1], [1 0 0], [0 1 0] ) - We construct the derivations of \(\mathfrak{sl}_2\): - sage: # needs sage.combinat sage.modules sage: sl2 = lie_algebras.sl(QQ, 2) sage: sl2.derivations_basis() ( [ 1 0 0] [ 0 1 0] [ 0 0 0] [ 0 0 0] [ 0 0 -1/2] [ 1 0 0] [ 0 0 -1], [ 0 0 0], [ 0 -2 0] ) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> sl2 = lie_algebras.sl(QQ, Integer(2)) >>> sl2.derivations_basis() ( [ 1 0 0] [ 0 1 0] [ 0 0 0] [ 0 0 0] [ 0 0 -1/2] [ 1 0 0] [ 0 0 -1], [ 0 0 0], [ 0 -2 0] ) - We verify these are derivations: - sage: # needs sage.combinat sage.modules sage: D = [sl2.module_morphism(matrix=M, codomain=sl2) ....: for M in sl2.derivations_basis()] sage: all(d(a.bracket(b)) == d(a).bracket(b) + a.bracket(d(b)) ....: for a in sl2.basis() for b in sl2.basis() for d in D) True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> D = [sl2.module_morphism(matrix=M, codomain=sl2) ... for M in sl2.derivations_basis()] >>> all(d(a.bracket(b)) == d(a).bracket(b) + a.bracket(d(b)) ... for a in sl2.basis() for b in sl2.basis() for d in D) True - REFERENCES: 
 - derived_series()[source]¶
- Return the derived series \((\mathfrak{g}^{(i)})_i\) of - selfwhere the rightmost \(\mathfrak{g}^{(k)} = \mathfrak{g}^{(k+1)} = \cdots\).- We define the derived series of a Lie algebra \(\mathfrak{g}\) recursively by \(\mathfrak{g}^{(0)} := \mathfrak{g}\) and \[\mathfrak{g}^{(k+1)} = [\mathfrak{g}^{(k)}, \mathfrak{g}^{(k)}]\]- and recall that \(\mathfrak{g}^{(k)} \supseteq \mathfrak{g}^{(k+1)}\). Alternatively we can express this as \[\mathfrak{g} \supseteq [\mathfrak{g}, \mathfrak{g}] \supseteq \bigl[ [\mathfrak{g}, \mathfrak{g}], [\mathfrak{g}, \mathfrak{g}] \bigr] \supseteq \biggl[ \bigl[ [\mathfrak{g}, \mathfrak{g}], [\mathfrak{g}, \mathfrak{g}] \bigr], \bigl[ [\mathfrak{g}, \mathfrak{g}], [\mathfrak{g}, \mathfrak{g}] \bigr] \biggr] \supseteq \cdots.\]- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.derived_series() (An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field, An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: []) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.derived_series() (An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field, An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: []) - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.derived_series() (Lie algebra on 2 generators (x, y) over Rational Field, Ideal (x) of Lie algebra on 2 generators (x, y) over Rational Field, Ideal () of Lie algebra on 2 generators (x, y) over Rational Field) sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.derived_series() (Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal () of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.derived_series() (Lie algebra on 2 generators (x, y) over Rational Field, Ideal (x) of Lie algebra on 2 generators (x, y) over Rational Field, Ideal () of Lie algebra on 2 generators (x, y) over Rational Field) >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.derived_series() (Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal () of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field) 
 - derived_subalgebra()[source]¶
- Return the derived subalgebra of - self.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.derived_subalgebra() An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.derived_subalgebra() An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] - If - selfis semisimple, then the derived subalgebra is- self:- sage: # needs sage.combinat sage.modules sage: sl3 = LieAlgebra(QQ, cartan_type=['A', 2]) sage: sl3.derived_subalgebra() Lie algebra of ['A', 2] in the Chevalley basis sage: sl3 is sl3.derived_subalgebra() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> sl3 = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> sl3.derived_subalgebra() Lie algebra of ['A', 2] in the Chevalley basis >>> sl3 is sl3.derived_subalgebra() True 
 - faithful_representation(algorithm=None)[source]¶
- Return a faithful representation of - self.- By Ado’s and Iwasawa’s theorems, every finite dimensional Lie algebra has a faithful finite dimensional representation. - INPUT: - algorithm– one of the following depending on the classification of the Lie algebra:- Nilpotent: - 'regular'– use the universal enveloping algebra quotient- FaithfulRepresentationNilpotentPBW
- 'minimal'– construct the minimal representation (for precise details, see the documentation of- FaithfulRepresentationNilpotentPBW)
 - Solvable: - Not implemented 
 - Semisimple: - Not implemented 
 - General case - 'generic'– generic algorithm (only implemented currently for positive characteristic)
 
 - Note that the algorithm for any more generic cases can be used in the specialized cases. For instance, using - 'generic'for any Lie algebra (e.g., even if nilpotent) will use the generic implementation.- EXAMPLES: - sage: H2 = lie_algebras.Heisenberg(QQ, 2) sage: H2.is_nilpotent() True sage: F = H2.faithful_representation(); F Faithful 16 dimensional representation of Heisenberg algebra of rank 2 over Rational Field sage: M = H2.faithful_representation(algorithm='minimal'); M Minimal faithful representation of Heisenberg algebra of rank 2 over Rational Field sage: M.dimension() 4 sage: H2.faithful_representation(algorithm='invalid') Traceback (most recent call last): ... ValueError: invalid algorithm 'invalid' sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.is_nilpotent() False sage: L.is_solvable() True sage: L.faithful_representation() Traceback (most recent call last): ... NotImplementedError: only implemented for nilpotent Lie algebras sage: sl3 = LieAlgebra(QQ, cartan_type=['A', 2]) sage: sl3.is_semisimple() True sage: sl3.faithful_representation() Traceback (most recent call last): ... NotImplementedError: only implemented for nilpotent Lie algebras - >>> from sage.all import * >>> H2 = lie_algebras.Heisenberg(QQ, Integer(2)) >>> H2.is_nilpotent() True >>> F = H2.faithful_representation(); F Faithful 16 dimensional representation of Heisenberg algebra of rank 2 over Rational Field >>> M = H2.faithful_representation(algorithm='minimal'); M Minimal faithful representation of Heisenberg algebra of rank 2 over Rational Field >>> M.dimension() 4 >>> H2.faithful_representation(algorithm='invalid') Traceback (most recent call last): ... ValueError: invalid algorithm 'invalid' >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.is_nilpotent() False >>> L.is_solvable() True >>> L.faithful_representation() Traceback (most recent call last): ... NotImplementedError: only implemented for nilpotent Lie algebras >>> sl3 = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> sl3.is_semisimple() True >>> sl3.faithful_representation() Traceback (most recent call last): ... NotImplementedError: only implemented for nilpotent Lie algebras 
 - from_vector(v, order=None)[source]¶
- Return the element of - selfcorresponding to the vector- vin- self.module().- Implement this if you implement - module(); see the documentation of- sage.categories.lie_algebras.LieAlgebras.module()for how this is to be done.- EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules sage: u = L.from_vector(vector(QQ, (1, 0, 0))); u # needs sage.modules (1, 0, 0) sage: parent(u) is L # needs sage.modules True - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules >>> u = L.from_vector(vector(QQ, (Integer(1), Integer(0), Integer(0)))); u # needs sage.modules (1, 0, 0) >>> parent(u) is L # needs sage.modules True 
 - homology(deg=None, M=None, sparse=True, ncpus=None)[source]¶
- Return the Lie algebra homology of - self.- The Lie algebra homology is the homology of the Chevalley-Eilenberg chain complex. - INPUT: - deg– the degree of the homology (optional)
- M– (default: the trivial module) a right module of- self
- sparse– boolean (default:- True); whether to use sparse matrices for the Chevalley-Eilenberg chain complex
- ncpus– (optional) how many cpus to use when computing the Chevalley-Eilenberg chain complex
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = lie_algebras.cross_product(QQ) sage: L.homology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 0 over Rational Field, 2: Vector space of dimension 0 over Rational Field, 3: Vector space of dimension 1 over Rational Field} sage: # needs sage.combinat sage.modules sage: L = lie_algebras.pwitt(GF(5), 5) sage: L.homology() {0: Vector space of dimension 1 over Finite Field of size 5, 1: Vector space of dimension 0 over Finite Field of size 5, 2: Vector space of dimension 1 over Finite Field of size 5, 3: Vector space of dimension 1 over Finite Field of size 5, 4: Vector space of dimension 0 over Finite Field of size 5, 5: Vector space of dimension 1 over Finite Field of size 5} sage: # needs sage.combinat sage.modules sage: d = {('x', 'y'): {'y': 2}} sage: L.<x,y> = LieAlgebra(ZZ, d) sage: L.homology() {0: Z, 1: Z x C2, 2: 0} - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = lie_algebras.cross_product(QQ) >>> L.homology() {0: Vector space of dimension 1 over Rational Field, 1: Vector space of dimension 0 over Rational Field, 2: Vector space of dimension 0 over Rational Field, 3: Vector space of dimension 1 over Rational Field} >>> # needs sage.combinat sage.modules >>> L = lie_algebras.pwitt(GF(Integer(5)), Integer(5)) >>> L.homology() {0: Vector space of dimension 1 over Finite Field of size 5, 1: Vector space of dimension 0 over Finite Field of size 5, 2: Vector space of dimension 1 over Finite Field of size 5, 3: Vector space of dimension 1 over Finite Field of size 5, 4: Vector space of dimension 0 over Finite Field of size 5, 5: Vector space of dimension 1 over Finite Field of size 5} >>> # needs sage.combinat sage.modules >>> d = {('x', 'y'): {'y': Integer(2)}} >>> L = LieAlgebra(ZZ, d, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.homology() {0: Z, 1: Z x C2, 2: 0} - See also 
 - hypercenter()[source]¶
- Return the hypercenter of - self.- EXAMPLES: - sage: SGA3 = SymmetricGroup(3).algebra(QQ) sage: L = LieAlgebra(associative=SGA3) sage: L.hypercenter() Ideal ((), (1,2,3) + (1,3,2), (2,3) + (1,2) + (1,3)) of Lie algebra of Symmetric group algebra of order 3 over Rational Field sage: L = lie_algebras.Heisenberg(QQ, 3) sage: L.hypercenter() Heisenberg algebra of rank 3 over Rational Field - >>> from sage.all import * >>> SGA3 = SymmetricGroup(Integer(3)).algebra(QQ) >>> L = LieAlgebra(associative=SGA3) >>> L.hypercenter() Ideal ((), (1,2,3) + (1,3,2), (2,3) + (1,2) + (1,3)) of Lie algebra of Symmetric group algebra of order 3 over Rational Field >>> L = lie_algebras.Heisenberg(QQ, Integer(3)) >>> L.hypercenter() Heisenberg algebra of rank 3 over Rational Field 
 - ideal(*gens, **kwds)[source]¶
- Return the ideal of - selfgenerated by- gens.- INPUT: - gens– list of generators of the ideal
- category– (optional) a subcategory of subobjects of finite dimensional Lie algebras with basis
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(QQ, 2) sage: p1,p2,q1,q2,z = H.basis() sage: I = H.ideal([p1 - p2, q1 - q2]) sage: I.basis().list() [-p1 + p2, -q1 + q2, z] sage: I.reduce(p1 + p2 + q1 + q2 + z) 2*p1 + 2*q1 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(QQ, Integer(2)) >>> p1,p2,q1,q2,z = H.basis() >>> I = H.ideal([p1 - p2, q1 - q2]) >>> I.basis().list() [-p1 + p2, -q1 + q2, z] >>> I.reduce(p1 + p2 + q1 + q2 + z) 2*p1 + 2*q1 - Passing an extra category to an ideal: - sage: # needs sage.combinat sage.modules sage: L.<x,y,z> = LieAlgebra(QQ, abelian=True) sage: C = LieAlgebras(QQ).FiniteDimensional().WithBasis() sage: C = C.Subobjects().Graded().Stratified() sage: I = L.ideal(x, y, category=C) sage: I.homogeneous_component_basis(1).list() [x, y] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, abelian=True, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> C = LieAlgebras(QQ).FiniteDimensional().WithBasis() >>> C = C.Subobjects().Graded().Stratified() >>> I = L.ideal(x, y, category=C) >>> I.homogeneous_component_basis(Integer(1)).list() [x, y] 
 - inner_derivations_basis()[source]¶
- Return a basis for the Lie algebra of inner derivations of - selfas matrices.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(QQ, 1) sage: H.inner_derivations_basis() ( [0 0 0] [0 0 0] [0 0 0] [0 0 0] [1 0 0], [0 1 0] ) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(QQ, Integer(1)) >>> H.inner_derivations_basis() ( [0 0 0] [0 0 0] [0 0 0] [0 0 0] [1 0 0], [0 1 0] ) 
 - is_abelian()[source]¶
- Return if - selfis an abelian Lie algebra.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.is_abelian() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.is_abelian() True - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.is_abelian() False - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.is_abelian() False 
 - is_ideal(A)[source]¶
- Return if - selfis an ideal of- A.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a, b, c = L.lie_algebra_generators() sage: I = L.ideal([2*a - c, b + c]) sage: I.is_ideal(L) True sage: L.<x,y> = LieAlgebra(QQ, {('x','y'):{'x':1}}) # needs sage.combinat sage.modules sage: L.is_ideal(L) # needs sage.combinat sage.modules True sage: F = LieAlgebra(QQ, 'F', representation='polynomial') # needs sage.combinat sage.modules sage: L.is_ideal(F) # needs sage.combinat sage.modules Traceback (most recent call last): ... NotImplementedError: A must be a finite dimensional Lie algebra with basis - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a, b, c = L.lie_algebra_generators() >>> I = L.ideal([Integer(2)*a - c, b + c]) >>> I.is_ideal(L) True >>> L = LieAlgebra(QQ, {('x','y'):{'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2)# needs sage.combinat sage.modules >>> L.is_ideal(L) # needs sage.combinat sage.modules True >>> F = LieAlgebra(QQ, 'F', representation='polynomial') # needs sage.combinat sage.modules >>> L.is_ideal(F) # needs sage.combinat sage.modules Traceback (most recent call last): ... NotImplementedError: A must be a finite dimensional Lie algebra with basis 
 - is_nilpotent()[source]¶
- Return if - selfis a nilpotent Lie algebra.- A Lie algebra is nilpotent if the lower central series eventually becomes \(0\). - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.is_nilpotent() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.is_nilpotent() True 
 - is_semisimple()[source]¶
- Return if - selfif a semisimple Lie algebra.- A Lie algebra is semisimple if the solvable radical is zero. In characteristic 0, this is equivalent to saying the Killing form is non-degenerate. - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.is_semisimple() False - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.is_semisimple() False - Positive characteristic examples: - sage: L.<x,y,z> = LieAlgebra(GF(3), {('x','z'): {'x':1, 'y':1}, ('y','z'): {'y':1}}) sage: L.is_semisimple() False sage: sp4 = LieAlgebra(GF(3), cartan_type=['C',2]) sage: sp4.killing_form_matrix().det() 0 sage: sp4.solvable_radical_basis() # long time () sage: sp4.is_semisimple() # long time True - >>> from sage.all import * >>> L = LieAlgebra(GF(Integer(3)), {('x','z'): {'x':Integer(1), 'y':Integer(1)}, ('y','z'): {'y':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.is_semisimple() False >>> sp4 = LieAlgebra(GF(Integer(3)), cartan_type=['C',Integer(2)]) >>> sp4.killing_form_matrix().det() 0 >>> sp4.solvable_radical_basis() # long time () >>> sp4.is_semisimple() # long time True 
 - is_solvable()[source]¶
- Return if - selfis a solvable Lie algebra.- A Lie algebra is solvable if the derived series eventually becomes \(0\). - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.is_solvable() True - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.is_solvable() True - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.is_solvable() # not implemented False - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.is_solvable() # not implemented False 
 - killing_form(x, y)[source]¶
- Return the Killing form on - xand- y, where- xand- yare two elements of- self.- The Killing form is defined as \[\langle x \mid y \rangle = \operatorname{tr}\left( \operatorname{ad}_x \circ \operatorname{ad}_y \right).\]- EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules sage: a, b, c = L.lie_algebra_generators() # needs sage.modules sage: L.killing_form(a, b) # needs sage.modules 0 - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules >>> a, b, c = L.lie_algebra_generators() # needs sage.modules >>> L.killing_form(a, b) # needs sage.modules 0 
 - killing_form_matrix()[source]¶
- Return the matrix of the Killing form of - self.- The rows and the columns of this matrix are indexed by the elements of the basis of - self(in the order provided by- basis()).- EXAMPLES: - sage: # needs sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.killing_form_matrix() [0 0 0] [0 0 0] [0 0 0] sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example(0) sage: m = L.killing_form_matrix(); m [] sage: parent(m) Full MatrixSpace of 0 by 0 dense matrices over Rational Field - >>> from sage.all import * >>> # needs sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.killing_form_matrix() [0 0 0] [0 0 0] [0 0 0] >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example(Integer(0)) >>> m = L.killing_form_matrix(); m [] >>> parent(m) Full MatrixSpace of 0 by 0 dense matrices over Rational Field 
 - killing_matrix(x, y)[source]¶
- Return the Killing matrix of - xand- y, where- xand- yare two elements of- self.- The Killing matrix is defined as the matrix corresponding to the action of \(\operatorname{ad}_x \circ \operatorname{ad}_y\) in the basis of - self.- EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules sage: a, b, c = L.lie_algebra_generators() # needs sage.modules sage: L.killing_matrix(a, b) # needs sage.modules [0 0 0] [0 0 0] [0 0 0] - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules >>> a, b, c = L.lie_algebra_generators() # needs sage.modules >>> L.killing_matrix(a, b) # needs sage.modules [0 0 0] [0 0 0] [0 0 0] - sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) # needs sage.combinat sage.modules sage: L.killing_matrix(y, x) # needs sage.combinat sage.modules [ 0 -1] [ 0 0] - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2)# needs sage.combinat sage.modules >>> L.killing_matrix(y, x) # needs sage.combinat sage.modules [ 0 -1] [ 0 0] 
 - lower_central_series(submodule=False)[source]¶
- Return the lower central series \((\mathfrak{g}_{i})_i\) of - selfwhere the rightmost \(\mathfrak{g}_k = \mathfrak{g}_{k+1} = \cdots\).- INPUT: - submodule– boolean (default:- False); if- True, then the result is given as submodules of- self
 - We define the lower central series of a Lie algebra \(\mathfrak{g}\) recursively by \(\mathfrak{g}_0 := \mathfrak{g}\) and \[\mathfrak{g}_{k+1} = [\mathfrak{g}, \mathfrak{g}_{k}]\]- and recall that \(\mathfrak{g}_{k} \supseteq \mathfrak{g}_{k+1}\). Alternatively we can express this as \[\mathfrak{g} \supseteq [\mathfrak{g}, \mathfrak{g}] \supseteq \bigl[ [\mathfrak{g}, \mathfrak{g}], \mathfrak{g} \bigr] \supseteq \Bigl[\bigl[ [\mathfrak{g}, \mathfrak{g}], \mathfrak{g} \bigr], \mathfrak{g}\Bigr] \supseteq \cdots.\]- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.derived_series() (An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field, An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: []) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.derived_series() (An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field, An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: []) - The lower central series as submodules: - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.lower_central_series(submodule=True) (Sparse vector space of dimension 2 over Rational Field, Vector space of degree 2 and dimension 1 over Rational Field Basis matrix: [1 0]) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.lower_central_series(submodule=True) (Sparse vector space of dimension 2 over Rational Field, Vector space of degree 2 and dimension 1 over Rational Field Basis matrix: [1 0]) - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.lower_central_series() (Lie algebra on 2 generators (x, y) over Rational Field, Ideal (x) of Lie algebra on 2 generators (x, y) over Rational Field) sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.lower_central_series() (Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field) - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.lower_central_series() (Lie algebra on 2 generators (x, y) over Rational Field, Ideal (x) of Lie algebra on 2 generators (x, y) over Rational Field) >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.lower_central_series() (Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field, Ideal (a, b) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field) 
 - module(R=None)[source]¶
- Return a dense free module associated to - selfover- R.- EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules sage: L._dense_free_module() # needs sage.modules Vector space of dimension 3 over Rational Field - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules >>> L._dense_free_module() # needs sage.modules Vector space of dimension 3 over Rational Field 
 - morphism(on_generators, codomain=None, base_map=None, check=True)[source]¶
- Return a Lie algebra morphism defined by images of a Lie generating subset of - self.- INPUT: - on_generators– dictionary- {X: Y}of the images \(Y\) in- codomainof elements \(X\) of- domain
- codomain– a Lie algebra (optional); this is inferred from the values of- on_generatorsif not given
- base_map– a homomorphism from the base ring to something coercing into the codomain
- check– boolean (default:- True); if- Falsethe values on the Lie brackets implied by- on_generatorswill not be checked for contradictory values
 - Note - The keys of - on_generatorsneed to generate- domainas a Lie algebra.- EXAMPLES: - A quotient type Lie algebra morphism - sage: # needs sage.combinat sage.modules sage: L.<X,Y,Z,W> = LieAlgebra(QQ, {('X','Y'): {'Z': 1}, ....: ('X','Z'): {'W': 1}}) sage: K.<A,B> = LieAlgebra(QQ, abelian=True) sage: L.morphism({X: A, Y: B}) Lie algebra morphism: From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field To: Abelian Lie algebra on 2 generators (A, B) over Rational Field Defn: X |--> A Y |--> B Z |--> 0 W |--> 0 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('X','Y'): {'Z': Integer(1)}, ... ('X','Z'): {'W': Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4) >>> K = LieAlgebra(QQ, abelian=True, names=('A', 'B',)); (A, B,) = K._first_ngens(2) >>> L.morphism({X: A, Y: B}) Lie algebra morphism: From: Lie algebra on 4 generators (X, Y, Z, W) over Rational Field To: Abelian Lie algebra on 2 generators (A, B) over Rational Field Defn: X |--> A Y |--> B Z |--> 0 W |--> 0 - The reverse map \(A \mapsto X\), \(B \mapsto Y\) does not define a Lie algebra morphism, since \([A,B] = 0\), but \([X,Y] \neq 0\): - sage: # needs sage.combinat sage.modules sage: K.morphism({A:X, B: Y}) Traceback (most recent call last): ... ValueError: this does not define a Lie algebra morphism; contradictory values for brackets of length 2 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> K.morphism({A:X, B: Y}) Traceback (most recent call last): ... ValueError: this does not define a Lie algebra morphism; contradictory values for brackets of length 2 - However, it is still possible to create a morphism that acts nontrivially on the coefficients, even though it’s not a Lie algebra morphism (since it isn’t linear): - sage: # needs sage.combinat sage.modules sage.rings.number_fields sage: R.<x> = ZZ[] sage: K.<i> = NumberField(x^2 + 1) sage: cc = K.hom([-i]) sage: L.<X,Y,Z,W> = LieAlgebra(K, {('X','Y'): {'Z': 1}, ....: ('X','Z'): {'W': 1}}) sage: M.<A,B> = LieAlgebra(K, abelian=True) sage: phi = L.morphism({X: A, Y: B}, base_map=cc) sage: phi(X) A sage: phi(i*X) -i*A - >>> from sage.all import * >>> # needs sage.combinat sage.modules sage.rings.number_fields >>> R = ZZ['x']; (x,) = R._first_ngens(1) >>> K = NumberField(x**Integer(2) + Integer(1), names=('i',)); (i,) = K._first_ngens(1) >>> cc = K.hom([-i]) >>> L = LieAlgebra(K, {('X','Y'): {'Z': Integer(1)}, ... ('X','Z'): {'W': Integer(1)}}, names=('X', 'Y', 'Z', 'W',)); (X, Y, Z, W,) = L._first_ngens(4) >>> M = LieAlgebra(K, abelian=True, names=('A', 'B',)); (A, B,) = M._first_ngens(2) >>> phi = L.morphism({X: A, Y: B}, base_map=cc) >>> phi(X) A >>> phi(i*X) -i*A 
 - nilradical()[source]¶
- Return the nilradical of - self.- The nilradical of a Lie algebra \(L\) is the largest nilpotent ideal of \(L\). - See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.solvable_radical() Ideal (a, b, c, d, e) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.solvable_radical() Ideal (a, b, c, d, e) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field 
 - nilradical_basis()[source]¶
- Return a basis of the nilradical of - self.- See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.nilradical_basis() (a, b, c) sage: L.is_nilpotent() False sage: sl3 = LieAlgebra(QQ, cartan_type=['A',2]) sage: sl3.nilradical_basis() () sage: scoeffs = {('a','e'): {'a':1}, ('b','e'): {'a':1,'b':1}, ....: ('c','d'): {'a':1}, ('c','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.nilradical_basis() (a, b, c, d) sage: L.is_solvable() True sage: L.is_nilpotent() False sage: K1 = L.quotient([a]) sage: K1.nilradical_basis() (b, c, d) sage: SL = L.subalgebra([a,b,c,d]); SL Subalgebra generated by (a, b, c, d) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field sage: SL.nilradical_basis() (a, b, c, d) sage: scoeffs = {('x','z'): {'x':1, 'y':1}, ('y','z'): {'y':1}} sage: L.<x,y,z> = LieAlgebra(GF(3), scoeffs) sage: L.nilradical_basis() (x, y) - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.nilradical_basis() (a, b, c) >>> L.is_nilpotent() False >>> sl3 = LieAlgebra(QQ, cartan_type=['A',Integer(2)]) >>> sl3.nilradical_basis() () >>> scoeffs = {('a','e'): {'a':Integer(1)}, ('b','e'): {'a':Integer(1),'b':Integer(1)}, ... ('c','d'): {'a':Integer(1)}, ('c','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.nilradical_basis() (a, b, c, d) >>> L.is_solvable() True >>> L.is_nilpotent() False >>> K1 = L.quotient([a]) >>> K1.nilradical_basis() (b, c, d) >>> SL = L.subalgebra([a,b,c,d]); SL Subalgebra generated by (a, b, c, d) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field >>> SL.nilradical_basis() (a, b, c, d) >>> scoeffs = {('x','z'): {'x':Integer(1), 'y':Integer(1)}, ('y','z'): {'y':Integer(1)}} >>> L = LieAlgebra(GF(Integer(3)), scoeffs, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.nilradical_basis() (x, y) - We check against the generic algorithm: - sage: L.<x,y,z> = LieAlgebra(QQ, {('x','z'): {'x':1,'y':1}, ('y','z'): {'y':1}}) sage: L.nilradical_basis() (x, y) sage: dim = L.dimension() sage: MS = MatrixSpace(L.base_ring(), dim) sage: gens = [b.adjoint_matrix() for b in L.basis()] sage: A = MS.subalgebra(gens) sage: RB = A.radical_basis() sage: mat = matrix(L.base_ring(), ....: [g._vector_() for g in gens] ....: + [A.lift(r)._vector_() for r in RB]) sage: tuple([L.from_vector(w) for v in mat.right_kernel().basis() ....: if (w := v[:dim])]) (x, y) - >>> from sage.all import * >>> L = LieAlgebra(QQ, {('x','z'): {'x':Integer(1),'y':Integer(1)}, ('y','z'): {'y':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.nilradical_basis() (x, y) >>> dim = L.dimension() >>> MS = MatrixSpace(L.base_ring(), dim) >>> gens = [b.adjoint_matrix() for b in L.basis()] >>> A = MS.subalgebra(gens) >>> RB = A.radical_basis() >>> mat = matrix(L.base_ring(), ... [g._vector_() for g in gens] ... + [A.lift(r)._vector_() for r in RB]) >>> tuple([L.from_vector(w) for v in mat.right_kernel().basis() ... if (w := v[:dim])]) (x, y) - A positive characteristic example: - sage: scoeffs = {('x','z'): {'x':1,'y':1}, ('y','z'): {'y':1}} sage: L.<x,y,z> = LieAlgebra(GF(3), scoeffs) sage: L.nilradical_basis() (x, y) - >>> from sage.all import * >>> scoeffs = {('x','z'): {'x':Integer(1),'y':Integer(1)}, ('y','z'): {'y':Integer(1)}} >>> L = LieAlgebra(GF(Integer(3)), scoeffs, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.nilradical_basis() (x, y) 
 - normalizer(S)[source]¶
- Return the normalizer of - Sin- self.- INPUT: - S– a subalgebra of- selfor a list of elements that represent generators for a subalgebra
 - See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.normalizer([a, e]) Subalgebra generated by (b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field sage: L.normalizer([a, c, e]) Subalgebra generated by (b, c, d) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.normalizer([a, e]) Subalgebra generated by (b, c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field >>> L.normalizer([a, c, e]) Subalgebra generated by (b, c, d) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field 
 - normalizer_basis(S)[source]¶
- Return a basis of the normalizer of - Sin- self.- INPUT: - S– a subalgebra of- selfor a list of elements that represent generators for a subalgebra
 - See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.normalizer_basis([a, e]) [b, c] sage: S = L.subalgebra([a, e]) sage: L.normalizer_basis(S) [a, b, c, e] - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.normalizer_basis([a, e]) [b, c] >>> S = L.subalgebra([a, e]) >>> L.normalizer_basis(S) [a, b, c, e] - When the subalgebra is the ambient Lie algebra, we return the basis of the ambient Lie algebra: - sage: L.normalizer_basis(L) Finite family {'a': a, 'b': b, 'c': c, 'd': d, 'e': e} sage: L.normalizer_basis([a, b, c, a, d + e, a + e]) Finite family {'a': a, 'b': b, 'c': c, 'd': d, 'e': e} - >>> from sage.all import * >>> L.normalizer_basis(L) Finite family {'a': a, 'b': b, 'c': c, 'd': d, 'e': e} >>> L.normalizer_basis([a, b, c, a, d + e, a + e]) Finite family {'a': a, 'b': b, 'c': c, 'd': d, 'e': e} 
 - product_space(L, submodule=False)[source]¶
- Return the product space - [self, L].- INPUT: - L– a Lie subalgebra of- self
- submodule– boolean (default:- False); if- True, then the result is forced to be a submodule of- self
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: a,b,c = L.lie_algebra_generators() sage: X = L.subalgebra([a, b + c]) sage: L.product_space(X) An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] sage: Y = L.subalgebra([a, 2*b - c]) sage: X.product_space(Y) An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> a,b,c = L.lie_algebra_generators() >>> X = L.subalgebra([a, b + c]) >>> L.product_space(X) An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] >>> Y = L.subalgebra([a, Integer(2)*b - c]) >>> X.product_space(Y) An example of a finite dimensional Lie algebra with basis: the 0-dimensional abelian Lie algebra over Rational Field with basis matrix: [] - sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(ZZ, 4) sage: Hp = H.product_space(H, submodule=True).basis() sage: [H.from_vector(v) for v in Hp] [z] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(ZZ, Integer(4)) >>> Hp = H.product_space(H, submodule=True).basis() >>> [H.from_vector(v) for v in Hp] [z] - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'):{'x':1}}) sage: Lp = L.product_space(L) # not implemented sage: Lp # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) sage: Lp.product_space(L) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) sage: L.product_space(Lp) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) sage: Lp.product_space(Lp) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: () - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'):{'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> Lp = L.product_space(L) # not implemented >>> Lp # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) >>> Lp.product_space(L) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) >>> L.product_space(Lp) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: (x,) >>> Lp.product_space(Lp) # not implemented Subalgebra generated of Lie algebra on 2 generators (x, y) over Rational Field with basis: () 
 - quotient(I, names=None, category=None)[source]¶
- Return the quotient of - selfby the ideal- I.- A quotient Lie algebra. - INPUT: - I– an ideal or a list of generators of the ideal
- names– (optional) string or list of strings; names for the basis elements of the quotient. If- namesis a string, the basis will be named- names_1,…,``names_n``.
 - EXAMPLES: - The Engel Lie algebra as a quotient of the free nilpotent Lie algebra of step 3 with 2 generators: - sage: # needs sage.combinat sage.modules sage: L.<X,Y,Z,W,U> = LieAlgebra(QQ, 2, step=3) sage: E = L.quotient(U); E Lie algebra quotient L/I of dimension 4 over Rational Field where L: Free Nilpotent Lie algebra on 5 generators (X, Y, Z, W, U) over Rational Field I: Ideal (U) sage: E.basis().list() [X, Y, Z, W] sage: E(X).bracket(E(Y)) Z sage: Y.bracket(Z) -U sage: E(Y).bracket(E(Z)) 0 sage: E(U) 0 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, Integer(2), step=Integer(3), names=('X', 'Y', 'Z', 'W', 'U',)); (X, Y, Z, W, U,) = L._first_ngens(5) >>> E = L.quotient(U); E Lie algebra quotient L/I of dimension 4 over Rational Field where L: Free Nilpotent Lie algebra on 5 generators (X, Y, Z, W, U) over Rational Field I: Ideal (U) >>> E.basis().list() [X, Y, Z, W] >>> E(X).bracket(E(Y)) Z >>> Y.bracket(Z) -U >>> E(Y).bracket(E(Z)) 0 >>> E(U) 0 - Quotients when the base ring is not a field are not implemented: - sage: # needs sage.combinat sage.modules sage: L = lie_algebras.Heisenberg(ZZ, 1) sage: L.quotient(L.an_element()) Traceback (most recent call last): ... NotImplementedError: quotients over non-fields not implemented - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = lie_algebras.Heisenberg(ZZ, Integer(1)) >>> L.quotient(L.an_element()) Traceback (most recent call last): ... NotImplementedError: quotients over non-fields not implemented 
 - solvable_radical()[source]¶
- Return the solvable radical of - self.- The solvable radical of a Lie algebra \(L\) is the largest solvable ideal of \(L\). - See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.solvable_radical() Ideal (a, b, c, d, e) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.solvable_radical() Ideal (a, b, c, d, e) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field 
 - solvable_radical_basis()[source]¶
- Return a basis of the solvable radical of - self.- See also - EXAMPLES: - sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.solvable_radical_basis() (a, b, c, d, e) sage: L.is_solvable() True sage: sl3 = LieAlgebra(QQ, cartan_type=['A',2]) sage: sl3.solvable_radical_basis() () sage: L.<x,y,z> = LieAlgebra(QQ, {('x','z'): {'x':1,'y':1}, ('y','z'): {'y':1}}) sage: S = L.subalgebra([x, y]) sage: S.solvable_radical_basis() (x, y) sage: S.is_solvable() True - >>> from sage.all import * >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.solvable_radical_basis() (a, b, c, d, e) >>> L.is_solvable() True >>> sl3 = LieAlgebra(QQ, cartan_type=['A',Integer(2)]) >>> sl3.solvable_radical_basis() () >>> L = LieAlgebra(QQ, {('x','z'): {'x':Integer(1),'y':Integer(1)}, ('y','z'): {'y':Integer(1)}}, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> S = L.subalgebra([x, y]) >>> S.solvable_radical_basis() (x, y) >>> S.is_solvable() True - Positive characteristic examples: - sage: scoeffs = {('x','z'): {'x':1,'y':1}, ('y','z'): {'y':1}} sage: L.<x,y,z> = LieAlgebra(GF(3), scoeffs) sage: L.solvable_radical_basis() (x, y, z) sage: sl3 = LieAlgebra(GF(3), cartan_type=['A',2]) sage: sl3.solvable_radical_basis() (2*h1 + h2,) - >>> from sage.all import * >>> scoeffs = {('x','z'): {'x':Integer(1),'y':Integer(1)}, ('y','z'): {'y':Integer(1)}} >>> L = LieAlgebra(GF(Integer(3)), scoeffs, names=('x', 'y', 'z',)); (x, y, z,) = L._first_ngens(3) >>> L.solvable_radical_basis() (x, y, z) >>> sl3 = LieAlgebra(GF(Integer(3)), cartan_type=['A',Integer(2)]) >>> sl3.solvable_radical_basis() (2*h1 + h2,) 
 - structure_coefficients(include_zeros=False)[source]¶
- Return the structure coefficients of - self.- INPUT: - include_zeros– boolean (default:- False); if- True, then include the \([x, y] = 0\) pairs in the output
 - OUTPUT: - A dictionary whose keys are pairs of basis indices \((i, j)\) with \(i < j\), and whose values are the corresponding elements \([b_i, b_j]\) in the Lie algebra. - EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules sage: L.structure_coefficients() # needs sage.modules Finite family {} sage: L.structure_coefficients(True) # needs sage.modules Finite family {(0, 1): (0, 0, 0), (0, 2): (0, 0, 0), (1, 2): (0, 0, 0)} - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() # needs sage.modules >>> L.structure_coefficients() # needs sage.modules Finite family {} >>> L.structure_coefficients(True) # needs sage.modules Finite family {(0, 1): (0, 0, 0), (0, 2): (0, 0, 0), (1, 2): (0, 0, 0)} - sage: # needs sage.combinat sage.groups sage.modules sage: G = SymmetricGroup(3) sage: S = GroupAlgebra(G, QQ) sage: L = LieAlgebra(associative=S) sage: L.structure_coefficients() Finite family {((2,3), (1,2)): (1,2,3) - (1,3,2), ((2,3), (1,3)): -(1,2,3) + (1,3,2), ((1,2,3), (2,3)): -(1,2) + (1,3), ((1,2,3), (1,2)): (2,3) - (1,3), ((1,2,3), (1,3)): -(2,3) + (1,2), ((1,3,2), (2,3)): (1,2) - (1,3), ((1,3,2), (1,2)): -(2,3) + (1,3), ((1,3,2), (1,3)): (2,3) - (1,2), ((1,3), (1,2)): -(1,2,3) + (1,3,2)} - >>> from sage.all import * >>> # needs sage.combinat sage.groups sage.modules >>> G = SymmetricGroup(Integer(3)) >>> S = GroupAlgebra(G, QQ) >>> L = LieAlgebra(associative=S) >>> L.structure_coefficients() Finite family {((2,3), (1,2)): (1,2,3) - (1,3,2), ((2,3), (1,3)): -(1,2,3) + (1,3,2), ((1,2,3), (2,3)): -(1,2) + (1,3), ((1,2,3), (1,2)): (2,3) - (1,3), ((1,2,3), (1,3)): -(2,3) + (1,2), ((1,3,2), (2,3)): (1,2) - (1,3), ((1,3,2), (1,2)): -(2,3) + (1,3), ((1,3,2), (1,3)): (2,3) - (1,2), ((1,3), (1,2)): -(1,2,3) + (1,3,2)} 
 - subalgebra(*gens, **kwds)[source]¶
- Return the subalgebra of - selfgenerated by- gens.- INPUT: - gens– list of generators of the subalgebra
- category– (optional) a subcategory of subobjects of finite dimensional Lie algebras with basis
 - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: H = lie_algebras.Heisenberg(QQ, 2) sage: p1,p2,q1,q2,z = H.basis() sage: S = H.subalgebra([p1, q1]) sage: S.basis().list() [p1, q1, z] sage: S.basis_matrix() [1 0 0 0 0] [0 0 1 0 0] [0 0 0 0 1] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> H = lie_algebras.Heisenberg(QQ, Integer(2)) >>> p1,p2,q1,q2,z = H.basis() >>> S = H.subalgebra([p1, q1]) >>> S.basis().list() [p1, q1, z] >>> S.basis_matrix() [1 0 0 0 0] [0 0 1 0 0] [0 0 0 0 1] - Passing an extra category to a subalgebra: - sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, 3, step=2) sage: x,y,z = L.homogeneous_component_basis(1) sage: C = LieAlgebras(QQ).FiniteDimensional().WithBasis() sage: C = C.Subobjects().Graded().Stratified() sage: S = L.subalgebra([x, y], category=C) sage: S.homogeneous_component_basis(2).list() [X_12] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, Integer(3), step=Integer(2)) >>> x,y,z = L.homogeneous_component_basis(Integer(1)) >>> C = LieAlgebras(QQ).FiniteDimensional().WithBasis() >>> C = C.Subobjects().Graded().Stratified() >>> S = L.subalgebra([x, y], category=C) >>> S.homogeneous_component_basis(Integer(2)).list() [X_12] 
 - universal_commutative_algebra()[source]¶
- Return the universal commutative algebra associated to - self.- Let \(I\) be the index set of the basis of - self. Let \(\mathcal{P} = \{P_{a,i,j}\}_{a,i,j \in I}\) denote the universal polynomials of a Lie algebra \(L\). The universal commutative algebra associated to \(L\) is the quotient ring \(R[X_{ij}]_{i,j \in I} / (\mathcal{P})\).- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: A = L.universal_commutative_algebra() sage: a, b, c, d = A.gens() sage: a, b, c, d (X00bar, X01bar, 0, X11bar) sage: a*d - a 0 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> A = L.universal_commutative_algebra() >>> a, b, c, d = A.gens() >>> a, b, c, d (X00bar, X01bar, 0, X11bar) >>> a*d - a 0 
 - universal_polynomials()[source]¶
- Return the family of universal polynomials of - self.- The universal polynomials of a Lie algebra \(L\) with basis \(\{e_i\}_{i \in I}\) and structure coefficients \([e_i, e_j] = \tau_{ij}^a e_a\) is given by \[P_{aij} = \sum_{u \in I} \tau_{ij}^u X_{au} - \sum_{s,t \in I} \tau_{st}^a X_{si} X_{tj},\]- where \(a,i,j \in I\). - REFERENCES: - EXAMPLES: - sage: # needs sage.combinat sage.modules sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.universal_polynomials() Finite family {('x', 'x', 'y'): X01*X10 - X00*X11 + X00, ('y', 'x', 'y'): X10} sage: # needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['A',1]) sage: list(L.universal_polynomials()) [-2*X01*X10 + 2*X00*X11 - 2*X00, -2*X02*X10 + 2*X00*X12 + X01, -2*X02*X11 + 2*X01*X12 - 2*X02, X01*X20 - X00*X21 - 2*X10, X02*X20 - X00*X22 + X11, X02*X21 - X01*X22 - 2*X12, -2*X11*X20 + 2*X10*X21 - 2*X20, -2*X12*X20 + 2*X10*X22 + X21, -2*X12*X21 + 2*X11*X22 - 2*X22] sage: # long time, needs sage.combinat sage.modules sage: L = LieAlgebra(QQ, cartan_type=['B', 2]) sage: al = RootSystem(['B', 2]).root_lattice().simple_roots() sage: k = list(L.basis().keys())[0] sage: UP = L.universal_polynomials() sage: len(UP) 450 sage: UP[al[2], al[1], -al[1]] X0_7*X4_1 - X0_1*X4_7 - 2*X0_7*X5_1 + 2*X0_1*X5_7 + X2_7*X7_1 - X2_1*X7_7 - X3_7*X8_1 + X3_1*X8_7 + X0_4 - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.universal_polynomials() Finite family {('x', 'x', 'y'): X01*X10 - X00*X11 + X00, ('y', 'x', 'y'): X10} >>> # needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['A',Integer(1)]) >>> list(L.universal_polynomials()) [-2*X01*X10 + 2*X00*X11 - 2*X00, -2*X02*X10 + 2*X00*X12 + X01, -2*X02*X11 + 2*X01*X12 - 2*X02, X01*X20 - X00*X21 - 2*X10, X02*X20 - X00*X22 + X11, X02*X21 - X01*X22 - 2*X12, -2*X11*X20 + 2*X10*X21 - 2*X20, -2*X12*X20 + 2*X10*X22 + X21, -2*X12*X21 + 2*X11*X22 - 2*X22] >>> # long time, needs sage.combinat sage.modules >>> L = LieAlgebra(QQ, cartan_type=['B', Integer(2)]) >>> al = RootSystem(['B', Integer(2)]).root_lattice().simple_roots() >>> k = list(L.basis().keys())[Integer(0)] >>> UP = L.universal_polynomials() >>> len(UP) 450 >>> UP[al[Integer(2)], al[Integer(1)], -al[Integer(1)]] X0_7*X4_1 - X0_1*X4_7 - 2*X0_7*X5_1 + 2*X0_1*X5_7 + X2_7*X7_1 - X2_1*X7_7 - X3_7*X8_1 + X3_1*X8_7 + X0_4 
 - upper_central_series()[source]¶
- Return the upper central series \((Z_i(\mathfrak{g}))_i\) of - selfwhere the rightmost \(Z_k(\mathfrak{g}) = Z_{k+1}(\mathfrak{g}) = \cdots\).- The upper central series of a Lie algebra \(\mathfrak{g}\) is defined recursively by \(Z_0(\mathfrak{g}) := Z(\mathfrak{g})\) and \[Z_{k+1}(\mathfrak{g}) / Z_k(\mathfrak{g}) = Z(\mathfrak{g} / Z_k(\mathfrak{g}),\]- and recall that \(Z(\mathfrak{g})\) is the - center()of \(\mathfrak{g}\).- EXAMPLES: - sage: L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() sage: L.upper_central_series() [An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field] sage: L.<x,y> = LieAlgebra(QQ, {('x','y'): {'x':1}}) sage: L.upper_central_series() [Ideal () of Lie algebra on 2 generators (x, y) over Rational Field] sage: scoeffs = {('a','d'): {'a':1}, ('a','e'): {'b':-1}, ....: ('b','d'): {'b':1}, ('b','e'): {'a':1}, ....: ('d','e'): {'c':1}} sage: L.<a,b,c,d,e> = LieAlgebra(QQ, scoeffs) sage: L.upper_central_series() [Ideal (c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field] sage: L = lie_algebras.Heisenberg(QQ, 3) sage: L.upper_central_series() [Ideal (z) of Heisenberg algebra of rank 3 over Rational Field, Heisenberg algebra of rank 3 over Rational Field] - >>> from sage.all import * >>> L = LieAlgebras(QQ).FiniteDimensional().WithBasis().example() >>> L.upper_central_series() [An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field] >>> L = LieAlgebra(QQ, {('x','y'): {'x':Integer(1)}}, names=('x', 'y',)); (x, y,) = L._first_ngens(2) >>> L.upper_central_series() [Ideal () of Lie algebra on 2 generators (x, y) over Rational Field] >>> scoeffs = {('a','d'): {'a':Integer(1)}, ('a','e'): {'b':-Integer(1)}, ... ('b','d'): {'b':Integer(1)}, ('b','e'): {'a':Integer(1)}, ... ('d','e'): {'c':Integer(1)}} >>> L = LieAlgebra(QQ, scoeffs, names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = L._first_ngens(5) >>> L.upper_central_series() [Ideal (c) of Lie algebra on 5 generators (a, b, c, d, e) over Rational Field] >>> L = lie_algebras.Heisenberg(QQ, Integer(3)) >>> L.upper_central_series() [Ideal (z) of Heisenberg algebra of rank 3 over Rational Field, Heisenberg algebra of rank 3 over Rational Field] 
 
 - class Subobjects(category, *args)[source]¶
- Bases: - SubobjectsCategory- A category for subalgebras of a finite dimensional Lie algebra with basis. - class ParentMethods[source]¶
- Bases: - object- ambient()[source]¶
- Return the ambient Lie algebra of - self.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: C = LieAlgebras(QQ).FiniteDimensional().WithBasis() sage: L = C.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 * >>> # needs sage.combinat sage.modules >>> C = LieAlgebras(QQ).FiniteDimensional().WithBasis() >>> L = C.example() >>> a, b, c = L.lie_algebra_generators() >>> S = L.subalgebra([Integer(2)*a + b, b + c]) >>> S.ambient() == L True 
 - basis_matrix()[source]¶
- Return the basis matrix of - self.- EXAMPLES: - sage: # needs sage.combinat sage.modules sage: C = LieAlgebras(QQ).FiniteDimensional().WithBasis() sage: L = C.example() sage: a, b, c = L.lie_algebra_generators() sage: S = L.subalgebra([2*a + b, b + c]) sage: S.basis_matrix() [ 1 0 -1/2] [ 0 1 1] - >>> from sage.all import * >>> # needs sage.combinat sage.modules >>> C = LieAlgebras(QQ).FiniteDimensional().WithBasis() >>> L = C.example() >>> a, b, c = L.lie_algebra_generators() >>> S = L.subalgebra([Integer(2)*a + b, b + c]) >>> S.basis_matrix() [ 1 0 -1/2] [ 0 1 1] 
 - reduce(X)[source]¶
- Reduce an element of the ambient Lie algebra modulo the ideal - self.- INPUT: - X– an element of the ambient Lie algebra
 - OUTPUT: - An element \(Y\) of the ambient Lie algebra that is contained in a fixed complementary submodule \(V\) to - selfsuch that \(X = Y\) mod- self.- When the base ring of - selfis a field, the complementary submodule \(V\) is spanned by the elements of the basis that are not the leading supports of the basis of- self.- EXAMPLES: - An example reduction in a 6 dimensional Lie algebra: - sage: sc = {('a','b'): {'d': 1}, ('a','c'): {'e': 1}, ....: ('b','c'): {'f': 1}} sage: L.<a,b,c,d,e,f> = LieAlgebra(QQ, sc) sage: I = L.ideal(c) sage: I.reduce(a + b + c + d + e + f) a + b + d - >>> from sage.all import * >>> sc = {('a','b'): {'d': Integer(1)}, ('a','c'): {'e': Integer(1)}, ... ('b','c'): {'f': Integer(1)}} >>> L = LieAlgebra(QQ, sc, names=('a', 'b', 'c', 'd', 'e', 'f',)); (a, b, c, d, e, f,) = L._first_ngens(6) >>> I = L.ideal(c) >>> I.reduce(a + b + c + d + e + f) a + b + d - The reduction of an element is zero if and only if the element belongs to the subalgebra: - sage: I.reduce(c + e) 0 sage: c + e in I True - >>> from sage.all import * >>> I.reduce(c + e) 0 >>> c + e in I True - Over non-fields, the complementary submodule may not be spanned by a subset of the basis of the ambient Lie algebra: - sage: L.<X,Y,Z> = LieAlgebra(ZZ, {('X','Y'): {'Z': 3}}) sage: I = L.ideal(Y) sage: I.basis() Family (Y, 3*Z) sage: I.reduce(3*Z) 0 sage: I.reduce(Y + 14*Z) 2*Z - >>> from sage.all import * >>> L = LieAlgebra(ZZ, {('X','Y'): {'Z': Integer(3)}}, names=('X', 'Y', 'Z',)); (X, Y, Z,) = L._first_ngens(3) >>> I = L.ideal(Y) >>> I.basis() Family (Y, 3*Z) >>> I.reduce(Integer(3)*Z) 0 >>> I.reduce(Y + Integer(14)*Z) 2*Z 
 
 
 - example(n=3)[source]¶
- Return an example of a finite dimensional Lie algebra with basis as per - Category.example.- EXAMPLES: - sage: C = LieAlgebras(QQ).FiniteDimensional().WithBasis() sage: C.example() # needs sage.modules An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field - >>> from sage.all import * >>> C = LieAlgebras(QQ).FiniteDimensional().WithBasis() >>> C.example() # needs sage.modules An example of a finite dimensional Lie algebra with basis: the 3-dimensional abelian Lie algebra over Rational Field - Other dimensions can be specified as an optional argument: - sage: C.example(5) # needs sage.modules An example of a finite dimensional Lie algebra with basis: the 5-dimensional abelian Lie algebra over Rational Field - >>> from sage.all import * >>> C.example(Integer(5)) # needs sage.modules An example of a finite dimensional Lie algebra with basis: the 5-dimensional abelian Lie algebra over Rational Field