I attempted to create a predicate in pyDatalog using the ==
operator, but the definition of flammable[X] appears to be invalid:
from pyDatalog import pyDatalog
pyDatalog.create_terms('flammable, notFlammable, X, Y')
flammable[X] = ((X == 'wood') or (X == 'coal'))`
#TypeError: unhashable type: 'Query'
notFlammable[X] = ~flammable[X]
#This doesn't work either.
I also attempted to include comparison operators in a pyDataLog predicate, but this didn't work either:
threeOrFour[X] = ((X < 3) or (X > 4))
#pyDatalog.util.DatalogError: Error: left hand side of comparison must be bound: </2 in line None of None
Is it possible to include these comparison and negation operators in pyDatalog predicates?