Morphisms of function fields#

Maps and morphisms useful for computations with function fields.

EXAMPLES:

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: K.hom(1/x)
Function Field endomorphism of Rational function field in x over Rational Field
  Defn: x |--> 1/x

sage: # needs sage.rings.function_field
sage: L.<y> = K.extension(y^2 - x)
sage: K.hom(y)
Function Field morphism:
  From: Rational function field in x over Rational Field
  To:   Function field in y defined by y^2 - x
  Defn: x |--> y
sage: L.hom([y,x])
Function Field endomorphism of Function field in y defined by y^2 - x
  Defn: y |--> y
        x |--> x
sage: L.hom([x,y])
Traceback (most recent call last):
...
ValueError: invalid morphism
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> K.hom(Integer(1)/x)
Function Field endomorphism of Rational function field in x over Rational Field
  Defn: x |--> 1/x

>>> # needs sage.rings.function_field
>>> L = K.extension(y**Integer(2) - x, names=('y',)); (y,) = L._first_ngens(1)
>>> K.hom(y)
Function Field morphism:
  From: Rational function field in x over Rational Field
  To:   Function field in y defined by y^2 - x
  Defn: x |--> y
>>> L.hom([y,x])
Function Field endomorphism of Function field in y defined by y^2 - x
  Defn: y |--> y
        x |--> x
>>> L.hom([x,y])
Traceback (most recent call last):
...
ValueError: invalid morphism

AUTHORS:

  • William Stein (2010): initial version

  • Julian Rüth (2011-09-14, 2014-06-23, 2017-08-21): refactored class hierarchy; added derivation classes; morphisms to/from fraction fields

  • Kwankyu Lee (2017-04-30): added higher derivations and completions

class sage.rings.function_field.maps.FractionFieldToFunctionField[source]#

Bases: FunctionFieldVectorSpaceIsomorphism

Isomorphism from a fraction field of a polynomial ring to the isomorphic function field.

EXAMPLES:

sage: K = QQ['x'].fraction_field()
sage: L = K.function_field()
sage: f = L.coerce_map_from(K); f
Isomorphism:
    From: Fraction Field of Univariate Polynomial Ring in x over Rational Field
    To:   Rational function field in x over Rational Field
>>> from sage.all import *
>>> K = QQ['x'].fraction_field()
>>> L = K.function_field()
>>> f = L.coerce_map_from(K); f
Isomorphism:
    From: Fraction Field of Univariate Polynomial Ring in x over Rational Field
    To:   Rational function field in x over Rational Field
section()[source]#

Return the inverse map of this isomorphism.

EXAMPLES:

sage: K = QQ['x'].fraction_field()
sage: L = K.function_field()
sage: f = L.coerce_map_from(K)
sage: f.section()
Isomorphism:
    From: Rational function field in x over Rational Field
    To:   Fraction Field of Univariate Polynomial Ring in x over Rational Field
>>> from sage.all import *
>>> K = QQ['x'].fraction_field()
>>> L = K.function_field()
>>> f = L.coerce_map_from(K)
>>> f.section()
Isomorphism:
    From: Rational function field in x over Rational Field
    To:   Fraction Field of Univariate Polynomial Ring in x over Rational Field
class sage.rings.function_field.maps.FunctionFieldCompletion(field, place, name=None, prec=None, gen_name=None)[source]#

Bases: Map

Completions on function fields.

INPUT:

  • field – function field

  • place – place of the function field

  • name – string for the name of the series variable

  • prec – positive integer; default precision

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

EXAMPLES:

sage: # needs sage.rings.finite_rings 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)
sage: 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)
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + s^12 + s^13
+ s^15 + s^16 + s^17 + s^19 + O(s^22)
sage: m(y)
s^-1 + 1 + s^3 + s^5 + s^7 + s^9 + s^13 + s^15 + s^17 + O(s^19)
sage: m(x*y) == m(x) * m(y)
True
sage: m(x+y) == m(x) + m(y)
True
>>> from sage.all import *
>>> # needs sage.rings.finite_rings 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)
s^2 + s^3 + s^4 + s^5 + s^7 + s^8 + s^9 + s^10 + s^12 + s^13
+ s^15 + s^16 + s^17 + s^19 + O(s^22)
>>> m(y)
s^-1 + 1 + s^3 + s^5 + s^7 + s^9 + s^13 + s^15 + s^17 + O(s^19)
>>> m(x*y) == m(x) * m(y)
True
>>> m(x+y) == m(x) + m(y)
True

