You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the scheme's coordinate ring is not the integers. The coordinate ring need not be a domain, in which case the zero ideal is not prime (hence not a point in the prime spectrum).
I am not clear on the proper fix. I suspect for random rings, it's not easy to cobble up a prime ideal. At a minimum, the above could be called when the ring is a domain.
def _an_element_(self):
from sage.categories.domains import Domains
if self.coordinate_ring() in Domains():
return self(self.coordinate_ring().zero_ideal())
else:
raise NotImplementedError
Is an_element() always supposed to return "0" in some guise?
Not at all. This method is intended to be used in testing suites (i.e. when you perform TestSuite(my_object).run()). The less trivial the answer is, the best it is.
In any case, if the ring is "known", we can handle it (PID, UFD, domain, ...), no?
Sure. I was just proposing the laziest solution. You might even want to implement a method some_elements that is also used in the test suites.
The code (schemes/generic/scheme.py) does this:
if the scheme's coordinate ring is not the integers. The coordinate ring need not be a domain, in which case the zero ideal is not prime (hence not a point in the prime spectrum).
I am not clear on the proper fix. I suspect for random rings, it's not easy to cobble up a prime ideal. At a minimum, the above could be called when the ring is a domain.
Component: PLEASE CHANGE
Keywords: spec, coordinate ring
Issue created by migration from https://trac.sagemath.org/ticket/20338
The text was updated successfully, but these errors were encountered: