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)))
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))
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)))
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)))
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`
`                 ↳Polynomial 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)))
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 w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(SEL(x1, x2)) =  x1 POL(cons(x1, x2)) =  0 POL(s(x1)) =  1 + x1

resulting in one new DP problem.

`   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)))
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:

Rules:

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

one new Dependency Pair is created:

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:

Rules:

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

one new Dependency Pair is created:

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`
`                 ↳Polynomial Ordering`
`       →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)))
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:

There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(s(x1)) =  1 + x1 POL(ADD(x1, x2)) =  1 + x1

resulting in one new DP problem.

`   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)))
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)))