#5842: [with patch, needs review] Various number field improvements
---------------------------+------------------------------------------------
 Reporter:  fwclarke       |       Owner:  was       
     Type:  enhancement    |      Status:  new       
 Priority:  major          |   Milestone:  sage-3.4.2
Component:  number theory  |    Keywords:            
---------------------------+------------------------------------------------
 The attached patch (relative to 3.4.1.rc4) implements a number of changes
 to the number field
 code.  All have corresponding doctests verifying the new behaviour.

 In particular:

  * The following now works:
    {{{
    sage: K.<a> = NumberField(x^2 + 5)
    sage: L.<b> = K.extension(x^2 + 1)
    sage: L.ideal(K.ideal(2, a + 1))
    Fractional ideal (-b - 1)
    }}}

  * `K.prime_factors` is defined for a number field `K`.  Thus
    {{{
    sage: CyclotomicField(3).prime_factors(7)
    [Fractional ideal (-2 *zeta3 + 1), Fractional ideal (2 *zeta3 + 3)]
    }}}

  * `K.pari_polynomial('a')` is now valid when `K` is a relative number
 field.
    Previously one could only specify the variable name for an absolute
    number field.

  * `list` has been rewritten for the class `CyclotomicFieldHomset` in
 `morphism.py`.
    Previously this failed for homomorphisms from `CyclotomicField(n)` to a
    non-cyclotomic number_field if there were no `n`-th roots of unity in
 the
    codomain.  The new code uses `zeta_order` to check whether there are
 any
    homomorphisms.  This should be faster.

  * In `number_field_ideal.py`, `element_1_mod` has been rewritten to use
 the
    pari function `idealaddtoone0`.  This is considerably faster.

  * `maximal_order` has been rewritten for relative number fields.  The
    previous version was repetitive and grossly wasteful of memory.  This
    solves one aspect of #4738 ("finding maximal_orders of relative number
    fields is very slow").

  * `is_principal` and `gens_reduced` have been changed in
    `number_field_ideal_rel.py` so that if the ideal is principal, there is
    only one reduced generator (as already happens for ideals in absolute
 number
    fields).  The previous code did not work in all cases.  As a result,
    the output of several doctests have needed changing, and (mostly)
 simplifying.

  * Minor change have been made to `reduced_basis` so that it works for
 cyclotomic
    fields:
    {{{
    sage: CyclotomicField(12).reduced_basis()
    [1, zeta12^2, zeta12, zeta12^3]
    }}}

  * `zeta_function` now works for relative number fields.

  * In several places the code has been tidied up using the `map` function.

  * A version of `uniformizer` has been introduced for relative number
 fields.

  * The valuation at a prime ideal for elements of relative number fields
 has
    been defined.

  * A minor change to the `conjugate` function settles #4725.

  * `relative_discriminant` in `number_field_rel.py` has been rewritten so
 that it
    uses PARI's `nf` rather than `bnf`, and is able to handle relative
 fields whose
    base field is a relative field.

  * Made minor change to error messages for `zeta` in `number_field.py` and
    `order.py` to make them compatible.

  * A `subfields` function for relative number fields has been introduced.
    Doctests have been added, and a minor change made, to the absolute
 version.

  * The relative version of `automorphisms` has been rewritten so that it
 handles
    correctly fields where the base field is relative.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5842>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to