6.7.1 rings.finite_field - A finite field

The module rings.finite_field defines the following methods:

conway_polynomial( p, n)

Return the Conway polynomial of degree n over GF(p), which is loaded from a table.

If the requested polynomial is not known, this function raises a RuntimeError exception.

INPUT:
    p -- int
    n -- int
    
OUTPUT:
    Polynomial -- a polynomial over the prime finite field GF(p).

NOTE: The first time this function is called a table is read from disk, which takes a fraction of a second. Subsequent calls do not require reloading the table.

See also the ConwayPolynomials() object, which is a table of Conway polynomials. For example, if c=ConwayPolynomials, then c.primes() is a list of all primes for which the polynomials are known, and for a given prime p, c.degree(p) is a list of all degrees for which the Conway polynomials are known.

sage: conway_polynomial(2,5)
x^5 + x^2 + 1
sage: conway_polynomial(101,5)
x^5 + 2*x + 99
sage: conway_polynomial(97,101)
Traceback (most recent call last):
...
RuntimeError: Conway polynomial over F_97 of degree 101 not in database.

exists_conway_polynomial( p, n)

Return True if the Conway polynomial over F_p of degree n is in the database and False otherwise.

If the Conway polynomial is in the database, to obtain it use the command conway_polynomial(p,n).

sage: exists_conway_polynomial(2,3)
True
sage: exists_conway_polynomial(2,-1)
False
sage: exists_conway_polynomial(97,200)
False
sage: exists_conway_polynomial(6,6)
False

The module rings.finite_field defines the following classes:

class FiniteField_ext_pari
Finite field of order q, where q is a nontrivial prime power.

class FiniteField_generic

class FiniteField_prime_modn

class RingElement



Subsections
See About this document... for information on suggesting changes.