#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:                     |  d2f72c655cc22f18c9029da5feff12f35eb0dbf8
                                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by gagern):

 I have the gut feeling that we might be misunderstanding one another
 somewhere. So it it looks as if I'm unwilling to take good advice, it
 might be because I'm misunderstanding that advice and can't see that it's
 indeed good.

 It seems as if in comment:42 you're suggesting that we should always
 convert to `AA` resp. `QQbar` and do the equality comparison there. I
 disagree for the following reason: deciding whether to algebraic numbers
 are equal is hard, since it involves exact computation. Deciding which of
 a given set of algebraic numbers is equal to a given number is a lot
 cheaper that exactly one of them must be equal, since in most cases that
 can be decided using interval arithmetic. Of course we could convert all
 found symbolic roots to `AA` resp. `QQbar` and do the candidate check
 there. But we'd convert from `SR` to `AA`/`QQbar` for no practical reason
 at all, and still end up with a second code path to cater for the case of
 multiple candidates. To stretch your metaphor, if I want to drive in a
 nail I should choose a hammer, not a wheel, no matter whether the wheel is
 broken or not. Always use the appropriate tool.

 If I understand you correctly, in comment:43 you suggest that I wrap the
 whole candidate collection process in a big loop which increments
 precision until there is exactly one candidate left. Doing so should be
 possible, but not trivial. One question we'd have to answer is which
 precision do we increase? The intervals of the symbolic expression
 evaluations might be huge, so we should be decreasing those always. The
 interval of the current algebraic number is known to be small enough to be
 isolating. But by sheer bad luck it might still be big enough that it
 almost touches a neighboring root, in which case increasing its precision
 once might lower the need for precision when evaluating the symbolic
 expressions. Suppose I got that wrapped up, I should hope that I'd only
 have to increase precision a finite number of times to reduce the number
 of candidates to one. But even then, I still haven't ruled out the case
 where I don't get symbolic expressions for all roots. That still has me
 worried, since I simply don't know what I can assume in that regard. Of
 course I could give up, like number field element symbolification does,
 and perhaps even ask users to report a bug indicating what scenario caused
 such problems.

 In comment:44 I still disagree. When you convert number field elements,
 you do that by plugging the converted generator into some polynomial.
 That's code which is already in place, and which I'd leave as is. But as I
 just see, this is no show stopper for you, so I'll simply do that my way
 in the next commit and you see how that looks to you.

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