I know I am missing something very simple, but this bothers me a lot. I want to test how Prolog would handle the below
X=f(X).
X=Z:- X==Y,Y==Z.
?- X==f(f(X)).
but obviously I am missing very basic as even ?-X=f(X). returns "false". Could you please point out where I am wrong.
Thank you!
?- X = f(X).on the top level succeeds, and repliesX = f(X).Of course, unification (=/2) and equivalence (==/2) are not the same thing! You need to make it a bit clearer in your question what is your query, what is your consulted program, and what you are trying to achieve. - user1812457