(0) Obligation:
Clauses:
overlap(Xs, Ys) :- ','(member(X, Xs), member(X, Ys)).
member(X, Y) :- ','(no(empty(Y)), head(Y, X)).
member(X, Y) :- ','(no(empty(Y)), ','(tail(Y, T), member(X, T))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
empty([]).
no(X) :- ','(X, ','(!, failure(a))).
no(X4).
failure(b).
Queries:
overlap(g,g).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
overlap(Xs, Ys) :- ','(member(X, Xs), member(X, Ys)).
member(X, Y) :- ','(no(empty(Y)), head(Y, X)).
member(X, Y) :- ','(no(empty(Y)), ','(tail(Y, T), member(X, T))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
empty([]).
no(X) :- ','(X, failure(a)).
no(X4).
failure(b).
Queries:
overlap(g,g).