# Solvable and Nilpotent Lie Algebras Classification

This section describes functions for working with the classification of solvable Lie algebras of dimension 2, 3, and 4, and the classification of nilpotent Lie algebras having dimensions 3,4,5, and 6. The classification of solvable Lie algebras is taken from [[de Graaf, 2005](../../references.md#cite-wdg-slac)], and applies to algebras over any base field. The classification of nilpotent Lie algebras is taken from [[de Graaf, 2007](../../references.md#cite-wdg-nlac)]. It lists the nilpotent Lie algebras over any base field, with the exception of fields of characteristic 2, when the dimension is 6.

The functions described here fall into two categories: functions for creating the Lie algebras of the classification, and a function for identifying a given solvable Lie algebra of dimension 2,3,4 or a given nilpotent Lie algebra of dimension 3,4,5,6 as a member of the list.

First we describe the classifications, in order to define names for the Lie algebras that occur. We then describe the functions for working with them in Magma.

## The List of Solvable Lie Algebras

We denote a solvable Lie algebra of dimension $n$ by $L_n^k$, where $k$ ranges between 1 and the number of classes of solvable Lie algebras of dimension $n$. If the class depends on a parameter, say $a$, then we denote the Lie algebra by $L_n^k(a)$. In such cases we also state conditions under which $L_n^k(a)$ is isomorphic to $L_n^k(b)$ (if there are any). We list the nonzero commutators only. The field over which the Lie algebra is defined is denoted by $F$. Here is the list of classes of solvable Lie algebras having dimension not greater than 4:

**$L_2^1$**
Abelian.

**$L_2^2$**
$[x_2,x_1]=x_1$.

**$L_3^1$**
Abelian.

**$L_3^2$**
$[x_3,x_1]=x_1$, $[x_3,x_2]=x_2$.

**$L_3^3(a)$**
$[x_3,x_1]=x_2$, $[x_3,x_2]=ax_1+x_2$.

**$L_3^4(a)$**
$[x_3,x_1]=x_2$, $[x_3,x_2]=ax_1$. Condition of isomorphism: $L_3^4(a)\cong L_3^4(b)$ if and only if there is an $\alpha\in F^*$ with $a=\alpha^2 b$.

**$L_4^1$**
Abelian.

**$L_4^2$**
$[x_4,x_1]=x_1$, $[x_4,x_2]=x_2$, $[x_4,x_3]=x_3$.

**$L_4^3(a)$**
$[x_4,x_1]=x_1$, $[x_4,x_2]=x_3$, $[x_4,x_3]=-ax_2+(a+1)x_3$.

**$L_4^4$**
$[x_4,x_2]=x_3$, $[x_4,x_3]= x_3$.

**$L_4^5$**
$[x_4,x_2]=x_3$.

**$L_4^6(a,b)$**
$[x_4,x_1] = x_2$, $[x_4,x_2]=x_3$, $[x_4,x_3] = ax_1+bx_2+x_3$.

**$L_4^7(a,b)$**
$[x_4,x_1] = x_2$, $[x_4,x_2]=x_3$, $[x_4,x_3] = ax_1+bx_2$. Isomorphism condition: $L_4^7(a,b)\cong L_4^7(c,d)$ if and only if there is an $\alpha\in F^*$ with $a=\alpha^3c$ and $b=\alpha^2d$.

**$L_4^8$**
$[x_1,x_2]=x_2$, $[x_3,x_4]=x_4$.

**$L_4^9(a)$**
$[x_4,x_1] = x_1+ax_2$, $[x_4,x_2]=x_1$, $[x_3,x_1]=x_1$, $[x_3,x_2]=x_2$. Condition on the parameter $a$: $T^2-T-a$ has no roots in $F$. Isomorphism condition: $L_4^9(a)\cong L_4^9(b)$ if and only if the characteristic of $F$ is not $2$ and there is an $\alpha\in F^*$ with $a+{1\over 4} = \alpha^2(b+{1\over 4})$, or the characteristic of $F$ is $2$ and $X^2+X+a+b$ has roots in $F$.

**$L_4^{10}(a)$**
$[x_4,x_1] = x_2$, $[x_4,x_2]=ax_1$, $[x_3,x_1]=x_1$, $[x_3,x_2]=x_2$. Condition on $F$: the characteristic of $F$ is $2$. Condition on the parameter $a$: $a\not\in F^2$. Isomorphism condition: $L_4^{10}(a)\cong L_4^{10}(b)$ if and only if $Y^2+X^2b+a$ has a solution $(X,Y)\in F\times F$ with $X\neq 0$.

**$L_4^{11}(a,b)$**
$[x_4,x_1] = x_1$, $[x_4,x_2] = bx_2$, $[x_4,x_3]=(1+b)x_3$, $[x_3,x_1]=x_2$, $[x_3,x_2]=ax_1$. Condition on $F$: the characteristic of $F$ is $2$. Condition on the parameters $a,b$: $a\neq 0$, $b\neq 1$. Isomorphism condition: $L_4^{11}(a,b)\cong L_4^{11}(c,d)$ if and only if ${a\over c}$ and $(\delta^2+(b+1)\delta+b)/c$ are squares in $F$, where $\delta = (b+1)/(d+1)$.

**$L_4^{12}$**
$[x_4,x_1] = x_1$, $[x_4,x_2]=2x_2$, $[x_4,x_3] = x_3$, $[x_3,x_1]=x_2$.

**$L_4^{13}(a)$**
$[x_4,x_1] = x_1+ax_3$, $[x_4,x_2]=x_2$, $[x_4,x_3] = x_1$, $[x_3,x_1]=x_2$.

**$L_4^{14}(a)$**
$[x_4,x_1] = ax_3$, $[x_4,x_3]=x_1$, $[x_3,x_1]=x_2$. Condition on parameter $a$: $a\neq 0$. Isomorphism condition: $L_4^{14}(a)\cong L_4^{14}(b)$ if and only if there is an $\alpha\in F^*$ with $a=\alpha^2 b$.

## Comments on the Classification over Finite Fields

Over general fields the lists are not “precise” in the sense that some classes that depend up on a parameter have an associated isomorphism condition, but not a precise parametrization of the Lie algebras in that class. However, for algebras over finite fields we are able to give a precise list, by restricting the parameter values in some cases. In this section we describe how this is done. Here $F$ will be a finite field of size $q$ with primitive root $\gamma$.

- If the characteristic of $F$ is $2$, then there are two algebras of type $L_3^4(a)$, namely $L_3^4(0)$ and $L_3^4(1)$. If the characteristic is not $2$, then there are three algebras of this type, $L_3^4(0)$, $L_3^4(1)$, $L_3^4(\gamma)$.

- The class $L_4^7(a,b)$ splits into three classes: $L_4^7(a,a)$ ($a\in F$), $L_4^7(a,0)$ ($a\neq 0$), $L_4^7(0,b)$ ($b\neq 0$). Among the algebras of the first class there are no isomorphisms. However, for the other two classes we have the following:-

  1. $L_4^7(a,0)\cong L_4^7(b,0)$ if and only if there is an $\alpha\in F^*$ such that $a=\alpha^3 b$. If $q\equiv 1 \bmod 3$, then exactly a third of the elements of $F^*$ are cubes, namely the $\gamma^i$ with $i$ divisible by $3$. So in this case we get three algebras, $L_4^7(1,0)$, $L_4^7(\gamma,0)$, $L_4^7(\gamma^2,0)$. If $q\not\equiv 1 \bmod 3$ then $F^3=F$, and hence there is only one algebra, namely $L_4^7(1,0)$.

  2. $L_4^7(0,a)\cong L_4^7(0,b)$ if and only if there is an $\alpha \in F^*$ such that $a=\alpha^2 b$. So if $q$ is even then we get one algebra, $L_4^7(0,1)$. If $q$ is odd we get two algebras, $L_4^7(0,1)$, $L_4^7(0,\gamma)$.

- In [[de Graaf, 2005](../../references.md#cite-wdg-slac)] it is shown that there is only one Lie algebra in the class $L_4^9(a)$. We let $e$ be the smallest positive integer such that $T^2-T-\gamma^e$ has no roots in $F$. Then we take the Lie algebra $L_4^9(\gamma^e)$ as representative of the class.

- Over a finite field of characteristic $2$ there are no Lie algebras of type $L_4^{10}(a)$, as $F^2=F$ in that case.

- There is only one Lie algebra of type $L_4^{11}(a,b)$ over a field of characteristic $2$, namely $L_4^{11}(1,0)$.

- If $q$ is even then there is only one algebra of type $L_4^{14}(a)$, namely $L_4^{14}(1)$. If $q$ is odd, then there are two algebras, $L_4^{14}(1)$ and $L_4^{14}(\gamma)$.

## The List of Nilpotent Lie Algebras

We denote a nilpotent Lie algebra of dimension $r$ by $N_r^k$, where $k$ ranges between 1 and the number of classes of nilpotent Lie algebras of dimension $r$. If the class depends on a parameter, say $a$, then we denote the Lie algebra by $N_r^k(a)$. The complete list of isomorphism classes of nilpotent Lie algebras having dimensions 3, 4, 5 and 6, *where in dimension 6 we exclude base fields of characteristic 2* are as follows:

**$N_3^1$**
Abelian.

**$N_3^2$**
$[x_1,x_2]=x_3$.

**$N_4^1$**
Abelian.

**$N_4^2$**
$[x_1,x_2]=x_3$.

**$N_4^3$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$.

**$N_5^1$**
Abelian.

**$N_5^2$**
$[x_1,x_2]=x_3$.

**$N_5^3$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$.

**$N_5^4$**
$[x_1,x_2] = x_5$, $[x_3,x_4]=x_5$.

**$N_5^5$**
$[x_1,x_2]=x_3$, $[x_1,x_3]= x_5$, $[x_2,x_4] = x_5$.

**$N_5^6$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_2,x_3]=x_5$.

**$N_5^7$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$.

**$N_5^8$**
$[x_1,x_2]=x_4$, $[x_1,x_3]=x_5$.

**$N_5^9$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_2,x_3]=x_5$.

There are nine 6-dimensional nilpotent Lie algebras denoted $N_6^k$ for $k=1, \ldots ,9$ which are the direct sum of $N_5^k$ and a 1-dimensional abelian ideal. Consequently, we get the following Lie algebras:-

**$N_6^{10}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_6$, $[x_4,x_5]=x_6$.

**$N_6^{11}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_6$, $[x_2,x_3]=x_6$, $[x_2,x_5]=x_6$.

**$N_6^{12}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_6$, $[x_2,x_5]=x_6$.

**$N_6^{13}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_5$, $[x_2,x_4]=x_5$, $[x_1,x_5]=x_6$, $[x_3,x_4]=x_6$.

**$N_6^{14}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_2,x_3]=x_5$, $[x_2,x_5]=x_6$, $[x_3,x_4]=-x_6$.

**$N_6^{15}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_2,x_3]=x_5$, $[x_1,x_5]=x_6$, $[x_2,x_4]=x_6$.

