---
title: "Element Operations"
canonical: "https://docs.magma-maths.org/v2.30-1/LocalFields/GaloisRings/operation-element.html"
source: "https://docs.magma-maths.org/v2.30-1/LocalFields/GaloisRings/operation-element.md"
part: "Local Fields"
chapter: "Galois 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": "Galois Rings", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/GaloisRings/index-galois-rings.md"}
prev: {"title": "Structure Operations", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/GaloisRings/operation.md"}
next: {"title": "Newton Polygons", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/NewtonPolygons/index-newton-polygons.md"}
intrinsics:
  - {"name": "+", "signature": "+ a: RngGalElt -> RngGalElt"}
  - {"name": "-", "signature": "- a: RngGalElt -> RngGalElt"}
  - {"name": "+", "signature": "a + b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "-", "signature": "a - b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "*", "signature": "a * b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "^", "signature": "a ^ k: RngGalElt, RngIntElt -> RngGalElt"}
  - {"name": "+:=", "signature": "a +:= b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "-:=", "signature": "a -:= b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "*:=", "signature": "a *:= b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "div", "signature": "a div b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "mod", "signature": "a mod b: RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "Quotrem", "signature": "Quotrem(a, b): RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "GCD", "signature": "GCD(a, b): RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "LCM", "signature": "LCM(a, b): RngGalElt, RngGalElt -> RngGalElt"}
  - {"name": "XGCD", "signature": "XGCD(a, b): RngGalElt, RngGalElt -> RngGalElt, RngGalElt, RngGalElt"}
  - {"name": "eq", "signature": "a eq b: RngGalElt, RngGalElt -> BoolElt"}
  - {"name": "ne", "signature": "a ne b: RngGalElt, RngGalElt -> BoolElt"}
  - {"name": "in", "signature": "a in R: RngGalElt, Rng -> BoolElt"}
  - {"name": "notin", "signature": "a notin R: RngGalElt, Rng -> BoolElt"}
  - {"name": "Parent", "signature": "Parent(a): RngGalElt -> RngGal"}
  - {"name": "Category", "signature": "Category(a): RngGalElt -> Cat"}
  - {"name": "IsZero", "signature": "IsZero(a): RngGalElt -> BoolElt"}
  - {"name": "IsOne", "signature": "IsOne(a): RngGalElt -> BoolElt"}
  - {"name": "IsMinusOne", "signature": "IsMinusOne(a): RngGalElt -> BoolElt"}
  - {"name": "IsNilpotent", "signature": "IsNilpotent(a): RngGalElt -> BoolElt"}
  - {"name": "IsIdempotent", "signature": "IsIdempotent(a): RngGalElt -> BoolElt"}
  - {"name": "IsUnit", "signature": "IsUnit(a): RngGalElt -> BoolElt"}
  - {"name": "IsZeroDivisor", "signature": "IsZeroDivisor(a): RngGalElt -> BoolElt"}
examples:
  - "ex-6cf97d"
---

# Element Operations

See also Section [Generic Element Functions](https://docs.magma-maths.org/v2.30-1/BasicRings/IntroductionToRings/element.md#rngintro-elt-funcs).

## Arithmetic Operators

<a id="operation-operation-rnggalelt-rnggalelt"></a>
### `+ a: RngGalElt -> RngGalElt`

<a id="operation-operation-rnggalelt-rnggalelt-2"></a>
### `- a: RngGalElt -> RngGalElt`

<a id="operation-op-plus-rnggalelt-rnggalelt"></a>
### `a + b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-op-minus-rnggalelt-rnggalelt"></a>
### `a - b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-op-times-rnggalelt-rnggalelt"></a>
### `a * b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-op-pow-rnggalelt-rngintelt"></a>
### `a ^ k: RngGalElt, RngIntElt -> RngGalElt`

<a id="operation-operation-rnggalelt-rnggalelt-rnggalelt"></a>
### `a +:= b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-operation-rnggalelt-rnggalelt-rnggalelt-2"></a>
### `a -:= b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-operation-rnggalelt-rnggalelt-rnggalelt-3"></a>
### `a *:= b: RngGalElt, RngGalElt -> RngGalElt`

## Euclidean Operations

<a id="operation-operation-div-rnggalelt-rnggalelt-rnggalelt"></a>
### `a div b: RngGalElt, RngGalElt -> RngGalElt`

<a id="operation-operation-mod-rnggalelt-rnggalelt-rnggalelt"></a>
### `a mod b: RngGalElt, RngGalElt -> RngGalElt`

<a id="function-quotrem-rnggalelt-rnggalelt"></a>
### `Quotrem(a, b): RngGalElt, RngGalElt -> RngGalElt`

<a id="function-gcd-rnggalelt-rnggalelt"></a>
### `GCD(a, b): RngGalElt, RngGalElt -> RngGalElt`

<a id="function-lcm-rnggalelt-rnggalelt"></a>
### `LCM(a, b): RngGalElt, RngGalElt -> RngGalElt`

<a id="function-xgcd-rnggalelt-rnggalelt"></a>
### `XGCD(a, b): RngGalElt, RngGalElt -> RngGalElt, RngGalElt, RngGalElt`

## Equality and Membership

<a id="operation-op-eq-rnggalelt-rnggalelt"></a>
### `a eq b: RngGalElt, RngGalElt -> BoolElt`

<a id="operation-op-ne-rnggalelt-rnggalelt"></a>
### `a ne b: RngGalElt, RngGalElt -> BoolElt`

<a id="operation-op-in-rnggalelt-rng"></a>
### `a in R: RngGalElt, Rng -> BoolElt`

<a id="operation-op-notin-rnggalelt-rng"></a>
### `a notin R: RngGalElt, Rng -> BoolElt`

## Parent and Category

<a id="function-parent-rnggalelt"></a>
### `Parent(a): RngGalElt -> RngGal`

<a id="function-category-rnggalelt"></a>
### `Category(a): RngGalElt -> Cat`

## Predicates on Ring Elements

<a id="function-iszero-rnggalelt"></a>
### `IsZero(a): RngGalElt -> BoolElt`

<a id="function-isone-rnggalelt"></a>
### `IsOne(a): RngGalElt -> BoolElt`

<a id="function-isminusone-rnggalelt"></a>
### `IsMinusOne(a): RngGalElt -> BoolElt`

<a id="function-isnilpotent-rnggalelt"></a>
### `IsNilpotent(a): RngGalElt -> BoolElt`

<a id="function-isidempotent-rnggalelt"></a>
### `IsIdempotent(a): RngGalElt -> BoolElt`

<a id="function-isunit-rnggalelt"></a>
### `IsUnit(a): RngGalElt -> BoolElt`

<a id="function-iszerodivisor-rnggalelt"></a>
### `IsZeroDivisor(a): RngGalElt -> BoolElt`

<a id="example-ex-6cf97d"></a>
### `Example: Groebner Bases over Galois Rings (ex-6cf97d)`

This simple example shows how one can compute Gröbner bases over Galois rings. We create an ideal in 3 variables over a Galois ring and compute its Gröbner basis.

```magma
> R<w> := GaloisRing(3, 3, 2);
> #R;
729
> P<x,y,z> := PolynomialRing(R, 3);
> I := ideal<P | [x^2 - w*y, 3*y^3 - 3*w*x*z, 9*z^5 - 9*w]>;
> GroebnerBasis(I);
[
    x^2 + 26*w*y,
    3*x*y^3 + (6*w + 6)*y*z,
    3*x*z + (15*w + 3)*y^3,
    9*x + (9*w + 9)*y^3*z^4,
    3*y^6 + (21*w + 15)*y*z^2,
    9*z^5 + 18*w
]
```

Notice that the leading coefficients include 3 and 9, which are not units in the ring. See Chapter [Gröbner Bases](https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/GrobnerBases/index-grobner-bases.md#chapgb) for much more information on such Gröbner bases.
