Function Fields

A function field (of one variable) is a finitely generated field extension of transcendence degree one. In Sage, a function field can be a rational function field or a finite extension of a function field.

EXAMPLES:

We create a rational function field:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(5^2,'a')); K
Rational function field in x over Finite Field in a of size 5^2
sage: K.genus()
0
sage: f = (x^2 + x + 1) / (x^3 + 1)
sage: f
(x^2 + x + 1)/(x^3 + 1)
sage: f^3
(x^6 + 3*x^5 + x^4 + 2*x^3 + x^2 + 3*x + 1)/(x^9 + 3*x^6 + 3*x^3 + 1)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(5)**Integer(2),'a'), names=('x',)); (x,) = K._first_ngens(1); K
Rational function field in x over Finite Field in a of size 5^2
>>> K.genus()
0
>>> f = (x**Integer(2) + x + Integer(1)) / (x**Integer(3) + Integer(1))
>>> f
(x^2 + x + 1)/(x^3 + 1)
>>> f**Integer(3)
(x^6 + 3*x^5 + x^4 + 2*x^3 + x^2 + 3*x + 1)/(x^9 + 3*x^6 + 3*x^3 + 1)
# needs sage.rings.finite_rings
K.<x> = FunctionField(GF(5^2,'a')); K
K.genus()
f = (x^2 + x + 1) / (x^3 + 1)
f
f^3

Then we create an extension of the rational function field, and do some simple arithmetic in it:

sage: # needs sage.rings.finite_rings sage.rings.function_field
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x)); L
Function field in y defined by y^3 + 3*x*y + (4*x^4 + 4)/x
sage: y^2
y^2
sage: y^3
2*x*y + (x^4 + 1)/x
sage: a = 1/y; a
(x/(x^4 + 1))*y^2 + 3*x^2/(x^4 + 1)
sage: a * y
1
>>> from sage.all import *
>>> # needs sage.rings.finite_rings sage.rings.function_field
>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(3) - (x**Integer(3) + Integer(2)*x*y + Integer(1)/x), names=('y',)); (y,) = L._first_ngens(1); L
Function field in y defined by y^3 + 3*x*y + (4*x^4 + 4)/x
>>> y**Integer(2)
y^2
>>> y**Integer(3)
2*x*y + (x^4 + 1)/x
>>> a = Integer(1)/y; a
(x/(x^4 + 1))*y^2 + 3*x^2/(x^4 + 1)
>>> a * y
1
# needs sage.rings.finite_rings sage.rings.function_field
R.<y> = K[]
L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x)); L
y^2
y^3
a = 1/y; a
a * y

We next make an extension of the above function field, illustrating that arithmetic with a tower of three fields is fully supported:

sage: # needs sage.rings.finite_rings sage.rings.function_field
sage: S.<t> = L[]
sage: M.<t> = L.extension(t^2 - x*y)
sage: M
Function field in t defined by t^2 + 4*x*y
sage: t^2
x*y
sage: 1/t
((1/(x^4 + 1))*y^2 + 3*x/(x^4 + 1))*t
sage: M.base_field()
Function field in y defined by y^3 + 3*x*y + (4*x^4 + 4)/x
sage: M.base_field().base_field()
Rational function field in x over Finite Field in a of size 5^2
>>> from sage.all import *
>>> # needs sage.rings.finite_rings sage.rings.function_field
>>> S = L['t']; (t,) = S._first_ngens(1)
>>> M = L.extension(t**Integer(2) - x*y, names=('t',)); (t,) = M._first_ngens(1)
>>> M
Function field in t defined by t^2 + 4*x*y
>>> t**Integer(2)
x*y
>>> Integer(1)/t
((1/(x^4 + 1))*y^2 + 3*x/(x^4 + 1))*t
>>> M.base_field()
Function field in y defined by y^3 + 3*x*y + (4*x^4 + 4)/x
>>> M.base_field().base_field()
Rational function field in x over Finite Field in a of size 5^2
# needs sage.rings.finite_rings sage.rings.function_field
S.<t> = L[]
M.<t> = L.extension(t^2 - x*y)
M
t^2
1/t
M.base_field()
M.base_field().base_field()

It is also possible to construct function fields over an imperfect base field:

sage: N.<u> = FunctionField(K)                                                      # needs sage.rings.finite_rings
>>> from sage.all import *
>>> N = FunctionField(K, names=('u',)); (u,) = N._first_ngens(1)# needs sage.rings.finite_rings
N.<u> = FunctionField(K)                                                      # needs sage.rings.finite_rings

and inseparable extension function fields:

sage: J.<x> = FunctionField(GF(5)); J
Rational function field in x over Finite Field of size 5
sage: T.<v> = J[]
sage: O.<v> = J.extension(v^5 - x); O                                               # needs sage.rings.function_field
Function field in v defined by v^5 + 4*x
>>> from sage.all import *
>>> J = FunctionField(GF(Integer(5)), names=('x',)); (x,) = J._first_ngens(1); J
Rational function field in x over Finite Field of size 5
>>> T = J['v']; (v,) = T._first_ngens(1)
>>> O = J.extension(v**Integer(5) - x, names=('v',)); (v,) = O._first_ngens(1); O                                               # needs sage.rings.function_field
Function field in v defined by v^5 + 4*x
J.<x> = FunctionField(GF(5)); J
T.<v> = J[]
O.<v> = J.extension(v^5 - x); O                                               # needs sage.rings.function_field

Function fields over the rational field are supported:

sage: # needs sage.rings.function_field
sage: F.<x> = FunctionField(QQ)
sage: R.<Y> = F[]
sage: L.<y> = F.extension(Y^2 - x^8 - 1)
sage: O = L.maximal_order()
sage: I = O.ideal(x, y - 1)
sage: P = I.place()
sage: D = P.divisor()
sage: D.basis_function_space()
[1]
sage: (2*D).basis_function_space()
[1]
sage: (3*D).basis_function_space()
[1]
sage: (4*D).basis_function_space()
[1, 1/x^4*y + 1/x^4]

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.divisor()
2*Place (x, y, (1/(x^3 + x^2 + x))*y^2)
 + 2*Place (x^2 + x + 1, y, (1/(x^3 + x^2 + x))*y^2)

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.divisor()
- Place (x, x*y)
 + Place (x^2 + 1, x*y)
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> F = FunctionField(QQ, names=('x',)); (x,) = F._first_ngens(1)
>>> R = F['Y']; (Y,) = R._first_ngens(1)
>>> L = F.extension(Y**Integer(2) - x**Integer(8) - Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> I = O.ideal(x, y - Integer(1))
>>> P = I.place()
>>> D = P.divisor()
>>> D.basis_function_space()
[1]
>>> (Integer(2)*D).basis_function_space()
[1]
>>> (Integer(3)*D).basis_function_space()
[1]
>>> (Integer(4)*D).basis_function_space()
[1, 1/x^4*y + 1/x^4]

>>> # 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.divisor()
2*Place (x, y, (1/(x^3 + x^2 + x))*y^2)
 + 2*Place (x^2 + x + 1, y, (1/(x^3 + x^2 + x))*y^2)

>>> # 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.divisor()
- Place (x, x*y)
 + Place (x^2 + 1, x*y)
# needs sage.rings.function_field
F.<x> = FunctionField(QQ)
R.<Y> = F[]
L.<y> = F.extension(Y^2 - x^8 - 1)
O = L.maximal_order()
I = O.ideal(x, y - 1)
P = I.place()
D = P.divisor()
D.basis_function_space()
(2*D).basis_function_space()
(3*D).basis_function_space()
(4*D).basis_function_space()
# needs sage.rings.function_field
K.<x> = FunctionField(QQ); _.<Y> = K[]
F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
O = F.maximal_order()
I = O.ideal(y)
I.divisor()
# needs sage.rings.function_field
K.<x> = FunctionField(QQ); _.<Y> = K[]
L.<y> = K.extension(Y^2 + Y + x + 1/x)
O = L.maximal_order()
I = O.ideal(y)
I.divisor()

Function fields over the algebraic field are supported:

sage: # needs sage.rings.function_field sage.rings.number_field
sage: K.<x> = FunctionField(QQbar); _.<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 - I, x*y)
 - Place (x, x*y)
 + Place (x + I, x*y)
sage: pl = I.divisor().support()[0]
sage: m = L.completion(pl, prec=5)
sage: m(x)
I + s + O(s^5)
sage: m(y)                                  # long time (4s)
-2*s + (-4 - I)*s^2 + (-15 - 4*I)*s^3 + (-75 - 23*I)*s^4 + (-413 - 154*I)*s^5 + O(s^6)
sage: m(y)^2 + m(y) + m(x) + 1/m(x)         # long time (8s)
O(s^5)
>>> from sage.all import *
>>> # needs sage.rings.function_field sage.rings.number_field
>>> K = FunctionField(QQbar, 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 - I, x*y)
 - Place (x, x*y)
 + Place (x + I, x*y)
