Term Rewriting System R:
[X, Y, X1, X2, Z]
and(true, X) -> activate(X)
and(false, Y) -> false
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
add(0, X) -> activate(X)
add(s(X), Y) -> s(nadd(activate(X), activate(Y)))
add(X1, X2) -> nadd(X1, X2)
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(activate(Y), nfirst(activate(X), activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
from(X) -> cons(activate(X), nfrom(ns(activate(X))))
from(X) -> nfrom(X)
s(X) -> ns(X)
activate(nadd(X1, X2)) -> add(activate(X1), X2)
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(nfrom(X)) -> from(X)
activate(ns(X)) -> s(X)
activate(X) -> X

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AND(true, X) -> ACTIVATE(X)
IF(true, X, Y) -> ACTIVATE(X)
IF(false, X, Y) -> ACTIVATE(Y)
ADD(0, X) -> ACTIVATE(X)
ADD(s(X), Y) -> S(nadd(activate(X), activate(Y)))
ADD(s(X), Y) -> ACTIVATE(X)
ADD(s(X), Y) -> ACTIVATE(Y)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Y)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
FROM(X) -> ACTIVATE(X)
ACTIVATE(nadd(X1, X2)) -> ADD(activate(X1), X2)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfirst(X1, X2)) -> FIRST(activate(X1), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfrom(X)) -> FROM(X)
ACTIVATE(ns(X)) -> S(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering


Dependency Pairs:

FROM(X) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> FROM(X)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ADD(0, X) -> ACTIVATE(X)
ACTIVATE(nadd(X1, X2)) -> ADD(activate(X1), X2)


Rules:


and(true, X) -> activate(X)
and(false, Y) -> false
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
add(0, X) -> activate(X)
add(s(X), Y) -> s(nadd(activate(X), activate(Y)))
add(X1, X2) -> nadd(X1, X2)
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(activate(Y), nfirst(activate(X), activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
from(X) -> cons(activate(X), nfrom(ns(activate(X))))
from(X) -> nfrom(X)
s(X) -> ns(X)
activate(nadd(X1, X2)) -> add(activate(X1), X2)
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(nfrom(X)) -> from(X)
activate(ns(X)) -> s(X)
activate(X) -> X


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVATE(nfrom(X)) -> FROM(X)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nadd(X1, X2)) -> ADD(activate(X1), X2)


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
ADD(x1, x2) -> x2
ACTIVATE(x1) -> x1
nfirst(x1, x2) -> nfirst(x1, x2)
nadd(x1, x2) -> nadd(x1, x2)
nfrom(x1) -> nfrom(x1)
FROM(x1) -> x1


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 2
Dependency Graph


Dependency Pairs:

FROM(X) -> ACTIVATE(X)
ADD(0, X) -> ACTIVATE(X)


Rules:


and(true, X) -> activate(X)
and(false, Y) -> false
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
add(0, X) -> activate(X)
add(s(X), Y) -> s(nadd(activate(X), activate(Y)))
add(X1, X2) -> nadd(X1, X2)
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(activate(Y), nfirst(activate(X), activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
from(X) -> cons(activate(X), nfrom(ns(activate(X))))
from(X) -> nfrom(X)
s(X) -> ns(X)
activate(nadd(X1, X2)) -> add(activate(X1), X2)
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(nfrom(X)) -> from(X)
activate(ns(X)) -> s(X)
activate(X) -> X


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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