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

f(x, 0) → s(0)
f(s(x), s(y)) → s(f(x, y))
g(0, x) → g(f(x, 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:

f'(x, 0') → s'(0')
f'(s'(x), s'(y)) → s'(f'(x, y))
g'(0', x) → g'(f'(x, x), x)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
f'(x, 0') → s'(0')
f'(s'(x), s'(y)) → s'(f'(x, y))
g'(0', x) → g'(f'(x, x), x)

Types:
f' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
g' :: 0':s' → 0':s' → g'
_hole_0':s'1 :: 0':s'
_hole_g'2 :: g'
_gen_0':s'3 :: Nat → 0':s'

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

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

Rules:
f'(x, 0') → s'(0')
f'(s'(x), s'(y)) → s'(f'(x, y))
g'(0', x) → g'(f'(x, x), x)

Types:
f' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
g' :: 0':s' → 0':s' → g'
_hole_0':s'1 :: 0':s'
_hole_g'2 :: g'
_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:
f', g'

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

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

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

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

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

Rules:
f'(x, 0') → s'(0')
f'(s'(x), s'(y)) → s'(f'(x, y))
g'(0', x) → g'(f'(x, x), x)

Types:
f' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
g' :: 0':s' → 0':s' → g'
_hole_0':s'1 :: 0':s'
_hole_g'2 :: g'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
f'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(+(1, _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:
g'

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

Rules:
f'(x, 0') → s'(0')
f'(s'(x), s'(y)) → s'(f'(x, y))
g'(0', x) → g'(f'(x, x), x)

Types:
f' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
g' :: 0':s' → 0':s' → g'
_hole_0':s'1 :: 0':s'
_hole_g'2 :: g'
_gen_0':s'3 :: Nat → 0':s'

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

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:
f'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(+(1, _n5)), rt ∈ Ω(1 + n5)