'Make the ground domain a ring.
Examples
>>> from sympy import Poly, QQ
>>> from sympy.abc import x
>>> Poly(x**2 + 1, domain=QQ).to_ring()
Poly(x**2 + 1, x, domain=\'ZZ\')'

def to_ring(f):

    if hasattr(f.rep, 'to_ring'):
        result = f.rep.to_ring()
    else:
        raise OperationNotSupported(f, 'to_ring')
    return f.per(result)
