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) |
quot(x,y) | → | div(x,y,0) | (9) |
div(x,y,z) | → | if(ge(y,s(0)),ge(x,y),x,y,z) | (10) |
if(false,b,x,y,z) | → | div_by_zero | (11) |
if(true,false,x,y,z) | → | z | (12) |
if(true,true,x,y,z) | → | div(minus(x,y),y,id_inc(z)) | (13) |
ge#(s(x),s(y)) | → | ge#(x,y) | (14) |
minus#(s(x),s(y)) | → | minus#(x,y) | (15) |
quot#(x,y) | → | div#(x,y,0) | (16) |
div#(x,y,z) | → | if#(ge(y,s(0)),ge(x,y),x,y,z) | (17) |
div#(x,y,z) | → | ge#(y,s(0)) | (18) |
div#(x,y,z) | → | ge#(x,y) | (19) |
if#(true,true,x,y,z) | → | div#(minus(x,y),y,id_inc(z)) | (20) |
if#(true,true,x,y,z) | → | minus#(x,y) | (21) |
if#(true,true,x,y,z) | → | id_inc#(z) | (22) |
ge#(s(x),s(y)) | → | ge#(x,y) | (14) |
minus#(s(x),s(y)) | → | minus#(x,y) | (15) |
quot#(x,y) | → | div#(x,y,0) | (16) |
div#(x,y,z) | → | ge#(y,s(0)) | (18) |
div#(x,y,z) | → | ge#(x,y) | (19) |
if#(true,true,x,y,z) | → | minus#(x,y) | (21) |
if#(true,true,x,y,z) | → | id_inc#(z) | (22) |
t0 | = | if#(ge(id_inc(x),s(0)),ge(x'',id_inc(0)),x',id_inc(0),z') |
→R | if#(ge(id_inc(x),s(0)),ge(x'',0),x',id_inc(0),z') | |
→R | if#(ge(id_inc(x),s(0)),true,x',id_inc(0),z') | |
→R | if#(ge(s(x),s(0)),true,x',id_inc(0),z') | |
→R | if#(ge(x,0),true,x',id_inc(0),z') | |
→R | if#(true,true,x',id_inc(0),z') | |
→P | div#(minus(x',id_inc(0)),id_inc(0),id_inc(z')) | |
→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),id_inc(z')) | |
= | t7 |