books(X) <= owns(X, book(Y)). cars(Z) <= owns(Z, car(Y)).

equal(t,t). equal(f,f). nE(A,B) <= not equal(A,B). aND(X,Y) <= equal(X,t) and equal(Y,t).

where the identifier "aND" is used to carefully distinguish it from the pre-defined "and" operator in Prolog, and where "t" and "f" stand for logical true and false respectively.

Add rule(s) that will describe the logical "or" relationship . Use the following left-hand-side of the rule(s):

or(X,Y) <=

For example, you will expect that or(t,t) produces YES, while or(f,f) results in a NO response.

Last updated 2002/03/18

© J.A.N. Lee, 2002.