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

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
minus(0, Y) → 0
minus(s(X), Y) → ifMinus(le(s(X), Y), s(X), Y)
ifMinus(true, s(X), Y) → 0
ifMinus(false, s(X), Y) → s(minus(X, Y))
quot(0, s(Y)) → 0
quot(s(X), s(Y)) → s(quot(minus(X, Y), s(Y)))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
ifMinus' :: true':false' → 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'


Heuristically decided to analyse the following defined symbols:
le', minus', quot'

They will be analysed ascendingly in the following order:
le' < minus'
minus' < quot'


Rules:
le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
ifMinus' :: true':false' → 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_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:
le', minus', quot'

They will be analysed ascendingly in the following order:
le' < minus'
minus' < quot'


Proved the following rewrite lemma:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)

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

Induction Step:
le'(_gen_0':s'3(+(_$n6, 1)), _gen_0':s'3(+(_$n6, 1))) →RΩ(1)
le'(_gen_0':s'3(_$n6), _gen_0':s'3(_$n6)) →IH
true'

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


Rules:
le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
ifMinus' :: true':false' → 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', 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:
minus', quot'

They will be analysed ascendingly in the following order:
minus' < quot'


Could not prove a rewrite lemma for the defined symbol minus'.


Rules:
le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
ifMinus' :: true':false' → 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', 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:
quot'


Could not prove a rewrite lemma for the defined symbol quot'.


Rules:
le'(0', Y) → true'
le'(s'(X), 0') → false'
le'(s'(X), s'(Y)) → le'(X, Y)
minus'(0', Y) → 0'
minus'(s'(X), Y) → ifMinus'(le'(s'(X), Y), s'(X), Y)
ifMinus'(true', s'(X), Y) → 0'
ifMinus'(false', s'(X), Y) → s'(minus'(X, Y))
quot'(0', s'(Y)) → 0'
quot'(s'(X), s'(Y)) → s'(quot'(minus'(X, Y), s'(Y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
ifMinus' :: true':false' → 0':s' → 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

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

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 Ω(n) was proven with the following lemma:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)