Computer Science Homework Help
Prolog program: draw derivation trees
/* Consider the following Prolog program: */
member(X,[X|Xs]).
member(X,[Y|Xs]) :- member(X,Xs).
disjoint([],Ys).
disjoint([X|Xs], Ys) :- not(member(X, Ys)), disjoint(Xs,Ys).
/*
Draw the derivation trees for the following queries:
(a) ?- disjoint([1,2,3],[4,2]).
(b) ?- disjoint([1,2,3],Xs).
(c) ?- not(not(disjoint(Xs,[4,2]))).
As a short reminder:
+ Goal
is the same as
not(Goal)
*/