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
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Remaining


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




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

SEL(s(N), cons(X, XS)) -> SEL(N, XS)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Remaining


Dependency Pair:

SEL(s(s(N'')), cons(X, cons(X'', XS''))) -> SEL(s(N''), cons(X'', 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




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

SEL(s(s(N'')), cons(X, cons(X'', XS''))) -> SEL(s(N''), cons(X'', XS''))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 2
FwdInst
       →DP Problem 3
Remaining


Dependency Pair:

SEL(s(s(s(N''''))), cons(X, cons(X'''', cons(X''''', XS'''')))) -> SEL(s(s(N'''')), cons(X'''', cons(X''''', 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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost 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:
SEL(x1, x2) -> SEL(x1, x2)
s(x1) -> s(x1)
cons(x1, x2) -> cons(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 4
FwdInst
             ...
               →DP Problem 6
Dependency Graph
       →DP Problem 2
FwdInst
       →DP Problem 3
Remaining


Dependency Pair:


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




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Forward Instantiation Transformation
       →DP Problem 3
Remaining


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




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

ADD(s(X), Y) -> ADD(X, Y)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
Forward Instantiation Transformation
       →DP Problem 3
Remaining


Dependency Pair:

ADD(s(s(X'')), Y'') -> ADD(s(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




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
FwdInst
             ...
               →DP Problem 8
Argument Filtering and Ordering
       →DP Problem 3
Remaining


Dependency Pair:

ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost 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
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 7
FwdInst
             ...
               →DP Problem 9
Dependency Graph
       →DP Problem 3
Remaining


Dependency Pair:


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




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:
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



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