The variable name of the series can be supplied. If the place is not rational such that the residue field is a proper extension of the constant field, you can also specify the generator name of the extension:

sage: # needs sage.rings.finite_rings sage.rings.function_field
sage: p2 = L.places_finite(2)[0]
sage: p2
Place (x^2 + x + 1, x*y + 1)
sage: m2 = L.completion(p2, 't', gen_name='b')
sage: m2(x)
(b + 1) + t + t^2 + t^4 + t^8 + t^16 + O(t^20)
sage: m2(y)
b + b*t + b*t^3 + b*t^4 + (b + 1)*t^5 + (b + 1)*t^7 + b*t^9 + b*t^11
+ b*t^12 + b*t^13 + b*t^15 + b*t^16 + (b + 1)*t^17 + (b + 1)*t^19 + O(t^20)
>>> from sage.all import *
>>> # needs sage.rings.finite_rings sage.rings.function_field
>>> p2 = L.places_finite(Integer(2))[Integer(0)]
>>> p2
Place (x^2 + x + 1, x*y + 1)
>>> m2 = L.completion(p2, 't', gen_name='b')
>>> m2(x)
(b + 1) + t + t^2 + t^4 + t^8 + t^16 + O(t^20)
>>> m2(y)
b + b*t + b*t^3 + b*t^4 + (b + 1)*t^5 + (b + 1)*t^7 + b*t^9 + b*t^11
+ b*t^12 + b*t^13 + b*t^15 + b*t^16 + (b + 1)*t^17 + (b + 1)*t^19 + O(t^20)
default_precision()[source]#

Return the default precision.

EXAMPLES:

sage: # needs sage.rings.finite_rings 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)
sage: m.default_precision()
20
>>> from sage.all import *
>>> # needs sage.rings.finite_rings 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.default_precision()
20
class sage.rings.function_field.maps.FunctionFieldConversionToConstantBaseField(parent)[source]#

Bases: Map

Conversion map from the function field to its constant base field.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: QQ.convert_map_from(K)
Conversion map:
  From: Rational function field in x over Rational Field
  To:   Rational Field
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> QQ.convert_map_from(K)
Conversion map:
  From: Rational function field in x over Rational Field
  To:   Rational Field
class sage.rings.function_field.maps.FunctionFieldLinearMap[source]#

Bases: SetMorphism

Linear map to function fields.

class sage.rings.function_field.maps.FunctionFieldLinearMapSection[source]#

Bases: SetMorphism

Section of linear map from function fields.

class sage.rings.function_field.maps.FunctionFieldMorphism(parent, im_gen, base_morphism)[source]#

Bases: RingHomomorphism

Base class for morphisms between function fields.

EXAMPLES:

sage: K.<x> = FunctionField(QQ)
sage: f = K.hom(1/x); f
Function Field endomorphism of Rational function field in x over Rational Field
  Defn: x |--> 1/x
>>> from sage.all import *
>>> K = FunctionField(QQ, names=('x',)); (x,) = K._first_ngens(1)
>>> f = K.hom(Integer(1)/x); f
Function Field endomorphism of Rational function field in x over Rational Field
  Defn: x |--> 1/x
class sage.rings.function_field.maps.FunctionFieldMorphism_polymod(parent, im_gen, base_morphism)[source]#

Bases: FunctionFieldMorphism

Morphism from a finite extension of a function field to a function field.

EXAMPLES:

sage: # needs sage.rings.finite_rings sage.rings.function_field
sage: K.<x> = FunctionField(GF(7)); R.<y> = K[]
sage: L.<y> = K.extension(y^3 + 6*x^3 + x)
sage: f = L.hom(y*2); f
Function Field endomorphism of Function field in y defined by y^3 + 6*x^3 + x
  Defn: y |--> 2*y
sage: factor(L.polynomial())
y^3 + 6*x^3 + x
sage: f(y).charpoly('y')
y^3 + 6*x^3 + x
>>> from sage.all import *
>>> # needs sage.rings.finite_rings sage.rings.function_field
>>> K = FunctionField(GF(Integer(7)), names=('x',)); (x,) = K._first_ngens(1); R = K['y']; (y,) = R._first_ngens(1)
>>> L = K.extension(y**Integer(3) + Integer(6)*x**Integer(3) + x, names=('y',)); (y,) = L._first_ngens(1)
>>> f = L.hom(y*Integer(2)); f
Function Field endomorphism of Function field in y defined by y^3 + 6*x^3 + x
  Defn: y |--> 2*y
