Term Rewriting System R:
[X, Y, M, N, X1, X2, X3]
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(filter(cons(X, Y), 0, M)) -> CONS(0, filter(Y, M, M))
ACTIVE(filter(cons(X, Y), 0, M)) -> FILTER(Y, M, M)
ACTIVE(filter(cons(X, Y), s(N), M)) -> CONS(X, filter(Y, N, M))
ACTIVE(filter(cons(X, Y), s(N), M)) -> FILTER(Y, N, M)
ACTIVE(sieve(cons(0, Y))) -> CONS(0, sieve(Y))
ACTIVE(sieve(cons(0, Y))) -> SIEVE(Y)
ACTIVE(sieve(cons(s(N), Y))) -> CONS(s(N), sieve(filter(Y, N, N)))
ACTIVE(sieve(cons(s(N), Y))) -> SIEVE(filter(Y, N, N))
ACTIVE(sieve(cons(s(N), Y))) -> FILTER(Y, N, N)
ACTIVE(nats(N)) -> CONS(N, nats(s(N)))
ACTIVE(nats(N)) -> NATS(s(N))
ACTIVE(nats(N)) -> S(N)
ACTIVE(zprimes) -> SIEVE(nats(s(s(0))))
ACTIVE(zprimes) -> NATS(s(s(0)))
ACTIVE(zprimes) -> S(s(0))
ACTIVE(zprimes) -> S(0)
ACTIVE(filter(X1, X2, X3)) -> FILTER(active(X1), X2, X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> FILTER(X1, active(X2), X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> FILTER(X1, X2, active(X3))
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(cons(X1, X2)) -> CONS(active(X1), X2)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> S(active(X))
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> SIEVE(active(X))
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(nats(X)) -> NATS(active(X))
ACTIVE(nats(X)) -> ACTIVE(X)
FILTER(mark(X1), X2, X3) -> FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) -> FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) -> FILTER(X1, X2, X3)
FILTER(ok(X1), ok(X2), ok(X3)) -> FILTER(X1, X2, X3)
CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
SIEVE(mark(X)) -> SIEVE(X)
SIEVE(ok(X)) -> SIEVE(X)
NATS(mark(X)) -> NATS(X)
NATS(ok(X)) -> NATS(X)
PROPER(filter(X1, X2, X3)) -> FILTER(proper(X1), proper(X2), proper(X3))
PROPER(filter(X1, X2, X3)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(sieve(X)) -> SIEVE(proper(X))
PROPER(sieve(X)) -> PROPER(X)
PROPER(nats(X)) -> NATS(proper(X))
PROPER(nats(X)) -> PROPER(X)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)

Furthermore, R contains eight SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

FILTER(ok(X1), ok(X2), ok(X3)) -> FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) -> FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) -> FILTER(X1, X2, X3)
FILTER(mark(X1), X2, X3) -> FILTER(X1, X2, X3)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

FILTER(ok(X1), ok(X2), ok(X3)) -> FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) -> FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) -> FILTER(X1, X2, X3)
FILTER(mark(X1), X2, X3) -> FILTER(X1, X2, X3)


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:
FILTER(x1, x2, x3) -> FILTER(x1, x2, x3)
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 9
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


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:
CONS(x1, x2) -> CONS(x1, x2)
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 10
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

SIEVE(ok(X)) -> SIEVE(X)
SIEVE(mark(X)) -> SIEVE(X)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

SIEVE(ok(X)) -> SIEVE(X)
SIEVE(mark(X)) -> SIEVE(X)


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:
SIEVE(x1) -> SIEVE(x1)
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 11
Dependency Graph
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and Ordering
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

NATS(ok(X)) -> NATS(X)
NATS(mark(X)) -> NATS(X)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

NATS(ok(X)) -> NATS(X)
NATS(mark(X)) -> NATS(X)


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:
NATS(x1) -> NATS(x1)
ok(x1) -> ok(x1)
mark(x1) -> mark(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 12
Dependency Graph
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

S(ok(X)) -> S(X)
S(mark(X)) -> S(X)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

S(ok(X)) -> S(X)
S(mark(X)) -> S(X)


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:
S(x1) -> S(x1)
ok(x1) -> ok(x1)
mark(x1) -> mark(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
           →DP Problem 13
Dependency Graph
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Argument Filtering and Ordering
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pairs:

ACTIVE(nats(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVE(nats(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)


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:
ACTIVE(x1) -> ACTIVE(x1)
filter(x1, x2, x3) -> filter(x1, x2, x3)
sieve(x1) -> sieve(x1)
s(x1) -> s(x1)
cons(x1, x2) -> cons(x1, x2)
nats(x1) -> nats(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
           →DP Problem 14
Dependency Graph
       →DP Problem 7
AFS
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
Argument Filtering and Ordering
       →DP Problem 8
Remaining


Dependency Pairs:

PROPER(nats(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X1)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(nats(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X1)


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:
PROPER(x1) -> PROPER(x1)
filter(x1, x2, x3) -> filter(x1, x2, x3)
nats(x1) -> nats(x1)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
sieve(x1) -> sieve(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
           →DP Problem 15
Dependency Graph
       →DP Problem 8
Remaining


Dependency Pair:


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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




The following remains to be proven:
Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost



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