### (0) Obligation:

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

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
mark(first(from(X7148_3), X2)) →+ a__first(cons(mark(mark(X7148_3)), from(s(mark(X7148_3)))), mark(X2))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0,0].
The pumping substitution is [X7148_3 / first(from(X7148_3), X2)].
The result substitution is [ ].

The rewrite sequence
mark(first(from(X7148_3), X2)) →+ a__first(cons(mark(mark(X7148_3)), from(s(mark(X7148_3)))), mark(X2))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,1,0,0].
The pumping substitution is [X7148_3 / first(from(X7148_3), X2)].
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:

a__first(0', X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

S is empty.
Rewrite Strategy: FULL

### (5) SlicingProof (LOWER BOUND(ID) transformation)

Sliced the following arguments:
cons/1

### (6) Obligation:

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

a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

S is empty.
Rewrite Strategy: FULL

Infered types.

### (8) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

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

Heuristically decided to analyse the following defined symbols:
mark, a__from

They will be analysed ascendingly in the following order:
mark = a__from

### (10) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

Generator Equations:
gen_0':nil:s:cons:first:from2_0(0) ⇔ 0'
gen_0':nil:s:cons:first:from2_0(+(x, 1)) ⇔ s(gen_0':nil:s:cons:first:from2_0(x))

The following defined symbols remain to be analysed:
a__from, mark

They will be analysed ascendingly in the following order:
mark = a__from

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

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

### (12) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

Generator Equations:
gen_0':nil:s:cons:first:from2_0(0) ⇔ 0'
gen_0':nil:s:cons:first:from2_0(+(x, 1)) ⇔ s(gen_0':nil:s:cons:first:from2_0(x))

The following defined symbols remain to be analysed:
mark

They will be analysed ascendingly in the following order:
mark = a__from

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

Proved the following rewrite lemma:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)

Induction Base:
mark(gen_0':nil:s:cons:first:from2_0(0)) →RΩ(1)
0'

Induction Step:
mark(gen_0':nil:s:cons:first:from2_0(+(n9671_0, 1))) →RΩ(1)
s(mark(gen_0':nil:s:cons:first:from2_0(n9671_0))) →IH
s(gen_0':nil:s:cons:first:from2_0(c9672_0))

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

### (15) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

Lemmas:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)

Generator Equations:
gen_0':nil:s:cons:first:from2_0(0) ⇔ 0'
gen_0':nil:s:cons:first:from2_0(+(x, 1)) ⇔ s(gen_0':nil:s:cons:first:from2_0(x))

The following defined symbols remain to be analysed:
a__from

They will be analysed ascendingly in the following order:
mark = a__from

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

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

### (17) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

Lemmas:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)

Generator Equations:
gen_0':nil:s:cons:first:from2_0(0) ⇔ 0'
gen_0':nil:s:cons:first:from2_0(+(x, 1)) ⇔ s(gen_0':nil:s:cons:first:from2_0(x))

No more defined symbols left to analyse.

### (18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)

### (20) Obligation:

TRS:
Rules:
a__first(0', X) → nil
a__first(s(X), cons(Y)) → cons(mark(Y))
a__from(X) → cons(mark(X))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0') → 0'
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1)) → cons(mark(X1))
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Types:
a__first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
0' :: 0':nil:s:cons:first:from
nil :: 0':nil:s:cons:first:from
s :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
cons :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
mark :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
a__from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
first :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
from :: 0':nil:s:cons:first:from → 0':nil:s:cons:first:from
hole_0':nil:s:cons:first:from1_0 :: 0':nil:s:cons:first:from
gen_0':nil:s:cons:first:from2_0 :: Nat → 0':nil:s:cons:first:from

Lemmas:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)

Generator Equations:
gen_0':nil:s:cons:first:from2_0(0) ⇔ 0'
gen_0':nil:s:cons:first:from2_0(+(x, 1)) ⇔ s(gen_0':nil:s:cons:first:from2_0(x))

No more defined symbols left to analyse.

### (21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
mark(gen_0':nil:s:cons:first:from2_0(n9671_0)) → gen_0':nil:s:cons:first:from2_0(n9671_0), rt ∈ Ω(1 + n96710)