def strictly_stronger(S,T): """Returns True if every formula in S entails the corresponding formula in T.""" for node in S: s_formula = S.formula_conj(node) t_formula = T.formula_conj(node) if not entails(t_formula, [s_formula]): return False return True
def test_entails(): A, B, C = symbols('A, B, C') assert entails(A, [A >> B, ~B]) is False assert entails(B, [Equivalent(A, B), A]) is True assert entails((A >> B) >> (~A >> ~B)) is False assert entails((A >> B) >> (~B >> ~A)) is True