Term Rewriting System R:
[X, Y, M, N, X1, X2, X3]
filter(cons(X, Y), 0, M) -> cons(0, nfilter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) -> cons(X, nfilter(activate(Y), N, M))
filter(X1, X2, X3) -> nfilter(X1, X2, X3)
sieve(cons(0, Y)) -> cons(0, nsieve(activate(Y)))
sieve(cons(s(N), Y)) -> cons(s(N), nsieve(nfilter(activate(Y), N, N)))
sieve(X) -> nsieve(X)
nats(N) -> cons(N, nnats(ns(N)))
nats(X) -> nnats(X)
zprimes -> sieve(nats(s(s(0))))
s(X) -> ns(X)
activate(nfilter(X1, X2, X3)) -> filter(activate(X1), activate(X2), activate(X3))
activate(nsieve(X)) -> sieve(activate(X))
activate(nnats(X)) -> nats(activate(X))
activate(ns(X)) -> s(activate(X))
activate(X) -> X

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FILTER(cons(X, Y), 0, M) -> ACTIVATE(Y)
FILTER(cons(X, Y), s(N), M) -> ACTIVATE(Y)
SIEVE(cons(0, Y)) -> ACTIVATE(Y)
SIEVE(cons(s(N), Y)) -> ACTIVATE(Y)
ZPRIMES -> SIEVE(nats(s(s(0))))
ZPRIMES -> NATS(s(s(0)))
ZPRIMES -> S(s(0))
ZPRIMES -> S(0)
ACTIVATE(nfilter(X1, X2, X3)) -> FILTER(activate(X1), activate(X2), activate(X3))
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X1)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X3)
ACTIVATE(nsieve(X)) -> SIEVE(activate(X))
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
ACTIVATE(nnats(X)) -> NATS(activate(X))
ACTIVATE(nnats(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nnats(X)) -> ACTIVATE(X)
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
SIEVE(cons(0, Y)) -> ACTIVATE(Y)
ACTIVATE(nsieve(X)) -> SIEVE(activate(X))
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X3)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X1)
ACTIVATE(nfilter(X1, X2, X3)) -> FILTER(activate(X1), activate(X2), activate(X3))
FILTER(cons(X, Y), 0, M) -> ACTIVATE(Y)


Rules:


filter(cons(X, Y), 0, M) -> cons(0, nfilter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) -> cons(X, nfilter(activate(Y), N, M))
filter(X1, X2, X3) -> nfilter(X1, X2, X3)
sieve(cons(0, Y)) -> cons(0, nsieve(activate(Y)))
sieve(cons(s(N), Y)) -> cons(s(N), nsieve(nfilter(activate(Y), N, N)))
sieve(X) -> nsieve(X)
nats(N) -> cons(N, nnats(ns(N)))
nats(X) -> nnats(X)
zprimes -> sieve(nats(s(s(0))))
s(X) -> ns(X)
activate(nfilter(X1, X2, X3)) -> filter(activate(X1), activate(X2), activate(X3))
activate(nsieve(X)) -> sieve(activate(X))
activate(nnats(X)) -> nats(activate(X))
activate(ns(X)) -> s(activate(X))
activate(X) -> X


Strategy:

innermost




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

ACTIVATE(nfilter(X1, X2, X3)) -> FILTER(activate(X1), activate(X2), activate(X3))
15 new Dependency Pairs are created:

