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

-(x, 0) → x
-(s(x), s(y)) → -(x, y)
p(s(x)) → x
f(s(x), y) → f(p(-(s(x), y)), p(-(y, s(x))))
f(x, s(y)) → f(p(-(x, s(y))), p(-(s(y), x)))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
p'(s'(x)) → x
f'(s'(x), y) → f'(p'(-'(s'(x), y)), p'(-'(y, s'(x))))
f'(x, s'(y)) → f'(p'(-'(x, s'(y))), p'(-'(s'(y), x)))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
p'(s'(x)) → x
f'(s'(x), y) → f'(p'(-'(s'(x), y)), p'(-'(y, s'(x))))
f'(x, s'(y)) → f'(p'(-'(x, s'(y))), p'(-'(s'(y), x)))

Types:
-' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'


Heuristically decided to analyse the following defined symbols:
-', f'

They will be analysed ascendingly in the following order:
-' < f'


Rules:
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
p'(s'(x)) → x
f'(s'(x), y) → f'(p'(-'(s'(x), y)), p'(-'(y, s'(x))))
f'(x, s'(y)) → f'(p'(-'(x, s'(y))), p'(-'(s'(y), x)))

Types:
-' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_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:
-', f'

They will be analysed ascendingly in the following order:
-' < f'


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

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

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

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


Rules:
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
p'(s'(x)) → x
f'(s'(x), y) → f'(p'(-'(s'(x), y)), p'(-'(y, s'(x))))
f'(x, s'(y)) → f'(p'(-'(x, s'(y))), p'(-'(s'(y), x)))

Types:
-' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
-'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(0), 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:
f'


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


Rules:
-'(x, 0') → x
-'(s'(x), s'(y)) → -'(x, y)
p'(s'(x)) → x
f'(s'(x), y) → f'(p'(-'(s'(x), y)), p'(-'(y, s'(x))))
f'(x, s'(y)) → f'(p'(-'(x, s'(y))), p'(-'(s'(y), x)))

Types:
-' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
p' :: 0':s' → 0':s'
f' :: 0':s' → 0':s' → f'
_hole_0':s'1 :: 0':s'
_hole_f'2 :: f'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
-'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(0), 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:
-'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → _gen_0':s'3(0), rt ∈ Ω(1 + n5)