I made a mistake in my post, and since I don't see an edit button I will post the correction here:
The derivation of the logical expression should have: p(0) <-> not p(1) as the last formula, and the Prolog code is: p(0) :- not p(1).
Hi all, I'm trying to find a way to put the following first order logic expression into Prolog
(p(0) or p(1)) and not (p(0) and p(1))
This means that it should respond in the following way to queries:
?- p(0)
Yes.
?- p(1)
Yes.
?- p(0),p(1).
No.
I tried to translate the logical...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.