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

Skip to content
Back to top
View this page
Edit this page

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

class sage.databases.conway.ConwayPolynomials

  Bases: `Mapping`

  Initialize the database.

  degrees(p)

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

    EXAMPLES:

    Sage

        sage: c = ConwayPolynomials()
        sage: c.degrees(60821)
        [1, 2, 3, 4]
        sage: c.degrees(next_prime(10^7))
        []

    Python

        >>> 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)

    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

        sage: c = ConwayPolynomials()
        sage: c.has_polynomial(97, 12)
        True
        sage: c.has_polynomial(60821, 5)
        False

    Python

        >>> 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)

    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

        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.

    Python

        >>> 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()

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

    EXAMPLES:

    Sage

        sage: c = ConwayPolynomials()
        sage: P = c.primes()
        sage: 2 in P
        True
        sage: next_prime(10^7) in P
        False

    Python

        >>> 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)

  Bases: `Mapping`

  Places dict into a non-mutable mapping.