What is the logical ‘not’ in Prolog?
In place of not(X = Y) you need to write \+ X = Y or X \= Y. But consider to use dif(X,Y) instead. dif/2 is present in B, SWI, YAP, SICStus. To see the difference: ?- X = b, dif(a, X). X = b. ?- X = b, \+ a = X. X = … Read more