It is supposed to work for inheritances of Ring (see sage.rings.ring): def is_field(self, proof=True): if self.is_zero(): return False if proof: raise NotImplementedError("No way to prove that %s is an integral domain!" % self) else: return False But due to the categories, rings do not inherit from Ring (anymore?) but from Parent, right? So the is_field method is not a priori implemented.
You could try something like try: is_field = R.is_field() except TypeError: is_field = (R in Rings()) as a compromise? Would that make the code faster? Anyway, the generalization to rings is another step that should be taken. But I don't dare to make any changes in the matrix files by myself. Hope, I could help. :) Regards, Michael -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/42bb1326-5dea-4bfd-81e4-556e69c0ac7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.