Reputation: 223
how do I translate this kind of arithmetic predicate to a legal pyDatalog predicate?
add(X, Y, Z) ← X + Y = Z
for example:
?add(5, 7, Z).
the answer should be: add(5, 7, 12).
Thanks!
Upvotes: 0
Views: 277
Reputation: 2625
add(X, Y, Z) <= (Z == X + Y)
Upvotes: 1