def __div__(self, other):
     if self.dim != 1 or other.dim != 1:
         raise ValueError("not implemented")
     if len(other.coeff) == 1:
         return Polynomial(self.coeff / other.coeff[0])
     from Rational import RationalFunction
     return RationalFunction(self, other)
 def __rdiv__(self, other):
     from Rational import RationalFunction
     return RationalFunction(other, self)