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: K.<x> = FunctionField(GF(5^2,'a')); K                                         # optional - sage.rings.finite_rings
Rational function field in x over Finite Field in a of size 5^2
sage: K.genus()                                                                     # optional - sage.rings.finite_rings
0
sage: f = (x^2 + x + 1) / (x^3 + 1)                                                 # optional - sage.rings.finite_rings
sage: f                                                                             # optional - sage.rings.finite_rings
(x^2 + x + 1)/(x^3 + 1)
sage: f^3                                                                           # optional - sage.rings.finite_rings
(x^6 + 3*x^5 + x^4 + 2*x^3 + x^2 + 3*x + 1)/(x^9 + 3*x^6 + 3*x^3 + 1)

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

sage: R.<y> = K[]                                                                   # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x)); L                             # optional - sage.rings.finite_rings sage.rings.function_field
Function field in y defined by y^3 + 3*x*y + (4*x^4 + 4)/x
sage: y^2                                                                           # optional - sage.rings.finite_rings sage.rings.function_field
y^2
sage: y^3                                                                           # optional - sage.rings.finite_rings sage.rings.function_field
2*x*y + (x^4 + 1)/x
sage: a = 1/y; a                                                                    # optional - sage.rings.finite_rings sage.rings.function_field
(x/(x^4 + 1))*y^2 + 3*x^2/(x^4 + 1)
sage: a * y                                                                         # optional - sage.rings.finite_rings sage.rings.function_field
1

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

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

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

sage: N.<u> = FunctionField(K)                                                      # optional - sage.rings.finite_rings

and inseparable extension function fields:

sage: J.<x> = FunctionField(GF(5)); J                                               # optional - sage.rings.finite_rings
Rational function field in x over Finite Field of size 5
sage: T.<v> = J[]                                                                   # optional - sage.rings.finite_rings
sage: O.<v> = J.extension(v^5 - x); O                                               # optional - sage.rings.finite_rings sage.rings.function_field
Function field in v defined by v^5 + 4*x

Function fields over the rational field are supported:

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

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

Function fields over the algebraic field are supported:

sage: K.<x> = FunctionField(QQbar); _.<Y> = K[]                                     # optional - sage.rings.number_field
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)                                        # optional - sage.rings.function_field sage.rings.number_field
sage: O = L.maximal_order()                                                         # optional - sage.rings.function_field sage.rings.number_field
sage: I = O.ideal(y)                                                                # optional - sage.rings.function_field sage.rings.number_field
sage: I.divisor()                                                                   # optional - sage.rings.function_field sage.rings.number_field
Place (x - I, x*y)
 - Place (x, x*y)
 + Place (x + I, x*y)
