(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(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)  =  x1
ok(x1)  =  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)  =  sieve(x1)
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  x1
top(x1)  =  top

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

Status:
active1: [1]
cons2: [2,1]
filter3: [2,1,3]
mark1: [1]
s1: [1]
top: []
0: []
sieve1: [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))

(7) Obligation:

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

NATS(ok(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(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)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
mark(x1)  =  mark(x1)
s(x1)  =  s(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:
[active1, proper1, top] > [cons2, 0, s1, zprimes] > filter3 > [ok1, mark1, sieve1]

Status:
active1: [1]
cons2: [1,2]
filter3: [2,1,3]
ok1: [1]
mark1: [1]
s1: [1]
proper1: [1]
top: []
0: []
sieve1: [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))

(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(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)  =  x1
ok(x1)  =  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)  =  sieve(x1)
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  x1
top(x1)  =  top

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

Status:
active1: [1]
cons2: [2,1]
filter3: [2,1,3]
mark1: [1]
s1: [1]
top: []
0: []
sieve1: [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))

(14) Obligation:

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

SIEVE(ok(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(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)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
mark(x1)  =  mark(x1)
s(x1)  =  s(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:
[active1, proper1, top] > [cons2, 0, s1, zprimes] > filter3 > [ok1, mark1, sieve1]

Status:
active1: [1]
cons2: [1,2]
filter3: [2,1,3]
ok1: [1]
mark1: [1]
s1: [1]
proper1: [1]
top: []
0: []
sieve1: [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))

(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(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)  =  x1
ok(x1)  =  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)  =  sieve(x1)
nats(x1)  =  x1
zprimes  =  zprimes
proper(x1)  =  x1
top(x1)  =  top

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

Status:
active1: [1]
cons2: [2,1]
filter3: [2,1,3]
mark1: [1]
s1: [1]
top: []
0: []
sieve1: [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))

(21) Obligation:

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

S(ok(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(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)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1, x2)
0  =  0
mark(x1)  =  mark(x1)
s(x1)  =  s(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:
[active1, proper1, top] > [cons2, 0, s1, zprimes] > filter3 > [ok1, mark1, sieve1]

Status:
active1: [1]
cons2: [1,2]
filter3: [2,1,3]
ok1: [1]
mark1: [1]
s1: [1]
proper1: [1]
top: []
0: []
sieve1: [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))

(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(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
ok(x1)  =  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
top(x1)  =  x1

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

Status:
filter3: [1,3,2]
nats1: [1]
mark1: [1]
s1: [1]
0: []
zprimes: []
sieve1: [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))

(28) Obligation:

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

CONS(ok(X1), ok(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(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(x1)
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  x1
cons(x1, x2)  =  cons(x2)
0  =  0
mark(x1)  =  x1
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:
active1 > [cons1, 0, proper1] > sieve1 > s1 > ok1
active1 > [cons1, 0, proper1] > nats1 > s1 > ok1
active1 > [cons1, 0, proper1] > zprimes

Status:
active1: [1]
cons1: [1]
CONS1: [1]
nats1: [1]
ok1: [1]
s1: [1]
proper1: [1]
top: []
0: []
sieve1: [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))

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

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

Status:
FILTER3: [2,1,3]
filter3: [2,3,1]
ok1: [1]
s1: [1]
proper1: [1]
top: []
0: []
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))

(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(X1, X2, mark(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)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FILTER(x1, x2, x3)  =  FILTER(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

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

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


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(X1, X2, mark(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(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)  =  x3
mark(x1)  =  mark(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)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

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

Status:
filter3: [3,2,1]
nats1: [1]
mark1: [1]
proper1: [1]
top: []
0: []
zprimes: []
sieve1: [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))

(39) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

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

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

(40) PisEmptyProof (EQUIVALENT transformation)

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

(41) TRUE

(42) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

Status:
PROPER1: [1]
cons2: [2,1]
filter3: [2,3,1]
nats1: [1]
mark: []
s1: [1]
top: []
0: []
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))

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

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

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

Status:
PROPER1: [1]
cons: []
s1: [1]
nats: []
proper1: [1]
top: []
0: []
sieve1: [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))

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

(47) PisEmptyProof (EQUIVALENT transformation)

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

(48) TRUE

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

(50) 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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(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)  =  x1
zprimes  =  zprimes
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

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

Status:
active1: [1]
cons2: [2,1]
filter3: [3,2,1]
ok: []
proper1: [1]
top: []
0: []
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))

(51) Obligation:

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

ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(sieve(X)) → ACTIVE(X)
ACTIVE(nats(X)) → ACTIVE(X)

The TRS R consists of the following rules:

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

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

(52) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

Status:
active1: [1]
proper1: [1]
top: []
0: []
zprimes: []
filter: []
sieve1: [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))

(53) Obligation:

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

ACTIVE(s(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.

(54) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

Status:
active1: [1]
cons2: [1,2]
filter3: [2,3,1]
nats1: [1]
s1: [1]
ok: []
top: []
0: []
ACTIVE1: [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))

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

(56) PisEmptyProof (EQUIVALENT transformation)

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

(57) TRUE

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

Status:
cons1: [1]
filter3: [3,2,1]
nats1: [1]
mark1: [1]
TOP1: [1]
0: []
sieve1: [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))

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

(61) 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)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  x1
filter(x1, x2, x3)  =  filter(x3)
cons(x1, x2)  =  cons(x2)
0  =  0
mark(x1)  =  mark
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:
0 > [filter1, proper1] > [ok1, cons1, nats1, zprimes] > mark
top > [filter1, proper1] > [ok1, cons1, nats1, zprimes] > mark

Status:
cons1: [1]
filter1: [1]
nats1: [1]
mark: []
ok1: [1]
proper1: [1]
top: []
0: []
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))

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

(63) PisEmptyProof (EQUIVALENT transformation)

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

(64) TRUE