Ask Your Question

Revision history [back]

Compute Groebner basis of real polynomials

I'm trying to compute the Groebner basis of an ideal of real polynomials by doing

sage: P.<a,a11,ca11,a12,ca12,b11,cb11,b12,cb12>=RR[];P
Multivariate Polynomial Ring in a, a11, ca11, a12, ca12, b11, cb11, b12, cb12 over Real Field with 53 bits of precision
sage: I = Ideal([-2*a*a11*ca11+2*a*a12*ca12+4*a*b11*cb11-a11*ca11+3*a12*ca12+b11*cb11-3*b12*cb12,3*a*a11*b11-a*a12*b12-ca11*b11+3*a12*b12,sqrt(3)*a*a11*b12-2*a*ca11*b11+sqrt(3)*a*ca12*b11-sqrt
....: (3)*ca11*b12-2*a12*cb12-sqrt(3)*ca12*b11,2*sqrt(3)*a*ca11*a12+2*a*b11^2+2*sqrt(3)*a11*a12-2*b12^2-1,2*a*ca11^2+2*sqrt(3)*a*b11*b12-2*a12^2+2*sqrt(3)*b11*b12])
sage: B = I.groebner_basis(); B

but the output is

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-65d08ea3cfe7> in <module>()
----> 1 B = I.groebner_basis(); B

/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4609)()
    485             AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'
    486         """
--> 487         return self.getattr_from_category(name)
    488
    489     cdef getattr_from_category(self, name):

/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4718)()
    498         else:
    499             cls = P._abstract_element_class
--> 500         return getattr_from_other_class(self, cls, name)
    501
    502     def __dir__(self):

/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2614)()
    392         dummy_error_message.cls = type(self)
    393         dummy_error_message.name = name
--> 394         raise AttributeError(dummy_error_message)
    395     attribute = <object>attr
    396     # Check for a descriptor (__get__ in Python)

AttributeError: 'Ideal_generic' object has no attribute 'groebner_basis'