>>> factor(L.polynomial())
y^3 + 6*x^3 + x
>>> f(y).charpoly('y')
y^3 + 6*x^3 + x
class sage.rings.function_field.maps.FunctionFieldMorphism_rational(parent, im_gen, base_morphism)[source]#

Bases: FunctionFieldMorphism

Morphism from a rational function field to a function field.

class sage.rings.function_field.maps.FunctionFieldRingMorphism[source]#

Bases: SetMorphism

Ring homomorphism.

class sage.rings.function_field.maps.FunctionFieldToFractionField[source]#

Bases: FunctionFieldVectorSpaceIsomorphism

Isomorphism from rational function field to the isomorphic fraction field of a polynomial ring.

EXAMPLES:

sage: K = QQ['x'].fraction_field()
sage: L = K.function_field()
sage: f = K.coerce_map_from(L); f
Isomorphism:
  From: Rational function field in x over Rational Field
  To:   Fraction Field of Univariate Polynomial Ring in x over Rational Field
>>> from sage.all import *
>>> K = QQ['x'].fraction_field()
>>> L = K.function_field()
>>> f = K.coerce_map_from(L); f
Isomorphism:
  From: Rational function field in x over Rational Field
  To:   Fraction Field of Univariate Polynomial Ring in x over Rational Field
section()[source]#

Return the inverse map of this isomorphism.

EXAMPLES:

sage: K = QQ['x'].fraction_field()
sage: L = K.function_field()
sage: f = K.coerce_map_from(L)
sage: f.section()
Isomorphism:
    From: Fraction Field of Univariate Polynomial Ring in x over Rational Field
    To:   Rational function field in x over Rational Field
>>> from sage.all import *
>>> K = QQ['x'].fraction_field()
>>> L = K.function_field()
>>> f = K.coerce_map_from(L)
>>> f.section()
Isomorphism:
    From: Fraction Field of Univariate Polynomial Ring in x over Rational Field
    To:   Rational function field in x over Rational Field
class sage.rings.function_field.maps.FunctionFieldVectorSpaceIsomorphism[source]#

Bases: Morphism

Base class for isomorphisms between function fields and vector spaces.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space()
sage: isinstance(f, sage.rings.function_field.maps.FunctionFieldVectorSpaceIsomorphism)
True
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space()
>>> isinstance(f, sage.rings.function_field.maps.FunctionFieldVectorSpaceIsomorphism)
True
is_injective()[source]#

Return True, since the isomorphism is injective.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space()
sage: f.is_injective()
True
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space()
>>> f.is_injective()
True
is_surjective()[source]#

Return True, since the isomorphism is surjective.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space()
sage: f.is_surjective()
True
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space()
>>> f.is_surjective()
True
class sage.rings.function_field.maps.MapFunctionFieldToVectorSpace(K, V)[source]#

Bases: FunctionFieldVectorSpaceIsomorphism

Isomorphism from a function field to a vector space.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space(); t
Isomorphism:
  From: Function field in y defined by y^2 - x*y + 4*x^3
  To:   Vector space of dimension 2 over Rational function field in x over Rational Field
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space(); t
Isomorphism:
  From: Function field in y defined by y^2 - x*y + 4*x^3
  To:   Vector space of dimension 2 over Rational function field in x over Rational Field
class sage.rings.function_field.maps.MapVectorSpaceToFunctionField(V, K)[source]#

Bases: FunctionFieldVectorSpaceIsomorphism

Isomorphism from a vector space to a function field.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space(); f
Isomorphism:
  From: Vector space of dimension 2 over Rational function field in x over Rational Field
  To:   Function field in y defined by y^2 - x*y + 4*x^3
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space(); f
Isomorphism:
  From: Vector space of dimension 2 over Rational function field in x over Rational Field
  To:   Function field in y defined by y^2 - x*y + 4*x^3
codomain()[source]#

Return the function field which is the codomain of the isomorphism.

EXAMPLES:

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

Return the vector space which is the domain of the isomorphism.

EXAMPLES:

sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
sage: V, f, t = L.vector_space()
sage: f.domain()
Vector space of dimension 2 over Rational function field in x over Rational Field
>>> 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(2) - x*y + Integer(4)*x**Integer(3), names=('y',)); (y,) = L._first_ngens(1)
>>> V, f, t = L.vector_space()
>>> f.domain()
Vector space of dimension 2 over Rational function field in x over Rational Field