#17971: Infinite recursion when taking a resultant over a complicated base ring
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.6
      Component:  algebra            |   Resolution:
       Keywords:  infinite           |    Merged in:
  recursion polynomial resultant     |    Reviewers:
        Authors:  Peter Bruin        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  da8ddc1c1e9b3f9867f0fe74beda90f16244b2b5
  u/pbruin/17971-infinite_recursion  |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Description changed by pbruin:

Old description:

> The following resultant computation leads to an infinite recursion:
> {{{
> sage: A.<a,c> = Frac(PolynomialRing(QQ,'a,c'))
> sage: B.<d,e> = PolynomialRing(A,'d,e')
> sage: R.<x> = PolynomialRing(B,'x')
> sage: (a*d*x^2+a+e+1).resultant(-4*c^2*x+1)
> Traceback (most recent call last):
> ...
> RuntimeError: maximum recursion depth exceeded while calling a Python
> object
> }}}
> We solve this by replacing a recursive call in
> `FractionField_generic._element_constructor_()` by a more direct
> construction of the element.
>
> (This is independent of #17817.)

New description:

 The following resultant computation leads to an infinite recursion:
 {{{
 sage: A.<a,c> = Frac(PolynomialRing(QQ,'a,c'))
 sage: B.<d,e> = PolynomialRing(A,'d,e')
 sage: R.<x> = PolynomialRing(B,'x')
 sage: (a*d*x^2+a+e+1).resultant(-4*c^2*x+1)
 Traceback (most recent call last):
 ...
 RuntimeError: maximum recursion depth exceeded while calling a Python
 object
 }}}
 We solve this by replacing a recursive call in
 `FractionField_generic._element_constructor_()` by a more direct
 construction of the element.

 This particular bug is also fixed (in a different way) by #17974, but the
 doctest and the shortcut added by this ticket are useful regardless of
 that.

--

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