---
title: "Construction of Subalgebras, Ideals, and Quotients"
canonical: "https://docs.magma-maths.org/v2.30-1/LieTheory/LieAlgebras/sub-construct.html"
source: "https://docs.magma-maths.org/v2.30-1/LieTheory/LieAlgebras/sub-construct.md"
part: "Lie Theory"
chapter: "Lie Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Lie Theory", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/index-lie-theory.md"}
  - {"title": "Lie Algebras", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/LieAlgebras/index-lie-algebras.md"}
prev: {"title": "Construction of Elements", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/LieAlgebras/element-construct.md"}
next: {"title": "Operations on Lie Algebras", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/LieAlgebras/operation.md"}
intrinsics:
  - {"name": "sub", "signature": "sub<L | A>: AlgLie, List -> AlgLie, Map"}
  - {"name": "sub", "signature": "sub<L | A>: AlgMatLie, List -> AlgMatLie, Map"}
  - {"name": "ideal", "signature": "ideal<L | A>: AlgLie, List -> AlgLie, Map"}
  - {"name": "ideal", "signature": "ideal<L | A>: AlgMatLie, List -> AlgMatLie, Map"}
  - {"name": "quo", "signature": "quo<L | A>: AlgLie, List -> AlgLie, Map"}
  - {"name": "quo", "signature": "quo<L | A>: AlgMatLie, List -> AlgMatLie, Map"}
  - {"name": "/", "signature": "L / S: AlgLie, AlgLie -> AlgLie"}
  - {"name": "/", "signature": "L / S: AlgMatLie, AlgMatLie -> AlgLie"}
  - {"name": "QuotientWithPullback", "signature": "QuotientWithPullback(L, I): AlgLie, AlgLie -> AlgLie, Map, UserProgram, UserProgram"}
examples:
  - "ex-bb05e7"
  - "ex-83d77d"
---

<a id="sub-construct"></a>
<a id="sectalgliesubconstr"></a>
# Construction of Subalgebras, Ideals, and Quotients

If the coefficient ring $R$ of a Lie algebra $L$ is a Euclidean domain, then submodules and ideals can be constructed in Magma; if $R$ is a field then quotients can be constructed in Magma. Note that left, right, and two-sided ideals are identical in a Lie algebra.

<a id="constructor-constructor-sub-alglie-list-alglie-map"></a>
## `sub<L | A>: AlgLie, List -> AlgLie, Map`

<a id="constructor-constructor-sub-algmatlie-list-algmatlie-map"></a>
## `sub<L | A>: AlgMatLie, List -> AlgMatLie, Map`

Creates the subalgebra $S$ of the Lie algebra $L$ that is generated by the elements defined by $A$, where $A$ is a list of one or more items of the following types:

**(a)**
An element of $L$;

**(b)**
A set or sequence of elements of $L$;

**(c)**
A subalgebra or ideal of $L$;

**(d)**
A set or sequence of subalgebras or ideals of $L$.

As well as the subalgebra $S$ itself, the constructor returns the inclusion homomorphism $f : S \rightarrow L$.

<a id="constructor-constructor-ideal-alglie-list-alglie-map"></a>
## `ideal<L | A>: AlgLie, List -> AlgLie, Map`

<a id="constructor-constructor-ideal-algmatlie-list-algmatlie-map"></a>
## `ideal<L | A>: AlgMatLie, List -> AlgMatLie, Map`

Creates the ideal $I$ of the Lie algebra $L$ generated by the elements defined by $A$, where $A$ is a list of one or more items of the following types:

**(a)**
An element of $L$;

**(b)**
A set or sequence of elements of $L$;

**(c)**
A subalgebra or ideal of $L$;

**(d)**
A set or sequence of subalgebras or ideals of $L$.

As well as the ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow L$.

<a id="constructor-constructor-quo-alglie-list-alglie-map"></a>
## `quo<L | A>: AlgLie, List -> AlgLie, Map`

<a id="constructor-constructor-quo-algmatlie-list-algmatlie-map"></a>
## `quo<L | A>: AlgMatLie, List -> AlgMatLie, Map`

Forms the quotient algebra $L / I$, where $I$ is the two-sided ideal of $L$ generated by the elements defined by $A$, where $A$ is a list of one or more items of the following types:

**(a)**
An element of $L$;

**(b)**
A set or sequence of elements of $L$;

**(c)**
A subalgebra or ideal of $L$;

**(d)**
A set or sequence of subalgebras or ideals of $L$.

As well as the quotient $L/I$ itself, the constructor returns the natural homomorphism $f : L \rightarrow L/I$.

<a id="operation-op-div-alglie-alglie"></a>
## `L / S: AlgLie, AlgLie -> AlgLie`

<a id="operation-op-div-algmatlie-algmatlie"></a>
## `L / S: AlgMatLie, AlgMatLie -> AlgLie`

The quotient of the Lie algebra $L$ by the ideal closure of the subalgebra $S$.

<a id="example-ex-bb05e7"></a>
## `Example: Quotient of a Matrix Lie Algebra (ex-bb05e7)`

We construct the quotient of the matrix Lie algebra of $2\times 2$ matrices, by the ideal spanned by the identity matrix.

```magma
> L := MatrixLieAlgebra( Rationals(), 2 );
> Dimension(L);
4
> I := ideal< L | L!Matrix([[1,0],[0,1]]) >;
> Dimension(I);
1
> K := L/I;
> Dimension(K);
3
> SemisimpleType( K );
A1
```

<a id="function-quotientwithpullback-alglie-alglie"></a>
## `QuotientWithPullback(L, I): AlgLie, AlgLie -> AlgLie, Map, UserProgram, UserProgram`

Given a Lie algebra $L$ and an ideal $I$ of $L$, this intrinsic returns four values: the quotient $Q = L/I$, the natural homomorphism $\mu : L\to Q$, and two functions, $\sigma$ and $\Sigma$ with domain $Q$. The function $\sigma$ is a section of $\mu$ and also returns the kernel of $\mu$. That is, for $y \in Q$, $\sigma(y)$ returns $x$ and $V$, such that $\sigma(x) = y$ and where $V$ is the underlying vector space of $I$. For $y\in Q$, $\Sigma(y)$ is the subalgebra of $L$ generated by $I$ and $x$.

<a id="example-ex-83d77d"></a>
## `Example: Quotient and Pullback of an Ideal (ex-83d77d)`

We consider an ideal of the Lie algebra of type G$_2$ over the field with $3$ elements.

```magma
> R := RootDatum("G2");
> L := LieAlgebra(R, GF(3));
> pos,neg,cart := StandardBasis(L);
> shrt := [ i : i in [1..NumPosRoots(R)] | IsShortRoot(R, i) ];
> shrt;
[ 1, 3, 4 ]
> I := ideal<L | pos[shrt]>;
> _, str1 := ReductiveType(I); str1;
The 7-dim simple constituent of a Lie algebra of type A2
```

So apparently $I$ is isomorphic to the $7$-dimensional simple constituent of a Lie algebra of type A$_2$. We will now use `QuotientWithPullback` to construct $L/I$.

```magma
> LI, proj, pb, pbsub := QuotientWithPullback(L, I);
> _, str2 := ReductiveType(LI); str2;
The 7-dim simple constituent of a Lie algebra of type A2
```

So apparently $I \simeq L/I$! Finally, we will demonstrate the use of the additional return values. First, we verify that an element of $I$ maps to $0$ in $L/I$:

```magma
> proj(pos[1]);
(0 0 0 0 0 0 0)
```

And then we consider the preimage in $L$ of a randomly chosen element of $L/I$.

```magma
> y := LI![0,1,1,1,1,0,1];
> y;
(0 1 1 1 1 0 1)
> x, V := pb(y);
> x;
(0 1 0 0 1 0 0 1 0 1 0 0 0 1)
> #V;
2187
> assert #V eq #I;
> {* proj(x + v) eq y : v in V *};
{* true^^2187 *}
```

So indeed $x+v$ is a preimage of $y$ for all $v \in V$.

```magma
> M := pbsub(y);
> M, M meet I;
Lie Algebra of dimension 8 with base ring GF(3)
Lie Algebra of dimension 7 with base ring GF(3)
> _,str3 := ReductiveType(M);
> str3;
Twisted Lie algebra of type 2A2 [Ad]
```
