Add is_false

This commit is contained in:
Emi Simpson 2023-03-06 11:34:44 -05:00
parent fe8d9b766c
commit 08e02c523a
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847

View file

@ -1,6 +1,7 @@
from emis_funky_funktions import *
from itertools import combinations, product
from operator import eq
from typing import Collection, FrozenSet, TypeAlias
from ir import Clause, Clause_, IRNeg, IRProp, IRTerm, IRVar, Substitutions, sub_all, unify
@ -134,6 +135,10 @@ def derive2(kb1: KnowledgeBase_, kb2: KnowledgeBase_) -> KnowledgeBase:
for clause in merge_clauses(c1, c2)
)
is_false: Callable[[Clause_], bool] = c(p(eq, 0), len)
"""
Determines whether a clause is equivalent to false
if __name__ == '__main__':
import doctest
doctest.testmod()