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

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

Rewrite Strategy: INNERMOST

Sliced the following arguments:
h'/0

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

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

Rewrite Strategy: INNERMOST

Infered types.

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

Types:
f'' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: g':h'
f''' :: s' → s' → s' → f'''
s' :: s' → s'
_hole_g':h'1 :: g':h'
_hole_f'''2 :: f'''
_hole_s'3 :: s'
_gen_g':h'4 :: Nat → g':h'
_gen_s'5 :: Nat → s'

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

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

Types:
f'' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: g':h'
f''' :: s' → s' → s' → f'''
s' :: s' → s'
_hole_g':h'1 :: g':h'
_hole_f'''2 :: f'''
_hole_s'3 :: s'
_gen_g':h'4 :: Nat → g':h'
_gen_s'5 :: Nat → s'

Generator Equations:
_gen_g':h'4(0) ⇔ h'
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))
_gen_s'5(0) ⇔ _hole_s'3
_gen_s'5(+(x, 1)) ⇔ s'(_gen_s'5(x))

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

Proved the following rewrite lemma:
f''(_gen_g':h'4(+(1, _n7))) → _*6, rt ∈ Ω(n7)

Induction Base:
f''(_gen_g':h'4(+(1, 0)))

Induction Step:
f''(_gen_g':h'4(+(1, +(_\$n8, 1)))) →RΩ(1)
g'(f''(f''(_gen_g':h'4(+(1, _\$n8))))) →IH
g'(f''(_*6))

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

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

Types:
f'' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: g':h'
f''' :: s' → s' → s' → f'''
s' :: s' → s'
_hole_g':h'1 :: g':h'
_hole_f'''2 :: f'''
_hole_s'3 :: s'
_gen_g':h'4 :: Nat → g':h'
_gen_s'5 :: Nat → s'

Lemmas:
f''(_gen_g':h'4(+(1, _n7))) → _*6, rt ∈ Ω(n7)

Generator Equations:
_gen_g':h'4(0) ⇔ h'
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))
_gen_s'5(0) ⇔ _hole_s'3
_gen_s'5(+(x, 1)) ⇔ s'(_gen_s'5(x))

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

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

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

Types:
f'' :: g':h' → g':h'
g' :: g':h' → g':h'
h' :: g':h'
f''' :: s' → s' → s' → f'''
s' :: s' → s'
_hole_g':h'1 :: g':h'
_hole_f'''2 :: f'''
_hole_s'3 :: s'
_gen_g':h'4 :: Nat → g':h'
_gen_s'5 :: Nat → s'

Lemmas:
f''(_gen_g':h'4(+(1, _n7))) → _*6, rt ∈ Ω(n7)

Generator Equations:
_gen_g':h'4(0) ⇔ h'
_gen_g':h'4(+(x, 1)) ⇔ g'(_gen_g':h'4(x))
_gen_s'5(0) ⇔ _hole_s'3
_gen_s'5(+(x, 1)) ⇔ s'(_gen_s'5(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
f''(_gen_g':h'4(+(1, _n7))) → _*6, rt ∈ Ω(n7)