Package sage :: Package rings :: Package number_field :: Module totallyreal_phc
[hide private]
[frames] | no frames]

Module totallyreal_phc

source code


Enumeration of Totally Real Fields: PHC interface

AUTHORS:
    -- John Voight (2007-10-10):
        * Zeroth attempt.



Functions [hide private]
 
coefficients_to_power_sums(n, m, a)
Takes the list a, representing a list of initial coefficients of a (monic) polynomial of degree n, and returns the power sums of the roots of f up to (m-1)th powers.
source code
 
__lagrange_bounds_phc(n, m, a, tmpfile='/tmp/phc_tr')
This function determines the bounds on the roots in the enumeration of totally real fields via Lagrange multipliers.
source code
Function Details [hide private]

coefficients_to_power_sums(n, m, a)

source code 

Takes the list a, representing a list of initial coefficients of
a (monic) polynomial of degree n, and returns the power sums
of the roots of f up to (m-1)th powers.

INPUT:
n -- integer, the degree
a -- list of integers, the coefficients

OUTPUT:
list of integers.

NOTES:
Uses Newton's relations, which are classical.

AUTHORS:
- John Voight (2007-09-19)

EXAMPLES:
    sage: sage.rings.number_field.totallyreal_phc.coefficients_to_power_sums(3,2,[1,5,7])
    [3, -7, 39]
    sage: sage.rings.number_field.totallyreal_phc.coefficients_to_power_sums(5,4,[1,5,7,9,8])
    [5, -8, 46, -317, 2158]

__lagrange_bounds_phc(n, m, a, tmpfile='/tmp/phc_tr')

source code 

This function determines the bounds on the roots in
the enumeration of totally real fields via Lagrange multipliers.
It is used internally by the main function 
enumerate_totallyreal_fields_prim(), which should be consulted for 
further information.

INPUT:
k -- integer, the index of the next coefficient
a -- list of integers, the coefficients

OUTPUT:
the lower and upper bounds as real numbers.

NOTES:
See Cohen [C] for the general idea and unpublished work of the 
author for more detail.  

    REFERENCES:
        [C] Henri Cohen, Advanced topics in computational number 
            theory, Graduate Texts in Mathematics, vol. 193,
            Springer-Verlag, New York, 2000. 

AUTHORS:
- John Voight (2007-09-19)

EXAMPLES:
    sage: __lagrange_bounds_phc(3,5,[8,1,2,0,1],tmpfile='phc') # optional
    /usr/local/bin/phc
    []
    sage: __lagrange_bounds_phc(3,2,[8,1,2,0,1],tmpfile='phc') # optional 
    /usr/local/bin/phc
    [-1.3333333333333299, 1.72983526722515e-16]
    sage: __lagrange_bounds_phc(3,1,[8,1,2,0,1],tmpfile='phc') # optional 
    /usr/local/bin/phc
    []