>>> pl = I.divisor().support()[Integer(0)]
>>> m = L.completion(pl, prec=Integer(5))
>>> m(x)
I + s + O(s^5)
>>> m(y)                                  # long time (4s)
-2*s + (-4 - I)*s^2 + (-15 - 4*I)*s^3 + (-75 - 23*I)*s^4 + (-413 - 154*I)*s^5 + O(s^6)
>>> m(y)**Integer(2) + m(y) + m(x) + Integer(1)/m(x)         # long time (8s)
O(s^5)
# needs sage.rings.function_field sage.rings.number_field
K.<x> = FunctionField(QQbar); _.<Y> = K[]
L.<y> = K.extension(Y^2 + Y + x + 1/x)
O = L.maximal_order()
I = O.ideal(y)
I.divisor()
pl = I.divisor().support()[0]
m = L.completion(pl, prec=5)
m(x)
m(y)                                  # long time (4s)
m(y)^2 + m(y) + m(x) + 1/m(x)         # long time (8s)

Global function fields

A global function field in Sage is an extension field of a rational function field over a finite constant field by an irreducible separable polynomial over the rational function field.

EXAMPLES:

A fundamental computation for a global or any function field is to get a basis of its maximal order and maximal infinite order, and then do arithmetic with ideals of those maximal orders:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(3)); _.<t> = K[]
sage: L.<y> = K.extension(t^4 + t - x^5)
sage: O = L.maximal_order()
sage: O.basis()
(1, y, 1/x*y^2 + 1/x*y, 1/x^3*y^3 + 2/x^3*y^2 + 1/x^3*y)
sage: I = O.ideal(x,y); I
Ideal (x, y) of Maximal order of Function field in y defined by y^4 + y + 2*x^5
sage: J = I^-1
sage: J.basis_matrix()
[  1   0   0   0]
[1/x 1/x   0   0]
[  0   0   1   0]
[  0   0   0   1]
sage: L.maximal_order_infinite().basis()
(1, 1/x^2*y, 1/x^3*y^2, 1/x^4*y^3)
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(3)), names=('x',)); (x,) = K._first_ngens(1); _ = K['t']; (t,) = _._first_ngens(1)
>>> L = K.extension(t**Integer(4) + t - x**Integer(5), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> O.basis()
(1, y, 1/x*y^2 + 1/x*y, 1/x^3*y^3 + 2/x^3*y^2 + 1/x^3*y)
>>> I = O.ideal(x,y); I
Ideal (x, y) of Maximal order of Function field in y defined by y^4 + y + 2*x^5
>>> J = I**-Integer(1)
>>> J.basis_matrix()
[  1   0   0   0]
[1/x 1/x   0   0]
[  0   0   1   0]
[  0   0   0   1]
>>> L.maximal_order_infinite().basis()
(1, 1/x^2*y, 1/x^3*y^2, 1/x^4*y^3)
# needs sage.rings.function_field
K.<x> = FunctionField(GF(3)); _.<t> = K[]
L.<y> = K.extension(t^4 + t - x^5)
O = L.maximal_order()
O.basis()
I = O.ideal(x,y); I
J = I^-1
J.basis_matrix()
L.maximal_order_infinite().basis()

As an example of the most sophisticated computations that Sage can do with a global function field, we compute all the Weierstrass places of the Klein quartic over \(\GF{2}\) and gap numbers for ordinary places:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: L.genus()
3
sage: L.weierstrass_places()                                                        # needs sage.modules
[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 + 1, (x^3 + 1)*y + x + 1),
 Place (x^3 + x + 1, y + 1),
 Place (x^3 + x + 1, y + x^2),
 Place (x^3 + x + 1, y + x^2 + 1),
 Place (x^3 + x^2 + 1, y + x),
 Place (x^3 + x^2 + 1, y + x^2 + 1),
 Place (x^3 + x^2 + 1, y + x^2 + x + 1)]
sage: L.gaps()                                                                      # needs sage.modules
[1, 2, 3]
>>> from sage.all import *
>>> # 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(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> L.genus()
3
>>> L.weierstrass_places()                                                        # needs sage.modules
[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 + 1, (x^3 + 1)*y + x + 1),
 Place (x^3 + x + 1, y + 1),
 Place (x^3 + x + 1, y + x^2),
 Place (x^3 + x + 1, y + x^2 + 1),
 Place (x^3 + x^2 + 1, y + x),
 Place (x^3 + x^2 + 1, y + x^2 + 1),
 Place (x^3 + x^2 + 1, y + x^2 + x + 1)]
>>> L.gaps()                                                                      # needs sage.modules
[1, 2, 3]
# needs sage.rings.function_field
K.<x> = FunctionField(GF(2)); _.<Y> = K[]
L.<y> = K.extension(Y^3 + x^3*Y + x)
L.genus()
L.weierstrass_places()                                                        # needs sage.modules
L.gaps()                                                                      # needs sage.modules

The gap numbers for Weierstrass places are of course not ordinary:

sage: # needs sage.rings.function_field
sage: p1,p2,p3 = L.weierstrass_places()[:3]
sage: p1.gaps()
[1, 2, 4]
sage: p2.gaps()
[1, 2, 4]
sage: p3.gaps()
[1, 2, 4]
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> p1,p2,p3 = L.weierstrass_places()[:Integer(3)]
>>> p1.gaps()
[1, 2, 4]
>>> p2.gaps()
[1, 2, 4]
>>> p3.gaps()
[1, 2, 4]
# needs sage.rings.function_field
p1,p2,p3 = L.weierstrass_places()[:3]
p1.gaps()
p2.gaps()
p3.gaps()

AUTHORS:

  • William Stein (2010): initial version

  • Robert Bradshaw (2010-05-30): added is_finite()

  • Julian Rüth (2011-06-08, 2011-09-14, 2014-06-23, 2014-06-24, 2016-11-13): fixed hom(), extension(); use @cached_method; added derivation(); added support for relative vector spaces; fixed conversion to base fields

  • Maarten Derickx (2011-09-11): added doctests

  • Syed Ahmad Lavasani (2011-12-16): added genus(), is_RationalFunctionField()

  • Simon King (2014-10-29): Use the same generator names for a function field extension and the underlying polynomial ring.

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

  • Brent Baccala (2019-12-20): added function fields over number fields and QQbar

  • Sebastian A. Spindler (2024-03-06): implemented Hilbert symbols for global function fields

class sage.rings.function_field.function_field.FunctionField(base_field, names, category=Category of function fields)[source]

Bases: Field

Abstract base class for all function fields.

INPUT:

  • base_field – field; the base of this function field

  • names – string that gives the name of the generator

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: K
Rational function field in x over Rational Field
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> K
Rational function field in x over Rational Field
K.<x> = FunctionField(QQ)
K
basis_of_differentials_of_first_kind()[source]

Return a basis of the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
[]

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
[((x/(x^3 + 4))*y) d(x),
 ((1/(x^3 + 4))*y) d(x),
 ((x/(x^3 + 4))*y^2) d(x),
 ((1/(x^3 + 4))*y^2) d(x)]
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
[]

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
[((x/(x^3 + 4))*y) d(x),
 ((1/(x^3 + 4))*y) d(x),
 ((x/(x^3 + 4))*y^2) d(x),
 ((1/(x^3 + 4))*y^2) d(x)]
K.<t> = FunctionField(QQ)
K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
basis_of_holomorphic_differentials()[source]

Return a basis of the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
[]

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
[((x/(x^3 + 4))*y) d(x),
 ((1/(x^3 + 4))*y) d(x),
 ((x/(x^3 + 4))*y^2) d(x),
 ((1/(x^3 + 4))*y^2) d(x)]
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
[]

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
[((x/(x^3 + 4))*y) d(x),
 ((1/(x^3 + 4))*y) d(x),
 ((x/(x^3 + 4))*y^2) d(x),
 ((1/(x^3 + 4))*y^2) d(x)]
K.<t> = FunctionField(QQ)
K.basis_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.basis_of_holomorphic_differentials()                                # needs sage.rings.function_field
characteristic()[source]

