---
title: "Structure Operations on Differential Rings"
canonical: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/DifferentialRings/structure-operations-diff-rings.html"
source: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/DifferentialRings/structure-operations-diff-rings.md"
part: "Commutative Algebra"
chapter: "Differential Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Commutative Algebra", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/index-commutative-algebra.md"}
  - {"title": "Differential Rings", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/DifferentialRings/index-differential-rings.md"}
prev: {"title": "Differential Rings and Fields", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/DifferentialRings/creation-diff-rings.md"}
next: {"title": "Element Operations on Differential Ring Elements", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/DifferentialRings/element-operations.md"}
intrinsics:
  - {"name": "Category", "signature": "Category(R): RngDiff -> RngDiff"}
  - {"name": "Type", "signature": "Type(R): RngDiff -> RngDiff"}
  - {"name": "Parent", "signature": "Parent(R): RngDiff -> PowStr"}
  - {"name": "UnderlyingRing", "signature": "UnderlyingRing(R): RngDiff -> Rng"}
  - {"name": "UnderlyingField", "signature": "UnderlyingField(R): RngDiff -> Rng"}
  - {"name": "BaseRing", "signature": "BaseRing(R): RngDiff -> Rng"}
  - {"name": "BaseField", "signature": "BaseField(R): RngDiff -> Rng"}
  - {"name": "ConstantRing", "signature": "ConstantRing(R): RngDiff -> Rng"}
  - {"name": "ConstantField", "signature": "ConstantField(R): RngDiff -> Rng"}
  - {"name": "ExactConstantField", "signature": "ExactConstantField(F): RngDiff -> RngDiff, Map"}
  - {"name": "Generators", "signature": "Generators(R): RngDiff -> SeqEnum"}
  - {"name": "Derivation", "signature": "Derivation(R): RngDiff -> Map"}
  - {"name": "Differential", "signature": "Differential(F): RngDiff -> DiffFunElt"}
  - {"name": "Ngens", "signature": "Ngens(R): RngDiff -> RngIntElt"}
  - {"name": "eq", "signature": "R eq F: RngDiff, RngDiff -> BoolElt"}
  - {"name": "IsIdentical", "signature": "IsIdentical(R, F): RngDiff, RngDiff -> BoolElt"}
  - {"name": "IsDomain", "signature": "IsDomain(R): RngDiff -> BoolElt"}
  - {"name": "IsField", "signature": "IsField(R): RngDiff -> BoolElt"}
  - {"name": "IsDifferentialField", "signature": "IsDifferentialField(R): Rng -> BoolElt"}
  - {"name": "IsAlgebraicDifferentialField", "signature": "IsAlgebraicDifferentialField(R): Rng -> BoolElt"}
  - {"name": "IsDifferentialSeriesRing", "signature": "IsDifferentialSeriesRing(R): Rng -> BoolElt"}
  - {"name": "IsDifferentialLaurentSeriesRing", "signature": "IsDifferentialLaurentSeriesRing(R): Rng -> BoolElt"}
  - {"name": "HasProjectiveDerivation", "signature": "HasProjectiveDerivation(F): RngDiff -> BoolElt"}
  - {"name": "HasZeroDerivation", "signature": "HasZeroDerivation(F): RngDiff -> BoolElt"}
  - {"name": "RelativePrecision", "signature": "RelativePrecision(F): RngDiff -> RngElt"}
  - {"name": "RelativePrecisionOfDerivation", "signature": "RelativePrecisionOfDerivation(F): RngDiff -> RngElt"}
  - {"name": "ChangePrecision", "signature": "ChangePrecision(F, p): RngDiff, RngElt -> RngDiff, Map"}
examples:
  - "ex-64f77a"
  - "ex-326abb"
  - "ex-627c5f"
  - "ex-913ce7"
  - "ex-a3014d"
  - "ex-4674cf"
  - "ex-617005"
  - "ex-d18d60"
---

# Structure Operations on Differential Rings

## Category and Parent

Differential Rings form the Magma category `RngDiff`. The notional power structures exist as parents of differential rings.

<a id="function-category-rngdiff"></a>
### `Category(R): RngDiff -> RngDiff`

<a id="function-type-rngdiff"></a>
### `Type(R): RngDiff -> RngDiff`

The category, or type, of the differential ring $R$.

<a id="function-parent-rngdiff"></a>
### `Parent(R): RngDiff -> PowStr`

The power structure of the differential ring $R$.

## Related Structures

The underlying ring and constant ring from which the differential ring was created can each be retrieved as described below. There is also the concept of a base ring. If one has created a differential extension $M/F$ in Magma, then $F$ is the *base ring* of $M$.

<a id="function-underlyingring-rngdiff"></a>
### `UnderlyingRing(R): RngDiff -> Rng`

The underlying ring of the differential ring $R$. The type of the underlying ring indicates what ring $R$ inherits from.

<a id="function-underlyingfield-rngdiff"></a>
### `UnderlyingField(R): RngDiff -> Rng`

The underlying ring of the differential ring $R$, provided it is a field.

<a id="function-basering-rngdiff"></a>
### `BaseRing(R): RngDiff -> Rng`

The base ring of the differential ring $R$.

<a id="function-basefield-rngdiff"></a>
### `BaseField(R): RngDiff -> Rng`

The base ring of the differential ring $R$, provided it is a field.

<a id="function-constantring-rngdiff"></a>
### `ConstantRing(R): RngDiff -> Rng`

The constant ring of the differential ring $R$. The derivation of $R$ acts trivially on the constant ring. It is therefore contained in the differential ring of constants of $R$.

<a id="function-constantfield-rngdiff"></a>
### `ConstantField(R): RngDiff -> Rng`

The constant ring of the differential ring $R$, provided it is a field.

<a id="function-exactconstantfield-rngdiff"></a>
### `ExactConstantField(F): RngDiff -> RngDiff, Map`

The exact constant field of $F$, i.e. the algebraic closure in $F$ of the constant field of $F$, together with the inclusion map to $F$. The field $F$ must be a function field. The differential field $F$ must have been created with respect to a differential. If the derivation of $F$ has been constructed with respect to a differential, then the exact constant field coincides with the differential field of constants of $F$.

<a id="function-generators-rngdiff"></a>
### `Generators(R): RngDiff -> SeqEnum`

The list of generators of the differential ring $R$. If there is no list assigned to $R$, one is constructed by default from the underlying ring of $R$.

<a id="example-ex-64f77a"></a>
### `Example: Related Structures of a Differential Field (ex-64f77a)`

First we construct the differential field $F={\mathbb{Q}}(z)$ with derivation ${d}/ {d}z$ and show what some of the related structures are. Then we construct the field extension $M={\mathbb{Q}}(z,\alpha)$, where $\alpha$ is a root of the polynomial $X^2-2$. We do this with the usual `ext< >` constructor. For $M$ we again derive some related structures.

```magma
> F<z> := RationalDifferentialField(Rationals());
> ConstantRing(F);
Rational Field
> UnderlyingRing(F);
Algebraic function field defined over Rational Field by
$.2 - 4711
>
> _<X> := PolynomialRing(F);
> M<alpha> := ext< F | X^2-2 >;
> BaseRing(M);
Differential Ring of Algebraic function field defined over Rational Field by
$.2 - 4711
with derivation given by (1) d(z)
> BaseRing(M) eq F;
true
> ConstantRing(M);
Rational Field
> E := ExactConstantField(M);
> E;
Number Field with defining polynomial $.1^2 - 2 over the Rational Field
> Generators(M);
[ alpha ]
```

<a id="example-ex-326abb"></a>
### `Example: Related Structures of a Laurent Series Ring (ex-326abb)`

Related structures also exist for differential Laurent series rings.

```magma
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> UnderlyingRing(S);
Laurent series field in t over Rational Field
> ConstantRing(S);
Rational Field
> Generators(S);
[ t ]
```

## Derivation and Differential

The derivation of a differential ring and its differential, whenever applicable, can be retrieved as indicated below.

<a id="function-derivation-rngdiff"></a>
### `Derivation(R): RngDiff -> Map`

The derivation of the differential ring $R$.

<a id="function-differential-rngdiff"></a>
### `Differential(F): RngDiff -> DiffFunElt`

The differential belonging to the derivation of the differential field $F$. The field $F$ must have been constructed in such a way that its derivation is defined by a differential.

<a id="example-ex-627c5f"></a>
### `Example: Derivation and Differential of a Field (ex-627c5f)`

```magma
> F<z> := RationalDifferentialField(Rationals());
> Derivation(F);
Mapping from: RngDiff: F to RngDiff: F given by a rule [no inverse]
> Differential(F);
(1) d(z)
```

## Numerical Invariants

<a id="function-ngens-rngdiff"></a>
### `Ngens(R): RngDiff -> RngIntElt`

The number of indeterminates associated with the differential ring $R$.

## Predicates and Booleans

<a id="operation-op-eq-rngdiff-rngdiff"></a>
### `R eq F: RngDiff, RngDiff -> BoolElt`

Returns `true` if and only if the differential rings $R$ and $F$ are the same.

<a id="function-isidentical-rngdiff-rngdiff"></a>
### `IsIdentical(R, F): RngDiff, RngDiff -> BoolElt`

Returns `true` if and only if the differential rings $R$ and $F$ are identical.

<a id="function-isdomain-rngdiff"></a>
### `IsDomain(R): RngDiff -> BoolElt`

Returns `true` if and only if the differential ring $R$ is a domain.

<a id="function-isfield-rngdiff"></a>
### `IsField(R): RngDiff -> BoolElt`

Returns `true` if and only if the differential ring $R$ is field.

<a id="function-isdifferentialfield-rng"></a>
### `IsDifferentialField(R): Rng -> BoolElt`

Returns `true` if and only if the ring $R$ is a differential field.

<a id="function-isalgebraicdifferentialfield-rng"></a>
### `IsAlgebraicDifferentialField(R): Rng -> BoolElt`

Returns `true` if and only if the field structure of the differential ring $R$ is an algebraic function field.

<a id="function-isdifferentialseriesring-rng"></a>
### `IsDifferentialSeriesRing(R): Rng -> BoolElt`

Returns `true` if and only if the underlying ring of the differential ring $R$ is a series ring.

<a id="function-isdifferentiallaurentseriesring-rng"></a>
### `IsDifferentialLaurentSeriesRing(R): Rng -> BoolElt`

Returns `true` if and only if the underlying ring of the differential ring $R$ is a Laurent series ring and $R$ has been created with a known constant ring.

<a id="example-ex-913ce7"></a>
### `Example: Predicates for Differential Rings (ex-913ce7)`

This example shows some booleans for various differential rings.

```magma
> F<z>:=RationalDifferentialField(Rationals());
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> IsAlgebraicDifferentialField(F);
true
> IsDifferentialSeriesRing(F);
false
> IsAlgebraicDifferentialField(S);
false
> IsDifferentialSeriesRing(S);
true
> IsDifferentialLaurentSeriesRing(S);
true
```

<a id="function-hasprojectivederivation-rngdiff"></a>
### `HasProjectiveDerivation(F): RngDiff -> BoolElt`

Returns `true` if and only if $F$ is a differential ring with derivation weakly of the form $(F.1)\cdot d/d(F.1)$.

<a id="function-haszeroderivation-rngdiff"></a>
### `HasZeroDerivation(F): RngDiff -> BoolElt`

Returns `true` if and only if the algebraic differential field or differential series ring $F$ has zero derivation. When $F$ is a series ring we relax being zero to being weakly zero.

<a id="example-ex-a3014d"></a>
### `Example: Predicates on the Derivation (ex-a3014d)`

```magma
> F<z>:=RationalDifferentialField(Rationals());
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> HasProjectiveDerivation(F);
false
> HasProjectiveDerivation(ChangeDerivation(F,z));
true
> HasZeroDerivation(F);
false
> HasProjectiveDerivation(S);
true
> HasProjectiveDerivation(ChangeDerivation(S,S!3));
false
> HasZeroDerivation(S);
false
```

## Precision

<a id="function-relativeprecision-rngdiff"></a>
### `RelativePrecision(F): RngDiff -> RngElt`

Returns the relative precision of the underlying series ring of F.

<a id="function-relativeprecisionofderivation-rngdiff"></a>
### `RelativePrecisionOfDerivation(F): RngDiff -> RngElt`

Given a differential Laurent series ring $F$, returns the relative precision of the ring derivative of $F.1$.

<a id="example-ex-4674cf"></a>
### `Example: Relative Precision of a Series Ring (ex-4674cf)`

This example illustrate the relative precision of differential rings.

```magma
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> Derivative(t);
t
> IsDifferentialLaurentSeriesRing(S);
true
> RelativePrecision(S);
20
> RelativePrecision(UnderlyingRing(S));
20;
> V<w>:=DifferentialLaurentSeriesRing(Rationals():Precision:=30);
> RelativePrecision(V);
30
> RelativePrecision(V) eq RelativePrecision(UnderlyingRing(V));
true
```

<a id="example-ex-617005"></a>
### `Example: Relative Precision of a Derivation (ex-617005)`

```magma
> S<t> := DifferentialLaurentSeriesRing(Rationals());
> RelativePrecisionOfDerivation(S);
Infinity
> V<w> := ChangeDerivation(S,t+O(t^6));
> Derivation(V)(w);
w^2 + O(w^7)
> RelativePrecisionOfDerivation(V);
5
```

<a id="function-changeprecision-rngdiff-rngelt"></a>
### `ChangePrecision(F, p): RngDiff, RngElt -> RngDiff, Map`

Returns the differential series ring isomorphic to $F$ with relative precision $p$. The map returned is the induced map of $F$ to the new field.

<a id="example-ex-d18d60"></a>
### `Example: Changing the Precision of a Series Ring (ex-d18d60)`

```magma
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> RelativePrecision(S);
20
> V<w>,mp :=  ChangePrecision(S,10);
> Type(V);
RngDiff
> IsDifferentialLaurentSeriesRing(V);
true
> RelativePrecision(V);
10
> RelativePrecision(1/(w-1)) eq 10;
true
> mp(t) eq w;
true
> w@@mp eq t;
true
> derivt := Derivation(S)(t);
> derivt;
t
> derivw := Derivation(V)(w);
> derivw;
w
> mp(derivt) eq Derivation(V)(w);
true
```
