The rewrite relation of the following TRS is considered.
prime(0) | → | false | (1) |
prime(s(0)) | → | false | (2) |
prime(s(s(x))) | → | prime1(s(s(x)),s(x)) | (3) |
prime1(x,0) | → | false | (4) |
prime1(x,s(0)) | → | true | (5) |
prime1(x,s(s(y))) | → | and(not(divp(s(s(y)),x)),prime1(x,s(y))) | (6) |
divp(x,y) | → | =(rem(x,y),0) | (7) |
prime#(s(s(x))) | → | prime1#(s(s(x)),s(x)) | (8) |
prime1#(x,s(s(y))) | → | prime1#(x,s(y)) | (9) |
prime1#(x,s(s(y))) | → | divp#(s(s(y)),x) | (10) |
The dependency pairs are split into 1 component.
prime1#(x,s(s(y))) | → | prime1#(x,s(y)) | (9) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
prime1#(x,s(s(y))) | → | prime1#(x,s(y)) | (9) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.