#14239: symbolic radical expression for algebraic number
-------------------------------------+-------------------------------------
       Reporter:  gagern             |        Owner:  davidloeffler
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  number fields      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Martin von Gagern  |    Reviewers:  Marc Mezzarobba,
Report Upstream:  N/A                |  Jeroen Demeyer
         Branch:                     |  Work issues:
  u/gagern/ticket/14239              |       Commit:
   Dependencies:                     |  8ff313d2ea936471a4dda3989f9da440e8afe6b2
                                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by gagern):

 In my opinion it makes sense to have the special case for cyclotomics in
 number field element. Take the example from the doctest:

 {{{
 sage: K.<zeta> = CyclotomicField(19)
 sage: SR(zeta) # indirect doctest
 e^(2/19*I*pi)
 }}}

 Yes, this is a conversion of a number field generator to the symbolic
 ring, so it should be the output of a conversion from number field to
 symbolic. On the other hand, this is ''not'' a radical expression,
 therefore it would be unsuitable for
 `AlgebraicNumber_base.radical_expression()`. That's the reason I didn't
 move that code.

 Of course, you could argue that we should have
 `AlgebraicNumber_base.symbolic_expression()`. But I'd still like to keep
 access to the radical expressions, for those cases where both make sense.
 Example:

 {{{
 sage: K.<z10> = CyclotomicField(10)
 sage: a = z10 + z10^9
 sage: SR(a)
 -(e^(1/5*I*pi) - 1)*e^(2/5*I*pi) + 1
 sage: AA(QQbar(SR(a))).radical_expression()
 1/2*sqrt(5) + 1/2
 }}}

 The first thing makes sense if you are explicitely working in a cyclotomic
 field, where the symbolic expression for `z10` is something you can
 reasonably expect in your output. If, on the other hand, you work with
 algebraic numbers, you shouldn't have to care about the internal
 representation. Hiding the different internal implementations behind a
 common interface therefore felt good. ''Every'' algebraic number has a
 minimal polynomial. So I'm using that as the basis for my conversion.
 Special-casing the cyclotomics in qqbar would be a lot harder. It would
 depend on the actual descriptors, which in turn depend on the number
 fields used in their leafs, which in turn makes this conversion closer to
 number fields than what I did with the radical expressions.

 So if I can convince you, I'd like to keep the current split as it is in
 my commits, and suggest a follow-up ticket for
 `AlgebraicNumber_base.symbolic_expression()`, where the best approach to
 implement that might still be subject to discussion.

--
Ticket URL: <http://trac.sagemath.org/ticket/14239#comment:53>
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/d/optout.

Reply via email to