Runtime Complexity TRS:
The TRS R consists of the following rules:
sum(0) → 0
sum(s(x)) → +(sum(x), s(x))
sum1(0) → 0
sum1(s(x)) → s(+(sum1(x), +(x, x)))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x), s'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x), +'(x, x)))
Sliced the following arguments:
+'/1
Runtime Complexity TRS:
The TRS R consists of the following rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x)))
Infered types.
Rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x)))
Types:
sum' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+'
sum1' :: 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:
sum', sum1'
Rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x)))
Types:
sum' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+'
sum1' :: 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:
sum', sum1'
Proved the following rewrite lemma:
sum'(_gen_0':s':+'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)
Induction Base:
sum'(_gen_0':s':+'2(+(1, 0)))
Induction Step:
sum'(_gen_0':s':+'2(+(1, +(_$n5, 1)))) →RΩ(1)
+'(sum'(_gen_0':s':+'2(+(1, _$n5)))) →IH
+'(_*3)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x)))
Types:
sum' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+'
sum1' :: 0':s':+' → 0':s':+'
_hole_0':s':+'1 :: 0':s':+'
_gen_0':s':+'2 :: Nat → 0':s':+'
Lemmas:
sum'(_gen_0':s':+'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)
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:
sum1'
Proved the following rewrite lemma:
sum1'(_gen_0':s':+'2(+(1, _n682))) → _*3, rt ∈ Ω(n682)
Induction Base:
sum1'(_gen_0':s':+'2(+(1, 0)))
Induction Step:
sum1'(_gen_0':s':+'2(+(1, +(_$n683, 1)))) →RΩ(1)
s'(+'(sum1'(_gen_0':s':+'2(+(1, _$n683))))) →IH
s'(+'(_*3))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
sum'(0') → 0'
sum'(s'(x)) → +'(sum'(x))
sum1'(0') → 0'
sum1'(s'(x)) → s'(+'(sum1'(x)))
Types:
sum' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+'
sum1' :: 0':s':+' → 0':s':+'
_hole_0':s':+'1 :: 0':s':+'
_gen_0':s':+'2 :: Nat → 0':s':+'
Lemmas:
sum'(_gen_0':s':+'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)
sum1'(_gen_0':s':+'2(+(1, _n682))) → _*3, rt ∈ Ω(n682)
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:
sum'(_gen_0':s':+'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)