sage: pl = I.divisor().support()[0]                                                 # optional - sage.rings.function_field sage.rings.number_field
sage: m = L.completion(pl, prec=5)                                                  # optional - sage.rings.function_field sage.rings.number_field
sage: m(x)                                                                          # optional - sage.rings.function_field sage.rings.number_field
I + s + O(s^5)
sage: m(y)                             # long time (4s)                             # optional - sage.rings.function_field sage.rings.number_field
-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)                             # optional - sage.rings.function_field sage.rings.number_field
O(s^5)

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: K.<x> = FunctionField(GF(3)); _.<t> = K[]                                     # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(t^4 + t - x^5)                                            # optional - sage.rings.finite_rings sage.rings.function_field
sage: O = L.maximal_order()                                                         # optional - sage.rings.finite_rings sage.rings.function_field
sage: O.basis()                                                                     # optional - sage.rings.finite_rings sage.rings.function_field
(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                                                           # optional - sage.rings.finite_rings sage.rings.function_field
Ideal (x, y) of Maximal order of Function field in y defined by y^4 + y + 2*x^5
sage: J = I^-1                                                                      # optional - sage.rings.finite_rings sage.rings.function_field
sage: J.basis_matrix()                                                              # optional - sage.rings.finite_rings sage.rings.function_field
[  1   0   0   0]
[1/x 1/x   0   0]
[  0   0   1   0]
[  0   0   0   1]
sage: L.maximal_order_infinite().basis()                                            # optional - sage.rings.finite_rings sage.rings.function_field
(1, 1/x^2*y, 1/x^3*y^2, 1/x^4*y^3)

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: K.<x> = FunctionField(GF(2)); _.<Y> = K[]                                     # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)                                          # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.genus()                                                                     # optional - sage.rings.finite_rings sage.rings.function_field
3
sage: L.weierstrass_places()                                                        # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
[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()                                                                      # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
[1, 2, 3]

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

sage: p1,p2,p3 = L.weierstrass_places()[:3]                                         # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
sage: p1.gaps()                                                                     # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
[1, 2, 4]
sage: p2.gaps()                                                                     # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
[1, 2, 4]
sage: p3.gaps()                                                                     # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
[1, 2, 4]

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

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

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
basis_of_differentials_of_first_kind()#

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()                                # optional - sage.modules
[]

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.basis_of_holomorphic_differentials()                                # optional - sage.rings.finite_rings sage.modules 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)]
basis_of_holomorphic_differentials()#

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()                                # optional - sage.modules
[]

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.basis_of_holomorphic_differentials()                                # optional - sage.rings.finite_rings sage.modules 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)]
characteristic()#

Return the characteristic of the function field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: K.characteristic()
0
sage: K.<x> = FunctionField(QQbar)                                          # optional - sage.rings.number_field
sage: K.characteristic()                                                    # optional - sage.rings.number_field
0
sage: K.<x> = FunctionField(GF(7))                                          # optional - sage.rings.finite_rings
sage: K.characteristic()                                                    # optional - sage.rings.finite_rings
7
sage: R.<y> = K[]                                                           # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(y^2 - x)                                          # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.characteristic()                                                    # optional - sage.rings.finite_rings sage.rings.function_field
7
completion(place, name=None, prec=None, gen_name=None)#

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: K.<x> = FunctionField(GF(2)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)                                # optional - sage.rings.finite_rings sage.rings.function_field
sage: p = L.places_finite()[0]                                              # optional - sage.rings.finite_rings sage.rings.function_field
sage: m = L.completion(p); m                                                # optional - sage.rings.finite_rings sage.rings.function_field
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)                                                              # optional - sage.rings.finite_rings sage.rings.function_field
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
sage: m(y, 10)                                                              # optional - sage.rings.finite_rings sage.rings.function_field
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)                                # optional - sage.rings.finite_rings sage.rings.function_field
sage: p = L.places_finite()[0]                                              # optional - sage.rings.finite_rings sage.rings.function_field
sage: m = L.completion(p); m                                                # optional - sage.rings.finite_rings sage.rings.function_field
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)                                                              # optional - sage.rings.finite_rings sage.rings.function_field
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + O(s^12)
sage: m(y, 10)                                                              # optional - sage.rings.finite_rings sage.rings.function_field
s^-1 + 1 + s^3 + s^5 + s^7 + O(s^9)

sage: K.<x> = FunctionField(GF(2))                                          # optional - sage.rings.finite_rings
sage: p = K.places_finite()[0]; p                                           # optional - sage.rings.finite_rings
Place (x)
sage: m = K.completion(p); m                                                # optional - sage.rings.finite_rings
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))                                                            # optional - sage.rings.finite_rings
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                                             # optional - sage.rings.finite_rings
Place (1/x)
sage: m = K.completion(p); m                                                # optional - sage.rings.finite_rings
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)                                                                  # optional - sage.rings.finite_rings
s^-1 + O(s^19)

sage: m = K.completion(p, prec=infinity); m                                 # optional - sage.rings.finite_rings
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                                                           # optional - sage.rings.finite_rings
s^-1 + ...
sage: f.coefficient(100)                                                    # optional - sage.rings.finite_rings
0

sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 - x)                                          # optional - sage.rings.function_field sage.rings.function_field
sage: O = L.maximal_order()                                                 # optional - sage.rings.function_field sage.rings.function_field
sage: decomp = O.decomposition(K.maximal_order().ideal(x - 1))              # optional - sage.rings.function_field sage.rings.function_field
sage: pls = (decomp[0][0].place(), decomp[1][0].place())                    # optional - sage.rings.function_field sage.rings.function_field
sage: m = L.completion(pls[0]); m                                           # optional - sage.rings.function_field sage.rings.function_field
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)                                                             # optional - sage.rings.function_field sage.rings.function_field
sage: ye = m(y)                                                             # optional - sage.rings.function_field sage.rings.function_field
sage: ye^2 - xe == 0                                                        # optional - sage.rings.function_field sage.rings.function_field
True

sage: decomp2 = O.decomposition(K.maximal_order().ideal(x^2 + 1))           # optional - sage.rings.function_field sage.rings.function_field
sage: pls2 = decomp2[0][0].place()                                          # optional - sage.rings.function_field sage.rings.function_field
sage: m = L.completion(pls2); m                                             # optional - sage.rings.function_field sage.rings.function_field
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)                                                             # optional - sage.rings.function_field sage.rings.function_field
sage: ye = m(y)                                                             # optional - sage.rings.function_field sage.rings.function_field
sage: ye^2 - xe == 0                                                        # optional - sage.rings.function_field sage.rings.function_field
True
divisor_group()#

