Term Rewriting System R:
[X, Y, Z, X1, X2, X3]
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))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(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))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

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)
SIEVE(ok(X)) -> SIEVE(X)
FROM(mark(X)) -> FROM(X)
FROM(ok(X)) -> FROM(X)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
HEAD(mark(X)) -> HEAD(X)
HEAD(ok(X)) -> HEAD(X)
TAIL(mark(X)) -> TAIL(X)
TAIL(ok(X)) -> TAIL(X)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
FILTER(mark(X1), X2) -> FILTER(X1, X2)
FILTER(X1, mark(X2)) -> FILTER(X1, X2)
FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
DIVIDES(ok(X1), ok(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)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)

Furthermore, R contains 12 SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

SIEVE(ok(X)) -> SIEVE(X)
SIEVE(mark(X)) -> SIEVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

SIEVE(ok(X)) -> SIEVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(SIEVE(x1))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 13
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

SIEVE(mark(X)) -> SIEVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

SIEVE(mark(X)) -> SIEVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(SIEVE(x1))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 13
Polo
             ...
               →DP Problem 14
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

FROM(ok(X)) -> FROM(X)
FROM(mark(X)) -> FROM(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

FROM(ok(X)) -> FROM(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(FROM(x1))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 15
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

FROM(mark(X)) -> FROM(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

FROM(mark(X)) -> FROM(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(FROM(x1))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 15
Polo
             ...
               →DP Problem 16
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

S(ok(X)) -> S(X)
S(mark(X)) -> S(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

S(ok(X)) -> S(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(S(x1))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 17
Polynomial Ordering
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

S(mark(X)) -> S(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

S(mark(X)) -> S(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(S(x1))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 17
Polo
             ...
               →DP Problem 18
Dependency Graph
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polynomial Ordering
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  0  
  POL(ok(x1))=  1 + x1  
  POL(IF(x1, x2, x3))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 19
Polynomial Ordering
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  1 + x1  
  POL(IF(x1, x2, x3))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 19
Polo
             ...
               →DP Problem 20
Dependency Graph
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polynomial Ordering
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
FILTER(mark(X1), X2) -> FILTER(X1, X2)
FILTER(X1, mark(X2)) -> FILTER(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(FILTER(x1, x2))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 21
Polynomial Ordering
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

FILTER(mark(X1), X2) -> FILTER(X1, X2)
FILTER(X1, mark(X2)) -> FILTER(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

FILTER(mark(X1), X2) -> FILTER(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(FILTER(x1, x2))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 21
Polo
             ...
               →DP Problem 22
Polynomial Ordering
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

FILTER(X1, mark(X2)) -> FILTER(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

FILTER(X1, mark(X2)) -> FILTER(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(FILTER(x1, x2))=  x2  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 21
Polo
             ...
               →DP Problem 23
Dependency Graph
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polynomial Ordering
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

CONS(mark(X1), X2) -> CONS(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  1 + x1  
  POL(ok(x1))=  x1  
  POL(CONS(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
           →DP Problem 24
Polynomial Ordering
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(ok(x1))=  1 + x1  
  POL(CONS(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
           →DP Problem 24
Polo
             ...
               →DP Problem 25
Dependency Graph
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polynomial Ordering
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

HEAD(ok(X)) -> HEAD(X)
HEAD(mark(X)) -> HEAD(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

HEAD(ok(X)) -> HEAD(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(HEAD(x1))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
           →DP Problem 26
Polynomial Ordering
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

HEAD(mark(X)) -> HEAD(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

HEAD(mark(X)) -> HEAD(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(HEAD(x1))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
           →DP Problem 26
Polo
             ...
               →DP Problem 27
Dependency Graph
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polynomial Ordering
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

TAIL(ok(X)) -> TAIL(X)
TAIL(mark(X)) -> TAIL(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

TAIL(ok(X)) -> TAIL(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(TAIL(x1))=  x1  
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
           →DP Problem 28
Polynomial Ordering
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

TAIL(mark(X)) -> TAIL(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

TAIL(mark(X)) -> TAIL(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(TAIL(x1))=  x1  
  POL(mark(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
           →DP Problem 28
Polo
             ...
               →DP Problem 29
Dependency Graph
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polynomial Ordering
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  x1  
  POL(ok(x1))=  1 + x1  
  POL(DIVIDES(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
           →DP Problem 30
Polynomial Ordering
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  1 + x1  
  POL(DIVIDES(x1, x2))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
           →DP Problem 30
Polo
             ...
               →DP Problem 31
Polynomial Ordering
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(mark(x1))=  1 + x1  
  POL(DIVIDES(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
           →DP Problem 30
Polo
             ...
               →DP Problem 32
Dependency Graph
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
ACTIVE(divides(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
ACTIVE(divides(X1, X2)) -> ACTIVE(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(filter(x1, x2))=  x1 + x2  
  POL(if(x1, x2, x3))=  x1  
  POL(sieve(x1))=  x1  
  POL(divides(x1, x2))=  1 + x1 + x2  
  POL(cons(x1, x2))=  x1  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2)) -> ACTIVE(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(filter(x1, x2))=  1 + x1 + x2  
  POL(if(x1, x2, x3))=  x1  
  POL(sieve(x1))=  x1  
  POL(cons(x1, x2))=  x1  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 34
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(if(x1, x2, x3))=  1 + x1  
  POL(sieve(x1))=  x1  
  POL(cons(x1, x2))=  x1  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 35
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(tail(X)) -> ACTIVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(cons(x1, x2))=  x1  
  POL(tail(x1))=  1 + x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 36
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(head(X)) -> ACTIVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(cons(x1, x2))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 37
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(cons(X1, X2)) -> ACTIVE(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(cons(x1, x2))=  1 + x1  
  POL(s(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 38
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(s(X)) -> ACTIVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 39
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pairs:

ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(from(X)) -> ACTIVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  1 + x1  
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 40
Polynomial Ordering
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:

ACTIVE(sieve(X)) -> ACTIVE(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

ACTIVE(sieve(X)) -> ACTIVE(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(ACTIVE(x1))=  x1  
  POL(sieve(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 33
Polo
             ...
               →DP Problem 41
Dependency Graph
       →DP Problem 11
Polo
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(divides(X1, X2)) -> PROPER(X2)
PROPER(divides(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2)) -> PROPER(X2)
PROPER(filter(X1, X2)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(tail(X)) -> PROPER(X)
PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(divides(X1, X2)) -> PROPER(X2)
PROPER(divides(X1, X2)) -> PROPER(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(filter(x1, x2))=  x1 + x2  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(sieve(x1))=  x1  
  POL(divides(x1, x2))=  1 + x1 + x2  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(filter(X1, X2)) -> PROPER(X2)
PROPER(filter(X1, X2)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(tail(X)) -> PROPER(X)
PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(filter(X1, X2)) -> PROPER(X2)
PROPER(filter(X1, X2)) -> PROPER(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(filter(x1, x2))=  1 + x1 + x2  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 43
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(tail(X)) -> PROPER(X)
PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(if(x1, x2, x3))=  1 + x1 + x2 + x3  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tail(x1))=  x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 44
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(tail(X)) -> PROPER(X)
PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

PROPER(tail(X)) -> PROPER(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tail(x1))=  1 + x1  
  POL(s(x1))=  x1  
  POL(head(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 45
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

PROPER(head(X)) -> PROPER(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  
  POL(head(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 46
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(cons(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 47
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

PROPER(s(X)) -> PROPER(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  x1  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 48
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pairs:

PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

PROPER(from(X)) -> PROPER(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  1 + x1  
  POL(sieve(x1))=  x1  
  POL(PROPER(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 49
Polynomial Ordering
       →DP Problem 12
Remaining


Dependency Pair:

PROPER(sieve(X)) -> PROPER(X)


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

PROPER(sieve(X)) -> PROPER(X)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(sieve(x1))=  1 + x1  
  POL(PROPER(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 42
Polo
             ...
               →DP Problem 50
Dependency Graph
       →DP Problem 12
Remaining


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
       →DP Problem 12
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


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


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:05 minutes