#17817: Error when taking resultant of polynomials over complicated base ring
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.6
      Component:  algebra            |   Resolution:
       Keywords:  polynomial         |    Merged in:
  resultant                          |    Reviewers:
        Authors:  Peter Bruin        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  02345b7e3490e356e351ef7bf4e3f89665f2de8c
  u/pbruin/17817-resultant_variables |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Peter Bruin', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => 02345b7e3490e356e351ef7bf4e3f89665f2de8c
 * branch:   => u/pbruin/17817-resultant_variables
 * author:   => Peter Bruin


Old description:

> The following apparently tries to convert `p` and `q` into a wrong common
> ring (even though they already both have parent `S`):
> {{{
> A.<a,b,c> = Frac(PolynomialRing(QQ,'a,b,c'))
> B.<d,e,f> = PolynomialRing(A,'d,e,f')
> R.<x>= PolynomialRing(B,'x')
> S.<y> = PolynomialRing(R,'y')
> p = ((1/b^2*d^2+1/a)*x*y^2+a*b/c*y+e+x^2)
> q = -4*c^2*y^3+1
> print(p.resultant(q))
> Traceback (most recent call last):
> ...
> TypeError: not a constant polynomial
> }}}
> Another (related?) bug:
> {{{
> (a*d*x^2+a+e+1).resultant(-4*c^2*x+1)
> Traceback (most recent call last):
> ...
> RuntimeError: maximum recursion depth exceeded in cmp
> }}}

New description:

 The following apparently tries to convert `p` and `q` into a wrong common
 ring (even though they already both have parent `S`):
 {{{
 A.<a,b,c> = Frac(PolynomialRing(QQ,'a,b,c'))
 B.<d,e,f> = PolynomialRing(A,'d,e,f')
 R.<x>= PolynomialRing(B,'x')
 S.<y> = PolynomialRing(R,'y')
 p = ((1/b^2*d^2+1/a)*x*y^2+a*b/c*y+e+x^2)
 q = -4*c^2*y^3+1
 print(p.resultant(q))
 Traceback (most recent call last):
 ...
 TypeError: not a constant polynomial
 }}}
 This ticket solves the bug by simply passing the variable with respect to
 which we want to take the resultant to PARI, instead of trying to change
 the variable names.  The documentation is also updated.

--

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