Ideals of function fields: rational#

class sage.rings.function_field.ideal_rational.FunctionFieldIdealInfinite_rational(ring, gen)[source]#

Bases: FunctionFieldIdealInfinite

Fractional ideal of the maximal order of rational function field.

INPUT:

  • ring – infinite maximal order

  • gen – generator

Note that the infinite maximal order is a principal ideal domain.

EXAMPLES:

sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: Oinf.ideal(x)
Ideal (x) of Maximal infinite 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)
>>> Oinf = K.maximal_order_infinite()
>>> Oinf.ideal(x)
Ideal (x) of Maximal infinite order of Rational function field in x over Finite Field of size 2
gen()[source]#

Return the generator of this principal ideal.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x+1)/(x^3+x), (x^2+1)/x^4)
sage: I.gen()
1/x^2
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> 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)+x), (x**Integer(2)+Integer(1))/x**Integer(4))
>>> I.gen()
1/x^2
gens()[source]#

Return the generator of this principal ideal.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x+1)/(x^3+x), (x^2+1)/x^4)
sage: I.gens()
(1/x^2,)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> 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)+x), (x**Integer(2)+Integer(1))/x**Integer(4))
>>> I.gens()
(1/x^2,)
gens_over_base()[source]#

Return the generator of this ideal as a rank one module over the infinite maximal order.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal((x+1)/(x^3+x), (x^2+1)/x^4)
sage: I.gens_over_base()
(1/x^2,)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> 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)+x), (x**Integer(2)+Integer(1))/x**Integer(4))
>>> I.gens_over_base()
(1/x^2,)
is_prime()[source]#

Return True if this ideal is a prime ideal.

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(2))
sage: Oinf = K.maximal_order_infinite()
sage: I = Oinf.ideal(x/(x^2 + 1))
sage: I.is_prime()
True
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> Oinf = K.maximal_order_infinite()
>>> I = Oinf.ideal(x/(x**Integer(2) + Integer(1)))
>>> I.is_prime()
True
valuation(ideal)[source]#

Return the valuation of ideal at this prime ideal.

INPUT:

  • ideal – fractional ideal

EXAMPLES:

sage: F.<x> = FunctionField(QQ)
sage: O = F.maximal_order_infinite()
sage: p = O.ideal(1/x)
sage: p.valuation(O.ideal(x/(x+1)))
0
sage: p.valuation(O.ideal(0))
+Infinity
>>> from sage.all import *
>>> F = FunctionField(QQ, names=('x',)); (x,) = F._first_ngens(1)
>>> O = F.maximal_order_infinite()
>>> p = O.ideal(Integer(1)/x)
>>> p.valuation(O.ideal(x/(x+Integer(1))))
0
>>> p.valuation(O.ideal(Integer(0)))
+Infinity
class sage.rings.function_field.ideal_rational.FunctionFieldIdeal_rational(ring, gen)[source]#

Bases: FunctionFieldIdeal

Fractional ideals of the maximal order of a rational function field.

INPUT:

  • ring – the maximal order of the rational function field.

  • gen – generator of the ideal, an element of the function field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order()
sage: I = O.ideal(1/(x^2+x)); I
Ideal (1/(x^2 + x)) 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(Integer(1)/(x**Integer(2)+x)); I
Ideal (1/(x^2 + x)) of Maximal order of Rational function field in x over Rational Field
denominator()[source]#

Return the denominator of this fractional ideal.

EXAMPLES:

sage: F.<x> = FunctionField(QQ)
sage: O = F.maximal_order()
sage: I = O.ideal(x/(x^2+1))
sage: I.denominator()
x^2 + 1
>>> from sage.all import *
>>> F = FunctionField(QQ, names=('x',)); (x,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x/(x**Integer(2)+Integer(1)))
>>> I.denominator()
x^2 + 1
gen()[source]#

Return the unique generator of this 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)
sage: I.gen()
x^2 + x
>>> 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)
>>> I.gen()
x^2 + x
gens()[source]#

Return the tuple of the unique generator of this 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)
sage: I.gens()
(x^2 + x,)
>>> 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)
>>> I.gens()
(x^2 + x,)
gens_over_base()[source]#

Return the generator of this ideal as a rank one module over the maximal order.

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)
sage: I.gens_over_base()
(x^2 + x,)
>>> 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)
>>> I.gens_over_base()
(x^2 + x,)
is_prime()[source]#

Return True if this is a prime ideal.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order()
sage: I = O.ideal(x^3 + x^2)
sage: [f.is_prime() for f,m in I.factor()]                                  # needs sage.libs.pari
[True, True]
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x**Integer(3) + x**Integer(2))
>>> [f.is_prime() for f,m in I.factor()]                                  # needs sage.libs.pari
[True, True]
module()[source]#

Return the module, that is the ideal viewed as a module over the ring.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: O = K.maximal_order()
sage: I = O.ideal(x^3 + x^2)
sage: I.module()                                                                                            # needs sage.modules
Free module of degree 1 and rank 1 over Maximal order of Rational
function field in x over Rational Field
Echelon basis matrix:
[x^3 + x^2]
sage: J = 0*I
sage: J.module()                                                                                            # needs sage.modules
Free module of degree 1 and rank 0 over Maximal order of Rational
function field in x over Rational Field
Echelon basis matrix:
[]
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> O = K.maximal_order()
>>> I = O.ideal(x**Integer(3) + x**Integer(2))
>>> I.module()                                                                                            # needs sage.modules
Free module of degree 1 and rank 1 over Maximal order of Rational
function field in x over Rational Field
Echelon basis matrix:
[x^3 + x^2]
>>> J = Integer(0)*I
>>> J.module()                                                                                            # needs sage.modules
Free module of degree 1 and rank 0 over Maximal order of Rational
function field in x over Rational Field
Echelon basis matrix:
[]
valuation(ideal)[source]#

Return the valuation of the ideal at this prime ideal.

INPUT:

  • ideal – fractional ideal

EXAMPLES:

sage: F.<x> = FunctionField(QQ)
sage: O = F.maximal_order()
sage: I = O.ideal(x^2*(x^2+x+1)^3)
sage: [f.valuation(I) for f,_ in I.factor()]                                # needs sage.libs.pari
[2, 3]
>>> from sage.all import *
>>> F = FunctionField(QQ, names=('x',)); (x,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x**Integer(2)*(x**Integer(2)+x+Integer(1))**Integer(3))
>>> [f.valuation(I) for f,_ in I.factor()]                                # needs sage.libs.pari
[2, 3]