Term Rewriting System R: [N, X, Y, X1, X2, XS] fib(N) -> sel(N, fib1(s(0), s(0))) fib1(X, Y) -> cons(X, n__fib1(Y, add(X, Y))) fib1(X1, X2) -> n__fib1(X1, X2) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) activate(n__fib1(X1, X2)) -> fib1(X1, X2) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ADD(s(X), Y) -> ADD(X, Y) SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS)) SEL(s(N), cons(X, XS)) -> ACTIVATE(XS) ACTIVATE(n__fib1(X1, X2)) -> FIB1(X1, X2) FIB1(X, Y) -> ADD(X, Y) FIB(N) -> SEL(N, fib1(s(0), s(0))) FIB(N) -> FIB1(s(0), s(0)) Furthermore, R contains two 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: 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(add(x_1, x_2)) = 0 POL(n__fib1(x_1, x_2)) = 0 POL(activate(x_1)) = 0 POL(s(x_1)) = 1 + x_1 POL(fib1(x_1, x_2)) = 0 POL(SEL(x_1, x_2)) = x_1 POL(0) = 0 POL(cons(x_1, x_2)) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 0.723 seconds.