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

h(X, Z) → f(X, s(X), Z)
f(X, Y, g(X, Y)) → h(0, g(X, Y))
g(0, Y) → 0
g(X, s(Y)) → g(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:

h'(X, Z) → f'(X, s'(X), Z)
f'(X, Y, g'(X, Y)) → h'(0', g'(X, Y))
g'(0', Y) → 0'
g'(X, s'(Y)) → g'(X, Y)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
h'(X, Z) → f'(X, s'(X), Z)
f'(X, Y, g'(X, Y)) → h'(0', g'(X, Y))
g'(0', Y) → 0'
g'(X, s'(Y)) → g'(X, Y)

Types:
h' :: s':0' → s':0' → h':f'
f' :: s':0' → s':0' → s':0' → h':f'
s' :: s':0' → s':0'
g' :: s':0' → s':0' → s':0'
0' :: s':0'
_hole_h':f'1 :: h':f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Heuristically decided to analyse the following defined symbols:
h', g'

They will be analysed ascendingly in the following order:
g' < h'

Rules:
h'(X, Z) → f'(X, s'(X), Z)
f'(X, Y, g'(X, Y)) → h'(0', g'(X, Y))
g'(0', Y) → 0'
g'(X, s'(Y)) → g'(X, Y)

Types:
h' :: s':0' → s':0' → h':f'
f' :: s':0' → s':0' → s':0' → h':f'
s' :: s':0' → s':0'
g' :: s':0' → s':0' → s':0'
0' :: s':0'
_hole_h':f'1 :: h':f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

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

The following defined symbols remain to be analysed:
g', h'

They will be analysed ascendingly in the following order:
g' < h'

Proved the following rewrite lemma:
g'(_gen_s':0'3(a), _gen_s':0'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)

Induction Base:
g'(_gen_s':0'3(a), _gen_s':0'3(+(1, 0)))

Induction Step:
g'(_gen_s':0'3(_a325), _gen_s':0'3(+(1, +(_\$n6, 1)))) →RΩ(1)
g'(_gen_s':0'3(_a325), _gen_s':0'3(+(1, _\$n6))) →IH
_*4

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

Rules:
h'(X, Z) → f'(X, s'(X), Z)
f'(X, Y, g'(X, Y)) → h'(0', g'(X, Y))
g'(0', Y) → 0'
g'(X, s'(Y)) → g'(X, Y)

Types:
h' :: s':0' → s':0' → h':f'
f' :: s':0' → s':0' → s':0' → h':f'
s' :: s':0' → s':0'
g' :: s':0' → s':0' → s':0'
0' :: s':0'
_hole_h':f'1 :: h':f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
g'(_gen_s':0'3(a), _gen_s':0'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)

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

The following defined symbols remain to be analysed:
h'

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

Rules:
h'(X, Z) → f'(X, s'(X), Z)
f'(X, Y, g'(X, Y)) → h'(0', g'(X, Y))
g'(0', Y) → 0'
g'(X, s'(Y)) → g'(X, Y)

Types:
h' :: s':0' → s':0' → h':f'
f' :: s':0' → s':0' → s':0' → h':f'
s' :: s':0' → s':0'
g' :: s':0' → s':0' → s':0'
0' :: s':0'
_hole_h':f'1 :: h':f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
g'(_gen_s':0'3(a), _gen_s':0'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)

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

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
g'(_gen_s':0'3(a), _gen_s':0'3(+(1, _n5))) → _*4, rt ∈ Ω(n5)