#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:                     |  09839726d16ef06a51f8acda28aab00d04e4efb4
  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 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.

New description:

 The following resultant computation used to lead to an infinite recursion
 before #17974 (merged in 6.7.beta0):
 {{{
 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
 }}}
 Although this particular bug is now fixed, the doctest and the shortcut
 added by this ticket may still be useful.

--

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