Skip to content

Commit 448341b

Browse files
author
Release Manager
committedJul 29, 2023
gh-35957: `sage.rings.function_field`: Update `# needs` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> - Many `# optional` are removed because small prime finite fields no longer need to be marked `# optional/needs sage.rings.finite_rings` since #35847 - Other `# optional` are replaced by codeblock-scoped `# needs` tags - Remaining `# optional` with standard features are replaced by `# needs` - Some import fixes needed for separate testing of **sagemath-graphs** from #35095 <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> This is: - done with the help of `sage -fixdoctests` from #35749 - Part of: #29705 - Cherry-picked from: #35095 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35957 Reported by: Matthias Köppe Reviewer(s): David Coudert, Matthias Köppe
2 parents ce5b249 + 61654eb commit 448341b

23 files changed

+2638
-2350
lines changed
 

‎src/sage/rings/function_field/constructor.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class FunctionFieldFactory(UniqueFactory):
5757
5858
sage: K.<x> = FunctionField(QQ); K
5959
Rational function field in x over Rational Field
60-
sage: L.<y> = FunctionField(GF(7)); L # optional - sage.rings.finite_rings
60+
sage: L.<y> = FunctionField(GF(7)); L
6161
Rational function field in y over Finite Field of size 7
62-
sage: R.<z> = L[] # optional - sage.rings.finite_rings
63-
sage: M.<z> = L.extension(z^7 - z - y); M # optional - sage.rings.finite_rings sage.rings.function_field
62+
sage: R.<z> = L[]
63+
sage: M.<z> = L.extension(z^7 - z - y); M # needs sage.rings.finite_rings sage.rings.function_field
6464
Function field in z defined by z^7 + 6*z + 6*y
6565
6666
TESTS::
@@ -69,8 +69,8 @@ class FunctionFieldFactory(UniqueFactory):
6969
sage: L.<x> = FunctionField(QQ)
7070
sage: K is L
7171
True
72-
sage: M.<x> = FunctionField(GF(7)) # optional - sage.rings.finite_rings
73-
sage: K is M # optional - sage.rings.finite_rings
72+
sage: M.<x> = FunctionField(GF(7))
73+
sage: K is M
7474
False
7575
sage: N.<y> = FunctionField(QQ)
7676
sage: K is N
@@ -136,9 +136,9 @@ class FunctionFieldExtensionFactory(UniqueFactory):
136136
sage: y2 = y*1
137137
sage: y2 is y
138138
False
139-
sage: L.<w> = K.extension(x - y^2) # optional - sage.rings.function_field
140-
sage: M.<w> = K.extension(x - y2^2) # optional - sage.rings.function_field
141-
sage: L is M # optional - sage.rings.function_field
139+
sage: L.<w> = K.extension(x - y^2) # needs sage.rings.function_field
140+
sage: M.<w> = K.extension(x - y2^2) # needs sage.rings.function_field
141+
sage: L is M # needs sage.rings.function_field
142142
True
143143
"""
144144
def create_key(self,polynomial,names):
@@ -150,20 +150,20 @@ def create_key(self,polynomial,names):
150150
151151
sage: K.<x> = FunctionField(QQ)
152152
sage: R.<y> = K[]
153-
sage: L.<w> = K.extension(x - y^2) # indirect doctest # optional - sage.rings.function_field
153+
sage: L.<w> = K.extension(x - y^2) # indirect doctest # needs sage.rings.function_field
154154
155155
TESTS:
156156
157157
Verify that :trac:`16530` has been resolved::
158158
159159
sage: K.<x> = FunctionField(QQ)
160160
sage: R.<y> = K[]
161-
sage: L.<y> = K.extension(y^2 - x) # optional - sage.rings.function_field
162-
sage: R.<z> = L[] # optional - sage.rings.function_field
163-
sage: M.<z> = L.extension(z - 1) # optional - sage.rings.function_field
161+
sage: L.<y> = K.extension(y^2 - x) # needs sage.rings.function_field
162+
sage: R.<z> = L[] # needs sage.rings.function_field
163+
sage: M.<z> = L.extension(z - 1) # needs sage.rings.function_field
164164
sage: R.<z> = K[]
165-
sage: N.<z> = K.extension(z - 1) # optional - sage.rings.function_field
166-
sage: M is N # optional - sage.rings.function_field
165+
sage: N.<z> = K.extension(z - 1) # needs sage.rings.function_field
166+
sage: M is N # needs sage.rings.function_field
167167
False
168168
169169
"""
@@ -182,10 +182,10 @@ def create_object(self,version,key,**extra_args):
182182
183183
sage: K.<x> = FunctionField(QQ)
184184
sage: R.<y> = K[]
185-
sage: L.<w> = K.extension(x - y^2) # indirect doctest # optional - sage.rings.function_field
186-
sage: y2 = y*1 # optional - sage.rings.function_field
187-
sage: M.<w> = K.extension(x - y2^2) # indirect doctest # optional - sage.rings.function_field
188-
sage: L is M # optional - sage.rings.function_field
185+
sage: L.<w> = K.extension(x - y^2) # indirect doctest # needs sage.rings.function_field
186+
sage: y2 = y*1
187+
sage: M.<w> = K.extension(x - y2^2) # indirect doctest # needs sage.rings.function_field
188+
sage: L is M # needs sage.rings.function_field
189189
True
190190
"""
191191
from . import function_field_polymod, function_field_rational

‎src/sage/rings/function_field/derivations.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
For global function fields, which have positive characteristics, the higher
55
derivation is available::
66
7-
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[] # optional - sage.rings.finite_rings
8-
sage: L.<y> = K.extension(Y^3 + x + x^3*Y) # optional - sage.rings.finite_rings sage.rings.function_field
9-
sage: h = L.higher_derivation() # optional - sage.rings.finite_rings sage.rings.function_field
10-
sage: h(y^2, 2) # optional - sage.rings.finite_rings sage.rings.function_field
7+
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
1111
((x^7 + 1)/x^2)*y^2 + x^3*y
1212
1313
AUTHORS:

‎src/sage/rings/function_field/derivations_polymod.py

+102-102
Large diffs are not rendered by default.

‎src/sage/rings/function_field/differential.py

+214-189
Large diffs are not rendered by default.

‎src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
from sage.rings.integer_ring import ZZ
4141
from sage.rings.polynomial.ore_polynomial_element import OrePolynomial
4242
from sage.rings.polynomial.polynomial_ring import PolynomialRing_general
43-
from sage.rings.ring_extension import RingExtension_generic
4443
from sage.structure.parent import Parent
4544
from sage.structure.sage_object import SageObject
4645
from sage.structure.sequence import Sequence
4746
from sage.structure.unique_representation import UniqueRepresentation
4847

48+
lazy_import('sage.rings.ring_extension', 'RingExtension_generic')
4949
lazy_import('sage.rings.lazy_series_ring', 'LazyPowerSeriesRing')
5050

5151

‎src/sage/rings/function_field/element.pyx

+131-125
Large diffs are not rendered by default.

‎src/sage/rings/function_field/element_polymod.pyx

+20-19
Original file line numberDiff line numberDiff line change
@@ -276,22 +276,22 @@ cdef class FunctionFieldElement_polymod(FunctionFieldElement):
276276
277277
EXAMPLES::
278278
279-
sage: K.<x> = FunctionField(GF(3)) # optional - sage.rings.finite_rings
280-
sage: R.<y> = K[] # optional - sage.rings.finite_rings
281-
sage: L.<y> = K.extension(y^2 - x) # optional - sage.rings.finite_rings
282-
sage: L(y^3).nth_root(3) # optional - sage.rings.finite_rings
279+
sage: K.<x> = FunctionField(GF(3))
280+
sage: R.<y> = K[]
281+
sage: L.<y> = K.extension(y^2 - x)
282+
sage: L(y^3).nth_root(3)
283283
y
284-
sage: L(y^9).nth_root(-9) # optional - sage.rings.finite_rings
284+
sage: L(y^9).nth_root(-9)
285285
1/x*y
286286
287287
This also works for inseparable extensions::
288288
289-
sage: K.<x> = FunctionField(GF(3)) # optional - sage.rings.finite_rings
290-
sage: R.<y> = K[] # optional - sage.rings.finite_rings
291-
sage: L.<y> = K.extension(y^3 - x^2) # optional - sage.rings.finite_rings
292-
sage: L(x).nth_root(3)^3 # optional - sage.rings.finite_rings
289+
sage: K.<x> = FunctionField(GF(3))
290+
sage: R.<y> = K[]
291+
sage: L.<y> = K.extension(y^3 - x^2)
292+
sage: L(x).nth_root(3)^3
293293
x
294-
sage: L(x^9).nth_root(-27)^-27 # optional - sage.rings.finite_rings
294+
sage: L(x^9).nth_root(-27)^-27
295295
x^9
296296
297297
"""
@@ -337,12 +337,13 @@ cdef class FunctionFieldElement_polymod(FunctionFieldElement):
337337
338338
EXAMPLES::
339339
340-
sage: K.<x> = FunctionField(GF(4)) # optional - sage.rings.finite_rings
341-
sage: R.<y> = K[] # optional - sage.rings.finite_rings
342-
sage: L.<y> = K.extension(y^2 - x) # optional - sage.rings.finite_rings
343-
sage: y.is_nth_power(2) # optional - sage.rings.finite_rings
340+
sage: # needs sage.rings.finite_rings
341+
sage: K.<x> = FunctionField(GF(4))
342+
sage: R.<y> = K[]
343+
sage: L.<y> = K.extension(y^2 - x)
344+
sage: y.is_nth_power(2)
344345
False
345-
sage: L(x).is_nth_power(2) # optional - sage.rings.finite_rings
346+
sage: L(x).is_nth_power(2)
346347
True
347348
348349
"""
@@ -374,10 +375,10 @@ cdef class FunctionFieldElement_polymod(FunctionFieldElement):
374375
375376
EXAMPLES::
376377
377-
sage: K.<x> = FunctionField(GF(3)) # optional - sage.rings.finite_rings
378-
sage: R.<y> = K[] # optional - sage.rings.finite_rings
379-
sage: L.<y> = K.extension(y^2 - x) # optional - sage.rings.finite_rings
380-
sage: (y^3).nth_root(3) # indirect doctest # optional - sage.rings.finite_rings
378+
sage: K.<x> = FunctionField(GF(3))
379+
sage: R.<y> = K[]
380+
sage: L.<y> = K.extension(y^2 - x)
381+
sage: (y^3).nth_root(3) # indirect doctest
381382
y
382383
"""
383384
cdef Py_ssize_t deg = self._parent.degree()

