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

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


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

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
f' :: t' → s':0' → s':0' → f'
t' :: t'
g' :: s':0' → s':0' → t'
s' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_t'2 :: t'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'


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

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


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

Types:
f' :: t' → s':0' → s':0' → f'
t' :: t'
g' :: s':0' → s':0' → t'
s' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_t'2 :: t'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

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

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

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


Proved the following rewrite lemma:
g'(_gen_s':0'4(+(1, _n6)), _gen_s':0'4(_n6)) → t', rt ∈ Ω(1 + n6)

Induction Base:
g'(_gen_s':0'4(+(1, 0)), _gen_s':0'4(0)) →RΩ(1)
t'

Induction Step:
g'(_gen_s':0'4(+(1, +(_$n7, 1))), _gen_s':0'4(+(_$n7, 1))) →RΩ(1)
g'(_gen_s':0'4(+(1, _$n7)), _gen_s':0'4(_$n7)) →IH
t'

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


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

Types:
f' :: t' → s':0' → s':0' → f'
t' :: t'
g' :: s':0' → s':0' → t'
s' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_t'2 :: t'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
g'(_gen_s':0'4(+(1, _n6)), _gen_s':0'4(_n6)) → t', rt ∈ Ω(1 + n6)

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

The following defined symbols remain to be analysed:
f'


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


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

Types:
f' :: t' → s':0' → s':0' → f'
t' :: t'
g' :: s':0' → s':0' → t'
s' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_t'2 :: t'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
g'(_gen_s':0'4(+(1, _n6)), _gen_s':0'4(_n6)) → t', rt ∈ Ω(1 + n6)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
g'(_gen_s':0'4(+(1, _n6)), _gen_s':0'4(_n6)) → t', rt ∈ Ω(1 + n6)