(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
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x2
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[ok1, active1, nats1, zprimes, proper1] > NATS1
[ok1, active1, nats1, zprimes, proper1] > 0
[ok1, active1, nats1, zprimes, proper1] > top

Status:
NATS1: [1]
ok1: [1]
active1: [1]
0: []
nats1: [1]
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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: Combined order from the following AFS and order.
NATS(x1)  =  NATS(x1)
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
zprimes > [NATS1, mark1]
zprimes > [0, ok]
top > [active1, filter3, proper1] > cons2 > [NATS1, mark1]
top > [active1, filter3, proper1] > cons2 > [0, ok]

Status:
NATS1: [1]
mark1: [1]
active1: [1]
filter3: [2,3,1]
cons2: [1,2]
0: []
zprimes: []
proper1: [1]
ok: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x2
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[ok1, active1, nats1, zprimes, proper1] > SIEVE1
[ok1, active1, nats1, zprimes, proper1] > 0
[ok1, active1, nats1, zprimes, proper1] > top

Status:
SIEVE1: [1]
ok1: [1]
active1: [1]
0: []
nats1: [1]
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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: Combined order from the following AFS and order.
SIEVE(x1)  =  SIEVE(x1)
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
zprimes > [SIEVE1, mark1]
zprimes > [0, ok]
top > [active1, filter3, proper1] > cons2 > [SIEVE1, mark1]
top > [active1, filter3, proper1] > cons2 > [0, ok]

Status:
SIEVE1: [1]
mark1: [1]
active1: [1]
filter3: [2,3,1]
cons2: [1,2]
0: []
zprimes: []
proper1: [1]
ok: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x2
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[ok1, active1, nats1, zprimes, proper1] > S1
[ok1, active1, nats1, zprimes, proper1] > 0
[ok1, active1, nats1, zprimes, proper1] > top

Status:
S1: [1]
ok1: [1]
active1: [1]
0: []
nats1: [1]
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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: Combined order from the following AFS and order.
S(x1)  =  S(x1)
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
zprimes > [S1, mark1]
zprimes > [0, ok]
top > [active1, filter3, proper1] > cons2 > [S1, mark1]
top > [active1, filter3, proper1] > cons2 > [0, ok]

Status:
S1: [1]
mark1: [1]
active1: [1]
filter3: [2,3,1]
cons2: [1,2]
0: []
zprimes: []
proper1: [1]
ok: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x3)
cons(x1, x2)  =  cons(x2)
0  =  0
s(x1)  =  s(x1)
sieve(x1)  =  sieve(x1)
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
zprimes > [active1, 0] > [mark, filter1, cons1, s1, proper1] > [CONS1, ok1, sieve1, nats1]
top > [active1, 0] > [mark, filter1, cons1, s1, proper1] > [CONS1, ok1, sieve1, nats1]

Status:
CONS1: [1]
ok1: [1]
mark: []
active1: [1]
filter1: [1]
cons1: [1]
0: []
s1: [1]
sieve1: [1]
nats1: [1]
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  s(x1)
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
active1 > [cons2, 0] > [s1, nats1] > filter3 > mark1
zprimes > [cons2, 0] > [s1, nats1] > filter3 > mark1

Status:
mark1: [1]
active1: [1]
filter3: [3,1,2]
cons2: [1,2]
0: []
s1: [1]
nats1: [1]
zprimes: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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, 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(x3)
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
s(x1)  =  x1
sieve(x1)  =  sieve(x1)
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
FILTER1 > 0
top > [active1, filter3, sieve1, zprimes] > cons2 > mark1 > 0

Status:
FILTER1: [1]
mark1: [1]
active1: [1]
filter3: [1,2,3]
cons2: [1,2]
0: []
sieve1: [1]
zprimes: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(35) 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(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, mark(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)  =  x2
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  x1
0  =  0
s(x1)  =  x1
sieve(x1)  =  sieve(x1)
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  x1
top(x1)  =  x1

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

Status:
mark1: [1]
filter3: [2,3,1]
0: []
sieve1: [1]
nats1: [1]
zprimes: []


The following usable rules [FROCOS05] were oriented:

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))

(37) Obligation:

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

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

(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)
mark(x1)  =  mark
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x2)
cons(x1, x2)  =  cons(x1)
0  =  0
s(x1)  =  x1
sieve(x1)  =  sieve(x1)
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[mark, active1, filter1, 0, sieve1, zprimes, proper1] > cons1 > ok1 > [FILTER1, top]

