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

f(s(x), x) → f(s(x), round(s(x)))
round(0) → 0
round(0) → s(0)
round(s(0)) → s(0)
round(s(s(x))) → s(s(round(x)))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


f'(s'(x), x) → f'(s'(x), round'(s'(x)))
round'(0') → 0'
round'(0') → s'(0')
round'(s'(0')) → s'(0')
round'(s'(s'(x))) → s'(s'(round'(x)))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
f'(s'(x), x) → f'(s'(x), round'(s'(x)))
round'(0') → 0'
round'(0') → s'(0')
round'(s'(0')) → s'(0')
round'(s'(s'(x))) → s'(s'(round'(x)))

Types:
f' :: s':0' → s':0' → f'
s' :: s':0' → s':0'
round' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'


Heuristically decided to analyse the following defined symbols:
f', round'

They will be analysed ascendingly in the following order:
round' < f'


Rules:
f'(s'(x), x) → f'(s'(x), round'(s'(x)))
round'(0') → 0'
round'(0') → s'(0')
round'(s'(0')) → s'(0')
round'(s'(s'(x))) → s'(s'(round'(x)))

Types:
f' :: s':0' → s':0' → f'
s' :: s':0' → s':0'
round' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))

The following defined symbols remain to be analysed:
round', f'

They will be analysed ascendingly in the following order:
round' < f'


Proved the following rewrite lemma:
round'(_gen_s':0'3(*(2, _n5))) → _gen_s':0'3(*(2, _n5)), rt ∈ Ω(1 + n5)

Induction Base:
round'(_gen_s':0'3(*(2, 0))) →RΩ(1)
0'

Induction Step:
round'(_gen_s':0'3(*(2, +(_$n6, 1)))) →RΩ(1)
s'(s'(round'(_gen_s':0'3(*(2, _$n6))))) →IH
s'(s'(_gen_s':0'3(*(2, _$n6))))

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


Rules:
f'(s'(x), x) → f'(s'(x), round'(s'(x)))
round'(0') → 0'
round'(0') → s'(0')
round'(s'(0')) → s'(0')
round'(s'(s'(x))) → s'(s'(round'(x)))

Types:
f' :: s':0' → s':0' → f'
s' :: s':0' → s':0'
round' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
round'(_gen_s':0'3(*(2, _n5))) → _gen_s':0'3(*(2, _n5)), rt ∈ Ω(1 + n5)

Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))

The following defined symbols remain to be analysed:
f'


Could not prove a rewrite lemma for the defined symbol f'.


Rules:
f'(s'(x), x) → f'(s'(x), round'(s'(x)))
round'(0') → 0'
round'(0') → s'(0')
round'(s'(0')) → s'(0')
round'(s'(s'(x))) → s'(s'(round'(x)))

Types:
f' :: s':0' → s':0' → f'
s' :: s':0' → s':0'
round' :: s':0' → s':0'
0' :: s':0'
_hole_f'1 :: f'
_hole_s':0'2 :: s':0'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
round'(_gen_s':0'3(*(2, _n5))) → _gen_s':0'3(*(2, _n5)), rt ∈ Ω(1 + n5)

Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
round'(_gen_s':0'3(*(2, _n5))) → _gen_s':0'3(*(2, _n5)), rt ∈ Ω(1 + n5)