### (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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(X))
activate(X) → X

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
activate(n__filter(n__nats(X44182_4), X2, X3)) →+ filter(cons(activate(X44182_4), n__nats(n__s(activate(X44182_4)))), activate(X2), activate(X3))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0].
The pumping substitution is [X44182_4 / n__filter(n__nats(X44182_4), X2, X3)].
The result substitution is [ ].

The rewrite sequence
activate(n__filter(n__nats(X44182_4), X2, X3)) →+ filter(cons(activate(X44182_4), n__nats(n__s(activate(X44182_4)))), activate(X2), activate(X3))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,1,0,0].
The pumping substitution is [X44182_4 / n__filter(n__nats(X44182_4), X2, X3)].
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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(X))
activate(X) → X

Types:
filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
cons :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
0' :: cons:0':n__filter:n__sieve:n__s:n__nats
n__filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
activate :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
zprimes :: cons:0':n__filter:n__sieve:n__s:n__nats
hole_cons:0':n__filter:n__sieve:n__s:n__nats1_0 :: cons:0':n__filter:n__sieve:n__s:n__nats
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0 :: Nat → cons:0':n__filter:n__sieve:n__s:n__nats

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

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

They will be analysed ascendingly in the following order:
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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(X))
activate(X) → X

Types:
filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
cons :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
0' :: cons:0':n__filter:n__sieve:n__s:n__nats
n__filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
activate :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
zprimes :: cons:0':n__filter:n__sieve:n__s:n__nats
hole_cons:0':n__filter:n__sieve:n__s:n__nats1_0 :: cons:0':n__filter:n__sieve:n__s:n__nats
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0 :: Nat → cons:0':n__filter:n__sieve:n__s:n__nats

Generator Equations:
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(0) ⇔ 0'
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(+(x, 1)) ⇔ cons(0', gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(x))

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

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

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

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

### (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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(X))
activate(X) → X

Types:
filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
cons :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
0' :: cons:0':n__filter:n__sieve:n__s:n__nats
n__filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
activate :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
zprimes :: cons:0':n__filter:n__sieve:n__s:n__nats
hole_cons:0':n__filter:n__sieve:n__s:n__nats1_0 :: cons:0':n__filter:n__sieve:n__s:n__nats
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0 :: Nat → cons:0':n__filter:n__sieve:n__s:n__nats

Generator Equations:
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(0) ⇔ 0'
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(+(x, 1)) ⇔ cons(0', gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(x))

The following defined symbols remain to be analysed:
activate

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

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

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

### (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(n__filter(activate(Y), N, N)))
nats(N) → cons(N, n__nats(n__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)
s(X) → n__s(X)
activate(n__filter(X1, X2, X3)) → filter(activate(X1), activate(X2), activate(X3))
activate(n__sieve(X)) → sieve(activate(X))
activate(n__nats(X)) → nats(activate(X))
activate(n__s(X)) → s(activate(X))
activate(X) → X

Types:
filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
cons :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
0' :: cons:0':n__filter:n__sieve:n__s:n__nats
n__filter :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
activate :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__sieve :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__nats :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
n__s :: cons:0':n__filter:n__sieve:n__s:n__nats → cons:0':n__filter:n__sieve:n__s:n__nats
zprimes :: cons:0':n__filter:n__sieve:n__s:n__nats
hole_cons:0':n__filter:n__sieve:n__s:n__nats1_0 :: cons:0':n__filter:n__sieve:n__s:n__nats
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0 :: Nat → cons:0':n__filter:n__sieve:n__s:n__nats

Generator Equations:
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(0) ⇔ 0'
gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(+(x, 1)) ⇔ cons(0', gen_cons:0':n__filter:n__sieve:n__s:n__nats2_0(x))

No more defined symbols left to analyse.