Cyclical definition

Anne Ogborn <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
This question came up on ##prolog

from a freshly started SWI-Prolog

1 ?- father(X) = X.
X = father(X).

2 ?- 

I'm not sure what SWI-Prolog should do in this case?

Defining father(7) seems to have no effect.

the original poster said

] <Gal3rielol> Hi, in the new swipl, when I try father(X)=X, it gives me the answer X = father(X). But in the book LPN, it says that the answer should be like X = father(father(father(father(father(father(...)))))))))).

I am baffled and feel fear in my heart, for Prolog eludes again.
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.