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

f(0) → true
f(1) → false
f(s(x)) → f(x)
if(true, x, y) → x
if(false, x, y) → y
g(s(x), s(y)) → if(f(x), s(x), s(y))
g(x, c(y)) → g(x, g(s(c(y)), y))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

f'(0') → true'
f'(1') → false'
f'(s'(x)) → f'(x)
if'(true', x, y) → x
if'(false', x, y) → y
g'(s'(x), s'(y)) → if'(f'(x), s'(x), s'(y))
g'(x, c'(y)) → g'(x, g'(s'(c'(y)), y))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
f'(0') → true'
f'(1') → false'
f'(s'(x)) → f'(x)
if'(true', x, y) → x
if'(false', x, y) → y
g'(s'(x), s'(y)) → if'(f'(x), s'(x), s'(y))
g'(x, c'(y)) → g'(x, g'(s'(c'(y)), y))

Types:
f' :: 0':1':s':c' → true':false'
0' :: 0':1':s':c'
true' :: true':false'
1' :: 0':1':s':c'
false' :: true':false'
s' :: 0':1':s':c' → 0':1':s':c'
if' :: true':false' → 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
g' :: 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
c' :: 0':1':s':c' → 0':1':s':c'
_hole_true':false'1 :: true':false'
_hole_0':1':s':c'2 :: 0':1':s':c'
_gen_0':1':s':c'3 :: Nat → 0':1':s':c'

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

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

Rules:
f'(0') → true'
f'(1') → false'
f'(s'(x)) → f'(x)
if'(true', x, y) → x
if'(false', x, y) → y
g'(s'(x), s'(y)) → if'(f'(x), s'(x), s'(y))
g'(x, c'(y)) → g'(x, g'(s'(c'(y)), y))

Types:
f' :: 0':1':s':c' → true':false'
0' :: 0':1':s':c'
true' :: true':false'
1' :: 0':1':s':c'
false' :: true':false'
s' :: 0':1':s':c' → 0':1':s':c'
if' :: true':false' → 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
g' :: 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
c' :: 0':1':s':c' → 0':1':s':c'
_hole_true':false'1 :: true':false'
_hole_0':1':s':c'2 :: 0':1':s':c'
_gen_0':1':s':c'3 :: Nat → 0':1':s':c'

Generator Equations:
_gen_0':1':s':c'3(0) ⇔ 0'
_gen_0':1':s':c'3(+(x, 1)) ⇔ s'(_gen_0':1':s':c'3(x))

The following defined symbols remain to be analysed:
f', g'

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

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

Induction Base:
f'(_gen_0':1':s':c'3(0)) →RΩ(1)
true'

Induction Step:
f'(_gen_0':1':s':c'3(+(_\$n6, 1))) →RΩ(1)
f'(_gen_0':1':s':c'3(_\$n6)) →IH
true'

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

Rules:
f'(0') → true'
f'(1') → false'
f'(s'(x)) → f'(x)
if'(true', x, y) → x
if'(false', x, y) → y
g'(s'(x), s'(y)) → if'(f'(x), s'(x), s'(y))
g'(x, c'(y)) → g'(x, g'(s'(c'(y)), y))

Types:
f' :: 0':1':s':c' → true':false'
0' :: 0':1':s':c'
true' :: true':false'
1' :: 0':1':s':c'
false' :: true':false'
s' :: 0':1':s':c' → 0':1':s':c'
if' :: true':false' → 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
g' :: 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
c' :: 0':1':s':c' → 0':1':s':c'
_hole_true':false'1 :: true':false'
_hole_0':1':s':c'2 :: 0':1':s':c'
_gen_0':1':s':c'3 :: Nat → 0':1':s':c'

Lemmas:
f'(_gen_0':1':s':c'3(_n5)) → true', rt ∈ Ω(1 + n5)

Generator Equations:
_gen_0':1':s':c'3(0) ⇔ 0'
_gen_0':1':s':c'3(+(x, 1)) ⇔ s'(_gen_0':1':s':c'3(x))

The following defined symbols remain to be analysed:
g'

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

Rules:
f'(0') → true'
f'(1') → false'
f'(s'(x)) → f'(x)
if'(true', x, y) → x
if'(false', x, y) → y
g'(s'(x), s'(y)) → if'(f'(x), s'(x), s'(y))
g'(x, c'(y)) → g'(x, g'(s'(c'(y)), y))

Types:
f' :: 0':1':s':c' → true':false'
0' :: 0':1':s':c'
true' :: true':false'
1' :: 0':1':s':c'
false' :: true':false'
s' :: 0':1':s':c' → 0':1':s':c'
if' :: true':false' → 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
g' :: 0':1':s':c' → 0':1':s':c' → 0':1':s':c'
c' :: 0':1':s':c' → 0':1':s':c'
_hole_true':false'1 :: true':false'
_hole_0':1':s':c'2 :: 0':1':s':c'
_gen_0':1':s':c'3 :: Nat → 0':1':s':c'

Lemmas:
f'(_gen_0':1':s':c'3(_n5)) → true', rt ∈ Ω(1 + n5)

Generator Equations:
_gen_0':1':s':c'3(0) ⇔ 0'
_gen_0':1':s':c'3(+(x, 1)) ⇔ s'(_gen_0':1':s':c'3(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
f'(_gen_0':1':s':c'3(_n5)) → true', rt ∈ Ω(1 + n5)