Ideals of function fields

Ideals of an order of a function field include all fractional ideals of the order. Sage provides basic arithmetic with fractional ideals.

The fractional ideals of the maximal order of a global function field forms a multiplicative monoid. Sage allows advanced arithmetic with the fractional ideals. For example, an ideal of the maximal order can be factored into a product of prime ideals.

EXAMPLES:

Ideals in the maximal order of a rational function field:

sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order()
sage: I = O.ideal(x^3 + 1); I
Ideal (x^3 + 1) of Maximal order of Rational function field in x over Rational Field
sage: I^2
Ideal (x^6 + 2*x^3 + 1) of Maximal order of Rational function field in x over Rational Field
sage: ~I
Ideal (1/(x^3 + 1)) of Maximal order of Rational function field in x over Rational Field
sage: ~I * I
Ideal (1) of Maximal order of Rational function field in x over Rational Field
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x**Integer(3) + Integer(1)); I
Ideal (x^3 + 1) of Maximal order of Rational function field in x over Rational Field
>>> I**Integer(2)
Ideal (x^6 + 2*x^3 + 1) of Maximal order of Rational function field in x over Rational Field
>>> ~I
Ideal (1/(x^3 + 1)) of Maximal order of Rational function field in x over Rational Field
>>> ~I * I
Ideal (1) of Maximal order of Rational function field in x over Rational Field

Ideals in the equation order of an extension of a rational function field:

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: I = O.ideal(y); I                                                                                             # needs sage.rings.function_field
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
sage: I^2                                                                                                           # needs sage.rings.function_field
Ideal (x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> O = L.equation_order()                                                                                        # needs sage.rings.function_field
>>> I = O.ideal(y); I                                                                                             # needs sage.rings.function_field
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> I**Integer(2)                                                                                                           # needs sage.rings.function_field
Ideal (x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1

Ideals in the maximal order of a global function field:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3*y - x)                                                                          # needs sage.rings.function_field
sage: O = L.maximal_order()                                                                                         # needs sage.rings.function_field
sage: I = O.ideal(y)                                                                                                # needs sage.rings.function_field
sage: I^2                                                                                                           # needs sage.rings.function_field
Ideal (x) of Maximal order of Function field in y defined by y^2 + x^3*y + x
sage: ~I                                                                                                            # needs sage.rings.function_field
Ideal (1/x*y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
sage: ~I * I                                                                                                        # needs sage.rings.function_field
Ideal (1) of Maximal order of Function field in y defined by y^2 + x^3*y + x

sage: J = O.ideal(x + y) * I                                                                                        # needs sage.rings.finite_rings sage.rings.function_field
sage: J.factor()                                                                                                    # needs sage.rings.finite_rings sage.rings.function_field
(Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x)^2 *
(Ideal (x^3 + x + 1, y + x) of Maximal order of Function field in y defined by y^2 + x^3*y + x)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3)*y - x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> O = L.maximal_order()                                                                                         # needs sage.rings.function_field
>>> I = O.ideal(y)                                                                                                # needs sage.rings.function_field
>>> I**Integer(2)                                                                                                           # needs sage.rings.function_field
Ideal (x) of Maximal order of Function field in y defined by y^2 + x^3*y + x
>>> ~I                                                                                                            # needs sage.rings.function_field
Ideal (1/x*y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
>>> ~I * I                                                                                                        # needs sage.rings.function_field
Ideal (1) of Maximal order of Function field in y defined by y^2 + x^3*y + x

>>> J = O.ideal(x + y) * I                                                                                        # needs sage.rings.finite_rings sage.rings.function_field
>>> J.factor()                                                                                                    # needs sage.rings.finite_rings sage.rings.function_field
(Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x)^2 *
(Ideal (x^3 + x + 1, y + x) of Maximal order of Function field in y defined by y^2 + x^3*y + x)

Ideals in the maximal infinite order of a global function field:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = K[]
sage: F.<y> = K.extension(t^3 + t^2 - x^4)                                                                          # needs sage.rings.function_field
sage: Oinf = F.maximal_order_infinite()                                                                             # needs sage.rings.function_field
sage: I = Oinf.ideal(1/y)                                                                                           # needs sage.rings.function_field
sage: I + I == I
True
sage: I^2                                                                                                           # needs sage.rings.function_field
Ideal (1/x^4*y) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
sage: ~I                                                                                                            # needs sage.rings.function_field
Ideal (y) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
sage: ~I * I                                                                                                        # needs sage.rings.function_field
Ideal (1) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
sage: I.factor()                                                                                                    # needs sage.rings.function_field
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4)^4
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(3)**Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = K['t']; (t,) = R._first_ngens(1)
>>> F = K.extension(t**Integer(3) + t**Integer(2) - x**Integer(4), names=('y',)); (y,) = F._first_ngens(1)# needs sage.rings.function_field
>>> Oinf = F.maximal_order_infinite()                                                                             # needs sage.rings.function_field
>>> I = Oinf.ideal(Integer(1)/y)                                                                                           # needs sage.rings.function_field
>>> I + I == I
True
>>> I**Integer(2)                                                                                                           # needs sage.rings.function_field
Ideal (1/x^4*y) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
>>> ~I                                                                                                            # needs sage.rings.function_field
Ideal (y) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
>>> ~I * I                                                                                                        # needs sage.rings.function_field
Ideal (1) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4
>>> I.factor()                                                                                                    # needs sage.rings.function_field
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field in y defined by y^3 + y^2 + 2*x^4)^4

