(expr, algorithm="dpll2")
Check satisfiability of a propositional sentence.
    Returns a model when it succeeds

    Examples:

    >>> from sympy.abc import A, B
    >>> from sympy.logic.inference import satisfiable
    >>> satisfiable(A & ~B)
    {A: True, B: False}
    >>> satisfiable(A & ~A)
    False
Check satisfiability of a propositional sentence.
    Returns a model when it succeeds
Check satisfiability of a propositional sentence . Returns a model when it succeeds
def satisfiable(expr, algorithm="dpll2"):
    """
    Check satisfiability of a propositional sentence.
    Returns a model when it succeeds

    Examples:

    >>> from sympy.abc import A, B
    >>> from sympy.logic.inference import satisfiable
    >>> satisfiable(A & ~B)
    {A: True, B: False}
    >>> satisfiable(A & ~A)
    False

    """
    if expr is True:
        return {}
    if expr is False:
        return False
    expr = to_cnf(expr)
    if algorithm == "dpll":
        from sympy.logic.algorithms.dpll import dpll_satisfiable
        return dpll_satisfiable(expr)
    elif algorithm == "dpll2":
        from sympy.logic.algorithms.dpll2 import dpll_satisfiable
        return dpll_satisfiable(expr)
    raise NotImplementedError
def satisfiable ( expr , algorithm = "dpll2" ) : if expr is True : return { } if expr is False : return False expr = to_cnf ( expr ) if algorithm == "dpll" : from sympy . logic . algorithms . dpll import dpll_satisfiable return dpll_satisfiable ( expr ) elif algorithm == "dpll2" : from sympy . logic . algorithms . dpll2 import dpll_satisfiable return dpll_satisfiable ( expr ) raise NotImplementedError