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) |
|
Min(N(x,l,r)) |
→ |
Min(l) |
(35) |
|
Max(L(x)) |
→ |
x |
(36) |
|
Max(N(x,l,r)) |
→ |
Max(r) |
(37) |
|
BS(N(x,l,r)) |
→ |
and(and(ge(x,Max(l)),ge(Min(r),x)),and(BS(l),BS(r))) |
(39) |
|
Size(N(x,l,r)) |
→ |
+(+(Size(l),Size(r)),I(1)) |
(41) |
|
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) |
The dependency pairs are split into 5
components.
-
The
1st
component contains the
pair
|
Log'#(O(x)) |
→ |
Log'#(x) |
(71) |
|
Log'#(I(x)) |
→ |
Log'#(x) |
(67) |
1.1.1.1.1.1.1.1.1.1 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [O(x1)] |
= |
1 · x1
|
| [I(x1)] |
= |
1 · x1
|
| [Log'#(x1)] |
= |
1 · x1
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
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.
|
Log'#(O(x)) |
→ |
Log'#(x) |
(71) |
|
| 1 |
> |
1 |
|
Log'#(I(x)) |
→ |
Log'#(x) |
(67) |
|
| 1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
|
ge#(O(x),I(y)) |
→ |
ge#(y,x) |
(62) |
|
ge#(O(x),O(y)) |
→ |
ge#(x,y) |
(60) |
|
ge#(I(x),O(y)) |
→ |
ge#(x,y) |
(63) |
|
ge#(I(x),I(y)) |
→ |
ge#(x,y) |
(64) |
1.1.1.1.1.1.1.1.1.2 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [O(x1)] |
= |
1 · x1
|
| [I(x1)] |
= |
1 · x1
|
| [ge#(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.1.1.1.1.1.1.1.2.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
ge#(O(x),I(y)) |
→ |
ge#(y,x) |
(62) |
|
|
| 2 |
> |
1 |
| 1 |
> |
2 |
|
ge#(O(x),O(y)) |
→ |
ge#(x,y) |
(60) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
|
ge#(I(x),O(y)) |
→ |
ge#(x,y) |
(63) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
|
ge#(I(x),I(y)) |
→ |
ge#(x,y) |
(64) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
|
+#(O(x),I(y)) |
→ |
+#(x,y) |
(46) |
|
+#(O(x),O(y)) |
→ |
+#(x,y) |
(45) |
|
+#(I(x),O(y)) |
→ |
+#(x,y) |
(47) |
|
+#(I(x),I(y)) |
→ |
+#(+(x,y),I(0)) |
(49) |
|
+#(I(x),I(y)) |
→ |
+#(x,y) |
(50) |
|
+#(x,+(y,z)) |
→ |
+#(+(x,y),z) |
(51) |
|
+#(x,+(y,z)) |
→ |
+#(x,y) |
(52) |
1.1.1.1.1.1.1.1.1.3 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [+(x1, x2)] |
= |
1 · x1 + 1 · x2
|
| [0] |
= |
0 |
| [O(x1)] |
= |
1 · x1
|
| [I(x1)] |
= |
1 · x1
|
| [+#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
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
rule
could be deleted.
1.1.1.1.1.1.1.1.1.3.1 Monotonic Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
| [+(x1, x2)] |
= |
1 · x1 + 1 · x2
|
| [0] |
= |
0 |
| [O(x1)] |
= |
2 · x1
|
| [I(x1)] |
= |
2 + 2 · x1
|
| [+#(x1, x2)] |
= |
2 · x1 + 2 · x2
|
the
pairs
|
+#(O(x),I(y)) |
→ |
+#(x,y) |
(46) |
|
+#(I(x),O(y)) |
→ |
+#(x,y) |
(47) |
|
+#(I(x),I(y)) |
→ |
+#(+(x,y),I(0)) |
(49) |
|
+#(I(x),I(y)) |
→ |
+#(x,y) |
(50) |
and
no rules
could be deleted.
1.1.1.1.1.1.1.1.1.3.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
|
+#(O(x),O(y)) |
→ |
+#(x,y) |
(45) |
|
|
| 1 |
> |
1 |
| 2 |
> |
2 |
|
+#(x,+(y,z)) |
→ |
+#(+(x,y),z) |
(51) |
|
| 2 |
> |
2 |
|
+#(x,+(y,z)) |
→ |
+#(x,y) |
(52) |
|
|
| 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
|
-#(O(x),I(y)) |
→ |
-#(-(x,y),I(1)) |
(55) |
|
-#(O(x),I(y)) |
→ |
-#(x,y) |
(56) |
|
-#(O(x),O(y)) |
→ |
-#(x,y) |
(54) |
|
-#(I(x),O(y)) |
→ |
-#(x,y) |
(57) |
|
-#(I(x),I(y)) |
→ |
-#(x,y) |
(59) |
1.1.1.1.1.1.1.1.1.4 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [-(x1, x2)] |
= |
1 · x1 + 1 · x2
|
| [0] |
= |
0 |
| [O(x1)] |
= |
1 · x1
|
| [I(x1)] |
= |
1 · x1
|
| [1] |
= |
0 |
| [-#(x1, x2)] |
= |
1 · x1 + 1 · x2
|
together with the usable
rules
|
-(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) |
|
O(0) |
→ |
0 |
(1) |
(w.r.t. the implicit argument filter of the reduction pair),
the
rule
could be deleted.
1.1.1.1.1.1.1.1.1.4.1 Monotonic Reduction Pair Processor
Using the linear polynomial interpretation over the naturals
| [-(x1, x2)] |
= |
1 · x1 + 2 · x2
|
| [0] |
= |
2 |
| [O(x1)] |
= |
2 · x1
|
| [I(x1)] |
= |
2 · x1
|
| [1] |
= |
0 |
| [-#(x1, x2)] |
= |
2 · x1 + 2 · x2
|
the
rules
|
-(x,0) |
→ |
x |
(9) |
|
O(0) |
→ |
0 |
(1) |
could be deleted.
1.1.1.1.1.1.1.1.1.4.1.1 Switch to Innermost Termination
The TRS does not have overlaps with the pairs and is locally confluent:
20
Hence, it suffices to show innermost termination in the following.
1.1.1.1.1.1.1.1.1.4.1.1.1 Monotonic Reduction Pair Processor
Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
| prec(0) |
= |
2 |
|
weight(0) |
= |
1 |
|
|
|
| prec(1) |
= |
4 |
|
weight(1) |
= |
2 |
|
|
|
| prec(O) |
= |
1 |
|
weight(O) |
= |
4 |
|
|
|
| prec(I) |
= |
0 |
|
weight(I) |
= |
2 |
|
|
|
| prec(-) |
= |
3 |
|
weight(-) |
= |
0 |
|
|
|
| prec(-#) |
= |
5 |
|
weight(-#) |
= |
0 |
|
|
|
the
pairs
|
-#(O(x),I(y)) |
→ |
-#(-(x,y),I(1)) |
(55) |
|
-#(O(x),I(y)) |
→ |
-#(x,y) |
(56) |
|
-#(O(x),O(y)) |
→ |
-#(x,y) |
(54) |
|
-#(I(x),O(y)) |
→ |
-#(x,y) |
(57) |
|
-#(I(x),I(y)) |
→ |
-#(x,y) |
(59) |
and
the
rules
|
-(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) |
could be deleted.
1.1.1.1.1.1.1.1.1.4.1.1.1.1 P is empty
There are no pairs anymore.
-
The
5th
component contains the
pair
|
ge#(0,O(x)) |
→ |
ge#(0,x) |
(65) |
1.1.1.1.1.1.1.1.1.5 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
| [0] |
= |
0 |
| [O(x1)] |
= |
1 · x1
|
| [ge#(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.1.1.1.1.1.1.1.5.1 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) |
|
|
| 1 |
≥ |
1 |
| 2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.