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

h(f(x, y)) → f(y, f(h(h(x)), a))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


h'(f'(x, y)) → f'(y, f'(h'(h'(x)), a'))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
h'(f'(x, y)) → f'(y, f'(h'(h'(x)), a'))

Types:
h' :: f':a' → f':a'
f' :: f':a' → f':a' → f':a'
a' :: f':a'
_hole_f':a'1 :: f':a'
_gen_f':a'2 :: Nat → f':a'


Heuristically decided to analyse the following defined symbols:
h'


Rules:
h'(f'(x, y)) → f'(y, f'(h'(h'(x)), a'))

Types:
h' :: f':a' → f':a'
f' :: f':a' → f':a' → f':a'
a' :: f':a'
_hole_f':a'1 :: f':a'
_gen_f':a'2 :: Nat → f':a'

Generator Equations:
_gen_f':a'2(0) ⇔ a'
_gen_f':a'2(+(x, 1)) ⇔ f'(_gen_f':a'2(x), a')

The following defined symbols remain to be analysed:
h'


Proved the following rewrite lemma:
h'(_gen_f':a'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Induction Base:
h'(_gen_f':a'2(+(1, 0)))

Induction Step:
h'(_gen_f':a'2(+(1, +(_$n5, 1)))) →RΩ(1)
f'(a', f'(h'(h'(_gen_f':a'2(+(1, _$n5)))), a')) →IH
f'(a', f'(h'(_*3), a'))

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


Rules:
h'(f'(x, y)) → f'(y, f'(h'(h'(x)), a'))

Types:
h' :: f':a' → f':a'
f' :: f':a' → f':a' → f':a'
a' :: f':a'
_hole_f':a'1 :: f':a'
_gen_f':a'2 :: Nat → f':a'

Lemmas:
h'(_gen_f':a'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_f':a'2(0) ⇔ a'
_gen_f':a'2(+(x, 1)) ⇔ f'(_gen_f':a'2(x), a')

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
h'(_gen_f':a'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)