Runtime Complexity TRS:
The TRS R consists of the following rules:
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(0, s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(y, z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Infered types.
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Heuristically decided to analyse the following defined symbols:
plus', times', div', quot', eq', pr'
They will be analysed ascendingly in the following order:
plus' < times'
times' < div'
div' = quot'
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
plus', times', div', quot', eq', pr'
They will be analysed ascendingly in the following order:
plus' < times'
times' < div'
div' = quot'
Proved the following rewrite lemma:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
Induction Base:
plus'(_gen_s':0'3(a), _gen_s':0'3(0)) →RΩ(1)
_gen_s':0'3(a)
Induction Step:
plus'(_gen_s':0'3(_a241), _gen_s':0'3(+(_$n6, 1))) →RΩ(1)
s'(plus'(_gen_s':0'3(_a241), p'(s'(_gen_s':0'3(_$n6))))) →RΩ(1)
s'(plus'(_gen_s':0'3(_a241), _gen_s':0'3(_$n6))) →IH
s'(_gen_s':0'3(+(_$n6, _a241)))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
times', div', quot', eq', pr'
They will be analysed ascendingly in the following order:
times' < div'
div' = quot'
Proved the following rewrite lemma:
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
Induction Base:
times'(_gen_s':0'3(0), _gen_s':0'3(b)) →RΩ(1)
0'
Induction Step:
times'(_gen_s':0'3(+(_$n1882, 1)), _gen_s':0'3(_b2204)) →RΩ(1)
plus'(_gen_s':0'3(_b2204), times'(_gen_s':0'3(_$n1882), _gen_s':0'3(_b2204))) →IH
plus'(_gen_s':0'3(_b2204), _gen_s':0'3(*(_$n1882, _b2204))) →LΩ(1 + $n1882·b2204)
_gen_s':0'3(+(*(_$n1882, _b2204), _b2204))
We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
eq', div', quot', pr'
They will be analysed ascendingly in the following order:
div' = quot'
Proved the following rewrite lemma:
eq'(_gen_s':0'3(_n4050), _gen_s':0'3(_n4050)) → true', rt ∈ Ω(1 + n4050)
Induction Base:
eq'(_gen_s':0'3(0), _gen_s':0'3(0)) →RΩ(1)
true'
Induction Step:
eq'(_gen_s':0'3(+(_$n4051, 1)), _gen_s':0'3(+(_$n4051, 1))) →RΩ(1)
eq'(_gen_s':0'3(_$n4051), _gen_s':0'3(_$n4051)) →IH
true'
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
eq'(_gen_s':0'3(_n4050), _gen_s':0'3(_n4050)) → true', rt ∈ Ω(1 + n4050)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
pr', div', quot'
They will be analysed ascendingly in the following order:
div' = quot'
Could not prove a rewrite lemma for the defined symbol pr'.
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
eq'(_gen_s':0'3(_n4050), _gen_s':0'3(_n4050)) → true', rt ∈ Ω(1 + n4050)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
quot', div'
They will be analysed ascendingly in the following order:
div' = quot'
Proved the following rewrite lemma:
quot'(_gen_s':0'3(_n5601), _gen_s':0'3(+(1, _n5601)), _gen_s':0'3(c)) → _gen_s':0'3(0), rt ∈ Ω(1 + n5601)
Induction Base:
quot'(_gen_s':0'3(0), _gen_s':0'3(+(1, 0)), _gen_s':0'3(c)) →RΩ(1)
0'
Induction Step:
quot'(_gen_s':0'3(+(_$n5602, 1)), _gen_s':0'3(+(1, +(_$n5602, 1))), _gen_s':0'3(_c5842)) →RΩ(1)
quot'(_gen_s':0'3(_$n5602), _gen_s':0'3(+(1, _$n5602)), _gen_s':0'3(_c5842)) →IH
_gen_s':0'3(0)
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
eq'(_gen_s':0'3(_n4050), _gen_s':0'3(_n4050)) → true', rt ∈ Ω(1 + n4050)
quot'(_gen_s':0'3(_n5601), _gen_s':0'3(+(1, _n5601)), _gen_s':0'3(c)) → _gen_s':0'3(0), rt ∈ Ω(1 + n5601)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
The following defined symbols remain to be analysed:
div'
They will be analysed ascendingly in the following order:
div' = quot'
Could not prove a rewrite lemma for the defined symbol div'.
Rules:
p'(s'(x)) → x
plus'(x, 0') → x
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
plus'(s'(x), y) → s'(plus'(p'(s'(x)), y))
plus'(x, s'(y)) → s'(plus'(x, p'(s'(y))))
times'(0', y) → 0'
times'(s'(0'), y) → y
times'(s'(x), y) → plus'(y, times'(x, y))
div'(0', y) → 0'
div'(x, y) → quot'(x, y, y)
quot'(0', s'(y), z) → 0'
quot'(s'(x), s'(y), z) → quot'(x, y, z)
quot'(x, 0', s'(z)) → s'(div'(x, s'(z)))
div'(div'(x, y), z) → div'(x, times'(y, z))
eq'(0', 0') → true'
eq'(s'(x), 0') → false'
eq'(0', s'(y)) → false'
eq'(s'(x), s'(y)) → eq'(x, y)
divides'(y, x) → eq'(x, times'(div'(x, y), y))
prime'(s'(s'(x))) → pr'(s'(s'(x)), s'(x))
pr'(x, s'(0')) → true'
pr'(x, s'(s'(y))) → if'(divides'(s'(s'(y)), x), x, s'(y))
if'(true', x, y) → false'
if'(false', x, y) → pr'(x, y)
Types:
p' :: s':0' → s':0'
s' :: s':0' → s':0'
plus' :: s':0' → s':0' → s':0'
0' :: s':0'
times' :: s':0' → s':0' → s':0'
div' :: s':0' → s':0' → s':0'
quot' :: s':0' → s':0' → s':0' → s':0'
eq' :: s':0' → s':0' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: s':0' → s':0' → true':false'
prime' :: s':0' → true':false'
pr' :: s':0' → s':0' → true':false'
if' :: true':false' → s':0' → s':0' → true':false'
_hole_s':0'1 :: s':0'
_hole_true':false'2 :: true':false'
_gen_s':0'3 :: Nat → s':0'
Lemmas:
plus'(_gen_s':0'3(a), _gen_s':0'3(_n5)) → _gen_s':0'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)
eq'(_gen_s':0'3(_n4050), _gen_s':0'3(_n4050)) → true', rt ∈ Ω(1 + n4050)
quot'(_gen_s':0'3(_n5601), _gen_s':0'3(+(1, _n5601)), _gen_s':0'3(c)) → _gen_s':0'3(0), rt ∈ Ω(1 + n5601)
Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'3(x))
No more defined symbols left to analyse.
The lowerbound Ω(n3) was proven with the following lemma:
times'(_gen_s':0'3(_n1881), _gen_s':0'3(b)) → _gen_s':0'3(*(_n1881, b)), rt ∈ Ω(1 + b2204·n18812 + n1881)