(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)
CONS(mark(X1), X2) → CONS(X1, X2)
S(mark(X)) → S(X)
SIEVE(mark(X)) → SIEVE(X)
NATS(mark(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)
FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
S(ok(X)) → S(X)
SIEVE(ok(X)) → SIEVE(X)
NATS(ok(X)) → NATS(X)
TOP(mark(X)) → TOP(proper(X))
TOP(mark(X)) → PROPER(X)
TOP(ok(X)) → TOP(active(X))
TOP(ok(X)) → ACTIVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 8 SCCs with 30 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

NATS(ok(X)) → NATS(X)
NATS(mark(X)) → NATS(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


NATS(ok(X)) → NATS(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
NATS(x1)  =  NATS(x1)
ok(x1)  =  ok(x1)
mark(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[NATS1, ok1]

Status:
ok1: multiset
NATS1: multiset


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

NATS(mark(X)) → NATS(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


NATS(mark(X)) → NATS(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > NATS1

Status:
mark1: multiset
NATS1: multiset


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SIEVE(ok(X)) → SIEVE(X)
SIEVE(mark(X)) → SIEVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


SIEVE(ok(X)) → SIEVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
SIEVE(x1)  =  SIEVE(x1)
ok(x1)  =  ok(x1)
mark(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[SIEVE1, ok1]

Status:
SIEVE1: multiset
ok1: multiset


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SIEVE(mark(X)) → SIEVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


SIEVE(mark(X)) → SIEVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > SIEVE1

Status:
SIEVE1: multiset
mark1: multiset


The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(17) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(18) TRUE

(19) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(20) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(ok(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  S(x1)
ok(x1)  =  ok(x1)
mark(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[S1, ok1]

Status:
ok1: multiset
S1: multiset


The following usable rules [FROCOS05] were oriented: none

(21) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(mark(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > S1

Status:
mark1: multiset
S1: multiset


The following usable rules [FROCOS05] were oriented: none

(23) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(24) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(25) TRUE

(26) Obligation:

Q DP problem:
The TRS P consists of the following rules:

CONS(ok(X1), ok(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(27) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(ok(X1), ok(X2)) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  CONS(x2)
ok(x1)  =  ok(x1)
mark(x1)  =  mark

Recursive path order with status [RPO].
Quasi-Precedence:
ok1 > CONS1
mark > CONS1

Status:
CONS1: multiset
mark: multiset
ok1: multiset


The following usable rules [FROCOS05] were oriented: none

(28) Obligation:

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(mark(X1), X2) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  CONS(x1)
mark(x1)  =  mark(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[CONS1, mark1]

Status:
CONS1: multiset
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(30) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(31) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(32) TRUE

(33) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
FILTER(mark(X1), 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)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(34) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FILTER(x1, x2, x3)  =  FILTER(x1, x2)
mark(x1)  =  mark(x1)
ok(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[FILTER2, mark1]

Status:
mark1: multiset
FILTER2: multiset


The following usable rules [FROCOS05] were oriented: none

(35) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FILTER(x1, x2, x3)  =  FILTER(x2, x3)
mark(x1)  =  mark(x1)
ok(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > FILTER2

Status:
mark1: multiset
FILTER2: [2,1]


The following usable rules [FROCOS05] were oriented: none

(37) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FILTER(x1, x2, x3)  =  FILTER(x2)
ok(x1)  =  ok(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[FILTER1, ok1]

Status:
ok1: multiset
FILTER1: multiset


The following usable rules [FROCOS05] were oriented: none

(39) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(40) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(41) TRUE

(42) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(filter(X1, X2, X3)) → PROPER(X2)
PROPER(filter(X1, X2, X3)) → PROPER(X1)
PROPER(filter(X1, X2, X3)) → PROPER(X3)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(nats(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[PROPER1, cons2]

Status:
cons2: multiset
PROPER1: [1]
filter3: multiset
nats1: multiset


The following usable rules [FROCOS05] were oriented: none

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PROPER(s(X)) → PROPER(X)
PROPER(sieve(X)) → PROPER(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(s(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
s(x1)  =  s(x1)
sieve(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[PROPER1, s1]

Status:
PROPER1: multiset
s1: multiset


The following usable rules [FROCOS05] were oriented: none

(46) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PROPER(sieve(X)) → PROPER(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(47) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(sieve(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
sieve1 > PROPER1

Status:
PROPER1: multiset
sieve1: multiset


The following usable rules [FROCOS05] were oriented: none

(48) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(49) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(50) TRUE

(51) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(52) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(filter(X1, X2, X3)) → ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X3)
ACTIVE(nats(X)) → ACTIVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  x1
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
filter3 > ACTIVE1

Status:
filter3: multiset
nats1: multiset
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(53) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(sieve(X)) → ACTIVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(54) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(sieve(X)) → ACTIVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
cons(x1, x2)  =  x1
s(x1)  =  x1
sieve(x1)  =  sieve(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
sieve1: multiset
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(55) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(56) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(cons(X1, X2)) → ACTIVE(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
cons(x1, x2)  =  cons(x1, x2)
s(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
cons2 > ACTIVE1

Status:
cons2: [2,1]
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(57) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(s(X)) → ACTIVE(X)

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(58) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(s(X)) → ACTIVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
s1 > ACTIVE1

Status:
s1: multiset
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(59) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(60) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(61) TRUE

(62) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(X))

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TOP(mark(X)) → TOP(proper(X))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TOP(x1)  =  TOP(x1)
ok(x1)  =  x1
active(x1)  =  x1
mark(x1)  =  mark(x1)
proper(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
zprimes  =  zprimes
s(x1)  =  x1
cons(x1, x2)  =  x1
0  =  0
nats(x1)  =  nats(x1)
sieve(x1)  =  sieve(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
filter3 > 0 > [mark1, sieve1]
zprimes > 0 > [mark1, sieve1]
zprimes > nats1 > [mark1, sieve1]

Status:
filter3: multiset
nats1: multiset
mark1: multiset
TOP1: [1]
0: multiset
sieve1: multiset
zprimes: multiset


The following usable rules [FROCOS05] were oriented:

filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
proper(zprimes) → ok(zprimes)
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(nats(X)) → nats(proper(X))
proper(sieve(X)) → sieve(proper(X))
nats(ok(X)) → ok(nats(X))
sieve(ok(X)) → ok(sieve(X))
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))
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)
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))

(64) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(65) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TOP(ok(X)) → TOP(active(X))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TOP(x1)  =  TOP(x1)
ok(x1)  =  ok(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  x1
s(x1)  =  x1
cons(x1, x2)  =  x1
nats(x1)  =  x1
sieve(x1)  =  x1
mark(x1)  =  x1
zprimes  =  zprimes
0  =  0

Recursive path order with status [RPO].
Quasi-Precedence:
[TOP1, ok1] > 0
zprimes > 0

Status:
ok1: [1]
TOP1: [1]
0: multiset
zprimes: multiset


The following usable rules [FROCOS05] were oriented:

filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
nats(ok(X)) → ok(nats(X))
sieve(ok(X)) → ok(sieve(X))
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))
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)
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))

(66) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(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)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(67) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(68) TRUE