Term Rewriting System R: [N, X, Y, Z, X1, X2] terms(N) -> cons(recip(sqr(N)), n__terms(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) half(0) -> 0 half(s(0)) -> 0 half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X activate(n__terms(X)) -> terms(X) activate(n__first(X1, X2)) -> first(X1, X2) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ADD(s(X), Y) -> ADD(X, Y) HALF(s(s(X))) -> HALF(X) SQR(s(X)) -> ADD(sqr(X), dbl(X)) SQR(s(X)) -> SQR(X) SQR(s(X)) -> DBL(X) DBL(s(X)) -> DBL(X) TERMS(N) -> SQR(N) FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z) ACTIVATE(n__terms(X)) -> TERMS(X) ACTIVATE(n__first(X1, X2)) -> FIRST(X1, X2) Furthermore, R contains five 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: HALF(s(s(X))) -> HALF(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(HALF(x_1)) = 1 + x_1 The following Dependency Pairs can be deleted: HALF(s(s(X))) -> HALF(X) This transformation is resulting in no new subcycles. SCC3: 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. SCC4: 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. SCC5: ACTIVATE(n__first(X1, X2)) -> FIRST(X1, X2) FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z) 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__first(x_1, x_2)) = x_1 + x_2 POL(s(x_1)) = x_1 POL(ACTIVATE(x_1)) = x_1 POL(FIRST(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__first(X1, X2)) -> FIRST(X1, X2) FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z) This transformation is resulting in no new subcycles. Termination of R successfully shown. Duration: 0.908 seconds.