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(ns(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)
s(X) -> ns(X)
activate(nfst(X1, X2)) -> fst(activate(X1), activate(X2))
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(X)
activate(nadd(X1, X2)) -> add(activate(X1), activate(X2))
activate(nlen(X)) -> len(activate(X))
activate(X) -> X

Innermost Termination of R to be shown.



   R
Removing Redundant Rules for Innermost Termination



Removing the following rules from R which left hand sides contain non normal subterms

fst(s(X), cons(Y, Z)) -> cons(Y, nfst(activate(X), activate(Z)))
add(s(X), Y) -> s(nadd(activate(X), Y))


   R
RRRI
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

LEN(cons(X, Z)) -> S(nlen(activate(Z)))
LEN(cons(X, Z)) -> ACTIVATE(Z)
ACTIVATE(nfst(X1, X2)) -> FST(activate(X1), activate(X2))
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfrom(X)) -> FROM(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(X)
ACTIVATE(nadd(X1, X2)) -> ADD(activate(X1), activate(X2))
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nlen(X)) -> ACTIVATE(X)

Furthermore, R contains one SCC.


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
Negative Polynomial Order


Dependency Pairs:

ACTIVATE(nlen(X)) -> ACTIVATE(X)
ACTIVATE(nlen(X)) -> LEN(activate(X))
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
LEN(cons(X, Z)) -> ACTIVATE(Z)


Rules:


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





The following Dependency Pairs can be strictly oriented using the given order.

ACTIVATE(nlen(X)) -> ACTIVATE(X)
ACTIVATE(nlen(X)) -> LEN(activate(X))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

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


Used ordering:
Polynomial Order with Interpretation:

POL( ACTIVATE(x1) ) = x1

POL( nlen(x1) ) = x1 + 1

POL( nfst(x1, x2) ) = x1 + x2

POL( LEN(x1) ) = x1

POL( activate(x1) ) = x1

POL( nadd(x1, x2) ) = x1 + x2

POL( cons(x1, x2) ) = x2

POL( nfrom(x1) ) = x1

POL( fst(x1, x2) ) = x1 + x2

POL( from(x1) ) = x1

POL( ns(x1) ) = 0

POL( s(x1) ) = 0

POL( add(x1, x2) ) = x1 + x2

POL( len(x1) ) = x1 + 1

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
Neg POLO
             ...
               →DP Problem 2
Dependency Graph


Dependency Pairs:

ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
LEN(cons(X, Z)) -> ACTIVATE(Z)


Rules:


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





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
Neg POLO
             ...
               →DP Problem 3
Size-Change Principle


Dependency Pairs:

ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)


Rules:


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





We number the DPs as follows:
  1. ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
  2. ACTIVATE(nfrom(X)) -> ACTIVATE(X)
  3. ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X2)
  4. ACTIVATE(nfst(X1, X2)) -> ACTIVATE(X1)
  5. ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X2)
and get the following Size-Change Graph(s):
{4, 3, 2, 1, 5} , {4, 3, 2, 1, 5}
1>1

which lead(s) to this/these maximal multigraph(s):
{4, 3, 2, 1, 5} , {4, 3, 2, 1, 5}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
nfrom(x1) -> nfrom(x1)
nfst(x1, x2) -> nfst(x1, x2)
nadd(x1, x2) -> nadd(x1, x2)

We obtain no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:00 minutes