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

half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(x)) → s(inc(x))
log(x) → log2(x, 0)
log2(x, y) → if(le(x, s(0)), x, inc(y))
if(true, x, s(y)) → y
if(false, x, y) → log2(half(x), y)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
half', le', inc', log2'

They will be analysed ascendingly in the following order:
half' < log2'
le' < log2'
inc' < log2'

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
half', le', inc', log2'

They will be analysed ascendingly in the following order:
half' < log2'
le' < log2'
inc' < log2'

Proved the following rewrite lemma:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)

Induction Base:
half'(_gen_0':s'3(*(2, 0))) →RΩ(1)
0'

Induction Step:
half'(_gen_0':s'3(*(2, +(_\$n6, 1)))) →RΩ(1)
s'(half'(_gen_0':s'3(*(2, _\$n6)))) →IH
s'(_gen_0':s'3(_\$n6))

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

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
le', inc', log2'

They will be analysed ascendingly in the following order:
le' < log2'
inc' < log2'

Proved the following rewrite lemma:
le'(_gen_0':s'3(_n539), _gen_0':s'3(_n539)) → true', rt ∈ Ω(1 + n539)

Induction Base:
le'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
true'

Induction Step:
le'(_gen_0':s'3(+(_\$n540, 1)), _gen_0':s'3(+(_\$n540, 1))) →RΩ(1)
le'(_gen_0':s'3(_\$n540), _gen_0':s'3(_\$n540)) →IH
true'

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

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
le'(_gen_0':s'3(_n539), _gen_0':s'3(_n539)) → true', rt ∈ Ω(1 + n539)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
inc', log2'

They will be analysed ascendingly in the following order:
inc' < log2'

Proved the following rewrite lemma:
inc'(_gen_0':s'3(_n1076)) → _gen_0':s'3(_n1076), rt ∈ Ω(1 + n1076)

Induction Base:
inc'(_gen_0':s'3(0)) →RΩ(1)
0'

Induction Step:
inc'(_gen_0':s'3(+(_\$n1077, 1))) →RΩ(1)
s'(inc'(_gen_0':s'3(_\$n1077))) →IH
s'(_gen_0':s'3(_\$n1077))

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

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
le'(_gen_0':s'3(_n539), _gen_0':s'3(_n539)) → true', rt ∈ Ω(1 + n539)
inc'(_gen_0':s'3(_n1076)) → _gen_0':s'3(_n1076), rt ∈ Ω(1 + n1076)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

The following defined symbols remain to be analysed:
log2'

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

Rules:
half'(0') → 0'
half'(s'(0')) → 0'
half'(s'(s'(x))) → s'(half'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
inc'(0') → 0'
inc'(s'(x)) → s'(inc'(x))
log'(x) → log2'(x, 0')
log2'(x, y) → if'(le'(x, s'(0')), x, inc'(y))
if'(true', x, s'(y)) → y
if'(false', x, y) → log2'(half'(x), y)

Types:
half' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s' → 0':s'
log' :: 0':s' → 0':s'
log2' :: 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)
le'(_gen_0':s'3(_n539), _gen_0':s'3(_n539)) → true', rt ∈ Ω(1 + n539)
inc'(_gen_0':s'3(_n1076)) → _gen_0':s'3(_n1076), rt ∈ Ω(1 + n1076)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
half'(_gen_0':s'3(*(2, _n5))) → _gen_0':s'3(_n5), rt ∈ Ω(1 + n5)