# Divisors of function fields#

Sage allows extensive computations with divisors on function fields.

EXAMPLES:

The divisor of an element of the function field is the formal sum of poles and zeros of the element with multiplicities:

sage: K.<x> = FunctionField(GF(2)); R.<t> = K[]
sage: L.<y> = K.extension(t^3 + x^3*t + x)
sage: f = x/(y+1)
sage: f.divisor()
- Place (1/x, 1/x^3*y^2 + 1/x)
+ Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1)
+ 3*Place (x, y)
- Place (x^3 + x + 1, y + 1)

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = K['t']; (t,) = R._first_ngens(1)
>>> L = K.extension(t**Integer(3) + x**Integer(3)*t + x, names=('y',)); (y,) = L._first_ngens(1)
>>> f = x/(y+Integer(1))
>>> f.divisor()
- Place (1/x, 1/x^3*y^2 + 1/x)
+ Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1)
+ 3*Place (x, y)
- Place (x^3 + x + 1, y + 1)


The Riemann-Roch space of a divisor can be computed. We can get a basis of the space as a vector space over the constant field:

sage: p = L.places_finite()[0]
sage: q = L.places_infinite()[0]
sage: (3*p + 2*q).basis_function_space()
[1/x*y^2 + x^2, 1, 1/x]

>>> from sage.all import *
>>> p = L.places_finite()[Integer(0)]
>>> q = L.places_infinite()[Integer(0)]
>>> (Integer(3)*p + Integer(2)*q).basis_function_space()
[1/x*y^2 + x^2, 1, 1/x]


We verify the Riemann-Roch theorem:

sage: D = 3*p - q
sage: index_of_speciality = len(D.basis_differential_space())
sage: D.dimension() == D.degree() - L.genus() + 1 + index_of_speciality
True

>>> from sage.all import *
>>> D = Integer(3)*p - q
>>> index_of_speciality = len(D.basis_differential_space())
>>> D.dimension() == D.degree() - L.genus() + Integer(1) + index_of_speciality
True


AUTHORS:

• Kwankyu Lee (2017-04-30): initial version

class sage.rings.function_field.divisor.DivisorGroup(field)[source]#

Groups of divisors of function fields.

INPUT:

• field – function field

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: F.divisor_group()
Divisor group of Function field in y defined by y^2 + 4*x^3 + 4

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> F.divisor_group()
Divisor group of Function field in y defined by y^2 + 4*x^3 + 4

Element[source]#

alias of FunctionFieldDivisor

function_field()[source]#

Return the function field to which the divisor group is attached.

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: G = F.divisor_group()
sage: G.function_field()
Function field in y defined by y^2 + 4*x^3 + 4

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> G = F.divisor_group()
>>> G.function_field()
Function field in y defined by y^2 + 4*x^3 + 4

class sage.rings.function_field.divisor.FunctionFieldDivisor(parent, data)[source]#

Bases: ModuleElement

Divisors of function fields.

INPUT:

• parent – divisor group

• data – dict of place and multiplicity pairs

EXAMPLES:

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
sage: f = x/(y + 1)
sage: f.divisor()
Place (1/x, 1/x^4*y^2 + 1/x^2*y + 1)
+ Place (1/x, 1/x^2*y + 1)
+ 3*Place (x, (1/(x^3 + x^2 + x))*y^2)
- 6*Place (x + 1, y + 1)

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), 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)
>>> f = x/(y + Integer(1))
>>> f.divisor()
Place (1/x, 1/x^4*y^2 + 1/x^2*y + 1)
+ Place (1/x, 1/x^2*y + 1)
+ 3*Place (x, (1/(x^3 + x^2 + x))*y^2)
- 6*Place (x + 1, y + 1)

basis_differential_space()[source]#

Return a basis of the space of differentials $$\Omega(D)$$ for the divisor $$D$$.

EXAMPLES:

We check the Riemann-Roch theorem:

sage: K.<x>=FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y>=K.extension(Y^3 + x^3*Y + x)
sage: d = 3*L.places()[0]
sage: l = len(d.basis_function_space())
sage: i = len(d.basis_differential_space())
sage: l == d.degree() + 1 - L.genus() + i
True

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> d = Integer(3)*L.places()[Integer(0)]
>>> l = len(d.basis_function_space())
>>> i = len(d.basis_differential_space())
>>> l == d.degree() + Integer(1) - L.genus() + i
True

