(0) Obligation:

Clauses:

add(X, 0, X).
add(X, Y, s(Z)) :- ','(\+(isZero(Y)), ','(p(Y, P), add(X, P, Z))).
p(0, 0).
p(s(X), X).
isZero(0).

Query: add(a,g,a)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f1_in(0) → f1_out1
f1_in(s(T24)) → U1(f1_in(T24), s(T24))
U1(f1_out1, s(T24)) → f1_out1

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(U1(x1, x2)) = 1 + x1 + x2   
POL(f1_in(x1)) = 2 + 2·x1   
POL(f1_out1) = 0   
POL(s(x1)) = 2 + 2·x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f1_in(0) → f1_out1
f1_in(s(T24)) → U1(f1_in(T24), s(T24))
U1(f1_out1, s(T24)) → f1_out1


(4) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(5) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(6) YES