---
title: "Ideals in OM Representation"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/ideal-rep.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/ideal-rep.md"
part: "Global Fields"
chapter: "Algebraic Function Fields"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Global Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/index-global-fields.md"}
  - {"title": "Algebraic Function Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/index-algebraic-function-fields.md"}
prev: {"title": "The Montes Algorithm", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/montes.md"}
next: {"title": "Ideal Operations", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/ideal-op.md"}
intrinsics:
  - {"name": "Ideal", "signature": "Ideal(I): OMIdl -> RngOrdIdl"}
  - {"name": "OMRepresentation", "signature": "OMRepresentation(I): RngFunOrdIdl -> OMIdl"}
  - {"name": "OMRepresentation", "signature": "OMRepresentation(I): RngOrdFracIdl -> OMIdl"}
  - {"name": "OMRepresentation", "signature": "OMRepresentation(L, S): FldArith, [FldArithElt] -> OMIdl"}
  - {"name": "OMRepresentation", "signature": "OMRepresentation(L, a): FldArith, FldArithElt -> OMIdl"}
  - {"name": "OMRepresentation", "signature": "OMRepresentation(L, a): FldArith, RngElt -> OMIdl"}
  - {"name": "+", "signature": "I + J: OMIdl, OMIdl -> OMIdl"}
  - {"name": "*", "signature": "I * J: OMIdl, OMIdl -> OMIdl"}
  - {"name": "/", "signature": "I / J: OMIdl, OMIdl -> OMIdl"}
  - {"name": "^", "signature": "I ^ n: OMIdl, RngIntElt -> OMIdl"}
  - {"name": "IsOne", "signature": "IsOne(I): OMIdl -> BoolElt"}
  - {"name": "IsZero", "signature": "IsZero(I): OMIdl -> BoolElt"}
  - {"name": "eq", "signature": "I eq J: OMIdl, OMIdl -> BoolElt"}
  - {"name": "in", "signature": "a in I: RngElt, OMIdl -> BoolElt"}
  - {"name": "subset", "signature": "I subset J: OMIdl, OMIdl -> BoolElt"}
  - {"name": "IsPrime", "signature": "IsPrime(I): OMIdl -> BoolElt"}
  - {"name": "IsIntegral", "signature": "IsIntegral(I): OMIdl -> BoolElt"}
examples:
  - "ex-c49fbd"
  - "ex-0a493e"
---

# Ideals in OM Representation

Ideals of type `RngFunOrdIdl` can have an OM representation computed from them. Similarly ideals constructed from the Montes algorithm in OM representation can be converted into ideals of type `RngFunOrdIdl`.

<a id="function-ideal-omidl"></a>
## `Ideal(I): OMIdl -> RngOrdIdl`

Translates ideal $I$ in OM representation into a Magma representation.

<a id="function-omrepresentation-rngfunordidl"></a>
## `OMRepresentation(I): RngFunOrdIdl -> OMIdl`

<a id="function-omrepresentation-rngordfracidl"></a>
## `OMRepresentation(I): RngOrdFracIdl -> OMIdl`

Computes the OM representation of the ideal $I$ in a function field.

<a id="function-omrepresentation-fldarith-fldarithelt"></a>
## `OMRepresentation(L, S): FldArith, [FldArithElt] -> OMIdl`

<a id="function-omrepresentation-fldarith-fldarithelt-2"></a>
## `OMRepresentation(L, a): FldArith, FldArithElt -> OMIdl`

<a id="function-omrepresentation-fldarith-rngelt"></a>
## `OMRepresentation(L, a): FldArith, RngElt -> OMIdl`

Given a function field $L$ and an element $a$ or sequence $S$ of elements in $L$, construct, in OM representation, the ideal generated by these elements.

<a id="example-ex-c49fbd"></a>
## `Example: Converting OM Prime Ideals to Ideals (ex-c49fbd)`

```magma
> F<t> := FunctionField(Rationals());
> P<x> := PolynomialRing(F);
> L<a> := ext<F | x^2 + t>;
> Montes(L, Numerator(t + 1));
> Ideal(L`PrimeIdeals[t+1][1]);
Prime Ideal of Maximal Equation Order of L over Univariate Polynomial Ring in t
over Rational Field
Generators:
t + 1
a - 1
> OMRepresentation(L, [t^2 + 6*t + 5, (t + 5)*a + t + 5]);
OM ideal of the field Algebraic function field defined over Univariate rational
function field over Rational Field by
x^2 + t
generated by [
t^2 + 6*t + 5,
(t + 5)*a + t + 5
]

> Ideal($1);
Ideal of Maximal Equation Order of L over Univariate Polynomial Ring in t over
Rational Field
Generators:
t^2 + 6*t + 5
(-1/32*t^3 - 9/32*t^2 - 15/32*t + 25/32)*a + 1/32*t^3 + 5/32*t^2 + 7/32*t +
    35/32
```

## Ideal Arithmetic

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

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

<a id="operation-op-div-omidl-omidl"></a>
### `I / J: OMIdl, OMIdl -> OMIdl`

The sum, product or quotient of ideals $I$ and $J$ in OM representation.

<a id="operation-op-pow-omidl-rngintelt"></a>
### `I ^ n: OMIdl, RngIntElt -> OMIdl`

The $n$-th power of the ideal $I$ in OM representation.

<a id="example-ex-0a493e"></a>
### `Example: Arithmetic of OM Ideals (ex-0a493e)`

```magma
> k := GF(13);
> A<t> := PolynomialRing(k);
> Ax<x> := PolynomialRing(A);
> f := x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 +
>     (t^3 + 3*t^2 + 3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t;
> L := FunctionField(f);
> I := OMRepresentation(L,L.1+1);
> I;
OM ideal of the field Algebraic function field defined over Univariate rational
function field over GF(13) by
x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 + (t^3 + 3*t^2 +
3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t
generated by [
$.1 + 1
]

> Montes(L, t + 1);
> P := L`PrimeIdeals[t+1, 1];
>      J := P^-2;
> I*J;
OM ideal of the field Algebraic function field defined over Univariate rational
function field over GF(13) by
x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 + (t^3 + 3*t^2 +
3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t
having the factorization [
<t + 1, 1, -2>,
<t^4 + 10*t^3 + 4*t^2 + t + 7, 1, 1>
]

>  I^2;
OM ideal of the field Algebraic function field defined over Univariate rational
function field over GF(13) by
x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 + (t^3 + 3*t^2 +
3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t
having the factorization [
<t^4 + 10*t^3 + 4*t^2 + t + 7, 1, 2>
]

> I/J;
OM ideal of the field Algebraic function field defined over Univariate rational
function field over GF(13) by
x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 + (t^3 + 3*t^2 +
3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t
having the factorization [
<t + 1, 1, 2>,
<t^4 + 10*t^3 + 4*t^2 + t + 7, 1, 1>
]

> I+J;
OM ideal of the field Algebraic function field defined over Univariate rational
function field over GF(13) by
x^5 + (t^2 + 2*t + 1)*x^4 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x^3 + (t^3 + 3*t^2 +
3*t + 1)*x^2 + (t^4 + 4*t^3 + 6*t^2 + 4*t + 1)*x + t
having the factorization  []
generated by [
1,
0
]
```

## Ideal Predicates

<a id="function-isone-omidl"></a>
### `IsOne(I): OMIdl -> BoolElt`

Given an ideal $I$ in OM representation returns whether the ideal is generated by the $1$ element of the field.

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

Given an ideal $I$ in OM representation returns whether the ideal contains only the $0$ element of the field.

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

Given two ideals $I$ and $J$ in OM representation returns whether these ideals are the same.

<a id="operation-op-in-rngelt-omidl"></a>
### `a in I: RngElt, OMIdl -> BoolElt`

Given an element $a$ coercible into the field containing the ideal $I$ in OM representation return whether $a$ is contained in the ideal.

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

Given two ideals $I$ and $J$ in OM representation returns whether $I$ is contained in $J$.

<a id="function-isprime-omidl"></a>
### `IsPrime(I): OMIdl -> BoolElt`

Given an ideal $I$ in OM representation returns whether only the $1$ ideal and $I$ contain $I$.

<a id="function-isintegral-omidl"></a>
### `IsIntegral(I): OMIdl -> BoolElt`

Given an ideal $I$ in OM representation returns whether all elements in the ideal $I$ are integral.
