sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Gröbner bases via Macaulay2 broken #14587

Closed malb closed 11 years ago

malb commented 11 years ago

this shouldn't happen:

P.<a,b,c> = PolynomialRing(ZZ,3)
I = sage.rings.ideal.Katsura(P,3) # regenerate to prevent caching
I.groebner_basis('macaulay2:gb') # optional - macaulay2
TypeError: _groebner_basis_macaulay2() got an unexpected keyword argument 'prot'

Apply

CC: @williamstein

Component: interfaces

Author: Martin Albrecht

Reviewer: Volker Braun

Merged: sage-5.10.rc0

Issue created by migration from https://trac.sagemath.org/ticket/14587

malb commented 11 years ago

Attachment: trac_14587_m2.patch.gz

vbraun commented 11 years ago
comment:1

I can confirm that the fix works (with Macaulay2 installed from Fedora).

There are some failing doctests, for example

sage -t sage/rings/polynomial/polynomial_ring.py
**********************************************************************
File "sage/rings/polynomial/polynomial_ring.py", line 693, in sage.rings.polynomial.polynomial_ring.PolynomialRing_general._macaulay2_
Failed example:
    macaulay2(R) # optional - macaulay2
Expected:
    QQ [x]
Got:
    QQ[x, Degrees => {1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1]
                                                        {GRevLex => {1}    }
                                                        {Position => Up    }
**********************************************************************
1 item had failures:
   1 of   3 in sage.rings.polynomial.polynomial_ring.PolynomialRing_general._macaulay2_
    [319 tests, 1 failure, 2.01 s]

Can you clean those up, too?

vbraun commented 11 years ago

Description changed:

--- 
+++ 
@@ -1,8 +1,9 @@
 this shouldn't happen:

-P.<a,b,c> = !PolynomialRing(ZZ,3) +P.<a,b,c> = PolynomialRing(ZZ,3) I = sage.rings.ideal.Katsura(P,3) # regenerate to prevent caching -I.groebner_basis('!macaulay2:gb') # optional - macaulay2 -!TypeError: _groebner_basis_macaulay2() got an unexpected keyword argument 'prot' +I.groebner_basis('macaulay2:gb') # optional - macaulay2 +TypeError: _groebner_basis_macaulay2() got an unexpected keyword argument 'prot'

+
vbraun commented 11 years ago

Reviewer: Volker Braun

malb commented 11 years ago
comment:2

I cannot test the fixes (Debian doesn't have M2). I can address that one, but it's probably quicker if you or someone with M2 fixes them?

vbraun commented 11 years ago

Initial patch

vbraun commented 11 years ago
comment:3

Attachment: trac_14587_doctests.patch.gz

Ok, done. Positive review to your half of the patch...

dimpase commented 11 years ago
comment:4

works on Sage 5.9 with system-wide M2 1.6 (OSX 10.6.8)

sage -bt --optional=sage,macaulay2 --long sage/rings/
...
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 862.0 seconds
    cpu time: 774.6 seconds
    cumulative wall time: 828.1 seconds
jdemeyer commented 11 years ago
comment:5

Which patch(es) should be applied?

dimpase commented 11 years ago

Description changed:

--- 
+++ 
@@ -7,3 +7,7 @@
 TypeError: _groebner_basis_macaulay2() got an unexpected keyword argument 'prot'

+Apply + attachment: trac_14587_m2.patch + attachment: trac_14587_doctests.patch +

jdemeyer commented 11 years ago

Merged: sage-5.10.rc0