NZMATH  1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
  Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

nzmath.algfield.NumberField Class Reference
Inheritance diagram for nzmath.algfield.NumberField:
Collaboration diagram for nzmath.algfield.NumberField:

Public Member Functions

def __init__ (self, polynomial, precompute=False)
def __repr__ (self)
def __mul__ (self, other)
def getConj (self)
def disc (self)
def integer_ring (self)
def field_discriminant (self)
def basis (self, j)
def signature (self)
def POLRED (self)
def isIntBasis (self)
def isGaloisField (self, other=None)
def isFieldElement (self, A)
def getCharacteristic (self)
def createElement (self, *seed)
def issubring (self, other)
def issuperring (self, other)
def __eq__ (self, other)
def __hash__ (self)
- Public Member Functions inherited from nzmath.ring.Field
def __init__ (self)
def isfield (self)
def gcd (self, a, b)
def getQuotientField (self)
- Public Member Functions inherited from nzmath.ring.CommutativeRing
def isdomain (self)
def isnoetherian (self)
def isufd (self)
def ispid (self)
def iseuclidean (self)
def registerModuleAction (self, action_ring, action)
def hasaction (self, action_ring)
def getaction (self, action_ring)
- Public Member Functions inherited from nzmath.ring.Ring
def createElement (self, seed)
def getCommonSuperring (self, other)
def __ne__ (self, other)

Public Attributes

- Public Attributes inherited from nzmath.ring.CommutativeRing


 one = property(_getOne, None, None, "multiplicative unit.")
 zero = property(_getZero, None, None, "additive unit.")

Private Member Functions

def _getOne (self)
def _getZero (self)

Private Attributes


Detailed Description

A class of number field.

Definition at line 20 of file

Constructor & Destructor Documentation

◆ __init__()

