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

a__f(X, X) → a__f(a, b)
a__ba
mark(f(X1, X2)) → a__f(mark(X1), X2)
mark(b) → a__b
mark(a) → a
a__f(X1, X2) → f(X1, X2)
a__bb

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


a__f'(X, X) → a__f'(a', b')
a__b'a'
mark'(f'(X1, X2)) → a__f'(mark'(X1), X2)
mark'(b') → a__b'
mark'(a') → a'
a__f'(X1, X2) → f'(X1, X2)
a__b'b'

Rewrite Strategy: INNERMOST


Infered types.


Rules:
a__f'(X, X) → a__f'(a', b')
a__b'a'
mark'(f'(X1, X2)) → a__f'(mark'(X1), X2)
mark'(b') → a__b'
mark'(a') → a'
a__f'(X1, X2) → f'(X1, X2)
a__b'b'

Types:
a__f' :: a':b':f' → a':b':f' → a':b':f'
a' :: a':b':f'
b' :: a':b':f'
a__b' :: a':b':f'
mark' :: a':b':f' → a':b':f'
f' :: a':b':f' → a':b':f' → a':b':f'
_hole_a':b':f'1 :: a':b':f'
_gen_a':b':f'2 :: Nat → a':b':f'


Heuristically decided to analyse the following defined symbols:
a__f', mark'

They will be analysed ascendingly in the following order:
a__f' < mark'


Rules:
a__f'(X, X) → a__f'(a', b')
a__b'a'
mark'(f'(X1, X2)) → a__f'(mark'(X1), X2)
mark'(b') → a__b'
mark'(a') → a'
a__f'(X1, X2) → f'(X1, X2)
a__b'b'

Types:
a__f' :: a':b':f' → a':b':f' → a':b':f'
a' :: a':b':f'
b' :: a':b':f'
a__b' :: a':b':f'
mark' :: a':b':f' → a':b':f'
f' :: a':b':f' → a':b':f' → a':b':f'
_hole_a':b':f'1 :: a':b':f'
_gen_a':b':f'2 :: Nat → a':b':f'

Generator Equations:
_gen_a':b':f'2(0) ⇔ a'
_gen_a':b':f'2(+(x, 1)) ⇔ f'(_gen_a':b':f'2(x), a')

The following defined symbols remain to be analysed:
a__f', mark'

They will be analysed ascendingly in the following order:
a__f' < mark'


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


Rules:
a__f'(X, X) → a__f'(a', b')
a__b'a'
mark'(f'(X1, X2)) → a__f'(mark'(X1), X2)
mark'(b') → a__b'
mark'(a') → a'
a__f'(X1, X2) → f'(X1, X2)
a__b'b'

Types:
a__f' :: a':b':f' → a':b':f' → a':b':f'
a' :: a':b':f'
b' :: a':b':f'
a__b' :: a':b':f'
mark' :: a':b':f' → a':b':f'
f' :: a':b':f' → a':b':f' → a':b':f'
_hole_a':b':f'1 :: a':b':f'
_gen_a':b':f'2 :: Nat → a':b':f'

Generator Equations:
_gen_a':b':f'2(0) ⇔ a'
_gen_a':b':f'2(+(x, 1)) ⇔ f'(_gen_a':b':f'2(x), a')

The following defined symbols remain to be analysed:
mark'


Proved the following rewrite lemma:
mark'(_gen_a':b':f'2(+(1, _n36))) → _*3, rt ∈ Ω(n36)

Induction Base:
mark'(_gen_a':b':f'2(+(1, 0)))

Induction Step:
mark'(_gen_a':b':f'2(+(1, +(_$n37, 1)))) →RΩ(1)
a__f'(mark'(_gen_a':b':f'2(+(1, _$n37))), a') →IH
a__f'(_*3, a')

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


Rules:
a__f'(X, X) → a__f'(a', b')
a__b'a'
mark'(f'(X1, X2)) → a__f'(mark'(X1), X2)
mark'(b') → a__b'
mark'(a') → a'
a__f'(X1, X2) → f'(X1, X2)
a__b'b'

Types:
a__f' :: a':b':f' → a':b':f' → a':b':f'
a' :: a':b':f'
b' :: a':b':f'
a__b' :: a':b':f'
mark' :: a':b':f' → a':b':f'
f' :: a':b':f' → a':b':f' → a':b':f'
_hole_a':b':f'1 :: a':b':f'
_gen_a':b':f'2 :: Nat → a':b':f'

Lemmas:
mark'(_gen_a':b':f'2(+(1, _n36))) → _*3, rt ∈ Ω(n36)

Generator Equations:
_gen_a':b':f'2(0) ⇔ a'
_gen_a':b':f'2(+(x, 1)) ⇔ f'(_gen_a':b':f'2(x), a')

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
mark'(_gen_a':b':f'2(+(1, _n36))) → _*3, rt ∈ Ω(n36)