The rewrite relation of the following TRS is considered.
plus(x,0) | → | x | (1) |
plus(0,y) | → | y | (2) |
plus(s(x),y) | → | s(plus(x,y)) | (3) |
times(0,y) | → | 0 | (4) |
times(s(0),y) | → | y | (5) |
times(s(x),y) | → | plus(y,times(x,y)) | (6) |
div(0,y) | → | 0 | (7) |
div(x,y) | → | quot(x,y,y) | (8) |
quot(0,s(y),z) | → | 0 | (9) |
quot(s(x),s(y),z) | → | quot(x,y,z) | (10) |
quot(x,0,s(z)) | → | s(div(x,s(z))) | (11) |
div(div(x,y),z) | → | div(x,times(y,z)) | (12) |
eq(0,0) | → | true | (13) |
eq(s(x),0) | → | false | (14) |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
divides(y,x) | → | eq(x,times(div(x,y),y)) | (17) |
prime(s(s(x))) | → | pr(s(s(x)),s(x)) | (18) |
pr(x,s(0)) | → | true | (19) |
pr(x,s(s(y))) | → | if(divides(s(s(y)),x),x,s(y)) | (20) |
if(true,x,y) | → | false | (21) |
if(false,x,y) | → | pr(x,y) | (22) |
times#(s(x),y) | → | times#(x,y) | (23) |
pr#(x,s(s(y))) | → | if#(divides(s(s(y)),x),x,s(y)) | (24) |
eq#(s(x),s(y)) | → | eq#(x,y) | (25) |
if#(false,x,y) | → | pr#(x,y) | (26) |
divides#(y,x) | → | times#(div(x,y),y) | (27) |
divides#(y,x) | → | div#(x,y) | (28) |
plus#(s(x),y) | → | plus#(x,y) | (29) |
pr#(x,s(s(y))) | → | divides#(s(s(y)),x) | (30) |
divides#(y,x) | → | eq#(x,times(div(x,y),y)) | (31) |
div#(div(x,y),z) | → | times#(y,z) | (32) |
prime#(s(s(x))) | → | pr#(s(s(x)),s(x)) | (33) |
quot#(x,0,s(z)) | → | div#(x,s(z)) | (34) |
times#(s(x),y) | → | plus#(y,times(x,y)) | (35) |
quot#(s(x),s(y),z) | → | quot#(x,y,z) | (36) |
div#(x,y) | → | quot#(x,y,y) | (37) |
div#(div(x,y),z) | → | div#(x,times(y,z)) | (38) |
The dependency pairs are split into 5 components.
if#(false,x,y) | → | pr#(x,y) | (26) |
pr#(x,s(s(y))) | → | if#(divides(s(s(y)),x),x,s(y)) | (24) |
[div#(x1, x2)] | = | 0 |
[s(x1)] | = | x1 + 2 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[pr#(x1, x2)] | = | x2 + 0 |
[eq(x1, x2)] | = | x1 + x2 + 0 |
[false] | = | 0 |
[div(x1, x2)] | = | x2 + 2 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 3 |
[if(x1, x2, x3)] | = | 0 |
[quot(x1, x2, x3)] | = | x2 + x3 + 0 |
[times(x1, x2)] | = | x1 + 1 |
[pr(x1, x2)] | = | 0 |
[divides#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 4 |
[if#(x1, x2, x3)] | = | x3 + 1 |
[quot#(x1, x2, x3)] | = | 0 |
[divides(x1, x2)] | = | x2 + 3 |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
eq(s(x),0) | → | false | (14) |
eq(0,0) | → | true | (13) |
if#(false,x,y) | → | pr#(x,y) | (26) |
pr#(x,s(s(y))) | → | if#(divides(s(s(y)),x),x,s(y)) | (24) |
The dependency pairs are split into 0 components.
eq#(s(x),s(y)) | → | eq#(x,y) | (25) |
[div#(x1, x2)] | = | 0 |
[s(x1)] | = | x1 + 26287 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[pr#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | x1 + x2 + 0 |
[false] | = | 0 |
[div(x1, x2)] | = | x2 + 52572 |
[true] | = | 0 |
[eq#(x1, x2)] | = | x1 + x2 + 0 |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 52573 |
[if(x1, x2, x3)] | = | 0 |
[quot(x1, x2, x3)] | = | x2 + x3 + 26285 |
[times(x1, x2)] | = | x1 + 1 |
[pr(x1, x2)] | = | 0 |
[divides#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 26289 |
[if#(x1, x2, x3)] | = | 1 |
[quot#(x1, x2, x3)] | = | 0 |
[divides(x1, x2)] | = | x2 + 52573 |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
eq(s(x),0) | → | false | (14) |
eq(0,0) | → | true | (13) |
eq#(s(x),s(y)) | → | eq#(x,y) | (25) |
The dependency pairs are split into 0 components.
div#(div(x,y),z) | → | div#(x,times(y,z)) | (38) |
div#(x,y) | → | quot#(x,y,y) | (37) |
quot#(s(x),s(y),z) | → | quot#(x,y,z) | (36) |
quot#(x,0,s(z)) | → | div#(x,s(z)) | (34) |
[div#(x1, x2)] | = | x1 + 0 |
[s(x1)] | = | x1 + 1 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[pr#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | x1 + x2 + 0 |
[false] | = | 0 |
[div(x1, x2)] | = | x1 + x2 + 9727 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 9727 |
[if(x1, x2, x3)] | = | 0 |
[quot(x1, x2, x3)] | = | x2 + x3 + 0 |
[times(x1, x2)] | = | 9728 |
[pr(x1, x2)] | = | 0 |
[divides#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 9729 |
[if#(x1, x2, x3)] | = | 1 |
[quot#(x1, x2, x3)] | = | x1 + 0 |
[divides(x1, x2)] | = | x2 + 9728 |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
eq(s(x),0) | → | false | (14) |
eq(0,0) | → | true | (13) |
div#(div(x,y),z) | → | div#(x,times(y,z)) | (38) |
quot#(s(x),s(y),z) | → | quot#(x,y,z) | (36) |
The dependency pairs are split into 1 component.
div#(x,y) | → | quot#(x,y,y) | (37) |
quot#(x,0,s(z)) | → | div#(x,s(z)) | (34) |
[div#(x1, x2)] | = | max(x2 + 21240, 0) |
[s(x1)] | = | 0 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | max(0) |
[pr#(x1, x2)] | = | max(0) |
[eq(x1, x2)] | = | max(0) |
[false] | = | 0 |
[div(x1, x2)] | = | max(0) |
[true] | = | 0 |
[eq#(x1, x2)] | = | max(0) |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | max(0) |
[0] | = | 21239 |
[if(x1, x2, x3)] | = | max(0) |
[quot(x1, x2, x3)] | = | max(0) |
[times(x1, x2)] | = | max(0) |
[pr(x1, x2)] | = | max(0) |
[divides#(x1, x2)] | = | max(0) |
[plus(x1, x2)] | = | max(0) |
[if#(x1, x2, x3)] | = | max(0) |
[quot#(x1, x2, x3)] | = | max(x2 + 1, 0) |
[divides(x1, x2)] | = | max(0) |
div#(x,y) | → | quot#(x,y,y) | (37) |
The dependency pairs are split into 0 components.
times#(s(x),y) | → | times#(x,y) | (23) |
[div#(x1, x2)] | = | 0 |
[s(x1)] | = | x1 + 21240 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[pr#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | x1 + x2 + 0 |
[false] | = | 0 |
[div(x1, x2)] | = | x1 + x2 + 2 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | x1 + 0 |
[0] | = | 21241 |
[if(x1, x2, x3)] | = | 0 |
[quot(x1, x2, x3)] | = | x2 + x3 + 0 |
[times(x1, x2)] | = | 21240 |
[pr(x1, x2)] | = | 0 |
[divides#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 21241 |
[if#(x1, x2, x3)] | = | 1 |
[quot#(x1, x2, x3)] | = | 0 |
[divides(x1, x2)] | = | x2 + 21240 |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
eq(s(x),0) | → | false | (14) |
eq(0,0) | → | true | (13) |
times#(s(x),y) | → | times#(x,y) | (23) |
The dependency pairs are split into 0 components.
plus#(s(x),y) | → | plus#(x,y) | (29) |
[div#(x1, x2)] | = | 0 |
[s(x1)] | = | x1 + 3 |
[prime(x1)] | = | 0 |
[plus#(x1, x2)] | = | x1 + 0 |
[pr#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | x1 + x2 + 0 |
[false] | = | 0 |
[div(x1, x2)] | = | x1 + x2 + 21239 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[prime#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 21241 |
[if(x1, x2, x3)] | = | 0 |
[quot(x1, x2, x3)] | = | x2 + x3 + 0 |
[times(x1, x2)] | = | 21240 |
[pr(x1, x2)] | = | 0 |
[divides#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | x1 + 21241 |
[if#(x1, x2, x3)] | = | 1 |
[quot#(x1, x2, x3)] | = | 0 |
[divides(x1, x2)] | = | x2 + 21240 |
eq(0,s(y)) | → | false | (15) |
eq(s(x),s(y)) | → | eq(x,y) | (16) |
eq(s(x),0) | → | false | (14) |
eq(0,0) | → | true | (13) |
plus#(s(x),y) | → | plus#(x,y) | (29) |
The dependency pairs are split into 0 components.