(0) Obligation:

Clauses:

goal(X) :- ','(s2l(X, Xs), list(Xs)).
list([]).
list(X) :- ','(no(empty(X)), ','(tail(X, T), list(T))).
s2l(0, []).
s2l(X, .(X1, Xs)) :- ','(no(zero(X)), ','(p(X, P), s2l(P, Xs))).
tail([], []).
tail(.(X2, Xs), Xs).
p(0, 0).
p(s(X), X).
empty([]).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X3).
failure(b).

Queries:

goal(g).

(1) CutEliminatorProof (SOUND transformation)

Eliminated all cuts by simply ignoring them[PROLOG].

(2) Obligation:

Clauses:

goal(X) :- ','(s2l(X, Xs), list(Xs)).
list([]).
list(X) :- ','(no(empty(X)), ','(tail(X, T), list(T))).
s2l(0, []).
s2l(X, .(X1, Xs)) :- ','(no(zero(X)), ','(p(X, P), s2l(P, Xs))).
tail([], []).
tail(.(X2, Xs), Xs).
p(0, 0).
p(s(X), X).
empty([]).
zero(0).
no(X) :- ','(X, failure(a)).
no(X3).
failure(b).

Queries:

goal(g).