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

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

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

(2) Obligation:

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

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

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

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 12 SCCs with 38 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(ok(X1), ok(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))))
active(sieve(X)) → sieve(active(X))
active(from(X)) → from(active(X))
active(s(X)) → s(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(head(X)) → head(active(X))
active(tail(X)) → tail(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(filter(X1, X2)) → filter(active(X1), X2)
active(filter(X1, X2)) → filter(X1, active(X2))
active(divides(X1, X2)) → divides(active(X1), X2)
active(divides(X1, X2)) → divides(X1, active(X2))
sieve(mark(X)) → mark(sieve(X))
from(mark(X)) → mark(from(X))
s(mark(X)) → mark(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
head(mark(X)) → mark(head(X))
tail(mark(X)) → mark(tail(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
filter(mark(X1), X2) → mark(filter(X1, X2))
filter(X1, mark(X2)) → mark(filter(X1, X2))
divides(mark(X1), X2) → mark(divides(X1, X2))
divides(X1, mark(X2)) → mark(divides(X1, X2))
proper(primes) → ok(primes)
proper(sieve(X)) → sieve(proper(X))
proper(from(X)) → from(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(tail(X)) → tail(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(true) → ok(true)
proper(false) → ok(false)
proper(filter(X1, X2)) → filter(proper(X1), proper(X2))
proper(divides(X1, X2)) → divides(proper(X1), proper(X2))
sieve(ok(X)) → ok(sieve(X))
from(ok(X)) → ok(from(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
head(ok(X)) → ok(head(X))
tail(ok(X)) → ok(tail(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
filter(ok(X1), ok(X2)) → ok(filter(X1, X2))
divides(ok(X1), ok(X2)) → ok(divides(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
proper1 > [active1, sieve1, filter2] > [cons2, if3, divides2] > [mark1, primes, false] > 0
proper1 > true
top > [active1, sieve1, filter2] > [cons2, if3, divides2] > [mark1, primes, false] > 0

Status:
DIVIDES2: [2,1]
true: []
mark1: [1]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
proper1: [1]
divides2: [1,2]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

(7) Obligation:

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

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

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[false, proper1] > primes > [active1, sieve1, divides2] > [ok1, head1, tail1] > mark
[false, proper1] > 0 > [ok1, head1, tail1] > mark
[false, proper1] > [cons1, if1] > [active1, sieve1, divides2] > [ok1, head1, tail1] > mark
[false, proper1] > true > mark
top > [active1, sieve1, divides2] > [ok1, head1, tail1] > mark

Status:
tail1: [1]
cons1: [1]
true: []
head1: [1]
ok1: [1]
0: []
primes: []
active1: [1]
if1: [1]
mark: []
false: []
divides2: [2,1]
proper1: [1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

(9) Obligation:

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

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

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

(10) PisEmptyProof (EQUIVALENT transformation)

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

(11) TRUE

(12) Obligation:

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

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

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
active1 > 0
active1 > head1 > mark1
active1 > if3 > mark1
active1 > filter2 > cons2 > s1 > divides2 > mark1
primes > mark1
true > mark1
false > mark1

Status:
true: []
head1: [1]
mark1: [1]
0: []
FILTER1: [1]
primes: []
cons2: [1,2]
active1: [1]
if3: [1,3,2]
filter2: [2,1]
false: []
s1: [1]
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(14) Obligation:

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

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

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
primes > [active1, from1, if3, divides2] > tail1 > [mark1, top]
primes > [active1, from1, if3, divides2] > filter2 > [sieve1, s1, cons2] > [mark1, top]
primes > 0
false > [mark1, top]
proper1 > [active1, from1, if3, divides2] > tail1 > [mark1, top]
proper1 > [active1, from1, if3, divides2] > filter2 > [sieve1, s1, cons2] > [mark1, top]
proper1 > true > [mark1, top]

Status:
from1: [1]
tail1: [1]
true: []
mark1: [1]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [3,1,2]
filter2: [1,2]
false: []
s1: [1]
divides2: [1,2]
proper1: [1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

(16) Obligation:

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

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

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(ok(X1), ok(X2)) → FILTER(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FILTER(x1, x2)  =  FILTER(x1)
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
primes  =  primes
mark(x1)  =  mark
sieve(x1)  =  sieve(x1)
from(x1)  =  x1
s(x1)  =  x1
0  =  0
cons(x1, x2)  =  x1
head(x1)  =  x1
tail(x1)  =  tail(x1)
if(x1, x2, x3)  =  if(x3)
true  =  true
false  =  false
filter(x1, x2)  =  x1
divides(x1, x2)  =  x1
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
FILTER1 > mark
false > [ok1, sieve1, tail1, if1, proper1] > primes > mark
false > [ok1, sieve1, tail1, if1, proper1] > 0 > mark
false > [ok1, sieve1, tail1, if1, proper1] > true > mark
top > active1 > [ok1, sieve1, tail1, if1, proper1] > primes > mark
top > active1 > [ok1, sieve1, tail1, if1, proper1] > 0 > mark
top > active1 > [ok1, sieve1, tail1, if1, proper1] > true > mark

Status:
tail1: [1]
true: []
ok1: [1]
0: []
FILTER1: [1]
primes: []
active1: [1]
if1: [1]
mark: []
false: []
proper1: [1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(19) PisEmptyProof (EQUIVALENT transformation)

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

(20) TRUE

(21) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, primes, from1, filter2] > 0
[active1, primes, from1, filter2] > [cons2, if3, divides2] > [IF3, mark1, false]

Status:
from1: [1]
true: []
mark1: [1]
IF3: [1,2,3]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [1,3,2]
filter2: [2,1]
false: []
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(23) Obligation:

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

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

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(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
IF(x1, x2, x3)  =  IF(x2, x3)
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
primes  =  primes
mark(x1)  =  mark
sieve(x1)  =  x1
from(x1)  =  from(x1)
s(x1)  =  s(x1)
0  =  0
cons(x1, x2)  =  x2
head(x1)  =  x1
tail(x1)  =  x1
if(x1, x2, x3)  =  x3
true  =  true
false  =  false
filter(x1, x2)  =  filter(x1)
divides(x1, x2)  =  divides(x2)
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, active1, from1, s1, filter1, divides1, proper1] > true > [IF2, mark]
[primes, 0] > [ok1, active1, from1, s1, filter1, divides1, proper1] > false > [IF2, mark]
[primes, 0] > [ok1, active1, from1, s1, filter1, divides1, proper1] > top > [IF2, mark]

Status:
from1: [1]
filter1: [1]
true: []
ok1: [1]
divides1: [1]
0: []
primes: []
active1: [1]
mark: []
false: []
s1: [1]
proper1: [1]
top: []
IF2: [1,2]


The following usable rules [FROCOS05] were oriented:

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

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

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

(26) PisEmptyProof (EQUIVALENT transformation)

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

(27) TRUE

(28) Obligation:

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

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

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

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, s1]
false > [ok1, s1]
top > active1 > cons2 > if3 > [ok1, s1]
top > proper1 > cons2 > if3 > [ok1, s1]
top > proper1 > true

Status:
true: []
ok1: [1]
0: []
primes: []
active1: [1]
cons2: [2,1]
if3: [2,3,1]
false: []
s1: [1]
proper1: [1]
TAIL1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > 0 > [primes, if3, filter2, ok] > s1 > mark1
[active1, top] > [divides2, proper1] > cons2 > [primes, if3, filter2, ok] > s1 > mark1
true > [primes, if3, filter2, ok] > s1 > mark1
false > [primes, if3, filter2, ok] > s1 > mark1

Status:
true: []
mark1: [1]
0: []
primes: []
cons2: [1,2]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
s1: [1]
ok: []
proper1: [1]
divides2: [2,1]
TAIL1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(33) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

(35) Obligation:

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

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

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

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, s1]
false > [ok1, s1]
top > active1 > cons2 > if3 > [ok1, s1]
top > proper1 > cons2 > if3 > [ok1, s1]
top > proper1 > true

Status:
true: []
ok1: [1]
0: []
HEAD1: [1]
primes: []
active1: [1]
cons2: [2,1]
if3: [2,3,1]
false: []
s1: [1]
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > 0 > [primes, if3, filter2, ok] > s1 > mark1
[active1, top] > [divides2, proper1] > cons2 > [primes, if3, filter2, ok] > s1 > mark1
true > [primes, if3, filter2, ok] > s1 > mark1
false > [primes, if3, filter2, ok] > s1 > mark1

Status:
true: []
mark1: [1]
0: []
HEAD1: [1]
primes: []
cons2: [1,2]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
s1: [1]
ok: []
proper1: [1]
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(40) PisEmptyProof (EQUIVALENT transformation)

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

(41) TRUE

(42) Obligation:

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

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

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
primes > [active1, 0] > [cons2, filter2] > [CONS2, ok1] > top
primes > [active1, 0] > if3 > [CONS2, ok1] > top
false > [CONS2, ok1] > top
proper1 > [active1, 0] > [cons2, filter2] > [CONS2, ok1] > top
proper1 > [active1, 0] > if3 > [CONS2, ok1] > top
proper1 > true

Status:
true: []
ok1: [1]
0: []
primes: []
active1: [1]
cons2: [1,2]
if3: [1,2,3]
CONS2: [2,1]
filter2: [2,1]
false: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(44) Obligation:

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

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

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

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
primes > 0 > [active1, sieve1, if3, false, ok] > [cons2, filter2, divides2] > [mark1, from1, top]
true > [active1, sieve1, if3, false, ok] > [cons2, filter2, divides2] > [mark1, from1, top]

Status:
from1: [1]
true: []
mark1: [1]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [2,1,3]
filter2: [2,1]
CONS2: [1,2]
false: []
ok: []
divides2: [2,1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(47) PisEmptyProof (EQUIVALENT transformation)

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

(48) TRUE

(49) Obligation:

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

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

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

(50) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, s1]
false > [ok1, s1]
top > active1 > cons2 > if3 > [ok1, s1]
top > proper1 > cons2 > if3 > [ok1, s1]
top > proper1 > true

Status:
true: []
ok1: [1]
0: []
primes: []
active1: [1]
cons2: [2,1]
if3: [2,3,1]
false: []
s1: [1]
proper1: [1]
top: []
S1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(52) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > 0 > [primes, if3, filter2, ok] > s1 > mark1
[active1, top] > [divides2, proper1] > cons2 > [primes, if3, filter2, ok] > s1 > mark1
true > [primes, if3, filter2, ok] > s1 > mark1
false > [primes, if3, filter2, ok] > s1 > mark1

Status:
true: []
mark1: [1]
0: []
primes: []
cons2: [1,2]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
s1: [1]
ok: []
proper1: [1]
divides2: [2,1]
top: []
S1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(54) PisEmptyProof (EQUIVALENT transformation)

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

(55) TRUE

(56) Obligation:

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

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

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

(57) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, s1]
false > [ok1, s1]
top > active1 > cons2 > if3 > [ok1, s1]
top > proper1 > cons2 > if3 > [ok1, s1]
top > proper1 > true

Status:
true: []
ok1: [1]
0: []
FROM1: [1]
primes: []
active1: [1]
cons2: [2,1]
if3: [2,3,1]
false: []
s1: [1]
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > 0 > [primes, if3, filter2, ok] > s1 > mark1
[active1, top] > [divides2, proper1] > cons2 > [primes, if3, filter2, ok] > s1 > mark1
true > [primes, if3, filter2, ok] > s1 > mark1
false > [primes, if3, filter2, ok] > s1 > mark1

Status:
true: []
mark1: [1]
0: []
primes: []
FROM1: [1]
cons2: [1,2]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
s1: [1]
ok: []
proper1: [1]
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(60) Obligation:

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

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

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

(61) PisEmptyProof (EQUIVALENT transformation)

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

(62) TRUE

(63) Obligation:

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

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

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

(64) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > [ok1, s1]
false > [ok1, s1]
top > active1 > cons2 > if3 > [ok1, s1]
top > proper1 > cons2 > if3 > [ok1, s1]
top > proper1 > true

Status:
SIEVE1: [1]
true: []
ok1: [1]
0: []
primes: []
active1: [1]
cons2: [2,1]
if3: [2,3,1]
false: []
s1: [1]
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

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

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

(66) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, top] > 0 > [primes, if3, filter2, ok] > s1 > mark1
[active1, top] > [divides2, proper1] > cons2 > [primes, if3, filter2, ok] > s1 > mark1
true > [primes, if3, filter2, ok] > s1 > mark1
false > [primes, if3, filter2, ok] > s1 > mark1

Status:
SIEVE1: [1]
true: []
mark1: [1]
0: []
primes: []
cons2: [1,2]
active1: [1]
if3: [1,2,3]
filter2: [1,2]
false: []
s1: [1]
ok: []
proper1: [1]
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(67) Obligation:

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

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

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

(68) PisEmptyProof (EQUIVALENT transformation)

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

(69) TRUE

(70) Obligation:

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

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

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

(71) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [mark1, true]
[active1, top] > from1 > [mark1, true]
[active1, top] > cons2 > [if3, filter2] > [mark1, true]
[active1, top] > cons2 > divides2 > [mark1, true]
[active1, top] > 0 > [mark1, true]
primes > from1 > [mark1, true]
primes > 0 > [mark1, true]
false > [mark1, true]

Status:
from1: [1]
PROPER1: [1]
true: []
mark1: [1]
0: []
primes: []
active1: [1]
cons2: [1,2]
if3: [2,3,1]
filter2: [1,2]
false: []
divides2: [2,1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(72) Obligation:

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

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

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

(73) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
primes > [sieve1, cons2] > divides2 > [true, ok1] > mark
0 > [true, ok1] > mark
false > [true, ok1] > mark
top > proper1 > [sieve1, cons2] > divides2 > [true, ok1] > mark

Status:
cons2: [1,2]
true: []
mark: []
false: []
ok1: [1]
divides2: [2,1]
proper1: [1]
top: []
0: []
sieve1: [1]
primes: []


The following usable rules [FROCOS05] were oriented:

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

(74) Obligation:

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

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

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

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
sieve > active1 > tail1 > [mark, if]
sieve > active1 > [primes, 0]
sieve > active1 > [cons, filter2] > [mark, if]
sieve > active1 > divides2 > [mark, if]
true > [mark, if]
false > [mark, if]
top > active1 > tail1 > [mark, if]
top > active1 > [primes, 0]
top > active1 > [cons, filter2] > [mark, if]
top > active1 > divides2 > [mark, if]

Status:
PROPER1: [1]
tail1: [1]
if: []
true: []
0: []
sieve: []
primes: []
active1: [1]
cons: []
filter2: [2,1]
mark: []
false: []
divides2: [1,2]
top: []


The following usable rules [FROCOS05] were oriented:

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

(76) Obligation:

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

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

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

(77) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [mark, cons, true, false]
head1 > [mark, cons, true, false]
primes > sieve1 > [mark, cons, true, false]
primes > from > [mark, cons, true, false]
0 > [mark, cons, true, false]
tail > [mark, cons, true, false]
filter2 > sieve1 > [mark, cons, true, false]
filter2 > if3 > [mark, cons, true, false]
filter2 > divides2 > [mark, cons, true, false]
top > [mark, cons, true, false]

Status:
PROPER1: [1]
true: []
head1: [1]
0: []
primes: []
from: []
tail: []
if3: [2,3,1]
cons: []
filter2: [1,2]
mark: []
false: []
divides2: [2,1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

(78) Obligation:

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

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

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.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > head1
active1 > [sieve1, proper1, top] > s1 > [if3, filter2] > cons2 > head1
active1 > [sieve1, proper1, top] > primes > 0 > head1
active1 > [sieve1, proper1, top] > tail1 > head1
active1 > [sieve1, proper1, top] > true > head1
active1 > [sieve1, proper1, top] > divides2 > head1
false > head1

Status:
PROPER1: [1]
tail1: [1]
true: []
head1: [1]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [2,1,3]
filter2: [2,1]
false: []
s1: [1]
divides2: [2,1]
proper1: [1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(81) PisEmptyProof (EQUIVALENT transformation)

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

(82) TRUE

(83) Obligation:

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

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

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

(84) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
ACTIVE1 > [mark, false]
filter2 > cons2 > divides2 > [mark, false]
primes > [mark, false]
0 > [mark, false]
true > [mark, false]
top > [mark, false]

Status:
cons2: [1,2]
filter2: [2,1]
true: []
mark: []
false: []
divides2: [2,1]
top: []
0: []
ACTIVE1: [1]
primes: []


The following usable rules [FROCOS05] were oriented:

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

(85) Obligation:

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

ACTIVE(from(X)) → ACTIVE(X)
ACTIVE(sieve(X)) → ACTIVE(X)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(head(X)) → ACTIVE(X)
ACTIVE(tail(X)) → ACTIVE(X)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)

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

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

(86) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
ACTIVE1 > [head1, mark, filter2, divides1, proper1]
0 > [primes, ok] > [head1, mark, filter2, divides1, proper1]
true > [primes, ok] > [head1, mark, filter2, divides1, proper1]
false > [primes, ok] > [head1, mark, filter2, divides1, proper1]
top > [head1, mark, filter2, divides1, proper1]

Status:
head1: [1]
true: []
divides1: [1]
0: []
ACTIVE1: [1]
primes: []
filter2: [1,2]
mark: []
false: []
ok: []
proper1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(87) Obligation:

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

ACTIVE(from(X)) → ACTIVE(X)
ACTIVE(sieve(X)) → ACTIVE(X)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(tail(X)) → ACTIVE(X)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)

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

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

(88) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[primes, 0] > s1 > [from1, cons2]
top > [if3, active1, filter1] > s1 > [from1, cons2]
top > [if3, active1, filter1] > tail1
top > [if3, active1, filter1] > head1

Status:
from1: [1]
tail1: [1]
filter1: [1]
true: []
head1: [1]
0: []
primes: []
cons2: [2,1]
active1: [1]
if3: [3,2,1]
false: []
s1: [1]
top: []


The following usable rules [FROCOS05] were oriented:

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

(89) Obligation:

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

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

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

(90) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
primes > [sieve1, active1, filter1, proper1] > [cons2, if2] > [s1, head1, tail1, ok1]
primes > [sieve1, active1, filter1, proper1] > true > [s1, head1, tail1, ok1]
primes > 0 > [s1, head1, tail1, ok1]
false > [s1, head1, tail1, ok1]

Status:
tail1: [1]
if2: [2,1]
filter1: [1]
true: []
head1: [1]
ok1: [1]
0: []
ACTIVE1: [1]
primes: []
cons2: [1,2]
active1: [1]
false: []
s1: [1]
proper1: [1]
top: []
sieve1: [1]


The following usable rules [FROCOS05] were oriented:

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

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

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

(92) PisEmptyProof (EQUIVALENT transformation)

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

(93) TRUE

(94) Obligation:

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

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

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