# 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`.

## `Ideal(I): OMIdl -> RngOrdIdl`

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

## `OMRepresentation(I): RngFunOrdIdl -> OMIdl`

## `OMRepresentation(I): RngOrdFracIdl -> OMIdl`

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

## `OMRepresentation(L, S): FldArith, [FldArithElt] -> OMIdl`

## `OMRepresentation(L, a): FldArith, FldArithElt -> OMIdl`

## `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.

## `Example: Om Rep Ideal (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

### `I + J: OMIdl, OMIdl -> OMIdl`

### `I * J: OMIdl, OMIdl -> OMIdl`

### `I / J: OMIdl, OMIdl -> OMIdl`

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

### `I ^ n: OMIdl, RngIntElt -> OMIdl`

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

### `Example: Om Ideal Arith (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

### `IsOne(I): OMIdl -> BoolElt`

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

### `IsZero(I): OMIdl -> BoolElt`

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

### `I eq J: OMIdl, OMIdl -> BoolElt`

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

### `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.

### `I subset J: OMIdl, OMIdl -> BoolElt`

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

### `IsPrime(I): OMIdl -> BoolElt`

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

### `IsIntegral(I): OMIdl -> BoolElt`

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