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

Recursive path order with status [RPO].
Quasi-Precedence:
[DIVIDES1, mark1]

Status:
DIVIDES1: multiset
mark1: multiset


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

(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)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
DIVIDES(x1, x2)  =  DIVIDES(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > DIVIDES2

Status:
DIVIDES2: multiset
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

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.

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
active1: multiset


The following usable rules [FROCOS05] were oriented: none

(11) Obligation:

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

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.

(12) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[DIVIDES1, active1]

Status:
active1: [1]
DIVIDES1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(14) PisEmptyProof (EQUIVALENT transformation)

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

(15) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[FILTER1, mark1]

Status:
mark1: multiset
FILTER1: multiset


The following usable rules [FROCOS05] were oriented: none

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > FILTER2

Status:
mark1: [1]
FILTER2: multiset


The following usable rules [FROCOS05] were oriented: none

(20) Obligation:

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

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.

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
active1: multiset


The following usable rules [FROCOS05] were oriented: none

(22) Obligation:

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

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.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[FILTER1, active1]

Status:
active1: [1]
FILTER1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(25) PisEmptyProof (EQUIVALENT transformation)

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

(26) TRUE

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

(28) 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(mark(X1), X2, X3) → IF(X1, X2, X3)
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(x1, x2, x3)
mark(x1)  =  mark(x1)
active(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
mark1: multiset
IF3: multiset


The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

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.

(30) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[IF1, active1]

Status:
active1: [1]
IF1: multiset


The following usable rules [FROCOS05] were oriented: none

(31) Obligation:

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

IF(active(X1), 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.

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

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
active1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(34) 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)  =  IF(x1)
active(x1)  =  active(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[IF1, active1]

Status:
active1: multiset
IF1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(36) PisEmptyProof (EQUIVALENT transformation)

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

(37) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[TAIL1, active1]

Status:
active1: multiset
TAIL1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(41) 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: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > TAIL1

Status:
mark1: multiset
TAIL1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(43) PisEmptyProof (EQUIVALENT transformation)

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

(44) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[HEAD1, active1]

Status:
active1: multiset
HEAD1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(48) 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: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > HEAD1

Status:
mark1: multiset
HEAD1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(50) PisEmptyProof (EQUIVALENT transformation)

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

(51) TRUE

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

(53) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[CONS1, mark1]

Status:
CONS1: multiset
mark1: multiset


The following usable rules [FROCOS05] were oriented: none

(54) Obligation:

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

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

The TRS R consists of the following rules:

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

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > CONS2

Status:
CONS2: multiset
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(56) Obligation:

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

CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

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

(57) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
active1: multiset


The following usable rules [FROCOS05] were oriented: none

(58) Obligation:

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

CONS(active(X1), X2) → CONS(X1, X2)

The TRS R consists of the following rules:

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[CONS1, active1]

Status:
active1: [1]
CONS1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(61) PisEmptyProof (EQUIVALENT transformation)

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

(62) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[S1, active1]

Status:
active1: multiset
S1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(66) 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: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > S1

Status:
mark1: multiset
S1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(68) PisEmptyProof (EQUIVALENT transformation)

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

(69) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[FROM1, active1]

Status:
active1: multiset
FROM1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(73) 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: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > FROM1

Status:
mark1: multiset
FROM1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(75) PisEmptyProof (EQUIVALENT transformation)

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

(76) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
[SIEVE1, active1]

Status:
SIEVE1: multiset
active1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(80) 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: Recursive path order with status [RPO].
Quasi-Precedence:
mark1 > SIEVE1

Status:
SIEVE1: multiset
mark1: multiset


The following usable rules [FROCOS05] were oriented: none

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

(82) PisEmptyProof (EQUIVALENT transformation)

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

(83) TRUE

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

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

Recursive path order with status [RPO].
Quasi-Precedence:
active > [MARK, sieve, from, s, primes, head, tail, if, true, false, filter, divides] > [mark1, cons, 0]

Status:
active: multiset
MARK: []
if: []
true: multiset
mark1: multiset
s: []
0: multiset
sieve: []
filter: []
primes: multiset
from: []
tail: []
cons: []
head: []
false: multiset
divides: []


The following usable rules [FROCOS05] were oriented:

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

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

(87) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(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
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 with status [RPO].
Quasi-Precedence:
[MARK, sieve, from, primes, 0, head, tail, if, false, filter, active1] > [s, divides] > [mark, true] > cons

Status:
MARK: []
if: []
true: multiset
s: []
0: multiset
sieve: []
filter: []
primes: multiset
from: []
tail: []
active1: multiset
cons: multiset
head: []
mark: multiset
false: multiset
divides: []


The following usable rules [FROCOS05] were oriented:

sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
from(active(X)) → from(X)
from(mark(X)) → from(X)
head(active(X)) → head(X)
head(mark(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
filter(active(X1), X2) → filter(X1, X2)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)

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