演算子を使用して pyDatalog で述語を作成しようとしましたが、flammable ==
[X] の定義が無効のようです:
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.
また、pyDataLog 述語に比較演算子を含めようとしましたが、これも機能しませんでした。
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
これらの比較演算子と否定演算子を pyDatalog 述語に含めることは可能ですか?