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

minus(minus(x)) → x
minus(h(x)) → h(minus(x))
minus(f(x, y)) → f(minus(y), minus(x))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


minus'(minus'(x)) → x
minus'(h'(x)) → h'(minus'(x))
minus'(f'(x, y)) → f'(minus'(y), minus'(x))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
minus'(minus'(x)) → x
minus'(h'(x)) → h'(minus'(x))
minus'(f'(x, y)) → f'(minus'(y), minus'(x))

Types:
minus' :: h':f' → h':f'
h' :: h':f' → h':f'
f' :: h':f' → h':f' → h':f'
_hole_h':f'1 :: h':f'
_gen_h':f'2 :: Nat → h':f'


Heuristically decided to analyse the following defined symbols:
minus'


Rules:
minus'(minus'(x)) → x
minus'(h'(x)) → h'(minus'(x))
minus'(f'(x, y)) → f'(minus'(y), minus'(x))

Types:
minus' :: h':f' → h':f'
h' :: h':f' → h':f'
f' :: h':f' → h':f' → h':f'
_hole_h':f'1 :: h':f'
_gen_h':f'2 :: Nat → h':f'

Generator Equations:
_gen_h':f'2(0) ⇔ _hole_h':f'1
_gen_h':f'2(+(x, 1)) ⇔ h'(_gen_h':f'2(x))

The following defined symbols remain to be analysed:
minus'


Proved the following rewrite lemma:
minus'(_gen_h':f'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Induction Base:
minus'(_gen_h':f'2(+(1, 0)))

Induction Step:
minus'(_gen_h':f'2(+(1, +(_$n5, 1)))) →RΩ(1)
h'(minus'(_gen_h':f'2(+(1, _$n5)))) →IH
h'(_*3)

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


Rules:
minus'(minus'(x)) → x
minus'(h'(x)) → h'(minus'(x))
minus'(f'(x, y)) → f'(minus'(y), minus'(x))

Types:
minus' :: h':f' → h':f'
h' :: h':f' → h':f'
f' :: h':f' → h':f' → h':f'
_hole_h':f'1 :: h':f'
_gen_h':f'2 :: Nat → h':f'

Lemmas:
minus'(_gen_h':f'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_h':f'2(0) ⇔ _hole_h':f'1
_gen_h':f'2(+(x, 1)) ⇔ h'(_gen_h':f'2(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
minus'(_gen_h':f'2(+(1, _n4))) → _*3, rt ∈ Ω(n4)