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

eq0(S(x'), S(x)) → eq0(x', x)
eq0(S(x), 0) → 0
eq0(0, S(x)) → 0
eq0(0, 0) → S(0)

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


eq0'(S'(x'), S'(x)) → eq0'(x', x)
eq0'(S'(x), 0') → 0'
eq0'(0', S'(x)) → 0'
eq0'(0', 0') → S'(0')

Rewrite Strategy: INNERMOST


Infered types.


Rules:
eq0'(S'(x'), S'(x)) → eq0'(x', x)
eq0'(S'(x), 0') → 0'
eq0'(0', S'(x)) → 0'
eq0'(0', 0') → S'(0')

Types:
eq0' :: S':0' → S':0' → S':0'
S' :: S':0' → S':0'
0' :: S':0'
_hole_S':0'1 :: S':0'
_gen_S':0'2 :: Nat → S':0'


Heuristically decided to analyse the following defined symbols:
eq0'


Rules:
eq0'(S'(x'), S'(x)) → eq0'(x', x)
eq0'(S'(x), 0') → 0'
eq0'(0', S'(x)) → 0'
eq0'(0', 0') → S'(0')

Types:
eq0' :: S':0' → S':0' → S':0'
S' :: S':0' → S':0'
0' :: S':0'
_hole_S':0'1 :: S':0'
_gen_S':0'2 :: Nat → S':0'

Generator Equations:
_gen_S':0'2(0) ⇔ 0'
_gen_S':0'2(+(x, 1)) ⇔ S'(_gen_S':0'2(x))

The following defined symbols remain to be analysed:
eq0'


Proved the following rewrite lemma:
eq0'(_gen_S':0'2(+(1, _n4)), _gen_S':0'2(_n4)) → _gen_S':0'2(0), rt ∈ Ω(1 + n4)

Induction Base:
eq0'(_gen_S':0'2(+(1, 0)), _gen_S':0'2(0)) →RΩ(1)
0'

Induction Step:
eq0'(_gen_S':0'2(+(1, +(_$n5, 1))), _gen_S':0'2(+(_$n5, 1))) →RΩ(1)
eq0'(_gen_S':0'2(+(1, _$n5)), _gen_S':0'2(_$n5)) →IH
_gen_S':0'2(0)

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


Rules:
eq0'(S'(x'), S'(x)) → eq0'(x', x)
eq0'(S'(x), 0') → 0'
eq0'(0', S'(x)) → 0'
eq0'(0', 0') → S'(0')

Types:
eq0' :: S':0' → S':0' → S':0'
S' :: S':0' → S':0'
0' :: S':0'
_hole_S':0'1 :: S':0'
_gen_S':0'2 :: Nat → S':0'

Lemmas:
eq0'(_gen_S':0'2(+(1, _n4)), _gen_S':0'2(_n4)) → _gen_S':0'2(0), rt ∈ Ω(1 + n4)

Generator Equations:
_gen_S':0'2(0) ⇔ 0'
_gen_S':0'2(+(x, 1)) ⇔ S'(_gen_S':0'2(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
eq0'(_gen_S':0'2(+(1, _n4)), _gen_S':0'2(_n4)) → _gen_S':0'2(0), rt ∈ Ω(1 + n4)