(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)))))
mark(filter(X1, X2, X3)) → active(filter(mark(X1), mark(X2), mark(X3)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(mark(X)))
mark(sieve(X)) → active(sieve(mark(X)))
mark(nats(X)) → active(nats(mark(X)))
mark(zprimes) → active(zprimes)
filter(mark(X1), X2, X3) → filter(X1, X2, X3)
filter(X1, mark(X2), X3) → filter(X1, X2, X3)
filter(X1, X2, mark(X3)) → filter(X1, X2, X3)
filter(active(X1), X2, X3) → filter(X1, X2, X3)
filter(X1, active(X2), X3) → filter(X1, X2, X3)
filter(X1, X2, active(X3)) → filter(X1, X2, X3)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
nats(mark(X)) → nats(X)
nats(active(X)) → nats(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)) → MARK(cons(0, filter(Y, M, M)))
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)) → MARK(cons(X, filter(Y, N, 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))) → MARK(cons(0, sieve(Y)))
ACTIVE(sieve(cons(0, Y))) → CONS(0, sieve(Y))
ACTIVE(sieve(cons(0, Y))) → SIEVE(Y)
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
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)) → MARK(cons(N, nats(s(N))))
ACTIVE(nats(N)) → CONS(N, nats(s(N)))
ACTIVE(nats(N)) → NATS(s(N))
ACTIVE(nats(N)) → S(N)
ACTIVE(zprimes) → MARK(sieve(nats(s(s(0)))))
ACTIVE(zprimes) → SIEVE(nats(s(s(0))))
ACTIVE(zprimes) → NATS(s(s(0)))
ACTIVE(zprimes) → S(s(0))
ACTIVE(zprimes) → S(0)
MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
MARK(filter(X1, X2, X3)) → FILTER(mark(X1), mark(X2), mark(X3))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(0) → ACTIVE(0)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(sieve(X)) → SIEVE(mark(X))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → ACTIVE(nats(mark(X)))
MARK(nats(X)) → NATS(mark(X))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → ACTIVE(zprimes)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
FILTER(active(X1), X2, X3) → FILTER(X1, X2, X3)
FILTER(X1, active(X2), X3) → FILTER(X1, X2, X3)
FILTER(X1, X2, active(X3)) → FILTER(X1, X2, X3)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
S(mark(X)) → S(X)
S(active(X)) → S(X)
SIEVE(mark(X)) → SIEVE(X)
SIEVE(active(X)) → SIEVE(X)
NATS(mark(X)) → NATS(X)
NATS(active(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)))))
mark(filter(X1, X2, X3)) → active(filter(mark(X1), mark(X2), mark(X3)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(mark(X)))
mark(sieve(X)) → active(sieve(mark(X)))
mark(nats(X)) → active(nats(mark(X)))
mark(zprimes) → active(zprimes)
filter(mark(X1), X2, X3) → filter(X1, X2, X3)
filter(X1, mark(X2), X3) → filter(X1, X2, X3)
filter(X1, X2, mark(X3)) → filter(X1, X2, X3)
filter(active(X1), X2, X3) → filter(X1, X2, X3)
filter(X1, active(X2), X3) → filter(X1, X2, X3)
filter(X1, X2, active(X3)) → filter(X1, X2, X3)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
nats(mark(X)) → nats(X)
nats(active(X)) → nats(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 6 SCCs with 22 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

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

Recursive Path Order [RPO].
Precedence:
nats > [0, s, zprimes] > sieve > [NATS1, mark1] > [active1, filter3, cons]


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

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

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

(8) PisEmptyProof (EQUIVALENT transformation)

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

(9) TRUE

(10) Obligation:

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

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

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

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
nats > [0, s, zprimes] > sieve > [SIEVE1, mark1] > [active1, filter3, cons]


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

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

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

(13) PisEmptyProof (EQUIVALENT transformation)

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

(14) TRUE

(15) Obligation:

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

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

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

(16) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
nats > [0, s, zprimes] > sieve > [S1, mark1] > [active1, filter3, cons]


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

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

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

(18) PisEmptyProof (EQUIVALENT transformation)

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

(19) TRUE

(20) Obligation:

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

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

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

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
zprimes > [mark1, filter1, sieve1, nats1] > [CONS2, 0, s1]


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

(22) Obligation:

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

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

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[s, zprimes] > [CONS1, active1, mark1] > 0 > [filter, cons, sieve, nats]


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

(24) Obligation:

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

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

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

(25) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
zprimes > [CONS1, active1, filter, mark1, nats] > sieve > s > 0


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

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

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

(27) PisEmptyProof (EQUIVALENT transformation)

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

(28) TRUE

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

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

(30) 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)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
FILTER(active(X1), X2, X3) → FILTER(X1, X2, X3)
FILTER(X1, active(X2), X3) → FILTER(X1, X2, X3)
FILTER(X1, X2, active(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)  =  mark(x1)
active(x1)  =  active(x1)
filter(x1, x2, x3)  =  filter
cons(x1, x2)  =  x2
0  =  0
s(x1)  =  s
sieve(x1)  =  sieve
nats(x1)  =  nats
zprimes  =  zprimes

Recursive Path Order [RPO].
Precedence:
[0, sieve, nats, zprimes] > [FILTER3, mark1, active1, filter, s]


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

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

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

(32) PisEmptyProof (EQUIVALENT transformation)

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

(33) TRUE

(34) Obligation:

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

MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
ACTIVE(filter(cons(X, Y), 0, M)) → MARK(cons(0, filter(Y, M, M)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(filter(cons(X, Y), s(N), M)) → MARK(cons(X, filter(Y, N, M)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(sieve(cons(0, Y))) → MARK(cons(0, sieve(Y)))
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → ACTIVE(nats(mark(X)))
ACTIVE(nats(N)) → MARK(cons(N, nats(s(N))))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → ACTIVE(zprimes)
ACTIVE(zprimes) → MARK(sieve(nats(s(s(0)))))

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

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

(35) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[MARK, filter, mark, 0, s, sieve, nats, zprimes] > cons


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

(36) Obligation:

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

MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
ACTIVE(filter(cons(X, Y), 0, M)) → MARK(cons(0, filter(Y, M, M)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
ACTIVE(filter(cons(X, Y), s(N), M)) → MARK(cons(X, filter(Y, N, M)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(sieve(cons(0, Y))) → MARK(cons(0, sieve(Y)))
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → ACTIVE(nats(mark(X)))
ACTIVE(nats(N)) → MARK(cons(N, nats(s(N))))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → ACTIVE(zprimes)
ACTIVE(zprimes) → MARK(sieve(nats(s(s(0)))))

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

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

(37) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[MARK, filter, mark, 0, sieve, nats, zprimes] > s > cons


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

(38) Obligation:

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

MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
ACTIVE(filter(cons(X, Y), 0, M)) → MARK(cons(0, filter(Y, M, M)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
ACTIVE(filter(cons(X, Y), s(N), M)) → MARK(cons(X, filter(Y, N, M)))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(sieve(cons(0, Y))) → MARK(cons(0, sieve(Y)))
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → ACTIVE(nats(mark(X)))
ACTIVE(nats(N)) → MARK(cons(N, nats(s(N))))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → ACTIVE(zprimes)
ACTIVE(zprimes) → MARK(sieve(nats(s(s(0)))))

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

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

(39) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[0, zprimes] > filter3 > [MARK1, ACTIVE1]


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

(40) Obligation:

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

MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(sieve(cons(0, Y))) → MARK(cons(0, sieve(Y)))
MARK(s(X)) → MARK(X)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → ACTIVE(nats(mark(X)))
ACTIVE(nats(N)) → MARK(cons(N, nats(s(N))))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → ACTIVE(zprimes)
ACTIVE(zprimes) → MARK(sieve(nats(s(s(0)))))

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

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

(41) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
zprimes > [filter3, sieve1, 0, s1] > [MARK1, nats1] > ACTIVE1


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

(42) Obligation:

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

MARK(cons(X1, X2)) → MARK(X1)

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


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

Recursive Path Order [RPO].
Precedence:
0 > filter3 > [MARK1, cons1] > s
zprimes > nats1 > [MARK1, cons1] > s


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

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

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

(45) PisEmptyProof (EQUIVALENT transformation)

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

(46) TRUE