‎src/sage/rings/function_field/element_rational.pyx

+32-29
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
5959
EXAMPLES::
6060
6161
sage: K.<a> = FunctionField(QQ)
62-
sage: ((a+1)/(a-1)).__pari__() # optional - sage.rings.finite_rings
62+
sage: ((a+1)/(a-1)).__pari__() # needs sage.libs.pari
6363
(a + 1)/(a - 1)
6464
6565
"""
@@ -71,16 +71,16 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
7171
7272
EXAMPLES::
7373
74-
sage: K.<t> = FunctionField(GF(7)) # optional - sage.rings.finite_rings
75-
sage: t.element() # optional - sage.rings.finite_rings
74+
sage: K.<t> = FunctionField(GF(7))
75+
sage: t.element()
7676
t
77-
sage: type(t.element()) # optional - sage.rings.finite_rings
77+
sage: type(t.element()) # needs sage.rings.finite_rings
7878
<... 'sage.rings.fraction_field_FpT.FpTElement'>
7979
80-
sage: K.<t> = FunctionField(GF(131101)) # optional - sage.rings.finite_rings
81-
sage: t.element() # optional - sage.rings.finite_rings
80+
sage: K.<t> = FunctionField(GF(131101)) # needs sage.libs.pari
81+
sage: t.element()
8282
t
83-
sage: type(t.element()) # optional - sage.rings.finite_rings
83+
sage: type(t.element())
8484
<... 'sage.rings.fraction_field_element.FractionFieldElement_1poly_field'>
8585
"""
8686
return self._x
@@ -297,9 +297,9 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
297297
sage: f.valuation(t^2 - 1/3)
298298
-3
299299
300-
sage: K.<x> = FunctionField(GF(2)) # optional - sage.rings.finite_rings
301-
sage: p = K.places_finite()[0] # optional - sage.rings.finite_rings
302-
sage: (1/x^2).valuation(p) # optional - sage.rings.finite_rings
300+
sage: K.<x> = FunctionField(GF(2))
301+
sage: p = K.places_finite()[0] # needs sage.libs.pari
302+
sage: (1/x^2).valuation(p) # needs sage.libs.pari
303303
-2
304304
"""
305305
from .place import FunctionFieldPlace
@@ -327,10 +327,10 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
327327
sage: f = 9 * (t+1)^6 / (t^2 - 2*t + 1); f.is_square()
328328
True
329329
330-
sage: K.<t> = FunctionField(GF(5)) # optional - sage.rings.finite_rings
331-
sage: (-t^2).is_square() # optional - sage.rings.finite_rings
330+
sage: K.<t> = FunctionField(GF(5))
331+
sage: (-t^2).is_square() # needs sage.libs.pari
332332
True
333-
sage: (-t^2).sqrt() # optional - sage.rings.finite_rings
333+
sage: (-t^2).sqrt() # needs sage.libs.pari
334334
2*t
335335
"""
336336
return self._x.is_square()
@@ -385,15 +385,16 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
385385
386386
EXAMPLES::
387387
388-
sage: K.<x> = FunctionField(GF(3)) # optional - sage.rings.finite_rings
389-
sage: f = (x+1)/(x-1) # optional - sage.rings.finite_rings
390-
sage: f.is_nth_power(1) # optional - sage.rings.finite_rings
388+
sage: # needs sage.rings.finite_rings
389+
sage: K.<x> = FunctionField(GF(3))
390+
sage: f = (x+1)/(x-1)
391+
sage: f.is_nth_power(1)
391392
True
392-
sage: f.is_nth_power(3) # optional - sage.rings.finite_rings
393+
sage: f.is_nth_power(3)
393394
False
394-
sage: (f^3).is_nth_power(3) # optional - sage.rings.finite_rings
395+
sage: (f^3).is_nth_power(3)
395396
True
396-
sage: (f^9).is_nth_power(-9) # optional - sage.rings.finite_rings
397+
sage: (f^9).is_nth_power(-9)
397398
True
398399
"""
399400
if n == 1:
@@ -436,17 +437,18 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
436437
437438
EXAMPLES::
438439
439-
sage: K.<x> = FunctionField(GF(3)) # optional - sage.rings.finite_rings
440-
sage: f = (x+1)/(x+2) # optional - sage.rings.finite_rings
441-
sage: f.nth_root(1) # optional - sage.rings.finite_rings
440+
sage: # needs sage.rings.finite_rings
441+
sage: K.<x> = FunctionField(GF(3))
442+
sage: f = (x+1)/(x+2)
443+
sage: f.nth_root(1)
442444
(x + 1)/(x + 2)
443-
sage: f.nth_root(3) # optional - sage.rings.finite_rings
445+
sage: f.nth_root(3)
444446
Traceback (most recent call last):
445447
...
446448
ValueError: element is not an n-th power
447-
sage: (f^3).nth_root(3) # optional - sage.rings.finite_rings
449+
sage: (f^3).nth_root(3)
448450
(x + 1)/(x + 2)
449-
sage: (f^9).nth_root(-9) # optional - sage.rings.finite_rings
451+
sage: (f^9).nth_root(-9)
450452
(x + 2)/(x + 1)
451453
"""
452454
if n == 0:
@@ -473,15 +475,16 @@ cdef class FunctionFieldElement_rational(FunctionFieldElement):
473475
474476
EXAMPLES::
475477
478+
sage: # needs sage.libs.pari
476479
sage: K.<t> = FunctionField(QQ)
477480
sage: f = (t+1) / (t^2 - 1/3)
478-
sage: f.factor() # optional - sage.rings.finite_rings
481+
sage: f.factor()
479482
(t + 1) * (t^2 - 1/3)^-1
480-
sage: (7*f).factor() # optional - sage.rings.finite_rings
483+
sage: (7*f).factor()
481484
(7) * (t + 1) * (t^2 - 1/3)^-1
482-
sage: ((7*f).factor()).unit() # optional - sage.rings.finite_rings
485+
sage: ((7*f).factor()).unit()
483486
7
484-
sage: (f^3).factor() # optional - sage.rings.finite_rings
487+
sage: (f^3).factor()
485488
(t + 1)^3 * (t^2 - 1/3)^-3
486489
"""
487490
P = self.parent()

‎src/sage/rings/function_field/extensions.py

+51-45
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,37 @@
1111
Constant field extension of the rational function field over rational numbers::
1212
1313
sage: K.<x> = FunctionField(QQ)
14-
sage: N.<a> = QuadraticField(2) # optional - sage.rings.number_field
15-
sage: L = K.extension_constant_field(N) # optional - sage.rings.number_field
16-
sage: L # optional - sage.rings.number_field
14+
sage: N.<a> = QuadraticField(2) # needs sage.rings.number_field
15+
sage: L = K.extension_constant_field(N) # needs sage.rings.number_field
16+
sage: L # needs sage.rings.number_field
1717
Rational function field in x over Number Field in a with defining
1818
polynomial x^2 - 2 with a = 1.4142... over its base
19-
sage: d = (x^2 - 2).divisor() # optional - sage.rings.number_field
20-
sage: d # optional - sage.rings.number_field
19+
sage: d = (x^2 - 2).divisor() # needs sage.libs.pari sage.modules
20+
sage: d # needs sage.libs.pari sage.modules
2121
-2*Place (1/x)
2222
+ Place (x^2 - 2)
23-
sage: L.conorm_divisor(d) # optional - sage.rings.number_field
23+
sage: L.conorm_divisor(d) # needs sage.libs.pari sage.modules sage.rings.number_field
2424
-2*Place (1/x)
2525
+ Place (x - a)
2626
+ Place (x + a)
2727
2828
Constant field extension of a function field over a finite field::
2929
30-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
31-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
32-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
33-
sage: E # optional - sage.rings.finite_rings sage.rings.function_field
30+
sage: # needs sage.rings.finite_rings sage.rings.function_field
31+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
32+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
33+
sage: E = F.extension_constant_field(GF(2^3))
34+
sage: E
3435
Function field in y defined by y^3 + x^6 + x^4 + x^2 over its base
35-
sage: p = F.get_place(3) # optional - sage.rings.finite_rings sage.rings.function_field
36-
sage: E.conorm_place(p) # random # optional - sage.rings.finite_rings sage.rings.function_field
36+
sage: p = F.get_place(3)
37+
sage: E.conorm_place(p) # random
3738
Place (x + z3, y + z3^2 + z3)
3839
+ Place (x + z3^2, y + z3)
3940
+ Place (x + z3^2 + z3, y + z3^2)
40-
sage: q = F.get_place(2) # optional - sage.rings.finite_rings sage.rings.function_field
41-
sage: E.conorm_place(q) # random # optional - sage.rings.finite_rings sage.rings.function_field
41+
sage: q = F.get_place(2)
42+
sage: E.conorm_place(q) # random
4243
Place (x + 1, y^2 + y + 1)
43-
sage: E.conorm_divisor(p + q) # random # optional - sage.rings.finite_rings sage.rings.function_field
44+
sage: E.conorm_divisor(p + q) # random
4445
Place (x + 1, y^2 + y + 1)
4546
+ Place (x + z3, y + z3^2 + z3)
4647
+ Place (x + z3^2, y + z3)
@@ -90,10 +91,11 @@ def __init__(self, F, k_ext):
9091
9192
TESTS::
9293
93-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
94-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
95-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
96-
sage: TestSuite(E).run(skip=['_test_elements', '_test_pickling']) # optional - sage.rings.finite_rings sage.rings.function_field
94+
sage: # needs sage.rings.finite_rings sage.rings.function_field
95+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
96+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
97+
sage: E = F.extension_constant_field(GF(2^3))
98+
sage: TestSuite(E).run(skip=['_test_elements', '_test_pickling'])
9799
"""
98100
k = F.constant_base_field()
99101
F_base = F.base_field()
@@ -129,10 +131,11 @@ def top(self):
129131
130132
EXAMPLES::
131133
132-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
133-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
134-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
135-
sage: E.top() # optional - sage.rings.finite_rings sage.rings.function_field
134+
sage: # needs sage.rings.finite_rings sage.rings.function_field
135+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
136+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
137+
sage: E = F.extension_constant_field(GF(2^3))
138+
sage: E.top()
136139
Function field in y defined by y^3 + x^6 + x^4 + x^2
137140
"""
138141
return self._F_ext
@@ -145,10 +148,11 @@ def defining_morphism(self):
145148
146149
EXAMPLES::
147150
148-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
149-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
150-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
151-
sage: E.defining_morphism() # optional - sage.rings.finite_rings sage.rings.function_field
151+
sage: # needs sage.rings.finite_rings sage.rings.function_field
152+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
153+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
154+
sage: E = F.extension_constant_field(GF(2^3))
155+
sage: E.defining_morphism()
152156
Function Field morphism:
153157
From: Function field in y defined by y^3 + x^6 + x^4 + x^2
154158
To: Function field in y defined by y^3 + x^6 + x^4 + x^2
@@ -170,16 +174,17 @@ def conorm_place(self, p):
170174
171175
EXAMPLES::
172176
173-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
174-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
175-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
176-
sage: p = F.get_place(3) # optional - sage.rings.finite_rings sage.rings.function_field
177-
sage: d = E.conorm_place(p) # optional - sage.rings.finite_rings sage.rings.function_field
178-
sage: [pl.degree() for pl in d.support()] # optional - sage.rings.finite_rings sage.rings.function_field
177+
sage: # needs sage.rings.finite_rings sage.rings.function_field
178+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
179+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
180+
sage: E = F.extension_constant_field(GF(2^3))
181+
sage: p = F.get_place(3)
182+
sage: d = E.conorm_place(p)
183+
sage: [pl.degree() for pl in d.support()]
179184
[1, 1, 1]
180-
sage: p = F.get_place(2) # optional - sage.rings.finite_rings sage.rings.function_field
181-
sage: d = E.conorm_place(p) # optional - sage.rings.finite_rings sage.rings.function_field
182-
sage: [pl.degree() for pl in d.support()] # optional - sage.rings.finite_rings sage.rings.function_field
185+
sage: p = F.get_place(2)
186+
sage: d = E.conorm_place(p)
187+
sage: [pl.degree() for pl in d.support()]
183188
[2]
184189
"""
185190
embedF = self.defining_morphism()
@@ -206,15 +211,16 @@ def conorm_divisor(self, d):
206211
207212
EXAMPLES::
208213
209-
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[] # optional - sage.rings.finite_rings
210-
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
211-
sage: E = F.extension_constant_field(GF(2^3)) # optional - sage.rings.finite_rings sage.rings.function_field
212-
sage: p1 = F.get_place(3) # optional - sage.rings.finite_rings sage.rings.function_field
213-
sage: p2 = F.get_place(2) # optional - sage.rings.finite_rings sage.rings.function_field
214-
sage: c = E.conorm_divisor(2*p1 + 3*p2) # optional - sage.rings.finite_rings sage.rings.function_field
215-
sage: c1 = E.conorm_place(p1) # optional - sage.rings.finite_rings sage.rings.function_field
216-
sage: c2 = E.conorm_place(p2) # optional - sage.rings.finite_rings sage.rings.function_field
217-
sage: c == 2*c1 + 3*c2 # optional - sage.rings.finite_rings sage.rings.function_field
214+
sage: # needs sage.rings.finite_rings sage.rings.function_field
215+
sage: K.<x> = FunctionField(GF(2)); R.<Y> = K[]
216+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
217+
sage: E = F.extension_constant_field(GF(2^3))
218+
sage: p1 = F.get_place(3)
219+
sage: p2 = F.get_place(2)
220+
sage: c = E.conorm_divisor(2*p1 + 3*p2)
221+
sage: c1 = E.conorm_place(p1)
222+
sage: c2 = E.conorm_place(p2)
223+
sage: c == 2*c1 + 3*c2
218224
True
219225
"""
220226
div_top = self.divisor_group()

‎src/sage/rings/function_field/function_field.py

+268-242
Large diffs are not rendered by default.

‎src/sage/rings/function_field/function_field_polymod.py

+247-219
Large diffs are not rendered by default.

‎src/sage/rings/function_field/function_field_rational.py

+101-93
Large diffs are not rendered by default.

‎src/sage/rings/function_field/ideal.py

+377-321
Large diffs are not rendered by default.

‎src/sage/rings/function_field/ideal_rational.py

+95-79
Large diffs are not rendered by default.

‎src/sage/rings/function_field/maps.py

+175-156
Large diffs are not rendered by default.

‎src/sage/rings/function_field/order.py

+28-24
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,53 @@
3030
`O` and one maximal infinite order `O_\infty`. There are other non-maximal
3131
orders such as equation orders::
3232
33-
sage: K.<x> = FunctionField(GF(3)); R.<y> = K[] # optional - sage.rings.finite_rings
34-
sage: L.<y> = K.extension(y^3 - y - x) # optional - sage.rings.finite_rings sage.rings.function_field
35-
sage: O = L.equation_order() # optional - sage.rings.finite_rings sage.rings.function_field
36-
sage: 1/y in O # optional - sage.rings.finite_rings sage.rings.function_field
33+
sage: # needs sage.rings.function_field
34+
sage: K.<x> = FunctionField(GF(3)); R.<y> = K[]
35+
sage: L.<y> = K.extension(y^3 - y - x)
36+
sage: O = L.equation_order()
37+
sage: 1/y in O
3738
False
38-
sage: x/y in O # optional - sage.rings.finite_rings sage.rings.function_field
39+
sage: x/y in O
3940
True
4041
4142
Sage provides an extensive functionality for computations in maximal orders of
4243
function fields. For example, you can decompose a prime ideal of a rational
4344
function field in an extension::
4445
45-
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[] # optional - sage.rings.finite_rings
46-
sage: o = K.maximal_order() # optional - sage.rings.finite_rings
47-
sage: p = o.ideal(x + 1) # optional - sage.rings.finite_rings
48-
sage: p.is_prime() # optional - sage.rings.finite_rings
46+
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[]
47+
sage: o = K.maximal_order()
48+
sage: p = o.ideal(x + 1)
49+
sage: p.is_prime() # needs sage.libs.pari
4950
True
5051
51-
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
52-
sage: O = F.maximal_order() # optional - sage.rings.finite_rings sage.rings.function_field
53-
sage: O.decomposition(p) # optional - sage.rings.finite_rings sage.rings.function_field
52+
sage: # needs sage.rings.function_field
53+
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2)
54+
sage: O = F.maximal_order()
55+
sage: O.decomposition(p)
5456
[(Ideal (x + 1, y + 1) of Maximal order
5557
of Function field in y defined by y^3 + x^6 + x^4 + x^2, 1, 1),
5658
(Ideal (x + 1, (1/(x^3 + x^2 + x))*y^2 + y + 1) of Maximal order
5759
of Function field in y defined by y^3 + x^6 + x^4 + x^2, 2, 1)]
5860
59-
sage: p1, relative_degree,ramification_index = O.decomposition(p)[1] # optional - sage.rings.finite_rings sage.rings.function_field
60-
sage: p1.parent() # optional - sage.rings.finite_rings sage.rings.function_field
61+
sage: # needs sage.rings.function_field
62+
sage: p1, relative_degree,ramification_index = O.decomposition(p)[1]
63+
sage: p1.parent()
6164
Monoid of ideals of Maximal order of Function field in y
6265
defined by y^3 + x^6 + x^4 + x^2
63-
sage: relative_degree # optional - sage.rings.finite_rings sage.rings.function_field
66+
sage: relative_degree
6467
2
65-
sage: ramification_index # optional - sage.rings.finite_rings sage.rings.function_field
68+
sage: ramification_index
6669
1
6770
6871
When the base constant field is the algebraic field `\QQbar`, the only prime ideals
6972
of the maximal order of the rational function field are linear polynomials. ::
7073
71-
sage: K.<x> = FunctionField(QQbar) # optional - sage.rings.number_field
72-
sage: R.<y> = K[] # optional - sage.rings.number_field
73-
sage: L.<y> = K.extension(y^2 - (x^3-x^2)) # optional - sage.rings.function_field sage.rings.number_field
74-
sage: p = K.maximal_order().ideal(x) # optional - sage.rings.function_field sage.rings.number_field
75-
sage: L.maximal_order().decomposition(p) # optional - sage.rings.function_field sage.rings.number_field
74+
sage: # needs sage.rings.function_field sage.rings.number_field
75+
sage: K.<x> = FunctionField(QQbar)
76+
sage: R.<y> = K[]
77+
sage: L.<y> = K.extension(y^2 - (x^3-x^2))
78+
sage: p = K.maximal_order().ideal(x)
79+
sage: L.maximal_order().decomposition(p)
7680
[(Ideal (1/x*y - I) of Maximal order of Function field in y defined by y^2 - x^3 + x^2,
7781
1,
7882
1),
@@ -269,9 +273,9 @@ def _repr_(self):
269273
sage: FunctionField(QQ,'y').maximal_order_infinite()
270274
Maximal infinite order of Rational function field in y over Rational Field
271275
272-
sage: K.<x> = FunctionField(GF(2)); R.<t> = PolynomialRing(K) # optional - sage.rings.finite_rings
273-
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2) # optional - sage.rings.finite_rings sage.rings.function_field
274-
sage: F.maximal_order_infinite() # optional - sage.rings.finite_rings sage.modules sage.rings.function_field
276+
sage: K.<x> = FunctionField(GF(2)); R.<t> = PolynomialRing(K)
277+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2) # needs sage.rings.function_field
278+
sage: F.maximal_order_infinite() # needs sage.modules sage.rings.function_field
275279
Maximal infinite order of Function field in y defined by y^3 + x^6 + x^4 + x^2
276280
"""
277281
return "Maximal infinite order of %s"%(self.function_field(),)