AUTHORS:

  • William Stein (2010): initial version

  • Maarten Derickx (2011-09-14): fixed ideal_with_gens_over_base()

  • Kwankyu Lee (2017-04-30): added ideals for global function fields

class sage.rings.function_field.ideal.FunctionFieldIdeal(ring)[source]

Bases: Element

Base class of fractional ideals of function fields.

INPUT:

  • ring – ring of the ideal

EXAMPLES:

sage: K.<x> = FunctionField(GF(7))
sage: O = K.equation_order()
sage: O.ideal(x^3 + 1)
Ideal (x^3 + 1) of Maximal order of Rational function field in x over Finite Field of size 7
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.equation_order()
>>> O.ideal(x**Integer(3) + Integer(1))
Ideal (x^3 + 1) of Maximal order of Rational function field in x over Finite Field of size 7
base_ring()[source]

Return the base ring of this ideal.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(x^2 + 1)
sage: I.base_ring()
Order in Function field in y defined by y^2 - x^3 - 1
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(x**Integer(2) + Integer(1))
>>> I.base_ring()
Order in Function field in y defined by y^2 - x^3 - 1
divisor()[source]

Return the divisor corresponding to the ideal.

EXAMPLES:

sage: # needs sage.modules sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: O = K.maximal_order()
sage: I = O.ideal(x*(x + 1)^2/(x^2 + x + 1))
sage: I.divisor()
Place (x) + 2*Place (x + 1) - Place (x + z2) - Place (x + z2 + 1)

sage: # needs sage.modules sage.rings.finite_rings
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x + 1)/(x^3 + 1))
sage: I.divisor()
2*Place (1/x)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<T> = PolynomialRing(K)
sage: F.<y> = K.extension(T^3 - x^2*(x^2 + x + 1)^2)
sage: O = F.maximal_order()
sage: I = O.ideal(y)
sage: I.divisor()
2*Place (x, (1/(x^3 + x^2 + x))*y^2)
 + 2*Place (x^2 + x + 1, (1/(x^3 + x^2 + x))*y^2)

sage: # needs sage.rings.function_field
sage: Oinf = F.maximal_order_infinite()
sage: I = Oinf.ideal(y)
sage: I.divisor()
-2*Place (1/x, 1/x^4*y^2 + 1/x^2*y + 1)
 - 2*Place (1/x, 1/x^2*y + 1)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: O = L.maximal_order()
sage: I = O.ideal(y)
sage: I.divisor()
- Place (x, x*y)
 + 2*Place (x + 1, x*y)

sage: # needs sage.rings.function_field
sage: Oinf = L.maximal_order_infinite()
sage: I = Oinf.ideal(y)
sage: I.divisor()
- Place (1/x, 1/x*y)
>>> from sage.all import *
>>> # needs sage.modules sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x*(x + Integer(1))**Integer(2)/(x**Integer(2) + x + Integer(1)))
>>> I.divisor()
Place (x) + 2*Place (x + 1) - Place (x + z2) - Place (x + z2 + 1)

