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) Termination of R to be shown. This program has no overlaps, so it is sufficient to show innermost termination. R contains the following Dependency Pairs: ADD(s(X), Y) -> ADD(X, Y) TERMS(N) -> SQR(N) SQR(s(X)) -> ADD(sqr(X), dbl(X)) SQR(s(X)) -> SQR(X) SQR(s(X)) -> DBL(X) DBL(s(X)) -> DBL(X) Furthermore, R contains three 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. Termination of R successfully shown. Duration: 1.19 seconds.