Return the characteristic of the function field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: K.characteristic()
0
sage: K.<x> = FunctionField(QQbar)                                          # needs sage.rings.number_field
sage: K.characteristic()
0
sage: K.<x> = FunctionField(GF(7))
sage: K.characteristic()
7
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)                                          # needs sage.rings.function_field
sage: L.characteristic()                                                    # needs sage.rings.function_field
7
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> K.characteristic()
0
>>> K = FunctionField(QQbar, names=('x',)); (x,) = K._first_ngens(1)# needs sage.rings.number_field
>>> K.characteristic()
0
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1)
>>> K.characteristic()
7
>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.characteristic()                                                    # needs sage.rings.function_field
7
K.<x> = FunctionField(QQ)
K.characteristic()
K.<x> = FunctionField(QQbar)                                          # needs sage.rings.number_field
K.characteristic()
K.<x> = FunctionField(GF(7))
K.characteristic()
R.<y> = K[]
L.<y> = K.extension(y^2 - x)                                          # needs sage.rings.function_field
L.characteristic()                                                    # needs sage.rings.function_field
completion(place, name=None, prec=None, gen_name=None)[source]

Return the completion of the function field at the place.

INPUT:

  • place – place

  • name – string; name of the series variable

  • prec – positive integer; default precision

  • gen_name – string; name of the generator of the residue field; used only when the place is non-rational

EXAMPLES:

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: p = L.places_finite()[0]
sage: m = L.completion(p); m
Completion map:
  From: Function field in y defined by y^2 + y + (x^2 + 1)/x
  To:   Laurent Series Ring in s over Finite Field of size 2
sage: m(x, 10)
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
sage: m(y, 10)
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

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: p = L.places_finite()[0]
sage: m = L.completion(p); m
Completion map:
  From: Function field in y defined by y^2 + y + (x^2 + 1)/x
  To:   Laurent Series Ring in s over Finite Field of size 2
sage: m(x, 10)
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
sage: m(y, 10)
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

sage: K.<x> = FunctionField(GF(2))
sage: p = K.places_finite()[0]; p                                           # needs sage.libs.pari
Place (x)
sage: m = K.completion(p); m                                                # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Laurent Series Ring in s over Finite Field of size 2
sage: m(1/(x+1))                                                            # needs sage.rings.function_field
1 + s + s^2 + s^3 + s^4 + s^5 + s^6 + s^7 + s^8 + s^9 + s^10 + s^11 + s^12
+ s^13 + s^14 + s^15 + s^16 + s^17 + s^18 + s^19 + O(s^20)

sage: p = K.place_infinite(); p
Place (1/x)
sage: m = K.completion(p); m                                                # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Laurent Series Ring in s over Finite Field of size 2
sage: m(x)                                                                  # needs sage.rings.function_field
s^-1 + O(s^19)

sage: m = K.completion(p, prec=infinity); m                                 # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Lazy Laurent Series Ring in s over Finite Field of size 2
sage: f = m(x); f                                                           # needs sage.rings.function_field
s^-1 + ...
sage: f.coefficient(100)                                                    # needs sage.rings.function_field
0

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 - x)
sage: O = L.maximal_order()
sage: decomp = O.decomposition(K.maximal_order().ideal(x - 1))
sage: pls = (decomp[0][0].place(), decomp[1][0].place())
sage: m = L.completion(pls[0]); m
Completion map:
  From: Function field in y defined by y^2 - x
  To:   Laurent Series Ring in s over Rational Field
sage: xe = m(x)
sage: ye = m(y)
sage: ye^2 - xe == 0
True

sage: # needs sage.rings.function_field
sage: decomp2 = O.decomposition(K.maximal_order().ideal(x^2 + 1))
sage: pls2 = decomp2[0][0].place()
sage: m = L.completion(pls2); m
Completion map:
  From: Function field in y defined by y^2 - x
  To:   Laurent Series Ring in s over
         Number Field in a with defining polynomial x^4 + 2*x^2 + 4*x + 2
sage: xe = m(x)
sage: ye = m(y)
sage: ye^2 - xe == 0
True
>>> from sage.all import *
>>> # 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)
>>> p = L.places_finite()[Integer(0)]
>>> m = L.completion(p); m
Completion map:
  From: Function field in y defined by y^2 + y + (x^2 + 1)/x
  To:   Laurent Series Ring in s over Finite Field of size 2
>>> m(x, Integer(10))
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
>>> m(y, Integer(10))
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

>>> # 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)
>>> p = L.places_finite()[Integer(0)]
>>> m = L.completion(p); m
Completion map:
  From: Function field in y defined by y^2 + y + (x^2 + 1)/x
  To:   Laurent Series Ring in s over Finite Field of size 2
>>> m(x, Integer(10))
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
>>> m(y, Integer(10))
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1)
>>> p = K.places_finite()[Integer(0)]; p                                           # needs sage.libs.pari
Place (x)
>>> m = K.completion(p); m                                                # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Laurent Series Ring in s over Finite Field of size 2
>>> m(Integer(1)/(x+Integer(1)))                                                            # needs sage.rings.function_field
1 + s + s^2 + s^3 + s^4 + s^5 + s^6 + s^7 + s^8 + s^9 + s^10 + s^11 + s^12
+ s^13 + s^14 + s^15 + s^16 + s^17 + s^18 + s^19 + O(s^20)

>>> p = K.place_infinite(); p
Place (1/x)
>>> m = K.completion(p); m                                                # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Laurent Series Ring in s over Finite Field of size 2
>>> m(x)                                                                  # needs sage.rings.function_field
s^-1 + O(s^19)

>>> m = K.completion(p, prec=infinity); m                                 # needs sage.rings.function_field
Completion map:
  From: Rational function field in x over Finite Field of size 2
  To:   Lazy Laurent Series Ring in s over Finite Field of size 2
>>> f = m(x); f                                                           # needs sage.rings.function_field
s^-1 + ...
>>> f.coefficient(Integer(100))                                                    # needs sage.rings.function_field
0

>>> # 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) - x, names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.maximal_order()
>>> decomp = O.decomposition(K.maximal_order().ideal(x - Integer(1)))
>>> pls = (decomp[Integer(0)][Integer(0)].place(), decomp[Integer(1)][Integer(0)].place())
>>> m = L.completion(pls[Integer(0)]); m
Completion map:
  From: Function field in y defined by y^2 - x
  To:   Laurent Series Ring in s over Rational Field
>>> xe = m(x)
>>> ye = m(y)
>>> ye**Integer(2) - xe == Integer(0)
True

>>> # needs sage.rings.function_field
>>> decomp2 = O.decomposition(K.maximal_order().ideal(x**Integer(2) + Integer(1)))
>>> pls2 = decomp2[Integer(0)][Integer(0)].place()
>>> m = L.completion(pls2); m
Completion map:
  From: Function field in y defined by y^2 - x
  To:   Laurent Series Ring in s over
         Number Field in a with defining polynomial x^4 + 2*x^2 + 4*x + 2
>>> xe = m(x)
>>> ye = m(y)
>>> ye**Integer(2) - xe == Integer(0)
True
# needs sage.rings.function_field
K.<x> = FunctionField(GF(2)); _.<Y> = K[]
L.<y> = K.extension(Y^2 + Y + x + 1/x)
p = L.places_finite()[0]
m = L.completion(p); m
m(x, 10)
m(y, 10)
# needs sage.rings.function_field
K.<x> = FunctionField(GF(2)); _.<Y> = K[]
L.<y> = K.extension(Y^2 + Y + x + 1/x)
p = L.places_finite()[0]
m = L.completion(p); m
m(x, 10)
m(y, 10)
K.<x> = FunctionField(GF(2))
p = K.places_finite()[0]; p                                           # needs sage.libs.pari
m = K.completion(p); m                                                # needs sage.rings.function_field
m(1/(x+1))                                                            # needs sage.rings.function_field
p = K.place_infinite(); p
m = K.completion(p); m                                                # needs sage.rings.function_field
m(x)                                                                  # needs sage.rings.function_field
m = K.completion(p, prec=infinity); m                                 # needs sage.rings.function_field
f = m(x); f                                                           # needs sage.rings.function_field
f.coefficient(100)                                                    # needs sage.rings.function_field
# needs sage.rings.function_field
K.<x> = FunctionField(QQ); _.<Y> = K[]
L.<y> = K.extension(Y^2 - x)
O = L.maximal_order()
decomp = O.decomposition(K.maximal_order().ideal(x - 1))
pls = (decomp[0][0].place(), decomp[1][0].place())
m = L.completion(pls[0]); m
xe = m(x)
ye = m(y)
ye^2 - xe == 0
# needs sage.rings.function_field
decomp2 = O.decomposition(K.maximal_order().ideal(x^2 + 1))
pls2 = decomp2[0][0].place()
m = L.completion(pls2); m
xe = m(x)
ye = m(y)
ye^2 - xe == 0
divisor_group()[source]

