Lie algebras

Lie algebras in OSCAR are currently always finite dimensional, and represented by the types LinearLieAlgebra{C} and AbstractLieAlgebra{C}, depending on whether a matrix representation is available or not, and by DirectSumLieAlgebra{C} for direct sums of Lie algebras. All of them are subtypes of LieAlgebra{C}. Similar to other types in OSCAR, each Lie algebra type has a corresponding element type. The type parameter C is the element type of the coefficient ring.

zero — Method
zero(L::LieAlgebra{C}) -> LieAlgebraElem{C}

Return the zero element of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
iszero — Method
iszero(x::LieAlgebraElem{C}) -> Bool

Check whether the Lie algebra element x is zero.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
dim — Method
dim(L::LieAlgebra) -> Int

Return the dimension of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
basis — Method
basis(L::LieAlgebra{C}) -> Vector{LieAlgebraElem{C}}

Return a basis of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
basis — Method
basis(L::LieAlgebra{C}, i::Int) -> LieAlgebraElem{C}

Return the i-th basis element of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
coefficients — Method
coefficients(p::ActionPolyRingElem)

Return an iterator for the coefficients of p with respect to the ranking of the parent of p.

Examples

julia> dpr, (a,b,c) = difference_polynomial_ring(ZZ, [:a, :b, :c], 4; partition = [[0,1,1],[1,0,0]]); f = -2*a*b + a*c + 3*b^2;

julia> cf = coefficients(f)
Coefficients iterator of 3*b[0,0,0,0]^2 - 2*a[0,0,0,0]*b[0,0,0,0] + c[0,0,0,0]*a[0,0,0,0]

julia> collect(cf)
3-element Vector{ZZRingElem}:
  3
 -2
  1
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
coefficients(x::LieAlgebraElem{C}) -> Vector{C}

Return the coefficients of x with respect to basis(::LieAlgebra).

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
coeff — Method
coeff(x::LieAlgebraElem{C}, i::Int) -> C

Return the i-th coefficient of x with respect to basis(::LieAlgebra).

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
getindex — Method
getindex(x::LieAlgebraElem{C}, i::Int) -> C

Return the i-th coefficient of x with respect to basis(::LieAlgebra).

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
symbols — Method
symbols(L::LieAlgebra{C}) -> Vector{Symbol}

Return the symbols used for printing basis elements of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
characteristic — Method
characteristic(L::LieAlgebra) -> Int

Return the characteristic of the coefficient ring of the Lie algebra L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Special functions for LinearLieAlgebras

(L::LinearLieAlgebra{C})(x::MatElem{C}; check::Bool=true) returns the element of L whose matrix representation is x. With check=false, it is not verified that x lies in L.

in — Method
in(x::MatElem{C}, L::LinearLieAlgebra{C}) -> Bool

Return true if x is the matrix representation of an element of L, false otherwise.

Examples

julia> L = special_linear_lie_algebra(QQ, 2);

julia> matrix(QQ, [1 2; 3 -1]) in L
true

julia> identity_matrix(QQ, 2) in L
false
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
matrix_repr_basis — Method
matrix_repr_basis(L::LinearLieAlgebra{C}) -> Vector{MatElem{C}}

Return the basis basis(L) of the Lie algebra L in the underlying matrix representation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
matrix_repr_basis — Method
matrix_repr_basis(L::LinearLieAlgebra{C}, i::Int) -> MatElem{C}

Return the i-th element of the basis basis(L) of the Lie algebra L in the underlying matrix representation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
matrix_repr — Method
matrix_repr(x::LinearLieAlgebraElem{C}; copy::Bool=true) -> MatElem{C}

Return the Lie algebra element x in the underlying matrix representation.

The matrix is cached in x. With copy=false the cached matrix itself is returned and must not be mutated.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Element constructors

LieAlgebraElem — Method
LieAlgebraElem(L::LieAlgebra{C}, v::AbstractVector{Int}) -> LieAlgebraElem{C}

Return the element of L with coefficient vector v.

Fail, if Int cannot be coerced into the coefficient ring of L.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
LieAlgebraElem — Method
LieAlgebraElem(L::LieAlgebra{C}, v::AbstractVector{C}) -> LieAlgebraElem{C}

Return the element of L with coefficient vector v.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
LieAlgebraElem — Method
LieAlgebraElem(L::LieAlgebra{C}, mat::MatElem{C}) -> LieAlgebraElem{C}

Return the element of L with coefficient vector equivalent to the $1 \times \dim(L)$ matrix mat.

