The rewrite relation of the following TRS is considered.
if(true) | → | X | (1) |
if(false) | → | Y | (2) |
fact(X) | → | if(zero(X)) | (3) |
add(0,X) | → | X | (4) |
add(s(X),Y) | → | s(add(X,Y)) | (5) |
prod(0,X) | → | 0 | (6) |
prod(s(X),Y) | → | add(Y,prod(X,Y)) | (7) |
zero(0) | → | true | (8) |
zero(s(X)) | → | false | (9) |
p(s(X)) | → | X | (10) |
The TRS violates one of the two variable conditions. Thus, it is not terminating.