Term Rewriting System R: [N, X, Y, Z, X1, X2] terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N))) terms(X) -> n__terms(X) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) first(X1, X2) -> n__first(X1, X2) s(X) -> n__s(X) activate(n__terms(X)) -> terms(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ACTIVATE(n__terms(X)) -> TERMS(activate(X)) ACTIVATE(n__terms(X)) -> ACTIVATE(X) ACTIVATE(n__s(X)) -> S(activate(X)) ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__first(X1, X2)) -> FIRST(activate(X1), activate(X2)) ACTIVATE(n__first(X1, X2)) -> ACTIVATE(X1) ACTIVATE(n__first(X1, X2)) -> ACTIVATE(X2) TERMS(N) -> SQR(N) ADD(s(X), Y) -> S(add(X, Y)) ADD(s(X), Y) -> ADD(X, Y) SQR(s(X)) -> S(add(sqr(X), dbl(X))) SQR(s(X)) -> ADD(sqr(X), dbl(X)) SQR(s(X)) -> SQR(X) SQR(s(X)) -> DBL(X) DBL(s(X)) -> S(s(dbl(X))) DBL(s(X)) -> S(dbl(X)) DBL(s(X)) -> DBL(X) FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z) Furthermore, R contains four SCCs. SCC1: ADD(s(X), Y) -> ADD(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(ADD(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: ADD(s(X), Y) -> ADD(X, Y) This transformation is resulting in no new subcycles. SCC2: DBL(s(X)) -> DBL(X) 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(DBL(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: DBL(s(X)) -> DBL(X) This transformation is resulting in no new subcycles. SCC3: SQR(s(X)) -> SQR(X) 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(SQR(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: SQR(s(X)) -> SQR(X) This transformation is resulting in no new subcycles. SCC4: ACTIVATE(n__first(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__first(X1, X2)) -> ACTIVATE(X1) FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z) ACTIVATE(n__first(X1, X2)) -> FIRST(activate(X1), activate(X2)) ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__terms(X)) -> ACTIVATE(X) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: first(0, X) -> nil first(X1, X2) -> n__first(X1, X2) first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) activate(n__terms(X)) -> terms(activate(X)) activate(X) -> X activate(n__s(X)) -> s(activate(X)) activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) terms(X) -> n__terms(X) terms(N) -> cons(recip(sqr(N)), n__terms(n__s(N))) s(X) -> n__s(X) Used ordering: Polynomial ordering with Polynomial interpretation: POL(n__first(x_1, x_2)) = 1 + x_1 + x_2 POL(nil) = 0 POL(add(x_1, x_2)) = 0 POL(dbl(x_1)) = 0 POL(activate(x_1)) = x_1 POL(s(x_1)) = x_1 POL(n__terms(x_1)) = x_1 POL(FIRST(x_1, x_2)) = x_2 POL(0) = 0 POL(cons(x_1, x_2)) = x_2 POL(first(x_1, x_2)) = 1 + x_1 + x_2 POL(terms(x_1)) = x_1 POL(ACTIVATE(x_1)) = x_1 POL(sqr(x_1)) = 0 POL(recip(x_1)) = 0 POL(n__s(x_1)) = x_1 resulting in one subcycle. SCC4.Polo1: ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__terms(X)) -> ACTIVATE(X) 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(n__terms(x_1)) = 1 + x_1 POL(ACTIVATE(x_1)) = 1 + x_1 POL(n__s(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__terms(X)) -> ACTIVATE(X) This transformation is resulting in no new subcycles. Termination of R successfully shown. Duration: 1.270 seconds.