Skip to content

Make .variety() work for ideals of univariate polynomial rings #31331

Open
@sagetrac-monniaux

Description

@sagetrac-monniaux

Sage 9.2:

sage: PR = PolynomialRing(QQ, ['x'])
sage: I = ideal(PR('x^2 - 4'))
sage: print(I.variety())

Traceback (most recent call last):
  File "crash.sage.py", line 8, in <module>
    print(I.variety())
  File "sage/structure/element.pyx", line 493, in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4703)
  File "sage/structure/element.pyx", line 506, in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4815)
  File "sage/cpython/getattr.pyx", line 372, in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2619)
AttributeError: 'Ideal_1poly_field' object has no attribute 'variety'

And I had another, funkier error attempting the same thing from the notebook.


/opt/SageMath/9.2/local/lib/python3.8/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4703)()
    491             AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'
    492         """
--> 493         return self.getattr_from_category(name)
    494 
    495     cdef getattr_from_category(self, name):

/opt/SageMath/9.2/local/lib/python3.8/site-packages/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4815)()
    504         else:
    505             cls = P._abstract_element_class
--> 506         return getattr_from_other_class(self, cls, name)
    507 
    508     def __dir__(self):

CC: @slel

Component: commutative algebra

Keywords: ideal, variety, polynomial

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions