Runtime Complexity TRS:
The TRS R consists of the following rules:

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

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


Runtime Complexity TRS:
The TRS R consists of the following rules:


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

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'


Heuristically decided to analyse the following defined symbols:
active', sieve', from', s', cons', if', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
sieve' < active'
from' < active'
s' < active'
cons' < active'
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
sieve' < proper'
from' < proper'
s' < proper'
cons' < proper'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
sieve', active', from', s', cons', if', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
sieve' < active'
from' < active'
s' < active'
cons' < active'
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
sieve' < proper'
from' < proper'
s' < proper'
cons' < proper'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)

Induction Base:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n6, 1)))) →RΩ(1)
mark'(sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n6)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
from', active', s', cons', if', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
from' < active'
s' < active'
cons' < active'
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
from' < proper'
s' < proper'
cons' < proper'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)

Induction Base:
from'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
from'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n1838, 1)))) →RΩ(1)
mark'(from'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n1838)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
s', active', cons', if', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
s' < active'
cons' < active'
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
s' < proper'
cons' < proper'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)

Induction Base:
s'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
s'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n3794, 1)))) →RΩ(1)
mark'(s'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n3794)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
cons', active', if', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
cons' < active'
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
cons' < proper'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)

Induction Base:
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)), _gen_primes':0':mark':true':false':ok'3(b))

Induction Step:
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n5874, 1))), _gen_primes':0':mark':true':false':ok'3(_b7126)) →RΩ(1)
mark'(cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n5874)), _gen_primes':0':mark':true':false':ok'3(_b7126))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
if', active', divides', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
if' < active'
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
if' < proper'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)

Induction Base:
if'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c))

Induction Step:
if'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n9537, 1))), _gen_primes':0':mark':true':false':ok'3(_b12007), _gen_primes':0':mark':true':false':ok'3(_c12008)) →RΩ(1)
mark'(if'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n9537)), _gen_primes':0':mark':true':false':ok'3(_b12007), _gen_primes':0':mark':true':false':ok'3(_c12008))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
divides', active', filter', head', tail', proper', top'

They will be analysed ascendingly in the following order:
divides' < active'
filter' < active'
head' < active'
tail' < active'
active' < top'
divides' < proper'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)

Induction Base:
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)), _gen_primes':0':mark':true':false':ok'3(b))

Induction Step:
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n15318, 1))), _gen_primes':0':mark':true':false':ok'3(_b17542)) →RΩ(1)
mark'(divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n15318)), _gen_primes':0':mark':true':false':ok'3(_b17542))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
filter', active', head', tail', proper', top'

They will be analysed ascendingly in the following order:
filter' < active'
head' < active'
tail' < active'
active' < top'
filter' < proper'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)

Induction Base:
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)), _gen_primes':0':mark':true':false':ok'3(b))

Induction Step:
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n20063, 1))), _gen_primes':0':mark':true':false':ok'3(_b22611)) →RΩ(1)
mark'(filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n20063)), _gen_primes':0':mark':true':false':ok'3(_b22611))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
head', active', tail', proper', top'

They will be analysed ascendingly in the following order:
head' < active'
tail' < active'
active' < top'
head' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)

Induction Base:
head'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
head'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n25176, 1)))) →RΩ(1)
mark'(head'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n25176)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
tail', active', proper', top'

They will be analysed ascendingly in the following order:
tail' < active'
active' < top'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _n28210))) → _*4, rt ∈ Ω(n28210)

Induction Base:
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, 0)))

Induction Step:
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, +(_$n28211, 1)))) →RΩ(1)
mark'(tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _$n28211)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _n28210))) → _*4, rt ∈ Ω(n28210)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
active', proper', top'

They will be analysed ascendingly in the following order:
active' < top'
proper' < top'


Could not prove a rewrite lemma for the defined symbol active'.


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _n28210))) → _*4, rt ∈ Ω(n28210)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
proper', top'

They will be analysed ascendingly in the following order:
proper' < top'


Could not prove a rewrite lemma for the defined symbol proper'.


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _n28210))) → _*4, rt ∈ Ω(n28210)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

The following defined symbols remain to be analysed:
top'


Could not prove a rewrite lemma for the defined symbol top'.


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

Types:
active' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
primes' :: primes':0':mark':true':false':ok'
mark' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
sieve' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
from' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
s' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
0' :: primes':0':mark':true':false':ok'
cons' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
head' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
tail' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
if' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
true' :: primes':0':mark':true':false':ok'
false' :: primes':0':mark':true':false':ok'
filter' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
divides' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
proper' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
ok' :: primes':0':mark':true':false':ok' → primes':0':mark':true':false':ok'
top' :: primes':0':mark':true':false':ok' → top'
_hole_primes':0':mark':true':false':ok'1 :: primes':0':mark':true':false':ok'
_hole_top'2 :: top'
_gen_primes':0':mark':true':false':ok'3 :: Nat → primes':0':mark':true':false':ok'

Lemmas:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)
from'(_gen_primes':0':mark':true':false':ok'3(+(1, _n1837))) → _*4, rt ∈ Ω(n1837)
s'(_gen_primes':0':mark':true':false':ok'3(+(1, _n3793))) → _*4, rt ∈ Ω(n3793)
cons'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5873)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n5873)
if'(_gen_primes':0':mark':true':false':ok'3(+(1, _n9536)), _gen_primes':0':mark':true':false':ok'3(b), _gen_primes':0':mark':true':false':ok'3(c)) → _*4, rt ∈ Ω(n9536)
divides'(_gen_primes':0':mark':true':false':ok'3(+(1, _n15317)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n15317)
filter'(_gen_primes':0':mark':true':false':ok'3(+(1, _n20062)), _gen_primes':0':mark':true':false':ok'3(b)) → _*4, rt ∈ Ω(n20062)
head'(_gen_primes':0':mark':true':false':ok'3(+(1, _n25175))) → _*4, rt ∈ Ω(n25175)
tail'(_gen_primes':0':mark':true':false':ok'3(+(1, _n28210))) → _*4, rt ∈ Ω(n28210)

Generator Equations:
_gen_primes':0':mark':true':false':ok'3(0) ⇔ primes'
_gen_primes':0':mark':true':false':ok'3(+(x, 1)) ⇔ mark'(_gen_primes':0':mark':true':false':ok'3(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
sieve'(_gen_primes':0':mark':true':false':ok'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)