Term Rewriting System R: [x, 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 R to be shown. This program has no overlaps, so it is sufficient to show innermost termination. R contains the following Dependency Pairs: PRIME(s(s(x))) -> PRIME1(s(s(x)), s(x)) PRIME1(x, s(s(y))) -> DIVP(s(s(y)), x) PRIME1(x, s(s(y))) -> PRIME1(x, s(y)) Furthermore, R contains one SCC. SCC1: PRIME1(x, s(s(y))) -> PRIME1(x, s(y)) Removing rules from R by ordering and analyzing Dependency Pairs, Usable Rules, and Usable Equations. This is possible by using the following (C_E-compatible) Polynomial ordering. Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(PRIME1(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: PRIME1(x, s(s(y))) -> PRIME1(x, s(y)) This transformation is resulting in no new subcycles. Termination of R successfully shown. Duration: 0.599 seconds.