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

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
a__from(X) → from(X)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Types:
a__2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
cons' :: cons':s':from':2nd' → cons':s':from':2nd' → cons':s':from':2nd'
mark' :: cons':s':from':2nd' → cons':s':from':2nd'
a__from' :: cons':s':from':2nd' → cons':s':from':2nd'
from' :: cons':s':from':2nd' → cons':s':from':2nd'
s' :: cons':s':from':2nd' → cons':s':from':2nd'
2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
_hole_cons':s':from':2nd'1 :: cons':s':from':2nd'
_gen_cons':s':from':2nd'2 :: Nat → cons':s':from':2nd'

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

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

Rules:
a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Types:
a__2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
cons' :: cons':s':from':2nd' → cons':s':from':2nd' → cons':s':from':2nd'
mark' :: cons':s':from':2nd' → cons':s':from':2nd'
a__from' :: cons':s':from':2nd' → cons':s':from':2nd'
from' :: cons':s':from':2nd' → cons':s':from':2nd'
s' :: cons':s':from':2nd' → cons':s':from':2nd'
2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
_hole_cons':s':from':2nd'1 :: cons':s':from':2nd'
_gen_cons':s':from':2nd'2 :: Nat → cons':s':from':2nd'

Generator Equations:
_gen_cons':s':from':2nd'2(0) ⇔ _hole_cons':s':from':2nd'1
_gen_cons':s':from':2nd'2(+(x, 1)) ⇔ cons'(_gen_cons':s':from':2nd'2(x), _hole_cons':s':from':2nd'1)

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

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

Proved the following rewrite lemma:
mark'(_gen_cons':s':from':2nd'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Induction Base:
mark'(_gen_cons':s':from':2nd'2(+(1, 0)))

Induction Step:
mark'(_gen_cons':s':from':2nd'2(+(1, +(_\$n5, 1)))) →RΩ(1)
cons'(mark'(_gen_cons':s':from':2nd'2(+(1, _\$n5))), _hole_cons':s':from':2nd'1) →IH
cons'(_*3, _hole_cons':s':from':2nd'1)

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

Rules:
a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Types:
a__2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
cons' :: cons':s':from':2nd' → cons':s':from':2nd' → cons':s':from':2nd'
mark' :: cons':s':from':2nd' → cons':s':from':2nd'
a__from' :: cons':s':from':2nd' → cons':s':from':2nd'
from' :: cons':s':from':2nd' → cons':s':from':2nd'
s' :: cons':s':from':2nd' → cons':s':from':2nd'
2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
_hole_cons':s':from':2nd'1 :: cons':s':from':2nd'
_gen_cons':s':from':2nd'2 :: Nat → cons':s':from':2nd'

Lemmas:
mark'(_gen_cons':s':from':2nd'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_cons':s':from':2nd'2(0) ⇔ _hole_cons':s':from':2nd'1
_gen_cons':s':from':2nd'2(+(x, 1)) ⇔ cons'(_gen_cons':s':from':2nd'2(x), _hole_cons':s':from':2nd'1)

The following defined symbols remain to be analysed:
a__2nd', a__from'

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

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

Rules:
a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Types:
a__2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
cons' :: cons':s':from':2nd' → cons':s':from':2nd' → cons':s':from':2nd'
mark' :: cons':s':from':2nd' → cons':s':from':2nd'
a__from' :: cons':s':from':2nd' → cons':s':from':2nd'
from' :: cons':s':from':2nd' → cons':s':from':2nd'
s' :: cons':s':from':2nd' → cons':s':from':2nd'
2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
_hole_cons':s':from':2nd'1 :: cons':s':from':2nd'
_gen_cons':s':from':2nd'2 :: Nat → cons':s':from':2nd'

Lemmas:
mark'(_gen_cons':s':from':2nd'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_cons':s':from':2nd'2(0) ⇔ _hole_cons':s':from':2nd'1
_gen_cons':s':from':2nd'2(+(x, 1)) ⇔ cons'(_gen_cons':s':from':2nd'2(x), _hole_cons':s':from':2nd'1)

The following defined symbols remain to be analysed:
a__from'

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

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

Rules:
a__2nd'(cons'(X, cons'(Y, Z))) → mark'(Y)
a__from'(X) → cons'(mark'(X), from'(s'(X)))
mark'(2nd'(X)) → a__2nd'(mark'(X))
mark'(from'(X)) → a__from'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
a__2nd'(X) → 2nd'(X)
a__from'(X) → from'(X)

Types:
a__2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
cons' :: cons':s':from':2nd' → cons':s':from':2nd' → cons':s':from':2nd'
mark' :: cons':s':from':2nd' → cons':s':from':2nd'
a__from' :: cons':s':from':2nd' → cons':s':from':2nd'
from' :: cons':s':from':2nd' → cons':s':from':2nd'
s' :: cons':s':from':2nd' → cons':s':from':2nd'
2nd' :: cons':s':from':2nd' → cons':s':from':2nd'
_hole_cons':s':from':2nd'1 :: cons':s':from':2nd'
_gen_cons':s':from':2nd'2 :: Nat → cons':s':from':2nd'

Lemmas:
mark'(_gen_cons':s':from':2nd'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_cons':s':from':2nd'2(0) ⇔ _hole_cons':s':from':2nd'1
_gen_cons':s':from':2nd'2(+(x, 1)) ⇔ cons'(_gen_cons':s':from':2nd'2(x), _hole_cons':s':from':2nd'1)

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
mark'(_gen_cons':s':from':2nd'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)