# Ideals and Quotient Rings

A differential ideal $I\subset R$ of a differential ring $R$ is an ideal of $R$ that is closed under the derivation of $R$. However, we consider a differential ideal as an ideal of the underlying ring of $R$. More specifically, ideals of differential rings are restricted to those rings whose underlying rings are multivariate polynomial rings.

## Defining Ideals and Quotient Rings

### `DifferentialIdeal(L): [RngDiffElt] -> RngMPol`

Given a sequence $L$ with entries in a differential ring $R$, return the differential ideal generated by the entries of $L$ as an ideal of the underlying ring of $R$. The underlying ring of $R$ must be of type `RngMPol`. At first the elements of $L$ may generate an ideal which is not closed under the derivation of $R$. By adding as many derivatives of the elements to the set of generators of the ideal as needed, one obtains a full set of generators for the calculated differential ideal.

### `QuotientRing(R, I): RngDiff, RngMPol -> RngDiff, Map`

Given a differential ring $R$ and a differential ideal $I$, return the differential quotient ring $Q=R/I$. The derivation of $Q$ is induced by the derivation of $R$. It maps $Q.i$ to $Q ! \delta_R(R.i)$, for $i=1,2,\ldots,m$ where $m$ is the number of generators of $Q$ (or $R$). The induced quotient map from $R$ to $Q$ is also returned.

### `Example: Diff Ideal Quotient (ex-effe4a)`

```magma
> P := PolynomialRing(Rationals(),1);
> f := map<P->P | a:->a*Derivative(a,1)>;
> R<T> := DifferentialRing(P, f, Rationals());
> L := [T^2+T-1];
> I := DifferentialIdeal(L);
> I;
Ideal of Polynomial ring of rank 1 over Rational Field
Lexicographical Order
Variables: T
Basis:
[
    T^2 + T - 1,
]
> Q<X>, toQ := QuotientRing(R,I);
> Q;
Differential Ring of Affine Algebra of rank 1 over Rational Field
Lexicographical Order
Variables: X
Quotient relations:
[
    X^2 + X - 1
]
with derivation given by Mapping from: Affine Algebra of rank 1 over Rational
    Field to Affine Algebra of rank 1 over Rational Field given by a rule [no
inverse]
> toQ(T);
X
> Derivative(T^2);
2*T^3
> Derivative(X^2);
X

```

## Boolean Operations on Ideals

### `IsDifferentialIdeal(R, I): RngDiff, RngMPol -> BoolElt`

Returns `true` if and only if $I$ is a differential ideal of the differential ring $R$.
