Term Rewriting System R:
[X, Z, Y, X1, X2]
from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X

Innermost 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(X)
ACTIVATE(nfirst(X1, X2)) -> FIRST(X1, X2)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
Nar


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
ACTIVATE(x1) -> x1
nfirst(x1, x2) -> nfirst(x1, x2)
FIRST(x1, x2) -> x2
cons(x1, x2) -> cons(x1, x2)


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


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

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


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost




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

SEL(s(X), cons(Y, nfrom(X''))) -> SEL(X, from(X''))
SEL(s(X), cons(Y, nfirst(X1', X2'))) -> SEL(X, first(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
AFS
       →DP Problem 2
Nar
           →DP Problem 4
Forward Instantiation Transformation


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost




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

SEL(s(X), cons(Y, nfrom(X''))) -> SEL(X, from(X''))
one new Dependency Pair is created:

SEL(s(s(X'0)), cons(Y, nfrom(X'''))) -> SEL(s(X'0), from(X'''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost




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

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

SEL(s(s(X'')), cons(Y, cons(Y'', nfirst(X1''', X2''')))) -> SEL(s(X''), cons(Y'', nfirst(X1''', X2''')))
SEL(s(s(X'')), cons(Y, cons(Y'', Z'''))) -> SEL(s(X''), cons(Y'', Z'''))
SEL(s(s(s(X'0''))), cons(Y, cons(Y'', nfrom(X''''')))) -> SEL(s(s(X'0'')), cons(Y'', nfrom(X''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 4
FwdInst
             ...
               →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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))
activate(nfrom(X)) -> from(X)
activate(nfirst(X1, X2)) -> first(X1, X2)
activate(X) -> X


Strategy:

innermost



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