'Returns `True` if two domains are equivalent.'

def __eq__(self, other):

    return (isinstance(other, PolynomialRingBase) and (self.dtype == other.dtype) and (self.dom == other.dom) and (self.gens == other.gens) and (self.order == other.order))