basis_function_space()[source]#

Return a basis of the Riemann-Roch space of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: O = F.maximal_order()
sage: I = O.ideal(x - 2)
sage: D = I.divisor()
sage: D.basis_function_space()
[x/(x + 3), 1/(x + 3)]

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x - Integer(2))
>>> D = I.divisor()
>>> D.basis_function_space()
[x/(x + 3), 1/(x + 3)]

degree()[source]#

Return the degree of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1,p2 = L.places()[:2]
sage: D = 2*p1 - 3*p2
sage: D.degree()
-1

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1,p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 - Integer(3)*p2
>>> D.degree()
-1

denominator()[source]#

Return the denominator part of the divisor.

The denominator of a divisor is the negative of the negative part of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1,p2 = L.places()[:2]
sage: D = 2*p1 - 3*p2
sage: D.denominator()
3*Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1)

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1,p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 - Integer(3)*p2
>>> D.denominator()
3*Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1)

dict()[source]#

Return the dictionary representing the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: f = x/(y + 1)
sage: D = f.divisor()
sage: D.dict()
{Place (1/x, 1/x^3*y^2 + 1/x): -1,
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1): 1,
Place (x, y): 3,
Place (x^3 + x + 1, y + 1): -1}

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> f = x/(y + Integer(1))
>>> D = f.divisor()
>>> D.dict()
{Place (1/x, 1/x^3*y^2 + 1/x): -1,
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1): 1,
Place (x, y): 3,
Place (x^3 + x + 1, y + 1): -1}

differential_space()[source]#

Return the vector space of the differential space $$\Omega(D)$$ of the divisor $$D$$.

OUTPUT:

• a vector space isomorphic to $$\Omega(D)$$

• an isomorphism from the vector space to the differential space

• the inverse of the isomorphism

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: O = F.maximal_order()
sage: I = O.ideal(x - 2)
sage: P1 = I.divisor().support()[0]
sage: Pinf = F.places_infinite()[0]
sage: D = -3*Pinf + P1
sage: V, from_V, to_V = D.differential_space()
sage: all(to_V(from_V(e)) == e for e in V)
True

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x - Integer(2))
>>> P1 = I.divisor().support()[Integer(0)]
>>> Pinf = F.places_infinite()[Integer(0)]
>>> D = -Integer(3)*Pinf + P1
>>> V, from_V, to_V = D.differential_space()
>>> all(to_V(from_V(e)) == e for e in V)
True

dimension()[source]#

Return the dimension of the Riemann-Roch space of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: O = F.maximal_order()
sage: I = O.ideal(x - 2)
sage: P1 = I.divisor().support()[0]
sage: Pinf = F.places_infinite()[0]
sage: D = 3*Pinf + 2*P1
sage: D.dimension()
5

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x - Integer(2))
>>> P1 = I.divisor().support()[Integer(0)]
>>> Pinf = F.places_infinite()[Integer(0)]
>>> D = Integer(3)*Pinf + Integer(2)*P1
>>> D.dimension()
5

function_space()[source]#

Return the vector space of the Riemann-Roch space of the divisor.

OUTPUT:

• a vector space, an isomorphism from the vector space to the Riemann-Roch space, and its inverse.

EXAMPLES:

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2-x^3-1)
sage: O = F.maximal_order()
sage: I = O.ideal(x - 2)
sage: D = I.divisor()
sage: V, from_V, to_V = D.function_space()
sage: all(to_V(from_V(e)) == e for e in V)
True

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2)-x**Integer(3)-Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x - Integer(2))
>>> D = I.divisor()
>>> V, from_V, to_V = D.function_space()
>>> all(to_V(from_V(e)) == e for e in V)
True

is_effective()[source]#

Return True if this divisor has non-negative multiplicity at all places.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1, p2 = L.places()[:2]
sage: D = 2*p1 + 3*p2
sage: D.is_effective()
True
sage: E = D - 4*p2
sage: E.is_effective()
False

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1, p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 + Integer(3)*p2
>>> D.is_effective()
True
>>> E = D - Integer(4)*p2
>>> E.is_effective()
False

list()[source]#

