Term Rewriting System R: [X, XS, N, X1, X2] from(X) -> cons(X, n__from(s(X))) from(X) -> n__from(X) head(cons(X, XS)) -> X 2nd(cons(X, XS)) -> head(activate(XS)) take(0, XS) -> nil take(s(N), cons(X, XS)) -> cons(X, n__take(N, activate(XS))) take(X1, X2) -> n__take(X1, X2) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) activate(n__from(X)) -> from(X) activate(n__take(X1, X2)) -> take(X1, X2) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: TAKE(s(N), cons(X, XS)) -> ACTIVATE(XS) ACTIVATE(n__from(X)) -> FROM(X) ACTIVATE(n__take(X1, X2)) -> TAKE(X1, X2) SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS)) SEL(s(N), cons(X, XS)) -> ACTIVATE(XS) 2ND(cons(X, XS)) -> HEAD(activate(XS)) 2ND(cons(X, XS)) -> ACTIVATE(XS) Furthermore, R contains two SCCs. SCC1: ACTIVATE(n__take(X1, X2)) -> TAKE(X1, X2) TAKE(s(N), cons(X, XS)) -> 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(TAKE(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(ACTIVATE(x_1)) = x_1 POL(n__take(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: ACTIVATE(n__take(X1, X2)) -> TAKE(X1, X2) TAKE(s(N), cons(X, XS)) -> ACTIVATE(XS) This transformation is resulting in no new subcycles. SCC2: 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(n__from(x_1)) = 0 POL(nil) = 0 POL(activate(x_1)) = 0 POL(s(x_1)) = 1 + x_1 POL(take(x_1, x_2)) = 0 POL(n__take(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 resulting in no subcycles. Termination of R successfully shown. Duration: 0.740 seconds.