#20086: rational powers in ZZ[X] and QQ[X]
-------------------------------------+-------------------------------------
       Reporter:  cheuberg           |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.1
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Clemens            |    Reviewers:  Benjamin Hackl
  Heuberger, Vincent Delecroix       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  c8350c631287dd71a9b79fb422d769a1e480cdc8
  u/behackl/polynomial/rational-     |     Stopgaps:
  powers                             |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by behackl):

 Well, wouldn't it be more natural to let the unit be an element of the
 base ring? (As far as I see the parent of the unit of polynomials over QQ
 always is from QQ, for example.)

 Of course, we can also add checks like if `u` is one etc., but with this
 ticket only polynomial rings over the rationals and the integers use this
 method---and both of them have implemented a `nth_root` method; this is
 why I still think that this would be good to go and why special treatment
 isn't needed. And the inconsistency mentioned in #20214 only introduces a
 recursion of depth 2, which would be resolved if the `unit` method would
 behave for integers like for rationals.

 It isn't even necessary to separately implement `nth_root` for polynomials
 such that the case of constant polynomials is handled by the base ring:
 over `ZZ`, the overall coefficient is decomposed w.r.t. PFD and handled
 like a non-constant polynomial (which is what I would have implemented in
 the base ring as well). For QQ, the overall factor is in the unit and
 handled separately in the `nth_root` method.

 Letting other polynomial rings profit from this procedure should be
 realized in a follow-up ticket, IMHO.

 However, what should be added before this ships is a special treatment of
 the zero polynomial. I'll push this in a minute.

--
Ticket URL: <http://trac.sagemath.org/ticket/20086#comment:40>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to