>>> # needs sage.modules sage.rings.finite_rings
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal((x + Integer(1))/(x**Integer(3) + Integer(1)))
>>> I.divisor()
2*Place (1/x)

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = PolynomialRing(K, names=('T',)); (T,) = _._first_ngens(1)
>>> F = K.extension(T**Integer(3) - x**Integer(2)*(x**Integer(2) + x + Integer(1))**Integer(2), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(y)
>>> I.divisor()
2*Place (x, (1/(x^3 + x^2 + x))*y^2)
 + 2*Place (x^2 + x + 1, (1/(x^3 + x^2 + x))*y^2)

>>> # needs sage.rings.function_field
>>> Oinf = F.maximal_order_infinite()
>>> I = Oinf.ideal(y)
>>> I.divisor()
-2*Place (1/x, 1/x^4*y^2 + 1/x^2*y + 1)
 - 2*Place (1/x, 1/x^2*y + 1)

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(y)
>>> I.divisor()
- Place (x, x*y)
 + 2*Place (x + 1, x*y)

>>> # needs sage.rings.function_field
>>> Oinf = L.maximal_order_infinite()
>>> I = Oinf.ideal(y)
>>> I.divisor()
- Place (1/x, 1/x*y)
divisor_of_poles()[source]

Return the divisor of poles corresponding to the ideal.

EXAMPLES:

sage: # needs sage.modules sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: O = K.maximal_order()
sage: I = O.ideal(x*(x + 1)^2/(x^2 + x + 1))
sage: I.divisor_of_poles()
Place (x + z2) + Place (x + z2 + 1)

sage: # needs sage.modules
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x + 1)/(x^3 + 1))
sage: I.divisor_of_poles()
0

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: O = L.maximal_order()
sage: I = O.ideal(y)
sage: I.divisor_of_poles()
Place (x, x*y)
>>> from sage.all import *
>>> # needs sage.modules sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x*(x + Integer(1))**Integer(2)/(x**Integer(2) + x + Integer(1)))
>>> I.divisor_of_poles()
Place (x + z2) + Place (x + z2 + 1)

>>> # needs sage.modules
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal((x + Integer(1))/(x**Integer(3) + Integer(1)))
>>> I.divisor_of_poles()
0

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(y)
>>> I.divisor_of_poles()
Place (x, x*y)
divisor_of_zeros()[source]

Return the divisor of zeros corresponding to the ideal.

EXAMPLES:

sage: # needs sage.modules sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: O = K.maximal_order()
sage: I = O.ideal(x*(x + 1)^2/(x^2 + x + 1))
sage: I.divisor_of_zeros()
Place (x) + 2*Place (x + 1)

sage: # needs sage.modules
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x + 1)/(x^3 + 1))
sage: I.divisor_of_zeros()
2*Place (1/x)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: O = L.maximal_order()
sage: I = O.ideal(y)
sage: I.divisor_of_zeros()
2*Place (x + 1, x*y)
>>> from sage.all import *
>>> # needs sage.modules sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x*(x + Integer(1))**Integer(2)/(x**Integer(2) + x + Integer(1)))
>>> I.divisor_of_zeros()
Place (x) + 2*Place (x + 1)

>>> # needs sage.modules
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal((x + Integer(1))/(x**Integer(3) + Integer(1)))
>>> I.divisor_of_zeros()
2*Place (1/x)

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(y)
>>> I.divisor_of_zeros()
2*Place (x + 1, x*y)
factor()[source]

Return the factorization of this ideal.

Subclass of this class should define _factor() method that returns a list of prime ideal and multiplicity pairs.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: O = K.maximal_order()
sage: I = O.ideal(x^3*(x + 1)^2)
sage: I.factor()
(Ideal (x) of Maximal order of Rational function field in x
over Finite Field in z2 of size 2^2)^3 *
(Ideal (x + 1) of Maximal order of Rational function field in x
over Finite Field in z2 of size 2^2)^2

sage: # needs sage.rings.finite_rings
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x + 1)/(x^3 + 1))
sage: I.factor()
(Ideal (1/x) of Maximal infinite order of Rational function field in x
over Finite Field in z2 of size 2^2)^2

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<T> = PolynomialRing(K)
sage: F.<y> = K.extension(T^3 - x^2*(x^2 + x + 1)^2)
sage: O = F.maximal_order()
sage: I = O.ideal(y)
sage: I == I.factor().prod()
True

sage: # needs sage.rings.function_field
sage: Oinf = F.maximal_order_infinite()
sage: f= 1/x
sage: I = Oinf.ideal(f)
sage: I.factor()
(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1/x^2*y + 1) of Maximal infinite order
of Function field in y defined by y^3 + x^6 + x^4 + x^2) *
(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1) of Maximal infinite order
of Function field in y defined by y^3 + x^6 + x^4 + x^2)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
sage: O = F.maximal_order()
sage: I = O.ideal(y)
sage: I == I.factor().prod()
True

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: O = L.maximal_order()
sage: I = O.ideal(y)
sage: I == I.factor().prod()
True
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x**Integer(3)*(x + Integer(1))**Integer(2))
>>> I.factor()
(Ideal (x) of Maximal order of Rational function field in x
over Finite Field in z2 of size 2^2)^3 *
(Ideal (x + 1) of Maximal order of Rational function field in x
over Finite Field in z2 of size 2^2)^2

