finitefield.py

FiniteExtendedField class

FiniteExtendedField is a class for finite field, whose cardinality q = p**n with a prime p and n>1. It is usually called F_q or GF(q). The class is a subclass of FiniteField.

Constructor

FiniteExtendedField(characteristic, n_or_modulus)

Create a finite field. characteristic must be prime. n_or_modulus can be:

  1. an integer greater than 1, or
  2. a polynomial in a polynomial ring of F_p with degree greater than 1.
  3. an ideal of the polynomial ring F_p[#1] with degree greater than 1.

Methods

createElement(seed)

Create an element of the field from seed. The result is an instance of FiniteExtendedFieldElement. The seed can be:

getCharacteristic()

Return the characteristic of the field.

issubring(other)

Test whether the field is a subring of the other.

issuperring(other)

Test whether the field is a superring of the other.

Methods inherited from ring.Field.

gcd(a, b), getQuotientField(), isfield()

Methods inherited from ring.CommutativeRing.

isdomain(), iseuclidean(), isnoetherian(), ispid(), isufd()

Operators

lencardinality
reprrepr string
strstr string

Properties

(These properties are new in 0.4.1)


Last-modified: 2006-03-14 (Ва) 15:59:35