Return the list of place and multiplicity pairs of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: f = x/(y + 1)
sage: D = f.divisor()
sage: D.list()
[(Place (1/x, 1/x^3*y^2 + 1/x), -1),
(Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1), 1),
(Place (x, y), 3),
(Place (x^3 + x + 1, y + 1), -1)]

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> f = x/(y + Integer(1))
>>> D = f.divisor()
>>> D.list()
[(Place (1/x, 1/x^3*y^2 + 1/x), -1),
(Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1), 1),
(Place (x, y), 3),
(Place (x^3 + x + 1, y + 1), -1)]

multiplicity(place)[source]#

Return the multiplicity of the divisor at the place.

INPUT:

• place – place of a function field

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1,p2 = L.places()[:2]
sage: D = 2*p1 - 3*p2
sage: D.multiplicity(p1)
2
sage: D.multiplicity(p2)
-3

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1,p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 - Integer(3)*p2
>>> D.multiplicity(p1)
2
>>> D.multiplicity(p2)
-3

numerator()[source]#

Return the numerator part of the divisor.

The numerator of a divisor is the positive part of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1,p2 = L.places()[:2]
sage: D = 2*p1 - 3*p2
sage: D.numerator()
2*Place (1/x, 1/x^3*y^2 + 1/x)

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1,p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 - Integer(3)*p2
>>> D.numerator()
2*Place (1/x, 1/x^3*y^2 + 1/x)

support()[source]#

Return the support of the divisor.

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: f = x/(y + 1)
sage: D = f.divisor()
sage: D.support()
[Place (1/x, 1/x^3*y^2 + 1/x),
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1),
Place (x, y),
Place (x^3 + x + 1, y + 1)]

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> f = x/(y + Integer(1))
>>> D = f.divisor()
>>> D.support()
[Place (1/x, 1/x^3*y^2 + 1/x),
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1),
Place (x, y),
Place (x^3 + x + 1, y + 1)]

valuation(place)[source]#

Return the multiplicity of the divisor at the place.

INPUT:

• place – place of a function field

EXAMPLES:

sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: p1,p2 = L.places()[:2]
sage: D = 2*p1 - 3*p2
sage: D.multiplicity(p1)
2
sage: D.multiplicity(p2)
-3

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(4)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> p1,p2 = L.places()[:Integer(2)]
>>> D = Integer(2)*p1 - Integer(3)*p2
>>> D.multiplicity(p1)
2
>>> D.multiplicity(p2)
-3

sage.rings.function_field.divisor.divisor(field, data)[source]#

Construct a divisor from the data.

INPUT:

• field – function field

• data – dictionary of place and multiplicity pairs

EXAMPLES:

sage: K.<x> = FunctionField(GF(2)); R.<t> = K[]
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2)
sage: from sage.rings.function_field.divisor import divisor
sage: p, q, r = F.places()
sage: divisor(F, {p: 1, q: 2, r: 3})
Place (1/x, 1/x^2*y + 1)
+ 2*Place (x, (1/(x^3 + x^2 + x))*y^2)
+ 3*Place (x + 1, y + 1)

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = K['t']; (t,) = R._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)
>>> from sage.rings.function_field.divisor import divisor
>>> p, q, r = F.places()
>>> divisor(F, {p: Integer(1), q: Integer(2), r: Integer(3)})
Place (1/x, 1/x^2*y + 1)
+ 2*Place (x, (1/(x^3 + x^2 + x))*y^2)
+ 3*Place (x + 1, y + 1)

sage.rings.function_field.divisor.prime_divisor(field, place, m=1)[source]#

Construct a prime divisor from the place.

INPUT:

• field – function field

• place – place of the function field

• m – (default: 1) a positive integer; multiplicity at the place

EXAMPLES:

sage: K.<x> = FunctionField(GF(2)); R.<t> = K[]
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2)
sage: p = F.places()[0]
sage: from sage.rings.function_field.divisor import prime_divisor
sage: d = prime_divisor(F, p)
sage: 3 * d == prime_divisor(F, p, 3)
True

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); R = K['t']; (t,) = R._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)
>>> p = F.places()[Integer(0)]
>>> from sage.rings.function_field.divisor import prime_divisor
>>> d = prime_divisor(F, p)
>>> Integer(3) * d == prime_divisor(F, p, Integer(3))
True