Runtime Complexity TRS:
The TRS R consists of the following rules:

p(0) → 0
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)

Rewrite Strategy: INNERMOST

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
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)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
p'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

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'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)

Induction Base:
plus'(_gen_0':s'3(a), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(a)

Induction Step:
plus'(_gen_0':s'3(_a244), _gen_0':s'3(+(_\$n6, 1))) →RΩ(1)
s'(plus'(_gen_0':s'3(_a244), p'(s'(_gen_0':s'3(_\$n6))))) →RΩ(1)
s'(plus'(_gen_0':s'3(_a244), _gen_0':s'3(_\$n6))) →IH
s'(_gen_0':s'3(+(_\$n6, _a244)))

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

Rules:
p'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)

Induction Base:
times'(_gen_0':s'3(0), _gen_0':s'3(b)) →RΩ(1)
0'

Induction Step:
times'(_gen_0':s'3(+(_\$n1908, 1)), _gen_0':s'3(_b2230)) →RΩ(1)
plus'(_gen_0':s'3(_b2230), times'(_gen_0':s'3(_\$n1908), _gen_0':s'3(_b2230))) →IH
plus'(_gen_0':s'3(_b2230), _gen_0':s'3(*(_\$n1908, _b2230))) →LΩ(1 + \$n1908·b2230)
_gen_0':s'3(+(*(_\$n1908, _b2230), _b2230))

We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).

Rules:
p'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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_0':s'3(_n4098), _gen_0':s'3(_n4098)) → true', rt ∈ Ω(1 + n4098)

Induction Base:
eq'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
true'

Induction Step:
eq'(_gen_0':s'3(+(_\$n4099, 1)), _gen_0':s'3(+(_\$n4099, 1))) →RΩ(1)
eq'(_gen_0':s'3(_\$n4099), _gen_0':s'3(_\$n4099)) →IH
true'

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

Rules:
p'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)
eq'(_gen_0':s'3(_n4098), _gen_0':s'3(_n4098)) → true', rt ∈ Ω(1 + n4098)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)
eq'(_gen_0':s'3(_n4098), _gen_0':s'3(_n4098)) → true', rt ∈ Ω(1 + n4098)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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_0':s'3(_n5661), _gen_0':s'3(+(1, _n5661)), _gen_0':s'3(c)) → _gen_0':s'3(0), rt ∈ Ω(1 + n5661)

Induction Base:
quot'(_gen_0':s'3(0), _gen_0':s'3(+(1, 0)), _gen_0':s'3(c)) →RΩ(1)
0'

Induction Step:
quot'(_gen_0':s'3(+(_\$n5662, 1)), _gen_0':s'3(+(1, +(_\$n5662, 1))), _gen_0':s'3(_c5902)) →RΩ(1)
quot'(_gen_0':s'3(_\$n5662), _gen_0':s'3(+(1, _\$n5662)), _gen_0':s'3(_c5902)) →IH
_gen_0':s'3(0)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

Rules:
p'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)
eq'(_gen_0':s'3(_n4098), _gen_0':s'3(_n4098)) → true', rt ∈ Ω(1 + n4098)
quot'(_gen_0':s'3(_n5661), _gen_0':s'3(+(1, _n5661)), _gen_0':s'3(c)) → _gen_0':s'3(0), rt ∈ Ω(1 + n5661)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'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'(0') → 0'
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' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
times' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s' → 0':s'
eq' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
divides' :: 0':s' → 0':s' → true':false'
prime' :: 0':s' → true':false'
pr' :: 0':s' → 0':s' → true':false'
if' :: true':false' → 0':s' → 0':s' → true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n5)) → _gen_0':s'3(+(_n5, a)), rt ∈ Ω(1 + n5)
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)
eq'(_gen_0':s'3(_n4098), _gen_0':s'3(_n4098)) → true', rt ∈ Ω(1 + n4098)
quot'(_gen_0':s'3(_n5661), _gen_0':s'3(+(1, _n5661)), _gen_0':s'3(c)) → _gen_0':s'3(0), rt ∈ Ω(1 + n5661)

Generator Equations:
_gen_0':s'3(0) ⇔ 0'
_gen_0':s'3(+(x, 1)) ⇔ s'(_gen_0':s'3(x))

No more defined symbols left to analyse.

The lowerbound Ω(n3) was proven with the following lemma:
times'(_gen_0':s'3(_n1907), _gen_0':s'3(b)) → _gen_0':s'3(*(_n1907, b)), rt ∈ Ω(1 + b2230·n19072 + n1907)