Runtime Complexity TRS:
The TRS R consists of the following rules:
min(X, 0) → X
min(s(X), s(Y)) → min(X, Y)
quot(0, s(Y)) → 0
quot(s(X), s(Y)) → s(quot(min(X, Y), s(Y)))
log(s(0)) → 0
log(s(s(X))) → s(log(s(quot(X, s(s(0))))))
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Infered types.
Rules:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
log' :: 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:
min', quot', log'
They will be analysed ascendingly in the following order:
min' < quot'
quot' < log'
Rules:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
log' :: 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:
min', quot', log'
They will be analysed ascendingly in the following order:
min' < quot'
quot' < log'
Proved the following rewrite lemma:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)
Induction Base:
min'(_gen_0':s'2(0), _gen_0':s'2(0)) →RΩ(1)
_gen_0':s'2(0)
Induction Step:
min'(_gen_0':s'2(+(_$n5, 1)), _gen_0':s'2(+(_$n5, 1))) →RΩ(1)
min'(_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:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
min'(_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:
quot', log'
They will be analysed ascendingly in the following order:
quot' < log'
Could not prove a rewrite lemma for the defined symbol quot'.
Rules:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
min'(_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:
min'(X, 0') → X
min'(s'(X), s'(Y)) → min'(X, Y)
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(min'(X, Y), s'(Y)))
log'(s'(0')) → 0'
log'(s'(s'(X))) → s'(log'(s'(quot'(X, s'(s'(0'))))))
Types:
min' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
log' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'
Lemmas:
min'(_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:
min'(_gen_0':s'2(_n4), _gen_0':s'2(_n4)) → _gen_0':s'2(0), rt ∈ Ω(1 + n4)