algfield.py

NumberField

The class is for number field.

Initialize

NumberField(polynomial)

polynomial must be a monic irreducible polynomial defining the number field.

Ex.

>>> K = algfield.NumberField([-2, 0, 1])
>>> F = algfield.NumberField([-3, 0, 0, 1])
>>> print K
NumberField([-2, 0, 1])
>>> print F
NumberField([-3, 0, 0, 1])

Attribute

polynomial

defining polynomial of the number field.

degree

degree of number field.

Methods

disc()

Compute the discriminant of the number field. However the output is not disc of the number field itself but disc of defining polynomial.

signature()

Using Strum's algorithm, compute the signature of the number field.

POLRED()

Given a polynomial f i.e. a field defined by f, output some polynomials defining subfield of the given number field.

isIntBasis()

Determine whether standard basis of the number field is integral basis of the field.

isGaloisField()

Determine whether self/other is Galois field.

getCharacteristic()

Return characteristic of the number field (it is always zero).

Operators

operatorexplanation
K * Fcomposite field K and F