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

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
dbl(0) → 0
dbl(s(X)) → s(s(dbl(X)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
half(0) → 0
half(s(0)) → 0
half(s(s(X))) → s(half(X))
half(dbl(X)) → X
terms(X) → n__terms(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Rewrite Strategy: INNERMOST

Infered types.

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Heuristically decided to analyse the following defined symbols:

They will be analysed ascendingly in the following order:
dbl' < sqr'

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

The following defined symbols remain to be analysed:

They will be analysed ascendingly in the following order:
dbl' < sqr'

Proved the following rewrite lemma:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)

Induction Base:
_gen_s':0'5(b)

Induction Step:
s'(_gen_s':0'5(+(_\$n8, _b230)))

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

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Lemmas:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

The following defined symbols remain to be analysed:
dbl', sqr', activate', half'

They will be analysed ascendingly in the following order:
dbl' < sqr'

Proved the following rewrite lemma:
dbl'(_gen_s':0'5(_n982)) → _gen_s':0'5(*(2, _n982)), rt ∈ Ω(1 + n982)

Induction Base:
dbl'(_gen_s':0'5(0)) →RΩ(1)
0'

Induction Step:
dbl'(_gen_s':0'5(+(_\$n983, 1))) →RΩ(1)
s'(s'(dbl'(_gen_s':0'5(_\$n983)))) →IH
s'(s'(_gen_s':0'5(*(2, _\$n983))))

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

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Lemmas:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)
dbl'(_gen_s':0'5(_n982)) → _gen_s':0'5(*(2, _n982)), rt ∈ Ω(1 + n982)

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

The following defined symbols remain to be analysed:
sqr', activate', half'

Proved the following rewrite lemma:
sqr'(_gen_s':0'5(_n1602)) → _gen_s':0'5(*(_n1602, _n1602)), rt ∈ Ω(1 + n1602 + n16022 + n16023)

Induction Base:
sqr'(_gen_s':0'5(0)) →RΩ(1)
0'

Induction Step:
sqr'(_gen_s':0'5(+(_\$n1603, 1))) →RΩ(1)
s'(add'(_gen_s':0'5(*(_\$n1603, _\$n1603)), dbl'(_gen_s':0'5(_\$n1603)))) →LΩ(1 + \$n1603)
s'(add'(_gen_s':0'5(*(_\$n1603, _\$n1603)), _gen_s':0'5(*(2, _\$n1603)))) →LΩ(1 + \$n16032)
s'(_gen_s':0'5(+(*(_\$n1603, _\$n1603), *(2, _\$n1603))))

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

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Lemmas:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)
dbl'(_gen_s':0'5(_n982)) → _gen_s':0'5(*(2, _n982)), rt ∈ Ω(1 + n982)
sqr'(_gen_s':0'5(_n1602)) → _gen_s':0'5(*(_n1602, _n1602)), rt ∈ Ω(1 + n1602 + n16022 + n16023)

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

The following defined symbols remain to be analysed:
activate', half'

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

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Lemmas:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)
dbl'(_gen_s':0'5(_n982)) → _gen_s':0'5(*(2, _n982)), rt ∈ Ω(1 + n982)
sqr'(_gen_s':0'5(_n1602)) → _gen_s':0'5(*(_n1602, _n1602)), rt ∈ Ω(1 + n1602 + n16022 + n16023)

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

The following defined symbols remain to be analysed:
half'

Proved the following rewrite lemma:
half'(_gen_s':0'5(*(2, _n2862))) → _gen_s':0'5(_n2862), rt ∈ Ω(1 + n2862)

Induction Base:
half'(_gen_s':0'5(*(2, 0))) →RΩ(1)
0'

Induction Step:
half'(_gen_s':0'5(*(2, +(_\$n2863, 1)))) →RΩ(1)
s'(half'(_gen_s':0'5(*(2, _\$n2863)))) →IH
s'(_gen_s':0'5(_\$n2863))

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

Rules:
terms'(N) → cons'(recip'(sqr'(N)), n__terms'(s'(N)))
sqr'(0') → 0'
dbl'(0') → 0'
dbl'(s'(X)) → s'(s'(dbl'(X)))
first'(0', X) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(X))) → s'(half'(X))
half'(dbl'(X)) → X
terms'(X) → n__terms'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__terms'(X)) → terms'(X)
activate'(n__first'(X1, X2)) → first'(X1, X2)
activate'(X) → X

Types:
terms' :: s':0' → n__terms':cons':nil':n__first'
cons' :: recip' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
recip' :: s':0' → recip'
sqr' :: s':0' → s':0'
n__terms' :: s':0' → n__terms':cons':nil':n__first'
s' :: s':0' → s':0'
0' :: s':0'
add' :: s':0' → s':0' → s':0'
dbl' :: s':0' → s':0'
first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
nil' :: n__terms':cons':nil':n__first'
n__first' :: s':0' → n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
activate' :: n__terms':cons':nil':n__first' → n__terms':cons':nil':n__first'
half' :: s':0' → s':0'
_hole_n__terms':cons':nil':n__first'1 :: n__terms':cons':nil':n__first'
_hole_s':0'2 :: s':0'
_hole_recip'3 :: recip'
_gen_n__terms':cons':nil':n__first'4 :: Nat → n__terms':cons':nil':n__first'
_gen_s':0'5 :: Nat → s':0'

Lemmas:
add'(_gen_s':0'5(_n7), _gen_s':0'5(b)) → _gen_s':0'5(+(_n7, b)), rt ∈ Ω(1 + n7)
dbl'(_gen_s':0'5(_n982)) → _gen_s':0'5(*(2, _n982)), rt ∈ Ω(1 + n982)
sqr'(_gen_s':0'5(_n1602)) → _gen_s':0'5(*(_n1602, _n1602)), rt ∈ Ω(1 + n1602 + n16022 + n16023)
half'(_gen_s':0'5(*(2, _n2862))) → _gen_s':0'5(_n2862), rt ∈ Ω(1 + n2862)

Generator Equations:
_gen_n__terms':cons':nil':n__first'4(0) ⇔ n__terms'(0')
_gen_n__terms':cons':nil':n__first'4(+(x, 1)) ⇔ cons'(recip'(0'), _gen_n__terms':cons':nil':n__first'4(x))
_gen_s':0'5(0) ⇔ 0'
_gen_s':0'5(+(x, 1)) ⇔ s'(_gen_s':0'5(x))

No more defined symbols left to analyse.

The lowerbound Ω(n3) was proven with the following lemma:
sqr'(_gen_s':0'5(_n1602)) → _gen_s':0'5(*(_n1602, _n1602)), rt ∈ Ω(1 + n1602 + n16022 + n16023)