Term Rewriting System R: [X, XS, N, Y, YS, X1, X2] from(X) -> cons(X, n__from(s(X))) from(X) -> n__from(X) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) minus(X, 0) -> 0 minus(s(X), s(Y)) -> minus(X, Y) quot(0, s(Y)) -> 0 quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) zWquot(XS, nil) -> nil zWquot(nil, XS) -> nil zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), n__zWquot(activate(XS), activate(YS))) zWquot(X1, X2) -> n__zWquot(X1, X2) activate(n__from(X)) -> from(X) activate(n__zWquot(X1, X2)) -> zWquot(X1, X2) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ZWQUOT(cons(X, XS), cons(Y, YS)) -> QUOT(X, Y) ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS) ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS) QUOT(s(X), s(Y)) -> QUOT(minus(X, Y), s(Y)) QUOT(s(X), s(Y)) -> MINUS(X, Y) ACTIVATE(n__zWquot(X1, X2)) -> ZWQUOT(X1, X2) ACTIVATE(n__from(X)) -> FROM(X) MINUS(s(X), s(Y)) -> MINUS(X, Y) SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS)) SEL(s(N), cons(X, XS)) -> ACTIVATE(XS) Furthermore, R contains four 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: QUOT(s(X), s(Y)) -> QUOT(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) -> 0 minus(s(X), s(Y)) -> minus(X, Y) Used ordering: Polynomial ordering with Polynomial interpretation: POL(s(x_1)) = 1 POL(minus(x_1, x_2)) = 0 POL(QUOT(x_1, x_2)) = x_1 POL(0) = 0 resulting in no subcycles. SCC3: ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS) ACTIVATE(n__zWquot(X1, X2)) -> ZWQUOT(X1, X2) ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS) 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(n__zWquot(x_1, x_2)) = x_1 + x_2 POL(ZWQUOT(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = x_1 + x_2 The following Dependency Pairs can be deleted: ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS) ACTIVATE(n__zWquot(X1, X2)) -> ZWQUOT(X1, X2) ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS) This transformation is resulting in no new subcycles. SCC4: SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS)) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. No rules need to be oriented. Used ordering: Polynomial ordering with Polynomial interpretation: POL(zWquot(x_1, x_2)) = 0 POL(n__from(x_1)) = 0 POL(nil) = 0 POL(activate(x_1)) = 0 POL(s(x_1)) = 1 + x_1 POL(n__zWquot(x_1, x_2)) = 0 POL(minus(x_1, x_2)) = 0 POL(SEL(x_1, x_2)) = x_1 POL(from(x_1)) = 0 POL(0) = 0 POL(cons(x_1, x_2)) = 0 POL(quot(x_1, x_2)) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 0.953 seconds.