(0) Obligation:

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

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

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

(5) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[DIVIDES1, active1]

Status:
DIVIDES1: [1]
mark1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
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)

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) TRUE

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[FILTER1, active1]

Status:
FILTER1: [1]
mark1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(21) PisEmptyProof (EQUIVALENT transformation)

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

(22) TRUE

(23) Obligation:

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

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(25) Obligation:

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

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

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(27) Obligation:

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

IF(X1, X2, mark(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, 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

Lexicographic path order with status [LPO].
Quasi-Precedence:
mark1 > IF3

Status:
IF3: [3,2,1]
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

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, X2, active(X3)) → IF(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Lexicographic path order with status [LPO].
Quasi-Precedence:
[IF3, active1]

Status:
IF3: [1,2,3]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(32) PisEmptyProof (EQUIVALENT transformation)

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

(33) TRUE

(34) Obligation:

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

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.

(35) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(37) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(39) PisEmptyProof (EQUIVALENT transformation)

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

(40) TRUE

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

(42) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(44) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(46) PisEmptyProof (EQUIVALENT transformation)

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

(47) TRUE

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

(49) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[CONS1, active1]

Status:
CONS1: [1]
mark1: [1]
active1: [1]


The following usable rules [FROCOS05] were oriented: none

(50) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(51) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(55) PisEmptyProof (EQUIVALENT transformation)

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

(56) TRUE

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

(58) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(60) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(62) PisEmptyProof (EQUIVALENT transformation)

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

(63) TRUE

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

(65) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(67) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(69) PisEmptyProof (EQUIVALENT transformation)

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

(70) TRUE

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

(72) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
active1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(74) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

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

(76) PisEmptyProof (EQUIVALENT transformation)

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

(77) TRUE

(78) Obligation:

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

MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(X)) → MARK(X)
MARK(primes) → ACTIVE(primes)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(from(X)) → MARK(X)
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.

(79) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK
sieve(x1)  =  sieve
ACTIVE(x1)  =  x1
mark(x1)  =  mark
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)

Lexicographic path order with status [LPO].
Quasi-Precedence:
[mark, active1] > [MARK, sieve, from, cons, s, primes, head, tail, if, filter] > 0
[mark, active1] > [MARK, sieve, from, cons, s, primes, head, tail, if, filter] > divides
[mark, active1] > true
[mark, active1] > false

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


The following usable rules [FROCOS05] were oriented:

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

(80) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(81) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
active1 > mark > true > [MARK, sieve, from, cons, primes, head, tail, if, filter] > 0 > [s, divides2]
active1 > mark > false > [MARK, sieve, from, cons, primes, head, tail, if, filter] > 0 > [s, divides2]

Status:
MARK: []
sieve: []
mark: []
from: []
cons: []
s: []
primes: []
0: []
head: []
tail: []
if: []
true: []
false: []
filter: []
divides2: [2,1]
active1: [1]


The following usable rules [FROCOS05] were oriented:

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

(82) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
true > [MARK, sieve, from, primes, head, tail, if, filter] > 0 > [cons, s1, divides2]
false > [MARK, sieve, from, primes, head, tail, if, filter] > 0 > [cons, s1, divides2]

Status:
MARK: []
sieve: []
from: []
cons: []
s1: [1]
primes: []
0: []
head: []
tail: []
if: []
true: []
false: []
filter: []
divides2: [2,1]


The following usable rules [FROCOS05] were oriented:

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

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