‎src/sage/rings/function_field/order_basis.py

+108-90
Large diffs are not rendered by default.

‎src/sage/rings/function_field/order_polymod.py

+225-191
Large diffs are not rendered by default.

‎src/sage/rings/function_field/order_rational.py

+73-69
Large diffs are not rendered by default.

‎src/sage/rings/function_field/place.py

+103-94
Large diffs are not rendered by default.

‎src/sage/rings/function_field/place_polymod.py

+99-86
Large diffs are not rendered by default.

‎src/sage/rings/function_field/place_rational.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def residue_field(self, name=None):
7777
sage: F.<x> = FunctionField(GF(2))
7878
sage: O = F.maximal_order()
7979
sage: p = O.ideal(x^2 + x + 1).place()
80-
sage: k, fr_k, to_k = p.residue_field()
80+
sage: k, fr_k, to_k = p.residue_field() # needs sage.rings.function_field
8181
sage: k
8282
Finite Field in z2 of size 2^2
8383
sage: fr_k
@@ -169,7 +169,7 @@ def valuation_ring(self):
169169
EXAMPLES::
170170
171171
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
172-
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
172+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x) # needs sage.rings.function_field
173173
sage: p = L.places_finite()[0]
174174
sage: p.valuation_ring()
175175
Valuation ring at Place (x, x*y)

‎src/sage/rings/function_field/valuation.py

+164-152
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.