The rewrite relation of the following TRS is considered.
| 0(#) | → | # | (1) |
| +(#,x) | → | x | (2) |
| +(x,#) | → | x | (3) |
| +(0(x),0(y)) | → | 0(+(x,y)) | (4) |
| +(0(x),1(y)) | → | 1(+(x,y)) | (5) |
| +(1(x),0(y)) | → | 1(+(x,y)) | (6) |
| +(1(x),1(y)) | → | 0(+(+(x,y),1(#))) | (7) |
| +(+(x,y),z) | → | +(x,+(y,z)) | (8) |
| -(#,x) | → | # | (9) |
| -(x,#) | → | x | (10) |
| -(0(x),0(y)) | → | 0(-(x,y)) | (11) |
| -(0(x),1(y)) | → | 1(-(-(x,y),1(#))) | (12) |
| -(1(x),0(y)) | → | 1(-(x,y)) | (13) |
| -(1(x),1(y)) | → | 0(-(x,y)) | (14) |
| not(true) | → | false | (15) |
| not(false) | → | true | (16) |
| if(true,x,y) | → | x | (17) |
| if(false,x,y) | → | y | (18) |
| ge(0(x),0(y)) | → | ge(x,y) | (19) |
| ge(0(x),1(y)) | → | not(ge(y,x)) | (20) |
| ge(1(x),0(y)) | → | ge(x,y) | (21) |
| ge(1(x),1(y)) | → | ge(x,y) | (22) |
| ge(x,#) | → | true | (23) |
| ge(#,0(x)) | → | ge(#,x) | (24) |
| ge(#,1(x)) | → | false | (25) |
| log(x) | → | -(log'(x),1(#)) | (26) |
| log'(#) | → | # | (27) |
| log'(1(x)) | → | +(log'(x),1(#)) | (28) |
| log'(0(x)) | → | if(ge(x,1(#)),+(log'(x),1(#)),#) | (29) |
| [-(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [if(x1, x2, x3)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [0(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [1(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [true] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [#] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [false] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log'(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [ge(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [+(x1, x2)] | = |
|
| log'(#) | → | # | (27) |
| [-(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [if(x1, x2, x3)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [0(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [1(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [true] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [#] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [false] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log'(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [ge(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [+(x1, x2)] | = |
|
| log(x) | → | -(log'(x),1(#)) | (26) |
| [-(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [if(x1, x2, x3)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [0(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [1(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [true] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [#] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [false] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log'(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [ge(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [+(x1, x2)] | = |
|
| if(true,x,y) | → | x | (17) |
| if(false,x,y) | → | y | (18) |
| log'(1(x)) | → | +(log'(x),1(#)) | (28) |
| [-(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [if(x1, x2, x3)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [0(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [1(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [true] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [#] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [false] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [log'(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [ge(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| [+(x1, x2)] | = |
|
| log'(0(x)) | → | if(ge(x,1(#)),+(log'(x),1(#)),#) | (29) |
| [-(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [0(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [1(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [true] | = |
|
||||||||||||||||||||||||||||||||||||
| [#] | = |
|
||||||||||||||||||||||||||||||||||||
| [false] | = |
|
||||||||||||||||||||||||||||||||||||
| [ge(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
| [not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
| [+(x1, x2)] | = |
|
| ge(x,#) | → | true | (23) |
| ge(#,1(x)) | → | false | (25) |
| +#(0(x),0(y)) | → | +#(x,y) | (30) |
| +#(0(x),0(y)) | → | 0#(+(x,y)) | (31) |
| +#(0(x),1(y)) | → | +#(x,y) | (32) |
| +#(1(x),0(y)) | → | +#(x,y) | (33) |
| +#(1(x),1(y)) | → | +#(x,y) | (34) |
| +#(1(x),1(y)) | → | +#(+(x,y),1(#)) | (35) |
| +#(1(x),1(y)) | → | 0#(+(+(x,y),1(#))) | (36) |
| +#(+(x,y),z) | → | +#(y,z) | (37) |
| +#(+(x,y),z) | → | +#(x,+(y,z)) | (38) |
| -#(0(x),0(y)) | → | -#(x,y) | (39) |
| -#(0(x),0(y)) | → | 0#(-(x,y)) | (40) |
| -#(0(x),1(y)) | → | -#(x,y) | (41) |
| -#(0(x),1(y)) | → | -#(-(x,y),1(#)) | (42) |
| -#(1(x),0(y)) | → | -#(x,y) | (43) |
| -#(1(x),1(y)) | → | -#(x,y) | (44) |
| -#(1(x),1(y)) | → | 0#(-(x,y)) | (45) |
| ge#(0(x),0(y)) | → | ge#(x,y) | (46) |
| ge#(0(x),1(y)) | → | ge#(y,x) | (47) |
| ge#(0(x),1(y)) | → | not#(ge(y,x)) | (48) |
| ge#(1(x),0(y)) | → | ge#(x,y) | (49) |
| ge#(1(x),1(y)) | → | ge#(x,y) | (50) |
| ge#(#,0(x)) | → | ge#(#,x) | (51) |
The dependency pairs are split into 4 components.
| +#(1(x),1(y)) | → | +#(+(x,y),1(#)) | (35) |
| +#(+(x,y),z) | → | +#(x,+(y,z)) | (38) |
| +#(+(x,y),z) | → | +#(y,z) | (37) |
| +#(1(x),1(y)) | → | +#(x,y) | (34) |
| +#(1(x),0(y)) | → | +#(x,y) | (33) |
| +#(0(x),1(y)) | → | +#(x,y) | (32) |
| +#(0(x),0(y)) | → | +#(x,y) | (30) |
| [0(x1)] | = | 1 · x1 + 0 |
| [1(x1)] | = | 1 · x1 + 1 |
| [#] | = | 1 |
| [+#(x1, x2)] | = | 2 · x1 + 2 · x2 + 2 |
| [+(x1, x2)] | = | 1 · x1 + 1 · x2 + 0 |
| +(#,x) | → | x | (2) |
| +(x,#) | → | x | (3) |
| +(0(x),0(y)) | → | 0(+(x,y)) | (4) |
| +(0(x),1(y)) | → | 1(+(x,y)) | (5) |
| +(1(x),0(y)) | → | 1(+(x,y)) | (6) |
| +(1(x),1(y)) | → | 0(+(+(x,y),1(#))) | (7) |
| +(+(x,y),z) | → | +(x,+(y,z)) | (8) |
| 0(#) | → | # | (1) |
| +#(1(x),1(y)) | → | +#(x,y) | (34) |
| +#(1(x),0(y)) | → | +#(x,y) | (33) |
| +#(0(x),1(y)) | → | +#(x,y) | (32) |
| [0(x1)] | = | 1 · x1 + 1 |
| [1(x1)] | = | 1 · x1 + 2 |
| [#] | = | 1 |
| [+#(x1, x2)] | = | 1/2 · x1 + 1/2 · x2 + 0 |
| [+(x1, x2)] | = | 1 · x1 + 1 · x2 + 0 |
| +(#,x) | → | x | (2) |
| +(x,#) | → | x | (3) |
| +(0(x),0(y)) | → | 0(+(x,y)) | (4) |
| +(0(x),1(y)) | → | 1(+(x,y)) | (5) |
| +(1(x),0(y)) | → | 1(+(x,y)) | (6) |
| +(1(x),1(y)) | → | 0(+(+(x,y),1(#))) | (7) |
| +(+(x,y),z) | → | +(x,+(y,z)) | (8) |
| 0(#) | → | # | (1) |
| +#(1(x),1(y)) | → | +#(+(x,y),1(#)) | (35) |
| +#(0(x),0(y)) | → | +#(x,y) | (30) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| +#(+(x,y),z) | → | +#(x,+(y,z)) | (38) |
| 1 | > | 1 | |
| +#(+(x,y),z) | → | +#(y,z) | (37) |
| 2 | ≥ | 2 | |
| 1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
| -#(1(x),1(y)) | → | -#(x,y) | (44) |
| -#(1(x),0(y)) | → | -#(x,y) | (43) |
| -#(0(x),1(y)) | → | -#(-(x,y),1(#)) | (42) |
| -#(0(x),1(y)) | → | -#(x,y) | (41) |
| -#(0(x),0(y)) | → | -#(x,y) | (39) |
| π(-#) | = | { 1, 1 } |
| π(-) | = | { 1 } |
| π(1) | = | { 1, 1 } |
| π(0) | = | { 1, 1 } |
| -#(1(x),1(y)) | → | -#(x,y) | (44) |
| -#(1(x),0(y)) | → | -#(x,y) | (43) |
| -#(0(x),1(y)) | → | -#(-(x,y),1(#)) | (42) |
| -#(0(x),1(y)) | → | -#(x,y) | (41) |
| -#(0(x),0(y)) | → | -#(x,y) | (39) |
There are no pairs anymore.
| ge#(1(x),1(y)) | → | ge#(x,y) | (50) |
| ge#(1(x),0(y)) | → | ge#(x,y) | (49) |
| ge#(0(x),1(y)) | → | ge#(y,x) | (47) |
| ge#(0(x),0(y)) | → | ge#(x,y) | (46) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| ge#(1(x),1(y)) | → | ge#(x,y) | (50) |
| 2 | > | 2 | |
| 1 | > | 1 | |
| ge#(1(x),0(y)) | → | ge#(x,y) | (49) |
| 2 | > | 2 | |
| 1 | > | 1 | |
| ge#(0(x),1(y)) | → | ge#(y,x) | (47) |
| 2 | > | 1 | |
| 1 | > | 2 | |
| ge#(0(x),0(y)) | → | ge#(x,y) | (46) |
| 2 | > | 2 | |
| 1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
| ge#(#,0(x)) | → | ge#(#,x) | (51) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| ge#(#,0(x)) | → | ge#(#,x) | (51) |
| 2 | > | 2 | |
| 1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.