Return the group of divisors attached to the function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.divisor_group()                                                     # needs sage.modules
Divisor group of Rational function field in t over Rational Field

sage: _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (t^3 - 1)/(t^3 - 2))                        # needs sage.rings.function_field
sage: L.divisor_group()                                                     # needs sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (-t^3 + 1)/(t^3 - 2)

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.divisor_group()                                                     # needs sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.divisor_group()                                                     # needs sage.modules
Divisor group of Rational function field in t over Rational Field

>>> _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (t**Integer(3) - Integer(1))/(t**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.divisor_group()                                                     # needs sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (-t^3 + 1)/(t^3 - 2)

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.divisor_group()                                                     # needs sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
K.<t> = FunctionField(QQ)
K.divisor_group()                                                     # needs sage.modules
_.<Y> = K[]
L.<y> = K.extension(Y^3 - (t^3 - 1)/(t^3 - 2))                        # needs sage.rings.function_field
L.divisor_group()                                                     # needs sage.rings.function_field
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.divisor_group()                                                     # needs sage.rings.function_field
extension(f, names=None)[source]

Create an extension \(K(y)\) of this function field \(K\) extended with a root \(y\) of the univariate polynomial \(f\) over \(K\).

INPUT:

  • f – univariate polynomial over \(K\)

  • names – string or tuple of length 1 that names the variable \(y\)

OUTPUT: a function field

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: K.extension(y^5 - x^3 - 3*x + x*y)                                    # needs sage.rings.function_field
Function field in y defined by y^5 + x*y - x^3 - 3*x
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> K.extension(y**Integer(5) - x**Integer(3) - Integer(3)*x + x*y)                                    # needs sage.rings.function_field
Function field in y defined by y^5 + x*y - x^3 - 3*x
K.<x> = FunctionField(QQ); R.<y> = K[]
K.extension(y^5 - x^3 - 3*x + x*y)                                    # needs sage.rings.function_field

A nonintegral defining polynomial:

sage: K.<t> = FunctionField(QQ); R.<y> = K[]
sage: K.extension(y^3 + (1/t)*y + t^3/(t+1), 'z')                           # needs sage.rings.function_field
Function field in z defined by z^3 + 1/t*z + t^3/(t + 1)
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> K.extension(y**Integer(3) + (Integer(1)/t)*y + t**Integer(3)/(t+Integer(1)), 'z')                           # needs sage.rings.function_field
Function field in z defined by z^3 + 1/t*z + t^3/(t + 1)
K.<t> = FunctionField(QQ); R.<y> = K[]
K.extension(y^3 + (1/t)*y + t^3/(t+1), 'z')                           # needs sage.rings.function_field

The defining polynomial need not be monic or integral:

sage: K.extension(t*y^3 + (1/t)*y + t^3/(t+1))                              # needs sage.rings.function_field
Function field in y defined by t*y^3 + 1/t*y + t^3/(t + 1)
>>> from sage.all import *
>>> K.extension(t*y**Integer(3) + (Integer(1)/t)*y + t**Integer(3)/(t+Integer(1)))                              # needs sage.rings.function_field
Function field in y defined by t*y^3 + 1/t*y + t^3/(t + 1)
K.extension(t*y^3 + (1/t)*y + t^3/(t+1))                              # needs sage.rings.function_field
extension_constant_field(k)[source]

Return the constant field extension with constant field \(k\).

INPUT:

  • k – an extension field of the constant field of this function field

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: F.<y> = K.extension(Y^2 + Y + x + 1/x)
sage: E = F.extension_constant_field(GF(2^4))
sage: E
Function field in y defined by y^2 + y + (x^2 + 1)/x over its base
sage: E.constant_base_field()
Finite Field in z4 of size 2^4
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> F = K.extension(Y**Integer(2) + Y + x + Integer(1)/x, names=('y',)); (y,) = F._first_ngens(1)
>>> E = F.extension_constant_field(GF(Integer(2)**Integer(4)))
>>> E
Function field in y defined by y^2 + y + (x^2 + 1)/x over its base
>>> E.constant_base_field()
Finite Field in z4 of size 2^4
# needs sage.rings.function_field
K.<x> = FunctionField(GF(2)); _.<Y> = K[]
F.<y> = K.extension(Y^2 + Y + x + 1/x)
E = F.extension_constant_field(GF(2^4))
E
E.constant_base_field()
hilbert_symbol(a, b, P)[source]

Return the Hilbert symbol \((a,b)_{F_P}\) for the local field \(F_P\).

The local field \(F_P\) is the completion of this function field \(F\) at the place \(P\).

INPUT:

  • a, b – elements of this function field

  • P – a place of this function field

The Hilbert symbol \((a,b)_{F_P}\) is \(0\) if \(a\) or \(b\) is zero. Otherwise it takes the value \(1\) if the quaternion algebra defined by \((a,b)\) over \(F_P\) is split, and \(-1\) if said algebra is a division ring.

ALGORITHM:

For the valuation \(\nu = \nu_P\) of \(F\), we compute the valuations \(\nu(a)\) and \(\nu(b)\) as well as elements \(a_0\) and \(b_0\) of the residue field such that for a uniformizer \(\pi\) at \(P\), \(a\pi^{-\nu(a))}\) respectively \(b\pi^{-\nu(b)}\) has the residue class \(a_0\) respectively \(b_0\) modulo \(\pi\). Then the Hilbert symbol is computed by formula 12.4.10 in [Voi2021].

Currently only implemented for global function fields.

EXAMPLES:

sage: K.<x> = FunctionField(GF(17))
sage: P = K.places()[0]; P
Place (1/x)
sage: a = (5*x + 6)/(x + 15)
sage: b = 7/x
sage: K.hilbert_symbol(a, b, P)
-1

sage: Q = K.places()[7]; Q
Place (x + 6)
sage: c = 15*x + 12
sage: d = 16/(x + 13)
sage: K.hilbert_symbol(c, d, Q)
1
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(17)), names=('x',)); (x,) = K._first_ngens(1)
>>> P = K.places()[Integer(0)]; P
Place (1/x)
>>> a = (Integer(5)*x + Integer(6))/(x + Integer(15))
>>> b = Integer(7)/x
>>> K.hilbert_symbol(a, b, P)
-1

>>> Q = K.places()[Integer(7)]; Q
Place (x + 6)
>>> c = Integer(15)*x + Integer(12)
>>> d = Integer(16)/(x + Integer(13))
>>> K.hilbert_symbol(c, d, Q)
1
K.<x> = FunctionField(GF(17))
P = K.places()[0]; P
a = (5*x + 6)/(x + 15)
b = 7/x
K.hilbert_symbol(a, b, P)
Q = K.places()[7]; Q
c = 15*x + 12
d = 16/(x + 13)
K.hilbert_symbol(c, d, Q)

Check that the Hilbert symbol is symmetric and bimultiplicative:

sage: K.<x> = FunctionField(GF(5)); R.<T> = PolynomialRing(K)
sage: f = ((x^2 + 2*x + 2)*T^5 + (4*x^2 + 2*x + 3)*T^4 + 3*T^3 + 4*T^2
....:     + (2/(x^2 + 4*x + 1))*T + 3*x^2 + 2*x + 4)
sage: L.<y> = K.extension(f)
sage: a = L.random_element()
sage: b = L.random_element()
sage: c = L.random_element()
sage: P = L.places_above(K.places()[0])[1]
sage: Q = L.places_above(K.places()[1])[0]

sage: hP_a_c = L.hilbert_symbol(a, c, P)
sage: hP_a_c == L.hilbert_symbol(c, a, P)
True
sage: L.hilbert_symbol(a, b, P) * hP_a_c == L.hilbert_symbol(a, b*c, P)
True
sage: hP_a_c * L.hilbert_symbol(b, c, P) == L.hilbert_symbol(a*b, c, P)
True

sage: hQ_a_c = L.hilbert_symbol(a, c, Q)
sage: hQ_a_c == L.hilbert_symbol(c, a, Q)
True
sage: L.hilbert_symbol(a, b, Q) * hQ_a_c == L.hilbert_symbol(a, b*c, Q)
True
sage: hQ_a_c * L.hilbert_symbol(b, c, Q) == L.hilbert_symbol(a*b, c, Q)
True
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); R = PolynomialRing(K, names=('T',)); (T,) = R._first_ngens(1)
>>> f = ((x**Integer(2) + Integer(2)*x + Integer(2))*T**Integer(5) + (Integer(4)*x**Integer(2) + Integer(2)*x + Integer(3))*T**Integer(4) + Integer(3)*T**Integer(3) + Integer(4)*T**Integer(2)
...     + (Integer(2)/(x**Integer(2) + Integer(4)*x + Integer(1)))*T + Integer(3)*x**Integer(2) + Integer(2)*x + Integer(4))
>>> L = K.extension(f, names=('y',)); (y,) = L._first_ngens(1)
>>> a = L.random_element()
>>> b = L.random_element()
>>> c = L.random_element()
>>> P = L.places_above(K.places()[Integer(0)])[Integer(1)]
>>> Q = L.places_above(K.places()[Integer(1)])[Integer(0)]

