Skip to content

Commit 2f98fd5

Browse files
author
Matthias Koeppe
committed
src/sage/rings/polynomial/polynomial_ring.py: Use '# needs sage.libs.ntl' when GF2X is used
1 parent cb4fa80 commit 2f98fd5

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

src/sage/rings/polynomial/pbori/pbori.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3719,7 +3719,7 @@ cdef class BooleanPolynomial(MPolynomial):
37193719
sage: g = R(1)
37203720
sage: h = g.univariate_polynomial(); h
37213721
1
3722-
sage: h.parent()
3722+
sage: h.parent() # needs sage.libs.ntl
37233723
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
37243724
"""
37253725
if not self.is_univariate():

src/sage/rings/polynomial/polynomial_element.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10007,12 +10007,12 @@ cdef class Polynomial(CommutativePolynomial):
1000710007
Univariate Polynomial Ring in x over Integer Ring
1000810008
sage: g = f.map_coefficients(residue, new_base_ring=k); g
1000910009
x + 1
10010-
sage: g.parent() # optional - sage.rings.finite_rings
10010+
sage: g.parent() # needs sage.libs.ntl
1001110011
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
1001210012
sage: residue = k.coerce_map_from(ZZ)
1001310013
sage: g = f.map_coefficients(residue); g
1001410014
x + 1
10015-
sage: g.parent() # optional - sage.rings.finite_rings
10015+
sage: g.parent() # needs sage.libs.ntl
1001610016
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
1001710017
"""
1001810018
R = self._parent

src/sage/rings/polynomial/polynomial_quotient_ring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class PolynomialQuotientRingFactory(UniqueFactory):
109109
110110
::
111111
112-
sage: A.<y> = PolynomialRing(GF(2)); A # optional - sage.rings.finite_rings
112+
sage: A.<y> = PolynomialRing(GF(2)); A # optional - sage.rings.finite_rings sage.libs.ntl
113113
Univariate Polynomial Ring in y over Finite Field of size 2 (using GF2X)
114114
sage: B = A.quotient(y^2 + y + 1, 'y2'); B # optional - sage.rings.finite_rings
115115
Univariate Quotient Polynomial Ring in y2 over Finite Field of size 2

src/sage/rings/polynomial/polynomial_ring.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,13 @@ def is_exact(self):
12661266

12671267
def is_field(self, proof=True):
12681268
"""
1269-
Return False, since polynomial rings are never fields.
1269+
Return ``False``, since polynomial rings are never fields.
12701270
12711271
EXAMPLES::
12721272
1273-
sage: R.<z> = Integers(2)[]; R
1273+
sage: R.<z> = Integers(2)[]; R # needs sage.libs.ntl
12741274
Univariate Polynomial Ring in z over Ring of integers modulo 2 (using GF2X)
1275-
sage: R.is_field()
1275+
sage: R.is_field() # needs sage.libs.ntl
12761276
False
12771277
"""
12781278
return False
@@ -3251,7 +3251,7 @@ def residue_field(self, ideal, names=None):
32513251
32523252
EXAMPLES::
32533253
3254-
sage: # needs sage.rings.finite_rings
3254+
sage: # needs sage.libs.ntl
32553255
sage: R.<t> = GF(2)[]
32563256
sage: k.<a> = R.residue_field(t^3 + t + 1); k
32573257
Residue field in a
@@ -3301,9 +3301,9 @@ def __init__(self, base_ring, name="x", implementation=None, element_class=None,
33013301
"""
33023302
TESTS::
33033303
3304-
sage: P = GF(2)['x']; P # needs sage.rings.finite_rings
3304+
sage: P = GF(2)['x']; P # needs sage.libs.ntl
33053305
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
3306-
sage: type(P.gen()) # needs sage.rings.finite_rings
3306+
sage: type(P.gen()) # needs sage.libs.ntl
33073307
<class 'sage.rings.polynomial.polynomial_gf2x.Polynomial_GF2X'>
33083308
33093309
sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_mod_p
@@ -3371,19 +3371,20 @@ def _implementation_names_impl(implementation, base_ring, sparse):
33713371
"""
33723372
TESTS::
33733373
3374-
sage: # needs sage.rings.finite_rings
3374+
sage: # needs sage.libs.ntl
33753375
sage: PolynomialRing(GF(2), 'x', implementation="GF2X")
33763376
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
33773377
sage: PolynomialRing(GF(2), 'x', implementation="NTL")
33783378
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
33793379
sage: PolynomialRing(GF(2), 'x', implementation=None)
33803380
Univariate Polynomial Ring in x over Finite Field of size 2 (using GF2X)
3381-
sage: PolynomialRing(GF(2), 'x', implementation="FLINT")
3382-
Univariate Polynomial Ring in x over Finite Field of size 2
33833381
sage: PolynomialRing(GF(3), 'x', implementation="GF2X")
33843382
Traceback (most recent call last):
33853383
...
33863384
ValueError: GF2X only supports modulus 2
3385+
3386+
sage: PolynomialRing(GF(2), 'x', implementation="FLINT") # needs sage.libs.flint
3387+
Univariate Polynomial Ring in x over Finite Field of size 2
33873388
"""
33883389
if sparse:
33893390
return NotImplemented

0 commit comments

Comments
 (0)