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