Frank Lübeck’s tables of Conway polynomials over finite fields#

class sage.databases.conway.ConwayPolynomials[source]#

Bases: Mapping

Initialize the database.

degrees(p)[source]#

Return the list of integers n for which the database of Conway polynomials contains the polynomial of degree n over GF(p).

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.degrees(60821)
[1, 2, 3, 4]
sage: c.degrees(next_prime(10^7))
[]
>>> from sage.all import *
>>> c = ConwayPolynomials()
>>> c.degrees(Integer(60821))
[1, 2, 3, 4]
>>> c.degrees(next_prime(Integer(10)**Integer(7)))
[]
has_polynomial(p, n)[source]#

Return True if the database of Conway polynomials contains the polynomial of degree n over GF(p).

INPUT:

  • p – prime number

  • n – positive integer

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.has_polynomial(97, 12)
True
sage: c.has_polynomial(60821, 5)
False
>>> from sage.all import *
>>> c = ConwayPolynomials()
>>> c.has_polynomial(Integer(97), Integer(12))
True
>>> c.has_polynomial(Integer(60821), Integer(5))
False
polynomial(p, n)[source]#

Return the Conway polynomial of degree n over GF(p), or raise a RuntimeError if this polynomial is not in the database.

Note

See also the global function conway_polynomial for a more user-friendly way of accessing the polynomial.

INPUT:

  • p – prime number

  • n – positive integer

OUTPUT:

List of Python int’s giving the coefficients of the corresponding Conway polynomial in ascending order of degree.

EXAMPLES:

sage: c = ConwayPolynomials()
sage: c.polynomial(3, 21)
(1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
sage: c.polynomial(97, 128)
Traceback (most recent call last):
...
RuntimeError: Conway polynomial over F_97 of degree 128 not in database.
>>> from sage.all import *
>>> c = ConwayPolynomials()
>>> c.polynomial(Integer(3), Integer(21))
(1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
>>> c.polynomial(Integer(97), Integer(128))
Traceback (most recent call last):
...
RuntimeError: Conway polynomial over F_97 of degree 128 not in database.
primes()[source]#

Return the list of prime numbers p for which the database of Conway polynomials contains polynomials over GF(p).

EXAMPLES:

sage: c = ConwayPolynomials()
sage: P = c.primes()
sage: 2 in P
True
sage: next_prime(10^7) in P
False
>>> from sage.all import *
>>> c = ConwayPolynomials()
>>> P = c.primes()
>>> Integer(2) in P
True
>>> next_prime(Integer(10)**Integer(7)) in P
False
class sage.databases.conway.DictInMapping(dict)[source]#

Bases: Mapping

Places dict into a non-mutable mapping.