# Newton Polygons

The Newton polygon of a differential operator $L$ and its Newton polynomials can be used to factorize $L$. A classical example of the Newton polygon uses the derivation $z\cdot d/dz$, where $z$ is a generator of the basefield of $L$. This Newton polygon is known as *the* Newton polygon of $L$. Its definition, as used in Magma, is given in $\S 3$ of [[van Hoeij, 1997](../../references.md#cite-vh97)] and is applicable to operators over a Laurent series ring with generator $z$, as well as to operators over fields for which a set of places exist. For fields in the latter category it is however not necessary to restrict to the derivation $z\cdot d/dz$ based at $z=0$ (in other words: at the place $(z)$). More generally, the Newton polygon of $L$ at the place $(p)$ is the Newton polygon at $t=0$ after rewriting $L$ as a differential operator $\tilde{L}$ in a local parameter $t$ of $(p)$, such that derivation of $\tilde{L}$ is of the form $t\cdot d/dt$.

## `NewtonPolygon(L): RngDiffOpElt -> NwtnPgon, RingDiffOpElt`

Returns the Newton Polygon of the differential operator $L$ over a differential Laurent series ring. This means that for the computation of the Newton polygon $L$ may have had to be rewritten as a differential operator $\tilde{L}$ over a differential Laurent series ring $C((t))$, say, such that $\tilde{L}$ has derivation $t\cdot d/dt$. The second argument returned is the operator $\tilde{L}$.

## `NewtonPolygon(L, p): RngDiffOpElt, PlcFunElt -> NwtnPgon, RingDiffOpElt`

Returns the Newton polygon of the differential operator $L$ at the place $p$. The derivation of $L$ must be defined with respect to a differential and the base ring of $L$ should have one generator. For the computation of the Newton polygon another differential operator $\tilde{L}$, say, may have had to be calculated. The differential of the derivation of $\tilde{L}$ has valuation $-1$ at the place $p$. The differential operator $\tilde{L}$ is also returned.

## `NewtonPolynomial(F): NwtnPgonFace -> RngUPolElt`

Returns the Newton polynomial of the face $F$ of a Newton polygon. The Newton polygon must have been created with respect to a differential operator. The Newton polynomial depends on a uniformizing element, therefore, its variable is well–defined up to scalar multiplication by a non–zero element. The definition of the Newton polynomial of a face that is used by Magma, is given in Section $3$ of [[van Hoeij, 1997](../../references.md#cite-vh97)].

## `NewtonPolynomials(L): RngDiffOpElt -> SeqEnum, SeqEnum`

Returns all Newton polynomials of $L$ with respect to the faces of its Newton polygon. The second argument returned is the corresponding slopes.

## `Example Newton Pgns 1 (ex-893538)`

```magma
> K := RationalDifferentialField(Rationals());
> F<z> := ChangeDerivation(K, K.1);
> Differential(F);
(1/z) d(z)
> R<D> := DifferentialOperatorRing(F);
> L := 10*z*D^2+3*D-1;
> npgon, op := NewtonPolygon(L, Zeros(z)[1]);
> npgon;
Newton Polygon of 10*z*$.1^2 + 3*$.1 - 1 over Algebraic function field
defined over Rational Field by
$.2 - 4711 at (z)
> op;
10*z*D^2 + 3*D + -1
> faces:= Faces(npgon);
> faces;
[ <0, 1, 0>, <-1, 1, -1> ]
> _<T> := PolynomialRing(Rationals());
> NewtonPolynomial(faces[1]);
3*T - 1
> NewtonPolynomial(faces[2]);
10*T + 3

```

## `Example Newton Pgns 2 (ex-692056)`

```magma
> F<z> := RationalDifferentialField(Rationals());
> R<D> := DifferentialOperatorRing(F);
> L := D^2+z*D-3*z^2;
> npgon, op := NewtonPolygon(L, Zeros(1/z)[1]);
> op;
1/z^2*$.1^2 + (-z^2 + 1)/z^2*$.1 + -3*z^2
> Differential(Parent(op));
(-1/z) d(z)
> Valuation($1,Zeros(1/z)[1]);
-1
> faces:= Faces(npgon);
> faces;
[ <-2, 1, -2> ]
> _<T> := PolynomialRing(Rationals());
> NewtonPolynomial(faces[1]);
T^2 - T - 3

```

## `Example Newton Pgns 3 (ex-312e21)`

This example corresponds to Examples $3.46$ and $3.49.2$ from [[van der Put and Singer, 2003](../../references.md#cite-vdps03)].

```magma
> S<t> := DifferentialLaurentSeriesRing(Rationals());
> R<D> := DifferentialOperatorRing(S);
> L := t*D^2+D-1;
> npgon, op := NewtonPolygon(L);
> L eq op;
true
> Faces(npgon);
[ <0, 1, 0>, <-1, 1, -1> ]
> _<T> := PolynomialRing(Rationals());
> NewtonPolynomials(L);
[
    T - 1,
    T + 1
]
[ 0, 1 ]
> L := D^2+(1/t^2+1/t)*D+(1/t^3-2/t^2);
> npgon, op := NewtonPolygon(L);
> L eq op;
true
> NewtonPolynomials(L);
[
    T + 1,
    T + 1
]
[ 1, 2 ]

```
