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
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 13
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
  2. FILTER(mark(X1), X2) -> FILTER(X1, X2)
  3. FILTER(X1, mark(X2)) -> FILTER(X1, X2)
and get the following Size-Change Graph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2
{1, 2, 3} , {1, 2, 3}
1=1
2>2

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1=1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 14
Size-Change Principle
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. CONS(mark(X1), X2) -> CONS(X1, X2)
  2. CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1
2=2
{1, 2} , {1, 2}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1
2=2
{1, 2} , {1, 2}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

SIEVE(mark(X)) -> SIEVE(X)
SIEVE(ok(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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 15
Size-Change Principle
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. SIEVE(mark(X)) -> SIEVE(X)
  2. SIEVE(ok(X)) -> SIEVE(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
Usable Rules (Innermost)
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 16
Size-Change Principle
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. FROM(ok(X)) -> FROM(X)
  2. FROM(mark(X)) -> FROM(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
Usable Rules (Innermost)
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
           →DP Problem 17
Size-Change Principle
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. S(ok(X)) -> S(X)
  2. S(mark(X)) -> S(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
Usable Rules (Innermost)
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
           →DP Problem 18
Size-Change Principle
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. HEAD(ok(X)) -> HEAD(X)
  2. HEAD(mark(X)) -> HEAD(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
Usable Rules (Innermost)
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
           →DP Problem 19
Size-Change Principle
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. TAIL(ok(X)) -> TAIL(X)
  2. TAIL(mark(X)) -> TAIL(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
Usable Rules (Innermost)
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
           →DP Problem 20
Size-Change Principle
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
  2. IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1
2>2
3>3
{1, 2} , {1, 2}
1>1
2=2
3=3

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1
2=2
3=3
{1, 2} , {1, 2}
1>1
2>2
3>3

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
Usable Rules (Innermost)
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
           →DP Problem 21
Size-Change Principle
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)
  2. DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
  3. DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)
and get the following Size-Change Graph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1=1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2>2
{1, 2, 3} , {1, 2, 3}
1>1
2=2
{1, 2, 3} , {1, 2, 3}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
Usable Rules (Innermost)
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
           →DP Problem 22
Size-Change Principle
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules


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)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
  2. ACTIVE(divides(X1, X2)) -> ACTIVE(X1)
  3. ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
  4. ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
  5. ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
  6. ACTIVE(tail(X)) -> ACTIVE(X)
  7. ACTIVE(head(X)) -> ACTIVE(X)
  8. ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
  9. ACTIVE(s(X)) -> ACTIVE(X)
  10. ACTIVE(from(X)) -> ACTIVE(X)
  11. ACTIVE(sieve(X)) -> ACTIVE(X)
and get the following Size-Change Graph(s):
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} , {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} , {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
from(x1) -> from(x1)
filter(x1, x2) -> filter(x1, x2)
sieve(x1) -> sieve(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
divides(x1, x2) -> divides(x1, x2)
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
s(x1) -> s(x1)
head(x1) -> head(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
Usable Rules (Innermost)
       →DP Problem 12
UsableRules


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




As we are in the innermost case, we can delete all 54 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
           →DP Problem 23
Size-Change Principle
       →DP Problem 12
UsableRules


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)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. PROPER(divides(X1, X2)) -> PROPER(X2)
  2. PROPER(divides(X1, X2)) -> PROPER(X1)
  3. PROPER(filter(X1, X2)) -> PROPER(X2)
  4. PROPER(filter(X1, X2)) -> PROPER(X1)
  5. PROPER(if(X1, X2, X3)) -> PROPER(X3)
  6. PROPER(if(X1, X2, X3)) -> PROPER(X2)
  7. PROPER(if(X1, X2, X3)) -> PROPER(X1)
  8. PROPER(tail(X)) -> PROPER(X)
  9. PROPER(head(X)) -> PROPER(X)
  10. PROPER(cons(X1, X2)) -> PROPER(X2)
  11. PROPER(cons(X1, X2)) -> PROPER(X1)
  12. PROPER(s(X)) -> PROPER(X)
  13. PROPER(from(X)) -> PROPER(X)
  14. PROPER(sieve(X)) -> PROPER(X)
and get the following Size-Change Graph(s):
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} , {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} , {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
from(x1) -> from(x1)
filter(x1, x2) -> filter(x1, x2)
sieve(x1) -> sieve(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
divides(x1, x2) -> divides(x1, x2)
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
s(x1) -> s(x1)
head(x1) -> head(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
Usable Rules (Innermost)


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




As we are in the innermost case, we can delete all 2 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules
           →DP Problem 24
Narrowing Transformation


Dependency Pairs:

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


Rules:


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TOP(ok(X)) -> TOP(active(X))
19 new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules
           →DP Problem 24
Nar
             ...
               →DP Problem 25
Narrowing Transformation


Dependency Pairs:

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


Rules:


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TOP(mark(X)) -> TOP(proper(X))
13 new Dependency Pairs are created:

TOP(mark(sieve(X''))) -> TOP(sieve(proper(X'')))
TOP(mark(false)) -> TOP(ok(false))
TOP(mark(filter(X1', X2'))) -> TOP(filter(proper(X1'), proper(X2')))
TOP(mark(tail(X''))) -> TOP(tail(proper(X'')))
TOP(mark(divides(X1', X2'))) -> TOP(divides(proper(X1'), proper(X2')))
TOP(mark(cons(X1', X2'))) -> TOP(cons(proper(X1'), proper(X2')))
TOP(mark(true)) -> TOP(ok(true))
TOP(mark(head(X''))) -> TOP(head(proper(X'')))
TOP(mark(from(X''))) -> TOP(from(proper(X'')))
TOP(mark(primes)) -> TOP(ok(primes))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(0)) -> TOP(ok(0))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
       →DP Problem 9
UsableRules
       →DP Problem 10
UsableRules
       →DP Problem 11
UsableRules
       →DP Problem 12
UsableRules
           →DP Problem 24
Nar
             ...
               →DP Problem 26
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

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


Rules:


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


Strategy:

innermost



The Proof could not be continued due to a Timeout.
Innermost Termination of R could not be shown.
Duration:
1:02 minutes