# Subalgebras and Quotient Algebras

A subalgebra is also returned with the embedding homomorphism, and a quotient algebra is returned with the natural quotient map. These are needed for creating some standard subalgebras such as the centre of the algebra.

## Subalgebras and their Constructions

### `sub<A | S>: AlgBas, SeqEnum -> AlgBas, Map`

The subalgebra of $A$ generated by the elements of the sequence $S$, together with the inclusion map of the subalgebra into $A$. The subalgebra contains the idempotent of minimal rank in $A$ that acts as a multiplicative identity on the elements of $S$.

### `SubalgebraFromBasis(A, V): AlgBas, SeqEnum -> AlgBas, Map`

Given a basic algebra A and the basis $V$ of a subspace of $A$, the function returns the basic algebra which is the subalgebra spanned by the subspace and the inclusion matrix of the homomorphism embedding the subalgebra into $A.$ Note that the space $V$ might not contain the identity element of V and in that case the minimal possible identity element is added to the returned subalgebra.

### `MaximalIdempotent(A, S): AlgBas, SeqEnum -> AlgBasElt`

Given a basic algebra $A$, a subspace $S$ of the vector space of $A$ that is closed under multiplication, this function returns an idempotent in $A$ which has maximal rank among all idempotents contained in $S$.

### `MinimalIdentity(A, S): AlgBas, SeqEnum[AlgBasElt] -> AlgBasElt`

Returns the idempotent of smallest rank that is a two sided identity for the elements in the set $S.$

### `Centre(A): AlgBas -> AlgBas, Map`

The centre of the basic algebra as a basic algebra together with the inclusion homomorphism.

### `Centralizer(A, S): AlgBas, SeqEnum -> AlgBas, Map`

Returns the centralizer in the basic algebra $A$ of the elements in the sequence $S$, along with the homomorphism embedding the centralizer into $A.$

### `MaximalCommutativeSubalgebra(A, S): AlgBas, SeqEnum -> AlgBas, Map`

Returns a maximal commutative subalgebra of the basic algebra $A$ that contains the elements of the sequence $S$. An error occurs if the elements of $S$ do not commute.

## Ideals and their Construction

### `ideal< A | S>: AlgBas, SeqEnum[AlgBasElt] -> ModTupFld`

### `ideal< A | S>: AlgBasGrpP, SeqEnum[AlgBasElt] -> ModTupFld`

Returns the subspace of the vector space of the algebra $A$ that is the ideal of the $A$ generated by the given sequence of elements $S$.

### `LeftAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]`

Returns a basis for the left annihilator of the sequence $S$ of elements in the basic algebra $A.$

### `RightAnnihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBaselt]`

Returns a basis for the right annihilator of the sequence $S$ of elements in the basic algebra $A.$

### `Annihilator(A, S): AlgBas, SeqEnum[AlgBasElt] -> SeqEnum[AlgBasElt]`

Returns a basis for the two-sided annihilator of the sequence of elements $S$ of the basic algebra $A.$

### `IsIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a two-sided ideal of the basic algebra $A.$

### `IsLeftIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a left ideal of the basic algebra $A.$

### `IsRightIdeal(A, S): AlgBas, ModTupFld -> Bool`

Returns `true` if the subspace spanned by the elements of $S$ is a two-sided ideal of the basic algebra $A.$

### `RandomIdealGeneratedBy(A, n): AlgBas, RngIntElt -> ModTupFld`

Returns the ideal generated by $n$ randomly selected elements in the Jacobson radical of the basic algebra $A.$

## Quotient Algebras

### `quo<A | S>: AlgBas, ModTupFld -> AlgBas, Map`

Returns the quotient algebra of $A$ by the ideal $S$, which is a subspace of the vector space of $A$, together with the quotient map.

### `CoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt`

Constructs the maximal extension B as in [$0 \rightarrow  K \rightarrow  B \rightarrow  A \rightarrow 0$] such that $B$ acts trivially on $K$ and $B$ is an algebra with exactly the same minimal number of generators as $A$. Returns $B$ and the algebra homomorphism of $B$ onto $A$.

### `GradedCoverAlgebra(A): AlgBas -> AlgBas, ModMatFldElt`

This assumes that we are given the truncated algebra of a graded algebra. It creates the basic algebra of the natural cover of $A$ and also returns the matrix of the cover onto $A.$

### `TruncatedAlgebra(A, n): AlgBas, RngIntElt -> AlgBas, ModMatFldElt`

The quotient of the algebra by the $n^{th}$ power of the radical of $A$. Returns also the quotient map.

## Units

### `GeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum`

Returns a sequence of elements of the basic algebra $A$ that generate the group of invertible elements in $A$ and a sequence containing the inverses of those elements.

### `NoncentralGeneratorsOfGroupOfUnits(A): AlgBas -> SeqEnum, SeqEnum`

Returns a sequence of elements of the basic algebra $A$ that generate the quotient of the group of invertible elements in $A$ by the subgroup of invertible central elements. The inverses of those elements is also returned as a sequence.
