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

Recursive Path Order [RPO].
Precedence:
zprimes > [NATS1, mark1, filter2, cons, 0, s1, sieve1, nats1]


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:
The TRS P consists of the following rules:

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.

(8) 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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
NATS(x1)  =  x1
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:
nats > [active1, mark1] > zprimes > [filter, cons, 0, s, sieve]


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)

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

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

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

Recursive Path Order [RPO].
Precedence:
zprimes > [SIEVE1, mark1, filter2, cons, 0, s1, sieve1, nats1]


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)

(14) Obligation:

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

SIEVE(active(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.

(15) 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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
SIEVE(x1)  =  x1
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:
nats > [active1, mark1] > zprimes > [filter, cons, 0, s, sieve]


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)

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

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

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

Recursive Path Order [RPO].
Precedence:
zprimes > [S1, mark1, filter2, cons, 0, s1, sieve1, nats1]


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)

(21) Obligation:

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

S(active(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.

(22) 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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  x1
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:
nats > [active1, mark1] > zprimes > [filter, cons, 0, s, sieve]


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)

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

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

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

Recursive Path Order [RPO].
Precedence:
zprimes > [CONS1, mark1, filter2, sieve1, nats1] > 0 > 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)

(28) Obligation:

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

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.

(29) 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)
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:
zprimes > [CONS1, mark1, active1, filter, 0, s, 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)

(30) Obligation:

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

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

(31) 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)
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)
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:
zprimes > [CONS1, mark1, active1, filter, 0, s, 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)

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

(33) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

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

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
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(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:
zprimes > [FILTER1, mark1, active1, filter, 0, s, 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)

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

The TRS R consists of the following rules:

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

(38) 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(X1, active(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(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:
zprimes > [FILTER2, mark1, active1, filter, 0, s, 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)

(39) Obligation:

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

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

The TRS R consists of the following rules:

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

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

(41) Obligation:

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

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

(42) PisEmptyProof (EQUIVALENT transformation)

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

(43) TRUE

(44) Obligation:

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

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.

(45) 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)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(nats(X)) → MARK(X)
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)  =  cons(x1)
0  =  0
s(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  nats(x1)
zprimes  =  zprimes
active(x1)  =  x1

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


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)

(46) 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)) → ACTIVE(cons(mark(X1), X2))
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(zprimes) → ACTIVE(zprimes)

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.

(47) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(48) Obligation:

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

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

(49) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
zprimes > [ACTIVE, cons, 0, nats1]


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)

(50) Obligation:

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

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

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

Recursive Path Order [RPO].
Precedence:
zprimes > [sieve1, s1, nats1] > [ACTIVE, cons, filter] > 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)

(52) Obligation:

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

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

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.

(53) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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


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)

(54) Obligation:

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

ACTIVE(sieve(cons(0, Y))) → MARK(cons(0, sieve(Y)))
MARK(filter(X1, X2, X3)) → ACTIVE(filter(mark(X1), mark(X2), mark(X3)))
ACTIVE(sieve(cons(s(N), Y))) → MARK(cons(s(N), sieve(filter(Y, N, N))))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(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.

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
zprimes > [sieve1, 0, s, nats1]


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)

(56) 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)) → ACTIVE(cons(mark(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.

(57) DependencyGraphProof (EQUIVALENT transformation)

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

(58) TRUE