#20086: ZZ[X], QQ[X]: allow arbitrary powers of constant polynomials
-------------------------------------+-------------------------------------
       Reporter:  cheuberg           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.1
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Clemens Heuberger  |    Reviewers:  Benjamin Hackl
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/cheuberg/polynomials/power       |  892109ac4f48a4a32d35671365ecceb0d1c9e0bf
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Replying to [comment:24 cheuberg]:
 > >
 > > [... snip ...]
 > >

 > There was a discussion on sage-devel a few weeks ago. Every parent seems
 to have its own home-made logic about how to do coercion. Please do not
 try to fix that in this ticket.

 Please do not try to complicate it in this ticket either. A possible
 solution could be:
  - allow `polynomial^rational` as much as we can (i.e. for some constant
 polynomials for the sake of this ticket). For more general polynomial we
 can for now raise a `NotImplementedError`.
  - disallow `polynomial^polynomial` even if the power is a constant
 polynomial. In that case, the error should be a `TypeError`. This is the
 current behavior for some polynomial rings but not all
 {{{
 sage: ZZ['x'].gen() ** ZZ['x'].one()
  -> TypeError
 sage: QQ['x'].gen() ** ZZ['x'].one()
  -> TypeError
 sage: RR['x'].gen() ** ZZ['x'].one()
 x
 }}}

 What do you think? Would that solution fit your needs?

 Vincent

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