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