The rewrite relation of the following TRS is considered.
app(app(map,f),nil) |
→ |
nil |
(1) |
app(app(map,f),app(app(cons,x),xs)) |
→ |
app(app(cons,app(f,x)),app(app(map,f),xs)) |
(2) |
app(app(minus,x),0) |
→ |
x |
(3) |
app(app(minus,app(s,x)),app(s,y)) |
→ |
app(app(minus,app(p,app(s,x))),app(p,app(s,y))) |
(4) |
app(p,app(s,x)) |
→ |
x |
(5) |
app(app(div,0),app(s,y)) |
→ |
0 |
(6) |
app(app(div,app(s,x)),app(s,y)) |
→ |
app(s,app(app(div,app(app(minus,x),y)),app(s,y))) |
(7) |
Hence, it suffices to show innermost termination in the following.
The dependency pairs are split into 3
components.
-
The
1st
component contains the
pair
app#(map1(x0),y1) |
→ |
map2#(x0,y1) |
(32) |
map2#(f,cons2(x,xs)) |
→ |
app#(f,x) |
(25) |
map2#(f,cons2(x,xs)) |
→ |
map2#(f,xs) |
(26) |
1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
1.1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
1.1.1.1.1.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
map2#(f,cons2(x,xs)) |
→ |
app#(f,x) |
(25) |
|
1 |
≥ |
1 |
2 |
> |
2 |
map2#(f,cons2(x,xs)) |
→ |
map2#(f,xs) |
(26) |
|
1 |
≥ |
1 |
2 |
> |
2 |
app#(map1(x0),y1) |
→ |
map2#(x0,y1) |
(32) |
|
1 |
> |
1 |
2 |
≥ |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
div2#(s1(x),s1(y)) |
→ |
div2#(minus2(x,y),s1(y)) |
(30) |
1.1.1.1.2 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
minus2(x,0) |
→ |
x |
(20) |
minus2(s1(x),s1(y)) |
→ |
minus2(p1(s1(x)),p1(s1(y))) |
(21) |
p1(s1(x)) |
→ |
x |
(22) |
1.1.1.1.2.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
minus2(x0,0) |
minus2(s1(x0),s1(x1)) |
p1(s1(x0)) |
1.1.1.1.2.1.1 Reduction Pair Processor
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(s1) |
= |
1 |
|
weight(s1) |
= |
1 |
|
|
|
in combination with the following argument filter
π(div2#) |
= |
1 |
π(s1) |
= |
[1] |
π(minus2) |
= |
1 |
π(p1) |
= |
1 |
the
pair
div2#(s1(x),s1(y)) |
→ |
div2#(minus2(x,y),s1(y)) |
(30) |
could be deleted.
1.1.1.1.2.1.1.1 P is empty
There are no pairs anymore.
-
The
3rd
component contains the
pair
minus2#(s1(x),s1(y)) |
→ |
minus2#(p1(s1(x)),p1(s1(y))) |
(27) |
1.1.1.1.3 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
1.1.1.1.3.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
1.1.1.1.3.1.1 Monotonic Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
[p1(x1)] |
= |
1 · x1
|
[s1(x1)] |
= |
2 + 2 · x1
|
[minus2#(x1, x2)] |
= |
2 · x1 + 2 · x2
|
the
rules
map2(f,nil) |
→ |
nil |
(18) |
map2(f,cons2(x,xs)) |
→ |
cons2(app(f,x),map2(f,xs)) |
(19) |
minus2(x,0) |
→ |
x |
(20) |
minus2(s1(x),s1(y)) |
→ |
minus2(p1(s1(x)),p1(s1(y))) |
(21) |
p1(s1(x)) |
→ |
x |
(22) |
div2(0,s1(y)) |
→ |
0 |
(23) |
div2(s1(x),s1(y)) |
→ |
s1(div2(minus2(x,y),s1(y))) |
(24) |
app(map,y1) |
→ |
map1(y1) |
(8) |
app(map1(x0),y1) |
→ |
map2(x0,y1) |
(9) |
app(cons,y1) |
→ |
cons1(y1) |
(10) |
app(cons1(x0),y1) |
→ |
cons2(x0,y1) |
(11) |
app(minus,y1) |
→ |
minus1(y1) |
(12) |
app(minus1(x0),y1) |
→ |
minus2(x0,y1) |
(13) |
app(s,y1) |
→ |
s1(y1) |
(14) |
app(p,y1) |
→ |
p1(y1) |
(15) |
app(div,y1) |
→ |
div1(y1) |
(16) |
app(div1(x0),y1) |
→ |
div2(x0,y1) |
(17) |
could be deleted.
1.1.1.1.3.1.1.1 Reduction Pair Processor
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(s1) |
= |
1 |
|
weight(s1) |
= |
1 |
|
|
|
prec(p1) |
= |
0 |
|
weight(p1) |
= |
1 |
|
|
|
in combination with the following argument filter
π(minus2#) |
= |
2 |
π(s1) |
= |
[] |
π(p1) |
= |
[] |
the
pair
minus2#(s1(x),s1(y)) |
→ |
minus2#(p1(s1(x)),p1(s1(y))) |
(27) |
could be deleted.
1.1.1.1.3.1.1.1.1 P is empty
There are no pairs anymore.