>>> hP_a_c = L.hilbert_symbol(a, c, P)
>>> hP_a_c == L.hilbert_symbol(c, a, P)
True
>>> L.hilbert_symbol(a, b, P) * hP_a_c == L.hilbert_symbol(a, b*c, P)
True
>>> hP_a_c * L.hilbert_symbol(b, c, P) == L.hilbert_symbol(a*b, c, P)
True

>>> hQ_a_c = L.hilbert_symbol(a, c, Q)
>>> hQ_a_c == L.hilbert_symbol(c, a, Q)
True
>>> L.hilbert_symbol(a, b, Q) * hQ_a_c == L.hilbert_symbol(a, b*c, Q)
True
>>> hQ_a_c * L.hilbert_symbol(b, c, Q) == L.hilbert_symbol(a*b, c, Q)
True
K.<x> = FunctionField(GF(5)); R.<T> = PolynomialRing(K)
f = ((x^2 + 2*x + 2)*T^5 + (4*x^2 + 2*x + 3)*T^4 + 3*T^3 + 4*T^2
    + (2/(x^2 + 4*x + 1))*T + 3*x^2 + 2*x + 4)
L.<y> = K.extension(f)
a = L.random_element()
b = L.random_element()
c = L.random_element()
P = L.places_above(K.places()[0])[1]
Q = L.places_above(K.places()[1])[0]
hP_a_c = L.hilbert_symbol(a, c, P)
hP_a_c == L.hilbert_symbol(c, a, P)
L.hilbert_symbol(a, b, P) * hP_a_c == L.hilbert_symbol(a, b*c, P)
hP_a_c * L.hilbert_symbol(b, c, P) == L.hilbert_symbol(a*b, c, P)
hQ_a_c = L.hilbert_symbol(a, c, Q)
hQ_a_c == L.hilbert_symbol(c, a, Q)
L.hilbert_symbol(a, b, Q) * hQ_a_c == L.hilbert_symbol(a, b*c, Q)
hQ_a_c * L.hilbert_symbol(b, c, Q) == L.hilbert_symbol(a*b, c, Q)
is_finite()[source]

Return whether the function field is finite, which is false.

EXAMPLES:

sage: R.<t> = FunctionField(QQ)
sage: R.is_finite()
False
sage: R.<t> = FunctionField(GF(7))
sage: R.is_finite()
False
>>> from sage.all import *
>>> R = FunctionField(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> R.is_finite()
False
>>> R = FunctionField(GF(Integer(7)), names=('t',)); (t,) = R._first_ngens(1)
>>> R.is_finite()
False
R.<t> = FunctionField(QQ)
R.is_finite()
R.<t> = FunctionField(GF(7))
R.is_finite()
is_global()[source]

Return whether the function field is global, that is, whether the constant field is finite.

EXAMPLES:

sage: R.<t> = FunctionField(QQ)
sage: R.is_global()
False
sage: R.<t> = FunctionField(QQbar)                                          # needs sage.rings.number_field
sage: R.is_global()
False
sage: R.<t> = FunctionField(GF(7))
sage: R.is_global()
True
>>> from sage.all import *
>>> R = FunctionField(QQ, names=('t',)); (t,) = R._first_ngens(1)
>>> R.is_global()
False
>>> R = FunctionField(QQbar, names=('t',)); (t,) = R._first_ngens(1)# needs sage.rings.number_field
>>> R.is_global()
False
>>> R = FunctionField(GF(Integer(7)), names=('t',)); (t,) = R._first_ngens(1)
>>> R.is_global()
True
R.<t> = FunctionField(QQ)
R.is_global()
R.<t> = FunctionField(QQbar)                                          # needs sage.rings.number_field
R.is_global()
R.<t> = FunctionField(GF(7))
R.is_global()
is_perfect()[source]

Return whether the field is perfect, i.e., its characteristic \(p\) is zero or every element has a \(p\)-th root.

EXAMPLES:

sage: FunctionField(QQ, 'x').is_perfect()
True
sage: FunctionField(GF(2), 'x').is_perfect()
False
>>> from sage.all import *
>>> FunctionField(QQ, 'x').is_perfect()
True
>>> FunctionField(GF(Integer(2)), 'x').is_perfect()
False
FunctionField(QQ, 'x').is_perfect()
FunctionField(GF(2), 'x').is_perfect()
jacobian(model=None, base_div=None, **kwds)[source]

Return the Jacobian of the function field.

INPUT:

  • model – (default: 'hess') model to use for arithmetic

  • base_div – an effective divisor

The degree of the base divisor should satisfy certain degree condition corresponding to the model used. The following table lists these conditions. Let \(g\) be the genus of the function field.

  • hess: ideal-based arithmetic; requires base divisor of degree \(g\)

  • km_large: Khuri-Makdisi’s large model; requires base divisor of degree at least \(2g + 1\)

  • km_medium: Khuri-Makdisi’s medium model; requires base divisor of degree at least \(2g + 1\)

  • km_small: Khuri-Makdisi’s small model requires base divisor of degree at least \(g + 1\)

We assume the function field has a rational place. If a base divisor is not given, one is constructed using an arbitrary rational place.

EXAMPLES:

sage: A.<x,y> = AffineSpace(GF(5), 2)
sage: C = Curve(y^2*(x^3 - 1) - (x^3 - 2))
sage: F = C.function_field()
sage: F.jacobian()
Jacobian of Function field in y defined by (x^3 + 4)*y^2 + 4*x^3 + 2 (Hess model)
>>> from sage.all import *
>>> A = AffineSpace(GF(Integer(5)), Integer(2), names=('x', 'y',)); (x, y,) = A._first_ngens(2)
>>> C = Curve(y**Integer(2)*(x**Integer(3) - Integer(1)) - (x**Integer(3) - Integer(2)))
>>> F = C.function_field()
>>> F.jacobian()
Jacobian of Function field in y defined by (x^3 + 4)*y^2 + 4*x^3 + 2 (Hess model)
A.<x,y> = AffineSpace(GF(5), 2)
C = Curve(y^2*(x^3 - 1) - (x^3 - 2))
F = C.function_field()
F.jacobian()
order(x, check=True)[source]

Return the order generated by x over the base maximal order.

INPUT:

  • x – element or list of elements of the function field

  • check – boolean; if True, check that x really generates an order

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^3 + x^3 + 4*x + 1)
sage: O = L.order(y); O                                                     # needs sage.modules
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # needs sage.modules
(1, y, y^2)

sage: Z = K.order(x); Z                                                     # needs sage.rings.function_field
Order in Rational function field in x over Rational Field
sage: Z.basis()                                                             # needs sage.rings.function_field
(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(3) + x**Integer(3) + Integer(4)*x + Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.order(y); O                                                     # needs sage.modules
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
>>> O.basis()                                                             # needs sage.modules
(1, y, y^2)

>>> Z = K.order(x); Z                                                     # needs sage.rings.function_field
Order in Rational function field in x over Rational Field
>>> Z.basis()                                                             # needs sage.rings.function_field
(1,)
# needs sage.rings.function_field
K.<x> = FunctionField(QQ); R.<y> = K[]
L.<y> = K.extension(y^3 + x^3 + 4*x + 1)
O = L.order(y); O                                                     # needs sage.modules
O.basis()                                                             # needs sage.modules
Z = K.order(x); Z                                                     # needs sage.rings.function_field
Z.basis()                                                             # needs sage.rings.function_field

Orders with multiple generators are not yet supported:

sage: Z = K.order([x, x^2]); Z                                              # needs sage.rings.function_field
Traceback (most recent call last):
...
NotImplementedError
>>> from sage.all import *
>>> Z = K.order([x, x**Integer(2)]); Z                                              # needs sage.rings.function_field
Traceback (most recent call last):
...
NotImplementedError
Z = K.order([x, x^2]); Z                                              # needs sage.rings.function_field
order_infinite(x, check=True)[source]

Return the order generated by x over the maximal infinite order.

INPUT:

  • x – element or a list of elements of the function field

  • check – boolean; if True, check that x really generates an order

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^3 + x^3 + 4*x + 1)                              # needs sage.rings.function_field
sage: L.order_infinite(y)           # not implemented                       # needs sage.rings.function_field

