Function Fields¶
AUTHORS:
- William Stein (2010): initial version
- Robert Bradshaw (2010-05-30): added is_finite()
- Julian Rueth (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.
EXAMPLES:
We create an extension of a rational function fields, and do some simple arithmetic in it:
sage: K.<x> = FunctionField(GF(5^2,'a')); K
Rational function field in x over Finite Field in a of size 5^2
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
(4*x/(4*x^4 + 4))*y^2 + 2*x^2/(4*x^4 + 4)
sage: a * y
1
We next make an extension of the above function field, illustrating that arithmetic with a tower of 3 fields is fully supported:
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 + 2*x/(4*x^4 + 4))*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
It is also possible to construct function fields over an imperfect base field:
sage: N.<u> = FunctionField(K)
and function fields as inseparable extensions:
sage: R.<v> = K[]
sage: O.<v> = K.extension(v^5 - x)
-
class
sage.rings.function_field.function_field.
FunctionField
(base_field, names, category=Category of function fields)¶ Bases:
sage.rings.ring.Field
The abstract base class for all function fields.
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: isinstance(K, sage.rings.function_field.function_field.FunctionField) True
-
characteristic
()¶ Return the characteristic of this function field.
EXAMPLES:
sage: K.<x> = FunctionField(QQ) 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) sage: L.characteristic() 7
-
extension
(f, names=None)¶ Create an extension L = K[y]/(f(y)) of a function field, defined by a univariate polynomial in one variable over this function field K.
INPUT:
f
– a univariate polynomial over selfnames
– None or string or length-1 tuple
OUTPUT:
- a function field
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: K.extension(y^5 - x^3 - 3*x + x*y) 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)) Function field in y defined by y^3 + 1/t*y + 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)) Function field in y defined by t*y^3 + 1/t*y + t^3/(t + 1)
-
is_finite
()¶ Return whether this function field is finite, which it is not.
EXAMPLES:
sage: R.<t> = FunctionField(QQ) sage: R.is_finite() False sage: R.<t> = FunctionField(GF(7)) sage: R.is_finite() False
-
is_perfect
()¶ Return whether this field is perfect, i.e., its characteristic is \(p=0\) or every element has a \(p\)-th root.
EXAMPLES:
sage: FunctionField(QQ, 'x').is_perfect() True sage: FunctionField(GF(2), 'x').is_perfect() False
-
order
(x, check=True)¶ Return the order in this function field generated over the maximal order by x or the elements of x if x is a list.
INPUT:
x
– element of self, or a list of elements of selfcheck
– bool (default: True); if True, check that x really generates an order
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[]; L.<y> = K.extension(y^3 + x^3 + 4*x + 1) sage: O = L.order(y); O Order in Function field in y defined by y^3 + x^3 + 4*x + 1 sage: O.basis() (1, y, y^2) sage: Z = K.order(x); Z Order in Rational function field in x over Rational Field sage: Z.basis() (1,)
Orders with multiple generators, not yet supported:
sage: Z = K.order([x,x^2]); Z Traceback (most recent call last): ... NotImplementedError
-
order_with_basis
(basis, check=True)¶ Return the order with given basis over the maximal order of the base field.
INPUT:
basis
– a list of elements of selfcheck
– bool (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 this function field
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[]; L.<y> = K.extension(y^3 + x^3 + 4*x + 1) sage: O = L.order_with_basis([1, y, y^2]); O Order in Function field in y defined by y^3 + x^3 + 4*x + 1 sage: O.basis() (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 Order in Function field in y defined by y^3 + x^3 + 4*x + 1 sage: O.basis() (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 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]) 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]
-
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) sage: L.rational_function_field() Rational function field in x over Rational Field sage: R.<z> = L[] sage: M.<z> = L.extension(z^2-y) sage: M.rational_function_field() Rational function field in x over Rational Field
-
some_elements
()¶ Return a list of elements in the function field.
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: elements = K.some_elements() sage: elements # random output [(x - 3/2)/(x^2 - 12/5*x + 1/18)] sage: False in [e in K for e in elements] False
-
-
class
sage.rings.function_field.function_field.
FunctionField_polymod
(polynomial, names, element_class=<type 'sage.rings.function_field.function_field_element.FunctionFieldElement_polymod'>, category=Category of function fields)¶ Bases:
sage.rings.function_field.function_field.FunctionField
A function field defined by a univariate polynomial, as an extension of the base field.
EXAMPLES:
We make a function field defined by a degree 5 polynomial over the rational function field over the rational numbers:
sage: K.<x> = FunctionField(QQ) sage: R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)); L Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x
We next make a function field over the above nontrivial function field L:
sage: S.<z> = L[] sage: M.<z> = L.extension(z^2 + y*z + y); M Function field in z defined by z^2 + y*z + y sage: 1/z ((x/(-x^4 - 1))*y^4 - 2*x^2/(-x^4 - 1))*z - 1 sage: z * (1/z) 1
We drill down the tower of function fields:
sage: M.base_field() Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x sage: M.base_field().base_field() Rational function field in x over Rational Field sage: M.base_field().base_field().constant_field() Rational Field sage: M.constant_base_field() Rational Field
Warning
It is not checked if the polynomial used to define this function field is irreducible Hence it is not guaranteed that this object really is a field! This is illustrated below.
sage: K.<x>=FunctionField(QQ) sage: R.<y> = K[] sage: L.<y>=K.extension(x^2-y^2) sage: (y-x)*(y+x) 0 sage: 1/(y-x) 1 sage: y-x==0; y+x==0 False False
-
base_field
()¶ Return the base field of this function field. This function field is presented as L = K[y]/(f(y)), and the base field is by definition the field K.
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.base_field() Rational function field in x over Rational Field
-
change_variable_name
(name)¶ Return a field isomorphic to this field with variable(s)
name
.INPUT:
name
– a string or a tuple consisting of a strings, the names of the new variables starting with a generator of this field and going down to the rational function field.
OUTPUT:
A triple
F,f,t
whereF
is a function field,f
is an isomorphism fromF
to this field, andt
is the inverse off
.EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: R.<y> = K[] sage: L.<y> = K.extension(y^2 - x) sage: R.<z> = L[] sage: M.<z> = L.extension(z^2 - y) sage: M.change_variable_name('zz') (Function field in zz defined by zz^2 - y, Function Field morphism: From: Function field in zz defined by zz^2 - y To: Function field in z defined by z^2 - y Defn: zz |--> z y |--> y x |--> x, Function Field morphism: From: Function field in z defined by z^2 - y To: Function field in zz defined by zz^2 - y Defn: z |--> zz y |--> y x |--> x) sage: M.change_variable_name(('zz','yy')) (Function field in zz defined by zz^2 - yy, Function Field morphism: From: Function field in zz defined by zz^2 - yy To: Function field in z defined by z^2 - y Defn: zz |--> z yy |--> y x |--> x, Function Field morphism: From: Function field in z defined by z^2 - y To: Function field in zz defined by zz^2 - yy Defn: z |--> zz y |--> yy x |--> x) sage: M.change_variable_name(('zz','yy','xx')) (Function field in zz defined by zz^2 - yy, Function Field morphism: From: Function field in zz defined by zz^2 - yy To: Function field in z defined by z^2 - y Defn: zz |--> z yy |--> y xx |--> x, Function Field morphism: From: Function field in z defined by z^2 - y To: Function field in zz defined by zz^2 - yy Defn: z |--> zz y |--> yy x |--> xx)
-
constant_base_field
()¶ Return the constant field of the base rational function field.
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)); L Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x sage: L.constant_base_field() Rational Field sage: S.<z> = L[] sage: M.<z> = L.extension(z^2 - y) sage: M.constant_base_field() Rational Field
-
constant_field
()¶ Return the algebraic closure of the constant field of the base field in this function field.
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.constant_field() Traceback (most recent call last): ... NotImplementedError
-
degree
(base=None)¶ Return the degree of this function field over the function field
base
.INPUT:
base
– a function field (default:None
), a function field from which this field has been constructed as a finite extension.
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)); L Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x sage: L.degree() 5 sage: L.degree(L) 1 sage: R.<z> = L[] sage: M.<z> = L.extension(z^2 - y) sage: M.degree(L) 2 sage: M.degree(K) 10
-
derivation
()¶ Return a derivation of the function field over the constant base field.
A derivation on \(R\) is a map \(R\to R\) satisfying \(D(\alpha+\beta)=D(\alpha)+D(\beta)\) and \(D(\alpha\beta)=\beta D(\alpha)+\alpha D(\beta)\) for all \(\alpha, \beta \in R\). For a function field which is a finite extension of \(K(x)\) with \(K\) perfect, the derivations form a one-dimensional \(K\)-vector space generated by the derivation returned by this method.
OUTPUT:
- a derivation of the function field
EXAMPLES:
sage: K.<x> = FunctionField(GF(3)) sage: R.<y> = K[] sage: L.<y> = K.extension(y^2 - x) sage: d = L.derivation(); d Derivation map: From: Function field in y defined by y^2 + 2*x To: Function field in y defined by y^2 + 2*x Defn: y |--> 2/x*y sage: d(x) 1 sage: d(x^3) 0 sage: d(x*y) 0 sage: d(y) 2/x*y
Derivations are linear and satisfy Leibniz’s law:
sage: d(x+y) == d(x) + d(y) True sage: d(x*y) == x*d(y) + y*d(x) True
If the field is a separable extension of the base field, the derivation extending a derivation of the base function field is uniquely determined. Proposition 11 of [GT1996] describes how to compute the extension. We apply the formula described there to the generator of the space of derivations on the base field.
The general inseparable case is not implemented yet (see trac ticket #16562, trac ticket #16564.)`
-
equation_order
()¶ If we view self as being presented as K[y]/(f(y)), then this function returns the order generated by the class of y. If f is not monic, then
_make_monic_integral()
is called, and instead we get the order generated by some integral multiple of a root of f.EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: O = L.equation_order() sage: O.basis() (1, x*y, x^2*y^2, x^3*y^3, x^4*y^4)
We try an example, in which the defining polynomial is not monic and is not integral:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(x^2*y^5 - 1/x); L Function field in y defined by x^2*y^5 - 1/x sage: O = L.equation_order() sage: O.basis() (1, x^3*y, x^6*y^2, x^9*y^3, x^12*y^4)
-
gen
(n=0)¶ Return the
n
-th generator of this function field. By defaultn
is 0; any other value ofn
leads to an error. The generator is the class of y, if we view self as being presented as K[y]/(f(y)).EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.gen() y sage: L.gen(1) Traceback (most recent call last): ... IndexError: Only one generator.
-
genus
()¶ Return the genus of this function field For now, the genus is computed using singular
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) sage: L.genus() 3
-
hom
(im_gens, base_morphism=None)¶ Create a homomorphism from self to another function field.
INPUT:
im_gens
– a list of images of the generators of self and of successive base rings.base_morphism
– (default: None) a homomorphism of the base ring, after the im_gens are used. Thus if im_gens has length 2, then base_morphism should be a morphism from self.base_ring().base_ring().
EXAMPLES:
We create a rational function field, and a quadratic extension of it:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^2 - x^3 - 1)
We make the field automorphism that sends y to -y:
sage: f = L.hom(-y); f Function Field endomorphism of Function field in y defined by y^2 - x^3 - 1 Defn: y |--> -y
Evaluation works:
sage: f(y*x - 1/x) -x*y - 1/x
We try to define an invalid morphism:
sage: f = L.hom(y+1) Traceback (most recent call last): ... ValueError: invalid morphism
We make a morphism of the base rational function field:
sage: phi = K.hom(x+1); phi Function Field endomorphism of Rational function field in x over Rational Field Defn: x |--> x + 1 sage: phi(x^3 - 3) x^3 + 3*x^2 + 3*x - 2 sage: (x+1)^3-3 x^3 + 3*x^2 + 3*x - 2
We make a morphism by specifying where the generators and the base generators go:
sage: L.hom([-y, x]) Function Field endomorphism of Function field in y defined by y^2 - x^3 - 1 Defn: y |--> -y x |--> x
You can also specify a morphism on the base:
sage: R1.<r> = K[] sage: L1.<r> = K.extension(r^2 - (x+1)^3 - 1) sage: L.hom(r, base_morphism=phi) Function Field morphism: From: Function field in y defined by y^2 - x^3 - 1 To: Function field in r defined by r^2 - x^3 - 3*x^2 - 3*x - 2 Defn: y |--> r x |--> x + 1
We make another extension of a rational function field:
sage: K2.<t> = FunctionField(QQ); R2.<w> = K2[] sage: L2.<w> = K2.extension((4*w)^2 - (t+1)^3 - 1)
We define a morphism, by giving the images of generators:
sage: f = L.hom([4*w, t+1]); f Function Field morphism: From: Function field in y defined by y^2 - x^3 - 1 To: Function field in w defined by 16*w^2 - t^3 - 3*t^2 - 3*t - 2 Defn: y |--> 4*w x |--> t + 1
Evaluation works, as expected:
sage: f(y+x) 4*w + t + 1 sage: f(x*y + x/(x^2+1)) (4*t + 4)*w + (t + 1)/(t^2 + 2*t + 2)
We make another extension of a rational function field:
sage: K3.<yy> = FunctionField(QQ); R3.<xx> = K3[] sage: L3.<xx> = K3.extension(yy^2 - xx^3 - 1)
This is the function field L with the generators exchanged. We define a morphism to L:
sage: g = L3.hom([x,y]); g Function Field morphism: From: Function field in xx defined by -xx^3 + yy^2 - 1 To: Function field in y defined by y^2 - x^3 - 1 Defn: xx |--> x yy |--> y
-
is_separable
()¶ Return whether the defining polynomial of the function field is separable, i.e., whether the gcd of the defining polynomial and its derivative is constant.
EXAMPLES:
sage: K.<x> = FunctionField(GF(5)); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.is_separable() True sage: K.<x> = FunctionField(GF(5)); R.<y> = K[] sage: L.<y> = K.extension(y^5 - 1) sage: L.is_separable() False
-
maximal_order
()¶ Return the maximal_order of self. If we view self as L = K[y]/(f(y)), then this is the ring of elements of L that are integral over K.
EXAMPLES:
This is not yet implemented...:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.maximal_order() Traceback (most recent call last): ... NotImplementedError
-
monic_integral_model
(names=None)¶ Return a function field isomorphic to this field but which is an extension of a rational function field with defining polynomial that is monic and integral over the constant base field.
INPUT:
names
– a string or a tuple of up to two strings (default:None
), the name of the generator of the field, and the name of the generator of the underlying rational function field (if a tuple); if not given, then the names are chosen automatically.
OUTPUT:
A triple
(F,f,t)
whereF
is a function field,f
is an isomorphism fromF
to this field, andt
is the inverse off
.EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: R.<y> = K[] sage: L.<y> = K.extension(x^2*y^5 - 1/x); L Function field in y defined by x^2*y^5 - 1/x sage: A, from_A, to_A = L.monic_integral_model('z') sage: A Function field in z defined by z^5 - x^12 sage: from_A Function Field morphism: From: Function field in z defined by z^5 - x^12 To: Function field in y defined by x^2*y^5 - 1/x Defn: z |--> x^3*y x |--> x sage: to_A Function Field morphism: From: Function field in y defined by x^2*y^5 - 1/x To: Function field in z defined by z^5 - x^12 Defn: y |--> 1/x^3*z x |--> x sage: to_A(y) 1/x^3*z sage: from_A(to_A(y)) y sage: from_A(to_A(1/y)) x^3*y^4 sage: from_A(to_A(1/y)) == 1/y True
This also works for towers of function fields:
sage: R.<z> = L[] sage: M.<z> = L.extension(z^2*y - 1/x) sage: M.monic_integral_model() (Function field in z_ defined by z_^10 - x^18, Function Field morphism: From: Function field in z_ defined by z_^10 - x^18 To: Function field in z defined by y*z^2 - 1/x Defn: z_ |--> x^2*z x |--> x, Function Field morphism: From: Function field in z defined by y*z^2 - 1/x To: Function field in z_ defined by z_^10 - x^18 Defn: z |--> 1/x^2*z_ y |--> 1/x^15*z_^8 x |--> x)
-
ngens
()¶ Return the number of generators of this function field over its base field. This is by definition 1.
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.ngens() 1
-
polynomial
()¶ Return the univariate polynomial that defines this function field, i.e., the polynomial f(y) so that this function field is of the form K[y]/(f(y)).
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.polynomial() y^5 - 2*x*y + (-x^4 - 1)/x
-
polynomial_ring
()¶ Return the polynomial ring used to represent elements of this function field. If we view this function field as being presented as K[y]/(f(y)), then this function returns the ring K[y].
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) sage: L.polynomial_ring() Univariate Polynomial Ring in y over Rational function field in x over Rational Field
-
primitive_element
()¶ Return a primitive element over the underlying rational function field.
If this is a finite extension of a rational function field \(K(x)\) with \(K\) perfect, then this is a simple extension of \(K(x)\), i.e., there is a primitive element \(y\) which generates this field over \(K(x)\). This method returns such an element \(y\).
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: R.<y> = K[] sage: L.<y> = K.extension(y^2-x) sage: R.<z> = L[] sage: M.<z> = L.extension(z^2-y) sage: R.<z> = L[] sage: N.<u> = L.extension(z^2-x-1) sage: N.primitive_element() u + y sage: M.primitive_element() z sage: L.primitive_element() y
This also works for inseparable extensions:
sage: K.<x> = FunctionField(GF(2)) sage: R.<Y> = K[] sage: L.<y> = K.extension(Y^2-x) sage: R.<Z> = L[] sage: M.<z> = L.extension(Z^2-y) sage: M.primitive_element() z
-
random_element
(*args, **kwds)¶ Create a random element of this function field. Parameters are passed onto the random_element method of the base_field.
EXAMPLES:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^2 - (x^2 + x)) sage: L.random_element() # random ((x^2 - x + 2/3)/(x^2 + 1/3*x - 1))*y^2 + ((-1/4*x^2 + 1/2*x - 1)/(-5/2*x + 2/3))*y + (-1/2*x^2 - 4)/(-12*x^2 + 1/2*x - 1/95)
-
simple_model
(name=None)¶ Return a function field isomorphic to this field which is a simple extension of a rational function field.
INPUT:
name
– a string (default:None
), the name of generator of the simple extension. IfNone
, then the name of the generator will be the same as the name of the generator of this function field.
OUTPUT:
A triple
(F,f,t)
whereF
is a field isomorphic to this field,f
is an isomorphism fromF
to this function field andt
is the inverse off
.EXAMPLES:
A tower of four function fields:
sage: K.<x> = FunctionField(QQ); R.<z> = K[] sage: L.<z> = K.extension(z^2-x); R.<u> = L[] sage: M.<u> = L.extension(u^2-z); R.<v> = M[] sage: N.<v> = M.extension(v^2-u)
The fields N and M as simple extensions of K:
sage: N.simple_model() (Function field in v defined by v^8 - x, Function Field morphism: From: Function field in v defined by v^8 - x To: Function field in v defined by v^2 - u Defn: v |--> v, Function Field morphism: From: Function field in v defined by v^2 - u To: Function field in v defined by v^8 - x Defn: v |--> v u |--> v^2 z |--> v^4 x |--> x) sage: M.simple_model() (Function field in u defined by u^4 - x, Function Field morphism: From: Function field in u defined by u^4 - x To: Function field in u defined by u^2 - z Defn: u |--> u, Function Field morphism: From: Function field in u defined by u^2 - z To: Function field in u defined by u^4 - x Defn: u |--> u z |--> u^2 x |--> x)
An optional parameter
name
can be used to set the name of the generator of the simple extension:sage: M.simple_model(name='t') (Function field in t defined by t^4 - x, Function Field morphism: From: Function field in t defined by t^4 - x To: Function field in u defined by u^2 - z Defn: t |--> u, Function Field morphism: From: Function field in u defined by u^2 - z To: Function field in t defined by t^4 - x Defn: u |--> t z |--> t^2 x |--> x)
An example with higher degrees:
sage: K.<x> = FunctionField(GF(3)); R.<y> = K[] sage: L.<y> = K.extension(y^5-x); R.<z> = L[] sage: M.<z> = L.extension(z^3-x) sage: M.simple_model() (Function field in z defined by z^15 + x*z^12 + x^2*z^9 + 2*x^3*z^6 + 2*x^4*z^3 + 2*x^5 + 2*x^3, Function Field morphism: From: Function field in z defined by z^15 + x*z^12 + x^2*z^9 + 2*x^3*z^6 + 2*x^4*z^3 + 2*x^5 + 2*x^3 To: Function field in z defined by z^3 + 2*x Defn: z |--> z + y, Function Field morphism: From: Function field in z defined by z^3 + 2*x To: Function field in z defined by z^15 + x*z^12 + x^2*z^9 + 2*x^3*z^6 + 2*x^4*z^3 + 2*x^5 + 2*x^3 Defn: z |--> 2/x*z^6 + 2*z^3 + z + 2*x y |--> 1/x*z^6 + z^3 + x x |--> x)
This also works for inseparable extensions:
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[] sage: L.<y> = K.extension(y^2-x); R.<z> = L[] sage: M.<z> = L.extension(z^2-y) sage: M.simple_model() (Function field in z defined by z^4 + x, Function Field morphism: From: Function field in z defined by z^4 + x To: Function field in z defined by z^2 + y Defn: z |--> z, Function Field morphism: From: Function field in z defined by z^2 + y To: Function field in z defined by z^4 + x Defn: z |--> z y |--> z^2 x |--> x)
-
vector_space
(base=None)¶ Return a vector space \(V\) and isomorphisms from this field to \(V\) and from \(V\) to this field.
This function allows us to identify the elements of this field with elements of a vector space over the base field, which is useful for representation and arithmetic with orders, ideals, etc.
INPUT:
base
– a function field (default:None
), the returned vector space is overbase
which defaults to the base field of this function field.
OUTPUT:
V
– a vector space over base fieldfrom_V
– an isomorphism from V to this fieldto_V
– an isomorphism from this field to V
EXAMPLES:
We define a function field:
sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)); L Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x
We get the vector spaces, and maps back and forth:
sage: V, from_V, to_V = L.vector_space() sage: V Vector space of dimension 5 over Rational function field in x over Rational Field sage: from_V Isomorphism morphism: From: Vector space of dimension 5 over Rational function field in x over Rational Field To: Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x sage: to_V Isomorphism morphism: From: Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x To: Vector space of dimension 5 over Rational function field in x over Rational Field
We convert an element of the vector space back to the function field:
sage: from_V(V.1) y
We define an interesting element of the function field:
sage: a = 1/L.0; a (-x/(-x^4 - 1))*y^4 + 2*x^2/(-x^4 - 1)
We convert it to the vector space, and get a vector over the base field:
sage: to_V(a) (2*x^2/(-x^4 - 1), 0, 0, 0, -x/(-x^4 - 1))
We convert to and back, and get the same element:
sage: from_V(to_V(a)) == a True
In the other direction:
sage: v = x*V.0 + (1/x)*V.1 sage: to_V(from_V(v)) == v True
And we show how it works over an extension of an extension field:
sage: R2.<z> = L[]; M.<z> = L.extension(z^2 -y) sage: M.vector_space() (Vector space of dimension 2 over Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x, Isomorphism morphism: From: Vector space of dimension 2 over Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x To: Function field in z defined by z^2 - y, Isomorphism morphism: From: Function field in z defined by z^2 - y To: Vector space of dimension 2 over Function field in y defined by y^5 - 2*x*y + (-x^4 - 1)/x)
We can also get the vector space of
M
overK
:sage: M.vector_space(K) (Vector space of dimension 10 over Rational function field in x over Rational Field, Isomorphism morphism: From: Vector space of dimension 10 over Rational function field in x over Rational Field To: Function field in z defined by z^2 - y, Isomorphism morphism: From: Function field in z defined by z^2 - y To: Vector space of dimension 10 over Rational function field in x over Rational Field)
-
-
class
sage.rings.function_field.function_field.
RationalFunctionField
(constant_field, names, element_class=<type 'sage.rings.function_field.function_field_element.FunctionFieldElement_rational'>, category=Category of function fields)¶ Bases:
sage.rings.function_field.function_field.FunctionField
A rational function field K(t) in one variable, over an arbitrary base field.
EXAMPLES:
sage: K.<t> = FunctionField(GF(3)); K Rational function field in t over Finite Field of size 3 sage: K.gen() t sage: 1/t + t^3 + 5 (t^4 + 2*t + 1)/t
There are various ways to get at the underlying fields and rings associated to a rational function field:
sage: K.<t> = FunctionField(GF(7)) sage: K.base_field() Rational function field in t over Finite Field of size 7 sage: K.field() Fraction Field of Univariate Polynomial Ring in t over Finite Field of size 7 sage: K.constant_field() Finite Field of size 7 sage: K.maximal_order() Maximal order in Rational function field in t over Finite Field of size 7
We define a morphism:
sage: K.<t> = FunctionField(QQ) sage: L = FunctionField(QQ, 'tbar') # give variable name as second input sage: K.hom(L.gen()) Function Field morphism: From: Rational function field in t over Rational Field To: Rational function field in tbar over Rational Field Defn: t |--> tbar
-
base_field
()¶ Return the base field of this rational function field, which is just this function field itself.
EXAMPLES:
sage: K.<t> = FunctionField(GF(7)) sage: K.base_field() Rational function field in t over Finite Field of size 7
-
change_variable_name
(name)¶ Return a field isomorphic to this field with variable
name
.INPUT:
name
– a string or a tuple consisting of a single string, the name of the new variable
OUTPUT:
A triple
F,f,t
whereF
is a rational function field,f
is an isomorphism fromF
to this field, andt
is the inverse off
.EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: L,f,t = K.change_variable_name('y') sage: L,f,t (Rational function field in y over Rational Field, Function Field morphism: From: Rational function field in y over Rational Field To: Rational function field in x over Rational Field Defn: y |--> x, Function Field morphism: From: Rational function field in x over Rational Field To: Rational function field in y over Rational Field Defn: x |--> y) sage: L.change_variable_name('x')[0] is K True
-
constant_base_field
()¶ Return the field that this rational function field is a transcendental extension of.
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.constant_field() Rational Field
-
constant_field
()¶ Return the field that this rational function field is a transcendental extension of.
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.constant_field() Rational Field
-
degree
(base=None)¶ Return the degree over the base field of this rational function field. Since the base field is the rational function field itself, the degree is 1.
INPUT:
base
– the base field of the vector space; must be the function field itself (the default)
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.degree() 1
-
derivation
()¶ Return a derivation of the rational function field over the constant base field.
OUTPUT:
- a derivation of the rational function field
The derivation maps the generator of the rational function field to 1.
EXAMPLES:
sage: K.<x> = FunctionField(GF(3)) sage: m = K.derivation(); m Derivation map: From: Rational function field in x over Finite Field of size 3 To: Rational function field in x over Finite Field of size 3 sage: m(x) 1
-
equation_order
()¶ Return the maximal order of this function field. Since this is a rational function field it is of the form K(t), and the maximal order is by definition K[t].
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.maximal_order() Maximal order in Rational function field in t over Rational Field sage: K.equation_order() Maximal order in Rational function field in t over Rational Field
-
field
()¶ Return the underlying field, forgetting the function field structure.
EXAMPLES:
sage: K.<t> = FunctionField(GF(7)) sage: K.field() Fraction Field of Univariate Polynomial Ring in t over Finite Field of size 7
-
gen
(n=0)¶ Return the
n
-th generator of this function field. Ifn
is not 0, then an IndexError is raised.EXAMPLES:
sage: K.<t> = FunctionField(QQ); K.gen() t sage: K.gen().parent() Rational function field in t over Rational Field sage: K.gen(1) Traceback (most recent call last): ... IndexError: Only one generator.
-
genus
()¶ Return the genus of this function field This is always equal 0 for a rational function field
EXAMPLES:
sage: K.<x> = FunctionField(QQ); sage: K.genus() 0
-
hom
(im_gens, base_morphism=None)¶ Create a homomorphism from self to another ring.
INPUT:
im_gens
– exactly one element of some ring. It must be invertible and trascendental over- the image of
base_morphism
; this is not checked.
base_morphism
– a homomorphism from the base field into the other ring.- If
None
, try to use a coercion map.
OUTPUT:
- a map between function fields
EXAMPLES:
We make a map from a rational function field to itself:
sage: K.<x> = FunctionField(GF(7)) sage: K.hom( (x^4 + 2)/x) Function Field endomorphism of Rational function field in x over Finite Field of size 7 Defn: x |--> (x^4 + 2)/x
We construct a map from a rational function field into a non-rational extension field:
sage: K.<x> = FunctionField(GF(7)); R.<y> = K[] sage: L.<y> = K.extension(y^3 + 6*x^3 + x) sage: f = K.hom(y^2 + y + 2); f Function Field morphism: From: Rational function field in x over Finite Field of size 7 To: Function field in y defined by y^3 + 6*x^3 + x Defn: x |--> y^2 + y + 2 sage: f(x) y^2 + y + 2 sage: f(x^2) 5*y^2 + (x^3 + 6*x + 4)*y + 2*x^3 + 5*x + 4
-
maximal_order
()¶ Return the maximal order of this function field. Since this is a rational function field it is of the form K(t), and the maximal order is by definition K[t].
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.maximal_order() Maximal order in Rational function field in t over Rational Field sage: K.equation_order() Maximal order in Rational function field in t over Rational Field
-
ngens
()¶ Return the number of generators, which is 1.
EXAMPLES:
sage: K.<t> = FunctionField(QQ) sage: K.ngens() 1
-
polynomial_ring
(var='x')¶ Return a polynomial ring in one variable over this rational function field.
INPUT:
var
– a string (default: ‘x’)
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: K.polynomial_ring() Univariate Polynomial Ring in x over Rational function field in x over Rational Field sage: K.polynomial_ring('T') Univariate Polynomial Ring in T over Rational function field in x over Rational Field
-
random_element
(*args, **kwds)¶ Create a random element of this rational function field.
Parameters are passed to the random_element method of the underlying fraction field.
EXAMPLES:
sage: FunctionField(QQ,'alpha').random_element() # random (-1/2*alpha^2 - 4)/(-12*alpha^2 + 1/2*alpha - 1/95)
-
vector_space
(base=None)¶ Return a vector space \(V\) and isomorphisms from this field to \(V\) and from \(V\) to this field.
This function allows us to identify the elements of this field with elements of a one-dimensional vector space over the field itself. This method exists so that all function fields (rational or not) have the same interface.
INPUT:
base
– the base field of the vector space; must be the function field itself (the default)
OUTPUT:
V
– a vector space over base fieldfrom_V
– an isomorphism from V to this fieldto_V
– an isomorphism from this field to V
EXAMPLES:
sage: K.<x> = FunctionField(QQ) sage: K.vector_space() (Vector space of dimension 1 over Rational function field in x over Rational Field, Isomorphism morphism: From: Vector space of dimension 1 over Rational function field in x over Rational Field To: Rational function field in x over Rational Field, Isomorphism morphism: From: Rational function field in x over Rational Field To: Vector space of dimension 1 over Rational function field in x over Rational Field)
-
-
sage.rings.function_field.function_field.
is_FunctionField
(x)¶ Return True if
x
is of function field type.EXAMPLES:
sage: from sage.rings.function_field.function_field import is_FunctionField sage: is_FunctionField(QQ) False sage: is_FunctionField(FunctionField(QQ,'t')) True
-
sage.rings.function_field.function_field.
is_RationalFunctionField
(x)¶ Return
True
ifx
is of rational function field type.EXAMPLES:
sage: from sage.rings.function_field.function_field import is_RationalFunctionField sage: is_RationalFunctionField(QQ) False sage: is_RationalFunctionField(FunctionField(QQ,'t')) True