Runtime Complexity TRS:
The TRS R consists of the following rules:
+(0, y) → y
+(s(x), y) → s(+(x, y))
*(x, 0) → 0
*(x, s(y)) → +(x, *(x, y))
twice(0) → 0
twice(s(x)) → s(s(twice(x)))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
f(s(x)) → f(-(*(s(s(x)), s(s(x))), +(*(s(x), s(s(x))), s(s(0)))))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Infered types.
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Heuristically decided to analyse the following defined symbols:
+', *', twice', -', f'
They will be analysed ascendingly in the following order:
+' < *'
+' < f'
*' < f'
-' < f'
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
The following defined symbols remain to be analysed:
+', *', twice', -', f'
They will be analysed ascendingly in the following order:
+' < *'
+' < f'
*' < f'
-' < f'
Proved the following rewrite lemma:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
Induction Base:
+'(_gen_0':s'3(0), _gen_0':s'3(b)) →RΩ(1)
_gen_0':s'3(b)
Induction Step:
+'(_gen_0':s'3(+(_$n6, 1)), _gen_0':s'3(_b138)) →RΩ(1)
s'(+'(_gen_0':s'3(_$n6), _gen_0':s'3(_b138))) →IH
s'(_gen_0':s'3(+(_$n6, _b138)))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Lemmas:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
The following defined symbols remain to be analysed:
*', twice', -', f'
They will be analysed ascendingly in the following order:
*' < f'
-' < f'
Proved the following rewrite lemma:
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)
Induction Base:
*'(_gen_0':s'3(a), _gen_0':s'3(0)) →RΩ(1)
0'
Induction Step:
*'(_gen_0':s'3(_a837), _gen_0':s'3(+(_$n578, 1))) →RΩ(1)
+'(_gen_0':s'3(_a837), *'(_gen_0':s'3(_a837), _gen_0':s'3(_$n578))) →IH
+'(_gen_0':s'3(_a837), _gen_0':s'3(*(_$n578, _a837))) →LΩ(1 + a837)
_gen_0':s'3(+(_a837, *(_$n578, _a837)))
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Lemmas:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
The following defined symbols remain to be analysed:
twice', -', f'
They will be analysed ascendingly in the following order:
-' < f'
Proved the following rewrite lemma:
twice'(_gen_0':s'3(_n1484)) → _gen_0':s'3(*(2, _n1484)), rt ∈ Ω(1 + n1484)
Induction Base:
twice'(_gen_0':s'3(0)) →RΩ(1)
0'
Induction Step:
twice'(_gen_0':s'3(+(_$n1485, 1))) →RΩ(1)
s'(s'(twice'(_gen_0':s'3(_$n1485)))) →IH
s'(s'(_gen_0':s'3(*(2, _$n1485))))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Lemmas:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)
twice'(_gen_0':s'3(_n1484)) → _gen_0':s'3(*(2, _n1484)), rt ∈ Ω(1 + n1484)
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
The following defined symbols remain to be analysed:
-', f'
They will be analysed ascendingly in the following order:
-' < f'
Proved the following rewrite lemma:
-'(_gen_0':s'3(_n1926), _gen_0':s'3(_n1926)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1926)
Induction Base:
-'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(0)
Induction Step:
-'(_gen_0':s'3(+(_$n1927, 1)), _gen_0':s'3(+(_$n1927, 1))) →RΩ(1)
-'(_gen_0':s'3(_$n1927), _gen_0':s'3(_$n1927)) →IH
_gen_0':s'3(0)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Lemmas:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)
twice'(_gen_0':s'3(_n1484)) → _gen_0':s'3(*(2, _n1484)), rt ∈ Ω(1 + n1484)
-'(_gen_0':s'3(_n1926), _gen_0':s'3(_n1926)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1926)
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
The following defined symbols remain to be analysed:
f'
Could not prove a rewrite lemma for the defined symbol f'.
Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
*'(x, 0') → 0'
*'(x, s'(y)) → +'(x, *'(x, y))
twice'(0') → 0'
twice'(s'(x)) → s'(s'(twice'(x)))
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
f'(s'(x)) → f'(-'(*'(s'(s'(x)), s'(s'(x))), +'(*'(s'(x), s'(s'(x))), s'(s'(0')))))
Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
twice' :: 0':s' → 0':s'
-' :: 0':s' → 0':s' → 0':s'
f' :: 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'
Lemmas:
+'(_gen_0':s'3(_n5), _gen_0':s'3(b)) → _gen_0':s'3(+(_n5, b)), rt ∈ Ω(1 + n5)
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)
twice'(_gen_0':s'3(_n1484)) → _gen_0':s'3(*(2, _n1484)), rt ∈ Ω(1 + n1484)
-'(_gen_0':s'3(_n1926), _gen_0':s'3(_n1926)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1926)
Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))
No more defined symbols left to analyse.
The lowerbound Ω(n2) was proven with the following lemma:
*'(_gen_0':s'3(a), _gen_0':s'3(_n577)) → _gen_0':s'3(*(_n577, a)), rt ∈ Ω(1 + a837·n577 + n577)