(0) Obligation:

Clauses:

div(X, Y, Z) :- quot(X, Y, Y, Z).
quot(0, s(Y), s(Z), 0).
quot(X, 0, s(Z), s(U)) :- quot(X, s(Z), s(Z), U).
quot(X, Y, Z, U) :- ','(no(zero(X)), ','(no(zero(Y)), ','(p(X, Px), ','(p(Y, Py), quot(Px, Py, Z, U))))).
p(0, 0).
p(s(X), X).
zero(0).
no(X) :- ','(X, ','(!, failure(a))).
no(X1).
failure(b).

Queries:

div(g,g,a).

(1) CutEliminatorProof (SOUND transformation)

Eliminated all cuts by simply ignoring them[PROLOG].

(2) Obligation:

Clauses:

div(X, Y, Z) :- quot(X, Y, Y, Z).
quot(0, s(Y), s(Z), 0).
quot(X, 0, s(Z), s(U)) :- quot(X, s(Z), s(Z), U).
quot(X, Y, Z, U) :- ','(no(zero(X)), ','(no(zero(Y)), ','(p(X, Px), ','(p(Y, Py), quot(Px, Py, Z, U))))).
p(0, 0).
p(s(X), X).
zero(0).
no(X) :- ','(X, failure(a)).
no(X1).
failure(b).

Queries:

div(g,g,a).