>>> # needs sage.rings.finite_rings
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal((x + Integer(1))/(x**Integer(3) + Integer(1)))
>>> I.factor()
(Ideal (1/x) of Maximal infinite order of Rational function field in x
over Finite Field in z2 of size 2^2)^2

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = PolynomialRing(K, names=('T',)); (T,) = _._first_ngens(1)
>>> F = K.extension(T**Integer(3) - x**Integer(2)*(x**Integer(2) + x + Integer(1))**Integer(2), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(y)
>>> I == I.factor().prod()
True

>>> # needs sage.rings.function_field
>>> Oinf = F.maximal_order_infinite()
>>> f= Integer(1)/x
>>> I = Oinf.ideal(f)
>>> I.factor()
(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1/x^2*y + 1) of Maximal infinite order
of Function field in y defined by y^3 + x^6 + x^4 + x^2) *
(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1) of Maximal infinite order
of Function field in y defined by y^3 + x^6 + x^4 + x^2)

>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(3) - x**Integer(2)*(x**Integer(2) + x + Integer(1))**Integer(2), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(y)
>>> I == I.factor().prod()
True

>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(y)
>>> I == I.factor().prod()
True
gens_reduced()[source]

Return reduced generators.

For now, this method just looks at the generators and sees if any can be removed without changing the ideal. It prefers principal representations (a single generator) over all others, and otherwise picks the generator set with the shortest print representation.

This method is provided so that ideals in function fields have the method gens_reduced(), just like ideals of number fields. Sage linear algebra machinery sometimes requires this.

EXAMPLES:

sage: K.<x> = FunctionField(GF(7))
sage: O = K.equation_order()
sage: I = O.ideal(x, x^2, x^2 + x)
sage: I.gens_reduced()
(x,)
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.equation_order()
>>> I = O.ideal(x, x**Integer(2), x**Integer(2) + x)
>>> I.gens_reduced()
(x,)
place()[source]

Return the place associated with this prime ideal.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: O = K.maximal_order()
sage: I = O.ideal(x^2 + x + 1)
sage: I.place()
Traceback (most recent call last):
...
TypeError: not a prime ideal
sage: I = O.ideal(x^3 + x + 1)
sage: I.place()
Place (x^3 + x + 1)

sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x + 1)/(x^3 + 1))
sage: p = I.factor()[0][0]
sage: p.place()
Place (1/x)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<t> = PolynomialRing(K)
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
sage: O = F.maximal_order()
sage: I = O.ideal(y)
sage: [f.place() for f,_ in I.factor()]
[Place (x, (1/(x^3 + x^2 + x))*y^2),
 Place (x^2 + x + 1, (1/(x^3 + x^2 + x))*y^2)]

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: O = L.maximal_order()
sage: I = O.ideal(y)
sage: [f.place() for f,_ in I.factor()]
[Place (x, x*y), Place (x + 1, x*y)]

sage: # needs sage.rings.finite_rings sage.rings.function_field
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
sage: Oinf = F.maximal_order_infinite()
sage: I = Oinf.ideal(1/x)
sage: I.factor()
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field
in y defined by y^3 + y^2 + 2*x^4)^3
sage: J = I.factor()[0][0]
sage: J.is_prime()
True
sage: J.place()
Place (1/x, 1/x^3*y^2)

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: Oinf = L.maximal_order_infinite()
sage: I = Oinf.ideal(1/x)
sage: I.factor()
(Ideal (1/x*y) of Maximal infinite order of Function field in y
defined by y^2 + y + (x^2 + 1)/x)^2
sage: J = I.factor()[0][0]
sage: J.is_prime()
True
sage: J.place()
Place (1/x, 1/x*y)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x**Integer(2) + x + Integer(1))
>>> I.place()
Traceback (most recent call last):
...
TypeError: not a prime ideal
>>> I = O.ideal(x**Integer(3) + x + Integer(1))
>>> I.place()
Place (x^3 + x + 1)

