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

f(0, y) → y
f(x, 0) → x
f(i(x), y) → i(x)
f(f(x, y), z) → f(x, f(y, z))
f(g(x, y), z) → g(f(x, z), f(y, z))
f(1, g(x, y)) → x
f(2, g(x, y)) → 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'(0', y) → y
f'(x, 0') → x
f'(i'(x), y) → i'(x)
f'(f'(x, y), z) → f'(x, f'(y, z))
f'(g'(x, y), z) → g'(f'(x, z), f'(y, z))
f'(1', g'(x, y)) → x
f'(2', g'(x, y)) → y

Rewrite Strategy: INNERMOST

Sliced the following arguments:
i'/0

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

f'(0', y) → y
f'(x, 0') → x
f'(i', y) → i'
f'(f'(x, y), z) → f'(x, f'(y, z))
f'(g'(x, y), z) → g'(f'(x, z), f'(y, z))
f'(1', g'(x, y)) → x
f'(2', g'(x, y)) → y

Rewrite Strategy: INNERMOST

Infered types.

Rules:
f'(0', y) → y
f'(x, 0') → x
f'(i', y) → i'
f'(f'(x, y), z) → f'(x, f'(y, z))
f'(g'(x, y), z) → g'(f'(x, z), f'(y, z))
f'(1', g'(x, y)) → x
f'(2', g'(x, y)) → y

Types:
f' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
0' :: 0':i':g':1':2'
i' :: 0':i':g':1':2'
g' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
1' :: 0':i':g':1':2'
2' :: 0':i':g':1':2'
_hole_0':i':g':1':2'1 :: 0':i':g':1':2'
_gen_0':i':g':1':2'2 :: Nat → 0':i':g':1':2'

Heuristically decided to analyse the following defined symbols:
f'

Rules:
f'(0', y) → y
f'(x, 0') → x
f'(i', y) → i'
f'(f'(x, y), z) → f'(x, f'(y, z))
f'(g'(x, y), z) → g'(f'(x, z), f'(y, z))
f'(1', g'(x, y)) → x
f'(2', g'(x, y)) → y

Types:
f' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
0' :: 0':i':g':1':2'
i' :: 0':i':g':1':2'
g' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
1' :: 0':i':g':1':2'
2' :: 0':i':g':1':2'
_hole_0':i':g':1':2'1 :: 0':i':g':1':2'
_gen_0':i':g':1':2'2 :: Nat → 0':i':g':1':2'

Generator Equations:
_gen_0':i':g':1':2'2(0) ⇔ 0'
_gen_0':i':g':1':2'2(+(x, 1)) ⇔ g'(0', _gen_0':i':g':1':2'2(x))

The following defined symbols remain to be analysed:
f'

Proved the following rewrite lemma:
f'(_gen_0':i':g':1':2'2(_n4), _gen_0':i':g':1':2'2(b)) → _*3, rt ∈ Ω(n4)

Induction Base:
f'(_gen_0':i':g':1':2'2(0), _gen_0':i':g':1':2'2(b))

Induction Step:
f'(_gen_0':i':g':1':2'2(+(_\$n5, 1)), _gen_0':i':g':1':2'2(_b70189)) →RΩ(1)
g'(f'(0', _gen_0':i':g':1':2'2(_b70189)), f'(_gen_0':i':g':1':2'2(_\$n5), _gen_0':i':g':1':2'2(_b70189))) →RΩ(1)
g'(_gen_0':i':g':1':2'2(_b70189), f'(_gen_0':i':g':1':2'2(_\$n5), _gen_0':i':g':1':2'2(_b70189))) →IH
g'(_gen_0':i':g':1':2'2(_b70189), _*3)

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

Rules:
f'(0', y) → y
f'(x, 0') → x
f'(i', y) → i'
f'(f'(x, y), z) → f'(x, f'(y, z))
f'(g'(x, y), z) → g'(f'(x, z), f'(y, z))
f'(1', g'(x, y)) → x
f'(2', g'(x, y)) → y

Types:
f' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
0' :: 0':i':g':1':2'
i' :: 0':i':g':1':2'
g' :: 0':i':g':1':2' → 0':i':g':1':2' → 0':i':g':1':2'
1' :: 0':i':g':1':2'
2' :: 0':i':g':1':2'
_hole_0':i':g':1':2'1 :: 0':i':g':1':2'
_gen_0':i':g':1':2'2 :: Nat → 0':i':g':1':2'

Lemmas:
f'(_gen_0':i':g':1':2'2(_n4), _gen_0':i':g':1':2'2(b)) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_0':i':g':1':2'2(0) ⇔ 0'
_gen_0':i':g':1':2'2(+(x, 1)) ⇔ g'(0', _gen_0':i':g':1':2'2(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
f'(_gen_0':i':g':1':2'2(_n4), _gen_0':i':g':1':2'2(b)) → _*3, rt ∈ Ω(n4)