(self, query)
return bool(dpll(query_conjuncts, list(s), {}))
Checks if the query is true given the set of clauses.

        Examples
        ========

        >>> from sympy.logic.inference import PropKB
        >>> from sympy.abc import x, y
        >>> l = PropKB()
        >>> l.tell(x & ~y)
        >>> l.ask(x)
        True
        >>> l.ask(y)
        False
Checks if the query is true given the set of clauses.
Checks if the query is true given the set of clauses .
def ask(self, query):
        """Checks if the query is true given the set of clauses.

        Examples
        ========

        >>> from sympy.logic.inference import PropKB
        >>> from sympy.abc import x, y
        >>> l = PropKB()
        >>> l.tell(x & ~y)
        >>> l.ask(x)
        True
        >>> l.ask(y)
        False
        """
        if len(self.clauses) == 0:
            return False
        from sympy.logic.algorithms.dpll import dpll
        query_conjuncts = self.clauses[:]
        query_conjuncts.extend(conjuncts(to_cnf(query)))
        s = set()
        for q in query_conjuncts:
            s = s.union(q.atoms(C.Symbol))
        return bool(dpll(query_conjuncts, list(s), {}))
def ask ( self , query ) : if len ( self . clauses ) == 0 : return False from sympy . logic . algorithms . dpll import dpll query_conjuncts = self . clauses [ : ] query_conjuncts . extend ( conjuncts ( to_cnf ( query ) ) ) s = set ( ) for q in query_conjuncts : s = s . union ( q . atoms ( C . Symbol ) ) return bool ( dpll ( query_conjuncts , list ( s ) , { } ) )