---
title: "Predicates"
canonical: "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/preds.html"
source: "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/preds.md"
part: "Local Fields"
chapter: "Algebraic Power Series Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Local Fields", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/index-local-fields.md"}
  - {"title": "Algebraic Power Series Rings", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/index-algebraic-power-series-rings.md"}
prev: {"title": "Arithmetic", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/arith.md"}
next: {"title": "Modifiers", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/mods.md"}
intrinsics:
  - {"name": "IsZero", "signature": "IsZero(s): RngPowAlgElt -> BoolElt"}
  - {"name": "eq", "signature": "s eq t: RngPowAlgElt, RngPowAlgElt -> BoolElt"}
  - {"name": "IsPolynomial", "signature": "IsPolynomial(s): RngPowAlgElt -> BoolElt, RngMPolElt"}
examples:
  - "ex-e6b227"
---

# Predicates

The following functions provide decision algorithms for algebraic power series. They may involve **recursive resultant computations**, hence, have a high complexity and should be used with care.

<a id="function-rpa-zer"></a>
## `IsZero(s): RngPowAlgElt -> BoolElt`

Decides if the series is zero.

<a id="operation-op-eq-rngpowalgelt-rngpowalgelt"></a>
## `s eq t: RngPowAlgElt, RngPowAlgElt -> BoolElt`

Decides if two series are equal.

<a id="function-rpa-isp"></a>
## `IsPolynomial(s): RngPowAlgElt -> BoolElt, RngMPolElt`

Decides whether the series is actually a polynomial (with integral exponents) in the multivariate polynomial domain as returned by `Domain(s)`. In the positive case also returns that polynomial. This function relies on [`SimplifyRep`](https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/mods.md#function-rpa-simp).

<a id="example-ex-e6b227"></a>
## `Example: Testing Whether a Series Is Polynomial (ex-e6b227)`

The previous computations suggest that `h2` is $1$, in particular it is polynomial (in contrast to `h1`). In this case `h3` would be zero.

```magma
> IsPolynomial(h1);
false
> IsPolynomial(h2);
true 1
> IsEqual(h2, PolyToSeries(One(Qxy)));
true
> IsZero(h3);
true
```
