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, n__add(X, Y))) fib1(X1, X2) -> n__fib1(X1, X2) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) add(X1, X2) -> n__add(X1, X2) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, activate(XS)) activate(n__fib1(X1, X2)) -> fib1(activate(X1), activate(X2)) activate(n__add(X1, X2)) -> add(activate(X1), activate(X2)) activate(X) -> X Termination of R to be shown. R contains the following Dependency Pairs: ACTIVATE(n__add(X1, X2)) -> ADD(activate(X1), activate(X2)) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X1) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__fib1(X1, X2)) -> FIB1(activate(X1), activate(X2)) ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X1) ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X2) 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) FIB(N) -> SEL(N, fib1(s(0), s(0))) FIB(N) -> FIB1(s(0), s(0)) 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: ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X1) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X1) 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__fib1(x_1, x_2)) = 1 + x_1 + x_2 POL(ACTIVATE(x_1)) = 1 + x_1 POL(n__add(x_1, x_2)) = 1 + x_1 + x_2 The following Dependency Pairs can be deleted: ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__fib1(X1, X2)) -> ACTIVATE(X1) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X2) ACTIVATE(n__add(X1, X2)) -> ACTIVATE(X1) This transformation is resulting in no new subcycles. SCC3: 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(n__add(x_1, x_2)) = 0 POL(cons(x_1, x_2)) = 0 resulting in no subcycles. Termination of R successfully shown. Duration: 0.782 seconds.