@@ -391,7 +391,7 @@ def _element_constructor_(self, x=None, check=True, is_gen=False,
391
391
Throw a TypeError if any of the coefficients cannot be coerced
392
392
into the base ring (:trac:`6777`)::
393
393
394
- sage: RealField(300)['x']( [ 1, ComplexField(300).gen(), 0 ]) # optional - sage.rings.real_mpfr
394
+ sage: RealField(300)['x']( [ 1, ComplexField(300).gen(), 0 ]) # needs sage.rings.real_mpfr
395
395
Traceback (most recent call last):
396
396
...
397
397
TypeError: unable to convert '1.00...00*I' to a real number
@@ -884,7 +884,7 @@ def _magma_init_(self, magma):
884
884
885
885
sage: k.<a> = GF(9) # needs sage.rings.finite_rings
886
886
sage: R.<x> = k[] # needs sage.rings.finite_rings
887
- sage: magma(a^2*x^3 + (a+1)*x + a) # optional - magma, needs sage.rings.finite_rings
887
+ sage: magma(a^2*x^3 + (a+1)*x + a) # optional - magma # needs sage.rings.finite_rings
888
888
a^2*x^3 + a^2*x + a
889
889
"""
890
890
B = magma (self .base_ring ())
@@ -1185,6 +1185,7 @@ def cyclotomic_polynomial(self, n):
1185
1185
x^4 + 1
1186
1186
sage: R.cyclotomic_polynomial(12)
1187
1187
x^4 - x^2 + 1
1188
+
1188
1189
sage: S = PolynomialRing(FiniteField(7), 'x')
1189
1190
sage: S.cyclotomic_polynomial(12)
1190
1191
x^4 + 6*x^2 + 1
@@ -2066,15 +2067,15 @@ def __init__(self, base_ring, name="x", sparse=False, implementation=None,
2066
2067
Sparse Univariate Polynomial Ring in x over Rational Field
2067
2068
sage: type(R.gen())
2068
2069
<class 'sage.rings.polynomial.polynomial_ring.PolynomialRing_field_with_category.element_class'>
2069
- sage: R = PRing(CC, 'x'); R # optional - sage.rings.real_mpfr
2070
+ sage: R = PRing(CC, 'x'); R # needs sage.rings.real_mpfr
2070
2071
Univariate Polynomial Ring in x over Complex Field with 53 bits of precision
2071
- sage: type(R.gen()) # optional - sage.rings.real_mpfr
2072
+ sage: type(R.gen()) # needs sage.rings.real_mpfr
2072
2073
<class 'sage.rings.polynomial.polynomial_ring.PolynomialRing_field_with_category.element_class'>
2073
2074
2074
2075
Demonstrate that :trac:`8762` is fixed::
2075
2076
2076
2077
sage: R.<x> = PolynomialRing(GF(next_prime(10^20)), sparse=True) # needs sage.rings.finite_rings
2077
- sage: x^(10^20) # this should be fast # needs sage.rings.finite_rings
2078
+ sage: x^(10^20) # this should be fast # needs sage.rings.finite_rings
2078
2079
x^100000000000000000000
2079
2080
"""
2080
2081
def _element_class ():
@@ -2655,6 +2656,7 @@ def _roth_ruckenstein(self, p, degree_bound, precision):
2655
2656
2656
2657
EXAMPLES::
2657
2658
2659
+ sage: # needs sage.rings.finite_rings
2658
2660
sage: F = GF(17)
2659
2661
sage: Px.<x> = F[]
2660
2662
sage: Pxy.<y> = Px[]
@@ -3281,11 +3283,11 @@ def residue_field(self, ideal, names=None):
3281
3283
Traceback (most recent call last):
3282
3284
...
3283
3285
ArithmeticError: ideal is not maximal
3284
- sage: R.residue_field(0) # needs sage.rings.finite_rings
3286
+ sage: R.residue_field(0)
3285
3287
Traceback (most recent call last):
3286
3288
...
3287
3289
ArithmeticError: ideal is not maximal
3288
- sage: R.residue_field(1) # needs sage.rings.finite_rings
3290
+ sage: R.residue_field(1)
3289
3291
Traceback (most recent call last):
3290
3292
...
3291
3293
ArithmeticError: ideal is not maximal
@@ -3311,12 +3313,13 @@ def __init__(self, base_ring, name="x", implementation=None, element_class=None,
3311
3313
sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_mod_p
3312
3314
sage: P = PolynomialRing_dense_mod_p(GF(5), 'x'); P
3313
3315
Univariate Polynomial Ring in x over Finite Field of size 5
3314
- sage: type(P.gen()) # needs sage.rings.finite_rings
3316
+ sage: type(P.gen()) # needs sage.libs.flint
3315
3317
<class 'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint'>
3316
3318
3317
- sage: P = PolynomialRing_dense_mod_p(GF(5), 'x', implementation='NTL'); P # needs sage.rings.finite_rings
3319
+ sage: # needs sage.libs.ntl
3320
+ sage: P = PolynomialRing_dense_mod_p(GF(5), 'x', implementation='NTL'); P
3318
3321
Univariate Polynomial Ring in x over Finite Field of size 5 (using NTL)
3319
- sage: type(P.gen()) # needs sage.rings.finite_rings
3322
+ sage: type(P.gen())
3320
3323
<class 'sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_mod_p'>
3321
3324
3322
3325
sage: P = PolynomialRing_dense_mod_p(GF(9223372036854775837), 'x'); P # needs sage.libs.ntl sage.rings.finite_rings
@@ -3326,12 +3329,13 @@ def __init__(self, base_ring, name="x", implementation=None, element_class=None,
3326
3329
3327
3330
This caching bug was fixed in :trac:`24264`::
3328
3331
3332
+ sage: # needs sage.rings.finite_rings
3329
3333
sage: p = 2^64 + 13
3330
- sage: A = GF(p^2) # needs sage.rings.finite_rings
3331
- sage: B = GF(p^3) # needs sage.rings.finite_rings
3332
- sage: R = A.modulus().parent() # needs sage.rings.finite_rings
3333
- sage: S = B.modulus().parent() # needs sage.rings.finite_rings
3334
- sage: R is S # needs sage.rings.finite_rings
3334
+ sage: A = GF(p^2)
3335
+ sage: B = GF(p^3)
3336
+ sage: R = A.modulus().parent()
3337
+ sage: S = B.modulus().parent()
3338
+ sage: R is S
3335
3339
True
3336
3340
"""
3337
3341
if element_class is None :
0 commit comments