Open videlec opened 2 years ago
The Ring class erases the implementation from the category
Ring
sage: class A(Parent): ....: def __init__(self): ....: Parent.__init__(self, category=Rings().Commutative()) sage: A().is_commutative() True
but
sage: class B(Ring): ....: def __init__(self): ....: Parent.__init__(self, category=Rings().Commutative()) ....: def is_zero(self): ....: return False Traceback (most recent call last): ... sage: B().is_commutative() .../sage/rings/ring.pyx in sage.rings.ring.Ring.is_commutative (build/cythonized/sage/rings/ring.c:7752)() 779 if self.is_zero(): 780 return True --> 781 raise NotImplementedError 782 783 def is_field(self, proof = True): NotImplementedError:
Component: PLEASE CHANGE
Issue created by migration from https://trac.sagemath.org/ticket/32810
see also #33757
The
Ring
class erases the implementation from the categorybut
Component: PLEASE CHANGE
Issue created by migration from https://trac.sagemath.org/ticket/32810