**$N_6^{16}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_2,x_5]=x_6$, $[x_3,x_4]=-x_6$.

**$N_6^{17}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_1,x_5]=x_6$, $[x_2,x_3]= x_6$.

**$N_6^{18}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_1,x_4]=x_5$, $[x_1,x_5]=x_6$.

**$N_6^{19}(a)$**
$[x_1,x_2]=x_4$, $[x_1,x_3]=x_5$, $[x_2,x_4]=x_6$, $[x_3,x_5]=a x_6$.

**$N_6^{20}$**
$[x_1,x_2]=x_4$, $[x_1,x_3]=x_5$, $[x_1,x_5]=x_6$, $[x_2,x_4]=x_6$.

**$N_6^{21}(a)$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_4$, $[x_2,x_3]=x_5$, $[x_1,x_4]=x_6$, $[x_2,x_5]= a x_6$ .

**$N_6^{22}(a)$**
$[x_1,x_2]=x_5$, $[x_1,x_3]=x_6$, $[x_2,x_4]= a x_6$, $[x_3,x_4]=x_5$.

**$N_6^{23}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_5$, $[x_1,x_4]=x_6$, $[x_2,x_4]= x_5$ .

**$N_6^{24}(a)$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_5$, $[x_1,x_4]=a x_6$, $[x_2,x_3]=x_6$,$[x_2,x_4]= x_5$.

**$N_6^{25}$**
$[x_1,x_2]=x_3$, $[x_1,x_3]=x_5$, $[x_1,x_4]=x_6$.

**$N_6^{26}$**
$[x_1,x_2]=x_4$, $[x_1,x_3]=x_5$, $[x_2,x_3]=x_6$.

*Note that for all classes that depend on a parameter* $a$*, the Lie algebra with parameter* $a$ *is isomorphic to the Lie algebra (from the same class) with parameter* $b$ *if and only if there is an* $\alpha\in F^*$ *with* $a=\alpha^2 b$*.*

## Intrinsics for Working with the Classifications

### `SolvableLieAlgebra(F, n, k : parameters): Fld, RngIntElt, RngIntElt -> AlgLie`

```magma
pars: SeqEnum                    Default: [ ]
```

This function returns the solvable Lie algebra $L_n^k$ over the field $F$. The multiplication table is exactly the same as that given in the classification of solvable algebras above, where the basis element $x_i$ corresponds to the $i$-th basis element of the Lie algebra returned.

If the Lie algebra $L_n^k$ depends on one or more parameters, then the parameter `pars` specifies the parameter values corresponding to the Lie algebra which is required.

### `Example: SLAC Lnk (ex-72dcd0)`

```magma
> F<a>:= RationalFunctionField( Rationals() );
> K:= SolvableLieAlgebra( F, 3, 3 : pars:= [a] );
> K.3*K.1;
(0 1 0)
> K.3*K.2;
(a 1 0)

```

### `NilpotentLieAlgebra(F, r, k : parameters): Fld, RngIntElt, RngIntElt -> AlgLie`

```magma
pars: SeqEnum                    Default: [ ]
```

This function returns the nilpotent Lie algebra $N_r^k$ over the field $F$. The multiplication table is exactly the same as that given in the classification of nilpotent algebras above, where the basis element $x_i$ corresponds to the $i$-th basis element of the Lie algebra returned.

If the Lie algebra $N_r^k$ depends upon one or more parameters, then the parameter `pars` specifies the parameter values corresponding to the Lie algebra which is required.

### `Example: NLAC Nrk (ex-3827f2)`

```magma
> F<a>:= RationalFunctionField( Rationals() );
> K:= NilpotentLieAlgebra( F, 6, 19 : pars:= [a^3] );
> K.3*K.5;
(  0   0   0   0   0 a^3)

```

### `AllSolvableLieAlgebras(F, d): Fld, RngIntElt -> SeqEnum`

Given a finite field $F$ and $d$ an integer equal to $2$, $3$ or $4$, this function returns a sequence containing all solvable Lie algebras of dimension $d$ over the field $F$.

### `AllNilpotentLieAlgebras(F, d): Fld, RngIntElt -> SeqEnum`

Given a finite field $F$ and $d$ an integer equal to $3$, $4$, $5$ or $6$, this function returns a sequence containing all nilpotent Lie algebras of dimension $d$ over the field $F$. If the dimension is $6$ then the characteristic of $F$ may not be $2$.

### `IdDataSLAC(L): AlgLie -> MonStgElt, SeqEnum, Map`

Given a solvable Lie algebra $L$ of dimension 2, 3, or 4, this function returns data that identifies $L$ with the isomorphic algebra in the classification of solvable Lie algebras. (SLAC stands for Solvable Lie Algebras Classification.) Three objects are returned: a string, a sequence and a map.

The string gives the name of the Lie algebra as it occurs in the classification, with information about the field and the parameters.

The sequence contains the parameters of the Lie algebra in the classification to which $L$ is isomorphic.

The map is an isomorphism from $L$ to the corresponding Lie algebra contained in the classification.

### `IdDataNLAC(L): AlgLie -> MonStgElt, SeqEnum, Map`

Given a nilpotent Lie algebra $L$ of dimension 3, 4, 5 or 6 this function returns data that identifies $L$ with the isomorphic algebra in the classification of nilpotent Lie algebras. (NLAC stands for Nilpotent Lie Algebras Classification.) Three objects are returned: a string giving the name of the algebra $N$ in the classification, a sequence giving the parameters for $N$, and the isomorphism mapping $L$ to $N$.

### `MatrixOfIsomorphism(f): Map -> AlgMatElt`

Given an isomorphism $f$ as returned by either `IdDataSLAC` or `IdDataNLAC`, this function returns the matrix of that isomorphism. The row convention is used, i.e., the $i$-th row contains the coordinates of the image of the $i$-th basis element of the domain of $f$.

### `Example: SLAC Id Data (ex-b0dc46)`

We define a solvable Lie algebra of dimension $4$ that depends on a parameter $a$. We identify this Lie algebra as a member of the classification.

