The rewrite relation of the following TRS is considered.
if(true,x,y) |
→ |
x |
(1) |
if(false,x,y) |
→ |
y |
(2) |
eq(0,0) |
→ |
true |
(3) |
eq(0,s(x)) |
→ |
false |
(4) |
eq(s(x),0) |
→ |
false |
(5) |
eq(s(x),s(y)) |
→ |
eq(x,y) |
(6) |
app(nil,l) |
→ |
l |
(7) |
app(cons(x,l1),l2) |
→ |
cons(x,app(l1,l2)) |
(8) |
app(app(l1,l2),l3) |
→ |
app(l1,app(l2,l3)) |
(9) |
mem(x,nil) |
→ |
false |
(10) |
mem(x,cons(y,l)) |
→ |
ifmem(eq(x,y),x,l) |
(11) |
ifmem(true,x,l) |
→ |
true |
(12) |
ifmem(false,x,l) |
→ |
mem(x,l) |
(13) |
inter(x,nil) |
→ |
nil |
(14) |
inter(nil,x) |
→ |
nil |
(15) |
inter(app(l1,l2),l3) |
→ |
app(inter(l1,l3),inter(l2,l3)) |
(16) |
inter(l1,app(l2,l3)) |
→ |
app(inter(l1,l2),inter(l1,l3)) |
(17) |
inter(cons(x,l1),l2) |
→ |
ifinter(mem(x,l2),x,l1,l2) |
(18) |
inter(l1,cons(x,l2)) |
→ |
ifinter(mem(x,l1),x,l2,l1) |
(19) |
ifinter(true,x,l1,l2) |
→ |
cons(x,inter(l1,l2)) |
(20) |
ifinter(false,x,l1,l2) |
→ |
inter(l1,l2) |
(21) |
eq#(s(x),s(y)) |
→ |
eq#(x,y) |
(22) |
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(23) |
app#(app(l1,l2),l3) |
→ |
app#(l1,app(l2,l3)) |
(24) |
app#(app(l1,l2),l3) |
→ |
app#(l2,l3) |
(25) |
mem#(x,cons(y,l)) |
→ |
ifmem#(eq(x,y),x,l) |
(26) |
mem#(x,cons(y,l)) |
→ |
eq#(x,y) |
(27) |
ifmem#(false,x,l) |
→ |
mem#(x,l) |
(28) |
inter#(app(l1,l2),l3) |
→ |
app#(inter(l1,l3),inter(l2,l3)) |
(29) |
inter#(app(l1,l2),l3) |
→ |
inter#(l1,l3) |
(30) |
inter#(app(l1,l2),l3) |
→ |
inter#(l2,l3) |
(31) |
inter#(l1,app(l2,l3)) |
→ |
app#(inter(l1,l2),inter(l1,l3)) |
(32) |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l2) |
(33) |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l3) |
(34) |
inter#(cons(x,l1),l2) |
→ |
ifinter#(mem(x,l2),x,l1,l2) |
(35) |
inter#(cons(x,l1),l2) |
→ |
mem#(x,l2) |
(36) |
inter#(l1,cons(x,l2)) |
→ |
ifinter#(mem(x,l1),x,l2,l1) |
(37) |
inter#(l1,cons(x,l2)) |
→ |
mem#(x,l1) |
(38) |
ifinter#(true,x,l1,l2) |
→ |
inter#(l1,l2) |
(39) |
ifinter#(false,x,l1,l2) |
→ |
inter#(l1,l2) |
(40) |
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
inter#(app(l1,l2),l3) |
→ |
inter#(l2,l3) |
(31) |
inter#(app(l1,l2),l3) |
→ |
inter#(l1,l3) |
(30) |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l2) |
(33) |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l3) |
(34) |
inter#(cons(x,l1),l2) |
→ |
ifinter#(mem(x,l2),x,l1,l2) |
(35) |
ifinter#(true,x,l1,l2) |
→ |
inter#(l1,l2) |
(39) |
inter#(l1,cons(x,l2)) |
→ |
ifinter#(mem(x,l1),x,l2,l1) |
(37) |
ifinter#(false,x,l1,l2) |
→ |
inter#(l1,l2) |
(40) |
1.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
inter#(app(l1,l2),l3) |
→ |
inter#(l2,l3) |
(31) |
|
1 |
> |
1 |
2 |
≥ |
2 |
inter#(app(l1,l2),l3) |
→ |
inter#(l1,l3) |
(30) |
|
1 |
> |
1 |
2 |
≥ |
2 |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l2) |
(33) |
|
1 |
≥ |
1 |
2 |
> |
2 |
inter#(l1,app(l2,l3)) |
→ |
inter#(l1,l3) |
(34) |
|
1 |
≥ |
1 |
2 |
> |
2 |
inter#(cons(x,l1),l2) |
→ |
ifinter#(mem(x,l2),x,l1,l2) |
(35) |
|
1 |
> |
2 |
1 |
> |
3 |
2 |
≥ |
4 |
inter#(l1,cons(x,l2)) |
→ |
ifinter#(mem(x,l1),x,l2,l1) |
(37) |
|
2 |
> |
2 |
2 |
> |
3 |
1 |
≥ |
4 |
ifinter#(true,x,l1,l2) |
→ |
inter#(l1,l2) |
(39) |
|
3 |
≥ |
1 |
4 |
≥ |
2 |
ifinter#(false,x,l1,l2) |
→ |
inter#(l1,l2) |
(40) |
|
3 |
≥ |
1 |
4 |
≥ |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
mem#(x,cons(y,l)) |
→ |
ifmem#(eq(x,y),x,l) |
(26) |
ifmem#(false,x,l) |
→ |
mem#(x,l) |
(28) |
1.1.2 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
ifmem#(false,x,l) |
→ |
mem#(x,l) |
(28) |
|
2 |
≥ |
1 |
3 |
≥ |
2 |
mem#(x,cons(y,l)) |
→ |
ifmem#(eq(x,y),x,l) |
(26) |
|
1 |
≥ |
2 |
2 |
> |
3 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
eq#(s(x),s(y)) |
→ |
eq#(x,y) |
(22) |
1.1.3 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[s(x1)] |
= |
1 · x1
|
[eq#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.3.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
eq#(s(x),s(y)) |
→ |
eq#(x,y) |
(22) |
|
1 |
> |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
4th
component contains the
pair
app#(app(l1,l2),l3) |
→ |
app#(l1,app(l2,l3)) |
(24) |
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(23) |
app#(app(l1,l2),l3) |
→ |
app#(l2,l3) |
(25) |
1.1.4 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[app(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[nil] |
= |
0 |
[cons(x1, x2)] |
= |
1 · x1 + 1 · x2
|
[app#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
together with the usable
rules
app(nil,l) |
→ |
l |
(7) |
app(cons(x,l1),l2) |
→ |
cons(x,app(l1,l2)) |
(8) |
app(app(l1,l2),l3) |
→ |
app(l1,app(l2,l3)) |
(9) |
(w.r.t. the implicit argument filter of the reduction pair),
the
rule
could be deleted.
1.1.4.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
app#(app(l1,l2),l3) |
→ |
app#(l1,app(l2,l3)) |
(24) |
|
1 |
> |
1 |
app#(cons(x,l1),l2) |
→ |
app#(l1,l2) |
(23) |
|
1 |
> |
1 |
2 |
≥ |
2 |
app#(app(l1,l2),l3) |
→ |
app#(l2,l3) |
(25) |
|
1 |
> |
1 |
2 |
≥ |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.