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)
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(X) -> X

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

Furthermore, R contains three SCCs.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polynomial Ordering`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`

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)
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(X) -> X

The following dependency pair can be strictly oriented:

There are no usable rules 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)) =  x1

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`           →DP Problem 4`
`             ↳Dependency Graph`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`

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)
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(X) -> X

Using the Dependency Graph resulted in no new DP problems.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polynomial Ordering`
`       →DP Problem 3`
`         ↳Nar`

Dependency Pairs:

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)
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(X) -> X

The following dependency pairs can be strictly oriented:

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

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(n__fib1(x1, x2)) =  x1 + x2 POL(ACTIVATE(x1)) =  x1 POL(n__add(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`           →DP Problem 5`
`             ↳Polynomial Ordering`
`       →DP Problem 3`
`         ↳Nar`

Dependency Pairs:

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)
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(X) -> X

The following dependency pairs can be strictly oriented:

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

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

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(n__fib1(x1, x2)) =  1 + x1 + x2 POL(ACTIVATE(x1)) =  x1

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`           →DP Problem 5`
`             ↳Polo`
`             ...`
`               →DP Problem 6`
`                 ↳Dependency Graph`
`       →DP Problem 3`
`         ↳Nar`

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)
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(X) -> X

Using the Dependency Graph resulted in no new DP problems.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Narrowing Transformation`

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)
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(X) -> X

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

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
three new Dependency Pairs are created:

SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(activate(X1'), activate(X2')))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`
`           →DP Problem 7`
`             ↳Narrowing Transformation`

Dependency Pairs:

SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(activate(X1'), activate(X2')))

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)
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(X) -> X

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

SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(activate(X1'), activate(X2')))
eight new Dependency Pairs are created:

SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(activate(X1''), nfib1(activate(X2''), nadd(activate(X1''), activate(X2'')))))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, nfib1(activate(X1''), activate(X2'')))
SEL(s(N), cons(X, nfib1(nfib1(X1'', X2''), X2'))) -> SEL(N, fib1(fib1(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(N), cons(X, nfib1(X1'', X2'))) -> SEL(N, fib1(X1'', activate(X2')))
SEL(s(N), cons(X, nfib1(X1', nfib1(X1'', X2'')))) -> SEL(N, fib1(activate(X1'), fib1(activate(X1''), activate(X2''))))
SEL(s(N), cons(X, nfib1(X1', X2''))) -> SEL(N, fib1(activate(X1'), X2''))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`
`           →DP Problem 7`
`             ↳Nar`
`             ...`
`               →DP Problem 8`
`                 ↳Narrowing Transformation`

Dependency Pairs:

SEL(s(N), cons(X, nfib1(X1', X2''))) -> SEL(N, fib1(activate(X1'), X2''))
SEL(s(N), cons(X, nfib1(X1', nfib1(X1'', X2'')))) -> SEL(N, fib1(activate(X1'), fib1(activate(X1''), activate(X2''))))
SEL(s(N), cons(X, nfib1(X1'', X2'))) -> SEL(N, fib1(X1'', activate(X2')))
SEL(s(N), cons(X, nfib1(nfib1(X1'', X2''), X2'))) -> SEL(N, fib1(fib1(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(activate(X1''), nfib1(activate(X2''), nadd(activate(X1''), activate(X2'')))))
SEL(s(N), cons(X, XS')) -> SEL(N, 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)
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(X) -> X

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

seven new Dependency Pairs are created:

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`
`           →DP Problem 7`
`             ↳Nar`
`             ...`
`               →DP Problem 9`
`                 ↳Polynomial Ordering`

Dependency Pairs:

SEL(s(N), cons(X, nfib1(X1', nfib1(X1'', X2'')))) -> SEL(N, fib1(activate(X1'), fib1(activate(X1''), activate(X2''))))
SEL(s(N), cons(X, nfib1(X1'', X2'))) -> SEL(N, fib1(X1'', activate(X2')))
SEL(s(N), cons(X, nfib1(nfib1(X1'', X2''), X2'))) -> SEL(N, fib1(fib1(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(activate(X1''), nfib1(activate(X2''), nadd(activate(X1''), activate(X2'')))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfib1(X1', X2''))) -> SEL(N, fib1(activate(X1'), X2''))

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)
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(X) -> X

The following dependency pairs can be strictly oriented:

SEL(s(N), cons(X, nfib1(X1', nfib1(X1'', X2'')))) -> SEL(N, fib1(activate(X1'), fib1(activate(X1''), activate(X2''))))
SEL(s(N), cons(X, nfib1(X1'', X2'))) -> SEL(N, fib1(X1'', activate(X2')))
SEL(s(N), cons(X, nfib1(nfib1(X1'', X2''), X2'))) -> SEL(N, fib1(fib1(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(activate(X1''), nfib1(activate(X2''), nadd(activate(X1''), activate(X2'')))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfib1(X1', X2''))) -> SEL(N, fib1(activate(X1'), X2''))

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

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(activate(x1)) =  0 POL(0) =  0 POL(cons(x1, x2)) =  0 POL(SEL(x1, x2)) =  x1 POL(n__fib1(x1, x2)) =  0 POL(s(x1)) =  1 + x1 POL(fib1(x1, x2)) =  0 POL(n__add(x1, x2)) =  0 POL(add(x1, x2)) =  0

resulting in one new DP problem.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Polo`
`       →DP Problem 2`
`         ↳Polo`
`       →DP Problem 3`
`         ↳Nar`
`           →DP Problem 7`
`             ↳Nar`
`             ...`
`               →DP Problem 10`
`                 ↳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)
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))