mat is not copied and must not be modified afterwards.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
LieAlgebraElem — Method
LieAlgebraElem(L::LieAlgebra{C}, v::SRow{C}) -> LieAlgebraElem{C}

Return the element of L with coefficient vector v.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

(L::LieAlgebra{C})() returns the zero element of the Lie algebra L.

(L::LieAlgebra{C})(x::LieAlgebraElem{C}) returns x if x is an element of L, and fails otherwise.

(L::LieAlgebra{C})(v) is a shorthand for LieAlgebraElem(L, v). v can be of type Vector{C}, Vector{Int}, or SRow{C}.

Arithmetics

The usual arithmetics, e.g. +, -, and *, are defined for LieAlgebraElems.

Warning

Please note that * refers to the Lie bracket and is thus not associative.

Properties

is_abelian — Method
is_abelian(L::LieAlgebra) -> Bool

Return true if L is abelian, i.e. $[L, L] = 0$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_nilpotent — Method
is_nilpotent(L::LieAlgebra) -> Bool

Return true if L is nilpotent, i.e. the lower central series of L terminates in $0$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_perfect — Method
is_perfect(L::LieAlgebra) -> Bool

Return true if L is perfect, i.e. $[L, L] = L$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_semisimple — Method
is_semisimple(L::LieAlgebra) -> Bool

Return true if L is semisimple, i.e. the solvable radical of L is zero.

Warning

This function is not implemented yet for all cases in positive characteristic.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_simple — Method
is_simple(L::LieAlgebra) -> Bool

Return true if L is simple, i.e. L is not abelian and has no non-trivial ideals.

Warning

This function is not implemented yet.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_solvable — Method
is_solvable(L::LieAlgebra) -> Bool

Return true if L is solvable, i.e. the derived series of L terminates in $0$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

More functions

center — Method
center(L::LieAlgebra) -> LieAlgebraIdeal

Return the center of L, i.e. $\{x \in L \mid [x, L] = 0\}$

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
centralizer — Method
centralizer(L::LieAlgebra, xs::AbstractVector{<:LieAlgebraElem}) -> LieSubalgebra

Return the centralizer of xs in L, i.e. $\{y \in L \mid [x, y] = 0 \forall x \in xs\}$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
centralizer — Method
centralizer(L::LieAlgebra, x::LieAlgebraElem) -> LieSubalgebra

Return the centralizer of x in L, i.e. $\{y \in L \mid [x, y] = 0\}$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
derived_algebra — Method
derived_algebra(L::LieAlgebra) -> LieAlgebraIdeal

Return the derived algebra of L, i.e. $[L, L]$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
derived_series — Method
derived_series(L::LieAlgebra) -> Vector{LieAlgebraIdeal}

Return the derived series of L, i.e. the sequence of ideals $L^{(0)} = L$, $L^{(i + 1)} = [L^{(i)}, L^{(i)}]$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lower_central_series — Method
lower_central_series(L::LieAlgebra) -> Vector{LieAlgebraIdeal}

Return the lower central series of L, i.e. the sequence of ideals $L^{0} = L$, $L^{i + 1} = [L, L^{i}]$.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Lie algebra constructors

lie_algebra — Function
lie_algebra(gapL::GapObj, s::Vector{<:VarName}) -> LieAlgebra

Construct a Lie algebra isomorphic to the GAP Lie algebra gapL. Its basis elements are named by s, or by x_i by default. We require gapL to be a finite-dimensional GAP Lie algebra. The return type is dependent on properties of gapL, in particular, whether GAP knows about a matrix representation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, struct_consts::Matrix{sparse_row_type(R)}, s::Vector{<:VarName}; check::Bool) -> AbstractLieAlgebra{elem_type(R)}

Construct the Lie algebra over the field R with structure constants struct_consts and with basis element names s.

The Lie bracket on the newly constructed Lie algebra L is determined by the structure constants in struct_consts as follows: let $x_i$ denote the $i$-th standard basis vector of L. Then the entry struct_consts[i,j][k] is a scalar $a_{i,j,k}$ such that $[x_i, x_j] = \sum_k a_{i,j,k} x_k$.

  • s: A vector of basis element names. This is [Symbol("x_$i") for i in 1:size(struct_consts, 1)] by default.
  • check: If true, check that the structure constants are anti-symmetric and satisfy the Jacobi identity. This is true by default.
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, struct_consts::Array{elem_type(R),3}, s::Vector{<:VarName}; check::Bool) -> AbstractLieAlgebra{elem_type(R)}

Construct the Lie algebra over the field R with structure constants struct_consts and with basis element names s.

