### (0) Obligation:

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

filter(cons(X, Y), 0, M) → cons(0, n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0, Y)) → cons(0, n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
sieve(cons(0, n__sieve(X22240_4))) →+ cons(0, n__sieve(sieve(X22240_4)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,0].
The pumping substitution is [X22240_4 / cons(0, n__sieve(X22240_4))].
The result substitution is [ ].

### (3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

### (4) Obligation:

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

filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

S is empty.
Rewrite Strategy: FULL

Infered types.

### (6) Obligation:

TRS:
Rules:
filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Types:
filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
cons :: 0':s → cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
0' :: 0':s
n__filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
activate :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
s :: 0':s → 0':s
sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
n__sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
nats :: 0':s → cons:n__filter:n__sieve:n__nats
n__nats :: 0':s → cons:n__filter:n__sieve:n__nats
zprimes :: cons:n__filter:n__sieve:n__nats
hole_cons:n__filter:n__sieve:n__nats1_0 :: cons:n__filter:n__sieve:n__nats
hole_0':s2_0 :: 0':s
gen_cons:n__filter:n__sieve:n__nats3_0 :: Nat → cons:n__filter:n__sieve:n__nats
gen_0':s4_0 :: Nat → 0':s

### (7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
filter, activate, sieve

They will be analysed ascendingly in the following order:
filter = activate
filter = sieve
activate = sieve

### (8) Obligation:

TRS:
Rules:
filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Types:
filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
cons :: 0':s → cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
0' :: 0':s
n__filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
activate :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
s :: 0':s → 0':s
sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
n__sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
nats :: 0':s → cons:n__filter:n__sieve:n__nats
n__nats :: 0':s → cons:n__filter:n__sieve:n__nats
zprimes :: cons:n__filter:n__sieve:n__nats
hole_cons:n__filter:n__sieve:n__nats1_0 :: cons:n__filter:n__sieve:n__nats
hole_0':s2_0 :: 0':s
gen_cons:n__filter:n__sieve:n__nats3_0 :: Nat → cons:n__filter:n__sieve:n__nats
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_cons:n__filter:n__sieve:n__nats3_0(0) ⇔ n__nats(0')
gen_cons:n__filter:n__sieve:n__nats3_0(+(x, 1)) ⇔ cons(0', gen_cons:n__filter:n__sieve:n__nats3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
activate, filter, sieve

They will be analysed ascendingly in the following order:
filter = activate
filter = sieve
activate = sieve

### (9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol activate.

### (10) Obligation:

TRS:
Rules:
filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Types:
filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
cons :: 0':s → cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
0' :: 0':s
n__filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
activate :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
s :: 0':s → 0':s
sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
n__sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
nats :: 0':s → cons:n__filter:n__sieve:n__nats
n__nats :: 0':s → cons:n__filter:n__sieve:n__nats
zprimes :: cons:n__filter:n__sieve:n__nats
hole_cons:n__filter:n__sieve:n__nats1_0 :: cons:n__filter:n__sieve:n__nats
hole_0':s2_0 :: 0':s
gen_cons:n__filter:n__sieve:n__nats3_0 :: Nat → cons:n__filter:n__sieve:n__nats
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_cons:n__filter:n__sieve:n__nats3_0(0) ⇔ n__nats(0')
gen_cons:n__filter:n__sieve:n__nats3_0(+(x, 1)) ⇔ cons(0', gen_cons:n__filter:n__sieve:n__nats3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
filter, sieve

They will be analysed ascendingly in the following order:
filter = activate
filter = sieve
activate = sieve

### (11) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol filter.

### (12) Obligation:

TRS:
Rules:
filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Types:
filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
cons :: 0':s → cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
0' :: 0':s
n__filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
activate :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
s :: 0':s → 0':s
sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
n__sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
nats :: 0':s → cons:n__filter:n__sieve:n__nats
n__nats :: 0':s → cons:n__filter:n__sieve:n__nats
zprimes :: cons:n__filter:n__sieve:n__nats
hole_cons:n__filter:n__sieve:n__nats1_0 :: cons:n__filter:n__sieve:n__nats
hole_0':s2_0 :: 0':s
gen_cons:n__filter:n__sieve:n__nats3_0 :: Nat → cons:n__filter:n__sieve:n__nats
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_cons:n__filter:n__sieve:n__nats3_0(0) ⇔ n__nats(0')
gen_cons:n__filter:n__sieve:n__nats3_0(+(x, 1)) ⇔ cons(0', gen_cons:n__filter:n__sieve:n__nats3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
sieve

They will be analysed ascendingly in the following order:
filter = activate
filter = sieve
activate = sieve

### (13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol sieve.

### (14) Obligation:

TRS:
Rules:
filter(cons(X, Y), 0', M) → cons(0', n__filter(activate(Y), M, M))
filter(cons(X, Y), s(N), M) → cons(X, n__filter(activate(Y), N, M))
sieve(cons(0', Y)) → cons(0', n__sieve(activate(Y)))
sieve(cons(s(N), Y)) → cons(s(N), n__sieve(filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(s(N)))
zprimessieve(nats(s(s(0'))))
filter(X1, X2, X3) → n__filter(X1, X2, X3)
sieve(X) → n__sieve(X)
nats(X) → n__nats(X)
activate(n__filter(X1, X2, X3)) → filter(X1, X2, X3)
activate(n__sieve(X)) → sieve(X)
activate(n__nats(X)) → nats(X)
activate(X) → X

Types:
filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
cons :: 0':s → cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
0' :: 0':s
n__filter :: cons:n__filter:n__sieve:n__nats → 0':s → 0':s → cons:n__filter:n__sieve:n__nats
activate :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
s :: 0':s → 0':s
sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
n__sieve :: cons:n__filter:n__sieve:n__nats → cons:n__filter:n__sieve:n__nats
nats :: 0':s → cons:n__filter:n__sieve:n__nats
n__nats :: 0':s → cons:n__filter:n__sieve:n__nats
zprimes :: cons:n__filter:n__sieve:n__nats
hole_cons:n__filter:n__sieve:n__nats1_0 :: cons:n__filter:n__sieve:n__nats
hole_0':s2_0 :: 0':s
gen_cons:n__filter:n__sieve:n__nats3_0 :: Nat → cons:n__filter:n__sieve:n__nats
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_cons:n__filter:n__sieve:n__nats3_0(0) ⇔ n__nats(0')
gen_cons:n__filter:n__sieve:n__nats3_0(+(x, 1)) ⇔ cons(0', gen_cons:n__filter:n__sieve:n__nats3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.