Consider the seemingly contradictory statement foo(X) foo(X) Convert this statement to clausal form, and then translate

Question:

Consider the seemingly contradictory statement

¬foo(X) → foo(X)

Convert this statement to clausal form, and then translate into Prolog. Explain what will happen if you ask

?- foo(bar).

Now consider the straightforward translation, without the intermediate conversion to clausal form:

foo(X) :- \+(foo(X)).

Now explain what will happen if you ask

?- foo(bar).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: