Term Rewriting System R: [x, y] p(0) -> 0 p(s(x)) -> x le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y))))) if(true, x, y) -> x if(false, x, y) -> y 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: MINUS(x, s(y)) -> IF(le(x, s(y)), 0, p(minus(x, p(s(y))))) MINUS(x, s(y)) -> LE(x, s(y)) MINUS(x, s(y)) -> P(minus(x, p(s(y)))) MINUS(x, s(y)) -> MINUS(x, p(s(y))) MINUS(x, s(y)) -> P(s(y)) LE(s(x), s(y)) -> LE(x, y) Furthermore, R contains two SCCs. SCC1: LE(s(x), s(y)) -> LE(x, 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(LE(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: LE(s(x), s(y)) -> LE(x, y) This transformation is resulting in no new subcycles. SCC2: MINUS(x, s(y)) -> MINUS(x, p(s(y))) On this Scc, a Rewriting SCC transformation can be performed. As a result of transforming the rule MINUS(x, s(y)) -> MINUS(x, p(s(y))) one new Dependency Pair is created: MINUS(x, s(y)) -> MINUS(x, y) The transformation is resulting in one subcycle: SCC2.Rewr1: MINUS(x, s(y)) -> MINUS(x, 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(MINUS(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: MINUS(x, s(y)) -> MINUS(x, y) This transformation is resulting in no new subcycles. Termination of R successfully shown. Duration: 0.625 seconds.