def _macaulay2_base_str(self): if self.base_ring().is_prime_field(): if self.characteristic() == 0: return "QQ" else: return "ZZ/" + str(self.characteristic()) elif is_IntegerRing(self.base_ring()): return "ZZ" else: raise TypeError("no conversion of to a Macaulay2 ring defined")