# Construction of Subalgebras, Ideals and Quotient Algebras

## Subalgebras and Ideals

If the coefficient ring $R$ of an algebra $A$ is a Euclidean domain then one may construct submodules and ideals of $A$ in Magma.

### `sub< A | L >: AlgGen, List -> AlgGen, Map`

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

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

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

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

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

The constructor returns the subalgebra as an algebra of the same type as $A$. An exception are group algebras, where the subalgebra is either of type `AlgAss` or of the special type `AlgGrpSub`. As well as the subalgebra $S$ itself, the constructor returns the inclusion homomorphism $f : S \rightarrow A$.

### `lideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the left ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the left ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the left ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

### `rideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the right ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the right ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the right ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

### `ideal< A | L >: AlgGen, List -> AlgGen, Map`

Create the (two-sided) ideal $I$ of the algebra $A$ generated by the elements defined by $L$, where $L$ is a list as for the `sub` constructor above. The constructor returns the right ideal as an algebra of the same type as $A$ with the same exception for group algebras as for the `sub` constructor. As well as the ideal $I$ itself, the constructor returns the inclusion homomorphism $f : I \rightarrow A$.

## Quotient Algebras

If the coefficient ring $R$ of an algebra $A$ is a field, then quotient algebras of $A$ may also be constructed.

### `quo< A | L >: AlgGen, List -> AlgGen, Map`

Create the quotient algebra $Q = A / I$, where $I$ is the two-sided ideal of $A$ generated by the elements of $A$ specified by the list $L$, which should satisfy the same conditions as for the `sub` constructor above. The constructor returns the quotient as a structure constant algebra with degree equal to its dimension. If $A$ is known to be associative, then $Q$ is of type `AlgAss`, otherwise $Q$ is of type `AlgGen`. As well as the quotient $Q$ itself, the constructor returns the natural homomorphism $f : A \rightarrow Q$.

### `A / S: AlgGen, AlgGen -> AlgGen`

The quotient of the algebra $A$ by the (two-sided) ideal closure of its subalgebra $S$.
