1
votes

Okay were trying to solve a simple Prolog problem, we have a given programm

a.
f(X) :- f(X).

and a given query

not(a).

which will obviously return false, question is how can we change the Programm, not the query, to have it return true.

1

1 Answers

4
votes

You can write the clause a:-false. Then when you query not(a). it returns true.