---
title: "Operations on FP-Algebras"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/FinitelyPresentedAlgebras/operations.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/FinitelyPresentedAlgebras/operations.md"
part: "Algebras"
chapter: "Finitely Presented Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/index-algebras.md"}
  - {"title": "Finitely Presented Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/FinitelyPresentedAlgebras/index-finitely-presented-algebras.md"}
prev: {"title": "Creation of FP-Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/FinitelyPresentedAlgebras/creation.md"}
next: {"title": "Finite Dimensional FP-Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/FinitelyPresentedAlgebras/finite-dimension-quotient.md"}
intrinsics:
  - {"name": ".", "signature": "A . i: AlgFP, RngIntElt -> AlgFPElt"}
  - {"name": "CoefficientRing", "signature": "CoefficientRing(A): AlgFP -> Rng"}
  - {"name": "Rank", "signature": "Rank(A): AlgFP -> RngIntElt"}
  - {"name": "DivisorIdeal", "signature": "DivisorIdeal(I): AlgFP -> AlgFr"}
  - {"name": "PreimageIdeal", "signature": "PreimageIdeal(I): AlgFP -> AlgFr"}
  - {"name": "PreimageRing", "signature": "PreimageRing(A): AlgFP -> AlgFr"}
  - {"name": "OriginalRing", "signature": "OriginalRing(A): AlgFP -> Rng"}
  - {"name": "IsCommutative", "signature": "IsCommutative(A): AlgFP -> BoolElt"}
  - {"name": "eq", "signature": "I eq J: AlgFP, AlgFP -> BoolElt"}
  - {"name": "subset", "signature": "I subset J: AlgFP, AlgFP -> BoolElt"}
  - {"name": "+", "signature": "I + J: AlgFP, AlgFP -> AlgFP"}
  - {"name": "*", "signature": "I * J: AlgFP, AlgFP -> AlgFP"}
  - {"name": "IsProper", "signature": "IsProper(I): AlgFP -> BoolElt"}
  - {"name": "IsZero", "signature": "IsZero(I): AlgFP -> BoolElt"}
---

# Operations on FP-Algebras

This section describes operations on fp-algebras. Most of the operations are very similar to those for noncommutative free algebras; such operations are done by mapping the computation to the preimage ideal and then by mapping the result back into the fp-algebra. See the corresponding functions for the noncommutative free algebras for details.

<a id="operation-operation-algfp-rngintelt-algfpelt"></a>
## `A . i: AlgFP, RngIntElt -> AlgFPElt`

Given an fp-algebra $A$, return the $i$-th indeterminate of $A$ as an element of $A$.

<a id="function-coefficientring-algfp"></a>
## `CoefficientRing(A): AlgFP -> Rng`

Return the coefficient ring of the fp-algebra $A$.

<a id="function-rank-algfp"></a>
## `Rank(A): AlgFP -> RngIntElt`

Return the rank of the fp-algebra $A$ (the number of indeterminates of $A$).

<a id="function-divisorideal-algfp"></a>
## `DivisorIdeal(I): AlgFP -> AlgFr`

Given an ideal $I$ of an fp-algebra $A$ which is the quotient ring $F/J$, where $F$ is a free algebra and $J$ an ideal of $F$, return the ideal $J$.

<a id="function-preimageideal-algfp"></a>
## `PreimageIdeal(I): AlgFP -> AlgFr`

Given an ideal $I$ of an fp-algebra $A$ which is the quotient ring $F/J$, where $F$ is a free algebra and $J$ an ideal of $F$, return the ideal $I'$ of $F$ such that the image of $I'$ under the natural epimorphism $F\rightarrow A$ is $I$.

<a id="function-preimagering-algfp"></a>
## `PreimageRing(A): AlgFP -> AlgFr`

Given an fp-algebra $A$ which is the quotient ring $F/J$, where $F$ is a free algebra and $J$ an ideal of $F$, return the free algebra $F$.

<a id="function-originalring-algfp"></a>
## `OriginalRing(A): AlgFP -> Rng`

Return the generic free algebra $F$ such that $A$ is $F/J$ for some ideal $J$ of $F$.

<a id="function-iscommutative-algfp"></a>
## `IsCommutative(A): AlgFP -> BoolElt`

Return whether the algebra $A$ is commutative.

<a id="operation-op-eq-algfp-algfp"></a>
## `I eq J: AlgFP, AlgFP -> BoolElt`

Given two ideals $I$ and $J$ of the same fp-algebra $A$, return `true` if and only if $I$ and $J$ are equal.

<a id="operation-op-subset-algfp-algfp"></a>
## `I subset J: AlgFP, AlgFP -> BoolElt`

Given two ideals $I$ and $J$ of the same fp-algebra $A$, return `true` if and only if $I$ is contained in $J$.

<a id="operation-op-plus-algfp-algfp"></a>
## `I + J: AlgFP, AlgFP -> AlgFP`

Given two ideals $I$ and $J$ of the same fp-algebra $A$, return the sum $I+J$.

<a id="operation-op-times-algfp-algfp"></a>
## `I * J: AlgFP, AlgFP -> AlgFP`

Given two ideals $I$ and $J$ of the same fp-algebra $A$, return the product $I*J$.

<a id="function-isproper-algfp"></a>
## `IsProper(I): AlgFP -> BoolElt`

Given an ideal $I$ of the fp-algebra $A$, return whether $I$ is proper; that is, whether $I$ is strictly contained in $A$.

<a id="function-iszero-algfp"></a>
## `IsZero(I): AlgFP -> BoolElt`

Given an ideal $I$ of the fp-algebra $A$, return whether $I$ is the zero ideal. Note that this is equivalent to whether the preimage ideal of $I$ is the divisor ideal of $A$.
