(0) Obligation:
Clauses:
ordered([]).
ordered(.(X1, [])).
ordered(Xs) :- ','(no(max1el_list(Xs)), ','(head(Xs, X), ','(tail(Xs, Ys), ','(head(Ys, Y), ','(tail(Ys, Zs), ','(less(X, s(Y)), ordered(.(Y, Zs)))))))).
head([], X2).
head(.(X, X3), X).
tail([], []).
tail(.(X4, Xs), Xs).
less(0, s(X5)).
less(X, Y) :- ','(no(zero(X)), ','(p(X, Px), ','(p(Y, Py), less(Px, Py)))).
p(0, 0).
p(s(X), X).
max1el_list([]).
max1el_list(.(X6, [])).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X7).
failure(b).
Queries:
ordered(g).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
ordered([]).
ordered(.(X1, [])).
ordered(Xs) :- ','(no(max1el_list(Xs)), ','(head(Xs, X), ','(tail(Xs, Ys), ','(head(Ys, Y), ','(tail(Ys, Zs), ','(less(X, s(Y)), ordered(.(Y, Zs)))))))).
head([], X2).
head(.(X, X3), X).
tail([], []).
tail(.(X4, Xs), Xs).
less(0, s(X5)).
less(X, Y) :- ','(no(zero(X)), ','(p(X, Px), ','(p(Y, Py), less(Px, Py)))).
p(0, 0).
p(s(X), X).
max1el_list([]).
max1el_list(.(X6, [])).
zero(0).
no(X) :- ','(X, failure(a)).
no(X7).
failure(b).
Queries:
ordered(g).