# Changing Related Structures

Sometimes whilst working with a differential ring $R$, one might wish to consider the same ring, but with a different derivation or with a larger constant ring. It is a consequence of the creation of a differential ring, that its constant ring may actually be smaller than its differential ring of constants.

To alter the settings defined by the creation of a differential ring or field the following functions are available.

## `ChangeDerivation(R, f): RngDiff, RngElt -> RngDiff, Map`

Returns a differential ring isomorphic to $R$, but whose derivation is the map $f\cdot$ `Derivation(R)` induced by the isomorphism. The ring element $f$ must be non–zero. The isomorphism of $R$ to the new differential ring is also returned. The new differential ring has the same underlying ring as $R$.

## `Example: Diff Ring Change Derivation (ex-271826)`

```magma
> F<z> := RationalDifferentialField(Rationals());
> Derivative(z^2);
2*z
> K, toK := ChangeDerivation(F, z);
> K;
Differential Ring of Algebraic function field defined over Rational Field by
$.2 - 4711
with derivation given by (1/z) d(z)
> toK;
Mapping from: RngDiff: F to RngDiff: K given by a rule
> Derivative(toK(z^2));
2*z^2
> UnderlyingRing(F) eq UnderlyingRing(K);
true

```

Notice that the differential of $K$ is $(1/z) {d} (z)$, so that the derivation of $K$ is $z\cdot {d}/{d}z$, as requested.

## `ChangeDifferential(F, df): RngDiff, DiffFunElt -> RngDiff, Map`

Returns the algebraic differential field, whose underlying ring is the one of $F$, but with derivation with respect to the differential $df$. The map returned is the bijective map from $F$ into the new algebraic differential field.

## `Example: Diff Ring Change Differential (ex-7c6694)`

```magma
> F<z> := RationalDifferentialField(Rationals());
> df := Differential(1/z);
> df in DifferentialSpace(UnderlyingRing(F));
true
> M<u>, mp := ChangeDifferential(F,df);
> IsAlgebraicDifferentialField(M);
true
> Domain(mp) eq F and Codomain(mp) eq M;
true
> Differential(M);
(-1/u^2) d(u)
> mp(z);
u
> Derivation(M)(u);
u^2
> Derivation(F)(z);
1
> dg := Differential(z^3+5);
> N<v>, mp := ChangeDifferential(F,dg);
> Differential(M);
(3*v^2) d(v)
> mp(z);
v
> Derivation(N)(mp(z));
1/3/v^2

```

## `ConstantFieldExtension(F, C): RngDiff, Fld -> RngDiff, Map`

Returns the differential field isomorphic to the differential field $F$, but whose constant field is the extension $C$, and the isomorphism from $F$ to the new field. The differential field $F$ must be an algebraic function field.

## `Example: Diff Ring Constant Field Extension (ex-17cbbe)`

```magma
> F<z> := RationalDifferentialField(Rationals());
> _<X> := PolynomialRing(F);
> M := ext< F | X^2-2 >;
> ConstantField(M);
Rational Field
> _<x>:=PolynomialRing(Rationals());
> C := NumberField(x^2-2);
> Mext, toMext := ConstantFieldExtension(M, C);
> ConstantField(Mext);
Number Field with defining polynomial x^2 - 2 over the Rational Field
> toMext;
Mapping from: RngDiff: M to RngDiff: Mext given by a rule

```

## `Example: Diff Ring Constant Field Extension Series (ex-a878b1)`

```magma
> S<t>:=DifferentialLaurentSeriesRing(Rationals());
> P<T> := PolynomialRing(Rationals());
> Cext := ext<Rationals()|T^2+1>;
> Sext<text>, mp := ConstantFieldExtension(S,Cext);
> IsDifferentialLaurentSeriesRing(Sext);
true
> ConstantRing(Sext) eq Cext;
true
> Derivative(text^(-2)+7+2*text^3+O(text^6));
-2*text^-2 + 6*text^3 + O(text^6);
> mp;
Mapping from: RngDiff: S to RngDiff: Sext given by a rule
> mp(t);
text

```

## `Completion(F, p): RngDiff, PlcFunElt -> RngDiff, Map`

```magma
Precision: RngIntElt                    Default: Infinity()
```

The completion of the differential field $F$ with respect to the place $p$. The place $p$ should be an element of the set of places of $F$. The derivation of the completion is the one naturally induced by the derivation of $F$. The map returned is the embedding of $F$ into the completion. Upon creation one can set the precision by using `Precision`. If no precision is given, then a default value is taken.

## `Example: Diff Ring Completion Create (ex-5fcb44)`

This example illustrates the creation of the differential Laurent series ring by using the command `Completion`.

```magma
> F<z> := RationalDifferentialField(Rationals());
> pl := Zeros(z)[1];
> S<t>, mp := Completion(F,pl: Precision := 5);
> IsDifferentialLaurentSeriesRing(S);
true
> mp;
Mapping from: RngDiff: F to RngDiff: S given by a rule
> Domain(mp) eq F, Codomain(mp) eq S;
true true
> Derivation(S)(t);
1
> 1/(1-t);
1 + t + t^2 + t^3 + t^4 + O(t^5)

```

## `Example: Diff Ring Completion Elliptic (ex-512dde)`

This example shows that one does not have to restrict to differential fields of genus $0$ to use `Completion`.

```magma
> F<z> := RationalDifferentialField(Rationals());
> P<Y> := PolynomialRing(F);
> K<y> := ext<F|Y^2-z^3+z+1>;
> Genus(UnderlyingRing(K));
1
> pl:=Zeros(K!z)[1];
> Degree(pl);
2
> S<t>, mp := Completion(K,pl);
> IsDifferentialLaurentSeriesRing(S);
true
> C<c> := ConstantRing(S);
> C;
Number Field with defining polynomial $.1^2 + 1 over the Rational Field
> mp(y) + O(t^4);
c - t - 4*t^3 + O(t^4)

```