```magma
> F<a>:= RationalFunctionField( Rationals() );
> T:= [ <1,2,2,1>, <1,2,3,a>, <1,4,4,a>, <2,1,2,-1>, <2,1,3,-a>, <4,1,4,-a> ];
> L:= LieAlgebra< F, 4 | T >;
> s,p,f:= IdDataSLAC( L );
> s;
L4_6( Univariate rational function field over Rational Field
Variables: a, 0, -a/(a^2 + 2*a + 1) )
> p;
[
    0,
    -a/(a^2 + 2*a + 1)
]
> MatrixOfIsomorphism( f );
[0   (-a - 1)/(a - 1)   (-a - 1)/(a - 1)   (a^2 + 2*a + 1)/(a^2 - a)]
[0   -1/(a - 1)   -a/(a - 1)   (a + 1)/(a - 1)]
[0   -1/(a^2 - 1)   -a/(a^2 - 1)   a/(a - 1)]
[1/(a + 1)   0   0   0]

```

So generically, the Lie algebra is isomorphic to $L_4^6( 0, -a/(a^2 + 2a + 1))$. We see that the parameters are not defined if $a=-1$. Furthermore, the isomorphism is not defined if $a=\pm 1$, or $a=0$. We investigate those cases.

```magma
> a:= 1;
> T:= [ <1,2,2,1>, <1,2,3,a>, <1,4,4,a>, <2,1,2,-1>, <2,1,3,-a>, <4,1,4,-a> ];
> L:= LieAlgebra< Rationals(), 4 | T >;
> s,p,f:= IdDataSLAC( L );
> s;
L4_3( Rational Field, 0 )
> MatrixOfIsomorphism( f );
[ 0  1  1  0]
[ 0  0 -1  1]
[ 0  0  0  1]
[ 1  0  0  0]
> a:= -1;
> T:= [ <1,2,2,1>, <1,2,3,a>, <1,4,4,a>, <2,1,2,-1>, <2,1,3,-a>, <4,1,4,-a> ];
> L:= LieAlgebra< Rationals(), 4 | T >;
> s,p,f:= IdDataSLAC( L );
> s;
L4_7( Rational Field, 0, 1 )
> MatrixOfIsomorphism( f );
[   0  1/2  1/2  1/2]
[   0  1/2 -1/2 -1/2]
[   0  1/2 -1/2  1/2]
[   1    0    0    0]
> a:= 0;
> T:= [ <1,2,2,1>, <1,2,3,a>, <1,4,4,a>, <2,1,2,-1>, <2,1,3,-a>, <4,1,4,-a> ];
> L:= LieAlgebra< Rationals(), 4 | T >;
> s,p,f:= IdDataSLAC( L );
> s;
L4_4( Rational Field )
> MatrixOfIsomorphism( f );
[ 0  0  1  0]
[ 0  1  0 -1]
[ 0  1  0  0]
[ 1  0  0  0]

```

We see that for $a=1$ the Lie algebra is isomorphic to $L_4^3(0)$, and the isomorphism is defined over any field. If $a=-1$, then the Lie algebra is isomorphic to $L_4^7( 0, 1 )$. However, the isomorphism is not defined if the characteristic of the field is $2$. But then we are back in the case $a=1$. Finally, for $a=0$ the Lie algebra is isomorphic to $L_4^4$.

### `Example: NLAC Id Data (ex-7b45ed)`

The positive part of the simple Lie algebra of type $G_2$ is a nilpotent Lie algebra of dimension six. We identify it in the classification of nilpotent algebras, both in characteristic 0, and in characteristic 3.

```magma
> L:= LieAlgebra( "G2", Rationals() );
> x,y,h:= ChevalleyBasis( L );
> x;
[ (0 0 0 0 0 0 0 0 1 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 1 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 1 0), (0 0 0 0 0 0 0 0 0 0 0 0 0 1) ]

```

So we see that the positive part is spanned by basis vectors `L.i` with i=9, 10, 11, 12, 13 and 14. So

```magma
> K:= sub< L | [ L.i : i in [9,10,11,12,13,14] ] >;
> name,pp,f:= IdDataNLAC( K );
> name;
N6_16( Rational Field )
> MatrixOfIsomorphism( f );
[  1   0   0   0   0   0]
[  0   1   0   0   0   0]
[  0   0   1   0   0   0]
[  0   0   0 1/2   0   0]
[  0   0   0   0 1/6   0]
[  0   0   0   0   0 1/6]
> L:= LieAlgebra( "G2", GF(3) );
> K:= sub< L | [ L.i : i in [9,10,11,12,13,14] ] >;
> name,pp,f:= IdDataNLAC( K );
> name;
N6_19( Finite field of size 3, 0 )

```

We see that in characteristic 3 $L$ is isomorphic to a Lie algebra from a different class.
