Runtime Complexity TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(x)) → x
minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
minus(x, s(y)) → p(minus(x, y))
div(0, s(y)) → 0
div(s(x), s(y)) → s(div(minus(s(x), s(y)), s(y)))
log(s(0), s(s(y))) → 0
log(s(s(x)), s(s(y))) → s(log(div(minus(x, y), s(s(y))), s(s(y))))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Infered types.
Rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Types:
p' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
log' :: 0':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:
minus', div', log'
They will be analysed ascendingly in the following order:
minus' < div'
minus' < log'
div' < log'
Rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Types:
p' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
log' :: 0':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:
minus', div', log'
They will be analysed ascendingly in the following order:
minus' < div'
minus' < log'
div' < log'
Proved the following rewrite lemma:
minus'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)
Induction Base:
minus'(_gen_0':s'2(0), _gen_0':s'2(0)) →RΩ(1)
_gen_0':s'2(0)
Induction Step:
minus'(_gen_0':s'2(+(_$n5, 1)), _gen_0':s'2(+(_$n5, 1))) →RΩ(1)
minus'(_gen_0':s'2(_$n5), _gen_0':s'2(_$n5)) →IH
_gen_0':s'2(0)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Types:
p' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
minus'(_gen_0':s'2(_n4), _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))
The following defined symbols remain to be analysed:
div', log'
They will be analysed ascendingly in the following order:
div' < log'
Could not prove a rewrite lemma for the defined symbol div'.
Rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Types:
p' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
minus'(_gen_0':s'2(_n4), _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))
The following defined symbols remain to be analysed:
log'
Could not prove a rewrite lemma for the defined symbol log'.
Rules:
p'(0') → 0'
p'(s'(x)) → x
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
minus'(x, s'(y)) → p'(minus'(x, y))
div'(0', s'(y)) → 0'
div'(s'(x), s'(y)) → s'(div'(minus'(s'(x), s'(y)), s'(y)))
log'(s'(0'), s'(s'(y))) → 0'
log'(s'(s'(x)), s'(s'(y))) → s'(log'(div'(minus'(x, y), s'(s'(y))), s'(s'(y))))
Types:
p' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
minus'(_gen_0':s'2(_n4), _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:
minus'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)