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

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
minus(minus(x, y), z) → minus(x, plus(y, z))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
plus' :: 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', quot', plus'

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


Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
plus' :: 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:
plus', minus', quot'

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


Proved the following rewrite lemma:
plus'(_gen_0':s'2(_n4), _gen_0':s'2(b)) → _gen_0':s'2(+(_n4, b)), rt ∈ Ω(1 + n4)

Induction Base:
plus'(_gen_0':s'2(0), _gen_0':s'2(b)) →RΩ(1)
_gen_0':s'2(b)

Induction Step:
plus'(_gen_0':s'2(+(_$n5, 1)), _gen_0':s'2(_b137)) →RΩ(1)
s'(plus'(_gen_0':s'2(_$n5), _gen_0':s'2(_b137))) →IH
s'(_gen_0':s'2(+(_$n5, _b137)))

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


Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'2(_n4), _gen_0':s'2(b)) → _gen_0':s'2(+(_n4, b)), 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:
minus', quot'

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


Proved the following rewrite lemma:
minus'(_gen_0':s'2(+(1, _n568)), _gen_0':s'2(+(1, _n568))) → _*3, rt ∈ Ω(n568)

Induction Base:
minus'(_gen_0':s'2(+(1, 0)), _gen_0':s'2(+(1, 0)))

Induction Step:
minus'(_gen_0':s'2(+(1, +(_$n569, 1))), _gen_0':s'2(+(1, +(_$n569, 1)))) →RΩ(1)
minus'(_gen_0':s'2(+(1, _$n569)), _gen_0':s'2(+(1, _$n569))) →IH
_*3

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


Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'2(_n4), _gen_0':s'2(b)) → _gen_0':s'2(+(_n4, b)), rt ∈ Ω(1 + n4)
minus'(_gen_0':s'2(+(1, _n568)), _gen_0':s'2(+(1, _n568))) → _*3, rt ∈ Ω(n568)

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'


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


Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
minus'(minus'(x, y), z) → minus'(x, plus'(y, z))

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_gen_0':s'2 :: Nat → 0':s'

Lemmas:
plus'(_gen_0':s'2(_n4), _gen_0':s'2(b)) → _gen_0':s'2(+(_n4, b)), rt ∈ Ω(1 + n4)
minus'(_gen_0':s'2(+(1, _n568)), _gen_0':s'2(+(1, _n568))) → _*3, rt ∈ Ω(n568)

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:
plus'(_gen_0':s'2(_n4), _gen_0':s'2(b)) → _gen_0':s'2(+(_n4, b)), rt ∈ Ω(1 + n4)