#14239: symbolic radical expression for algebraic number
---------------------------------+-------------------------------
       Reporter:  gagern         |        Owner:  davidloeffler
           Type:  enhancement    |       Status:  needs_work
       Priority:  major          |    Milestone:  sage-6.1
      Component:  number fields  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:  Marc Mezzarobba
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-------------------------------
Changes (by mmezzarobba):

 * status:  needs_review => needs_work
 * reviewer:   => Marc Mezzarobba


Comment:

 I think the feature you are looking for sort of exists. But it is
 available for elements of number fields, not algebraic numbers. And it is
 pretty inconvenient to use with algebraic numbers because
 `alg.as_number_field_element()` returns `alg` as an element of an abstract
 number field (plus an embedding of that number field into `QQbar` or
 `AA`), while conversion to symbolic expressions expects a number field
 with a registered embedding into `CC` or `RR`.

 Yet, with the example from your question on AskSage, one can do:
 {{{
 sage: a = N[0][0]
 sage: nf, val, nf2alg = a.as_number_field_element()
 sage: approx = CC(nf2alg(nf.gen()))
 sage: embedded_nf = NumberField(nf.polynomial(), 'a', embedding=approx)
 sage: nf2nf =
 sage.rings.number_field.number_field_morphisms.NumberFieldEmbedding(nf,
 embedded_nf, embedded_nf.gen())
 sage: SR(nf2nf(val))
 1/5*sqrt(5)
 }}}

 So I disagree with the approach you take in your patch: IMO, we should
 make something like the example work automatically and share the actual
 conversion code between algebraic numbers and number fields instead of
 implementing essentially the same feature twice.

--
Ticket URL: <http://trac.sagemath.org/ticket/14239#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to