Status:
FILTER1: [1]
mark: []
ok1: [1]
active1: [1]
filter1: [1]
cons1: [1]
0: []
sieve1: [1]
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(39) Obligation:

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

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

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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)
mark(x1)  =  mark(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  x1
0  =  0
s(x1)  =  s(x1)
sieve(x1)  =  sieve(x1)
nats(x1)  =  nats(x1)
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
FILTER1 > [mark1, 0]
zprimes > s1 > sieve1 > filter3 > [mark1, 0]
zprimes > nats1 > [mark1, 0]
top1 > [mark1, 0]

Status:
FILTER1: [1]
mark1: [1]
filter3: [3,1,2]
0: []
s1: [1]
sieve1: [1]
nats1: [1]
zprimes: []
top1: [1]


The following usable rules [FROCOS05] were oriented:

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))

(41) 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.

(42) PisEmptyProof (EQUIVALENT transformation)

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

(43) TRUE

(44) 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.

(45) 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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
active(x1)  =  active(x1)
0  =  0
mark(x1)  =  mark
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > mark > [filter3, cons2, 0]
[active1, top] > proper1 > [filter3, cons2, 0]
zprimes > mark > [filter3, cons2, 0]

Status:
filter3: [3,1,2]
cons2: [2,1]
active1: [1]
0: []
mark: []
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(46) Obligation:

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

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.

(47) 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)  =  x1
s(x1)  =  s(x1)
sieve(x1)  =  x1
nats(x1)  =  x1
active(x1)  =  x1
filter(x1, x2, x3)  =  filter
cons(x1, x2)  =  cons
0  =  0
mark(x1)  =  mark
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[s1, zprimes] > 0 > filter > cons > mark
top > mark

Status:
s1: [1]
filter: []
cons: []
0: []
mark: []
zprimes: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(48) Obligation:

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

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.

(49) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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)
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  cons(x1)
0  =  0
mark(x1)  =  x1
s(x1)  =  s
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [cons1, 0, s]
zprimes > [nats1, proper1] > [cons1, 0, s]
top > [nats1, proper1] > [cons1, 0, s]

Status:
PROPER1: [1]
nats1: [1]
cons1: [1]
0: []
s: []
zprimes: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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))

(50) 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.

(51) 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: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
sieve(x1)  =  sieve(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x2
0  =  0
mark(x1)  =  x1
s(x1)  =  s(x1)
nats(x1)  =  nats
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
0 > [sieve1, s1, nats] > PROPER1
zprimes > [sieve1, s1, nats] > PROPER1

Status:
PROPER1: [1]
sieve1: [1]
0: []
s1: [1]
nats: []
zprimes: []
top1: [1]


The following usable rules [FROCOS05] were oriented:

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))

(52) 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.

(53) PisEmptyProof (EQUIVALENT transformation)

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

(54) TRUE

(55) 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.

(56) 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(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
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)  =  cons(x1)
s(x1)  =  s(x1)
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
active(x1)  =  x1
0  =  0
mark(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
[ACTIVE1, filter3] > 0 > cons1
zprimes > [s1, nats1] > cons1
zprimes > 0 > cons1

Status:
ACTIVE1: [1]
filter3: [3,1,2]
cons1: [1]
s1: [1]
nats1: [1]
0: []
zprimes: []
top1: [1]


The following usable rules [FROCOS05] were oriented:

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))

(57) Obligation:

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

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.

(58) 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)
sieve(x1)  =  sieve(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x2
0  =  0
mark(x1)  =  x1
s(x1)  =  s(x1)
nats(x1)  =  nats
zprimes  =  zprimes
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
0 > [sieve1, s1, nats] > ACTIVE1
zprimes > [sieve1, s1, nats] > ACTIVE1

Status:
ACTIVE1: [1]
sieve1: [1]
0: []
s1: [1]
nats: []
zprimes: []
top1: [1]


The following usable rules [FROCOS05] were oriented:

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))

(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)  =  x1
ok(x1)  =  x1
active(x1)  =  x1
mark(x1)  =  mark(x1)
proper(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1)
0  =  0
s(x1)  =  x1
sieve(x1)  =  sieve(x1)
nats(x1)  =  nats(x1)
zprimes  =  zprimes
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
filter3 > [cons1, sieve1] > [mark1, 0]
zprimes > nats1 > [cons1, sieve1] > [mark1, 0]

Status:
mark1: [1]
filter3: [3,1,2]
cons1: [1]
0: []
sieve1: [1]
nats1: [1]
zprimes: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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)  =  active(x1)
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  x1
0  =  0
mark(x1)  =  x1
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
TOP1 > [active1, 0]
top > proper > ok1 > [active1, 0]
top > proper > zprimes

Status:
TOP1: [1]
ok1: [1]
active1: [1]
0: []
zprimes: []
proper: []
top: []


The following usable rules [FROCOS05] were oriented:

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))

(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