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