The Lie bracket on the newly constructed Lie algebra L is determined by the structure constants in struct_consts as follows: let $x_i$ denote the $i$-th standard basis vector of L. Then the entry struct_consts[i,j,k] is a scalar $a_{i,j,k}$ such that $[x_i, x_j] = \sum_k a_{i,j,k} x_k$.

  • s: A vector of basis element names. This is [Symbol("x_$i") for i in 1:size(struct_consts, 1)] by default.
  • check: If true, check that the structure constants are anti-symmetric and satisfy the Jacobi identity. This is true by default.

Examples

julia> struct_consts = QQ.(zeros(Int, 3, 3, 3));

julia> struct_consts[1, 2, 3] = QQ(1);

julia> struct_consts[2, 1, 3] = QQ(-1);

julia> struct_consts[3, 1, 1] = QQ(2);

julia> struct_consts[1, 3, 1] = QQ(-2);

julia> struct_consts[3, 2, 2] = QQ(-2);

julia> struct_consts[2, 3, 2] = QQ(2);

julia> sl2 = lie_algebra(QQ, struct_consts, ["e", "f", "h"])
Abstract Lie algebra
  of dimension 3
over rational field

julia> e, f, h = basis(sl2)
3-element Vector{AbstractLieAlgebraElem{QQFieldElem}}:
 e
 f
 h

julia> e * f
h

julia> h * e
2*e

julia> h * f
-2*f
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, rs::RootSystem) -> AbstractLieAlgebra{elem_type(R)}

Construct a simple Lie algebra over the field R with the root system rs. The internally used basis of this Lie algebra is the Chevalley basis.

The experienced user may supply a boolean vector of length n_positive_roots(rs) - n_simple_roots(rs) via the kwarg extraspecial_pair_signs::Vector{Bool} to specify the concrete Lie algebra to be constructed. If $(\alpha,\beta)$ is the extraspecial pair for the non-simple root root(rs, i), then $\varepsilon_{\alpha,\beta} = 1$ iff extraspecial_pair_signs[i - n_simple_roots(rs)] = true. For the used notation and the definition of extraspecial pairs, see [CMT04].

Examples

julia> L = lie_algebra(QQ, root_system(:B, 4))
Abstract Lie algebra
  of type B4
  of dimension 36
over rational field
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, fam::Symbol, rk::Int) -> AbstractLieAlgebra{elem_type(R)}

Construct a simple Lie algebra over the field R with Dynkin type given by fam and rk. See cartan_matrix(fam::Symbol, rk::Int) for allowed combinations. The internally used basis of this Lie algebra is the Chevalley basis.

Examples

julia> L = lie_algebra(QQ, :C, 4)
Abstract Lie algebra
  of type C4
  of dimension 36
over rational field
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, n::Int, mats::Vector{<:MatElem}, s=:x; is_basis::Bool=false, check::Bool=true) -> LinearLieAlgebra{elem_type(R)}

Construct the Lie algebra generated by the $n \times n$ matrices mats over R under the commutator bracket $[x, y] = xy - yx$, i.e. the smallest Lie subalgebra of $\mathfrak{gl}_n(R)$ containing mats.

With is_basis=true, mats is used as basis instead, and check=true verifies that mats is linearly independent and closed under the bracket. Otherwise, check is currently ignored.

The basis elements are named by s, which is either a vector with one name per basis element or a prefix such as :x, giving the names x_1, x_2, ...

Examples

julia> e = matrix(QQ, [0 0 1; 0 0 0; 0 0 0]);

julia> f = matrix(QQ, [0 0 0; 0 0 0; 1 0 0]);

julia> h = matrix(QQ, [1 0 0; 0 0 0; 0 0 -1]);

julia> L = lie_algebra(QQ, 3, [e, f, h], [:e, :f, :h]; is_basis=true)
Linear Lie algebra with 3x3 matrices
  of dimension 3
over rational field

julia> root_system(L);

julia> L
Linear Lie algebra with 3x3 matrices
  of type A1
  of dimension 3
over rational field

julia> basis(L)
3-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 e
 f
 h

julia> matrix_repr_basis(L)
3-element Vector{QQMatrix}:
 [0 0 1; 0 0 0; 0 0 0]
 [0 0 0; 0 0 0; 1 0 0]
 [1 0 0; 0 0 0; 0 0 -1]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(gens::Vector{<:MatElem{C}}, s=:x; is_basis::Bool=false, check::Bool=true) -> LinearLieAlgebra{C}

Construct the Lie algebra generated by the square matrices gens under the commutator bracket $[x, y] = xy - yx$, i.e. the smallest Lie subalgebra of $\mathfrak{gl}_n(R)$ containing gens.

