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

if(true, x, y) → x
if(false, x, y) → y
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
app(nil, l) → l
app(cons(x, l1), l2) → cons(x, app(l1, l2))
app(app(l1, l2), l3) → app(l1, app(l2, l3))
mem(x, nil) → false
mem(x, cons(y, l)) → ifmem(eq(x, y), x, l)
ifmem(true, x, l) → true
ifmem(false, x, l) → mem(x, l)
inter(x, nil) → nil
inter(nil, x) → nil
inter(app(l1, l2), l3) → app(inter(l1, l3), inter(l2, l3))
inter(l1, app(l2, l3)) → app(inter(l1, l2), inter(l1, l3))
inter(cons(x, l1), l2) → ifinter(mem(x, l2), x, l1, l2)
inter(l1, cons(x, l2)) → ifinter(mem(x, l1), x, l2, l1)
ifinter(true, x, l1, l2) → cons(x, inter(l1, l2))
ifinter(false, x, l1, l2) → inter(l1, l2)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Heuristically decided to analyse the following defined symbols:
eq', app', mem', inter'

They will be analysed ascendingly in the following order:
eq' < mem'
app' < inter'
mem' < inter'

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Generator Equations:
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
_gen_nil':cons'6(0) ⇔ nil'
_gen_nil':cons'6(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'6(x))

The following defined symbols remain to be analysed:
eq', app', mem', inter'

They will be analysed ascendingly in the following order:
eq' < mem'
app' < inter'
mem' < inter'

Proved the following rewrite lemma:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)

Induction Base:
eq'(_gen_0':s'5(0), _gen_0':s'5(0)) →RΩ(1)
true'

Induction Step:
eq'(_gen_0':s'5(+(_\$n9, 1)), _gen_0':s'5(+(_\$n9, 1))) →RΩ(1)
eq'(_gen_0':s'5(_\$n9), _gen_0':s'5(_\$n9)) →IH
true'

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

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Lemmas:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)

Generator Equations:
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
_gen_nil':cons'6(0) ⇔ nil'
_gen_nil':cons'6(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'6(x))

The following defined symbols remain to be analysed:
app', mem', inter'

They will be analysed ascendingly in the following order:
app' < inter'
mem' < inter'

Proved the following rewrite lemma:
app'(_gen_nil':cons'6(_n1261), _gen_nil':cons'6(b)) → _gen_nil':cons'6(+(_n1261, b)), rt ∈ Ω(1 + n1261)

Induction Base:
app'(_gen_nil':cons'6(0), _gen_nil':cons'6(b)) →RΩ(1)
_gen_nil':cons'6(b)

Induction Step:
app'(_gen_nil':cons'6(+(_\$n1262, 1)), _gen_nil':cons'6(_b1556)) →RΩ(1)
cons'(0', app'(_gen_nil':cons'6(_\$n1262), _gen_nil':cons'6(_b1556))) →IH
cons'(0', _gen_nil':cons'6(+(_\$n1262, _b1556)))

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

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Lemmas:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)
app'(_gen_nil':cons'6(_n1261), _gen_nil':cons'6(b)) → _gen_nil':cons'6(+(_n1261, b)), rt ∈ Ω(1 + n1261)

Generator Equations:
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
_gen_nil':cons'6(0) ⇔ nil'
_gen_nil':cons'6(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'6(x))

The following defined symbols remain to be analysed:
mem', inter'

They will be analysed ascendingly in the following order:
mem' < inter'

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

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Lemmas:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)
app'(_gen_nil':cons'6(_n1261), _gen_nil':cons'6(b)) → _gen_nil':cons'6(+(_n1261, b)), rt ∈ Ω(1 + n1261)

Generator Equations:
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
_gen_nil':cons'6(0) ⇔ nil'
_gen_nil':cons'6(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'6(x))

The following defined symbols remain to be analysed:
inter'

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

Rules:
if'(true', x, y) → x
if'(false', x, y) → y
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
app'(app'(l1, l2), l3) → app'(l1, app'(l2, l3))
mem'(x, nil') → false'
mem'(x, cons'(y, l)) → ifmem'(eq'(x, y), x, l)
ifmem'(true', x, l) → true'
ifmem'(false', x, l) → mem'(x, l)
inter'(x, nil') → nil'
inter'(nil', x) → nil'
inter'(app'(l1, l2), l3) → app'(inter'(l1, l3), inter'(l2, l3))
inter'(l1, app'(l2, l3)) → app'(inter'(l1, l2), inter'(l1, l3))
inter'(cons'(x, l1), l2) → ifinter'(mem'(x, l2), x, l1, l2)
inter'(l1, cons'(x, l2)) → ifinter'(mem'(x, l1), x, l2, l1)
ifinter'(true', x, l1, l2) → cons'(x, inter'(l1, l2))
ifinter'(false', x, l1, l2) → inter'(l1, l2)

Types:
if' :: true':false' → if' → if' → if'
true' :: true':false'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
s' :: 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
mem' :: 0':s' → nil':cons' → true':false'
ifmem' :: true':false' → 0':s' → nil':cons' → true':false'
inter' :: nil':cons' → nil':cons' → nil':cons'
ifinter' :: true':false' → 0':s' → nil':cons' → nil':cons' → nil':cons'
_hole_if'1 :: if'
_hole_true':false'2 :: true':false'
_hole_0':s'3 :: 0':s'
_hole_nil':cons'4 :: nil':cons'
_gen_0':s'5 :: Nat → 0':s'
_gen_nil':cons'6 :: Nat → nil':cons'

Lemmas:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)
app'(_gen_nil':cons'6(_n1261), _gen_nil':cons'6(b)) → _gen_nil':cons'6(+(_n1261, b)), rt ∈ Ω(1 + n1261)

Generator Equations:
_gen_0':s'5(0) ⇔ 0'
_gen_0':s'5(+(x, 1)) ⇔ s'(_gen_0':s'5(x))
_gen_nil':cons'6(0) ⇔ nil'
_gen_nil':cons'6(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'6(x))

No more defined symbols left to analyse.

The lowerbound Ω(n) was proven with the following lemma:
eq'(_gen_0':s'5(_n8), _gen_0':s'5(_n8)) → true', rt ∈ Ω(1 + n8)