YES
The TRS could be proven terminating. The proof took 22 ms.
Problem 1 was processed with processor DependencyGraph (10ms). | Problem 2 was processed with processor SubtermCriterion (1ms).
prime1#(x, s(s(y))) | → | prime1#(x, s(y)) | prime1#(x, s(s(y))) | → | divp#(s(s(y)), x) | |
prime#(s(s(x))) | → | prime1#(s(s(x)), s(x)) |
prime(0) | → | false | prime(s(0)) | → | false | |
prime(s(s(x))) | → | prime1(s(s(x)), s(x)) | prime1(x, 0) | → | false | |
prime1(x, s(0)) | → | true | prime1(x, s(s(y))) | → | and(not(divp(s(s(y)), x)), prime1(x, s(y))) | |
divp(x, y) | → | =(rem(x, y), 0) |
Termination of terms over the following signature is verified: prime, not, 0, divp, s, rem, false, prime1, true, =, and
prime1#(x, s(s(y))) → prime1#(x, s(y)) |
prime1#(x, s(s(y))) | → | prime1#(x, s(y)) |
prime(0) | → | false | prime(s(0)) | → | false | |
prime(s(s(x))) | → | prime1(s(s(x)), s(x)) | prime1(x, 0) | → | false | |
prime1(x, s(0)) | → | true | prime1(x, s(s(y))) | → | and(not(divp(s(s(y)), x)), prime1(x, s(y))) | |
divp(x, y) | → | =(rem(x, y), 0) |
Termination of terms over the following signature is verified: prime, not, 0, divp, s, rem, false, prime1, true, =, and
The following projection was used:
Thus, the following dependency pairs are removed:
prime1#(x, s(s(y))) | → | prime1#(x, s(y)) |