Term Rewriting System R:
[N, X, Y, X1, X2, XS]
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FIB(N) -> SEL(N, fib1(s(0), s(0)))
FIB(N) -> FIB1(s(0), s(0))
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(nfib1(X1, X2)) -> FIB1(activate(X1), activate(X2))
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nadd(X1, X2)) -> ADD(activate(X1), activate(X2))
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS


Dependency Pair:

ADD(s(X), Y) -> ADD(X, Y)


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




The following dependency pair can be strictly oriented:

ADD(s(X), Y) -> ADD(X, Y)


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
ADD(x1, x2) -> ADD(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 4
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS


Dependency Pair:


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS


Dependency Pairs:

ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X1)


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfib1(X1, X2)) -> ACTIVATE(X1)


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
ACTIVATE(x1) -> ACTIVATE(x1)
nfib1(x1, x2) -> nfib1(x1, x2)
nadd(x1, x2) -> nadd(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 5
Dependency Graph
       →DP Problem 3
AFS


Dependency Pair:


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering


Dependency Pair:

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




The following dependency pair can be strictly oriented:

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))


The following usable rules for innermost w.r.t. to the AFS can be oriented:

activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
SEL > activate > fib1 > {add, nadd} > s
SEL > activate > fib1 > cons
SEL > activate > fib1 > nfib1

resulting in one new DP problem.
Used Argument Filtering System:
SEL(x1, x2) -> SEL(x1, x2)
s(x1) -> s(x1)
cons(x1, x2) -> cons(x1, x2)
activate(x1) -> activate(x1)
nfib1(x1, x2) -> nfib1(x1, x2)
fib1(x1, x2) -> fib1(x1, x2)
nadd(x1, x2) -> nadd(x1, x2)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
Dependency Graph


Dependency Pair:


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, nadd(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
add(X1, X2) -> nadd(X1, X2)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(activate(X1), activate(X2))
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(X) -> X


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:00 minutes