Term Rewriting System R: [X, Y] minus(X, 0) -> X minus(s(X), s(Y)) -> p(minus(X, Y)) p(s(X)) -> X div(0, s(Y)) -> 0 div(s(X), s(Y)) -> s(div(minus(X, Y), s(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: DIV(s(X), s(Y)) -> DIV(minus(X, Y), s(Y)) DIV(s(X), s(Y)) -> MINUS(X, Y) MINUS(s(X), s(Y)) -> P(minus(X, Y)) MINUS(s(X), s(Y)) -> MINUS(X, Y) Furthermore, R contains two SCCs. SCC1: MINUS(s(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(s(X), s(Y)) -> MINUS(X, Y) This transformation is resulting in no new subcycles. SCC2: DIV(s(X), s(Y)) -> DIV(minus(X, Y), s(Y)) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: minus(X, 0) -> X minus(s(X), s(Y)) -> p(minus(X, Y)) p(s(X)) -> X Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 + x_1 POL(DIV(x_1, x_2)) = x_1 POL(minus(x_1, x_2)) = x_1 POL(0) = 1 POL(p(x_1)) = x_1 resulting in no subcycles. Termination of R successfully shown. Duration: 0.578 seconds.