>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal((x + Integer(1))/(x**Integer(3) + Integer(1)))
>>> p = I.factor()[Integer(0)][Integer(0)]
>>> p.place()
Place (1/x)

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = PolynomialRing(K, names=('t',)); (t,) = _._first_ngens(1)
>>> F = K.extension(t**Integer(3) - x**Integer(2)*(x**Integer(2)+x+Integer(1))**Integer(2), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(y)
>>> [f.place() for f,_ in I.factor()]
[Place (x, (1/(x^3 + x^2 + x))*y^2),
 Place (x^2 + x + 1, (1/(x^3 + x^2 + x))*y^2)]

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(y)
>>> [f.place() for f,_ in I.factor()]
[Place (x, x*y), Place (x + 1, x*y)]

>>> # needs sage.rings.finite_rings sage.rings.function_field
>>> K = FunctionField(GF(Integer(3)**Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = PolynomialRing(K, names=('t',)); (t,) = R._first_ngens(1)
>>> F = K.extension(t**Integer(3) + t**Integer(2) - x**Integer(4), names=('y',)); (y,) = F._first_ngens(1)
>>> Oinf = F.maximal_order_infinite()
>>> I = Oinf.ideal(Integer(1)/x)
>>> I.factor()
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field
in y defined by y^3 + y^2 + 2*x^4)^3
>>> J = I.factor()[Integer(0)][Integer(0)]
>>> J.is_prime()
True
>>> J.place()
Place (1/x, 1/x^3*y^2)

>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = L._first_ngens(1)
>>> Oinf = L.maximal_order_infinite()
>>> I = Oinf.ideal(Integer(1)/x)
>>> I.factor()
(Ideal (1/x*y) of Maximal infinite order of Function field in y
defined by y^2 + y + (x^2 + 1)/x)^2
>>> J = I.factor()[Integer(0)][Integer(0)]
>>> J.is_prime()
True
>>> J.place()
Place (1/x, 1/x*y)
ring()[source]

Return the ring to which this ideal belongs.

EXAMPLES:

sage: K.<x> = FunctionField(GF(7))
sage: O = K.equation_order()
sage: I = O.ideal(x, x^2, x^2 + x)
sage: I.ring()
Maximal order of Rational function field in x over Finite Field of size 7
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.equation_order()
>>> I = O.ideal(x, x**Integer(2), x**Integer(2) + x)
>>> I.ring()
Maximal order of Rational function field in x over Finite Field of size 7
class sage.rings.function_field.ideal.FunctionFieldIdealInfinite(ring)[source]

Bases: FunctionFieldIdeal

Base class of ideals of maximal infinite orders

class sage.rings.function_field.ideal.FunctionFieldIdealInfinite_module(ring, module)[source]

Bases: FunctionFieldIdealInfinite, Ideal_generic

A fractional ideal specified by a finitely generated module over the integers of the base field.

INPUT:

  • ring – order in a function field

  • module – module

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: O.ideal(y)
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> O.ideal(y)
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
module()[source]

Return the module over the maximal order of the base field that underlies this ideal.

The formation of the module is compatible with the vector space corresponding to the function field.

EXAMPLES:

sage: K.<x> = FunctionField(GF(7))
sage: O = K.maximal_order(); O
Maximal order of Rational function field in x over Finite Field of size 7
sage: K.polynomial_ring()
Univariate Polynomial Ring in x over
 Rational function field in x over Finite Field of size 7
sage: I = O.ideal([x^2 + 1, x*(x^2+1)])
sage: I.gens()
(x^2 + 1,)
sage: I.module()                                                            # needs sage.modules
Free module of degree 1 and rank 1 over
 Maximal order of Rational function field in x over Finite Field of size 7
Echelon basis matrix:
[x^2 + 1]
sage: V, from_V, to_V = K.vector_space(); V                                 # needs sage.modules
Vector space of dimension 1 over
 Rational function field in x over Finite Field of size 7
sage: I.module().is_submodule(V)                                            # needs sage.modules
True
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order(); O
Maximal order of Rational function field in x over Finite Field of size 7
>>> K.polynomial_ring()
Univariate Polynomial Ring in x over
 Rational function field in x over Finite Field of size 7
>>> I = O.ideal([x**Integer(2) + Integer(1), x*(x**Integer(2)+Integer(1))])
>>> I.gens()
(x^2 + 1,)
>>> I.module()                                                            # needs sage.modules
Free module of degree 1 and rank 1 over
 Maximal order of Rational function field in x over Finite Field of size 7
Echelon basis matrix:
[x^2 + 1]
>>> V, from_V, to_V = K.vector_space(); V                                 # needs sage.modules
Vector space of dimension 1 over
 Rational function field in x over Finite Field of size 7
>>> I.module().is_submodule(V)                                            # needs sage.modules
True
class sage.rings.function_field.ideal.FunctionFieldIdeal_module(ring, module)[source]

Bases: FunctionFieldIdeal, Ideal_generic

A fractional ideal specified by a finitely generated module over the integers of the base field.

INPUT:

  • ring – an order in a function field

  • module – a module of the order

EXAMPLES:

An ideal in an extension of a rational function field:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(y)
sage: I
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
sage: I^2
Ideal (x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(y)
>>> I
Ideal (x^3 + 1, -y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> I**Integer(2)
Ideal (x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1
gen(i)[source]

Return the i-th generator in the current basis of this ideal.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(x^2 + 1)
sage: I.gen(1)
(x^2 + 1)*y
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(x**Integer(2) + Integer(1))
>>> I.gen(Integer(1))
(x^2 + 1)*y
gens()[source]

Return a set of generators of this ideal.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(x^2 + 1)
sage: I.gens()
(x^2 + 1, (x^2 + 1)*y)
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(x**Integer(2) + Integer(1))
>>> I.gens()
(x^2 + 1, (x^2 + 1)*y)
intersection(other)[source]

Return the intersection of this ideal and other.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(y^3); J = O.ideal(y^2)
sage: Z = I.intersection(J); Z
Ideal (x^6 + 2*x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1
sage: y^2 in Z
False
sage: y^3 in Z
True
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(y**Integer(3)); J = O.ideal(y**Integer(2))
>>> Z = I.intersection(J); Z
Ideal (x^6 + 2*x^3 + 1, (-x^3 - 1)*y) of Order in Function field in y defined by y^2 - x^3 - 1
>>> y**Integer(2) in Z
False
>>> y**Integer(3) in Z
True
module()[source]

Return the module over the maximal order of the base field that underlies this ideal.

The formation of the module is compatible with the vector space corresponding to the function field.

OUTPUT: a module over the maximal order of the base field of the ideal

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order();  O
Order in Function field in y defined by y^2 - x^3 - 1
sage: I = O.ideal(x^2 + 1)
sage: I.gens()
(x^2 + 1, (x^2 + 1)*y)
sage: I.module()
Free module of degree 2 and rank 2 over Maximal order of Rational function field in x over Rational Field
Echelon basis matrix:
[x^2 + 1       0]
[      0 x^2 + 1]
sage: V, from_V, to_V = L.vector_space(); V
Vector space of dimension 2 over Rational function field in x over Rational Field
sage: I.module().is_submodule(V)
True
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order();  O
Order in Function field in y defined by y^2 - x^3 - 1
>>> I = O.ideal(x**Integer(2) + Integer(1))
>>> I.gens()
(x^2 + 1, (x^2 + 1)*y)
>>> I.module()
Free module of degree 2 and rank 2 over Maximal order of Rational function field in x over Rational Field
Echelon basis matrix:
[x^2 + 1       0]
[      0 x^2 + 1]
>>> V, from_V, to_V = L.vector_space(); V
Vector space of dimension 2 over Rational function field in x over Rational Field
>>> I.module().is_submodule(V)
True
ngens()[source]

Return the number of generators in the basis.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x^3 - 1)
sage: O = L.equation_order()
sage: I = O.ideal(x^2 + 1)
sage: I.ngens()
2
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.equation_order()
>>> I = O.ideal(x**Integer(2) + Integer(1))
>>> I.ngens()
2
class sage.rings.function_field.ideal.IdealMonoid(R)[source]

Bases: UniqueRepresentation, Parent

The monoid of ideals in orders of function fields.

INPUT:

  • R – order

EXAMPLES:

sage: K.<x> = FunctionField(GF(2))
sage: O = K.maximal_order()
sage: M = O.ideal_monoid(); M
Monoid of ideals of Maximal order of Rational function field in x over Finite Field of size 2
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> M = O.ideal_monoid(); M
Monoid of ideals of Maximal order of Rational function field in x over Finite Field of size 2
ring()[source]

Return the ring of which this is the ideal monoid.

EXAMPLES:

sage: K.<x> = FunctionField(GF(2))
sage: O = K.maximal_order()
sage: M = O.ideal_monoid(); M.ring() is O
True
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> M = O.ideal_monoid(); M.ring() is O
True