All matrices in gens must be of the same size $n \times n$ over the same field $R$. See lie_algebra(::Field, ::Int, ::Vector{<:MatElem}) for s, is_basis and check.

Examples

julia> e = matrix(QQ, [0 1 0; 0 0 1; 0 0 0]);

julia> f = matrix(QQ, [0 0 0; 2 0 0; 0 2 0]);

julia> L = lie_algebra([e, f])
Linear Lie algebra with 3x3 matrices
  of dimension 3
over rational field

julia> matrix_repr_basis(L)
3-element Vector{QQMatrix}:
 [1 0 0; 0 0 0; 0 0 -1]
 [0 1 0; 0 0 1; 0 0 0]
 [0 0 0; 1 0 0; 0 1 0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(R::Field, gens::Vector{<:MatElem}, s=:x; is_basis::Bool=false, check::Bool=true) -> LinearLieAlgebra{elem_type(R)}

Construct the Lie algebra over R generated by the square matrices gens, whose entries are mapped into R.

See lie_algebra(::Field, ::Int, ::Vector{<:MatElem}) for s, is_basis and check.

Examples

julia> e = matrix(ZZ, [0 1 0; 0 0 1; 0 0 0]);

julia> f = matrix(ZZ, [0 0 0; 2 0 0; 0 2 0]);

julia> dim(lie_algebra(QQ, [e, f]))
3

julia> dim(lie_algebra(GF(2), [e, f]))
1
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(S::LieSubalgebra) -> LieAlgebra, LieAlgebraHom

Return S as a Lie algebra LS, together with an embedding LS -> L, where L is the Lie algebra where S lives in.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lie_algebra(I::LieAlgebraIdeal) -> LieAlgebra, LieAlgebraHom

Return I as a Lie algebra LI, together with an embedding LI -> L, where L is the Lie algebra where I lives in.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Classical Lie algebras

abelian_lie_algebra — Method
abelian_lie_algebra(R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}
abelian_lie_algebra(::Type{LinearLieAlgebra}, R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}
abelian_lie_algebra(::Type{AbstractLieAlgebra}, R::Field, n::Int) -> AbstractLieAlgebra{elem_type(R)}

Return the abelian Lie algebra of dimension n over the field R. The first argument can be optionally provided to specify the type of the returned Lie algebra.

Examples

julia> abelian_lie_algebra(LinearLieAlgebra, QQ, 3)
Linear Lie algebra with 3x3 matrices
  of dimension 3
over rational field

julia> abelian_lie_algebra(AbstractLieAlgebra, QQ, 3)
Abstract Lie algebra
  of dimension 3
over rational field
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
general_linear_lie_algebra — Method
general_linear_lie_algebra(R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}

Return the general linear Lie algebra $\mathfrak{gl}_n(R)$, i.e., the Lie algebra of all $n \times n$ matrices over the field R.

Examples

julia> L = general_linear_lie_algebra(QQ, 2)
General linear Lie algebra of degree 2
  of dimension 4
over rational field

julia> basis(L)
4-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 x_1_1
 x_1_2
 x_2_1
 x_2_2

julia> matrix_repr_basis(L)
4-element Vector{QQMatrix}:
 [1 0; 0 0]
 [0 1; 0 0]
 [0 0; 1 0]
 [0 0; 0 1]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
special_linear_lie_algebra — Method
special_linear_lie_algebra(R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}

Return the special linear Lie algebra $\mathfrak{sl}_n(R)$, i.e., the Lie algebra of all $n \times n$ matrices over the field R with trace zero.

Examples

julia> L = special_linear_lie_algebra(QQ, 2)
Special linear Lie algebra of degree 2
  of dimension 3
over rational field

julia> basis(L)
3-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 e_1_2
 f_1_2
 h_1

julia> matrix_repr_basis(L)
3-element Vector{QQMatrix}:
 [0 1; 0 0]
 [0 0; 1 0]
 [1 0; 0 -1]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
special_orthogonal_lie_algebra — Function
special_orthogonal_lie_algebra(R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}
special_orthogonal_lie_algebra(R::Field, n::Int, gram::MatElem) -> LinearLieAlgebra{elem_type(R)}
special_orthogonal_lie_algebra(R::Field, n::Int, gram::Matrix) -> LinearLieAlgebra{elem_type(R)}

Return the special orthogonal Lie algebra $\mathfrak{so}_n(R)$.

Given a non-degenerate symmetric bilinear form $f$ via its Gram matrix gram, $\mathfrak{so}_n(R)$ is the Lie algebra of all $n \times n$ matrices $x$ over the field R such that $f(xv, w) = -f(v, xw)$ for all $v, w \in R^n$.

If gram is not provided, for $n = 2k$ the form defined by $\begin{pmatrix} 0 & I_k \\ I_k & 0 \end{pmatrix}$ is used, and for $n = 2k + 1$ the form defined by $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & I_k \\ 0 & I_k & 0 \end{pmatrix}$.

Examples

julia> L1 = special_orthogonal_lie_algebra(QQ, 4)
Special orthogonal Lie algebra of degree 4
  of dimension 6
over rational field

julia> basis(L1)
6-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 x_1
 x_2
 x_3
 x_4
 x_5
 x_6

julia> matrix_repr_basis(L1)
6-element Vector{QQMatrix}:
 [1 0 0 0; 0 0 0 0; 0 0 -1 0; 0 0 0 0]
 [0 1 0 0; 0 0 0 0; 0 0 0 0; 0 0 -1 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 -1; 0 0 0 0]
 [0 0 0 0; 0 1 0 0; 0 0 0 0; 0 0 0 -1]
 [0 0 0 0; 0 0 0 0; 0 1 0 0; -1 0 0 0]

julia> L2 = special_orthogonal_lie_algebra(QQ, 3, identity_matrix(QQ, 3))
Special orthogonal Lie algebra of degree 3
  of dimension 3
over rational field

julia> basis(L2)
3-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 x_1
 x_2
 x_3

julia> matrix_repr_basis(L2)
3-element Vector{QQMatrix}:
 [0 1 0; -1 0 0; 0 0 0]
 [0 0 1; 0 0 0; -1 0 0]
 [0 0 0; 0 0 1; 0 -1 0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
symplectic_lie_algebra — Function
symplectic_lie_algebra(R::Field, n::Int) -> LinearLieAlgebra{elem_type(R)}
symplectic_lie_algebra(R::Field, n::Int, gram::MatElem) -> LinearLieAlgebra{elem_type(R)}
symplectic_lie_algebra(R::Field, n::Int, gram::Matrix) -> LinearLieAlgebra{elem_type(R)}

Return the symplectic Lie algebra $\mathfrak{sp}_n(R)$.

Given a non-degenerate skew-symmetric bilinear form $f$ via its Gram matrix gram, $\mathfrak{sp}_n(R)$ is the Lie algebra of all $n \times n$ matrices $x$ over the field R such that $f(xv, w) = -f(v, xw)$ for all $v, w \in R^n$.

If gram is not provided, for $n = 2k$ the form defined by $\begin{pmatrix} 0 & I_k \\ -I_k & 0 \end{pmatrix}$ is used. For odd $n$ there is no non-degenerate skew-symmetric bilinear form on $R^n$.

Examples

julia> L = symplectic_lie_algebra(QQ, 4)
Symplectic Lie algebra of degree 4
  of dimension 10
over rational field

julia> basis(L)
10-element Vector{LinearLieAlgebraElem{QQFieldElem}}:
 x_1
 x_2
 x_3
 x_4
 x_5
 x_6
 x_7
 x_8
 x_9
 x_10

julia> matrix_repr_basis(L)
10-element Vector{QQMatrix}:
 [1 0 0 0; 0 0 0 0; 0 0 -1 0; 0 0 0 0]
 [0 1 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; 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 -1; 0 0 0 0]
 [0 0 0 0; 0 1 0 0; 0 0 0 0; 0 0 0 -1]
 [0 0 0 0; 0 0 0 1; 0 0 0 0; 0 0 0 0]
 [0 0 0 0; 0 0 0 0; 1 0 0 0; 0 0 0 0]
 [0 0 0 0; 0 0 0 0; 0 1 0 0; 1 0 0 0]
 [0 0 0 0; 0 0 0 0; 0 0 0 0; 0 1 0 0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Direct sums

direct_sum — Method
direct_sum(Ss::Vector{<:LieAlgebra{C}}) -> DirectSumLieAlgebra{C}
direct_sum(S::LieAlgebra{C}, Ss::LieAlgebra{C}...) -> DirectSumLieAlgebra{C}

Construct the direct sum of the Lie algebras Ss, which must have the same coefficient ring. The summands are accessible via canonical_injection and canonical_projection.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Relation to GAP Lie algebras

Using Oscar.iso_oscar_gap(L), one can get an isomorphism from the OSCAR Lie algebra L to some isomorphic GAP Lie algebra. For more details, please refer to iso_oscar_gap.