sage: Z = K.order(x); Z                                                     # needs sage.modules
Order in Rational function field in x over Rational Field
sage: Z.basis()                                                             # needs sage.modules
(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(3) + x**Integer(3) + Integer(4)*x + Integer(1), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.order_infinite(y)           # not implemented                       # needs sage.rings.function_field

>>> Z = K.order(x); Z                                                     # needs sage.modules
Order in Rational function field in x over Rational Field
>>> Z.basis()                                                             # needs sage.modules
(1,)
K.<x> = FunctionField(QQ); R.<y> = K[]
L.<y> = K.extension(y^3 + x^3 + 4*x + 1)                              # needs sage.rings.function_field
L.order_infinite(y)           # not implemented                       # needs sage.rings.function_field
Z = K.order(x); Z                                                     # needs sage.modules
Z.basis()                                                             # needs sage.modules

Orders with multiple generators, not yet supported:

sage: Z = K.order_infinite([x, x^2]); Z
Traceback (most recent call last):
...
NotImplementedError
>>> from sage.all import *
>>> Z = K.order_infinite([x, x**Integer(2)]); Z
Traceback (most recent call last):
...
NotImplementedError
Z = K.order_infinite([x, x^2]); Z
order_infinite_with_basis(basis, check=True)[source]

Return the order with given basis over the maximal infinite order of the base field.

INPUT:

  • basis – list of elements of the function field

  • check – boolean (default: True); if True, check that the basis is really linearly independent and that the module it spans is closed under multiplication, and contains the identity element.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^3 + x^3 + 4*x + 1)
sage: O = L.order_infinite_with_basis([1, 1/x*y, 1/x^2*y^2]); O
Infinite order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()
(1, 1/x*y, 1/x^2*y^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(3) + x**Integer(3) + Integer(4)*x + Integer(1), names=('y',)); (y,) = L._first_ngens(1)
>>> O = L.order_infinite_with_basis([Integer(1), Integer(1)/x*y, Integer(1)/x**Integer(2)*y**Integer(2)]); O
Infinite order in Function field in y defined by y^3 + x^3 + 4*x + 1
>>> O.basis()
(1, 1/x*y, 1/x^2*y^2)
# needs sage.rings.function_field
K.<x> = FunctionField(QQ); R.<y> = K[]
L.<y> = K.extension(y^3 + x^3 + 4*x + 1)
O = L.order_infinite_with_basis([1, 1/x*y, 1/x^2*y^2]); O
O.basis()

Note that 1 does not need to be an element of the basis, as long it is in the module spanned by it:

sage: O = L.order_infinite_with_basis([1+1/x*y,1/x*y, 1/x^2*y^2]); O        # needs sage.rings.function_field
Infinite order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # needs sage.rings.function_field
(1/x*y + 1, 1/x*y, 1/x^2*y^2)
>>> from sage.all import *
>>> O = L.order_infinite_with_basis([Integer(1)+Integer(1)/x*y,Integer(1)/x*y, Integer(1)/x**Integer(2)*y**Integer(2)]); O        # needs sage.rings.function_field
Infinite order in Function field in y defined by y^3 + x^3 + 4*x + 1
>>> O.basis()                                                             # needs sage.rings.function_field
(1/x*y + 1, 1/x*y, 1/x^2*y^2)
O = L.order_infinite_with_basis([1+1/x*y,1/x*y, 1/x^2*y^2]); O        # needs sage.rings.function_field
O.basis()                                                             # needs sage.rings.function_field

The following error is raised when the module spanned by the basis is not closed under multiplication:

sage: O = L.order_infinite_with_basis([1,y, 1/x^2*y^2]); O                  # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the module generated by basis (1, y, 1/x^2*y^2) must be closed under multiplication
>>> from sage.all import *
>>> O = L.order_infinite_with_basis([Integer(1),y, Integer(1)/x**Integer(2)*y**Integer(2)]); O                  # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the module generated by basis (1, y, 1/x^2*y^2) must be closed under multiplication
O = L.order_infinite_with_basis([1,y, 1/x^2*y^2]); O                  # needs sage.rings.function_field

and this happens when the identity is not in the module spanned by the basis:

sage: O = L.order_infinite_with_basis([1/x,1/x*y, 1/x^2*y^2])               # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the identity element must be in the module spanned by basis (1/x, 1/x*y, 1/x^2*y^2)
>>> from sage.all import *
>>> O = L.order_infinite_with_basis([Integer(1)/x,Integer(1)/x*y, Integer(1)/x**Integer(2)*y**Integer(2)])               # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the identity element must be in the module spanned by basis (1/x, 1/x*y, 1/x^2*y^2)
O = L.order_infinite_with_basis([1/x,1/x*y, 1/x^2*y^2])               # needs sage.rings.function_field
order_with_basis(basis, check=True)[source]

Return the order with given basis over the maximal order of the base field.

INPUT:

  • basis – list of elements of this function field

  • check – boolean (default: True); if True, check that the basis is really linearly independent and that the module it spans is closed under multiplication, and contains the identity element.

OUTPUT: an order in the function field

EXAMPLES:

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

Note that 1 does not need to be an element of the basis, as long it is in the module spanned by it:

sage: O = L.order_with_basis([1+y, y, y^2]); O                              # needs sage.rings.function_field
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # needs sage.rings.function_field
(y + 1, y, y^2)
>>> from sage.all import *
>>> O = L.order_with_basis([Integer(1)+y, y, y**Integer(2)]); O                              # needs sage.rings.function_field
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
>>> O.basis()                                                             # needs sage.rings.function_field
(y + 1, y, y^2)
O = L.order_with_basis([1+y, y, y^2]); O                              # needs sage.rings.function_field
O.basis()                                                             # needs sage.rings.function_field

The following error is raised when the module spanned by the basis is not closed under multiplication:

sage: O = L.order_with_basis([1, x^2 + x*y, (2/3)*y^2]); O                  # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the module generated by basis (1, x*y + x^2, 2/3*y^2) must be closed under multiplication
>>> from sage.all import *
>>> O = L.order_with_basis([Integer(1), x**Integer(2) + x*y, (Integer(2)/Integer(3))*y**Integer(2)]); O                  # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the module generated by basis (1, x*y + x^2, 2/3*y^2) must be closed under multiplication
O = L.order_with_basis([1, x^2 + x*y, (2/3)*y^2]); O                  # needs sage.rings.function_field

and this happens when the identity is not in the module spanned by the basis:

sage: O = L.order_with_basis([x, x^2 + x*y, (2/3)*y^2])                     # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the identity element must be in the module spanned by basis (x, x*y + x^2, 2/3*y^2)
>>> from sage.all import *
>>> O = L.order_with_basis([x, x**Integer(2) + x*y, (Integer(2)/Integer(3))*y**Integer(2)])                     # needs sage.rings.function_field
Traceback (most recent call last):
...
ValueError: the identity element must be in the module spanned by basis (x, x*y + x^2, 2/3*y^2)
O = L.order_with_basis([x, x^2 + x*y, (2/3)*y^2])                     # needs sage.rings.function_field
place_set()[source]

Return the set of all places of the function field.

EXAMPLES:

sage: K.<t> = FunctionField(GF(7))
sage: K.place_set()
Set of places of Rational function field in t over Finite Field of size 7

sage: K.<t> = FunctionField(QQ)
sage: K.place_set()
Set of places of Rational function field in t over Rational Field

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)                                # needs sage.rings.function_field
sage: L.place_set()                                                         # needs sage.rings.function_field
Set of places of Function field in y defined by y^2 + y + (x^2 + 1)/x
>>> from sage.all import *
>>> K = FunctionField(GF(Integer(7)), names=('t',)); (t,) = K._first_ngens(1)
>>> K.place_set()
Set of places of Rational function field in t over Finite Field of size 7

>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.place_set()
Set of places of Rational function field in t over Rational 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)# needs sage.rings.function_field
>>> L.place_set()                                                         # needs sage.rings.function_field
Set of places of Function field in y defined by y^2 + y + (x^2 + 1)/x
K.<t> = FunctionField(GF(7))
K.place_set()
K.<t> = FunctionField(QQ)
K.place_set()
K.<x> = FunctionField(GF(2)); _.<Y> = K[]
L.<y> = K.extension(Y^2 + Y + x + 1/x)                                # needs sage.rings.function_field
L.place_set()                                                         # needs sage.rings.function_field
rational_function_field()[source]

