# Ideals and Quotient Rings

Currently it is only possible to create ideals and quotient rings in univariate polynomial rings over fields. Note that these are principal ideal domains: all ideals can be generated by a single element.

## Creation of Ideals and Quotients

### `ideal< R | a₁, ..., aᵣ >: RngUPol, RngUPolElt, ..., RngUPolElt -> RngUPol`

Given a univariate polynomial ring $R$ over a field $K$, this function returns the ideal of $R$ generated by the elements $a_1, \ldots, a_r\in R$. This is the same as the ideal generated by the greatest common divisor of the elements $a_i$ in $R$. The function returns the ideal as a subring of $R$, generated by a single element.

### `quo< R | I >: RngUPol, RngUPol -> RngUPolRes`

### `quo< R | a₁, ..., aᵣ >: RngUPol, RngUPolElt, ..., RngUPolElt -> RngUPolRes, Map`

Given an ideal $I$ in the univariate polynomial ring $R$ (over a field), return the quotient $R/I$, as well as the projection map $h: R\rightarrow R/I$. The ideal $I$ may either be specified as an ideal or by a list $a_1$, $a_2$, $\ldots$, $a_r$, of generators. The angle bracket notation can be used to assign names to the indeterminates: `Q<q> := quo< I | I >;`.

## Ideal Arithmetic

Since ideals of $R$ are regarded as subrings of $R$, the ring $R$ itself is a valid ideal as well.

### `I + J: RngUPol, RngUPol -> RngUPol`

Given ideals $I$ and $J$ in the same polynomial ring $R$, this function returns the sum of the ideals $I$ and $J$, which is the ideal generated by the generators of $I$ and those of $J$. Since we require $R$ to be a principal ideal domain, the resulting ideal will be simply generated by the greatest common divisor of `I.1` and `J.1`.

### `I * J: RngUPol, RngUPol -> RngUPol`

Given ideals $I$ and $J$ in the same polynomial ring $R$, this function returns the product of the ideals $I$ and $J$, which is the ideal generated by the products of the generators of $I$ and those of $J$. Since we require $R$ to be a principal ideal domain, the resulting ideal will be simply generated by `I.1 * J.1`.

### `I meet J: RngUPol, RngUPol -> RngUPol`

Given ideals $I$ and $J$ in the same polynomial ring $R$, this function returns the intersection of the ideals $I$ and $J$. Since we require $R$ to be a principal ideal domain, the resulting ideal will equal the product of $I$ and $J$ and be simply generated by `I.1 * J.1`.

### `a in I: RngUPolElt, RngUPol -> BoolElt`

Given an element $a$ of a polynomial ring $P$ as well as an ideal $I$ of $P$, this function returns `true` if and only if $a$ is contained in $I$, and `false` otherwise.

### `a notin I: RngUPolElt, RngUPol -> BoolElt`

Given an element $a$ of a polynomial ring $P$ as well as an ideal $I$ of $P$, this function returns `false` if and only if $a$ is contained in $I$, and `true` otherwise.

### `I eq J: RngUPol, RngUPol -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $R$ this returns `true` if and only if $I$ and $J$ are the same, and `false` otherwise.

### `I ne J: RngUPol, RngUPol -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $R$ this returns `false` if and only if $I$ and $J$ are the same, and `true` otherwise.

### `I subset J: RngUPol, RngUPol -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $R$ this returns `true` if and only if $I$ is contained in $J$, and `false` otherwise.

### `I notsubset J: RngUPol, RngUPol -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $R$ this returns `false` if and only if $I$ is contained in $J$, and `true` otherwise.

## Other Functions on Ideals

Since ideals are considered as subrings of polynomial rings, and in particular are in the same Magma category as polynomial rings, most of the function listed in this chapter for polynomial rings do also apply to ideals, but some restrictions apply. Thus it will be possible to get the coefficient ring but it will not be possible to use `ChangeRing` to change it. We list some functions here that additional comments.

### `I . 1: RngUPol -> RngUPolElt`

Given an ideal $I$ in a univariate polynomial ring $R$, return the generator of $I$ in $R$ as an element of $I$.

## Other Functions on Quotients

Contrary to ideals, quotient rings form a separate Magma category. Only very few functions are available on these rings; however most element functions for polynomial rings apply to elements of quotients as well, in particular the coefficient, term and degree functions.

### `Modulus(Q): RngUPolRes -> RngUPolElt`

Given a quotient ring $Q=R[x]/I$ of the univariate polynomial ring $R[x]$ obtained by factoring out by the ideal $I$, return the generator for $I$ as an element of $R$.

### `PreimageRing(Q): RngUPolRes -> RngUPol`

If $Q$ is the quotient $Q = R / I$ for some univariate polynomial ring $R$, this function returns $R$.
