Skip to content

Commit f20ddc2

Browse files
author
Matthias Koeppe
committed
src/sage/rings/function_field: Remove tag sage.rings.finite_rings when only prime finite fields are used; use more block tags
1 parent 79d2b42 commit f20ddc2

File tree

5 files changed

+122
-122
lines changed

5 files changed

+122
-122
lines changed

src/sage/rings/function_field/derivations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
derivation is available::
66
77
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
8-
sage: L.<y> = K.extension(Y^3 + x + x^3*Y) # needs sage.rings.function_field
9-
sage: h = L.higher_derivation() # needs sage.rings.function_field
10-
sage: h(y^2, 2) # needs sage.rings.function_field
8+
sage: L.<y> = K.extension(Y^3 + x + x^3*Y) # needs sage.rings.function_field
9+
sage: h = L.higher_derivation() # needs sage.rings.function_field
10+
sage: h(y^2, 2) # needs sage.rings.function_field
1111
((x^7 + 1)/x^2)*y^2 + x^3*y
1212
1313
AUTHORS:

src/sage/rings/function_field/element.pyx

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -180,55 +180,58 @@ cdef class FunctionFieldElement(FieldElement):
180180
A rational function field::
181181
182182
sage: K.<t> = FunctionField(QQ)
183-
sage: t.matrix() # needs sage.modules
183+
sage: t.matrix() # needs sage.modules
184184
[t]
185-
sage: (1/(t+1)).matrix() # needs sage.modules
185+
sage: (1/(t+1)).matrix() # needs sage.modules
186186
[1/(t + 1)]
187187
188188
Now an example in a nontrivial extension of a rational function field::
189189
190+
sage: # needs sage.modules sage.rings.function_field
190191
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
191-
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field
192-
sage: y.matrix() # needs sage.modules sage.rings.function_field
192+
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
193+
sage: y.matrix()
193194
[ 0 1]
194195
[-4*x^3 x]
195-
sage: y.matrix().charpoly('Z') # needs sage.modules sage.rings.function_field
196+
sage: y.matrix().charpoly('Z')
196197
Z^2 - x*Z + 4*x^3
197198
198199
An example in a relative extension, where neither function
199200
field is rational::
200201
202+
sage: # needs sage.modules sage.rings.function_field
201203
sage: K.<x> = FunctionField(QQ)
202204
sage: R.<y> = K[]
203-
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field
204-
sage: M.<T> = L[] # needs sage.rings.function_field
205-
sage: Z.<alpha> = L.extension(T^3 - y^2*T + x) # needs sage.rings.function_field
206-
sage: alpha.matrix() # needs sage.modules sage.rings.function_field
205+
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
206+
sage: M.<T> = L[]
207+
sage: Z.<alpha> = L.extension(T^3 - y^2*T + x)
208+
sage: alpha.matrix()
207209
[ 0 1 0]
208210
[ 0 0 1]
209211
[ -x x*y - 4*x^3 0]
210-
sage: alpha.matrix(K) # needs sage.modules sage.rings.function_field
212+
sage: alpha.matrix(K)
211213
[ 0 0 1 0 0 0]
212214
[ 0 0 0 1 0 0]
213215
[ 0 0 0 0 1 0]
214216
[ 0 0 0 0 0 1]
215217
[ -x 0 -4*x^3 x 0 0]
216218
[ 0 -x -4*x^4 -4*x^3 + x^2 0 0]
217-
sage: alpha.matrix(Z) # needs sage.modules sage.rings.function_field
219+
sage: alpha.matrix(Z)
218220
[alpha]
219221
220222
We show that this matrix does indeed work as expected when making a
221223
vector space from a function field::
222224
225+
sage: # needs sage.modules sage.rings.function_field
223226
sage: K.<x> = FunctionField(QQ)
224227
sage: R.<y> = K[]
225-
sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x)) # needs sage.rings.function_field
226-
sage: V, from_V, to_V = L.vector_space() # needs sage.modules sage.rings.function_field
227-
sage: y5 = to_V(y^5); y5 # needs sage.modules sage.rings.function_field
228+
sage: L.<y> = K.extension(y^5 - (x^3 + 2*x*y + 1/x))
229+
sage: V, from_V, to_V = L.vector_space()
230+
sage: y5 = to_V(y^5); y5
228231
((x^4 + 1)/x, 2*x, 0, 0, 0)
229-
sage: y4y = to_V(y^4) * y.matrix(); y4y # needs sage.modules sage.rings.function_field
232+
sage: y4y = to_V(y^4) * y.matrix(); y4y
230233
((x^4 + 1)/x, 2*x, 0, 0, 0)
231-
sage: y5 == y4y # needs sage.modules sage.rings.function_field
234+
sage: y5 == y4y
232235
True
233236
"""
234237
# multiply each element of the vector space isomorphic to the parent
@@ -363,17 +366,18 @@ cdef class FunctionFieldElement(FieldElement):
363366
364367
EXAMPLES::
365368
369+
sage: # needs sage.modules sage.rings.function_field
366370
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
367-
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field
368-
sage: y.is_integral() # needs sage.rings.function_field
371+
sage: L.<y> = K.extension(y^2 - x*y + 4*x^3)
372+
sage: y.is_integral()
369373
True
370-
sage: (y/x).is_integral() # needs sage.modules sage.rings.function_field
374+
sage: (y/x).is_integral()
371375
True
372-
sage: (y/x)^2 - (y/x) + 4*x # needs sage.modules sage.rings.function_field
376+
sage: (y/x)^2 - (y/x) + 4*x
373377
0
374-
sage: (y/x^2).is_integral() # needs sage.modules sage.rings.function_field
378+
sage: (y/x^2).is_integral()
375379
False
376-
sage: (y/x).minimal_polynomial('W') # needs sage.modules sage.rings.function_field
380+
sage: (y/x).minimal_polynomial('W')
377381
W^2 - W + 4*x
378382
"""
379383
R = self.parent().base_field().maximal_order()
@@ -609,11 +613,12 @@ cdef class FunctionFieldElement(FieldElement):
609613
610614
::
611615
616+
sage: # needs sage.rings.function_field
612617
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
613-
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x) # needs sage.rings.function_field
614-
sage: O = L.maximal_order() # needs sage.rings.function_field
615-
sage: p = O.ideal(x - 1).place() # needs sage.rings.function_field
616-
sage: y.valuation(p) # needs sage.rings.function_field
618+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
619+
sage: O = L.maximal_order()
620+
sage: p = O.ideal(x - 1).place()
621+
sage: y.valuation(p)
617622
0
618623
"""
619624
prime = place.prime_ideal()

src/sage/rings/function_field/function_field.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
sage: TestSuite(L).run(max_runs=8) # long time (25s) # needs sage.rings.function_field sage.rings.number_field
130130
sage: TestSuite(M).run(max_runs=8) # long time (35s) # needs sage.rings.finite_rings sage.rings.function_field
131131
sage: TestSuite(N).run(max_runs=8, skip='_test_derivation') # long time (15s), needs sage.rings.finite_rings
132-
sage: TestSuite(O).run()
132+
sage: TestSuite(O).run() # needs sage.rings.function_field
133133
sage: TestSuite(R).run() # needs sage.rings.finite_rings sage.rings.function_field
134134
sage: TestSuite(S).run() # long time (4s) # needs sage.rings.finite_rings sage.rings.function_field
135135
@@ -1166,7 +1166,7 @@ def completion(self, place, name=None, prec=None, gen_name=None):
11661166
Completion map:
11671167
From: Rational function field in x over Finite Field of size 2
11681168
To: Laurent Series Ring in s over Finite Field of size 2
1169-
sage: m(1/(x+1))
1169+
sage: m(1/(x+1)) # needs sage.rings.function_field
11701170
1 + s + s^2 + s^3 + s^4 + s^5 + s^6 + s^7 + s^8 + s^9 + s^10 + s^11 + s^12
11711171
+ s^13 + s^14 + s^15 + s^16 + s^17 + s^18 + s^19 + O(s^20)
11721172
@@ -1176,16 +1176,16 @@ def completion(self, place, name=None, prec=None, gen_name=None):
11761176
Completion map:
11771177
From: Rational function field in x over Finite Field of size 2
11781178
To: Laurent Series Ring in s over Finite Field of size 2
1179-
sage: m(x)
1179+
sage: m(x) # needs sage.rings.function_field
11801180
s^-1 + O(s^19)
11811181
11821182
sage: m = K.completion(p, prec=infinity); m # needs sage.rings.function_field
11831183
Completion map:
11841184
From: Rational function field in x over Finite Field of size 2
11851185
To: Lazy Laurent Series Ring in s over Finite Field of size 2
1186-
sage: f = m(x); f
1186+
sage: f = m(x); f # needs sage.rings.function_field
11871187
s^-1 + ...
1188-
sage: f.coefficient(100)
1188+
sage: f.coefficient(100) # needs sage.rings.function_field
11891189
0
11901190
11911191
sage: # needs sage.rings.function_field

src/sage/rings/function_field/function_field_rational.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,10 @@ def residue_field(self, place, name=None):
855855
856856
sage: F.<x> = FunctionField(GF(5))
857857
sage: p = F.places_finite(2)[0] # needs sage.libs.pari
858-
sage: R, fr_R, to_R = F.residue_field(p) # needs sage.rings.function_field
859-
sage: R
858+
sage: R, fr_R, to_R = F.residue_field(p) # needs sage.libs.pari sage.rings.function_field
859+
sage: R # needs sage.libs.pari sage.rings.function_field
860860
Finite Field in z2 of size 5^2
861-
sage: to_R(x) in R
861+
sage: to_R(x) in R # needs sage.libs.pari sage.rings.function_field
862862
True
863863
"""
864864
return place.residue_field(name=name)
@@ -1009,9 +1009,9 @@ def higher_derivation(self):
10091009
10101010
sage: F.<x> = FunctionField(GF(5))
10111011
sage: d = F.higher_derivation() # needs sage.rings.function_field
1012-
sage: [d(x^5,i) for i in range(10)]
1012+
sage: [d(x^5,i) for i in range(10)] # needs sage.rings.function_field
10131013
[x^5, 0, 0, 0, 0, 1, 0, 0, 0, 0]
1014-
sage: [d(x^7,i) for i in range(10)]
1014+
sage: [d(x^7,i) for i in range(10)] # needs sage.rings.function_field
10151015
[x^7, 2*x^6, x^5, 0, 0, x^2, 2*x, 1, 0, 0]
10161016
"""
10171017
from .derivations_polymod import RationalFunctionFieldHigherDerivation_global

0 commit comments

Comments
 (0)