Return the group of divisors attached to the function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.divisor_group()                                                     # optional - 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))                        # optional - sage.rings.function_field
sage: L.divisor_group()                                                     # optional - sage.modules 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[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.divisor_group()                                                     # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
extension(f, names=None)#

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)                                    # optional - sage.rings.function_field
Function field in y defined by y^5 + x*y - x^3 - 3*x

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')                           # optional - sage.rings.function_field
Function field in z defined by z^3 + 1/t*z + t^3/(t + 1)

The defining polynomial need not be monic or integral:

sage: K.extension(t*y^3 + (1/t)*y + t^3/(t+1))                              # optional - sage.rings.function_field
Function field in y defined by t*y^3 + 1/t*y + t^3/(t + 1)
extension_constant_field(k)#

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

INPUT:

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

EXAMPLES:

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: F.<y> = K.extension(Y^2 + Y + x + 1/x)                                # optional - sage.rings.finite_rings sage.rings.function_field
sage: E = F.extension_constant_field(GF(2^4))                               # optional - sage.rings.finite_rings sage.rings.function_field
sage: E                                                                     # optional - sage.rings.finite_rings sage.rings.function_field
Function field in y defined by y^2 + y + (x^2 + 1)/x over its base
sage: E.constant_base_field()                                               # optional - sage.rings.finite_rings sage.rings.function_field
Finite Field in z4 of size 2^4
is_finite()#

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))                                          # optional - sage.rings.finite_rings
sage: R.is_finite()                                                         # optional - sage.rings.finite_rings
False
is_global()#

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)                                          # optional - sage.rings.number_field
sage: R.is_global()                                                         # optional - sage.rings.number_field
False
sage: R.<t> = FunctionField(GF(7))                                          # optional - sage.rings.finite_rings
sage: R.is_global()                                                         # optional - sage.rings.finite_rings
True
is_perfect()#

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()                                # optional - sage.rings.finite_rings
False
order(x, check=True)#

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

sage: Z = K.order(x); Z                                                     # optional - sage.modules
Order in Rational function field in x over Rational Field
sage: Z.basis()                                                             # optional - sage.modules
(1,)

Orders with multiple generators are not yet supported:

sage: Z = K.order([x, x^2]); Z                                              # optional - sage.modules
Traceback (most recent call last):
...
NotImplementedError
order_infinite(x, check=True)#

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)                              # optional - sage.rings.function_field
sage: L.order_infinite(y)  # todo: not implemented                          # optional - sage.modules sage.rings.function_field

sage: Z = K.order(x); Z                                                     # optional - sage.modules
Order in Rational function field in x over Rational Field
sage: Z.basis()                                                             # optional - sage.modules
(1,)

Orders with multiple generators, not yet supported:

sage: Z = K.order_infinite([x, x^2]); Z                                     # optional - sage.modules
Traceback (most recent call last):
...
NotImplementedError
order_infinite_with_basis(basis, check=True)#

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

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        # optional - sage.rings.function_field
Infinite order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # optional - sage.rings.function_field
(1/x*y + 1, 1/x*y, 1/x^2*y^2)

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                  # optional - 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

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])               # optional - 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)
order_with_basis(basis, check=True)#

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)                              # optional - sage.rings.function_field
sage: O = L.order_with_basis([1, y, y^2]); O                                # optional - sage.rings.function_field
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # optional - sage.rings.function_field
(1, y, y^2)

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                              # optional - sage.rings.function_field
Order in Function field in y defined by y^3 + x^3 + 4*x + 1
sage: O.basis()                                                             # optional - sage.rings.function_field
(y + 1, y, y^2)

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                  # optional - 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

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])                     # optional - 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)
place_set()#

Return the set of all places of the function field.

EXAMPLES:

sage: K.<t> = FunctionField(GF(7))                                          # optional - sage.rings.finite_rings
sage: K.place_set()                                                         # optional - sage.rings.finite_rings
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[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)                                # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.place_set()                                                         # optional - sage.rings.finite_rings sage.rings.function_field
Set of places of Function field in y defined by y^2 + y + (x^2 + 1)/x
rational_function_field()#

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)                                          # optional - sage.rings.function_field
sage: L.rational_function_field()                                           # optional - sage.rings.function_field
Rational function field in x over Rational Field

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

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,
 ...]
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)                                           # optional - sage.rings.function_field
sage: L.some_elements()                                                      # optional - 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,
 ...]
