Classical Lie Algebras¶
These are the Lie algebras corresponding to types \(A_n\), \(B_n\), \(C_n\), and \(D_n\). We also include support for the exceptional types \(E_{6,7,8}\), \(F_4\), and \(G_2\) in the Chevalley basis, and we give the matrix representation given in [HRT2000].
AUTHORS:
Travis Scrimshaw (2013-05-03): Initial version
Sebastian Oehms (2018-03-18): matrix method of the element class of ClassicalMatrixLieAlgebra added
Travis Scrimshaw (2019-07-09): Implemented compact real form
- class sage.algebras.lie_algebras.classical_lie_algebra.ClassicalMatrixLieAlgebra(R, ct, e, f, h, sparse=True)[source]¶
Bases:
MatrixLieAlgebraFromAssociative
A classical Lie algebra represented using matrices.
This means a classical Lie algebra given as a Lie algebra of matrices, with commutator as Lie bracket.
INPUT:
R
– the base ringct
– the finite Cartan type
EXAMPLES:
sage: lie_algebras.ClassicalMatrix(QQ, ['A', 4]) Special linear Lie algebra of rank 5 over Rational Field sage: lie_algebras.ClassicalMatrix(QQ, CartanType(['B',4])) Special orthogonal Lie algebra of rank 9 over Rational Field sage: lie_algebras.ClassicalMatrix(QQ, 'C4') Symplectic Lie algebra of rank 8 over Rational Field sage: lie_algebras.ClassicalMatrix(QQ, cartan_type=['D',4]) Special orthogonal Lie algebra of rank 8 over Rational Field
>>> from sage.all import * >>> lie_algebras.ClassicalMatrix(QQ, ['A', Integer(4)]) Special linear Lie algebra of rank 5 over Rational Field >>> lie_algebras.ClassicalMatrix(QQ, CartanType(['B',Integer(4)])) Special orthogonal Lie algebra of rank 9 over Rational Field >>> lie_algebras.ClassicalMatrix(QQ, 'C4') Symplectic Lie algebra of rank 8 over Rational Field >>> lie_algebras.ClassicalMatrix(QQ, cartan_type=['D',Integer(4)]) Special orthogonal Lie algebra of rank 8 over Rational Field
- affine(kac_moody=True)[source]¶
Return the affine (Kac-Moody) Lie algebra of
self
.EXAMPLES:
sage: so5 = lie_algebras.so(QQ, 5, 'matrix') sage: so5 Special orthogonal Lie algebra of rank 5 over Rational Field sage: so5.affine() Affine Special orthogonal Kac-Moody algebra of rank 5 over Rational Field sage: so5.affine(False) Affine Special orthogonal Lie algebra of rank 5 over Rational Field
>>> from sage.all import * >>> so5 = lie_algebras.so(QQ, Integer(5), 'matrix') >>> so5 Special orthogonal Lie algebra of rank 5 over Rational Field >>> so5.affine() Affine Special orthogonal Kac-Moody algebra of rank 5 over Rational Field >>> so5.affine(False) Affine Special orthogonal Lie algebra of rank 5 over Rational Field
- basis()[source]¶
Return a basis of
self
.EXAMPLES:
sage: M = LieAlgebra(ZZ, cartan_type=['A',2], representation='matrix') sage: list(M.basis()) [ [ 1 0 0] [0 1 0] [0 0 1] [0 0 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 1] [0 0 0] [ 0 0 -1], [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] ]
>>> from sage.all import * >>> M = LieAlgebra(ZZ, cartan_type=['A',Integer(2)], representation='matrix') >>> list(M.basis()) [ [ 1 0 0] [0 1 0] [0 0 1] [0 0 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 1] [0 0 0] [ 0 0 -1], [0 0 0], [0 0 0], [0 0 0], [ 0 0 -1], [0 0 0], [1 0 0], <BLANKLINE> [0 0 0] [0 0 0] [0 1 0] ]
Sparse version:
sage: e6 = LieAlgebra(QQ, cartan_type=['E',6], representation='matrix') sage: len(e6.basis()) # long time 78
>>> from sage.all import * >>> e6 = LieAlgebra(QQ, cartan_type=['E',Integer(6)], representation='matrix') >>> len(e6.basis()) # long time 78
- cartan_type()[source]¶
Return the Cartan type of
self
.EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.cartan_type() ['A', 2]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.cartan_type() ['A', 2]
- e(i)[source]¶
Return the generator \(e_i\).
EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.e(2) [0 0 0] [0 0 1] [0 0 0]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.e(Integer(2)) [0 0 0] [0 0 1] [0 0 0]
- epsilon(i, h)[source]¶
Return the action of the functional \(\varepsilon_i \colon \mathfrak{h} \to R\), where \(R\) is the base ring of
self
, on the elementh
.EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.epsilon(1, g.h(1)) 1 sage: g.epsilon(2, g.h(1)) -1 sage: g.epsilon(3, g.h(1)) 0
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.epsilon(Integer(1), g.h(Integer(1))) 1 >>> g.epsilon(Integer(2), g.h(Integer(1))) -1 >>> g.epsilon(Integer(3), g.h(Integer(1))) 0
- f(i)[source]¶
Return the generator \(f_i\).
EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.f(2) [0 0 0] [0 0 0] [0 1 0]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.f(Integer(2)) [0 0 0] [0 0 0] [0 1 0]
- h(i)[source]¶
Return the generator \(h_i\).
EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.h(2) [ 0 0 0] [ 0 1 0] [ 0 0 -1]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.h(Integer(2)) [ 0 0 0] [ 0 1 0] [ 0 0 -1]
- highest_root_basis_elt(pos=True)[source]¶
Return the basis element corresponding to the highest root \(\theta\). If
pos
isTrue
, then returns \(e_{\theta}\), otherwise it returns \(f_{\theta}\).EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.highest_root_basis_elt() [0 0 1] [0 0 0] [0 0 0]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.highest_root_basis_elt() [0 0 1] [0 0 0] [0 0 0]
- index_set()[source]¶
Return the index_set of
self
.EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.index_set() (1, 2)
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.index_set() (1, 2)
- simple_root(i, h)[source]¶
Return the action of the simple root \(\alpha_i \colon \mathfrak{h} \to R\), where \(R\) is the base ring of
self
, on the elementh
.EXAMPLES:
sage: g = lie_algebras.sl(QQ, 3, representation='matrix') sage: g.simple_root(1, g.h(1)) 2 sage: g.simple_root(1, g.h(2)) -1
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(3), representation='matrix') >>> g.simple_root(Integer(1), g.h(Integer(1))) 2 >>> g.simple_root(Integer(1), g.h(Integer(2))) -1
- class sage.algebras.lie_algebras.classical_lie_algebra.ExceptionalMatrixLieAlgebra(R, cartan_type, e, f, h=None, sparse=False)[source]¶
Bases:
ClassicalMatrixLieAlgebra
A matrix Lie algebra of exceptional type.
- class sage.algebras.lie_algebras.classical_lie_algebra.LieAlgebraChevalleyBasis(R, cartan_type)[source]¶
Bases:
LieAlgebraWithStructureCoefficients
A simple finite dimensional Lie algebra in the Chevalley basis.
Let \(L\) be a simple (complex) Lie algebra with roots \(\Phi\), then the Chevalley basis is given by \(e_{\alpha}\) for all \(\alpha \in \Phi\) and \(h_{\alpha_i} := h_i\) where \(\alpha_i\) is a simple root subject. These generators are subject to the relations:
\[\begin{split}\begin{aligned} [h_i, h_j] & = 0, \\ [h_i, e_{\beta}] & = A_{\alpha_i, \beta} e_{\beta}, \\ [e_{\beta}, e_{-\beta}] & = \sum_i A_{\beta, \alpha_i} h_i, \\ [e_{\beta}, e_{\gamma}] & = \begin{cases} N_{\beta,\gamma} e_{\beta + \gamma} & \beta + \gamma \in \Phi, \\ 0 & \text{otherwise,} \end{cases} \end{aligned}\end{split}\]where \(A_{\alpha, \beta} = \frac{2 (\alpha, \beta)}{(\alpha, \alpha)}\) and \(N_{\alpha, \beta}\) is the maximum such that \(\alpha - N_{\alpha, \beta} \beta \in \Phi\).
For computing the signs of the coefficients, see Section 3 of [CMT2003].
See also
For simply-laced types, an alternative construction using an asymmetry function is given by
LieAlgebraChevalleyBasis_simply_laced
.- affine(kac_moody=True)[source]¶
Return the affine Lie algebra of
self
.EXAMPLES:
sage: sp6 = lie_algebras.sp(QQ, 6) sage: sp6 Lie algebra of ['C', 3] in the Chevalley basis sage: sp6.affine() Affine Kac-Moody algebra of ['C', 3] in the Chevalley basis sage: L = LieAlgebra(QQ, cartan_type=['A',3], epsilon=[(1,2),(3,2)]) sage: L.affine(False) Affine Lie algebra of ['A', 3] in the Chevalley basis sage: L.affine(True) Affine Kac-Moody algebra of ['A', 3] in the Chevalley basis
>>> from sage.all import * >>> sp6 = lie_algebras.sp(QQ, Integer(6)) >>> sp6 Lie algebra of ['C', 3] in the Chevalley basis >>> sp6.affine() Affine Kac-Moody algebra of ['C', 3] in the Chevalley basis >>> L = LieAlgebra(QQ, cartan_type=['A',Integer(3)], epsilon=[(Integer(1),Integer(2)),(Integer(3),Integer(2))]) >>> L.affine(False) Affine Lie algebra of ['A', 3] in the Chevalley basis >>> L.affine(True) Affine Kac-Moody algebra of ['A', 3] in the Chevalley basis
- degree_on_basis(m)[source]¶
Return the degree of the basis element indexed by
m
.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['G', 2]) sage: [L.degree_on_basis(m) for m in L.basis().keys()] [alpha[2], alpha[1], alpha[1] + alpha[2], 2*alpha[1] + alpha[2], 3*alpha[1] + alpha[2], 3*alpha[1] + 2*alpha[2], 0, 0, -alpha[2], -alpha[1], -alpha[1] - alpha[2], -2*alpha[1] - alpha[2], -3*alpha[1] - alpha[2], -3*alpha[1] - 2*alpha[2]]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['G', Integer(2)]) >>> [L.degree_on_basis(m) for m in L.basis().keys()] [alpha[2], alpha[1], alpha[1] + alpha[2], 2*alpha[1] + alpha[2], 3*alpha[1] + alpha[2], 3*alpha[1] + 2*alpha[2], 0, 0, -alpha[2], -alpha[1], -alpha[1] - alpha[2], -2*alpha[1] - alpha[2], -3*alpha[1] - alpha[2], -3*alpha[1] - 2*alpha[2]]
- gens()[source]¶
Return the generators of
self
in the order of \(e_i\), \(f_i\), and \(h_i\).EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A', 2]) sage: L.gens() (E[alpha[1]], E[alpha[2]], E[-alpha[1]], E[-alpha[2]], h1, h2)
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> L.gens() (E[alpha[1]], E[alpha[2]], E[-alpha[1]], E[-alpha[2]], h1, h2)
- highest_root_basis_elt(pos=True)[source]¶
Return the basis element corresponding to the highest root \(\theta\).
INPUT:
pos
– boolean (default:True
); ifTrue
, then return \(e_{\theta}\), otherwise return \(f_{\theta}\)
EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A', 2]) sage: L.highest_root_basis_elt() E[alpha[1] + alpha[2]] sage: L.highest_root_basis_elt(False) E[-alpha[1] - alpha[2]]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> L.highest_root_basis_elt() E[alpha[1] + alpha[2]] >>> L.highest_root_basis_elt(False) E[-alpha[1] - alpha[2]]
- indices_to_positive_roots_map()[source]¶
Return the map from indices to positive roots.
EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A', 2]) sage: L.indices_to_positive_roots_map() {1: alpha[1], 2: alpha[2], 3: alpha[1] + alpha[2]}
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> L.indices_to_positive_roots_map() {1: alpha[1], 2: alpha[2], 3: alpha[1] + alpha[2]}
- killing_form(x, y)[source]¶
Return the Killing form on
x
andy
, wherex
andy
are two elements ofself
.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 = LieAlgebra(QQ, cartan_type=['A', 2]) sage: L.killing_form(L.an_element(), L.an_element()) 36 sage: B = L.basis() sage: matrix([[L.killing_form(a, b) for a in B] for b in B]) [ 0 0 0 0 0 6 0 0] [ 0 0 0 0 0 0 6 0] [ 0 0 0 0 0 0 0 6] [ 0 0 0 12 -6 0 0 0] [ 0 0 0 -6 12 0 0 0] [ 6 0 0 0 0 0 0 0] [ 0 6 0 0 0 0 0 0] [ 0 0 6 0 0 0 0 0]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> L.killing_form(L.an_element(), L.an_element()) 36 >>> B = L.basis() >>> matrix([[L.killing_form(a, b) for a in B] for b in B]) [ 0 0 0 0 0 6 0 0] [ 0 0 0 0 0 0 6 0] [ 0 0 0 0 0 0 0 6] [ 0 0 0 12 -6 0 0 0] [ 0 0 0 -6 12 0 0 0] [ 6 0 0 0 0 0 0 0] [ 0 6 0 0 0 0 0 0] [ 0 0 6 0 0 0 0 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 bybasis()
).EXAMPLES:
sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: g.killing_form_matrix() [ 0 0 0 0 0 6 0 0] [ 0 0 0 0 0 0 6 0] [ 0 0 0 0 0 0 0 6] [ 0 0 0 12 -6 0 0 0] [ 0 0 0 -6 12 0 0 0] [ 6 0 0 0 0 0 0 0] [ 0 6 0 0 0 0 0 0] [ 0 0 6 0 0 0 0 0]
>>> from sage.all import * >>> g = LieAlgebra(QQ, cartan_type=['A', Integer(2)]) >>> g.killing_form_matrix() [ 0 0 0 0 0 6 0 0] [ 0 0 0 0 0 0 6 0] [ 0 0 0 0 0 0 0 6] [ 0 0 0 12 -6 0 0 0] [ 0 0 0 -6 12 0 0 0] [ 6 0 0 0 0 0 0 0] [ 0 6 0 0 0 0 0 0] [ 0 0 6 0 0 0 0 0]
- lie_algebra_generators(str_keys=False)[source]¶
Return the Chevalley Lie algebra generators of
self
.INPUT:
str_keys
– boolean (default:False
); set toTrue
to have the indices indexed by strings instead of simple (co)roots
EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A', 1]) sage: L.lie_algebra_generators() Finite family {alpha[1]: E[alpha[1]], -alpha[1]: E[-alpha[1]], alphacheck[1]: h1} sage: L.lie_algebra_generators(True) Finite family {'e1': E[alpha[1]], 'f1': E[-alpha[1]], 'h1': h1}
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(1)]) >>> L.lie_algebra_generators() Finite family {alpha[1]: E[alpha[1]], -alpha[1]: E[-alpha[1]], alphacheck[1]: h1} >>> L.lie_algebra_generators(True) Finite family {'e1': E[alpha[1]], 'f1': E[-alpha[1]], 'h1': h1}
- class sage.algebras.lie_algebras.classical_lie_algebra.LieAlgebraChevalleyBasis_simply_laced(R, cartan_type, epsilon)[source]¶
Bases:
LieAlgebraChevalleyBasis
A finite dimensional simply-laced Lie algebra in the Chevalley basis with structure coefficients given by an orientation of the Dynkin diagram.
We follow Chapter 7.7 of [Ka1990], where the structure coefficients are given by an
asymmetry function
defined by \(\varepsilon(\alpha_i, \alpha_j) = -1\) if there is an arrow \(i \to j\) in the Dynkin quiver (an orientation of the Dynkin diagram). However we twist \(E_{\alpha}\) by \(\mathrm{sign}(\alpha)\) so that \(F_i = E_{-\alpha_i}\) rather than its negative.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A', 2], epsilon=[(2, 1)]) sage: L.e(1).bracket(L.e(2)) E[alpha[1] + alpha[2]] sage: L = LieAlgebra(QQ, cartan_type=['A', 2], epsilon=[(1, 2)]) sage: L.e(1).bracket(L.e(2)) -E[alpha[1] + alpha[2]]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)], epsilon=[(Integer(2), Integer(1))]) >>> L.e(Integer(1)).bracket(L.e(Integer(2))) E[alpha[1] + alpha[2]] >>> L = LieAlgebra(QQ, cartan_type=['A', Integer(2)], epsilon=[(Integer(1), Integer(2))]) >>> L.e(Integer(1)).bracket(L.e(Integer(2))) -E[alpha[1] + alpha[2]]
- asymmetry_function()[source]¶
Return the asymmetry function of
self
.An asymmetry function is a function \(\varepsilon : Q \times Q \to \{1, -1\}\) that satisfies the following properties:
\(\varepsilon(\alpha, \alpha) = (-1)^{(\alpha|\alpha)/2}\)
bimultiplicativity \(\varepsilon(alpha + \alpha', \beta) = \varepsilon(\alpha, \beta) \varepsilon(\alpha', \beta)\) and \(\varepsilon(alpha, \beta + \beta') = \varepsilon(\alpha, \beta) \varepsilon(\alpha', \beta)\),
where \((\alpha | \beta)\) is the symmetric bilinear form on \(Q\) given by the Cartan matrix. Some consequences of these properties are that \(\varepsilon(\alpha, 0) = \varepsilon(0, \beta) = 1\) and \(varepsilon(\alpha, \beta) \varepsilon(\beta, \alpha) = (-1)^{(\alpha|\beta)}\).
OUTPUT:
The asymmetry function as a
dict
consisting of pairs of all of the roots of \(Q\) and \(0\).EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A',2], epsilon=[(2,1)]) sage: ep = L.asymmetry_function() sage: al = L.cartan_type().root_system().root_lattice().simple_roots() sage: ep[al[1], al[2]] 1 sage: ep[al[2],al[1]] -1 sage: L = LieAlgebra(QQ, cartan_type=['A',2], epsilon=[(1,2)]) sage: ep = L.asymmetry_function() sage: al = L.cartan_type().root_system().root_lattice().simple_roots() sage: ep[al[1], al[2]] -1 sage: ep[al[2],al[1]] 1
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A',Integer(2)], epsilon=[(Integer(2),Integer(1))]) >>> ep = L.asymmetry_function() >>> al = L.cartan_type().root_system().root_lattice().simple_roots() >>> ep[al[Integer(1)], al[Integer(2)]] 1 >>> ep[al[Integer(2)],al[Integer(1)]] -1 >>> L = LieAlgebra(QQ, cartan_type=['A',Integer(2)], epsilon=[(Integer(1),Integer(2))]) >>> ep = L.asymmetry_function() >>> al = L.cartan_type().root_system().root_lattice().simple_roots() >>> ep[al[Integer(1)], al[Integer(2)]] -1 >>> ep[al[Integer(2)],al[Integer(1)]] 1
- class sage.algebras.lie_algebras.classical_lie_algebra.MatrixCompactRealForm(R, cartan_type)[source]¶
Bases:
FinitelyGeneratedLieAlgebra
The compact real form of a matrix Lie algebra.
Let \(L\) be a classical (i.e., type \(ABCD\)) Lie algebra over \(\RR\) given as matrices that is invariant under matrix transpose (i.e., \(X^T \in L\) for all \(X \in L\)). Then we can perform the Cartan decomposition of \(L\) by \(L = K \oplus S\), where \(K\) (resp. \(S\)) is the set of skew-symmetric (resp. symmetric) matrices in \(L\). Then the Lie algebra \(U = K \oplus i S\) is an \(\RR\)-subspace of the complexification of \(L\) that is closed under commutators and has skew-hermitian matrices. Hence, the Killing form is negative definitive (i.e., \(U\) is a compact Lie algebra), and thus \(U\) is the complex real form of the complexification of \(L\).
EXAMPLES:
sage: U = LieAlgebra(QQ, cartan_type=['A',1], representation="compact real") sage: list(U.basis()) [ [ 0 1] [ i 0] [0 i] [-1 0], [ 0 -i], [i 0] ] sage: U.killing_form_matrix() [-8 0 0] [ 0 -8 0] [ 0 0 -8]
>>> from sage.all import * >>> U = LieAlgebra(QQ, cartan_type=['A',Integer(1)], representation="compact real") >>> list(U.basis()) [ [ 0 1] [ i 0] [0 i] [-1 0], [ 0 -i], [i 0] ] >>> U.killing_form_matrix() [-8 0 0] [ 0 -8 0] [ 0 0 -8]
Computations are only (currently) possible if this is defined over a field:
sage: U = LieAlgebra(ZZ, cartan_type=['A',1], representation="compact real") sage: list(U.basis()) Traceback (most recent call last): ... TypeError: no conversion of this rational to integer
>>> from sage.all import * >>> U = LieAlgebra(ZZ, cartan_type=['A',Integer(1)], representation="compact real") >>> list(U.basis()) Traceback (most recent call last): ... TypeError: no conversion of this rational to integer
- class Element(parent, real, imag)[source]¶
Bases:
Element
An element of a matrix Lie algebra in its compact real form.
- monomial_coefficients(copy=False)[source]¶
Return the monomial coefficients of
self
.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['C',3], representation="compact real") sage: B = L.basis() sage: x = L.sum(i*B[i] for i in range(len(B))) sage: x.monomial_coefficients() == {i: i for i in range(1,len(B))} True
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['C',Integer(3)], representation="compact real") >>> B = L.basis() >>> x = L.sum(i*B[i] for i in range(len(B))) >>> x.monomial_coefficients() == {i: i for i in range(Integer(1),len(B))} True
- basis()[source]¶
Compute a basis of
self
.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['B',2], representation="compact real") sage: list(L.basis()) [ [ 0 1 0 0 0] [ 0 0 0 1 0] [ 0 0 0 0 1] [ 0 0 0 0 0] [-1 0 0 0 0] [ 0 0 -1 0 0] [ 0 0 0 0 0] [ 0 0 0 0 1] [ 0 0 0 1 0] [ 0 1 0 0 0] [ 0 0 0 0 1] [ 0 0 0 0 0] [ 0 0 -1 0 0] [-1 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 0 1] [ 0 0 0 0 0], [ 0 0 0 0 0], [-1 0 -1 0 0], [ 0 -1 0 -1 0], [ i 0 0 0 0] [ 0 i 0 0 0] [ 0 0 0 i 0] [ 0 0 0 0 i] [ 0 0 0 0 0] [ i 0 0 0 0] [ 0 0 -i 0 0] [ 0 0 0 0 0] [ 0 0 -i 0 0] [ 0 0 0 -i 0] [ 0 -i 0 0 0] [ 0 0 0 0 -i] [ 0 0 0 0 0] [ 0 0 -i 0 0] [ i 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 0 0], [ 0 0 0 0 0], [ 0 0 0 0 0], [ i 0 -i 0 0], [ 0 0 0 0 0] [ 0 0 0 0 0] [ 0 i 0 0 0] [ 0 0 0 0 i] [ 0 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 -i 0] [ 0 0 0 0 -i] [ 0 0 0 0 0], [ 0 i 0 -i 0] ]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['B',Integer(2)], representation="compact real") >>> list(L.basis()) [ [ 0 1 0 0 0] [ 0 0 0 1 0] [ 0 0 0 0 1] [ 0 0 0 0 0] [-1 0 0 0 0] [ 0 0 -1 0 0] [ 0 0 0 0 0] [ 0 0 0 0 1] [ 0 0 0 1 0] [ 0 1 0 0 0] [ 0 0 0 0 1] [ 0 0 0 0 0] [ 0 0 -1 0 0] [-1 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 0 1] [ 0 0 0 0 0], [ 0 0 0 0 0], [-1 0 -1 0 0], [ 0 -1 0 -1 0], <BLANKLINE> [ i 0 0 0 0] [ 0 i 0 0 0] [ 0 0 0 i 0] [ 0 0 0 0 i] [ 0 0 0 0 0] [ i 0 0 0 0] [ 0 0 -i 0 0] [ 0 0 0 0 0] [ 0 0 -i 0 0] [ 0 0 0 -i 0] [ 0 -i 0 0 0] [ 0 0 0 0 -i] [ 0 0 0 0 0] [ 0 0 -i 0 0] [ i 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 0 0], [ 0 0 0 0 0], [ 0 0 0 0 0], [ i 0 -i 0 0], <BLANKLINE> [ 0 0 0 0 0] [ 0 0 0 0 0] [ 0 i 0 0 0] [ 0 0 0 0 i] [ 0 0 0 0 0] [ 0 0 0 0 0] [ 0 0 0 -i 0] [ 0 0 0 0 -i] [ 0 0 0 0 0], [ 0 i 0 -i 0] ]
- monomial(i)[source]¶
Return the monomial indexed by
i
.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['A',3], representation="compact real") sage: L.monomial(0) [ 0 1 0 0] [-1 0 0 0] [ 0 0 0 0] [ 0 0 0 0]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['A',Integer(3)], representation="compact real") >>> L.monomial(Integer(0)) [ 0 1 0 0] [-1 0 0 0] [ 0 0 0 0] [ 0 0 0 0]
- term(i, c=None)[source]¶
Return the term indexed by
i
with coefficientc
.EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['C',3], representation="compact real") sage: L.term(4, 7/2) [ 0 0 0 0 0 7/2] [ 0 0 0 0 0 0] [ 0 0 0 7/2 0 0] [ 0 0 -7/2 0 0 0] [ 0 0 0 0 0 0] [-7/2 0 0 0 0 0]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['C',Integer(3)], representation="compact real") >>> L.term(Integer(4), Integer(7)/Integer(2)) [ 0 0 0 0 0 7/2] [ 0 0 0 0 0 0] [ 0 0 0 7/2 0 0] [ 0 0 -7/2 0 0 0] [ 0 0 0 0 0 0] [-7/2 0 0 0 0 0]
- zero()[source]¶
Return the element \(0\).
EXAMPLES:
sage: L = LieAlgebra(QQ, cartan_type=['D',4], representation="compact real") sage: L.zero() [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0]
>>> from sage.all import * >>> L = LieAlgebra(QQ, cartan_type=['D',Integer(4)], representation="compact real") >>> L.zero() [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0]
- class sage.algebras.lie_algebras.classical_lie_algebra.e6(R)[source]¶
Bases:
ExceptionalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{e}_6\).
The simple Lie algebra \(\mathfrak{e}_6\) of type \(E_6\). The matrix representation is given following [HRT2000].
- class sage.algebras.lie_algebras.classical_lie_algebra.e7(R)[source]¶
Bases:
ExceptionalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{e}_7\).
The simple Lie algebra \(\mathfrak{e}_7\) of type \(E_7\). The matrix representation is given following [HRT2000].
- class sage.algebras.lie_algebras.classical_lie_algebra.e8(R)[source]¶
Bases:
ExceptionalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{e}_8\).
The simple Lie algebra \(\mathfrak{e}_8\) of type \(E_8\) built from the adjoint representation in the Chevalley basis.
- basis()[source]¶
Return a basis of
self
.EXAMPLES:
sage: g = LieAlgebra(QQ, cartan_type=['E', 8], representation='matrix') # long time sage: len(g.basis()) # long time 248
>>> from sage.all import * >>> g = LieAlgebra(QQ, cartan_type=['E', Integer(8)], representation='matrix') # long time >>> len(g.basis()) # long time 248
- class sage.algebras.lie_algebras.classical_lie_algebra.f4(R)[source]¶
Bases:
ExceptionalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{f}_4\).
The simple Lie algebra \(\mathfrak{f}_f\) of type \(F_4\). The matrix representation is given following [HRT2000] but indexed in the reversed order (i.e., interchange 1 with 4 and 2 with 3).
- class sage.algebras.lie_algebras.classical_lie_algebra.g2(R)[source]¶
Bases:
ExceptionalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{g}_2\).
The simple Lie algebra \(\mathfrak{g}_2\) of type \(G_2\). The matrix representation is given following [HRT2000].
- class sage.algebras.lie_algebras.classical_lie_algebra.gl(R, n)[source]¶
Bases:
MatrixLieAlgebraFromAssociative
The matrix Lie algebra \(\mathfrak{gl}_n\).
The Lie algebra \(\mathfrak{gl}_n\) which consists of all \(n \times n\) matrices.
INPUT:
R
– the base ringn
– the size of the matrix
- class Element[source]¶
Bases:
Element
- monomial_coefficients(copy=True)[source]¶
Return the monomial coefficients of
self
.EXAMPLES:
sage: gl4 = lie_algebras.gl(QQ, 4) sage: x = gl4.monomial('E_2_1') + 3*gl4.monomial('E_0_3') sage: x.monomial_coefficients() {'E_0_3': 3, 'E_2_1': 1}
>>> from sage.all import * >>> gl4 = lie_algebras.gl(QQ, Integer(4)) >>> x = gl4.monomial('E_2_1') + Integer(3)*gl4.monomial('E_0_3') >>> x.monomial_coefficients() {'E_0_3': 3, 'E_2_1': 1}
- basis()[source]¶
Return the basis of
self
.EXAMPLES:
sage: g = lie_algebras.gl(QQ, 2) sage: tuple(g.basis()) ( [1 0] [0 1] [0 0] [0 0] [0 0], [0 0], [1 0], [0 1] )
>>> from sage.all import * >>> g = lie_algebras.gl(QQ, Integer(2)) >>> tuple(g.basis()) ( [1 0] [0 1] [0 0] [0 0] [0 0], [0 0], [1 0], [0 1] )
- killing_form(x, y)[source]¶
Return the Killing form on
x
andy
.The Killing form on \(\mathfrak{gl}_n\) is:
\[\langle x \mid y \rangle = 2n \mathrm{tr}(xy) - 2 \mathrm{tr}(x) \mathrm{tr}(y).\]EXAMPLES:
sage: g = lie_algebras.gl(QQ, 4) sage: x = g.an_element() sage: y = g.gens()[1] sage: g.killing_form(x, y) 8
>>> from sage.all import * >>> g = lie_algebras.gl(QQ, Integer(4)) >>> x = g.an_element() >>> y = g.gens()[Integer(1)] >>> g.killing_form(x, y) 8
- monomial(i)[source]¶
Return the basis element indexed by
i
.INPUT:
i
– an element of the index set
EXAMPLES:
sage: gl4 = lie_algebras.gl(QQ, 4) sage: gl4.monomial('E_2_1') [0 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0] sage: gl4.monomial((2,1)) [0 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0]
>>> from sage.all import * >>> gl4 = lie_algebras.gl(QQ, Integer(4)) >>> gl4.monomial('E_2_1') [0 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0] >>> gl4.monomial((Integer(2),Integer(1))) [0 0 0 0] [0 0 0 0] [0 1 0 0] [0 0 0 0]
- class sage.algebras.lie_algebras.classical_lie_algebra.sl(R, n)[source]¶
Bases:
ClassicalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{sl}_n\).
The Lie algebra \(\mathfrak{sl}_n\), which consists of all \(n \times n\) matrices with trace 0. This is the Lie algebra of type \(A_{n-1}\).
- killing_form(x, y)[source]¶
Return the Killing form on
x
andy
.The Killing form on \(\mathfrak{sl}_n\) is:
\[\langle x \mid y \rangle = 2n \mathrm{tr}(xy).\]EXAMPLES:
sage: g = lie_algebras.sl(QQ, 5, representation='matrix') sage: x = g.an_element() sage: y = g.lie_algebra_generators()['e1'] sage: g.killing_form(x, y) 10
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(5), representation='matrix') >>> x = g.an_element() >>> y = g.lie_algebra_generators()['e1'] >>> g.killing_form(x, y) 10
- simple_root(i, h)[source]¶
Return the action of the simple root \(\alpha_i \colon \mathfrak{h} \to R\), where \(R\) is the base ring of
self
, on the elementj
.EXAMPLES:
sage: g = lie_algebras.sl(QQ, 5, representation='matrix') sage: matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -1] [ 0 0 -1 2]
>>> from sage.all import * >>> g = lie_algebras.sl(QQ, Integer(5), representation='matrix') >>> matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -1] [ 0 0 -1 2]
- class sage.algebras.lie_algebras.classical_lie_algebra.so(R, n)[source]¶
Bases:
ClassicalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{so}_n\).
The Lie algebra \(\mathfrak{so}_n\), which is isomorphic to the Lie algebra of all anti-symmetric \(n \times n\) matrices. The implementation here uses a different bilinear form and follows the description in Chapter 8 of [HK2002]. More precisely, this is the set of matrices:
\[\begin{split}\begin{pmatrix} A & B \\ C & D \end{pmatrix}\end{split}\]such that \(A^t = -D\), \(B^t = -B\), \(C^t = -C\) for \(n\) even and
\[\begin{split}\begin{pmatrix} A & B & a \\ C & D & b \\ c & d & 0 \end{pmatrix}\end{split}\]such that \(A^t = -D\), \(B^t = -B\), \(C^t = -C\), \(a^t = -d\), and \(b^t = -c\) for \(n\) odd.
This is the Lie algebra of type \(B_{(n-1)/2}\) or \(D_{n/2}\) if \(n\) is odd or even respectively.
- killing_form(x, y)[source]¶
Return the Killing form on
x
andy
.The Killing form on \(\mathfrak{so}_n\) is:
\[\langle x \mid y \rangle = (n - 2) \mathrm{tr}(xy).\]EXAMPLES:
sage: g = lie_algebras.so(QQ, 8, representation='matrix') sage: x = g.an_element() sage: y = g.lie_algebra_generators()['e1'] sage: g.killing_form(x, y) 12 sage: g = lie_algebras.so(QQ, 9, representation='matrix') sage: x = g.an_element() sage: y = g.lie_algebra_generators()['e1'] sage: g.killing_form(x, y) 14
>>> from sage.all import * >>> g = lie_algebras.so(QQ, Integer(8), representation='matrix') >>> x = g.an_element() >>> y = g.lie_algebra_generators()['e1'] >>> g.killing_form(x, y) 12 >>> g = lie_algebras.so(QQ, Integer(9), representation='matrix') >>> x = g.an_element() >>> y = g.lie_algebra_generators()['e1'] >>> g.killing_form(x, y) 14
- simple_root(i, h)[source]¶
Return the action of the simple root \(\alpha_i \colon \mathfrak{h} \to R\), where \(R\) is the base ring of
self
, on the elementj
.EXAMPLES:
The even or type \(D\) case:
sage: g = lie_algebras.so(QQ, 8, representation='matrix') sage: matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 -1] [ 0 -1 2 0] [ 0 -1 0 2]
>>> from sage.all import * >>> g = lie_algebras.so(QQ, Integer(8), representation='matrix') >>> matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 -1] [ 0 -1 2 0] [ 0 -1 0 2]
The odd or type \(B\) case:
sage: g = lie_algebras.so(QQ, 9, representation='matrix') sage: matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -1] [ 0 0 -2 2]
>>> from sage.all import * >>> g = lie_algebras.so(QQ, Integer(9), representation='matrix') >>> matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -1] [ 0 0 -2 2]
- class sage.algebras.lie_algebras.classical_lie_algebra.sp(R, n)[source]¶
Bases:
ClassicalMatrixLieAlgebra
The matrix Lie algebra \(\mathfrak{sp}_n\).
The Lie algebra \(\mathfrak{sp}_{2k}\), which consists of all \(2k \times 2k\) matrices \(X\) that satisfy the equation:
\[X^T M - M X = 0\]where
\[\begin{split}M = \begin{pmatrix} 0 & I_k \\ -I_k & 0 \end{pmatrix}.\end{split}\]This is the Lie algebra of type \(C_k\).
- killing_form(x, y)[source]¶
Return the Killing form on
x
andy
.The Killing form on \(\mathfrak{sp}_n\) is:
\[\langle x \mid y \rangle = (2n + 2) \mathrm{tr}(xy).\]EXAMPLES:
sage: g = lie_algebras.sp(QQ, 8, representation='matrix') sage: x = g.an_element() sage: y = g.lie_algebra_generators()['e1'] sage: g.killing_form(x, y) 36
>>> from sage.all import * >>> g = lie_algebras.sp(QQ, Integer(8), representation='matrix') >>> x = g.an_element() >>> y = g.lie_algebra_generators()['e1'] >>> g.killing_form(x, y) 36
- simple_root(i, h)[source]¶
Return the action of the simple root \(\alpha_i \colon \mathfrak{h} \to R\), where \(R\) is the base ring of
self
, on the elementj
.EXAMPLES:
sage: g = lie_algebras.sp(QQ, 8, representation='matrix') sage: matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -2] [ 0 0 -1 2]
>>> from sage.all import * >>> g = lie_algebras.sp(QQ, Integer(8), representation='matrix') >>> matrix([[g.simple_root(i, g.h(j)) for i in g.index_set()] for j in g.index_set()]) [ 2 -1 0 0] [-1 2 -1 0] [ 0 -1 2 -2] [ 0 0 -1 2]