Term Rewriting System R:
[X, Y, Z, X1, X2]
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
sel(0, cons(X, Z)) -> X
sel(X1, X2) -> nsel(X1, X2)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
sel1(s(X), cons(Y, Z)) -> sel1(X, activate(Z))
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, activate(Z)))
quote(n0) -> 01
quote(ns(X)) -> s1(quote(activate(X)))
quote(nsel(X, Z)) -> sel1(activate(X), activate(Z))
quote1(ncons(X, Z)) -> cons1(quote(activate(X)), quote1(activate(Z)))
quote1(nnil) -> nil1
quote1(nfirst(X, Z)) -> first1(activate(X), activate(Z))
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
0 -> n0
cons(X1, X2) -> ncons(X1, X2)
nil -> nnil
s(X) -> ns(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(nfrom(X)) -> from(X)
activate(n0) -> 0
activate(ncons(X1, X2)) -> cons(X1, X2)
activate(nnil) -> nil
activate(ns(X)) -> s(X)
activate(nsel(X1, X2)) -> sel(X1, X2)
activate(X) -> X

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

SEL(s(X), cons(Y, Z)) -> SEL(X, activate(Z))
SEL(s(X), cons(Y, Z)) -> ACTIVATE(Z)
FIRST(0, Z) -> NIL
FIRST(s(X), cons(Y, Z)) -> CONS(Y, nfirst(X, activate(Z)))
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
FROM(X) -> CONS(X, nfrom(s(X)))
FROM(X) -> S(X)
SEL1(s(X), cons(Y, Z)) -> SEL1(X, activate(Z))
SEL1(s(X), cons(Y, Z)) -> ACTIVATE(Z)
SEL1(0, cons(X, Z)) -> QUOTE(X)
FIRST1(s(X), cons(Y, Z)) -> QUOTE(Y)
FIRST1(s(X), cons(Y, Z)) -> FIRST1(X, activate(Z))
FIRST1(s(X), cons(Y, Z)) -> ACTIVATE(Z)
QUOTE(ns(X)) -> QUOTE(activate(X))
QUOTE(ns(X)) -> ACTIVATE(X)
QUOTE(nsel(X, Z)) -> SEL1(activate(X), activate(Z))
QUOTE(nsel(X, Z)) -> ACTIVATE(X)
QUOTE(nsel(X, Z)) -> ACTIVATE(Z)
QUOTE1(ncons(X, Z)) -> QUOTE(activate(X))
QUOTE1(ncons(X, Z)) -> ACTIVATE(X)
QUOTE1(ncons(X, Z)) -> QUOTE1(activate(Z))
QUOTE1(ncons(X, Z)) -> ACTIVATE(Z)
QUOTE1(nfirst(X, Z)) -> FIRST1(activate(X), activate(Z))
QUOTE1(nfirst(X, Z)) -> ACTIVATE(X)
QUOTE1(nfirst(X, Z)) -> ACTIVATE(Z)
UNQUOTE(01) -> 0'
UNQUOTE(s1(X)) -> S(unquote(X))
UNQUOTE(s1(X)) -> UNQUOTE(X)
UNQUOTE1(nil1) -> NIL
UNQUOTE1(cons1(X, Z)) -> FCONS(unquote(X), unquote1(Z))
UNQUOTE1(cons1(X, Z)) -> UNQUOTE(X)
UNQUOTE1(cons1(X, Z)) -> UNQUOTE1(Z)
FCONS(X, Z) -> CONS(X, Z)
ACTIVATE(nfirst(X1, X2)) -> FIRST(X1, X2)
ACTIVATE(nfrom(X)) -> FROM(X)
ACTIVATE(n0) -> 0'
ACTIVATE(ncons(X1, X2)) -> CONS(X1, X2)
ACTIVATE(nnil) -> NIL
ACTIVATE(ns(X)) -> S(X)
ACTIVATE(nsel(X1, X2)) -> SEL(X1, X2)

Furthermore, R contains six SCCs.


   R
DPs
       →DP Problem 1
Narrowing Transformation
       →DP Problem 2
Remaining
       →DP Problem 3
Remaining
       →DP Problem 4
Remaining
       →DP Problem 5
Remaining
       →DP Problem 6
Remaining


Dependency Pairs:

ACTIVATE(nsel(X1, X2)) -> SEL(X1, X2)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, X2)) -> FIRST(X1, X2)
SEL(s(X), cons(Y, Z)) -> ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) -> SEL(X, activate(Z))


Rules:


sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
sel(0, cons(X, Z)) -> X
sel(X1, X2) -> nsel(X1, X2)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
from(X) -> cons(X, nfrom(s(X)))
from(X) -> nfrom(X)
sel1(s(X), cons(Y, Z)) -> sel1(X, activate(Z))
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, activate(Z)))
quote(n0) -> 01
quote(ns(X)) -> s1(quote(activate(X)))
quote(nsel(X, Z)) -> sel1(activate(X), activate(Z))
quote1(ncons(X, Z)) -> cons1(quote(activate(X)), quote1(activate(Z)))
quote1(nnil) -> nil1
quote1(nfirst(X, Z)) -> first1(activate(X), activate(Z))
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
0 -> n0
cons(X1, X2) -> ncons(X1, X2)
nil -> nnil
s(X) -> ns(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(nfrom(X)) -> from(X)
activate(n0) -> 0
activate(ncons(X1, X2)) -> cons(X1, X2)
activate(nnil) -> nil
activate(ns(X)) -> s(X)
activate(nsel(X1, X2)) -> sel(X1, X2)
activate(X) -> X





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

SEL(s(X), cons(Y, Z)) -> SEL(X, activate(Z))
eight new Dependency Pairs are created:

SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(X1', X2'))
SEL(s(X), cons(Y, nfrom(X''))) -> SEL(X, from(X''))
SEL(s(X), cons(Y, n0)) -> SEL(X, 0)
SEL(s(X), cons(Y, ncons(X1', X2'))) -> SEL(X, cons(X1', X2'))
SEL(s(X), cons(Y, nnil)) -> SEL(X, nil)
SEL(s(X), cons(Y, ns(X''))) -> SEL(X, s(X''))
SEL(s(X), cons(Y, nsel(X1', X2'))) -> SEL(X, sel(X1', X2'))
SEL(s(X), cons(Y, Z')) -> SEL(X, Z')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Remaining Obligation(s)
       →DP Problem 3
Remaining Obligation(s)
       →DP Problem 4
Remaining Obligation(s)
       →DP Problem 5
Remaining Obligation(s)
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:

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