The rewrite relation of the following TRS is considered.
O(0) |
→ |
0 |
(1) |
+(0,x) |
→ |
x |
(2) |
+(x,0) |
→ |
x |
(3) |
+(O(x),O(y)) |
→ |
O(+(x,y)) |
(4) |
+(O(x),I(y)) |
→ |
I(+(x,y)) |
(5) |
+(I(x),O(y)) |
→ |
I(+(x,y)) |
(6) |
+(I(x),I(y)) |
→ |
O(+(+(x,y),I(0))) |
(7) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
(8) |
-(x,0) |
→ |
x |
(9) |
-(0,x) |
→ |
0 |
(10) |
-(O(x),O(y)) |
→ |
O(-(x,y)) |
(11) |
-(O(x),I(y)) |
→ |
I(-(-(x,y),I(1))) |
(12) |
-(I(x),O(y)) |
→ |
I(-(x,y)) |
(13) |
-(I(x),I(y)) |
→ |
O(-(x,y)) |
(14) |
not(true) |
→ |
false |
(15) |
not(false) |
→ |
true |
(16) |
and(x,true) |
→ |
x |
(17) |
and(x,false) |
→ |
false |
(18) |
if(true,x,y) |
→ |
x |
(19) |
if(false,x,y) |
→ |
y |
(20) |
ge(O(x),O(y)) |
→ |
ge(x,y) |
(21) |
ge(O(x),I(y)) |
→ |
not(ge(y,x)) |
(22) |
ge(I(x),O(y)) |
→ |
ge(x,y) |
(23) |
ge(I(x),I(y)) |
→ |
ge(x,y) |
(24) |
ge(x,0) |
→ |
true |
(25) |
ge(0,O(x)) |
→ |
ge(0,x) |
(26) |
ge(0,I(x)) |
→ |
false |
(27) |
Log'(0) |
→ |
0 |
(28) |
Log'(I(x)) |
→ |
+(Log'(x),I(0)) |
(29) |
Log'(O(x)) |
→ |
if(ge(x,I(0)),+(Log'(x),I(0)),0) |
(30) |
Log(x) |
→ |
-(Log'(x),I(0)) |
(31) |
Val(L(x)) |
→ |
x |
(32) |
Val(N(x,l,r)) |
→ |
x |
(33) |
Min(L(x)) |
→ |
x |
(34) |
Min(N(x,l,r)) |
→ |
Min(l) |
(35) |
Max(L(x)) |
→ |
x |
(36) |
Max(N(x,l,r)) |
→ |
Max(r) |
(37) |
BS(L(x)) |
→ |
true |
(38) |
BS(N(x,l,r)) |
→ |
and(and(ge(x,Max(l)),ge(Min(r),x)),and(BS(l),BS(r))) |
(39) |
Size(L(x)) |
→ |
I(0) |
(40) |
Size(N(x,l,r)) |
→ |
+(+(Size(l),Size(r)),I(1)) |
(41) |
WB(L(x)) |
→ |
true |
(42) |
WB(N(x,l,r)) |
→ |
and(if(ge(Size(l),Size(r)),ge(I(0),-(Size(l),Size(r))),ge(I(0),-(Size(r),Size(l)))),and(WB(l),WB(r))) |
(43) |
[N(x1, x2, x3)] |
= |
· x1 + · x2 + · x3 +
|
[-(x1, x2)] |
= |
· x1 + · x2 +
|
[Val(x1)] |
= |
· x1 +
|
[false] |
= |
|
[O(x1)] |
= |
· x1 +
|
[I(x1)] |
= |
· x1 +
|
[l] |
= |
|
[BS(x1)] |
= |
· x1 +
|
[Min(x1)] |
= |
· x1 +
|
[r] |
= |
|
[Size(x1)] |
= |
· x1 +
|
[1] |
= |
|
[if(x1, x2, x3)] |
= |
· x1 + · x2 + · x3 +
|
[0] |
= |
|
[not(x1)] |
= |
· x1 +
|
[Max(x1)] |
= |
· x1 +
|
[L(x1)] |
= |
· x1 +
|
[Log'(x1)] |
= |
· x1 +
|
[WB(x1)] |
= |
· x1 +
|
[ge(x1, x2)] |
= |
· x1 + · x2 +
|
[and(x1, x2)] |
= |
· x1 + · x2 +
|
[Log(x1)] |
= |
· x1 +
|
[true] |
= |
|
[+(x1, x2)] |
= |
· x1 + · x2 +
|
all of the following rules can be deleted.
[N(x1, x2, x3)] |
= |
· x1 + · x2 + · x3 +
|
[-(x1, x2)] |
= |
· x1 + · x2 +
|
[Val(x1)] |
= |
· x1 +
|
[false] |
= |
|
[O(x1)] |
= |
· x1 +
|
[I(x1)] |
= |
· x1 +
|
[l] |
= |
|
[BS(x1)] |
= |
· x1 +
|
[Min(x1)] |
= |
· x1 +
|
[r] |
= |
|
[Size(x1)] |
= |
· x1 +
|
[1] |
= |
|
[if(x1, x2, x3)] |
= |
· x1 + · x2 + · x3 +
|
[0] |
= |
|
[not(x1)] |
= |
· x1 +
|
[Max(x1)] |
= |
· x1 +
|
[L(x1)] |
= |
· x1 +
|
[Log'(x1)] |
= |
· x1 +
|
[WB(x1)] |
= |
· x1 +
|
[ge(x1, x2)] |
= |
· x1 + · x2 +
|
[and(x1, x2)] |
= |
· x1 + · x2 +
|
[Log(x1)] |
= |
· x1 +
|
[true] |
= |
|
[+(x1, x2)] |
= |
· x1 + · x2 +
|
all of the following rules can be deleted.
The dependency pairs are split into 5
components.
-
The
1st
component contains the
pair
-#(I(x),I(y)) |
→ |
-#(x,y) |
(58) |
-#(I(x),O(y)) |
→ |
-#(x,y) |
(57) |
-#(O(x),I(y)) |
→ |
-#(-(x,y),I(1)) |
(56) |
-#(O(x),I(y)) |
→ |
-#(x,y) |
(55) |
-#(O(x),O(y)) |
→ |
-#(x,y) |
(53) |
1.1.1.1.1 Subterm Criterion Processor
We use the projection to multisets
π(-#)
|
= |
{
1, 1
}
|
π(N)
|
= |
{
2
}
|
π(L)
|
= |
{
1
}
|
π(-)
|
= |
{
1
}
|
π(I)
|
= |
{
1, 1
}
|
π(O)
|
= |
{
1, 1
}
|
to remove the pairs:
-#(I(x),I(y)) |
→ |
-#(x,y) |
(58) |
-#(I(x),O(y)) |
→ |
-#(x,y) |
(57) |
-#(O(x),I(y)) |
→ |
-#(-(x,y),I(1)) |
(56) |
-#(O(x),I(y)) |
→ |
-#(x,y) |
(55) |
-#(O(x),O(y)) |
→ |
-#(x,y) |
(53) |
1.1.1.1.1.1 P is empty
There are no pairs anymore.
-
The
2nd
component contains the
pair
Log'#(O(x)) |
→ |
Log'#(x) |
(68) |
Log'#(I(x)) |
→ |
Log'#(x) |
(66) |
1.1.1.1.2 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
Log'#(O(x)) |
→ |
Log'#(x) |
(68) |
|
1 |
> |
1 |
Log'#(I(x)) |
→ |
Log'#(x) |
(66) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
+#(I(x),I(y)) |
→ |
+#(+(x,y),I(0)) |
(49) |
+#(I(x),I(y)) |
→ |
+#(x,y) |
(48) |
+#(x,+(y,z)) |
→ |
+#(+(x,y),z) |
(52) |
+#(x,+(y,z)) |
→ |
+#(x,y) |
(51) |
+#(I(x),O(y)) |
→ |
+#(x,y) |
(47) |
+#(O(x),I(y)) |
→ |
+#(x,y) |
(46) |
+#(O(x),O(y)) |
→ |
+#(x,y) |
(44) |
1.1.1.1.3 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the arctic semiring over the integers
[O(x1)] |
= |
0 · x1 + 0 |
[I(x1)] |
= |
0 · x1 +
-∞ |
[0] |
= |
0 |
[+#(x1, x2)] |
= |
-∞ · x1 + 0 · x2 + 0 |
[+(x1, x2)] |
= |
0 · x1 + 1 · x2 + 6 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pair
+#(x,+(y,z)) |
→ |
+#(+(x,y),z) |
(52) |
could be deleted.
1.1.1.1.3.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the arctic semiring over the integers
[O(x1)] |
= |
1 · x1 + 4 |
[I(x1)] |
= |
0 · x1 +
-∞ |
[0] |
= |
0 |
[+#(x1, x2)] |
= |
-∞ · x1 + 0 · x2 + 0 |
[+(x1, x2)] |
= |
2 · x1 + 0 · x2 + 0 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pairs
+#(I(x),O(y)) |
→ |
+#(x,y) |
(47) |
+#(O(x),O(y)) |
→ |
+#(x,y) |
(44) |
could be deleted.
1.1.1.1.3.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the arctic semiring over the integers
[O(x1)] |
= |
0 · x1 + 4 |
[I(x1)] |
= |
1 · x1 + 1 |
[0] |
= |
0 |
[+#(x1, x2)] |
= |
-∞ · x1 + 0 · x2 +
-∞ |
[+(x1, x2)] |
= |
0 · x1 +
-∞ · x2 + 0 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pairs
+#(I(x),I(y)) |
→ |
+#(x,y) |
(48) |
+#(O(x),I(y)) |
→ |
+#(x,y) |
(46) |
could be deleted.
1.1.1.1.3.1.1.1 Dependency Graph Processor
The dependency pairs are split into 2
components.
-
The
1st
component contains the
pair
+#(x,+(y,z)) |
→ |
+#(x,y) |
(51) |
1.1.1.1.3.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.
+#(x,+(y,z)) |
→ |
+#(x,y) |
(51) |
|
2 |
> |
2 |
1 |
≥ |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
+#(I(x),I(y)) |
→ |
+#(+(x,y),I(0)) |
(49) |
1.1.1.1.3.1.1.1.2 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the rationals with delta = 1/64
[O(x1)] |
= |
1 · x1 + 0 |
[I(x1)] |
= |
1 · x1 + 1 |
[0] |
= |
0 |
[+#(x1, x2)] |
= |
1/2 · x1 + 1 · x2 + 0 |
[+(x1, x2)] |
= |
1 · x1 + 2 · x2 + 0 |
together with the usable
rules
+(0,x) |
→ |
x |
(2) |
+(x,0) |
→ |
x |
(3) |
+(O(x),O(y)) |
→ |
O(+(x,y)) |
(4) |
+(O(x),I(y)) |
→ |
I(+(x,y)) |
(5) |
+(I(x),O(y)) |
→ |
I(+(x,y)) |
(6) |
+(I(x),I(y)) |
→ |
O(+(+(x,y),I(0))) |
(7) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
(8) |
O(0) |
→ |
0 |
(1) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
+#(I(x),I(y)) |
→ |
+#(+(x,y),I(0)) |
(49) |
could be deleted.
1.1.1.1.3.1.1.1.2.1 P is empty
There are no pairs anymore.
-
The
4th
component contains the
pair
ge#(I(x),I(y)) |
→ |
ge#(x,y) |
(64) |
ge#(I(x),O(y)) |
→ |
ge#(x,y) |
(63) |
ge#(O(x),I(y)) |
→ |
ge#(y,x) |
(61) |
ge#(O(x),O(y)) |
→ |
ge#(x,y) |
(60) |
1.1.1.1.4 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
ge#(I(x),I(y)) |
→ |
ge#(x,y) |
(64) |
|
2 |
> |
2 |
1 |
> |
1 |
ge#(I(x),O(y)) |
→ |
ge#(x,y) |
(63) |
|
2 |
> |
2 |
1 |
> |
1 |
ge#(O(x),I(y)) |
→ |
ge#(y,x) |
(61) |
|
2 |
> |
1 |
1 |
> |
2 |
ge#(O(x),O(y)) |
→ |
ge#(x,y) |
(60) |
|
2 |
> |
2 |
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
5th
component contains the
pair
ge#(0,O(x)) |
→ |
ge#(0,x) |
(65) |
1.1.1.1.5 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
ge#(0,O(x)) |
→ |
ge#(0,x) |
(65) |
|
2 |
> |
2 |
1 |
≥ |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.