Runtime Complexity TRS:
The TRS R consists of the following rules:
O(0) → 0
+(0, x) → x
+(x, 0) → x
+(O(x), O(y)) → O(+(x, y))
+(O(x), I(y)) → I(+(x, y))
+(I(x), O(y)) → I(+(x, y))
+(I(x), I(y)) → O(+(+(x, y), I(0)))
*(0, x) → 0
*(x, 0) → 0
*(O(x), y) → O(*(x, y))
*(I(x), y) → +(O(*(x, y)), y)
-(x, 0) → x
-(0, x) → 0
-(O(x), O(y)) → O(-(x, y))
-(O(x), I(y)) → I(-(-(x, y), I(1)))
-(I(x), O(y)) → I(-(x, y))
-(I(x), I(y)) → O(-(x, y))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Infered types.
Rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Types:
O' :: 0':I':1' → 0':I':1'
0' :: 0':I':1'
+' :: 0':I':1' → 0':I':1' → 0':I':1'
I' :: 0':I':1' → 0':I':1'
*' :: 0':I':1' → 0':I':1' → 0':I':1'
-' :: 0':I':1' → 0':I':1' → 0':I':1'
1' :: 0':I':1'
_hole_0':I':1'1 :: 0':I':1'
_gen_0':I':1'2 :: Nat → 0':I':1'
Heuristically decided to analyse the following defined symbols:
+', *', -'
They will be analysed ascendingly in the following order:
+' < *'
Rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Types:
O' :: 0':I':1' → 0':I':1'
0' :: 0':I':1'
+' :: 0':I':1' → 0':I':1' → 0':I':1'
I' :: 0':I':1' → 0':I':1'
*' :: 0':I':1' → 0':I':1' → 0':I':1'
-' :: 0':I':1' → 0':I':1' → 0':I':1'
1' :: 0':I':1'
_hole_0':I':1'1 :: 0':I':1'
_gen_0':I':1'2 :: Nat → 0':I':1'
Generator Equations:
_gen_0':I':1'2(0) ⇔ 0'
_gen_0':I':1'2(+(x, 1)) ⇔ I'(_gen_0':I':1'2(x))
The following defined symbols remain to be analysed:
+', *', -'
They will be analysed ascendingly in the following order:
+' < *'
Proved the following rewrite lemma:
+'(_gen_0':I':1'2(_n4), _gen_0':I':1'2(_n4)) → _*3, rt ∈ Ω(n4)
Induction Base:
+'(_gen_0':I':1'2(0), _gen_0':I':1'2(0))
Induction Step:
+'(_gen_0':I':1'2(+(_$n5, 1)), _gen_0':I':1'2(+(_$n5, 1))) →RΩ(1)
O'(+'(+'(_gen_0':I':1'2(_$n5), _gen_0':I':1'2(_$n5)), I'(0'))) →IH
O'(+'(_*3, I'(0')))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Types:
O' :: 0':I':1' → 0':I':1'
0' :: 0':I':1'
+' :: 0':I':1' → 0':I':1' → 0':I':1'
I' :: 0':I':1' → 0':I':1'
*' :: 0':I':1' → 0':I':1' → 0':I':1'
-' :: 0':I':1' → 0':I':1' → 0':I':1'
1' :: 0':I':1'
_hole_0':I':1'1 :: 0':I':1'
_gen_0':I':1'2 :: Nat → 0':I':1'
Lemmas:
+'(_gen_0':I':1'2(_n4), _gen_0':I':1'2(_n4)) → _*3, rt ∈ Ω(n4)
Generator Equations:
_gen_0':I':1'2(0) ⇔ 0'
_gen_0':I':1'2(+(x, 1)) ⇔ I'(_gen_0':I':1'2(x))
The following defined symbols remain to be analysed:
*', -'
Proved the following rewrite lemma:
*'(_gen_0':I':1'2(_n16817), _gen_0':I':1'2(0)) → _gen_0':I':1'2(0), rt ∈ Ω(1 + n16817)
Induction Base:
*'(_gen_0':I':1'2(0), _gen_0':I':1'2(0)) →RΩ(1)
0'
Induction Step:
*'(_gen_0':I':1'2(+(_$n16818, 1)), _gen_0':I':1'2(0)) →RΩ(1)
+'(O'(*'(_gen_0':I':1'2(_$n16818), _gen_0':I':1'2(0))), _gen_0':I':1'2(0)) →IH
+'(O'(_gen_0':I':1'2(0)), _gen_0':I':1'2(0)) →RΩ(1)
+'(0', _gen_0':I':1'2(0)) →RΩ(1)
_gen_0':I':1'2(0)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Types:
O' :: 0':I':1' → 0':I':1'
0' :: 0':I':1'
+' :: 0':I':1' → 0':I':1' → 0':I':1'
I' :: 0':I':1' → 0':I':1'
*' :: 0':I':1' → 0':I':1' → 0':I':1'
-' :: 0':I':1' → 0':I':1' → 0':I':1'
1' :: 0':I':1'
_hole_0':I':1'1 :: 0':I':1'
_gen_0':I':1'2 :: Nat → 0':I':1'
Lemmas:
+'(_gen_0':I':1'2(_n4), _gen_0':I':1'2(_n4)) → _*3, rt ∈ Ω(n4)
*'(_gen_0':I':1'2(_n16817), _gen_0':I':1'2(0)) → _gen_0':I':1'2(0), rt ∈ Ω(1 + n16817)
Generator Equations:
_gen_0':I':1'2(0) ⇔ 0'
_gen_0':I':1'2(+(x, 1)) ⇔ I'(_gen_0':I':1'2(x))
The following defined symbols remain to be analysed:
-'
Proved the following rewrite lemma:
-'(_gen_0':I':1'2(_n23818), _gen_0':I':1'2(_n23818)) → _gen_0':I':1'2(0), rt ∈ Ω(1 + n23818)
Induction Base:
-'(_gen_0':I':1'2(0), _gen_0':I':1'2(0)) →RΩ(1)
_gen_0':I':1'2(0)
Induction Step:
-'(_gen_0':I':1'2(+(_$n23819, 1)), _gen_0':I':1'2(+(_$n23819, 1))) →RΩ(1)
O'(-'(_gen_0':I':1'2(_$n23819), _gen_0':I':1'2(_$n23819))) →IH
O'(_gen_0':I':1'2(0)) →RΩ(1)
0'
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
O'(0') → 0'
+'(0', x) → x
+'(x, 0') → x
+'(O'(x), O'(y)) → O'(+'(x, y))
+'(O'(x), I'(y)) → I'(+'(x, y))
+'(I'(x), O'(y)) → I'(+'(x, y))
+'(I'(x), I'(y)) → O'(+'(+'(x, y), I'(0')))
*'(0', x) → 0'
*'(x, 0') → 0'
*'(O'(x), y) → O'(*'(x, y))
*'(I'(x), y) → +'(O'(*'(x, y)), y)
-'(x, 0') → x
-'(0', x) → 0'
-'(O'(x), O'(y)) → O'(-'(x, y))
-'(O'(x), I'(y)) → I'(-'(-'(x, y), I'(1')))
-'(I'(x), O'(y)) → I'(-'(x, y))
-'(I'(x), I'(y)) → O'(-'(x, y))
Types:
O' :: 0':I':1' → 0':I':1'
0' :: 0':I':1'
+' :: 0':I':1' → 0':I':1' → 0':I':1'
I' :: 0':I':1' → 0':I':1'
*' :: 0':I':1' → 0':I':1' → 0':I':1'
-' :: 0':I':1' → 0':I':1' → 0':I':1'
1' :: 0':I':1'
_hole_0':I':1'1 :: 0':I':1'
_gen_0':I':1'2 :: Nat → 0':I':1'
Lemmas:
+'(_gen_0':I':1'2(_n4), _gen_0':I':1'2(_n4)) → _*3, rt ∈ Ω(n4)
*'(_gen_0':I':1'2(_n16817), _gen_0':I':1'2(0)) → _gen_0':I':1'2(0), rt ∈ Ω(1 + n16817)
-'(_gen_0':I':1'2(_n23818), _gen_0':I':1'2(_n23818)) → _gen_0':I':1'2(0), rt ∈ Ω(1 + n23818)
Generator Equations:
_gen_0':I':1'2(0) ⇔ 0'
_gen_0':I':1'2(+(x, 1)) ⇔ I'(_gen_0':I':1'2(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
+'(_gen_0':I':1'2(_n4), _gen_0':I':1'2(_n4)) → _*3, rt ∈ Ω(n4)