#7654: Conversion bug in MPolynomialRing_libsingular
-----------------------------------+----------------------------------------
Reporter: SimonKing | Owner: malb
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-4.7.2
Component: commutative algebra | Keywords: conversion libsingular
Work_issues: | Upstream: N/A
Reviewer: Simon King | Author: Martin Albrecht
Merged: | Dependencies:
-----------------------------------+----------------------------------------
Changes (by SimonKing):
* status: needs_review => needs_work
* reviewer: => Simon King
Comment:
We got two failures (interestingly in two modules I'm quite familiar
with):
{{{
sage -t -long "devel/sage-main/sage/categories/pushout.py"
Exception RuntimeError: 'maximum recursion depth exceeded while calling a
Python object' in <type 'exceptions.RuntimeError'> ignored
**********************************************************************
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/devel/sage-
main/sage/categories/pushout.py", line 2182:
sage: F(QQ['y','z'])
Expected:
Traceback (most recent call last):
...
TypeError: not a constant polynomial
Got:
Traceback (most recent call last):
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_79[8]>", line 1, in <module>
F(QQ['y','z'])###line 2182:
sage: F(QQ['y','z'])
File "functor.pyx", line 362, in
sage.categories.functor.Functor.__call__ (sage/categories/functor.c:1597)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/lib/python/site-
packages/sage/categories/pushout.py", line 2265, in _apply_functor
I = [R(1)*t for t in I.gens()]*R
File "ring.pyx", line 416, in sage.rings.ring.Ring.__mul__
(sage/rings/ring.c:4581)
File "multi_polynomial_libsingular.pyx", line 973, in
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.ideal
(sage/rings/polynomial/multi_polynomial_libsingular.cpp:8886)
File "multi_polynomial_libsingular.pyx", line 851, in
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
(sage/rings/polynomial/multi_polynomial_libsingular.cpp:7805)
File "multi_polynomial.pyx", line 175, in
sage.rings.polynomial.multi_polynomial.MPolynomial._polynomial_
(sage/rings/polynomial/multi_polynomial.c:3243)
File "multi_polynomial_libsingular.pyx", line 869, in
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
(sage/rings/polynomial/multi_polynomial_libsingular.cpp:8103)
TypeError: Could not find a mapping of the passed element to this
ring.
**********************************************************************
1 items had failures:
1 of 10 in __main__.example_79
***Test Failed*** 1 failures.
For whitespace errors, see the file
/mnt/local/king/.sage/tmp/.doctest_pushout.py
[11.0 s]
----------------------------------------------------------------------
The following tests failed:
sage -t -long "devel/sage-main/sage/categories/pushout.py"
Total time for all tests: 11.0 seconds
}}}
and
{{{
sage -t -long "devel/sage-
main/sage/rings/polynomial/infinite_polynomial_element.py"
**********************************************************************
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/devel/sage-
main/sage/rings/polynomial/infinite_polynomial_element.py", line 139:
sage: InfinitePolynomial(X, (alpha_1+alpha_2)^2)
Expected:
Traceback (most recent call last):
...
TypeError
Got:
Traceback (most recent call last):
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[6]>", line 1, in <module>
InfinitePolynomial(X, (alpha_1+alpha_2)**Integer(2))###line 139:
sage: InfinitePolynomial(X, (alpha_1+alpha_2)^2)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/lib/python/site-
packages/sage/rings/polynomial/infinite_polynomial_element.py", line 195,
in InfinitePolynomial
f = PP.hom([x if x in SV else 0 for x in PP.variable_names()],
A._P)
File "parent_gens.pyx", line 471, in
sage.structure.parent_gens.ParentWithGens.hom
(sage/structure/parent_gens.c:3949)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/lib/python/site-
packages/sage/rings/homset.py", line 97, in __call__
return morphism.RingHomomorphism_im_gens(self, im_gens,
check=check)
File "morphism.pyx", line 950, in
sage.rings.morphism.RingHomomorphism_im_gens.__init__
(sage/rings/morphism.c:5141)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/lib/python/site-
packages/sage/structure/sequence.py", line 298, in Sequence
return Sequence_generic(x, universe, check, immutable, cr, cr_str,
use_sage_types)
File "/mnt/local/king/SAGE/sage-4.7.1.rc1/local/lib/python/site-
packages/sage/structure/sequence.py", line 504, in __init__
x = [universe(t) for t in x]
File "multi_polynomial_libsingular.pyx", line 820, in
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
(sage/rings/polynomial/multi_polynomial_libsingular.cpp:7336)
TypeError: Could not find a mapping of the passed element to this
ring.
**********************************************************************
1 items had failures:
1 of 14 in __main__.example_1
***Test Failed*** 1 failures.
For whitespace errors, see the file
/mnt/local/king/.sage/tmp/.doctest_infinite_polynomial_element.py
[3.1 s]
----------------------------------------------------------------------
The following tests failed:
sage -t -long "devel/sage-
main/sage/rings/polynomial/infinite_polynomial_element.py"
Total time for all tests: 3.1 seconds
}}}
So, you just need to change two error messages.
I am not sure, but it seems to me that the doc tests of the elliptic
curves code became slower. Testing it now.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7654#comment:18>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.