Term Rewriting System R:
[N, X, Y, XS]
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, fib1(Y, add(X, Y)))
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, XS)

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))
FIB1(X, Y) -> FIB1(Y, add(X, Y))
FIB1(X, Y) -> ADD(X, Y)
ADD(s(X), Y) -> ADD(X, Y)
SEL(s(N), cons(X, XS)) -> SEL(N, XS)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules


Dependency Pair:

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


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, fib1(Y, add(X, Y)))
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, XS)


Strategy:

innermost




As we are in the innermost case, we can delete all 6 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 4
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. SEL(s(N), cons(X, XS)) -> SEL(N, XS)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules


Dependency Pair:

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


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, fib1(Y, add(X, Y)))
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, XS)


Strategy:

innermost




As we are in the innermost case, we can delete all 6 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 5
Size-Change Principle
       →DP Problem 3
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. ADD(s(X), Y) -> ADD(X, Y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)


Dependency Pair:

FIB1(X, Y) -> FIB1(Y, add(X, Y))


Rules:


fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, fib1(Y, add(X, Y)))
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, XS)


Strategy:

innermost




As we are in the innermost case, we can delete all 4 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 6
Non Termination


Dependency Pair:

FIB1(X, Y) -> FIB1(Y, add(X, Y))


Rules:


add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))


Strategy:

innermost




Found an infinite P-chain over R:
P =

FIB1(X, Y) -> FIB1(Y, add(X, Y))

R =

add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))

s = FIB1(X, Y)
evaluates to t =FIB1(Y, add(X, Y))

Thus, s starts an infinite chain as s matches t.

Innermost Non-Termination of R could be shown.
Duration:
0:00 minutes