# Elements of function fields: extension#

class sage.rings.function_field.element_polymod.FunctionFieldElement_polymod[source]#

Elements of a finite extension of a function field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: x*y + 1/x^3
x*y + 1/x^3

>>> 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*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> x*y + Integer(1)/x**Integer(3)
x*y + 1/x^3

element()[source]#

Return the underlying polynomial that represents the element.

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<T> = K[]
sage: L.<y> = K.extension(T^2 - x*T + 4*x^3)
sage: f = y/x^2 + x/(x^2+1); f
1/x^2*y + x/(x^2 + 1)
sage: f.element()
1/x^2*y + x/(x^2 + 1)

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

is_nth_power(n)[source]#

Return whether this element is an n-th power in the function field.

INPUT:

• n – an integer

ALGORITHM:

If n is a power of the characteristic of the field and the constant base field is perfect, then this uses the algorithm described in Proposition 12 of [GiTr1996].

EXAMPLES:

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(4))
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)
sage: y.is_nth_power(2)
False
sage: L(x).is_nth_power(2)
True

>>> from sage.all import *
>>> # needs sage.rings.finite_rings
>>> K = FunctionField(GF(Integer(4)), 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)
>>> y.is_nth_power(Integer(2))
False
>>> L(x).is_nth_power(Integer(2))
True

list()[source]#

Return the list of the coefficients representing the element.

If the function field is $$K[y]/(f(y))$$, then return the coefficients of the reduced presentation of the element as a polynomial in $$K[y]$$.

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: a = ~(2*y + 1/x); a
(-1/8*x^2/(x^5 + 1/8*x^2 + 1/16))*y + (1/8*x^3 + 1/16*x)/(x^5 + 1/8*x^2 + 1/16)
sage: a.list()
[(1/8*x^3 + 1/16*x)/(x^5 + 1/8*x^2 + 1/16), -1/8*x^2/(x^5 + 1/8*x^2 + 1/16)]
sage: (x*y).list()
[0, 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*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> a = ~(Integer(2)*y + Integer(1)/x); a
(-1/8*x^2/(x^5 + 1/8*x^2 + 1/16))*y + (1/8*x^3 + 1/16*x)/(x^5 + 1/8*x^2 + 1/16)
>>> a.list()
[(1/8*x^3 + 1/16*x)/(x^5 + 1/8*x^2 + 1/16), -1/8*x^2/(x^5 + 1/8*x^2 + 1/16)]
>>> (x*y).list()
[0, x]

nth_root(n)[source]#

Return an n-th root of this element in the function field.

INPUT:

• n – an integer

OUTPUT:

Returns an element a in the function field such that this element equals $$a^n$$. Raises an error if no such element exists.

ALGORITHM:

If n is a power of the characteristic of the field and the constant base field is perfect, then this uses the algorithm described in Proposition 12 of [GiTr1996].

EXAMPLES:

sage: K.<x> = FunctionField(GF(3))
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x)
sage: L(y^3).nth_root(3)
y
sage: L(y^9).nth_root(-9)
1/x*y

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(3)), 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(y**Integer(3)).nth_root(Integer(3))
y
>>> L(y**Integer(9)).nth_root(-Integer(9))
1/x*y


This also works for inseparable extensions:

sage: K.<x> = FunctionField(GF(3))
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - x^2)
sage: L(x).nth_root(3)^3
x
sage: L(x^9).nth_root(-27)^-27
x^9

>>> from sage.all import *
>>> K = FunctionField(GF(Integer(3)), names=('x',)); (x,) = K._first_ngens(1)
>>> R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(3) - x**Integer(2), names=('y',)); (y,) = L._first_ngens(1)
>>> L(x).nth_root(Integer(3))**Integer(3)
x
>>> L(x**Integer(9)).nth_root(-Integer(27))**-Integer(27)
x^9