def domain_check(f, symbol, p):
    'Returns False if point p is infinite or any subexpression of f\n    is infinite or becomes so after replacing symbol with p. If none of\n    these conditions is met then True will be returned.\n\n    Examples\n    ========\n\n    >>> from sympy import Mul, oo\n    >>> from sympy.abc import x\n    >>> from sympy.solvers.solveset import domain_check\n    >>> g = 1/(1 + (1/(x + 1))**2)\n    >>> domain_check(g, x, -1)\n    False\n    >>> domain_check(x**2, x, 0)\n    True\n    >>> domain_check(1/x, x, oo)\n    False\n\n    * The function relies on the assumption that the original form\n      of the equation has not been changed by automatic simplification.\n\n    >>> domain_check(x/x, x, 0) # x/x is automatically simplified to 1\n    True\n\n    * To deal with automatic evaluations use evaluate=False:\n\n    >>> domain_check(Mul(x, 1/x, evaluate=False), x, 0)\n    False\n    '
    (f, p) = (sympify(f), sympify(p))
    if p.is_infinite:
        return False
    return _domain_check(f, symbol, p)
Returns False if point p is infinite or any subexpression of f
is infinite or becomes so after replacing symbol with p. If none of
these conditions is met then True will be returned.

Examples
========

>>> from sympy import Mul, oo
>>> from sympy.abc import x
>>> from sympy.solvers.solveset import domain_check
>>> g = 1/(1 + (1/(x + 1))**2)
>>> domain_check(g, x, -1)
False
>>> domain_check(x**2, x, 0)
True
>>> domain_check(1/x, x, oo)
False

* The function relies on the assumption that the original form
  of the equation has not been changed by automatic simplification.

>>> domain_check(x/x, x, 0) # x/x is automatically simplified to 1
True

* To deal with automatic evaluations use evaluate=False:

>>> domain_check(Mul(x, 1/x, evaluate=False), x, 0)
False
def domain_check(f, symbol, p):
    'Returns False if point p is infinite or any subexpression of f\n    is infinite or becomes so after replacing symbol with p. If none of\n    these conditions is met then True will be returned.\n\n    Examples\n    ========\n\n    >>> from sympy import Mul, oo\n    >>> from sympy.abc import x\n    >>> from sympy.solvers.solveset import domain_check\n    >>> g = 1/(1 + (1/(x + 1))**2)\n    >>> domain_check(g, x, -1)\n    False\n    >>> domain_check(x**2, x, 0)\n    True\n    >>> domain_check(1/x, x, oo)\n    False\n\n    * The function relies on the assumption that the original form\n      of the equation has not been changed by automatic simplification.\n\n    >>> domain_check(x/x, x, 0) # x/x is automatically simplified to 1\n    True\n\n    * To deal with automatic evaluations use evaluate=False:\n\n    >>> domain_check(Mul(x, 1/x, evaluate=False), x, 0)\n    False\n    '
    (f, p) = (sympify(f), sympify(p))
    if p.is_infinite:
        return False
    return _domain_check(f, symbol, p)