The rewrite relation of the following TRS is considered.
notZero(pos(s(x))) | → | true | (1) |
notZero(neg(s(x))) | → | true | (2) |
notZero(neg(0)) | → | false | (3) |
notZero(pos(0)) | → | false | (4) |
greaterZero(pos(s(x))) | → | true | (5) |
greaterZero(pos(0)) | → | false | (6) |
greaterZero(neg(x)) | → | false | (7) |
and(false,false) | → | false | (8) |
and(false,true) | → | false | (9) |
and(true,false) | → | false | (10) |
and(true,true) | → | true | (11) |
minusT(0,y) | → | neg(y) | (12) |
minusT(x,0) | → | pos(x) | (13) |
minusT(s(x),s(y)) | → | minusT(x,y) | (14) |
plusNat(0,y) | → | y | (15) |
plusNat(s(x),y) | → | plusNat(x,s(y)) | (16) |
negate(pos(x)) | → | neg(x) | (17) |
negate(neg(x)) | → | pos(x) | (18) |
minus(pos(x),pos(y)) | → | minusT(x,y) | (19) |
minus(neg(x),neg(y)) | → | negate(minusT(x,y)) | (20) |
minus(pos(x),neg(y)) | → | pos(plusNat(x,y)) | (21) |
minus(neg(x),pos(y)) | → | neg(plusNat(x,y)) | (22) |
while(true,i,y) | → | while(and(notZero(y),greaterZero(i)),minus(i,y),y) | (23) |
minusT#(s(x),s(y)) | → | minusT#(x,y) | (24) |
plusNat#(s(x),y) | → | plusNat#(x,s(y)) | (25) |
minus#(pos(x),pos(y)) | → | minusT#(x,y) | (26) |
minus#(neg(x),neg(y)) | → | negate#(minusT(x,y)) | (27) |
minus#(neg(x),neg(y)) | → | minusT#(x,y) | (28) |
minus#(pos(x),neg(y)) | → | plusNat#(x,y) | (29) |
minus#(neg(x),pos(y)) | → | plusNat#(x,y) | (30) |
while#(true,i,y) | → | while#(and(notZero(y),greaterZero(i)),minus(i,y),y) | (31) |
while#(true,i,y) | → | and#(notZero(y),greaterZero(i)) | (32) |
while#(true,i,y) | → | notZero#(y) | (33) |
while#(true,i,y) | → | greaterZero#(i) | (34) |
while#(true,i,y) | → | minus#(i,y) | (35) |
minusT#(s(x),s(y)) | → | minusT#(x,y) | (24) |
plusNat#(s(x),y) | → | plusNat#(x,s(y)) | (25) |
minus#(pos(x),pos(y)) | → | minusT#(x,y) | (26) |
minus#(neg(x),neg(y)) | → | negate#(minusT(x,y)) | (27) |
minus#(neg(x),neg(y)) | → | minusT#(x,y) | (28) |
minus#(pos(x),neg(y)) | → | plusNat#(x,y) | (29) |
minus#(neg(x),pos(y)) | → | plusNat#(x,y) | (30) |
while#(true,i,y) | → | and#(notZero(y),greaterZero(i)) | (32) |
while#(true,i,y) | → | notZero#(y) | (33) |
while#(true,i,y) | → | greaterZero#(i) | (34) |
while#(true,i,y) | → | minus#(i,y) | (35) |
An infinite (possibly non-looping) derivation has been detected due to the following pattern rule.
while#(true,pos(s(s(zr1))),neg(s(0))) {zr1/0} n {zr1/s(zr1)} →+while#(true,pos(s(s(s(zr1)))),neg(s(0))) {zr1/0} n {zr1/s(zr1)}