Return the rational function field from which this field has been created as an extension.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: K.rational_function_field()
Rational function field in x over Rational Field

sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)                                          # needs sage.rings.function_field
sage: L.rational_function_field()                                           # needs sage.rings.function_field
Rational function field in x over Rational Field

sage: R.<z> = L[]                                                           # needs sage.rings.function_field
sage: M.<z> = L.extension(z^2 - y)                                          # needs sage.rings.function_field
sage: M.rational_function_field()                                           # needs sage.rings.function_field
Rational function field in x over Rational Field
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> K.rational_function_field()
Rational function field in x over Rational Field

>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.rational_function_field()                                           # needs sage.rings.function_field
Rational function field in x over Rational Field

>>> R = L['z']; (z,) = R._first_ngens(1)# needs sage.rings.function_field
>>> M = L.extension(z**Integer(2) - y, names=('z',)); (z,) = M._first_ngens(1)# needs sage.rings.function_field
>>> M.rational_function_field()                                           # needs sage.rings.function_field
Rational function field in x over Rational Field
K.<x> = FunctionField(QQ)
K.rational_function_field()
R.<y> = K[]
L.<y> = K.extension(y^2 - x)                                          # needs sage.rings.function_field
L.rational_function_field()                                           # needs sage.rings.function_field
R.<z> = L[]                                                           # needs sage.rings.function_field
M.<z> = L.extension(z^2 - y)                                          # needs sage.rings.function_field
M.rational_function_field()                                           # needs sage.rings.function_field
some_elements()[source]

Return some elements in this function field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: K.some_elements()
[1,
 x,
 2*x,
 x/(x^2 + 2*x + 1),
 1/x^2,
 x/(x^2 - 1),
 x/(x^2 + 1),
 1/2*x/(x^2 + 1),
 0,
 1/x,
 ...]
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> K.some_elements()
[1,
 x,
 2*x,
 x/(x^2 + 2*x + 1),
 1/x^2,
 x/(x^2 - 1),
 x/(x^2 + 1),
 1/2*x/(x^2 + 1),
 0,
 1/x,
 ...]
K.<x> = FunctionField(QQ)
K.some_elements()
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)                                           # needs sage.rings.function_field
sage: L.some_elements()                                                      # needs sage.rings.function_field
[1,
 y,
 1/x*y,
 ((x + 1)/(x^2 - 2*x + 1))*y - 2*x/(x^2 - 2*x + 1),
 1/x,
 (1/(x - 1))*y,
 (1/(x + 1))*y,
 (1/2/(x + 1))*y,
 0,
 ...]
>>> from sage.all import *
>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.some_elements()                                                      # needs sage.rings.function_field
[1,
 y,
 1/x*y,
 ((x + 1)/(x^2 - 2*x + 1))*y - 2*x/(x^2 - 2*x + 1),
 1/x,
 (1/(x - 1))*y,
 (1/(x + 1))*y,
 (1/2/(x + 1))*y,
 0,
 ...]
R.<y> = K[]
L.<y> = K.extension(y^2 - x)                                           # needs sage.rings.function_field
L.some_elements()                                                      # needs sage.rings.function_field
>>> from sage.all import *
>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(2) - x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.some_elements()                                                      # needs sage.rings.function_field
[1,
 y,
 1/x*y,
 ((x + 1)/(x^2 - 2*x + 1))*y - 2*x/(x^2 - 2*x + 1),
 1/x,
 (1/(x - 1))*y,
 (1/(x + 1))*y,
 (1/2/(x + 1))*y,
 0,
 ...]
R.<y> = K[]
L.<y> = K.extension(y^2 - x)                                           # needs sage.rings.function_field
L.some_elements()                                                      # needs sage.rings.function_field
space_of_differentials()[source]

Return the space of differentials attached to the function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.space_of_differentials()                                            # needs sage.modules
Space of differentials of Rational function field in t over Rational Field

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.space_of_differentials()                                            # needs sage.rings.function_field
Space of differentials of Function field in y
 defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.space_of_differentials()                                            # needs sage.modules
Space of differentials of Rational function field in t over Rational Field

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.space_of_differentials()                                            # needs sage.rings.function_field
Space of differentials of Function field in y
 defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
K.<t> = FunctionField(QQ)
K.space_of_differentials()                                            # needs sage.modules
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.space_of_differentials()                                            # needs sage.rings.function_field
space_of_differentials_of_first_kind()[source]

Return the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
(Vector space of dimension 0 over Rational Field,
 Linear map:
   From: Vector space of dimension 0 over Rational Field
   To:   Space of differentials of Rational function field in t over Rational Field,
 Section of linear map:
   From: Space of differentials of Rational function field in t over Rational Field
   To:   Vector space of dimension 0 over Rational Field)

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
(Vector space of dimension 4 over Finite Field of size 5,
 Linear map:
   From: Vector space of dimension 4 over Finite Field of size 5
   To:   Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3),
 Section of linear map:
   From: Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
   To:   Vector space of dimension 4 over Finite Field of size 5)
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
(Vector space of dimension 0 over Rational Field,
 Linear map:
   From: Vector space of dimension 0 over Rational Field
   To:   Space of differentials of Rational function field in t over Rational Field,
 Section of linear map:
   From: Space of differentials of Rational function field in t over Rational Field
   To:   Vector space of dimension 0 over Rational Field)

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
(Vector space of dimension 4 over Finite Field of size 5,
 Linear map:
   From: Vector space of dimension 4 over Finite Field of size 5
   To:   Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3),
 Section of linear map:
   From: Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
   To:   Vector space of dimension 4 over Finite Field of size 5)
K.<t> = FunctionField(QQ)
K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
space_of_holomorphic_differentials()[source]

Return the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
(Vector space of dimension 0 over Rational Field,
 Linear map:
   From: Vector space of dimension 0 over Rational Field
   To:   Space of differentials of Rational function field in t over Rational Field,
 Section of linear map:
   From: Space of differentials of Rational function field in t over Rational Field
   To:   Vector space of dimension 0 over Rational Field)

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
sage: L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
(Vector space of dimension 4 over Finite Field of size 5,
 Linear map:
   From: Vector space of dimension 4 over Finite Field of size 5
   To:   Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3),
 Section of linear map:
   From: Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
   To:   Vector space of dimension 4 over Finite Field of size 5)
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('t',)); (t,) = K._first_ngens(1)
>>> K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
(Vector space of dimension 0 over Rational Field,
 Linear map:
   From: Vector space of dimension 0 over Rational Field
   To:   Space of differentials of Rational function field in t over Rational Field,
 Section of linear map:
   From: Space of differentials of Rational function field in t over Rational Field
   To:   Vector space of dimension 0 over Rational Field)

>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) - (x**Integer(3) - Integer(1))/(x**Integer(3) - Integer(2)), names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
(Vector space of dimension 4 over Finite Field of size 5,
 Linear map:
   From: Vector space of dimension 4 over Finite Field of size 5
   To:   Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3),
 Section of linear map:
   From: Space of differentials of Function field in y
          defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
   To:   Vector space of dimension 4 over Finite Field of size 5)
K.<t> = FunctionField(QQ)
K.space_of_holomorphic_differentials()                                # needs sage.libs.pari sage.modules
K.<x> = FunctionField(GF(5)); _.<Y> = K[]
L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # needs sage.rings.function_field
L.space_of_holomorphic_differentials()                                # needs sage.rings.function_field
valuation(prime)[source]

Return the discrete valuation on this function field defined by prime.

INPUT:

  • prime – a place of the function field, a valuation on a subring, or a valuation on another function field together with information for isomorphisms to and from that function field

EXAMPLES:

We create valuations that correspond to finite rational places of a function field:

sage: K.<x> = FunctionField(QQ)
sage: v = K.valuation(1); v                                                 # needs sage.rings.function_field
(x - 1)-adic valuation
sage: v(x)                                                                  # needs sage.rings.function_field
0
sage: v(x - 1)                                                              # needs sage.rings.function_field
1
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> v = K.valuation(Integer(1)); v                                                 # needs sage.rings.function_field
(x - 1)-adic valuation
>>> v(x)                                                                  # needs sage.rings.function_field
0
>>> v(x - Integer(1))                                                              # needs sage.rings.function_field
1
K.<x> = FunctionField(QQ)
v = K.valuation(1); v                                                 # needs sage.rings.function_field
v(x)                                                                  # needs sage.rings.function_field
v(x - 1)                                                              # needs sage.rings.function_field

A place can also be specified with an irreducible polynomial:

sage: v = K.valuation(x - 1); v                                             # needs sage.rings.function_field
(x - 1)-adic valuation
>>> from sage.all import *
>>> v = K.valuation(x - Integer(1)); v                                             # needs sage.rings.function_field
(x - 1)-adic valuation
v = K.valuation(x - 1); v                                             # needs sage.rings.function_field

