Term Rewriting System R:
[N, X, Y, X1, X2, XS]
afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AFIB(N) -> ASEL(mark(N), afib1(s(0), s(0)))
AFIB(N) -> MARK(N)
AFIB(N) -> AFIB1(s(0), s(0))
AFIB1(X, Y) -> MARK(X)
AADD(0, X) -> MARK(X)
AADD(s(X), Y) -> AADD(mark(X), mark(Y))
AADD(s(X), Y) -> MARK(X)
AADD(s(X), Y) -> MARK(Y)
ASEL(0, cons(X, XS)) -> MARK(X)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> MARK(XS)
MARK(fib(X)) -> AFIB(mark(X))
MARK(fib(X)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X1)
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(add(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

AFIB(N) -> AFIB1(s(0), s(0))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
AADD(s(X), Y) -> MARK(Y)
AADD(s(X), Y) -> MARK(X)
AADD(s(X), Y) -> AADD(mark(X), mark(Y))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
AFIB1(X, Y) -> MARK(X)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
ASEL(0, cons(X, XS)) -> MARK(X)
AFIB(N) -> ASEL(mark(N), afib1(s(0), s(0)))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)





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

AFIB(N) -> ASEL(mark(N), afib1(s(0), s(0)))
nine new Dependency Pairs are created:

AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(0) -> ASEL(0, afib1(s(0), s(0)))
AFIB(cons(X1', X2')) -> ASEL(cons(mark(X1'), X2'), afib1(s(0), s(0)))
AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))
AFIB(N) -> ASEL(mark(N), fib1(s(0), s(0)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))
AFIB(0) -> ASEL(0, afib1(s(0), s(0)))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
AADD(s(X), Y) -> MARK(Y)
AADD(s(X), Y) -> MARK(X)
AADD(s(X), Y) -> AADD(mark(X), mark(Y))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(0, cons(X, XS)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
AFIB1(X, Y) -> MARK(X)
AFIB(N) -> AFIB1(s(0), s(0))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)





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

AADD(s(X), Y) -> AADD(mark(X), mark(Y))
14 new Dependency Pairs are created:

