Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def echelon_form(self, elements, row_reduced=False, order=None):
sage: R.<x,y> = QQ[]
sage: C = CombinatorialFreeModule(R, range(3), prefix='x') # needs sage.modules
sage: x = C.basis() # needs sage.modules
sage: C.echelon_form([x[0] - x[1], 2*x[1] - 2*x[2], x[0] - x[2]]) # needs sage.modules sage.rings.function_field
sage: C.echelon_form([x[0] - x[1], 2*x[1] - 2*x[2], x[0] - x[2]]) # needs sage.rings.function_field
[x[0] - x[2], x[1] - x[2]]

::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/differential.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.modules
# sage.doctest: needs sage.modules
"""
Differentials of function fields

Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/function_field/divisor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# sage.doctest: optional - sage.rings.finite_rings (because all doctests use finite fields)
# sage.doctest: optional - sage.rings.function_field (because almost all doctests use function field extensions)
# sage.doctest: needs sage.rings.finite_rings (because all doctests use finite fields)
# sage.doctest: needs sage.rings.function_field (because almost all doctests use function field extensions)
"""
Divisors of function fields

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/drinfeld_modules/action.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
The module action induced by a Drinfeld module

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
Drinfeld modules

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
Finite Drinfeld modules

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/drinfeld_modules/homset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
Set of morphisms between two Drinfeld modules

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/drinfeld_modules/morphism.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
Drinfeld module morphisms

Expand Down
36 changes: 18 additions & 18 deletions src/sage/rings/function_field/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ cdef class FunctionFieldElement(FieldElement):

Now an example in a nontrivial extension of a rational function field::

sage: # needs sage.modules sage.rings.function_field
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: y.matrix()
Expand All @@ -199,7 +199,7 @@ cdef class FunctionFieldElement(FieldElement):
An example in a relative extension, where neither function
field is rational::

sage: # needs sage.modules sage.rings.function_field
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
Expand All @@ -222,7 +222,7 @@ cdef class FunctionFieldElement(FieldElement):
We show that this matrix does indeed work as expected when making a
vector space from a function field::

sage: # needs sage.modules sage.rings.function_field
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x))
Expand Down Expand Up @@ -254,7 +254,7 @@ cdef class FunctionFieldElement(FieldElement):

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field
sage: y.trace() # needs sage.modules sage.rings.function_field
sage: y.trace() # needs sage.rings.function_field
x
"""
return self.matrix().trace()
Expand All @@ -267,17 +267,17 @@ cdef class FunctionFieldElement(FieldElement):

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field
sage: y.norm() # needs sage.modules sage.rings.function_field
sage: y.norm() # needs sage.rings.function_field
4*x^3

The norm is relative::

sage: K.<x> = FunctionField(QQ); R.<y> = K[]
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3); R.<z> = L[] # needs sage.rings.function_field
sage: M.<z> = L.extension(z^3 - y^2*z + x) # needs sage.rings.function_field
sage: z.norm() # needs sage.modules sage.rings.function_field
sage: z.norm() # needs sage.rings.function_field
-x
sage: z.norm().parent() # needs sage.modules sage.rings.function_field
sage: z.norm().parent() # needs sage.rings.function_field
Function field in y defined by y^2 - x*y + 4*x^3
"""
return self.matrix().determinant()
Expand Down Expand Up @@ -330,9 +330,9 @@ cdef class FunctionFieldElement(FieldElement):
sage: M.<z> = L.extension(z^3 - y^2*z + x) # needs sage.rings.function_field
sage: x.characteristic_polynomial('W') # needs sage.modules
W - x
sage: y.characteristic_polynomial('W') # needs sage.modules sage.rings.function_field
sage: y.characteristic_polynomial('W') # needs sage.rings.function_field
W^2 - x*W + 4*x^3
sage: z.characteristic_polynomial('W') # needs sage.modules sage.rings.function_field
sage: z.characteristic_polynomial('W') # needs sage.rings.function_field
W^3 + (-x*y + 4*x^3)*W + x
"""
return self.matrix().characteristic_polynomial(*args, **kwds)
Expand All @@ -351,9 +351,9 @@ cdef class FunctionFieldElement(FieldElement):
sage: M.<z> = L.extension(z^3 - y^2*z + x) # needs sage.rings.function_field
sage: x.minimal_polynomial('W') # needs sage.modules
W - x
sage: y.minimal_polynomial('W') # needs sage.modules sage.rings.function_field
sage: y.minimal_polynomial('W') # needs sage.rings.function_field
W^2 - x*W + 4*x^3
sage: z.minimal_polynomial('W') # needs sage.modules sage.rings.function_field
sage: z.minimal_polynomial('W') # needs sage.rings.function_field
W^3 + (-x*y + 4*x^3)*W + x
"""
return self.matrix().minimal_polynomial(*args, **kwds)
Expand All @@ -366,7 +366,7 @@ cdef class FunctionFieldElement(FieldElement):

