Term Rewriting System R:
[X, Z, Y, X1, X2]
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) -> SEL(X, activate(Z))
SEL(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfrom(X)) -> FROM(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfirst(X1, X2)) -> FIRST(activate(X1), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)

Furthermore, R contains two SCCs.


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


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1, X2)) -> FIRST(activate(X1), activate(X2))
eight new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X'), X2)) -> FIRST(from(activate(X')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2)) -> FIRST(s(activate(X')), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2)) -> FIRST(first(activate(X1''), activate(X2'')), activate(X2))
ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2)) -> FIRST(first(activate(X1''), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2)) -> FIRST(s(activate(X')), activate(X2))
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(nfrom(X'), X2)) -> FIRST(from(activate(X')), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(nfrom(X'), X2)) -> FIRST(from(activate(X')), activate(X2))
10 new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(cons(activate(X''), nfrom(ns(activate(X'')))), activate(X2))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(nfrom(activate(X'')), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2)) -> FIRST(first(activate(X1''), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2)) -> FIRST(s(activate(X')), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(ns(X'), X2)) -> FIRST(s(activate(X')), activate(X2))
nine new Dependency Pairs are created:

ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(ns(activate(X'')), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2)) -> FIRST(first(activate(X1''), activate(X2'')), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(nfirst(X1'', X2''), X2)) -> FIRST(first(activate(X1''), activate(X2'')), activate(X2))
13 new Dependency Pairs are created:

ACTIVATE(nfirst(nfirst(X1''', X2'''), X2)) -> FIRST(nfirst(activate(X1'''), activate(X2''')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1', X2)) -> FIRST(X1', activate(X2))
four new Dependency Pairs are created:

ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1, nfrom(X'))) -> FIRST(activate(X1), from(activate(X')))
10 new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), nfrom(activate(X'')))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1, ns(X'))) -> FIRST(activate(X1), s(activate(X')))
nine new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X''), ns(X'))) -> FIRST(from(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), ns(activate(X'')))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(nfrom(X''), ns(X'))) -> FIRST(from(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1, nfirst(X1'', X2''))) -> FIRST(activate(X1), first(activate(X1''), activate(X2'')))
13 new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X'), nfirst(X1'', X2''))) -> FIRST(from(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(ns(X'), nfirst(X1'', X2''))) -> FIRST(s(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(X1''', X2'''))) -> FIRST(activate(X1), nfirst(activate(X1'''), activate(X2''')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(ns(X'), nfirst(X1'', X2''))) -> FIRST(s(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), nfirst(X1'', X2''))) -> FIRST(from(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(nfrom(X''), ns(X'))) -> FIRST(from(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





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

ACTIVATE(nfirst(X1, X2')) -> FIRST(activate(X1), X2')
four new Dependency Pairs are created:

ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 11
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pairs:

ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(ns(X'), nfirst(X1'', X2''))) -> FIRST(s(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), nfirst(X1'', X2''))) -> FIRST(from(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(nfrom(X''), ns(X'))) -> FIRST(from(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





The following dependency pairs can be strictly oriented:

ACTIVATE(nfirst(nfrom(X'), X2')) -> FIRST(from(activate(X')), X2')
ACTIVATE(nfirst(nfrom(X'), nfirst(X1'', X2''))) -> FIRST(from(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfrom(X''), ns(X'))) -> FIRST(from(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(nfrom(X''), nfrom(X'))) -> FIRST(from(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', nfrom(X')), X2)) -> FIRST(first(activate(X1''), from(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(nfrom(X'), X2''), X2)) -> FIRST(first(from(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(nfrom(X'')), X2)) -> FIRST(s(from(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(X'), nfirst(X1', X2''))) -> FIRST(from(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(nfrom(X'), ns(X''))) -> FIRST(from(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(nfrom(X'), nfrom(X''))) -> FIRST(from(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(nfrom(X''), X2)) -> FIRST(from(X''), activate(X2))
ACTIVATE(nfirst(nfrom(nfirst(X1', X2'')), X2)) -> FIRST(from(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(nfrom(ns(X'')), X2)) -> FIRST(from(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(nfrom(nfrom(X'')), X2)) -> FIRST(from(from(activate(X''))), activate(X2))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
s(X) -> ns(X)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(n__from(x1))=  1 + x1  
  POL(from(x1))=  1 + x1  
  POL(activate(x1))=  x1  
  POL(first(x1, x2))=  x1 + x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  x2  
  POL(FIRST(x1, x2))=  x2  
  POL(n__s(x1))=  x1  
  POL(nil)=  0  
  POL(s(x1))=  x1  
  POL(ACTIVATE(x1))=  x1  
  POL(n__first(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 12
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pairs:

ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(ns(X'), nfirst(X1'', X2''))) -> FIRST(s(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





The following dependency pairs can be strictly oriented:

ACTIVATE(nfirst(ns(X'), X2')) -> FIRST(s(activate(X')), X2')
ACTIVATE(nfirst(ns(X'), nfirst(X1'', X2''))) -> FIRST(s(activate(X')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(ns(X''), ns(X'))) -> FIRST(s(activate(X'')), s(activate(X')))
ACTIVATE(nfirst(ns(X''), nfrom(X'))) -> FIRST(s(activate(X'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', ns(X')), X2)) -> FIRST(first(activate(X1''), s(activate(X'))), activate(X2))
ACTIVATE(nfirst(nfirst(ns(X'), X2''), X2)) -> FIRST(first(s(activate(X')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(ns(X'), nfirst(X1', X2''))) -> FIRST(s(activate(X')), first(activate(X1'), activate(X2'')))
ACTIVATE(nfirst(ns(X'), ns(X''))) -> FIRST(s(activate(X')), s(activate(X'')))
ACTIVATE(nfirst(ns(X'), nfrom(X''))) -> FIRST(s(activate(X')), from(activate(X'')))
ACTIVATE(nfirst(ns(X''), X2)) -> FIRST(s(X''), activate(X2))
ACTIVATE(nfirst(ns(nfirst(X1', X2'')), X2)) -> FIRST(s(first(activate(X1'), activate(X2''))), activate(X2))
ACTIVATE(nfirst(ns(ns(X'')), X2)) -> FIRST(s(s(activate(X''))), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
s(X) -> ns(X)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(n__from(x1))=  0  
  POL(from(x1))=  0  
  POL(activate(x1))=  x1  
  POL(first(x1, x2))=  x1 + x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  x2  
  POL(FIRST(x1, x2))=  x2  
  POL(n__s(x1))=  1 + x1  
  POL(nil)=  0  
  POL(s(x1))=  1 + x1  
  POL(ACTIVATE(x1))=  x1  
  POL(n__first(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 13
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pairs:

ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)
ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





The following dependency pairs can be strictly oriented:

ACTIVATE(nfirst(X1', X2')) -> FIRST(X1', X2')
ACTIVATE(nfirst(nfirst(X1'', X2''), X2')) -> FIRST(first(activate(X1''), activate(X2'')), X2')
ACTIVATE(nfirst(X1, nfirst(X1'', nfirst(X1''', X2')))) -> FIRST(activate(X1), first(activate(X1''), first(activate(X1'''), activate(X2'))))
ACTIVATE(nfirst(X1, nfirst(X1'', ns(X')))) -> FIRST(activate(X1), first(activate(X1''), s(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1'', nfrom(X')))) -> FIRST(activate(X1), first(activate(X1''), from(activate(X'))))
ACTIVATE(nfirst(X1, nfirst(X1''', X2''))) -> FIRST(activate(X1), first(X1''', activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfirst(X1''', X2'), X2''))) -> FIRST(activate(X1), first(first(activate(X1'''), activate(X2')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(ns(X'), X2''))) -> FIRST(activate(X1), first(s(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1, nfirst(nfrom(X'), X2''))) -> FIRST(activate(X1), first(from(activate(X')), activate(X2'')))
ACTIVATE(nfirst(X1', nfirst(X1'', X2''))) -> FIRST(X1', first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(nfirst(X1''', X2'), nfirst(X1'', X2''))) -> FIRST(first(activate(X1'''), activate(X2')), first(activate(X1''), activate(X2'')))
ACTIVATE(nfirst(X1, ns(X''))) -> FIRST(activate(X1), s(X''))
ACTIVATE(nfirst(X1, ns(nfirst(X1'', X2')))) -> FIRST(activate(X1), s(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, ns(ns(X'')))) -> FIRST(activate(X1), s(s(activate(X''))))
ACTIVATE(nfirst(X1, ns(nfrom(X'')))) -> FIRST(activate(X1), s(from(activate(X''))))
ACTIVATE(nfirst(X1', ns(X'))) -> FIRST(X1', s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), ns(X'))) -> FIRST(first(activate(X1''), activate(X2')), s(activate(X')))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), from(X''))
ACTIVATE(nfirst(X1, nfrom(nfirst(X1'', X2')))) -> FIRST(activate(X1), from(first(activate(X1''), activate(X2'))))
ACTIVATE(nfirst(X1, nfrom(ns(X'')))) -> FIRST(activate(X1), from(s(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(nfrom(X'')))) -> FIRST(activate(X1), from(from(activate(X''))))
ACTIVATE(nfirst(X1, nfrom(X''))) -> FIRST(activate(X1), cons(activate(X''), nfrom(ns(activate(X'')))))
ACTIVATE(nfirst(X1', nfrom(X'))) -> FIRST(X1', from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfirst(X1', X2'''))) -> FIRST(first(activate(X1''), activate(X2'')), first(activate(X1'), activate(X2''')))
ACTIVATE(nfirst(nfirst(X1'', X2''), ns(X'))) -> FIRST(first(activate(X1''), activate(X2'')), s(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2''), nfrom(X'))) -> FIRST(first(activate(X1''), activate(X2'')), from(activate(X')))
ACTIVATE(nfirst(nfirst(X1'', X2'''), X2)) -> FIRST(first(activate(X1''), X2'''), activate(X2))
ACTIVATE(nfirst(nfirst(X1'', nfirst(X1', X2''')), X2)) -> FIRST(first(activate(X1''), first(activate(X1'), activate(X2'''))), activate(X2))
ACTIVATE(nfirst(nfirst(X1''', X2''), X2)) -> FIRST(first(X1''', activate(X2'')), activate(X2))
ACTIVATE(nfirst(nfirst(nfirst(X1', X2'''), X2''), X2)) -> FIRST(first(first(activate(X1'), activate(X2''')), activate(X2'')), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfirst(X1, nfirst(X1'', X2'''))) -> FIRST(activate(X1), first(activate(X1''), X2'''))


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
s(X) -> ns(X)
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(n__from(x1))=  0  
  POL(from(x1))=  0  
  POL(activate(x1))=  x1  
  POL(first(x1, x2))=  1 + x1 + x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  x2  
  POL(FIRST(x1, x2))=  x2  
  POL(n__s(x1))=  x1  
  POL(nil)=  0  
  POL(s(x1))=  x1  
  POL(ACTIVATE(x1))=  x1  
  POL(n__first(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 3
Nar
             ...
               →DP Problem 14
Dependency Graph
       →DP Problem 2
Nar


Dependency Pair:

FIRST(s(X), cons(Y, Z)) -> ACTIVATE(Z)


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

SEL(s(X), cons(Y, Z)) -> SEL(X, activate(Z))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(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))
four new Dependency Pairs are created:

SEL(s(X), cons(Y, nfrom(X''))) -> SEL(X, from(activate(X'')))
SEL(s(X), cons(Y, ns(X''))) -> SEL(X, s(activate(X'')))
SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(activate(X1'), activate(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
Nar
           →DP Problem 15
Narrowing Transformation


Dependency Pairs:

SEL(s(X), cons(Y, Z')) -> SEL(X, Z')
SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(activate(X1'), activate(X2')))
SEL(s(X), cons(Y, ns(X''))) -> SEL(X, s(activate(X'')))
SEL(s(X), cons(Y, nfrom(X''))) -> SEL(X, from(activate(X'')))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(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, nfrom(X''))) -> SEL(X, from(activate(X'')))
six new Dependency Pairs are created:

SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, cons(activate(X'''), nfrom(ns(activate(X''')))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, nfrom(activate(X''')))
SEL(s(X), cons(Y, nfrom(nfrom(X''')))) -> SEL(X, from(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(ns(X''')))) -> SEL(X, from(s(activate(X'''))))
SEL(s(X), cons(Y, nfrom(nfirst(X1', X2')))) -> SEL(X, from(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, from(X'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Nar
           →DP Problem 15
Nar
             ...
               →DP Problem 16
Narrowing Transformation


Dependency Pairs:

SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, from(X'''))
SEL(s(X), cons(Y, nfrom(nfirst(X1', X2')))) -> SEL(X, from(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, nfrom(nfrom(X''')))) -> SEL(X, from(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(ns(X''')))) -> SEL(X, from(s(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, cons(activate(X'''), nfrom(ns(activate(X''')))))
SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(activate(X1'), activate(X2')))
SEL(s(X), cons(Y, ns(X''))) -> SEL(X, s(activate(X'')))
SEL(s(X), cons(Y, Z')) -> SEL(X, Z')


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(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, ns(X''))) -> SEL(X, s(activate(X'')))
five new Dependency Pairs are created:

SEL(s(X), cons(Y, ns(X'''))) -> SEL(X, ns(activate(X''')))
SEL(s(X), cons(Y, ns(nfrom(X''')))) -> SEL(X, s(from(activate(X'''))))
SEL(s(X), cons(Y, ns(ns(X''')))) -> SEL(X, s(s(activate(X'''))))
SEL(s(X), cons(Y, ns(nfirst(X1', X2')))) -> SEL(X, s(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, ns(X'''))) -> SEL(X, s(X'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Nar
           →DP Problem 15
Nar
             ...
               →DP Problem 17
Narrowing Transformation


Dependency Pairs:

SEL(s(X), cons(Y, ns(X'''))) -> SEL(X, s(X'''))
SEL(s(X), cons(Y, ns(nfirst(X1', X2')))) -> SEL(X, s(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, ns(ns(X''')))) -> SEL(X, s(s(activate(X'''))))
SEL(s(X), cons(Y, ns(nfrom(X''')))) -> SEL(X, s(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(nfirst(X1', X2')))) -> SEL(X, from(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, nfrom(nfrom(X''')))) -> SEL(X, from(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(ns(X''')))) -> SEL(X, from(s(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, cons(activate(X'''), nfrom(ns(activate(X''')))))
SEL(s(X), cons(Y, Z')) -> SEL(X, Z')
SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(activate(X1'), activate(X2')))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, from(X'''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(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, nfirst(X1', X2'))) -> SEL(X, first(activate(X1'), activate(X2')))
nine new Dependency Pairs are created:

SEL(s(X), cons(Y, nfirst(X1'', X2''))) -> SEL(X, nfirst(activate(X1''), activate(X2'')))
SEL(s(X), cons(Y, nfirst(nfrom(X''), X2'))) -> SEL(X, first(from(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(ns(X''), X2'))) -> SEL(X, first(s(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(nfirst(X1'', X2''), X2'))) -> SEL(X, first(first(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(X1'', X2'))) -> SEL(X, first(X1'', activate(X2')))
SEL(s(X), cons(Y, nfirst(X1', nfrom(X'')))) -> SEL(X, first(activate(X1'), from(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1', ns(X'')))) -> SEL(X, first(activate(X1'), s(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1', nfirst(X1'', X2'')))) -> SEL(X, first(activate(X1'), first(activate(X1''), activate(X2''))))
SEL(s(X), cons(Y, nfirst(X1', X2''))) -> SEL(X, first(activate(X1'), X2''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Nar
           →DP Problem 15
Nar
             ...
               →DP Problem 18
Polynomial Ordering


Dependency Pairs:

SEL(s(X), cons(Y, nfirst(X1', X2''))) -> SEL(X, first(activate(X1'), X2''))
SEL(s(X), cons(Y, nfirst(X1', nfirst(X1'', X2'')))) -> SEL(X, first(activate(X1'), first(activate(X1''), activate(X2''))))
SEL(s(X), cons(Y, nfirst(X1', ns(X'')))) -> SEL(X, first(activate(X1'), s(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1', nfrom(X'')))) -> SEL(X, first(activate(X1'), from(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1'', X2'))) -> SEL(X, first(X1'', activate(X2')))
SEL(s(X), cons(Y, nfirst(nfirst(X1'', X2''), X2'))) -> SEL(X, first(first(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(ns(X''), X2'))) -> SEL(X, first(s(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(nfrom(X''), X2'))) -> SEL(X, first(from(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, ns(nfirst(X1', X2')))) -> SEL(X, s(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, ns(ns(X''')))) -> SEL(X, s(s(activate(X'''))))
SEL(s(X), cons(Y, ns(nfrom(X''')))) -> SEL(X, s(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, from(X'''))
SEL(s(X), cons(Y, nfrom(nfirst(X1', X2')))) -> SEL(X, from(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, nfrom(nfrom(X''')))) -> SEL(X, from(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(ns(X''')))) -> SEL(X, from(s(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, cons(activate(X'''), nfrom(ns(activate(X''')))))
SEL(s(X), cons(Y, Z')) -> SEL(X, Z')
SEL(s(X), cons(Y, ns(X'''))) -> SEL(X, s(X'''))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





The following dependency pairs can be strictly oriented:

SEL(s(X), cons(Y, nfirst(X1', X2''))) -> SEL(X, first(activate(X1'), X2''))
SEL(s(X), cons(Y, nfirst(X1', nfirst(X1'', X2'')))) -> SEL(X, first(activate(X1'), first(activate(X1''), activate(X2''))))
SEL(s(X), cons(Y, nfirst(X1', ns(X'')))) -> SEL(X, first(activate(X1'), s(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1', nfrom(X'')))) -> SEL(X, first(activate(X1'), from(activate(X''))))
SEL(s(X), cons(Y, nfirst(X1'', X2'))) -> SEL(X, first(X1'', activate(X2')))
SEL(s(X), cons(Y, nfirst(nfirst(X1'', X2''), X2'))) -> SEL(X, first(first(activate(X1''), activate(X2'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(ns(X''), X2'))) -> SEL(X, first(s(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, nfirst(nfrom(X''), X2'))) -> SEL(X, first(from(activate(X'')), activate(X2')))
SEL(s(X), cons(Y, ns(nfirst(X1', X2')))) -> SEL(X, s(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, ns(ns(X''')))) -> SEL(X, s(s(activate(X'''))))
SEL(s(X), cons(Y, ns(nfrom(X''')))) -> SEL(X, s(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, from(X'''))
SEL(s(X), cons(Y, nfrom(nfirst(X1', X2')))) -> SEL(X, from(first(activate(X1'), activate(X2'))))
SEL(s(X), cons(Y, nfrom(nfrom(X''')))) -> SEL(X, from(from(activate(X'''))))
SEL(s(X), cons(Y, nfrom(ns(X''')))) -> SEL(X, from(s(activate(X'''))))
SEL(s(X), cons(Y, nfrom(X'''))) -> SEL(X, cons(activate(X'''), nfrom(ns(activate(X''')))))
SEL(s(X), cons(Y, Z')) -> SEL(X, Z')
SEL(s(X), cons(Y, ns(X'''))) -> SEL(X, s(X'''))


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(n__from(x1))=  0  
  POL(from(x1))=  0  
  POL(activate(x1))=  0  
  POL(first(x1, x2))=  0  
  POL(0)=  0  
  POL(cons(x1, x2))=  0  
  POL(SEL(x1, x2))=  x1  
  POL(n__s(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  1 + x1  
  POL(n__first(x1, x2))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
       →DP Problem 2
Nar
           →DP Problem 15
Nar
             ...
               →DP Problem 19
Dependency Graph


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
sel(0, cons(X, Z)) -> X
sel(s(X), cons(Y, Z)) -> sel(X, activate(Z))
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:23 minutes