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

w(r(x)) → r(w(x))
b(r(x)) → r(b(x))
b(w(x)) → w(b(x))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


w'(r'(x)) → r'(w'(x))
b'(r'(x)) → r'(b'(x))
b'(w'(x)) → w'(b'(x))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
w'(r'(x)) → r'(w'(x))
b'(r'(x)) → r'(b'(x))
b'(w'(x)) → w'(b'(x))

Types:
w' :: r' → r'
r' :: r' → r'
b' :: r' → r'
_hole_r'1 :: r'
_gen_r'2 :: Nat → r'


Heuristically decided to analyse the following defined symbols:
w', b'

They will be analysed ascendingly in the following order:
w' < b'


Rules:
w'(r'(x)) → r'(w'(x))
b'(r'(x)) → r'(b'(x))
b'(w'(x)) → w'(b'(x))

Types:
w' :: r' → r'
r' :: r' → r'
b' :: r' → r'
_hole_r'1 :: r'
_gen_r'2 :: Nat → r'

Generator Equations:
_gen_r'2(0) ⇔ _hole_r'1
_gen_r'2(+(x, 1)) ⇔ r'(_gen_r'2(x))

The following defined symbols remain to be analysed:
w', b'

They will be analysed ascendingly in the following order:
w' < b'


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

Induction Base:
w'(_gen_r'2(+(1, 0)))

Induction Step:
w'(_gen_r'2(+(1, +(_$n5, 1)))) →RΩ(1)
r'(w'(_gen_r'2(+(1, _$n5)))) →IH
r'(_*3)

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


Rules:
w'(r'(x)) → r'(w'(x))
b'(r'(x)) → r'(b'(x))
b'(w'(x)) → w'(b'(x))

Types:
w' :: r' → r'
r' :: r' → r'
b' :: r' → r'
_hole_r'1 :: r'
_gen_r'2 :: Nat → r'

Lemmas:
w'(_gen_r'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_r'2(0) ⇔ _hole_r'1
_gen_r'2(+(x, 1)) ⇔ r'(_gen_r'2(x))

The following defined symbols remain to be analysed:
b'


Proved the following rewrite lemma:
b'(_gen_r'2(+(1, _n216))) → _*3, rt ∈ Ω(n216)

Induction Base:
b'(_gen_r'2(+(1, 0)))

Induction Step:
b'(_gen_r'2(+(1, +(_$n217, 1)))) →RΩ(1)
r'(b'(_gen_r'2(+(1, _$n217)))) →IH
r'(_*3)

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


Rules:
w'(r'(x)) → r'(w'(x))
b'(r'(x)) → r'(b'(x))
b'(w'(x)) → w'(b'(x))

Types:
w' :: r' → r'
r' :: r' → r'
b' :: r' → r'
_hole_r'1 :: r'
_gen_r'2 :: Nat → r'

Lemmas:
w'(_gen_r'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)
b'(_gen_r'2(+(1, _n216))) → _*3, rt ∈ Ω(n216)

Generator Equations:
_gen_r'2(0) ⇔ _hole_r'1
_gen_r'2(+(x, 1)) ⇔ r'(_gen_r'2(x))

No more defined symbols left to analyse.


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