The
1st
component contains the
pair
sumList#(cons(x0,x1),y1) |
→ |
if#(false,isZero(head(cons(x0,x1))),y1,tail(cons(x0,x1)),cons(p(head(cons(x0,x1))),tail(cons(x0,x1))),inc(y1)) |
(30) |
if#(false,true,y,xs,ys,x) |
→ |
sumList#(xs,y) |
(27) |
if#(false,false,y,xs,ys,x) |
→ |
sumList#(ys,x) |
(28) |
1.1.1.1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
head(cons(x,xs)) |
→ |
x |
(5) |
isZero(0) |
→ |
true |
(3) |
isZero(s(x)) |
→ |
false |
(4) |
tail(cons(x,xs)) |
→ |
xs |
(6) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
p(0) |
→ |
0 |
(10) |
inc(s(x)) |
→ |
s(inc(x)) |
(11) |
inc(0) |
→ |
s(0) |
(12) |
1.1.1.1.1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
isZero(0) |
isZero(s(x0)) |
head(cons(x0,x1)) |
tail(cons(x0,x1)) |
tail(nil) |
p(s(s(x0))) |
p(s(0)) |
p(0) |
inc(s(x0)) |
inc(0) |
1.1.1.1.1.1.1.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.1.1.1.1.1.1.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.1.1.1.1.1.1.1.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.1.1.1.1.1.1.1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
isZero(0) |
→ |
true |
(3) |
isZero(s(x)) |
→ |
false |
(4) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
p(0) |
→ |
0 |
(10) |
tail(cons(x,xs)) |
→ |
xs |
(6) |
inc(s(x)) |
→ |
s(inc(x)) |
(11) |
inc(0) |
→ |
s(0) |
(12) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
isZero(0) |
isZero(s(x0)) |
tail(cons(x0,x1)) |
tail(nil) |
p(s(s(x0))) |
p(s(0)) |
p(0) |
inc(s(x0)) |
inc(0) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
isZero(0) |
→ |
true |
(3) |
isZero(s(x)) |
→ |
false |
(4) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
p(0) |
→ |
0 |
(10) |
inc(s(x)) |
→ |
s(inc(x)) |
(11) |
inc(0) |
→ |
s(0) |
(12) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
isZero(0) |
isZero(s(x0)) |
p(s(s(x0))) |
p(s(0)) |
p(0) |
inc(s(x0)) |
inc(0) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Narrowing Processor
We consider all narrowings of the pair
below position
2
to get the following set of pairs
sumList#(cons(0,y1),y2) |
→ |
if#(false,true,y2,y1,cons(p(0),y1),inc(y2)) |
(36) |
sumList#(cons(s(x0),y1),y2) |
→ |
if#(false,false,y2,y1,cons(p(s(x0)),y1),inc(y2)) |
(37) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
inc(s(x)) |
→ |
s(inc(x)) |
(11) |
inc(0) |
→ |
s(0) |
(12) |
p(0) |
→ |
0 |
(10) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
p(s(s(x0))) |
p(s(0)) |
p(0) |
inc(s(x0)) |
inc(0) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rewriting Processor
We rewrite the right hand side of the pair
resulting in
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
inc(s(x)) |
→ |
s(inc(x)) |
(11) |
inc(0) |
→ |
s(0) |
(12) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Instantiation Processor
We instantiate the pair
to the following set of pairs
if#(false,true,z1,z0,cons(0,z0),y_0) |
→ |
sumList#(z0,z1) |
(39) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Reduction Pair Processor with Usable Rules
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(cons) |
= |
1 |
|
weight(cons) |
= |
1 |
|
|
|
in combination with the following argument filter
π(if#) |
= |
5 |
π(sumList#) |
= |
1 |
π(cons) |
= |
[2] |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pair
if#(false,true,z1,z0,cons(0,z0),y_0) |
→ |
sumList#(z0,z1) |
(39) |
could be deleted.
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 1
component.
-
The
1st
component contains the
pair
sumList#(cons(s(x0),y1),y2) |
→ |
if#(false,false,y2,y1,cons(p(s(x0)),y1),inc(y2)) |
(37) |
if#(false,false,y,xs,ys,x) |
→ |
sumList#(ys,x) |
(28) |
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[if#(x1,...,x6)] |
= |
1 + 2 · x1 + x2 + 2 · x5
|
[cons(x1, x2)] |
= |
-2 + 2 · x1
|
[p(x1)] |
= |
-2 + x1
|
[s(x1)] |
= |
2 + x1
|
[0] |
= |
0 |
[inc(x1)] |
= |
2 |
[sumList#(x1, x2)] |
= |
2 · x1
|
[false] |
= |
1 |
together with the usable
rules
p(s(s(x))) |
→ |
s(p(s(x))) |
(8) |
p(s(0)) |
→ |
0 |
(9) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
if#(false,false,y,xs,ys,x) |
→ |
sumList#(ys,x) |
(28) |
could be deleted.
1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.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.
sumList#(cons(s(x0),y1),y2) |
→ |
if#(false,false,y2,y1,cons(p(s(x0)),y1),inc(y2)) |
(37) |
|
2 |
≥ |
3 |
1 |
> |
4 |
As there is no critical graph in the transitive closure, there are no infinite chains.