space_of_differentials()#

Return the space of differentials attached to the function field.

EXAMPLES:

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

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.space_of_differentials()                                            # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
Space of differentials of Function field in y
 defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
space_of_differentials_of_first_kind()#

Return the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.space_of_holomorphic_differentials()                                # optional - 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[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.space_of_holomorphic_differentials()                                # optional - sage.rings.finite_rings sage.modules 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)
space_of_holomorphic_differentials()#

Return the space of holomorphic differentials of this function field.

EXAMPLES:

sage: K.<t> = FunctionField(QQ)
sage: K.space_of_holomorphic_differentials()                                # optional - 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[]                             # optional - sage.rings.finite_rings
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))                        # optional - sage.rings.finite_rings sage.rings.function_field
sage: L.space_of_holomorphic_differentials()                                # optional - sage.rings.finite_rings sage.modules 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)
valuation(prime)#

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                                                 # optional - sage.rings.function_field
(x - 1)-adic valuation
sage: v(x)                                                                  # optional - sage.rings.function_field
0
sage: v(x - 1)                                                              # optional - sage.rings.function_field
1

A place can also be specified with an irreducible polynomial:

sage: v = K.valuation(x - 1); v                                             # optional - sage.rings.function_field
(x - 1)-adic valuation

Similarly, for a finite non-rational place:

sage: v = K.valuation(x^2 + 1); v                                           # optional - sage.rings.function_field
(x^2 + 1)-adic valuation
sage: v(x^2 + 1)                                                            # optional - sage.rings.function_field
1
sage: v(x)                                                                  # optional - sage.rings.function_field
0

Or for the infinite place:

sage: v = K.valuation(1/x); v                                               # optional - sage.rings.function_field
Valuation at the infinite place
sage: v(x)                                                                  # optional - sage.rings.function_field
-1

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: R.<x> = QQ[]                                                          # optional - sage.rings.function_field
sage: u = valuations.GaussValuation(R, valuations.TrivialValuation(QQ))     # optional - sage.rings.function_field
sage: w = u.augmentation(x - 1, 1)                                          # optional - sage.rings.function_field
sage: v = K.valuation(w); v                                                 # optional - sage.rings.function_field
(x - 1)-adic valuation

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))                     # optional - sage.rings.function_field
sage: v = K.valuation(w); v                                                 # optional - sage.rings.function_field
2-adic valuation

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: w = valuations.GaussValuation(R, QQ.valuation(2)).augmentation(x, 1)  # optional - sage.rings.function_field
sage: w = K.valuation(w)                                                    # optional - sage.rings.function_field
sage: v = K.valuation((w, K.hom([~K.gen()]), K.hom([~K.gen()]))); v         # optional - sage.rings.function_field
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)

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

sage: K.<t> = FunctionField(GF(3))                                          # optional - sage.rings.finite_rings sage.rings.function_field
sage: M.<x> = FunctionField(K)                                              # optional - sage.rings.finite_rings sage.rings.function_field
sage: v = M.valuation(x^3 - t)                                              # optional - sage.rings.finite_rings sage.rings.function_field
sage: v(x^3 - t)                                                            # optional - sage.rings.finite_rings sage.rings.function_field
1

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: R.<w> = K[]                                                           # optional - sage.rings.finite_rings
sage: L.<w> = K.extension(w^3 - t)                                          # optional - sage.rings.finite_rings sage.rings.function_field
sage: N.<x> = FunctionField(L)                                              # optional - sage.rings.finite_rings sage.rings.function_field
sage: w = v.extension(N)  # missing factorization, :trac:`16572`            # optional - sage.rings.finite_rings sage.rings.function_field
Traceback (most recent call last):
...
NotImplementedError
sage: w(x^3 - t) # not tested                                               # optional - sage.rings.finite_rings sage.rings.function_field
1
sage: w(x - w) # not tested                                                 # optional - sage.rings.finite_rings sage.rings.function_field
1/3

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                                       # optional - sage.rings.function_field
Function field in y defined by y^2 - x

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

sage: v = L.valuation(x); v                                                 # optional - sage.rings.function_field
(x)-adic valuation
sage.rings.function_field.function_field.is_FunctionField(x)#

Return True if x is a function field.

EXAMPLES:

sage: from sage.rings.function_field.function_field import is_FunctionField
sage: is_FunctionField(QQ)
False
sage: is_FunctionField(FunctionField(QQ, 't'))
True