# Orders of function fields: rational#

class sage.rings.function_field.order_rational.FunctionFieldMaximalOrderInfinite_rational(field, category=None)#

Maximal infinite orders of rational function fields.

INPUT:

• `field` – a rational function field

EXAMPLES:

```sage: K.<t> = FunctionField(GF(19)); K
Rational function field in t over Finite Field of size 19
sage: R = K.maximal_order_infinite(); R
Maximal infinite order of Rational function field in t over Finite Field of size 19
```
basis()#

Return the basis (=1) of the order as a module over the polynomial ring.

EXAMPLES:

```sage: K.<t> = FunctionField(GF(19))
sage: O = K.maximal_order()
sage: O.basis()
(1,)
```
gen(n=0)#

Return the `n`-th generator of self. Since there is only one generator `n` must be 0.

EXAMPLES:

```sage: O = FunctionField(QQ,'y').maximal_order()
sage: O.gen()
y
sage: O.gen(1)
Traceback (most recent call last):
...
IndexError: there is only one generator
```
ideal(*gens)#

Return the fractional ideal generated by `gens`.

INPUT:

• `gens` – elements of the function field

EXAMPLES:

```sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order_infinite()
sage: O.ideal(x)
Ideal (x) of Maximal infinite order of Rational function field in x over Rational Field
sage: O.ideal([x, 1/x]) == O.ideal(x ,1/x)  # multiple generators may be given as a list
True
sage: O.ideal(x^3 + 1, x^3 + 6)
Ideal (x^3) of Maximal infinite order of Rational function field in x over Rational Field
sage: I = O.ideal((x^2+1)*(x^3+1), (x^3+6)*(x^2+1)); I
Ideal (x^5) of Maximal infinite order of Rational function field in x over Rational Field
sage: O.ideal(I)
Ideal (x^5) of Maximal infinite order of Rational function field in x over Rational Field
```
ngens()#

Return 1 the number of generators of the order.

EXAMPLES:

```sage: FunctionField(QQ,'y').maximal_order().ngens()
1
```
prime_ideal()#

Return the unique prime ideal of the order.

EXAMPLES:

```sage: K.<t> = FunctionField(GF(19))
sage: O = K.maximal_order_infinite()
sage: O.prime_ideal()
Ideal (1/t) of Maximal infinite order of Rational function field in t
over Finite Field of size 19
```
class sage.rings.function_field.order_rational.FunctionFieldMaximalOrder_rational(field)#

Maximal orders of rational function fields.

INPUT:

• `field` – a function field

EXAMPLES:

```sage: K.<t> = FunctionField(GF(19)); K
Rational function field in t over Finite Field of size 19
sage: R = K.maximal_order(); R
Maximal order of Rational function field in t over Finite Field of size 19
```
basis()#

Return the basis (=1) of the order as a module over the polynomial ring.

EXAMPLES:

```sage: K.<t> = FunctionField(GF(19))
sage: O = K.maximal_order()
sage: O.basis()
(1,)
```
gen(n=0)#

Return the `n`-th generator of the order. Since there is only one generator `n` must be 0.

EXAMPLES:

```sage: O = FunctionField(QQ,'y').maximal_order()
sage: O.gen()
y
sage: O.gen(1)
Traceback (most recent call last):
...
IndexError: there is only one generator
```
ideal(*gens)#

Return the fractional ideal generated by `gens`.

INPUT:

• `gens` – elements of the function field

EXAMPLES:

```sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order()
sage: O.ideal(x)
Ideal (x) of Maximal order of Rational function field in x over Rational Field
sage: O.ideal([x, 1/x]) == O.ideal(x, 1/x)  # multiple generators may be given as a list
True
sage: O.ideal(x^3 + 1, x^3 + 6)
Ideal (1) of Maximal order of Rational function field in x over Rational Field
sage: I = O.ideal((x^2+1)*(x^3+1), (x^3+6)*(x^2+1)); I
Ideal (x^2 + 1) of Maximal order of Rational function field in x over Rational Field
sage: O.ideal(I)
Ideal (x^2 + 1) of Maximal order of Rational function field in x over Rational Field
```
ideal_with_gens_over_base(gens)#

Return the fractional ideal with generators `gens`.

INPUT:

• `gens` – elements of the function field

EXAMPLES:

```sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)                                                # needs sage.rings.function_field
sage: O = L.equation_order()                                                            # needs sage.rings.function_field
sage: O.ideal_with_gens_over_base([x^3 + 1, -y])                                        # needs sage.rings.function_field
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
```
ngens()#

Return 1 the number of generators of the order.

EXAMPLES:

```sage: FunctionField(QQ,'y').maximal_order().ngens()
1
```