ACTIVATE(nfilter(nfilter(X1'', X2'', X3''), X2, X3)) -> FILTER(filter(activate(X1''), activate(X2''), activate(X3'')), activate(X2), activate(X3))
ACTIVATE(nfilter(nsieve(X'), X2, X3)) -> FILTER(sieve(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nnats(X'), X2, X3)) -> FILTER(nats(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(ns(X'), X2, X3)) -> FILTER(s(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(X1', X2, X3)) -> FILTER(X1', activate(X2), activate(X3))
ACTIVATE(nfilter(X1, nfilter(X1'', X2'', X3''), X3)) -> FILTER(activate(X1), filter(activate(X1''), activate(X2''), activate(X3'')), activate(X3))
ACTIVATE(nfilter(X1, nsieve(X'), X3)) -> FILTER(activate(X1), sieve(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nnats(X'), X3)) -> FILTER(activate(X1), nats(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, ns(X'), X3)) -> FILTER(activate(X1), s(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, X2', X3)) -> FILTER(activate(X1), X2', activate(X3))
ACTIVATE(nfilter(X1, X2, nfilter(X1'', X2'', X3''))) -> FILTER(activate(X1), activate(X2), filter(activate(X1''), activate(X2''), activate(X3'')))
ACTIVATE(nfilter(X1, X2, nsieve(X'))) -> FILTER(activate(X1), activate(X2), sieve(activate(X')))
ACTIVATE(nfilter(X1, X2, nnats(X'))) -> FILTER(activate(X1), activate(X2), nats(activate(X')))
ACTIVATE(nfilter(X1, X2, ns(X'))) -> FILTER(activate(X1), activate(X2), s(activate(X')))
ACTIVATE(nfilter(X1, X2, X3')) -> FILTER(activate(X1), activate(X2), X3')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ACTIVATE(nfilter(X1, X2, X3')) -> FILTER(activate(X1), activate(X2), X3')
ACTIVATE(nfilter(X1, X2, ns(X'))) -> FILTER(activate(X1), activate(X2), s(activate(X')))
ACTIVATE(nfilter(X1, X2, nnats(X'))) -> FILTER(activate(X1), activate(X2), nats(activate(X')))
ACTIVATE(nfilter(X1, X2, nsieve(X'))) -> FILTER(activate(X1), activate(X2), sieve(activate(X')))
ACTIVATE(nfilter(X1, X2, nfilter(X1'', X2'', X3''))) -> FILTER(activate(X1), activate(X2), filter(activate(X1''), activate(X2''), activate(X3'')))
ACTIVATE(nfilter(X1, X2', X3)) -> FILTER(activate(X1), X2', activate(X3))
ACTIVATE(nfilter(X1, ns(X'), X3)) -> FILTER(activate(X1), s(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nnats(X'), X3)) -> FILTER(activate(X1), nats(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nsieve(X'), X3)) -> FILTER(activate(X1), sieve(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nfilter(X1'', X2'', X3''), X3)) -> FILTER(activate(X1), filter(activate(X1''), activate(X2''), activate(X3'')), activate(X3))
ACTIVATE(nfilter(X1', X2, X3)) -> FILTER(X1', activate(X2), activate(X3))
ACTIVATE(nfilter(ns(X'), X2, X3)) -> FILTER(s(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nnats(X'), X2, X3)) -> FILTER(nats(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nsieve(X'), X2, X3)) -> FILTER(sieve(activate(X')), activate(X2), activate(X3))
FILTER(cons(X, Y), 0, M) -> ACTIVATE(Y)
ACTIVATE(nfilter(nfilter(X1'', X2'', X3''), X2, X3)) -> FILTER(filter(activate(X1''), activate(X2''), activate(X3'')), activate(X2), activate(X3))
ACTIVATE(nnats(X)) -> ACTIVATE(X)
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
SIEVE(cons(0, Y)) -> ACTIVATE(Y)
ACTIVATE(nsieve(X)) -> SIEVE(activate(X))
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X3)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)


Rules:


filter(cons(X, Y), 0, M) -> cons(0, nfilter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) -> cons(X, nfilter(activate(Y), N, M))
filter(X1, X2, X3) -> nfilter(X1, X2, X3)
sieve(cons(0, Y)) -> cons(0, nsieve(activate(Y)))
sieve(cons(s(N), Y)) -> cons(s(N), nsieve(nfilter(activate(Y), N, N)))
sieve(X) -> nsieve(X)
nats(N) -> cons(N, nnats(ns(N)))
nats(X) -> nnats(X)
zprimes -> sieve(nats(s(s(0))))
s(X) -> ns(X)
activate(nfilter(X1, X2, X3)) -> filter(activate(X1), activate(X2), activate(X3))
activate(nsieve(X)) -> sieve(activate(X))
activate(nnats(X)) -> nats(activate(X))
activate(ns(X)) -> s(activate(X))
activate(X) -> X


Strategy:

innermost




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

ACTIVATE(nsieve(X)) -> SIEVE(activate(X))
five new Dependency Pairs are created:

ACTIVATE(nsieve(nfilter(X1', X2', X3'))) -> SIEVE(filter(activate(X1'), activate(X2'), activate(X3')))
ACTIVATE(nsieve(nsieve(X''))) -> SIEVE(sieve(activate(X'')))
ACTIVATE(nsieve(nnats(X''))) -> SIEVE(nats(activate(X'')))
ACTIVATE(nsieve(ns(X''))) -> SIEVE(s(activate(X'')))
ACTIVATE(nsieve(X'')) -> SIEVE(X'')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

ACTIVATE(nsieve(X'')) -> SIEVE(X'')
ACTIVATE(nsieve(ns(X''))) -> SIEVE(s(activate(X'')))
ACTIVATE(nsieve(nnats(X''))) -> SIEVE(nats(activate(X'')))
ACTIVATE(nsieve(nsieve(X''))) -> SIEVE(sieve(activate(X'')))
SIEVE(cons(0, Y)) -> ACTIVATE(Y)
ACTIVATE(nsieve(nfilter(X1', X2', X3'))) -> SIEVE(filter(activate(X1'), activate(X2'), activate(X3')))
ACTIVATE(nfilter(X1, X2, ns(X'))) -> FILTER(activate(X1), activate(X2), s(activate(X')))
ACTIVATE(nfilter(X1, X2, nnats(X'))) -> FILTER(activate(X1), activate(X2), nats(activate(X')))
ACTIVATE(nfilter(X1, X2, nsieve(X'))) -> FILTER(activate(X1), activate(X2), sieve(activate(X')))
ACTIVATE(nfilter(X1, X2, nfilter(X1'', X2'', X3''))) -> FILTER(activate(X1), activate(X2), filter(activate(X1''), activate(X2''), activate(X3'')))
ACTIVATE(nfilter(X1, X2', X3)) -> FILTER(activate(X1), X2', activate(X3))
ACTIVATE(nfilter(X1, ns(X'), X3)) -> FILTER(activate(X1), s(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nnats(X'), X3)) -> FILTER(activate(X1), nats(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nsieve(X'), X3)) -> FILTER(activate(X1), sieve(activate(X')), activate(X3))
ACTIVATE(nfilter(X1, nfilter(X1'', X2'', X3''), X3)) -> FILTER(activate(X1), filter(activate(X1''), activate(X2''), activate(X3'')), activate(X3))
ACTIVATE(nfilter(X1', X2, X3)) -> FILTER(X1', activate(X2), activate(X3))
ACTIVATE(nfilter(ns(X'), X2, X3)) -> FILTER(s(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nnats(X'), X2, X3)) -> FILTER(nats(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nsieve(X'), X2, X3)) -> FILTER(sieve(activate(X')), activate(X2), activate(X3))
ACTIVATE(nfilter(nfilter(X1'', X2'', X3''), X2, X3)) -> FILTER(filter(activate(X1''), activate(X2''), activate(X3'')), activate(X2), activate(X3))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nnats(X)) -> ACTIVATE(X)
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X3)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2, X3)) -> ACTIVATE(X1)
FILTER(cons(X, Y), 0, M) -> ACTIVATE(Y)
ACTIVATE(nfilter(X1, X2, X3')) -> FILTER(activate(X1), activate(X2), X3')


Rules:


filter(cons(X, Y), 0, M) -> cons(0, nfilter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) -> cons(X, nfilter(activate(Y), N, M))
filter(X1, X2, X3) -> nfilter(X1, X2, X3)
sieve(cons(0, Y)) -> cons(0, nsieve(activate(Y)))
sieve(cons(s(N), Y)) -> cons(s(N), nsieve(nfilter(activate(Y), N, N)))
sieve(X) -> nsieve(X)
nats(N) -> cons(N, nnats(ns(N)))
nats(X) -> nnats(X)
zprimes -> sieve(nats(s(s(0))))
s(X) -> ns(X)
activate(nfilter(X1, X2, X3)) -> filter(activate(X1), activate(X2), activate(X3))
activate(nsieve(X)) -> sieve(activate(X))
activate(nnats(X)) -> nats(activate(X))
activate(ns(X)) -> s(activate(X))
activate(X) -> X


Strategy:

innermost



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