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(s(x)) → s(inc(x))
inc(0) → s(0)
logarithm(x) → logIter(x, 0)
logIter(x, y) → if(le(s(0), x), le(s(s(0)), x), half(x), inc(y))
if(false, b, x, y) → logZeroError
if(true, false, x, s(y)) → y
if(true, true, x, y) → logIter(x, y)
fg
fh

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

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

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

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

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

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

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

Proved the following rewrite lemma:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)

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

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

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

Lemmas:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)

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

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

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

Proved the following rewrite lemma:
le'(_gen_0':s':logZeroError'4(_n619), _gen_0':s':logZeroError'4(_n619)) → true', rt ∈ Ω(1 + n619)

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

Induction Step:
le'(_gen_0':s':logZeroError'4(+(_\$n620, 1)), _gen_0':s':logZeroError'4(+(_\$n620, 1))) →RΩ(1)
le'(_gen_0':s':logZeroError'4(_\$n620), _gen_0':s':logZeroError'4(_\$n620)) →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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

Lemmas:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)
le'(_gen_0':s':logZeroError'4(_n619), _gen_0':s':logZeroError'4(_n619)) → true', rt ∈ Ω(1 + n619)

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

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

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

Proved the following rewrite lemma:
inc'(_gen_0':s':logZeroError'4(_n1243)) → _gen_0':s':logZeroError'4(+(1, _n1243)), rt ∈ Ω(1 + n1243)

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

Induction Step:
inc'(_gen_0':s':logZeroError'4(+(_\$n1244, 1))) →RΩ(1)
s'(inc'(_gen_0':s':logZeroError'4(_\$n1244))) →IH
s'(_gen_0':s':logZeroError'4(+(1, _\$n1244)))

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

Lemmas:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)
le'(_gen_0':s':logZeroError'4(_n619), _gen_0':s':logZeroError'4(_n619)) → true', rt ∈ Ω(1 + n619)
inc'(_gen_0':s':logZeroError'4(_n1243)) → _gen_0':s':logZeroError'4(+(1, _n1243)), rt ∈ Ω(1 + n1243)

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

The following defined symbols remain to be analysed:
logIter'

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

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'(s'(x)) → s'(inc'(x))
inc'(0') → s'(0')
logarithm'(x) → logIter'(x, 0')
logIter'(x, y) → if'(le'(s'(0'), x), le'(s'(s'(0')), x), half'(x), inc'(y))
if'(false', b, x, y) → logZeroError'
if'(true', false', x, s'(y)) → y
if'(true', true', x, y) → logIter'(x, y)
f'g'
f'h'

Types:
half' :: 0':s':logZeroError' → 0':s':logZeroError'
0' :: 0':s':logZeroError'
s' :: 0':s':logZeroError' → 0':s':logZeroError'
le' :: 0':s':logZeroError' → 0':s':logZeroError' → true':false'
true' :: true':false'
false' :: true':false'
inc' :: 0':s':logZeroError' → 0':s':logZeroError'
logarithm' :: 0':s':logZeroError' → 0':s':logZeroError'
logIter' :: 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
if' :: true':false' → true':false' → 0':s':logZeroError' → 0':s':logZeroError' → 0':s':logZeroError'
logZeroError' :: 0':s':logZeroError'
f' :: g':h'
g' :: g':h'
h' :: g':h'
_hole_0':s':logZeroError'1 :: 0':s':logZeroError'
_hole_true':false'2 :: true':false'
_hole_g':h'3 :: g':h'
_gen_0':s':logZeroError'4 :: Nat → 0':s':logZeroError'

Lemmas:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)
le'(_gen_0':s':logZeroError'4(_n619), _gen_0':s':logZeroError'4(_n619)) → true', rt ∈ Ω(1 + n619)
inc'(_gen_0':s':logZeroError'4(_n1243)) → _gen_0':s':logZeroError'4(+(1, _n1243)), rt ∈ Ω(1 + n1243)

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

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
half'(_gen_0':s':logZeroError'4(*(2, _n6))) → _gen_0':s':logZeroError'4(_n6), rt ∈ Ω(1 + n6)