Term Rewriting System R: [Y, X] minus(n__0, Y) -> 0 minus(n__s(X), n__s(Y)) -> minus(activate(X), activate(Y)) geq(X, n__0) -> true geq(n__0, n__s(Y)) -> false geq(n__s(X), n__s(Y)) -> geq(activate(X), activate(Y)) div(0, n__s(Y)) -> 0 div(s(X), n__s(Y)) -> if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0) if(true, X, Y) -> activate(X) if(false, X, Y) -> activate(Y) 0 -> n__0 s(X) -> n__s(X) activate(n__0) -> 0 activate(n__s(X)) -> s(X) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ACTIVATE(n__0) -> 0' ACTIVATE(n__s(X)) -> S(X) DIV(s(X), n__s(Y)) -> IF(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0) DIV(s(X), n__s(Y)) -> GEQ(X, activate(Y)) DIV(s(X), n__s(Y)) -> ACTIVATE(Y) DIV(s(X), n__s(Y)) -> DIV(minus(X, activate(Y)), n__s(activate(Y))) DIV(s(X), n__s(Y)) -> MINUS(X, activate(Y)) IF(false, X, Y) -> ACTIVATE(Y) IF(true, X, Y) -> ACTIVATE(X) GEQ(n__s(X), n__s(Y)) -> GEQ(activate(X), activate(Y)) GEQ(n__s(X), n__s(Y)) -> ACTIVATE(X) GEQ(n__s(X), n__s(Y)) -> ACTIVATE(Y) MINUS(n__s(X), n__s(Y)) -> MINUS(activate(X), activate(Y)) MINUS(n__s(X), n__s(Y)) -> ACTIVATE(X) MINUS(n__s(X), n__s(Y)) -> ACTIVATE(Y) MINUS(n__0, Y) -> 0' Furthermore, R contains three SCCs. SCC1: GEQ(n__s(X), n__s(Y)) -> GEQ(activate(X), activate(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(activate(x_1)) = x_1 POL(s(x_1)) = x_1 POL(n__0) = 0 POL(GEQ(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(n__s(x_1)) = x_1 No Dependency Pairs can be deleted. The following rules of R can be deleted: div(0, n__s(Y)) -> 0 div(s(X), n__s(Y)) -> if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0) if(false, X, Y) -> activate(Y) if(true, X, Y) -> activate(X) geq(X, n__0) -> true geq(n__0, n__s(Y)) -> false geq(n__s(X), n__s(Y)) -> geq(activate(X), activate(Y)) minus(n__s(X), n__s(Y)) -> minus(activate(X), activate(Y)) minus(n__0, Y) -> 0 This transformation is resulting in one new subcycle: SCC1.MRR1: GEQ(n__s(X), n__s(Y)) -> GEQ(activate(X), activate(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(activate(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(n__0) = 0 POL(GEQ(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(n__s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: GEQ(n__s(X), n__s(Y)) -> GEQ(activate(X), activate(Y)) This transformation is resulting in no new subcycles. SCC2: MINUS(n__s(X), n__s(Y)) -> MINUS(activate(X), activate(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(activate(x_1)) = x_1 POL(s(x_1)) = x_1 POL(n__0) = 0 POL(MINUS(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(n__s(x_1)) = x_1 No Dependency Pairs can be deleted. The following rules of R can be deleted: div(0, n__s(Y)) -> 0 div(s(X), n__s(Y)) -> if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0) if(false, X, Y) -> activate(Y) if(true, X, Y) -> activate(X) geq(X, n__0) -> true geq(n__0, n__s(Y)) -> false geq(n__s(X), n__s(Y)) -> geq(activate(X), activate(Y)) minus(n__s(X), n__s(Y)) -> minus(activate(X), activate(Y)) minus(n__0, Y) -> 0 This transformation is resulting in one new subcycle: SCC2.MRR1: MINUS(n__s(X), n__s(Y)) -> MINUS(activate(X), activate(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(activate(x_1)) = x_1 POL(s(x_1)) = 1 + x_1 POL(n__0) = 0 POL(MINUS(x_1, x_2)) = 1 + x_1 + x_2 POL(0) = 0 POL(n__s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: MINUS(n__s(X), n__s(Y)) -> MINUS(activate(X), activate(Y)) This transformation is resulting in no new subcycles. SCC3: DIV(s(X), n__s(Y)) -> DIV(minus(X, activate(Y)), n__s(activate(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(n__s(X), n__s(Y)) -> minus(activate(X), activate(Y)) minus(n__0, Y) -> 0 0 -> n__0 Used ordering: Polynomial ordering with Polynomial interpretation: POL(activate(x_1)) = 0 POL(s(x_1)) = 1 POL(DIV(x_1, x_2)) = x_1 POL(n__0) = 0 POL(minus(x_1, x_2)) = 0 POL(0) = 0 POL(n__s(x_1)) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 1.37 seconds.