(0) Obligation:
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: FULL
 
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative 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)
S is empty.
Rewrite Strategy: FULL
 
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
eq, 
app, 
mem, 
interThey will be analysed ascendingly in the following order:
eq < mem
app < inter
mem < inter
 
(6) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(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
 
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
eq(
gen_0':s5_0(
n8_0), 
gen_0':s5_0(
n8_0)) → 
true, rt ∈ Ω(1 + n8
0)
Induction Base:
eq(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
true
Induction Step:
eq(gen_0':s5_0(+(n8_0, 1)), gen_0':s5_0(+(n8_0, 1))) →RΩ(1)
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
 
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(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
 
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
app(
gen_nil:cons6_0(
n583_0), 
gen_nil:cons6_0(
b)) → 
gen_nil:cons6_0(
+(
n583_0, 
b)), rt ∈ Ω(1 + n583
0)
Induction Base:
app(gen_nil:cons6_0(0), gen_nil:cons6_0(b)) →RΩ(1)
gen_nil:cons6_0(b)
Induction Step:
app(gen_nil:cons6_0(+(n583_0, 1)), gen_nil:cons6_0(b)) →RΩ(1)
cons(0', app(gen_nil:cons6_0(n583_0), gen_nil:cons6_0(b))) →IH
cons(0', gen_nil:cons6_0(+(b, c584_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
 
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
app(gen_nil:cons6_0(n583_0), gen_nil:cons6_0(b)) → gen_nil:cons6_0(+(n583_0, b)), rt ∈ Ω(1 + n5830)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))
The following defined symbols remain to be analysed:
mem, inter
They will be analysed ascendingly in the following order:
mem < inter
 
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol mem.
(14) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
app(gen_nil:cons6_0(n583_0), gen_nil:cons6_0(b)) → gen_nil:cons6_0(+(n583_0, b)), rt ∈ Ω(1 + n5830)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))
The following defined symbols remain to be analysed:
inter
 
(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol inter.
(16) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
app(gen_nil:cons6_0(n583_0), gen_nil:cons6_0(b)) → gen_nil:cons6_0(+(n583_0, b)), rt ∈ Ω(1 + n5830)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))
No more defined symbols left to analyse.
 
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
(18) BOUNDS(n^1, INF)
(19) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
app(gen_nil:cons6_0(n583_0), gen_nil:cons6_0(b)) → gen_nil:cons6_0(+(n583_0, b)), rt ∈ Ω(1 + n5830)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))
No more defined symbols left to analyse.
 
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
(21) BOUNDS(n^1, INF)
(22) Obligation:
TRS:
Rules:
if(
true, 
x, 
y) → 
xif(
false, 
x, 
y) → 
yeq(
0', 
0') → 
trueeq(
0', 
s(
x)) → 
falseeq(
s(
x), 
0') → 
falseeq(
s(
x), 
s(
y)) → 
eq(
x, 
y)
app(
nil, 
l) → 
lapp(
cons(
x, 
l1), 
l2) → 
cons(
x, 
app(
l1, 
l2))
app(
app(
l1, 
l2), 
l3) → 
app(
l1, 
app(
l2, 
l3))
mem(
x, 
nil) → 
falsemem(
x, 
cons(
y, 
l)) → 
ifmem(
eq(
x, 
y), 
x, 
l)
ifmem(
true, 
x, 
l) → 
trueifmem(
false, 
x, 
l) → 
mem(
x, 
l)
inter(
x, 
nil) → 
nilinter(
nil, 
x) → 
nilinter(
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_if1_0 :: if
hole_true:false2_0 :: true:false
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons
Lemmas:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))
No more defined symbols left to analyse.
 
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
eq(gen_0':s5_0(n8_0), gen_0':s5_0(n8_0)) → true, rt ∈ Ω(1 + n80)
(24) BOUNDS(n^1, INF)