The rewrite relation of the following TRS is considered.
ge(x,0) | → | true | (1) |
ge(0,s(y)) | → | false | (2) |
ge(s(x),s(y)) | → | ge(x,y) | (3) |
minus(x,0) | → | x | (4) |
minus(0,y) | → | 0 | (5) |
minus(s(x),s(y)) | → | minus(x,y) | (6) |
id_inc(x) | → | x | (7) |
id_inc(x) | → | s(x) | (8) |
div(x,y) | → | if(ge(y,s(0)),ge(x,y),x,y) | (9) |
if(false,b,x,y) | → | div_by_zero | (10) |
if(true,false,x,y) | → | 0 | (11) |
if(true,true,x,y) | → | id_inc(div(minus(x,y),y)) | (12) |
ge#(s(x),s(y)) | → | ge#(x,y) | (13) |
minus#(s(x),s(y)) | → | minus#(x,y) | (14) |
div#(x,y) | → | if#(ge(y,s(0)),ge(x,y),x,y) | (15) |
div#(x,y) | → | ge#(y,s(0)) | (16) |
div#(x,y) | → | ge#(x,y) | (17) |
if#(true,true,x,y) | → | id_inc#(div(minus(x,y),y)) | (18) |
if#(true,true,x,y) | → | div#(minus(x,y),y) | (19) |
if#(true,true,x,y) | → | minus#(x,y) | (20) |
ge#(s(x),s(y)) | → | ge#(x,y) | (13) |
minus#(s(x),s(y)) | → | minus#(x,y) | (14) |
div#(x,y) | → | ge#(y,s(0)) | (16) |
div#(x,y) | → | ge#(x,y) | (17) |
if#(true,true,x,y) | → | id_inc#(div(minus(x,y),y)) | (18) |
if#(true,true,x,y) | → | minus#(x,y) | (20) |
t0 | = | if#(ge(id_inc(x),s(0)),ge(x'',id_inc(0)),x',id_inc(0)) |
→R | if#(ge(id_inc(x),s(0)),ge(x'',0),x',id_inc(0)) | |
→R | if#(ge(id_inc(x),s(0)),true,x',id_inc(0)) | |
→R | if#(ge(s(x),s(0)),true,x',id_inc(0)) | |
→R | if#(ge(x,0),true,x',id_inc(0)) | |
→R | if#(true,true,x',id_inc(0)) | |
→P | div#(minus(x',id_inc(0)),id_inc(0)) | |
→P | if#(ge(id_inc(0),s(0)),ge(minus(x',id_inc(0)),id_inc(0)),minus(x',id_inc(0)),id_inc(0)) | |
= | t7 |