def nzmath.algfield.NumberField.__init__ (   self,
  precompute = False 
Initialize a number field with given polynomial coefficients
(in ascending order).

Definition at line 24 of file

Member Function Documentation

◆ __eq__()

◆ __hash__()

def nzmath.algfield.NumberField.__hash__ (   self)

Reimplemented from nzmath.ring.Ring.

Definition at line 318 of file

◆ __mul__()

def nzmath.algfield.NumberField.__mul__ (   self,
Output composite field of self and other.

Definition at line 42 of file

References nzmath.algfield.NumberField.polynomial, nzmath.bigrange.range(), and nzmath.algfield.zpoly().

◆ __repr__()

◆ _getOne()

def nzmath.algfield.NumberField._getOne (   self)

Definition at line 322 of file

References nzmath.algfield.NumberField._one.

◆ _getZero()

def nzmath.algfield.NumberField._getZero (   self)

Definition at line 331 of file

References nzmath.algfield.NumberField._zero.

◆ basis()

def nzmath.algfield.NumberField.basis (   self,
Return the j-th basis of self.

Definition at line 109 of file

References, and nzmath.algfield.NumberField.polynomial.

Referenced by nzmath.algfield.NumberField.disc().

◆ createElement()

def nzmath.algfield.NumberField.createElement (   self,
createElement returns an element of the field with seed.

Reimplemented from nzmath.ring.Field.

Definition at line 277 of file

References nzmath.algfield.NumberField.polynomial.

Referenced by nzmath.finitefield.FiniteField.random_element(), and nzmath.finitefield.FiniteField.TonelliShanks().

◆ disc()

def nzmath.algfield.NumberField.disc (   self)
Compute the discriminant of self.polynomial.
(The output is not field disc of self but disc of self.polynomial.)
Obasis, disc = round2.round2(self)
A = [algfield.MatAlgNumber(obasis[0][i]) for i in range(degree)]
return disc(A) <--- real disc of self field.

Definition at line 65 of file

References nzmath.lattice.Lattice.basis, nzmath.algfield.NumberField.basis(), nzmath.round2.ModuleWithDenominator.basis,, and nzmath.bigrange.range().

Referenced by nzmath.algfield.NumberField.isIntBasis(), and nzmath.quad.ReducedQuadraticForm.repOfModule().

◆ field_discriminant()

def nzmath.algfield.NumberField.field_discriminant (   self)

◆ getCharacteristic()

def nzmath.algfield.NumberField.getCharacteristic (   self)
Return characteristic of the field (it is always zero).

Reimplemented from nzmath.ring.Ring.

Definition at line 271 of file

Referenced by nzmath.finitefield.ExtendedField.__contains__().

◆ getConj()

def nzmath.algfield.NumberField.getConj (   self)
Return (approximate) solutions of self.polynomial.
We can discriminate the conjugate field of self by these values.

Definition at line 55 of file

References nzmath.algfield.NumberField.polynomial.

Referenced by nzmath.algfield.BasicAlgNumber.getApprox(), and nzmath.algfield.NumberField.POLRED().

◆ integer_ring()

def nzmath.algfield.NumberField.integer_ring (   self)
Return the integer ring of self (using round2 module)

Definition at line 87 of file

Referenced by nzmath.algfield.NumberField.isIntBasis(), and nzmath.algfield.NumberField.POLRED().

◆ isFieldElement()

def nzmath.algfield.NumberField.isFieldElement (   self,
Determine whether A is field element of self field or not.

Definition at line 258 of file

References nzmath.algfield.NumberField.POLRED(), and nzmath.algfield.NumberField.polynomial.

◆ isGaloisField()

def nzmath.algfield.NumberField.isGaloisField (   self,
  other = None 
Determine whether self/other is Galois field.

Definition at line 249 of file

References nzmath.algfield.NumberField.signature().

◆ isIntBasis()

def nzmath.algfield.NumberField.isIntBasis (   self)

◆ issubring()

def nzmath.algfield.NumberField.issubring (   self,
Report whether another ring contains the field as a subring.

Reimplemented from nzmath.ring.Ring.

Definition at line 292 of file

Referenced by nzmath.algfield.NumberField.__eq__(), nzmath.ring.Ring.getCommonSuperring(), nzmath.rational.RationalField.getCommonSuperring(), and nzmath.rational.IntegerRing.getCommonSuperring().

◆ issuperring()


def nzmath.algfield.NumberField.POLRED (   self)
Given a polynomial f i.e. a field self, output some polynomials
defining subfield of self, where self is a field defined by f.
Algorithm 4.4.11 in Cohen's book.

Definition at line 171 of file

References nzmath.algfield.changetype(),, nzmath.ring.exact_division(), nzmath.algfield.NumberField.getConj(), nzmath.algfield.NumberField.integer_ring(), nzmath.algfield.NumberField.polynomial, nzmath.bigrange.range(), nzmath.algfield.NumberField.signature(), and nzmath.algfield.zpoly().

Referenced by nzmath.algfield.NumberField.isFieldElement().

◆ signature()

def nzmath.algfield.NumberField.signature (   self)
Using Strum's algorithm, compute the signature of self.
Algorithm 4.1.11 in Cohen's Book

Definition at line 117 of file

References, nzmath.algfield.NumberField.polynomial, and nzmath.algfield.zpoly().

Referenced by nzmath.algfield.NumberField.isGaloisField(), and nzmath.algfield.NumberField.POLRED().

Member Data Documentation

◆ _one

◆ _zero

◆ conj


Definition at line 62 of file

◆ degree

Definition at line 31 of file

Referenced by nzmath.poly.array.ArrayPoly.__add__(), nzmath.algfield.MatAlgNumber.__add__(), nzmath.finitefield.ExtendedField.__eq__(), nzmath.finitefield.ExtendedField.__hash__(), nzmath.poly.array.ArrayPoly.__mul__(), nzmath.poly.array.ArrayPolyMod.__mul__(), nzmath.algfield.BasicAlgNumber.__mul__(), nzmath.algfield.BasicAlgNumber.__pow__(), nzmath.finitefield.ExtendedField.__repr__(), nzmath.poly.array.ArrayPoly.__sub__(), nzmath.algfield.MatAlgNumber.__sub__(), nzmath.algfield.BasicAlgNumber.__truediv__(), nzmath.algfield.BasicAlgNumber._int_to_algnumber(), nzmath.algfield.BasicAlgNumber._rational_to_algnumber(), nzmath.algfield.NumberField.basis(), nzmath.finitefield.ExtendedField.card(), nzmath.algfield.MatAlgNumber.ch_basic(), nzmath.algfield.BasicAlgNumber.ch_matrix(), nzmath.poly.array.ArrayPoly.coefficients_to_dict(), nzmath.algfield.NumberField.disc(), nzmath.poly.uniutil.DomainPolynomial.discriminant(), nzmath.poly.uniutil.FieldPolynomial.discriminant(), nzmath.poly.array.ArrayPoly.downshift_degree(), nzmath.poly.array.ArrayPoly.FFT_mul(), nzmath.poly.array.ArrayPolyMod.FFT_mul(), nzmath.algfield.NumberField.field_discriminant(), nzmath.algfield.BasicAlgNumber.getApprox(), nzmath.algfield.BasicAlgNumber.getCharPoly(), nzmath.algfield.BasicAlgNumber.inverse(), nzmath.finitefield.ExtendedField.issubring(), nzmath.algfield.BasicAlgNumber.norm(), nzmath.algfield.NumberField.POLRED(), nzmath.poly.array.ArrayPoly.power(), nzmath.poly.array.ArrayPolyMod.power(), nzmath.algfield.NumberField.signature(), nzmath.poly.array.ArrayPoly.split_at(), and nzmath.poly.array.ArrayPolyMod.split_at().

◆ discriminant


Definition at line 92 of file

Referenced by nzmath.algfield.NumberField.field_discriminant().

◆ integer_basis


Definition at line 93 of file

Referenced by nzmath.algfield.NumberField.field_discriminant().

◆ poldisc


Definition at line 84 of file

◆ polynomial

Property Documentation

◆ one

◆ zero = property(_getZero, None, None, "additive unit.")

The documentation for this class was generated from the following file: