Term Rewriting System R: [N, X, Y] terms(N) -> cons(recip(sqr(N))) 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)) -> cons(Y) half(0) -> 0 half(s(0)) -> 0 half(s(s(X))) -> s(half(X)) half(dbl(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) 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: 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. Termination of R successfully shown. Duration: 2.385 seconds.