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.round2 Namespace Reference

## Classes

class  ModuleWithDenominator

## Functions

def round2 (minpoly_coeff)

def _prepare_squarefactors (disc)

def _p_maximal (p, e, minpoly_coeff)

def _p_radical (omega, p, q, minpoly, n)

def _kernel_of_qpow (omega, q, p, minpoly, n)

def _p_module (alpha, l, p, theminpoly)

def _null_linear_combination (zeta, alpha, j, p, theminpoly)

def Dedekind (minpoly_coeff, p, e)

def _factor_minpoly_modp (minpoly_coeff, p)

def _mod_p (poly, p)

def _min_abs_poly (poly_p)

def _coeff_list (upoly, size)

def _pull_back (elem, p)

def _normalize_int (elem)

def _default_omega (degree)

def _standard_base (degree, i)

def _rational_polynomial (coeffs)

## Variables

_log = logging.getLogger('nzmath.round2')

Z = rational.theIntegerRing

Q = rational.theRationalField

## Detailed Description

Round 2 method

The method is for obtaining the maximal order of a number field from a
subring generated by a root of a defining polynomial of the field.

- H.Cohen CCANT Algorithm 6.1.8
- Kida Y. LN Chapter 3


## ◆ _coeff_list()

 def nzmath.round2._coeff_list ( upoly, size )
private
Return a list of given size consisting of coefficients of upoly


Definition at line 334 of file round2.py.

References nzmath.bigrange.range().

## ◆ _default_omega()

 def nzmath.round2._default_omega ( degree )
private
Return the default omega


Definition at line 370 of file round2.py.

References nzmath.round2._standard_base(), and nzmath.bigrange.range().

Referenced by nzmath.round2.Dedekind(), and nzmath.round2.round2().

## ◆ _factor_minpoly_modp()

 def nzmath.round2._factor_minpoly_modp ( minpoly_coeff, p )
private
Factor theminpoly modulo p, and return two values in a tuple.
We call gcd(square factors mod p, difference of minpoly and its modp) Z.
1) degree of Z
2) (minpoly mod p) / Z


Definition at line 292 of file round2.py.

References nzmath.round2._min_abs_poly(), nzmath.round2._mod_p(), and nzmath.gcd.gcd().

Referenced by nzmath.round2.Dedekind().

## ◆ _kernel_of_qpow()

 def nzmath.round2._kernel_of_qpow ( omega, q, p, minpoly, n )
private
Return the kernel of q-th powering, which is a linear map over Fp.
q is a power of p which exceeds n.

(omega_j^q (mod theminpoly) = \sum a_i_j omega_i   a_i_j in Fp)


Definition at line 166 of file round2.py.

References nzmath.bigrange.range().

## ◆ _min_abs_poly()

 def nzmath.round2._min_abs_poly ( poly_p )
private
Return minimal absolute mapping of given F_p coefficient polynomial.


Definition at line 324 of file round2.py.

References nzmath.round2._pull_back().

Referenced by nzmath.round2._factor_minpoly_modp().

## ◆ _mod_p()

 def nzmath.round2._mod_p ( poly, p )
private
Return modulo p reduction of given integer coefficient polynomial.


Definition at line 315 of file round2.py.

Referenced by nzmath.round2._factor_minpoly_modp().

## ◆ _normalize_int()

 def nzmath.round2._normalize_int ( elem )
private
Return integer object, which is equal to given elem, whose type is
either integer or rational number.


Definition at line 358 of file round2.py.

Referenced by nzmath.round2._p_module().

## ◆ _null_linear_combination()

 def nzmath.round2._null_linear_combination ( zeta, alpha, j, p, theminpoly )
private
Return linear combination coefficients of tau_i = z_i * alpha[j],
which is congruent to 0 modulo theminpoly and pIp.

alpha is a module.

zeta_{j+1} = {z in zeta_j | z * alpha[j] (mod theminpoly) = 0 (mod pIp)}


Definition at line 236 of file round2.py.

References nzmath.round2._coeff_list(), and nzmath.bigrange.range().

Referenced by nzmath.round2._p_module().

## ◆ _p_maximal()

 def nzmath.round2._p_maximal ( p, e, minpoly_coeff )
private
Return p-maximal basis with some related informations.

The arguments:
p: the prime
e: the exponent
minpoly_coeff: (intefer) list of coefficients of the minimal
polynomial of theta


Definition at line 93 of file round2.py.

Referenced by nzmath.round2.round2().

## ◆ _p_module()

 def nzmath.round2._p_module ( alpha, l, p, theminpoly )
private
Return basis of Up/pO, where Up = {x in Ip | xIp \subset pIp}.


Definition at line 205 of file round2.py.

Referenced by nzmath.round2._p_maximal().

 def nzmath.round2._p_radical ( omega, p, q, minpoly, n )
private
Return module Ip with dimension of Ip/pO.

Ip is the radical of pO, or
Ip = {x in O | ~x in kernel f},
where ~x is x mod pO, f is q(=p^e > n)-th powering, which in fact an
Fp-linear map.


Definition at line 137 of file round2.py.

Referenced by nzmath.round2._p_maximal().

## ◆ _prepare_squarefactors()

 def nzmath.round2._prepare_squarefactors ( disc )
private
Return a list of square factors of disc (=discriminant).

PRECOND: d is integer


Definition at line 55 of file round2.py.

Referenced by nzmath.round2.round2().

## ◆ _pull_back()

 def nzmath.round2._pull_back ( elem, p )
private
Return an integer which is a pull back of elem in Fp.


Definition at line 341 of file round2.py.

Referenced by nzmath.round2._min_abs_poly(), nzmath.round2._p_module(), and nzmath.round2._p_radical().

## ◆ _rational_polynomial()

 def nzmath.round2._rational_polynomial ( coeffs )
private
Return rational polynomial with given coefficients in ascending
order.


Definition at line 385 of file round2.py.

Referenced by nzmath.round2.ModuleWithDenominator.get_polynomials().

## ◆ _standard_base()

 def nzmath.round2._standard_base ( degree, i )
private
Return i-th standard unit base


Definition at line 377 of file round2.py.

Referenced by nzmath.round2._default_omega().

## ◆ Dedekind()

 def nzmath.round2.Dedekind ( minpoly_coeff, p, e )
Return (finished or not, an order)

the Dedekind criterion

Arguments:
- minpoly_coeff: (integer) list of the minimal polynomial of theta.
- p, e: p**e divides the discriminant of the minimal polynomial.


Definition at line 264 of file round2.py.

Referenced by nzmath.round2._p_maximal().

## ◆ round2()

 def nzmath.round2.round2 ( minpoly_coeff )
Return integral basis of the ring of integers of a field with its
discriminant.  The field is given by a list of integers, which is
a polynomial of generating element theta.  The polynomial ought to
be monic, in other word, the generating element ought to be an
algebraic integer.

The integral basis will be given as a list of rational vectors
with respect to theta.  (In other functions, bases are returned in
the same fashion.)


Definition at line 32 of file round2.py.

## ◆ _log

 nzmath.round2._log = logging.getLogger('nzmath.round2')
private

Definition at line 25 of file round2.py.

## ◆ Q

 nzmath.round2.Q = rational.theRationalField

Definition at line 30 of file round2.py.

## ◆ Z

 nzmath.round2.Z = rational.theIntegerRing

Definition at line 29 of file round2.py.