(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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(primes) → MARK(sieve(from(s(s(0)))))
ACTIVE(primes) → SIEVE(from(s(s(0))))
ACTIVE(primes) → FROM(s(s(0)))
ACTIVE(primes) → S(s(0))
ACTIVE(primes) → S(0)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(from(X)) → FROM(s(X))
ACTIVE(from(X)) → S(X)
ACTIVE(head(cons(X, Y))) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → DIVIDES(s(s(X)), Y)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(s(s(X)), Z)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → CONS(Y, filter(X, sieve(Y)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(X, sieve(Y))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → SIEVE(Y)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
ACTIVE(sieve(cons(X, Y))) → CONS(X, filter(X, sieve(Y)))
ACTIVE(sieve(cons(X, Y))) → FILTER(X, sieve(Y))
ACTIVE(sieve(cons(X, Y))) → SIEVE(Y)
MARK(primes) → ACTIVE(primes)
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(sieve(X)) → SIEVE(mark(X))
MARK(sieve(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(from(X)) → FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(0) → ACTIVE(0)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(head(X)) → HEAD(mark(X))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(tail(X)) → TAIL(mark(X))
MARK(tail(X)) → MARK(X)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(true) → ACTIVE(true)
MARK(false) → ACTIVE(false)
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → FILTER(mark(X1), mark(X2))
MARK(filter(X1, X2)) → MARK(X1)
MARK(filter(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
MARK(divides(X1, X2)) → DIVIDES(mark(X1), mark(X2))
MARK(divides(X1, X2)) → MARK(X1)
MARK(divides(X1, X2)) → MARK(X2)
SIEVE(mark(X)) → SIEVE(X)
SIEVE(active(X)) → SIEVE(X)
FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)
S(mark(X)) → S(X)
S(active(X)) → S(X)
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)
HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)
TAIL(mark(X)) → TAIL(X)
TAIL(active(X)) → TAIL(X)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
FILTER(mark(X1), X2) → FILTER(X1, X2)
FILTER(X1, mark(X2)) → FILTER(X1, X2)
FILTER(active(X1), X2) → FILTER(X1, X2)
FILTER(X1, active(X2)) → FILTER(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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 10 SCCs with 28 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
mark1 > [DIVIDES1, active1]


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
mark1 > DIVIDES1
active1 > DIVIDES1


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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:

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
mark1 > [FILTER1, active1]


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
mark1 > FILTER1
active1 > FILTER1


The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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:

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(21) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
mark1 > IF1
active1 > IF1


The following usable rules [FROCOS05] were oriented: none

(23) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
mark1 > IF1
active1 > IF1


The following usable rules [FROCOS05] were oriented: none

(25) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[IF2, mark1]


The following usable rules [FROCOS05] were oriented: none

(27) Obligation:

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

IF(active(X1), X2, X3) → IF(X1, X2, X3)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(28) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(30) PisEmptyProof (EQUIVALENT transformation)

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

(31) TRUE

(32) Obligation:

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

TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(33) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(34) Obligation:

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

TAIL(mark(X)) → TAIL(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(36) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(37) PisEmptyProof (EQUIVALENT transformation)

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

(38) TRUE

(39) Obligation:

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

HEAD(active(X)) → HEAD(X)
HEAD(mark(X)) → HEAD(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(41) Obligation:

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

HEAD(mark(X)) → HEAD(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(42) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(43) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(44) PisEmptyProof (EQUIVALENT transformation)

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

(45) TRUE

(46) 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(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(47) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
mark1 > [CONS1, active1]


The following usable rules [FROCOS05] were oriented: none

(48) 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(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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.


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)

Recursive Path Order [RPO].
Precedence:
mark1 > CONS1
active1 > CONS1


The following usable rules [FROCOS05] were oriented: none

(50) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(51) PisEmptyProof (EQUIVALENT transformation)

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

(52) TRUE

(53) 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(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(54) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(55) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(56) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(57) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(58) PisEmptyProof (EQUIVALENT transformation)

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

(59) TRUE

(60) Obligation:

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

FROM(active(X)) → FROM(X)
FROM(mark(X)) → FROM(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(61) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(62) Obligation:

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

FROM(mark(X)) → FROM(X)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(64) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(65) PisEmptyProof (EQUIVALENT transformation)

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

(66) TRUE

(67) 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(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(68) 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)
mark(x1)  =  x1

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(69) Obligation:

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

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

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(70) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(71) Obligation:

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

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(72) PisEmptyProof (EQUIVALENT transformation)

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

(73) TRUE

(74) Obligation:

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

MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(X)) → MARK(X)
MARK(primes) → ACTIVE(primes)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(tail(X)) → MARK(X)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → MARK(X1)
MARK(filter(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
MARK(divides(X1, X2)) → MARK(X1)
MARK(divides(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[MARK, sieve, from, cons, s, primes, head, tail, if, filter] > [mark1, 0, divides, active1]
true > [mark1, 0, divides, active1]
false > [mark1, 0, divides, active1]


The following usable rules [FROCOS05] were oriented:

sieve(active(X)) → sieve(X)
sieve(mark(X)) → sieve(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
from(active(X)) → from(X)
from(mark(X)) → from(X)
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)
head(active(X)) → head(X)
head(mark(X)) → head(X)
tail(active(X)) → tail(X)
tail(mark(X)) → tail(X)
divides(X1, mark(X2)) → divides(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(mark(X1), X2) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)

(76) Obligation:

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

MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(X)) → MARK(X)
MARK(primes) → ACTIVE(primes)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(tail(X)) → MARK(X)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → MARK(X1)
MARK(filter(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → MARK(X1)
MARK(divides(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(77) 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
sieve(x1)  =  sieve
ACTIVE(x1)  =  x1
mark(x1)  =  x1
from(x1)  =  from
cons(x1, x2)  =  cons
s(x1)  =  s
primes  =  primes
0  =  0
head(x1)  =  head
tail(x1)  =  tail
if(x1, x2, x3)  =  if
true  =  true
false  =  false
filter(x1, x2)  =  filter
divides(x1, x2)  =  divides(x1, x2)
active(x1)  =  x1

Recursive Path Order [RPO].
Precedence:
[MARK, sieve, from, cons, primes, head, tail, if, filter] > 0 > [s, divides2]
true > [s, divides2]
false > [s, divides2]


The following usable rules [FROCOS05] were oriented:

sieve(active(X)) → sieve(X)
sieve(mark(X)) → sieve(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
from(active(X)) → from(X)
from(mark(X)) → from(X)
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)
head(active(X)) → head(X)
head(mark(X)) → head(X)
tail(active(X)) → tail(X)
tail(mark(X)) → tail(X)
filter(X1, mark(X2)) → filter(X1, X2)
filter(mark(X1), X2) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)

(78) Obligation:

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

MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(X)) → MARK(X)
MARK(primes) → ACTIVE(primes)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(from(X)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(tail(X)) → MARK(X)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → MARK(X1)
MARK(filter(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → MARK(X1)
MARK(divides(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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

(79) 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
sieve(x1)  =  sieve
ACTIVE(x1)  =  x1
mark(x1)  =  mark
from(x1)  =  from
cons(x1, x2)  =  cons
s(x1)  =  s
primes  =  primes
0  =  0
head(x1)  =  head
tail(x1)  =  tail
if(x1, x2, x3)  =  if
true  =  true
false  =  false
filter(x1, x2)  =  filter
divides(x1, x2)  =  divides(x1)
active(x1)  =  x1

Recursive Path Order [RPO].
Precedence:
[mark, s, 0] > [MARK, sieve, from, primes, head, tail, if, filter] > cons > divides1
[mark, s, 0] > true > divides1
[mark, s, 0] > false > divides1


The following usable rules [FROCOS05] were oriented:

sieve(active(X)) → sieve(X)
sieve(mark(X)) → sieve(X)
from(active(X)) → from(X)
from(mark(X)) → from(X)
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)
head(active(X)) → head(X)
head(mark(X)) → head(X)
tail(active(X)) → tail(X)
tail(mark(X)) → tail(X)
filter(X1, mark(X2)) → filter(X1, X2)
filter(mark(X1), X2) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)

(80) Obligation:

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

MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(X)) → MARK(X)
MARK(primes) → ACTIVE(primes)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(from(X)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(s(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(tail(X)) → MARK(X)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → MARK(X1)
MARK(filter(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → MARK(X1)
MARK(divides(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
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)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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