Term Rewriting System R:
[Z, X, Y, X1, X2]
fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FST(s(X), cons(Y, Z)) -> ACTIVATE(X)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ADD(s(X), Y) -> ACTIVATE(X)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
ACTIVATE(nfrom(X)) -> FROM(X)
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
ACTIVATE(nlen(X)) -> LEN(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation


Dependency Pairs:

LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(X)
ADD(s(X), Y) -> ACTIVATE(X)
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
FST(s(X), cons(Y, Z)) -> ACTIVATE(X)


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

FST(s(X), cons(Y, Z)) -> ACTIVATE(X)
three new Dependency Pairs are created:

FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nlen(X)) -> LEN(X)
ADD(s(X), Y) -> ACTIVATE(X)
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
LEN(cons(X, Z)) -> ACTIVATE(Z)


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

FST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
three new Dependency Pairs are created:

FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
ADD(s(X), Y) -> ACTIVATE(X)
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(X)
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


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) -> ACTIVATE(X)
three new Dependency Pairs are created:

ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nlen(X)) -> LEN(X)
FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

LEN(cons(X, Z)) -> ACTIVATE(Z)
three new Dependency Pairs are created:

LEN(cons(X, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
LEN(cons(X, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
LEN(cons(X, nlen(X''))) -> ACTIVATE(nlen(X''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 5
Forward Instantiation Transformation


Dependency Pairs:

ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
LEN(cons(X, nlen(X''))) -> ACTIVATE(nlen(X''))
LEN(cons(X, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
LEN(cons(X, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nlen(X)) -> LEN(X)
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

ACTIVATE(nfst(X1, X2)) -> FST(X1, X2)
six new Dependency Pairs are created:

ACTIVATE(nfst(s(nfst(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nfst(X1'''', X2'''')), cons(Y'', Z''))
ACTIVATE(nfst(s(nadd(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nadd(X1'''', X2'''')), cons(Y'', Z''))
ACTIVATE(nfst(s(nlen(X'''')), cons(Y'', Z''))) -> FST(s(nlen(X'''')), cons(Y'', Z''))
ACTIVATE(nfst(s(X''), cons(Y'', nfst(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nfst(X1'''', X2'''')))
ACTIVATE(nfst(s(X''), cons(Y'', nadd(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nadd(X1'''', X2'''')))
ACTIVATE(nfst(s(X''), cons(Y'', nlen(X'''')))) -> FST(s(X''), cons(Y'', nlen(X'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 6
Forward Instantiation Transformation


Dependency Pairs:

LEN(cons(X, nlen(X''))) -> ACTIVATE(nlen(X''))
LEN(cons(X, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(X''), cons(Y'', nlen(X'''')))) -> FST(s(X''), cons(Y'', nlen(X'''')))
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(X''), cons(Y'', nadd(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nadd(X1'''', X2'''')))
ACTIVATE(nfst(s(X''), cons(Y'', nfst(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nfst(X1'''', X2'''')))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(nlen(X'''')), cons(Y'', Z''))) -> FST(s(nlen(X'''')), cons(Y'', Z''))
ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(nadd(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nadd(X1'''', X2'''')), cons(Y'', Z''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(s(nfst(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nfst(X1'''', X2'''')), cons(Y'', Z''))
LEN(cons(X, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nlen(X)) -> LEN(X)
ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

ACTIVATE(nadd(X1, X2)) -> ADD(X1, X2)
three new Dependency Pairs are created:

ACTIVATE(nadd(s(nfst(X1'''', X2'''')), X2')) -> ADD(s(nfst(X1'''', X2'''')), X2')
ACTIVATE(nadd(s(nadd(X1'''', X2'''')), X2')) -> ADD(s(nadd(X1'''', X2'''')), X2')
ACTIVATE(nadd(s(nlen(X'''')), X2')) -> ADD(s(nlen(X'''')), X2')

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


Dependency Pairs:

LEN(cons(X, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(X''), cons(Y'', nlen(X'''')))) -> FST(s(X''), cons(Y'', nlen(X'''')))
ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))
ACTIVATE(nadd(s(nlen(X'''')), X2')) -> ADD(s(nlen(X'''')), X2')
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nadd(s(nadd(X1'''', X2'''')), X2')) -> ADD(s(nadd(X1'''', X2'''')), X2')
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(X''), cons(Y'', nadd(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nadd(X1'''', X2'''')))
ACTIVATE(nfst(s(X''), cons(Y'', nfst(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nfst(X1'''', X2'''')))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(nlen(X'''')), cons(Y'', Z''))) -> FST(s(nlen(X'''')), cons(Y'', Z''))
ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nadd(s(nfst(X1'''', X2'''')), X2')) -> ADD(s(nfst(X1'''', X2'''')), X2')
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(nadd(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nadd(X1'''', X2'''')), cons(Y'', Z''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(s(nfst(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nfst(X1'''', X2'''')), cons(Y'', Z''))
LEN(cons(X, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nlen(X)) -> LEN(X)
LEN(cons(X, nlen(X''))) -> ACTIVATE(nlen(X''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost




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

ACTIVATE(nlen(X)) -> LEN(X)
three new Dependency Pairs are created:

ACTIVATE(nlen(cons(X'', nfst(X1'''', X2'''')))) -> LEN(cons(X'', nfst(X1'''', X2'''')))
ACTIVATE(nlen(cons(X'', nadd(X1'''', X2'''')))) -> LEN(cons(X'', nadd(X1'''', X2'''')))
ACTIVATE(nlen(cons(X'', nlen(X'''')))) -> LEN(cons(X'', nlen(X'''')))

The transformation is resulting in one new DP problem:



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




The following remains to be proven:
Dependency Pairs:

FST(s(X), cons(Y, nlen(X''))) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(X''), cons(Y'', nlen(X'''')))) -> FST(s(X''), cons(Y'', nlen(X'''')))
FST(s(X), cons(Y, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(X''), cons(Y'', nadd(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nadd(X1'''', X2'''')))
ACTIVATE(nfst(s(X''), cons(Y'', nfst(X1'''', X2'''')))) -> FST(s(X''), cons(Y'', nfst(X1'''', X2'''')))
FST(s(X), cons(Y, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
LEN(cons(X, nlen(X''))) -> ACTIVATE(nlen(X''))
ACTIVATE(nlen(cons(X'', nlen(X'''')))) -> LEN(cons(X'', nlen(X'''')))
ACTIVATE(nlen(cons(X'', nadd(X1'''', X2'''')))) -> LEN(cons(X'', nadd(X1'''', X2'''')))
FST(s(nlen(X'')), cons(Y, Z)) -> ACTIVATE(nlen(X''))
ACTIVATE(nfst(s(nlen(X'''')), cons(Y'', Z''))) -> FST(s(nlen(X'''')), cons(Y'', Z''))
LEN(cons(X, nfst(X1'', X2''))) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nlen(cons(X'', nfst(X1'''', X2'''')))) -> LEN(cons(X'', nfst(X1'''', X2'''')))
ADD(s(nlen(X'')), Y) -> ACTIVATE(nlen(X''))
ACTIVATE(nadd(s(nlen(X'''')), X2')) -> ADD(s(nlen(X'''')), X2')
ADD(s(nadd(X1'', X2'')), Y) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nadd(s(nadd(X1'''', X2'''')), X2')) -> ADD(s(nadd(X1'''', X2'''')), X2')
FST(s(nadd(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nadd(X1'', X2''))
ACTIVATE(nfst(s(nadd(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nadd(X1'''', X2'''')), cons(Y'', Z''))
FST(s(nfst(X1'', X2'')), cons(Y, Z)) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nfst(s(nfst(X1'''', X2'''')), cons(Y'', Z''))) -> FST(s(nfst(X1'''', X2'''')), cons(Y'', Z''))
ADD(s(nfst(X1'', X2'')), Y) -> ACTIVATE(nfst(X1'', X2''))
ACTIVATE(nadd(s(nfst(X1'''', X2'''')), X2')) -> ADD(s(nfst(X1'''', X2'''')), X2')
LEN(cons(X, nadd(X1'', X2''))) -> ACTIVATE(nadd(X1'', X2''))


Rules:


fst(0, Z) -> nil
fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
fst(X1, X2) -> nfst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
add(0, X) -> X
add(s(X), Y) -> s(nadd(activate(X), Y))
add(X1, X2) -> nadd(X1, X2)
len(nil) -> 0
len(cons(X, Z)) -> s(nlen(activate(Z)))
len(X) -> nlen(X)
activate(nfst(X1, X2)) -> fst(X1, X2)
activate(nfrom(X)) -> from(X)
activate(nadd(X1, X2)) -> add(X1, X2)
activate(nlen(X)) -> len(X)
activate(X) -> X


Strategy:

innermost



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