Runtime Complexity TRS:
The TRS R consists of the following rules:
f(0, y) → 0
f(s(x), y) → f(f(x, y), y)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
f'(0', y) → 0'
f'(s'(x), y) → f'(f'(x, y), y)
Sliced the following arguments:
f'/1
Runtime Complexity TRS:
The TRS R consists of the following rules:
f'(0') → 0'
f'(s'(x)) → f'(f'(x))
Infered types.
Rules:
f'(0') → 0'
f'(s'(x)) → f'(f'(x))
Types:
f' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Heuristically decided to analyse the following defined symbols:
f'
Rules:
f'(0') → 0'
f'(s'(x)) → f'(f'(x))
Types:
f' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Generator Equations:
_gen_0':s'2(0) ⇔ 0'
_gen_0':s'2(+(x, 1)) ⇔ s'(_gen_0':s'2(x))
The following defined symbols remain to be analysed:
f'
Proved the following rewrite lemma:
f'(_gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)
Induction Base:
f'(_gen_0':s'2(0)) →RΩ(1)
0'
Induction Step:
f'(_gen_0':s'2(+(_$n5, 1))) →RΩ(1)
f'(f'(_gen_0':s'2(_$n5))) →IH
f'(_gen_0':s'2(0)) →RΩ(1)
0'
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
f'(0') → 0'
f'(s'(x)) → f'(f'(x))
Types:
f' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
f'(_gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)
Generator Equations:
_gen_0':s'2(0) ⇔ 0'
_gen_0':s'2(+(x, 1)) ⇔ s'(_gen_0':s'2(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
f'(_gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)