Similarly, for a finite non-rational place:

sage: v = K.valuation(x^2 + 1); v                                           # needs sage.rings.function_field
(x^2 + 1)-adic valuation
sage: v(x^2 + 1)                                                            # needs sage.rings.function_field
1
sage: v(x)                                                                  # needs sage.rings.function_field
0
>>> from sage.all import *
>>> v = K.valuation(x**Integer(2) + Integer(1)); v                                           # needs sage.rings.function_field
(x^2 + 1)-adic valuation
>>> v(x**Integer(2) + Integer(1))                                                            # needs sage.rings.function_field
1
>>> v(x)                                                                  # needs sage.rings.function_field
0
v = K.valuation(x^2 + 1); v                                           # needs sage.rings.function_field
v(x^2 + 1)                                                            # needs sage.rings.function_field
v(x)                                                                  # needs sage.rings.function_field

Or for the infinite place:

sage: v = K.valuation(1/x); v                                               # needs sage.rings.function_field
Valuation at the infinite place
sage: v(x)                                                                  # needs sage.rings.function_field
-1
>>> from sage.all import *
>>> v = K.valuation(Integer(1)/x); v                                               # needs sage.rings.function_field
Valuation at the infinite place
>>> v(x)                                                                  # needs sage.rings.function_field
-1
v = K.valuation(1/x); v                                               # needs sage.rings.function_field
v(x)                                                                  # needs sage.rings.function_field

Instead of specifying a generator of a place, we can define a valuation on a rational function field by giving a discrete valuation on the underlying polynomial ring:

sage: # needs sage.rings.function_field
sage: R.<x> = QQ[]
sage: u = valuations.GaussValuation(R, valuations.TrivialValuation(QQ))
sage: w = u.augmentation(x - 1, 1)
sage: v = K.valuation(w); v
(x - 1)-adic valuation
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> R = QQ['x']; (x,) = R._first_ngens(1)
>>> u = valuations.GaussValuation(R, valuations.TrivialValuation(QQ))
>>> w = u.augmentation(x - Integer(1), Integer(1))
>>> v = K.valuation(w); v
(x - 1)-adic valuation
# needs sage.rings.function_field
R.<x> = QQ[]
u = valuations.GaussValuation(R, valuations.TrivialValuation(QQ))
w = u.augmentation(x - 1, 1)
v = K.valuation(w); v

Note that this allows us to specify valuations which do not correspond to a place of the function field:

sage: w = valuations.GaussValuation(R, QQ.valuation(2))                     # needs sage.rings.function_field
sage: v = K.valuation(w); v                                                 # needs sage.rings.function_field
2-adic valuation
>>> from sage.all import *
>>> w = valuations.GaussValuation(R, QQ.valuation(Integer(2)))                     # needs sage.rings.function_field
>>> v = K.valuation(w); v                                                 # needs sage.rings.function_field
2-adic valuation
w = valuations.GaussValuation(R, QQ.valuation(2))                     # needs sage.rings.function_field
v = K.valuation(w); v                                                 # needs sage.rings.function_field

The same is possible for valuations with \(v(1/x) > 0\) by passing in an extra pair of parameters, an isomorphism between this function field and an isomorphic function field. That way you can, for example, indicate that the valuation is to be understood as a valuation on \(K[1/x]\), i.e., after applying the substitution \(x \mapsto 1/x\) (here, the inverse map is also \(x \mapsto 1/x\)):

sage: # needs sage.rings.function_field
sage: w = valuations.GaussValuation(R, QQ.valuation(2)).augmentation(x, 1)
sage: w = K.valuation(w)
sage: v = K.valuation((w, K.hom([~K.gen()]), K.hom([~K.gen()]))); v
Valuation on rational function field
induced by [ Gauss valuation induced by 2-adic valuation, v(x) = 1 ]
(in Rational function field in x over Rational Field after x |--> 1/x)
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> w = valuations.GaussValuation(R, QQ.valuation(Integer(2))).augmentation(x, Integer(1))
>>> w = K.valuation(w)
>>> v = K.valuation((w, K.hom([~K.gen()]), K.hom([~K.gen()]))); v
Valuation on rational function field
induced by [ Gauss valuation induced by 2-adic valuation, v(x) = 1 ]
(in Rational function field in x over Rational Field after x |--> 1/x)
# needs sage.rings.function_field
w = valuations.GaussValuation(R, QQ.valuation(2)).augmentation(x, 1)
w = K.valuation(w)
v = K.valuation((w, K.hom([~K.gen()]), K.hom([~K.gen()]))); v

Note that classical valuations at finite places or the infinite place are always normalized such that the uniformizing element has valuation 1:

sage: # needs sage.rings.function_field
sage: K.<t> = FunctionField(GF(3))
sage: M.<x> = FunctionField(K)
sage: v = M.valuation(x^3 - t)
sage: v(x^3 - t)
1
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(3)), names=('t',)); (t,) = K._first_ngens(1)
>>> M = FunctionField(K, names=('x',)); (x,) = M._first_ngens(1)
>>> v = M.valuation(x**Integer(3) - t)
>>> v(x**Integer(3) - t)
1
# needs sage.rings.function_field
K.<t> = FunctionField(GF(3))
M.<x> = FunctionField(K)
v = M.valuation(x^3 - t)
v(x^3 - t)

However, if such a valuation comes out of a base change of the ground field, this is not the case anymore. In the example below, the unique extension of v to L still has valuation 1 on \(x^3 - t\) but it has valuation 1/3 on its uniformizing element \(x - w\):

sage: # needs sage.rings.function_field
sage: R.<w> = K[]
sage: L.<w> = K.extension(w^3 - t)
sage: N.<x> = FunctionField(L)
sage: w = v.extension(N)  # missing factorization, :issue:`16572`
Traceback (most recent call last):
...
NotImplementedError
sage: w(x^3 - t)                    # not tested
1
sage: w(x - w)                      # not tested
1/3
>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> R = K['w']; (w,) = R._first_ngens(1)
>>> L = K.extension(w**Integer(3) - t, names=('w',)); (w,) = L._first_ngens(1)
>>> N = FunctionField(L, names=('x',)); (x,) = N._first_ngens(1)
>>> w = v.extension(N)  # missing factorization, :issue:`16572`
Traceback (most recent call last):
...
NotImplementedError
>>> w(x**Integer(3) - t)                    # not tested
1
>>> w(x - w)                      # not tested
1/3
# needs sage.rings.function_field
R.<w> = K[]
L.<w> = K.extension(w^3 - t)
N.<x> = FunctionField(L)
w = v.extension(N)  # missing factorization, :issue:`16572`
w(x^3 - t)                    # not tested
w(x - w)                      # not tested

There are several ways to create valuations on extensions of rational function fields:

sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x); L                                       # needs sage.rings.function_field
Function field in y defined by y^2 - x
>>> 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, names=('y',)); (y,) = L._first_ngens(1); L                                       # needs sage.rings.function_field
Function field in y defined by y^2 - x
K.<x> = FunctionField(QQ)
R.<y> = K[]
L.<y> = K.extension(y^2 - x); L                                       # needs sage.rings.function_field

A place that has a unique extension can just be defined downstairs:

sage: v = L.valuation(x); v                                                 # needs sage.rings.function_field
(x)-adic valuation
>>> from sage.all import *
>>> v = L.valuation(x); v                                                 # needs sage.rings.function_field
(x)-adic valuation
v = L.valuation(x); v                                                 # needs sage.rings.function_field
sage.rings.function_field.function_field.is_FunctionField(x)[source]

Return True if x is a function field.

EXAMPLES:

sage: from sage.rings.function_field.function_field import is_FunctionField
sage: is_FunctionField(QQ)
doctest:warning...
DeprecationWarning: The function is_FunctionField is deprecated; use '... in FunctionFields()' instead.
See https://github.com/sagemath/sage/issues/38289 for details.
False
sage: is_FunctionField(FunctionField(QQ, 't'))
True
>>> from sage.all import *
>>> from sage.rings.function_field.function_field import is_FunctionField
>>> is_FunctionField(QQ)
doctest:warning...
DeprecationWarning: The function is_FunctionField is deprecated; use '... in FunctionFields()' instead.
See https://github.com/sagemath/sage/issues/38289 for details.
False
>>> is_FunctionField(FunctionField(QQ, 't'))
True
from sage.rings.function_field.function_field import is_FunctionField
is_FunctionField(QQ)
is_FunctionField(FunctionField(QQ, 't'))