The module rings.finite_field defines the following methods:
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.
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: