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

f(a, a) → f(a, b)
f(a, b) → f(s(a), c)
f(s(X), c) → f(X, c)
f(c, c) → f(a, a)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

f'(a', a') → f'(a', b')
f'(a', b') → f'(s'(a'), c')
f'(s'(X), c') → f'(X, c')
f'(c', c') → f'(a', a')

Rewrite Strategy: INNERMOST

Infered types.

Rules:
f'(a', a') → f'(a', b')
f'(a', b') → f'(s'(a'), c')
f'(s'(X), c') → f'(X, c')
f'(c', c') → f'(a', a')

Types:
f' :: a':b':s':c' → a':b':s':c' → f'
a' :: a':b':s':c'
b' :: a':b':s':c'
s' :: a':b':s':c' → a':b':s':c'
c' :: a':b':s':c'
_hole_f'1 :: f'
_hole_a':b':s':c'2 :: a':b':s':c'
_gen_a':b':s':c'3 :: Nat → a':b':s':c'

Heuristically decided to analyse the following defined symbols:
f'

Rules:
f'(a', a') → f'(a', b')
f'(a', b') → f'(s'(a'), c')
f'(s'(X), c') → f'(X, c')
f'(c', c') → f'(a', a')

Types:
f' :: a':b':s':c' → a':b':s':c' → f'
a' :: a':b':s':c'
b' :: a':b':s':c'
s' :: a':b':s':c' → a':b':s':c'
c' :: a':b':s':c'
_hole_f'1 :: f'
_hole_a':b':s':c'2 :: a':b':s':c'
_gen_a':b':s':c'3 :: Nat → a':b':s':c'

Generator Equations:
_gen_a':b':s':c'3(0) ⇔ c'
_gen_a':b':s':c'3(+(x, 1)) ⇔ s'(_gen_a':b':s':c'3(x))

The following defined symbols remain to be analysed:
f'

Proved the following rewrite lemma:
f'(_gen_a':b':s':c'3(+(1, _n5)), _gen_a':b':s':c'3(0)) → _*4, rt ∈ Ω(n5)

Induction Base:
f'(_gen_a':b':s':c'3(+(1, 0)), _gen_a':b':s':c'3(0))

Induction Step:
f'(_gen_a':b':s':c'3(+(1, +(_\$n6, 1))), _gen_a':b':s':c'3(0)) →RΩ(1)
f'(_gen_a':b':s':c'3(+(1, _\$n6)), c') →IH
_*4

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

Rules:
f'(a', a') → f'(a', b')
f'(a', b') → f'(s'(a'), c')
f'(s'(X), c') → f'(X, c')
f'(c', c') → f'(a', a')

Types:
f' :: a':b':s':c' → a':b':s':c' → f'
a' :: a':b':s':c'
b' :: a':b':s':c'
s' :: a':b':s':c' → a':b':s':c'
c' :: a':b':s':c'
_hole_f'1 :: f'
_hole_a':b':s':c'2 :: a':b':s':c'
_gen_a':b':s':c'3 :: Nat → a':b':s':c'

Lemmas:
f'(_gen_a':b':s':c'3(+(1, _n5)), _gen_a':b':s':c'3(0)) → _*4, rt ∈ Ω(n5)

Generator Equations:
_gen_a':b':s':c'3(0) ⇔ c'
_gen_a':b':s':c'3(+(x, 1)) ⇔ s'(_gen_a':b':s':c'3(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
f'(_gen_a':b':s':c'3(+(1, _n5)), _gen_a':b':s':c'3(0)) → _*4, rt ∈ Ω(n5)