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

a__f(X) → a__if(mark(X), c, f(true))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
mark(f(X)) → a__f(mark(X))
mark(if(X1, X2, X3)) → a__if(mark(X1), mark(X2), X3)
mark(c) → c
mark(true) → true
mark(false) → false
a__f(X) → f(X)
a__if(X1, X2, X3) → if(X1, X2, X3)

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) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Rewrite Strategy: INNERMOST


Infered types.


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'


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

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


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'

Generator Equations:
_gen_c':true':f':false':if'2(0) ⇔ c'
_gen_c':true':f':false':if'2(+(x, 1)) ⇔ f'(_gen_c':true':f':false':if'2(x))

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

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


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


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'

Generator Equations:
_gen_c':true':f':false':if'2(0) ⇔ c'
_gen_c':true':f':false':if'2(+(x, 1)) ⇔ f'(_gen_c':true':f':false':if'2(x))

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

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


Proved the following rewrite lemma:
mark'(_gen_c':true':f':false':if'2(+(1, _n46))) → _*3, rt ∈ Ω(n46)

Induction Base:
mark'(_gen_c':true':f':false':if'2(+(1, 0)))

Induction Step:
mark'(_gen_c':true':f':false':if'2(+(1, +(_$n47, 1)))) →RΩ(1)
a__f'(mark'(_gen_c':true':f':false':if'2(+(1, _$n47)))) →IH
a__f'(_*3)

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


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'

Lemmas:
mark'(_gen_c':true':f':false':if'2(+(1, _n46))) → _*3, rt ∈ Ω(n46)

Generator Equations:
_gen_c':true':f':false':if'2(0) ⇔ c'
_gen_c':true':f':false':if'2(+(x, 1)) ⇔ f'(_gen_c':true':f':false':if'2(x))

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

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


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


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'

Lemmas:
mark'(_gen_c':true':f':false':if'2(+(1, _n46))) → _*3, rt ∈ Ω(n46)

Generator Equations:
_gen_c':true':f':false':if'2(0) ⇔ c'
_gen_c':true':f':false':if'2(+(x, 1)) ⇔ f'(_gen_c':true':f':false':if'2(x))

The following defined symbols remain to be analysed:
a__if'

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


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


Rules:
a__f'(X) → a__if'(mark'(X), c', f'(true'))
a__if'(true', X, Y) → mark'(X)
a__if'(false', X, Y) → mark'(Y)
mark'(f'(X)) → a__f'(mark'(X))
mark'(if'(X1, X2, X3)) → a__if'(mark'(X1), mark'(X2), X3)
mark'(c') → c'
mark'(true') → true'
mark'(false') → false'
a__f'(X) → f'(X)
a__if'(X1, X2, X3) → if'(X1, X2, X3)

Types:
a__f' :: c':true':f':false':if' → c':true':f':false':if'
a__if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
mark' :: c':true':f':false':if' → c':true':f':false':if'
c' :: c':true':f':false':if'
f' :: c':true':f':false':if' → c':true':f':false':if'
true' :: c':true':f':false':if'
false' :: c':true':f':false':if'
if' :: c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if' → c':true':f':false':if'
_hole_c':true':f':false':if'1 :: c':true':f':false':if'
_gen_c':true':f':false':if'2 :: Nat → c':true':f':false':if'

Lemmas:
mark'(_gen_c':true':f':false':if'2(+(1, _n46))) → _*3, rt ∈ Ω(n46)

Generator Equations:
_gen_c':true':f':false':if'2(0) ⇔ c'
_gen_c':true':f':false':if'2(+(x, 1)) ⇔ f'(_gen_c':true':f':false':if'2(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
mark'(_gen_c':true':f':false':if'2(+(1, _n46))) → _*3, rt ∈ Ω(n46)