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

+(0, y) → y
+(s(x), y) → s(+(x, y))
+(p(x), y) → p(+(x, y))
minus(0) → 0
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*(0, y) → 0
*(s(x), y) → +(*(x, y), y)
*(p(x), y) → +(*(x, y), minus(y))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Types:
+' :: 0':s':p' → 0':s':p' → 0':s':p'
0' :: 0':s':p'
s' :: 0':s':p' → 0':s':p'
p' :: 0':s':p' → 0':s':p'
minus' :: 0':s':p' → 0':s':p'
*' :: 0':s':p' → 0':s':p' → 0':s':p'
_hole_0':s':p'1 :: 0':s':p'
_gen_0':s':p'2 :: Nat → 0':s':p'


Heuristically decided to analyse the following defined symbols:
+', minus', *'

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


Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Types:
+' :: 0':s':p' → 0':s':p' → 0':s':p'
0' :: 0':s':p'
s' :: 0':s':p' → 0':s':p'
p' :: 0':s':p' → 0':s':p'
minus' :: 0':s':p' → 0':s':p'
*' :: 0':s':p' → 0':s':p' → 0':s':p'
_hole_0':s':p'1 :: 0':s':p'
_gen_0':s':p'2 :: Nat → 0':s':p'

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

The following defined symbols remain to be analysed:
+', minus', *'

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


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

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

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

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


Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Types:
+' :: 0':s':p' → 0':s':p' → 0':s':p'
0' :: 0':s':p'
s' :: 0':s':p' → 0':s':p'
p' :: 0':s':p' → 0':s':p'
minus' :: 0':s':p' → 0':s':p'
*' :: 0':s':p' → 0':s':p' → 0':s':p'
_hole_0':s':p'1 :: 0':s':p'
_gen_0':s':p'2 :: Nat → 0':s':p'

Lemmas:
+'(_gen_0':s':p'2(_n4), _gen_0':s':p'2(b)) → _gen_0':s':p'2(+(_n4, b)), rt ∈ Ω(1 + n4)

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

The following defined symbols remain to be analysed:
minus', *'

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


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

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

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

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


Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Types:
+' :: 0':s':p' → 0':s':p' → 0':s':p'
0' :: 0':s':p'
s' :: 0':s':p' → 0':s':p'
p' :: 0':s':p' → 0':s':p'
minus' :: 0':s':p' → 0':s':p'
*' :: 0':s':p' → 0':s':p' → 0':s':p'
_hole_0':s':p'1 :: 0':s':p'
_gen_0':s':p'2 :: Nat → 0':s':p'

Lemmas:
+'(_gen_0':s':p'2(_n4), _gen_0':s':p'2(b)) → _gen_0':s':p'2(+(_n4, b)), rt ∈ Ω(1 + n4)
minus'(_gen_0':s':p'2(+(1, _n653))) → _*3, rt ∈ Ω(n653)

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

The following defined symbols remain to be analysed:
*'


Proved the following rewrite lemma:
*'(_gen_0':s':p'2(_n1631), _gen_0':s':p'2(b)) → _gen_0':s':p'2(*(_n1631, b)), rt ∈ Ω(1 + b2112·n16312 + n1631)

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

Induction Step:
*'(_gen_0':s':p'2(+(_$n1632, 1)), _gen_0':s':p'2(_b2112)) →RΩ(1)
+'(*'(_gen_0':s':p'2(_$n1632), _gen_0':s':p'2(_b2112)), _gen_0':s':p'2(_b2112)) →IH
+'(_gen_0':s':p'2(*(_$n1632, _b2112)), _gen_0':s':p'2(_b2112)) →LΩ(1 + $n1632·b2112)
_gen_0':s':p'2(+(*(_$n1632, _b2112), _b2112))

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


Rules:
+'(0', y) → y
+'(s'(x), y) → s'(+'(x, y))
+'(p'(x), y) → p'(+'(x, y))
minus'(0') → 0'
minus'(s'(x)) → p'(minus'(x))
minus'(p'(x)) → s'(minus'(x))
*'(0', y) → 0'
*'(s'(x), y) → +'(*'(x, y), y)
*'(p'(x), y) → +'(*'(x, y), minus'(y))

Types:
+' :: 0':s':p' → 0':s':p' → 0':s':p'
0' :: 0':s':p'
s' :: 0':s':p' → 0':s':p'
p' :: 0':s':p' → 0':s':p'
minus' :: 0':s':p' → 0':s':p'
*' :: 0':s':p' → 0':s':p' → 0':s':p'
_hole_0':s':p'1 :: 0':s':p'
_gen_0':s':p'2 :: Nat → 0':s':p'

Lemmas:
+'(_gen_0':s':p'2(_n4), _gen_0':s':p'2(b)) → _gen_0':s':p'2(+(_n4, b)), rt ∈ Ω(1 + n4)
minus'(_gen_0':s':p'2(+(1, _n653))) → _*3, rt ∈ Ω(n653)
*'(_gen_0':s':p'2(_n1631), _gen_0':s':p'2(b)) → _gen_0':s':p'2(*(_n1631, b)), rt ∈ Ω(1 + b2112·n16312 + n1631)

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

No more defined symbols left to analyse.


The lowerbound Ω(n3) was proven with the following lemma:
*'(_gen_0':s':p'2(_n1631), _gen_0':s':p'2(b)) → _gen_0':s':p'2(*(_n1631, b)), rt ∈ Ω(1 + b2112·n16312 + n1631)