EXAMPLES::

sage: # needs sage.modules sage.rings.function_field
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: y.is_integral()
Expand Down Expand Up @@ -411,9 +411,9 @@ cdef class FunctionFieldElement(FieldElement):

sage: x.differential() # needs sage.modules
d(x)
sage: y.differential() # needs sage.modules sage.rings.function_field
sage: y.differential() # needs sage.rings.function_field
(16/x*y) d(x)
sage: z.differential() # needs sage.modules sage.rings.function_field
sage: z.differential() # needs sage.rings.function_field
(8/x*z) d(x)
"""
F = self.parent()
Expand Down Expand Up @@ -458,7 +458,7 @@ cdef class FunctionFieldElement(FieldElement):

sage: K.<t> = FunctionField(GF(2))
sage: f = t^2
sage: f.higher_derivative(2) # needs sage.modules sage.rings.function_field
sage: f.higher_derivative(2) # needs sage.rings.function_field
1

::
Expand Down Expand Up @@ -489,7 +489,7 @@ cdef class FunctionFieldElement(FieldElement):

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x) # needs sage.rings.function_field
sage: y.divisor() # needs sage.modules sage.rings.function_field
sage: y.divisor() # needs sage.rings.function_field
- Place (1/x, 1/x*y)
- Place (x, x*y)
+ 2*Place (x + 1, x*y)
Expand Down Expand Up @@ -607,8 +607,8 @@ cdef class FunctionFieldElement(FieldElement):

sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x) # needs sage.rings.function_field
sage: p = L.places_infinite()[0] # needs sage.modules sage.rings.function_field
sage: y.valuation(p) # needs sage.modules sage.rings.function_field
sage: p = L.places_infinite()[0] # needs sage.rings.function_field
sage: y.valuation(p) # needs sage.rings.function_field
-1

::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/element_polymod.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.function_field
# sage.doctest: needs sage.rings.function_field
r"""
Elements of function fields: extension
"""
Expand Down
14 changes: 7 additions & 7 deletions src/sage/rings/function_field/element_rational.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
sage: K.<t> = FunctionField(GF(7))
sage: t.element()
t
sage: type(t.element()) # needs sage.rings.finite_rings
sage: type(t.element()) # needs sage.libs.ntl
<... 'sage.rings.fraction_field_FpT.FpTElement'>

sage: K.<t> = FunctionField(GF(131101)) # needs sage.libs.pari
sage: # needs sage.rings.finite_rings
sage: K.<t> = FunctionField(GF(131101))
sage: t.element()
t
sage: type(t.element())
Expand Down Expand Up @@ -392,9 +393,9 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
True
sage: f.is_nth_power(3) # needs sage.modules
False
sage: (f^3).is_nth_power(3)
sage: (f^3).is_nth_power(3) # needs sage.modules
True
sage: (f^9).is_nth_power(-9)
sage: (f^9).is_nth_power(-9) # needs sage.modules
True
"""
if n == 1:
Expand Down Expand Up @@ -437,7 +438,6 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: K.<x> = FunctionField(GF(3))
sage: f = (x+1)/(x+2)
sage: f.nth_root(1)
Expand All @@ -446,9 +446,9 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
Traceback (most recent call last):
...
ValueError: element is not an n-th power
sage: (f^3).nth_root(3)
sage: (f^3).nth_root(3) # needs sage.modules
(x + 1)/(x + 2)
sage: (f^9).nth_root(-9)
sage: (f^9).nth_root(-9) # needs sage.modules
(x + 2)/(x + 1)
"""
if n == 0:
Expand Down
18 changes: 9 additions & 9 deletions src/sage/rings/function_field/function_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@

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

sage: # needs sage.modules sage.rings.function_field
sage: # needs sage.rings.function_field
sage: p1,p2,p3 = L.weierstrass_places()[:3]
sage: p1.gaps()
[1, 2, 4]
Expand Down Expand Up @@ -532,9 +532,9 @@ def order(self, x, check=True):
sage: O.basis() # needs sage.modules
(1, y, y^2)

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

Orders with multiple generators are not yet supported::
Expand Down Expand Up @@ -619,7 +619,7 @@ def order_infinite(self, x, check=True):

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

sage: Z = K.order(x); Z # needs sage.modules
Order in Rational function field in x over Rational Field
Expand Down Expand Up @@ -1016,7 +1016,7 @@ def space_of_differentials(self):

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2)) # needs sage.rings.function_field
sage: L.space_of_differentials() # needs sage.modules sage.rings.function_field
sage: L.space_of_differentials() # needs sage.rings.function_field
Space of differentials of Function field in y
defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
"""
Expand All @@ -1040,7 +1040,7 @@ def space_of_holomorphic_differentials(self):

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2)) # needs sage.rings.function_field
sage: L.space_of_holomorphic_differentials() # needs sage.modules sage.rings.function_field
sage: L.space_of_holomorphic_differentials() # needs sage.rings.function_field
(Vector space of dimension 4 over Finite Field of size 5,
Linear map:
From: Vector space of dimension 4 over Finite Field of size 5
Expand All @@ -1067,7 +1067,7 @@ def basis_of_holomorphic_differentials(self):

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2)) # needs sage.rings.function_field
sage: L.basis_of_holomorphic_differentials() # needs sage.modules sage.rings.function_field
sage: L.basis_of_holomorphic_differentials() # needs sage.rings.function_field
[((x/(x^3 + 4))*y) d(x),
((1/(x^3 + 4))*y) d(x),
((x/(x^3 + 4))*y^2) d(x),
Expand All @@ -1089,12 +1089,12 @@ def divisor_group(self):

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

sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2)) # needs sage.rings.function_field
sage: L.divisor_group() # needs sage.modules sage.rings.function_field
sage: L.divisor_group() # needs sage.rings.function_field
Divisor group of Function field in y defined by y^3 + (4*x^3 + 1)/(x^3 + 3)
"""
from .divisor import DivisorGroup
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/function_field_polymod.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.function_field
# sage.doctest: needs sage.rings.function_field
r"""
Function Fields: extension
"""
Expand Down
8 changes: 4 additions & 4 deletions src/sage/rings/function_field/function_field_rational.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class RationalFunctionField(FunctionField):
sage: R.<x> = FunctionField(QQ)
sage: L.<y> = R[]
sage: F.<y> = R.extension(y^2 - (x^2+1)) # needs sage.rings.function_field
sage: (y/x).divisor() # needs sage.modules sage.rings.function_field
sage: (y/x).divisor() # needs sage.rings.function_field
- Place (x, y - 1)
- Place (x, y + 1)
+ Place (x^2 + 1, y)
Expand All @@ -112,15 +112,15 @@ class RationalFunctionField(FunctionField):
sage: NF.<i> = NumberField(z^2 + 1)
sage: R.<x> = FunctionField(NF)
sage: L.<y> = R[]
sage: F.<y> = R.extension(y^2 - (x^2+1)) # needs sage.modules sage.rings.function_field
sage: F.<y> = R.extension(y^2 - (x^2+1)) # needs sage.rings.function_field

sage: (x/y*x.differential()).divisor() # needs sage.modules sage.rings.function_field sage.rings.number_field
sage: (x/y*x.differential()).divisor() # needs sage.rings.function_field sage.rings.number_field
-2*Place (1/x, 1/x*y - 1)
- 2*Place (1/x, 1/x*y + 1)
+ Place (x, y - 1)
+ Place (x, y + 1)

sage: (x/y).divisor() # needs sage.modules sage.rings.function_field sage.rings.number_field
sage: (x/y).divisor() # needs sage.rings.function_field sage.rings.number_field
- Place (x - i, y)
+ Place (x, y - 1)
+ Place (x, y + 1)
Expand Down
Loading