AADD(s(fib(X'')), Y) -> AADD(afib(mark(X'')), mark(Y))
AADD(s(sel(X1', X2')), Y) -> AADD(asel(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib1(X1', X2')), Y) -> AADD(afib1(mark(X1'), mark(X2')), mark(Y))
AADD(s(add(X1', X2')), Y) -> AADD(aadd(mark(X1'), mark(X2')), mark(Y))
AADD(s(s(X'')), Y) -> AADD(s(mark(X'')), mark(Y))
AADD(s(0), Y) -> AADD(0, mark(Y))
AADD(s(cons(X1', X2')), Y) -> AADD(cons(mark(X1'), X2'), mark(Y))
AADD(s(X), fib(X'')) -> AADD(mark(X), afib(mark(X'')))
AADD(s(X), sel(X1', X2')) -> AADD(mark(X), asel(mark(X1'), mark(X2')))
AADD(s(X), fib1(X1', X2')) -> AADD(mark(X), afib1(mark(X1'), mark(X2')))
AADD(s(X), add(X1', X2')) -> AADD(mark(X), aadd(mark(X1'), mark(X2')))
AADD(s(X), s(X'')) -> AADD(mark(X), s(mark(X'')))
AADD(s(X), 0) -> AADD(mark(X), 0)
AADD(s(X), cons(X1', X2')) -> AADD(mark(X), cons(mark(X1'), X2'))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

AFIB(0) -> ASEL(0, afib1(s(0), s(0)))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
AFIB(N) -> AFIB1(s(0), s(0))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
AADD(s(X), cons(X1', X2')) -> AADD(mark(X), cons(mark(X1'), X2'))
AADD(s(X), 0) -> AADD(mark(X), 0)
AADD(s(X), s(X'')) -> AADD(mark(X), s(mark(X'')))
AADD(s(X), add(X1', X2')) -> AADD(mark(X), aadd(mark(X1'), mark(X2')))
AADD(s(X), fib1(X1', X2')) -> AADD(mark(X), afib1(mark(X1'), mark(X2')))
AADD(s(X), sel(X1', X2')) -> AADD(mark(X), asel(mark(X1'), mark(X2')))
AADD(s(X), fib(X'')) -> AADD(mark(X), afib(mark(X'')))
AADD(s(0), Y) -> AADD(0, mark(Y))
AADD(s(s(X'')), Y) -> AADD(s(mark(X'')), mark(Y))
AADD(s(add(X1', X2')), Y) -> AADD(aadd(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib1(X1', X2')), Y) -> AADD(afib1(mark(X1'), mark(X2')), mark(Y))
AADD(s(sel(X1', X2')), Y) -> AADD(asel(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib(X'')), Y) -> AADD(afib(mark(X'')), mark(Y))
AADD(s(X), Y) -> MARK(Y)
AADD(s(X), Y) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
AFIB1(X, Y) -> MARK(X)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
ASEL(0, cons(X, XS)) -> MARK(X)
AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)





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

ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
14 new Dependency Pairs are created:

ASEL(s(fib(X'')), cons(X, XS)) -> ASEL(afib(mark(X'')), mark(XS))
ASEL(s(sel(X1', X2')), cons(X, XS)) -> ASEL(asel(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib1(X1', X2')), cons(X, XS)) -> ASEL(afib1(mark(X1'), mark(X2')), mark(XS))
ASEL(s(add(X1', X2')), cons(X, XS)) -> ASEL(aadd(mark(X1'), mark(X2')), mark(XS))
ASEL(s(s(X'')), cons(X, XS)) -> ASEL(s(mark(X'')), mark(XS))
ASEL(s(0), cons(X, XS)) -> ASEL(0, mark(XS))
ASEL(s(cons(X1', X2')), cons(X, XS)) -> ASEL(cons(mark(X1'), X2'), mark(XS))
ASEL(s(N), cons(X, fib(X''))) -> ASEL(mark(N), afib(mark(X'')))
ASEL(s(N), cons(X, sel(X1', X2'))) -> ASEL(mark(N), asel(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib1(X1', X2'))) -> ASEL(mark(N), afib1(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, add(X1', X2'))) -> ASEL(mark(N), aadd(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, s(X''))) -> ASEL(mark(N), s(mark(X'')))
ASEL(s(N), cons(X, 0)) -> ASEL(mark(N), 0)
ASEL(s(N), cons(X, cons(X1', X2'))) -> ASEL(mark(N), cons(mark(X1'), X2'))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Narrowing Transformation


Dependency Pairs:

AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
AFIB(N) -> AFIB1(s(0), s(0))
ASEL(s(N), cons(X, cons(X1', X2'))) -> ASEL(mark(N), cons(mark(X1'), X2'))
ASEL(s(N), cons(X, add(X1', X2'))) -> ASEL(mark(N), aadd(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib1(X1', X2'))) -> ASEL(mark(N), afib1(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, sel(X1', X2'))) -> ASEL(mark(N), asel(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib(X''))) -> ASEL(mark(N), afib(mark(X'')))
ASEL(s(0), cons(X, XS)) -> ASEL(0, mark(XS))
ASEL(s(s(X'')), cons(X, XS)) -> ASEL(s(mark(X'')), mark(XS))
ASEL(s(add(X1', X2')), cons(X, XS)) -> ASEL(aadd(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib1(X1', X2')), cons(X, XS)) -> ASEL(afib1(mark(X1'), mark(X2')), mark(XS))
ASEL(s(sel(X1', X2')), cons(X, XS)) -> ASEL(asel(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib(X'')), cons(X, XS)) -> ASEL(afib(mark(X'')), mark(XS))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
AADD(s(X), cons(X1', X2')) -> AADD(mark(X), cons(mark(X1'), X2'))
AADD(s(X), 0) -> AADD(mark(X), 0)
AADD(s(X), s(X'')) -> AADD(mark(X), s(mark(X'')))
AADD(s(X), add(X1', X2')) -> AADD(mark(X), aadd(mark(X1'), mark(X2')))
AADD(s(X), fib1(X1', X2')) -> AADD(mark(X), afib1(mark(X1'), mark(X2')))
AADD(s(X), sel(X1', X2')) -> AADD(mark(X), asel(mark(X1'), mark(X2')))
AADD(s(X), fib(X'')) -> AADD(mark(X), afib(mark(X'')))
AADD(s(0), Y) -> AADD(0, mark(Y))
AADD(s(s(X'')), Y) -> AADD(s(mark(X'')), mark(Y))
AADD(s(add(X1', X2')), Y) -> AADD(aadd(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib1(X1', X2')), Y) -> AADD(afib1(mark(X1'), mark(X2')), mark(Y))
AADD(s(sel(X1', X2')), Y) -> AADD(asel(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib(X'')), Y) -> AADD(afib(mark(X'')), mark(Y))
AADD(s(X), Y) -> MARK(Y)
AADD(s(X), Y) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
AFIB1(X, Y) -> MARK(X)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(s(N), cons(X, XS)) -> MARK(N)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
ASEL(0, cons(X, XS)) -> MARK(X)
AFIB(0) -> ASEL(0, afib1(s(0), s(0)))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)





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

MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
14 new Dependency Pairs are created:

MARK(sel(fib(X'), X2)) -> ASEL(afib(mark(X')), mark(X2))
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
MARK(sel(fib1(X1'', X2''), X2)) -> ASEL(afib1(mark(X1''), mark(X2'')), mark(X2))
MARK(sel(add(X1'', X2''), X2)) -> ASEL(aadd(mark(X1''), mark(X2'')), mark(X2))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
MARK(sel(cons(X1'', X2''), X2)) -> ASEL(cons(mark(X1''), X2''), mark(X2))
MARK(sel(X1, fib(X'))) -> ASEL(mark(X1), afib(mark(X')))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, fib1(X1'', X2''))) -> ASEL(mark(X1), afib1(mark(X1''), mark(X2'')))
MARK(sel(X1, add(X1'', X2''))) -> ASEL(mark(X1), aadd(mark(X1''), mark(X2'')))
MARK(sel(X1, s(X'))) -> ASEL(mark(X1), s(mark(X')))
MARK(sel(X1, 0)) -> ASEL(mark(X1), 0)
MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Narrowing Transformation


Dependency Pairs:

AFIB(0) -> ASEL(0, afib1(s(0), s(0)))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
AFIB(N) -> AFIB1(s(0), s(0))
AADD(s(X), cons(X1', X2')) -> AADD(mark(X), cons(mark(X1'), X2'))
AADD(s(X), 0) -> AADD(mark(X), 0)
AADD(s(X), s(X'')) -> AADD(mark(X), s(mark(X'')))
AADD(s(X), add(X1', X2')) -> AADD(mark(X), aadd(mark(X1'), mark(X2')))
AADD(s(X), fib1(X1', X2')) -> AADD(mark(X), afib1(mark(X1'), mark(X2')))
AADD(s(X), sel(X1', X2')) -> AADD(mark(X), asel(mark(X1'), mark(X2')))
AADD(s(X), fib(X'')) -> AADD(mark(X), afib(mark(X'')))
AADD(s(0), Y) -> AADD(0, mark(Y))
AADD(s(s(X'')), Y) -> AADD(s(mark(X'')), mark(Y))
AADD(s(add(X1', X2')), Y) -> AADD(aadd(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib1(X1', X2')), Y) -> AADD(afib1(mark(X1'), mark(X2')), mark(Y))
AADD(s(sel(X1', X2')), Y) -> AADD(asel(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib(X'')), Y) -> AADD(afib(mark(X'')), mark(Y))
AADD(s(X), Y) -> MARK(Y)
AADD(s(X), Y) -> MARK(X)
MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, add(X1'', X2''))) -> ASEL(mark(X1), aadd(mark(X1''), mark(X2'')))
MARK(sel(X1, fib1(X1'', X2''))) -> ASEL(mark(X1), afib1(mark(X1''), mark(X2'')))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, fib(X'))) -> ASEL(mark(X1), afib(mark(X')))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(add(X1'', X2''), X2)) -> ASEL(aadd(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, cons(X1', X2'))) -> ASEL(mark(N), cons(mark(X1'), X2'))
ASEL(s(N), cons(X, add(X1', X2'))) -> ASEL(mark(N), aadd(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib1(X1', X2'))) -> ASEL(mark(N), afib1(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, sel(X1', X2'))) -> ASEL(mark(N), asel(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib(X''))) -> ASEL(mark(N), afib(mark(X'')))
ASEL(s(0), cons(X, XS)) -> ASEL(0, mark(XS))
ASEL(s(s(X'')), cons(X, XS)) -> ASEL(s(mark(X'')), mark(XS))
ASEL(s(add(X1', X2')), cons(X, XS)) -> ASEL(aadd(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib1(X1', X2')), cons(X, XS)) -> ASEL(afib1(mark(X1'), mark(X2')), mark(XS))
ASEL(s(sel(X1', X2')), cons(X, XS)) -> ASEL(asel(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib(X'')), cons(X, XS)) -> ASEL(afib(mark(X'')), mark(XS))
MARK(sel(fib1(X1'', X2''), X2)) -> ASEL(afib1(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, XS)) -> MARK(N)
MARK(sel(fib(X'), X2)) -> ASEL(afib(mark(X')), mark(X2))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
AFIB1(X, Y) -> MARK(X)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
ASEL(0, cons(X, XS)) -> MARK(X)
AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)





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

MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
14 new Dependency Pairs are created:

MARK(add(fib(X'), X2)) -> AADD(afib(mark(X')), mark(X2))
MARK(add(sel(X1'', X2''), X2)) -> AADD(asel(mark(X1''), mark(X2'')), mark(X2))
MARK(add(fib1(X1'', X2''), X2)) -> AADD(afib1(mark(X1''), mark(X2'')), mark(X2))
MARK(add(add(X1'', X2''), X2)) -> AADD(aadd(mark(X1''), mark(X2'')), mark(X2))
MARK(add(s(X'), X2)) -> AADD(s(mark(X')), mark(X2))
MARK(add(0, X2)) -> AADD(0, mark(X2))
MARK(add(cons(X1'', X2''), X2)) -> AADD(cons(mark(X1''), X2''), mark(X2))
MARK(add(X1, fib(X'))) -> AADD(mark(X1), afib(mark(X')))
MARK(add(X1, sel(X1'', X2''))) -> AADD(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(add(X1, fib1(X1'', X2''))) -> AADD(mark(X1), afib1(mark(X1''), mark(X2'')))
MARK(add(X1, add(X1'', X2''))) -> AADD(mark(X1), aadd(mark(X1''), mark(X2'')))
MARK(add(X1, s(X'))) -> AADD(mark(X1), s(mark(X')))
MARK(add(X1, 0)) -> AADD(mark(X1), 0)
MARK(add(X1, cons(X1'', X2''))) -> AADD(mark(X1), cons(mark(X1''), X2''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

AFIB(N) -> ASEL(mark(N), cons(mark(s(0)), fib1(s(0), add(s(0), s(0)))))
AFIB(s(X')) -> ASEL(s(mark(X')), afib1(s(0), s(0)))
AFIB(add(X1', X2')) -> ASEL(aadd(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib1(X1', X2')) -> ASEL(afib1(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(sel(X1', X2')) -> ASEL(asel(mark(X1'), mark(X2')), afib1(s(0), s(0)))
AFIB(fib(X')) -> ASEL(afib(mark(X')), afib1(s(0), s(0)))
AFIB(N) -> AFIB1(s(0), s(0))
MARK(add(X1, cons(X1'', X2''))) -> AADD(mark(X1), cons(mark(X1''), X2''))
MARK(add(X1, 0)) -> AADD(mark(X1), 0)
MARK(add(X1, s(X'))) -> AADD(mark(X1), s(mark(X')))
MARK(add(X1, add(X1'', X2''))) -> AADD(mark(X1), aadd(mark(X1''), mark(X2'')))
MARK(add(X1, fib1(X1'', X2''))) -> AADD(mark(X1), afib1(mark(X1''), mark(X2'')))
MARK(add(X1, sel(X1'', X2''))) -> AADD(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(add(X1, fib(X'))) -> AADD(mark(X1), afib(mark(X')))
MARK(add(0, X2)) -> AADD(0, mark(X2))
MARK(add(s(X'), X2)) -> AADD(s(mark(X')), mark(X2))
AADD(s(X), cons(X1', X2')) -> AADD(mark(X), cons(mark(X1'), X2'))
AADD(s(X), 0) -> AADD(mark(X), 0)
AADD(s(X), s(X'')) -> AADD(mark(X), s(mark(X'')))
AADD(s(X), add(X1', X2')) -> AADD(mark(X), aadd(mark(X1'), mark(X2')))
AADD(s(X), fib1(X1', X2')) -> AADD(mark(X), afib1(mark(X1'), mark(X2')))
AADD(s(X), sel(X1', X2')) -> AADD(mark(X), asel(mark(X1'), mark(X2')))
AADD(s(X), fib(X'')) -> AADD(mark(X), afib(mark(X'')))
AADD(s(0), Y) -> AADD(0, mark(Y))
AADD(s(s(X'')), Y) -> AADD(s(mark(X'')), mark(Y))
AADD(s(add(X1', X2')), Y) -> AADD(aadd(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib1(X1', X2')), Y) -> AADD(afib1(mark(X1'), mark(X2')), mark(Y))
AADD(s(sel(X1', X2')), Y) -> AADD(asel(mark(X1'), mark(X2')), mark(Y))
AADD(s(fib(X'')), Y) -> AADD(afib(mark(X'')), mark(Y))
MARK(add(add(X1'', X2''), X2)) -> AADD(aadd(mark(X1''), mark(X2'')), mark(X2))
AADD(s(X), Y) -> MARK(Y)
MARK(add(fib1(X1'', X2''), X2)) -> AADD(afib1(mark(X1''), mark(X2'')), mark(X2))
AADD(s(X), Y) -> MARK(X)
MARK(add(sel(X1'', X2''), X2)) -> AADD(asel(mark(X1''), mark(X2'')), mark(X2))
AADD(0, X) -> MARK(X)
MARK(add(fib(X'), X2)) -> AADD(afib(mark(X')), mark(X2))
MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, add(X1'', X2''))) -> ASEL(mark(X1), aadd(mark(X1''), mark(X2'')))
MARK(sel(X1, fib1(X1'', X2''))) -> ASEL(mark(X1), afib1(mark(X1''), mark(X2'')))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, fib(X'))) -> ASEL(mark(X1), afib(mark(X')))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(add(X1'', X2''), X2)) -> ASEL(aadd(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, cons(X1', X2'))) -> ASEL(mark(N), cons(mark(X1'), X2'))
ASEL(s(N), cons(X, add(X1', X2'))) -> ASEL(mark(N), aadd(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib1(X1', X2'))) -> ASEL(mark(N), afib1(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, sel(X1', X2'))) -> ASEL(mark(N), asel(mark(X1'), mark(X2')))
ASEL(s(N), cons(X, fib(X''))) -> ASEL(mark(N), afib(mark(X'')))
ASEL(s(0), cons(X, XS)) -> ASEL(0, mark(XS))
ASEL(s(s(X'')), cons(X, XS)) -> ASEL(s(mark(X'')), mark(XS))
ASEL(s(add(X1', X2')), cons(X, XS)) -> ASEL(aadd(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib1(X1', X2')), cons(X, XS)) -> ASEL(afib1(mark(X1'), mark(X2')), mark(XS))
ASEL(s(sel(X1', X2')), cons(X, XS)) -> ASEL(asel(mark(X1'), mark(X2')), mark(XS))
ASEL(s(fib(X'')), cons(X, XS)) -> ASEL(afib(mark(X'')), mark(XS))
MARK(sel(fib1(X1'', X2''), X2)) -> ASEL(afib1(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, XS)) -> MARK(XS)
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(N), cons(X, XS)) -> MARK(N)
MARK(sel(fib(X'), X2)) -> ASEL(afib(mark(X')), mark(X2))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
MARK(fib1(X1, X2)) -> MARK(X2)
MARK(fib1(X1, X2)) -> MARK(X1)
AFIB1(X, Y) -> MARK(X)
MARK(fib1(X1, X2)) -> AFIB1(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
MARK(fib(X)) -> MARK(X)
AFIB(N) -> MARK(N)
MARK(fib(X)) -> AFIB(mark(X))
ASEL(0, cons(X, XS)) -> MARK(X)
AFIB(0) -> ASEL(0, afib1(s(0), s(0)))


Rules:


afib(N) -> asel(mark(N), afib1(s(0), s(0)))
afib(X) -> fib(X)
afib1(X, Y) -> cons(mark(X), fib1(Y, add(X, Y)))
afib1(X1, X2) -> fib1(X1, X2)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(aadd(mark(X), mark(Y)))
aadd(X1, X2) -> add(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(fib(X)) -> afib(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(fib1(X1, X2)) -> afib1(mark(X1), mark(X2))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(cons(X1, X2)) -> cons(mark(X1), X2)




The Proof could not be continued due to a Timeout.
Termination of R could not be shown.
Duration:
1:00 minutes