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

+(x, 0) → x
+(x, s(y)) → s(+(x, y))
+(0, y) → y
+(s(x), y) → s(+(x, y))
+(x, +(y, z)) → +(+(x, y), z)
f(g(f(x))) → f(h(s(0), x))
f(g(h(x, y))) → f(h(s(x), y))
f(h(x, h(y, z))) → f(h(+(x, y), z))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


+'(x, 0') → x
+'(x, s'(y)) → s'(+'(x, y))
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(x, +'(y, z)) → +'(+'(x, y), z)
f'(g'(f'(x))) → f'(h'(s'(0'), x))
f'(g'(h'(x, y))) → f'(h'(s'(x), y))
f'(h'(x, h'(y, z))) → f'(h'(+'(x, y), z))

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
f' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: 0':s' → g':h' → g':h'
_hole_0':s'1 :: 0':s'
_hole_g':h'2 :: g':h'
_gen_0':s'3 :: Nat → 0':s'
_gen_g':h'4 :: Nat → g':h'


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

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


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

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
f' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: 0':s' → g':h' → g':h'
_hole_0':s'1 :: 0':s'
_hole_g':h'2 :: g':h'
_gen_0':s'3 :: Nat → 0':s'
_gen_g':h'4 :: Nat → g':h'

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
_gen_g':h'4(0) ⇔ _hole_g':h'2
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))

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

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


Proved the following rewrite lemma:
+'(_gen_0':s'3(a), _gen_0':s'3(_n6)) → _gen_0':s'3(+(_n6, a)), rt ∈ Ω(1 + n6)

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

Induction Step:
+'(_gen_0':s'3(_a319), _gen_0':s'3(+(_$n7, 1))) →RΩ(1)
s'(+'(_gen_0':s'3(_a319), _gen_0':s'3(_$n7))) →IH
s'(_gen_0':s'3(+(_$n7, _a319)))

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


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

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
f' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: 0':s' → g':h' → g':h'
_hole_0':s'1 :: 0':s'
_hole_g':h'2 :: g':h'
_gen_0':s'3 :: Nat → 0':s'
_gen_g':h'4 :: Nat → g':h'

Lemmas:
+'(_gen_0':s'3(a), _gen_0':s'3(_n6)) → _gen_0':s'3(+(_n6, a)), rt ∈ Ω(1 + n6)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
_gen_g':h'4(0) ⇔ _hole_g':h'2
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))

The following defined symbols remain to be analysed:
f'


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


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

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
f' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: 0':s' → g':h' → g':h'
_hole_0':s'1 :: 0':s'
_hole_g':h'2 :: g':h'
_gen_0':s'3 :: Nat → 0':s'
_gen_g':h'4 :: Nat → g':h'

Lemmas:
+'(_gen_0':s'3(a), _gen_0':s'3(_n6)) → _gen_0':s'3(+(_n6, a)), rt ∈ Ω(1 + n6)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
_gen_g':h'4(0) ⇔ _hole_g':h'2
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
+'(_gen_0':s'3(a), _gen_0':s'3(_n6)) → _gen_0':s'3(+(_n6, a)), rt ∈ Ω(1 + n6)