---
title: "Operations on Ideals"
canonical: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/ideal-operation.html"
source: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/ideal-operation.md"
part: "Commutative Algebra"
chapter: "Local Polynomial 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": "Local Polynomial Rings", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/index-local-polynomial-rings.md"}
prev: {"title": "Standard Bases", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/groebner.md"}
next: {"title": "Changing Coefficient Ring", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/change-ring.md"}
intrinsics:
  - {"name": "+", "signature": "I + J: RngMPolLoc, RngMPolLoc -> RngMPolLoc"}
  - {"name": "*", "signature": "I * J: RngMPolLoc, RngMPolLoc -> RngMPolLoc"}
  - {"name": "^", "signature": "I ^ k: RngMPolLoc, RngIntElt -> RngMPolLoc"}
  - {"name": "QuotientDimension", "signature": "QuotientDimension(I): RngMPol -> RngIntElt"}
  - {"name": "Generic", "signature": "Generic(I): RngMPolLoc -> RngMPolLoc"}
  - {"name": "LeadingMonomialIdeal", "signature": "LeadingMonomialIdeal(I): RngMPolLoc -> RngMPolLoc"}
  - {"name": "meet", "signature": "I meet J: RngMPolLoc, RngMPolLoc -> RngMPolLoc"}
  - {"name": "&meet", "signature": "&meet S: [ RngMPolLoc ] -> RngMPolLoc"}
  - {"name": "eq", "signature": "I eq J: RngMPolLoc, RngMPolLoc -> BoolElt"}
  - {"name": "ne", "signature": "I ne J: RngMPolLoc, RngMPolLoc -> BoolElt"}
  - {"name": "notsubset", "signature": "I notsubset J: RngMPolLoc, RngMPolLoc -> BoolElt"}
  - {"name": "subset", "signature": "I subset J: RngMPolLoc, RngMPolLoc -> BoolElt"}
  - {"name": "IsZero", "signature": "IsZero(I): RngMPolLoc -> BoolElt"}
  - {"name": "IsProper", "signature": "IsProper(I): RngMPolLoc -> BoolElt"}
  - {"name": "IsZeroDimensional", "signature": "IsZeroDimensional(I): RngMPolLoc -> BoolElt"}
  - {"name": "in", "signature": "f in I: RngMPolLocElt, RngMPolLoc -> BoolElt"}
  - {"name": "NormalForm", "signature": "NormalForm(f, I): RngMPolLocElt, RngMPolLoc -> RngMPolLocElt"}
  - {"name": "notin", "signature": "f notin I: RngMPolLocElt, RngMPolLoc -> BoolElt"}
examples:
  - "ex-b95527"
  - "ex-e2cb48"
---

# Operations on Ideals

In the following, note that since ideals of a full polynomial ring $P$ are regarded as subrings of $P$, the ring $P$ itself is a valid ideal as well (the ideal containing 1).

## Basic Operations

<a id="operation-op-plus-rngmpolloc-rngmpolloc"></a>
### `I + J: RngMPolLoc, RngMPolLoc -> RngMPolLoc`

Given ideals $I$ and $J$ of the same polynomial ring $P$, return the sum of $I$ and $J$, which is the ideal generated by the generators of $I$ and those of $J$.

<a id="operation-op-times-rngmpolloc-rngmpolloc"></a>
### `I * J: RngMPolLoc, RngMPolLoc -> RngMPolLoc`

Given ideals $I$ and $J$ of the same polynomial ring $P$, return the product of $I$ and $J$, which is the ideal generated by the products of the generators of $I$ and those of $J$.

<a id="operation-op-pow-rngmpolloc-rngintelt"></a>
### `I ^ k: RngMPolLoc, RngIntElt -> RngMPolLoc`

Given an ideal $I$ of the polynomial ring $P$, and an integer $k$, return the $k$-th power of $I$.

<a id="function-quotientdimension-rngmpol"></a>
### `QuotientDimension(I): RngMPol -> RngIntElt`

Given an ideal $I$ of a local polynomial ring $R$ over a field $K$, return the dimension of $P/I$ as a $K$-vector space. Note that this is quite different from the function [`Dimension`](https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/LocalPolynomialRings/dimension.md#function-rngmpolloc-dimension) below (which returns the Krull dimension of an ideal).

<a id="function-generic-rngmpolloc"></a>
### `Generic(I): RngMPolLoc -> RngMPolLoc`

Given an ideal $I$ of a generic local polynomial ring $R$, return $R$.

<a id="function-leadingmonomialideal-rngmpolloc"></a>
### `LeadingMonomialIdeal(I): RngMPolLoc -> RngMPolLoc`

Given an ideal $I$, return the leading monomial ideal of $I$; that is, the ideal generated by all the leading monomials of I.

<a id="operation-op-meet-rngmpolloc-rngmpolloc"></a>
### `I meet J: RngMPolLoc, RngMPolLoc -> RngMPolLoc`

Given ideals $I$ and $J$ of the same polynomial ring $P$, return the intersection of $I$ and $J$.

<a id="operation-operation-meet-rngmpolloc-rngmpolloc"></a>
### `&meet S: [ RngMPolLoc ] -> RngMPolLoc`

Given a set or sequence $S$ of ideals of the same local polynomial ring $R$, return the intersection of all the ideals of $S$.

## Ideal Predicates

<a id="operation-op-eq-rngmpolloc-rngmpolloc"></a>
### `I eq J: RngMPolLoc, RngMPolLoc -> BoolElt`

Given two ideals $I$ and $J$ of the same polynomial ring $P$, return whether $I$ and $J$ are equal.

<a id="operation-op-ne-rngmpolloc-rngmpolloc"></a>
### `I ne J: RngMPolLoc, RngMPolLoc -> BoolElt`

Given two ideals $I$ and $J$ of the same polynomial ring $P$, return whether $I$ and $J$ are not equal.

<a id="operation-operation-notsubset-rngmpolloc-rngmpolloc-boolelt"></a>
### `I notsubset J: RngMPolLoc, RngMPolLoc -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $P$ return whether $I$ is not contained in $J$.

<a id="operation-op-subset-rngmpolloc-rngmpolloc"></a>
### `I subset J: RngMPolLoc, RngMPolLoc -> BoolElt`

Given two ideals $I$ and $J$ in the same polynomial ring $P$ return whether $I$ is contained in $J$.

<a id="function-iszero-rngmpolloc"></a>
### `IsZero(I): RngMPolLoc -> BoolElt`

Given an ideal $I$ of the local polynomial ring $R$, return whether $I$ is the zero ideal (contains zero alone).

<a id="function-isproper-rngmpolloc"></a>
### `IsProper(I): RngMPolLoc -> BoolElt`

Given an ideal $I$ of the local polynomial ring $R$, return whether $I$ is proper; that is, whether $I$ is strictly contained in $R$ (or whether the standard basis of $I$ does not contain 1 alone).

<a id="function-iszerodimensional-rngmpolloc"></a>
### `IsZeroDimensional(I): RngMPolLoc -> BoolElt`

Given an ideal $I$ of the local polynomial ring $R$, return whether $I$ is zero-dimensional (so the quotient of $P$ by $I$ has non-zero finite dimension as a vector space over the coefficient field – see the section on dimension for further details). Note that the ring $R$ has dimension $-1$, so it is not zero-dimensional.

<a id="example-ex-b95527"></a>
### `Example: Ideal Arithmetic in a Local Ring (ex-b95527)`

We construct some ideals in ${\mathbb{Q}}[x, y, z]$ and perform basic arithmetic on them.

```magma
> R<x,y,z> := LocalPolynomialRing(RationalField(), 3);
> I := ideal<R | x*y - z, x^3*z^2 - y^2, x*z^3 - x - y>;
> J := ideal<R | x*y - z, x^2*z - y, x*z^3 - x - y>;
> A := I * J;
> _ := StandardBasis(A);
> A;
Ideal of Localization of Polynomial Ring of rank 3 over Rational Field
Order: Local Lexicographical
Variables: x, y, z
Inhomogeneous, Dimension 0
Standard basis:
[
    x^2 - y^2 + 2*x^3*z,
    x*y + y^2 - x^3*z,
    y^3,
    x*z + y*z,
    y*z,
    z^2
]
> M := I meet J;
> M;
Ideal of Localization of Polynomial Ring of rank 3 over Rational Field
Order: Local Lexicographical
Variables: x, y, z
Homogeneous
Basis:
[
    x + y,
    y^2,
    z
]
> A eq M;
false
> A subset M;
true
```

## Operations on Elements of Ideals

<a id="operation-op-in-rngmpollocelt-rngmpolloc"></a>
### `f in I: RngMPolLocElt, RngMPolLoc -> BoolElt`

Given a polynomial $f$ from a local polynomial ring $R$, together with an ideal $I$ of $R$, return whether $f$ is in $I$.

<a id="function-normalform-rngmpollocelt-rngmpolloc"></a>
### `NormalForm(f, I): RngMPolLocElt, RngMPolLoc -> RngMPolLocElt`

Given a polynomial $f$ from a local polynomial ring $R$, together with an ideal $I$ of $R$, return a normal form of $f$ with respect to (the standard basis of) $I$. The normal form of $f$ is zero if and only if $f$ is in $I$.

<a id="operation-op-notin-rngmpollocelt-rngmpolloc"></a>
### `f notin I: RngMPolLocElt, RngMPolLoc -> BoolElt`

Given a polynomial $f$ from a polynomial ring $P$, together with an ideal $I$ of $P$, return whether $f$ is not in $I$.

<a id="example-ex-e2cb48"></a>
### `Example: Element Operations with Local Ideals (ex-e2cb48)`

We demonstrate the element operations with respect to an ideal of the localization of ${\mathbb{Q}}[x, y, z]$.

```magma
> R<x,y,z> := LocalPolynomialRing(RationalField(), 3);
> I := ideal<R | (x + y)^3, (y - z)^2, y^2*z + z>;
> NormalForm(y^2*z + z, I);
0
> NormalForm(x^3, I);
-3*x^2*y
> x + y in I;
false
```
