The rewrite relation of the following TRS is considered.
times(x,0) | → | 0 | (1) |
times(x,s(y)) | → | plus(times(x,y),x) | (2) |
plus(s(x),s(y)) | → | s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) | (3) |
plus(s(x),x) | → | plus(if(gt(x,x),id(x),id(x)),s(x)) | (4) |
plus(zero,y) | → | y | (5) |
plus(id(x),s(y)) | → | s(plus(x,if(gt(s(y),y),y,s(y)))) | (6) |
id(x) | → | x | (7) |
if(true,x,y) | → | x | (8) |
if(false,x,y) | → | y | (9) |
not(x) | → | if(x,false,true) | (10) |
gt(s(x),zero) | → | true | (11) |
gt(zero,y) | → | false | (12) |
gt(s(x),s(y)) | → | gt(x,y) | (13) |
times#(x,s(y)) | → | times#(x,y) | (14) |
gt#(s(x),s(y)) | → | gt#(x,y) | (15) |
plus#(s(x),s(y)) | → | gt#(x,y) | (16) |
plus#(s(x),s(y)) | → | if#(gt(x,y),x,y) | (17) |
plus#(s(x),s(y)) | → | if#(not(gt(x,y)),id(x),id(y)) | (18) |
plus#(s(x),s(y)) | → | not#(gt(x,y)) | (19) |
plus#(s(x),s(y)) | → | id#(x) | (20) |
plus#(s(x),x) | → | id#(x) | (21) |
not#(x) | → | if#(x,false,true) | (22) |
plus#(s(x),s(y)) | → | gt#(x,y) | (16) |
plus#(id(x),s(y)) | → | gt#(s(y),y) | (23) |
plus#(s(x),x) | → | if#(gt(x,x),id(x),id(x)) | (24) |
plus#(s(x),x) | → | id#(x) | (21) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (25) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
times#(x,s(y)) | → | plus#(times(x,y),x) | (27) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(s(x),s(y)) | → | id#(y) | (29) |
plus#(id(x),s(y)) | → | if#(gt(s(y),y),y,s(y)) | (30) |
plus#(s(x),x) | → | gt#(x,x) | (31) |
The dependency pairs are split into 3 components.
times#(x,s(y)) | → | times#(x,y) | (14) |
[zero] | = | 0 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | 0 |
[plus#(x1, x2)] | = | 0 |
[false] | = | 0 |
[id#(x1)] | = | 0 |
[true] | = | 0 |
[not#(x1)] | = | 0 |
[times#(x1, x2)] | = | x2 + 0 |
[0] | = | 0 |
[if(x1, x2, x3)] | = | 0 |
[times(x1, x2)] | = | 0 |
[gt#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | 0 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | 0 |
[not(x1)] | = | 0 |
times#(x,s(y)) | → | times#(x,y) | (14) |
The dependency pairs are split into 0 components.
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (25) |
[zero] | = | 0 |
[s(x1)] | = | x1 + 85474 |
[gt(x1, x2)] | = | max(x2 + 1, 0) |
[plus#(x1, x2)] | = | max(x1 + 81715, x2 + 38978, 0) |
[false] | = | 2 |
[id#(x1)] | = | 0 |
[true] | = | 2 |
[not#(x1)] | = | 0 |
[times#(x1, x2)] | = | max(0) |
[0] | = | 0 |
[if(x1, x2, x3)] | = | max(x2 + 42736, x3 + 0, 0) |
[times(x1, x2)] | = | max(0) |
[gt#(x1, x2)] | = | max(0) |
[plus(x1, x2)] | = | max(0) |
[if#(x1, x2, x3)] | = | max(0) |
[id(x1)] | = | x1 + 0 |
[not(x1)] | = | x1 + 0 |
if(true,x,y) | → | x | (8) |
id(x) | → | x | (7) |
if(false,x,y) | → | y | (9) |
plus#(s(x),s(y)) | → | plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) | (28) |
plus#(s(x),x) | → | plus#(if(gt(x,x),id(x),id(x)),s(x)) | (25) |
The dependency pairs are split into 1 component.
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
[zero] | = | 1 |
[s(x1)] | = | 1 |
[gt(x1, x2)] | = | 1 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 1 |
[id#(x1)] | = | 0 |
[true] | = | 1 |
[not#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 0 |
[if(x1, x2, x3)] | = | x1 + x2 + x3 + 0 |
[times(x1, x2)] | = | 0 |
[gt#(x1, x2)] | = | 0 |
[plus(x1, x2)] | = | 0 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[not(x1)] | = | 1 |
if(true,x,y) | → | x | (8) |
id(x) | → | x | (7) |
gt(zero,y) | → | false | (12) |
gt(s(x),zero) | → | true | (11) |
if(false,x,y) | → | y | (9) |
gt(s(x),s(y)) | → | gt(x,y) | (13) |
plus#(id(x),s(y)) | → | plus#(x,if(gt(s(y),y),y,s(y))) | (26) |
The dependency pairs are split into 0 components.
gt#(s(x),s(y)) | → | gt#(x,y) | (15) |
[zero] | = | 1 |
[s(x1)] | = | x1 + 1 |
[gt(x1, x2)] | = | 1 |
[plus#(x1, x2)] | = | x1 + 0 |
[false] | = | 1 |
[id#(x1)] | = | 0 |
[true] | = | 1 |
[not#(x1)] | = | 0 |
[times#(x1, x2)] | = | 0 |
[0] | = | 0 |
[if(x1, x2, x3)] | = | x1 + x2 + x3 + 0 |
[times(x1, x2)] | = | 0 |
[gt#(x1, x2)] | = | x2 + 0 |
[plus(x1, x2)] | = | 0 |
[if#(x1, x2, x3)] | = | 0 |
[id(x1)] | = | x1 + 1 |
[not(x1)] | = | 1 |
if(true,x,y) | → | x | (8) |
id(x) | → | x | (7) |
gt(zero,y) | → | false | (12) |
gt(s(x),zero) | → | true | (11) |
if(false,x,y) | → | y | (9) |
gt(s(x),s(y)) | → | gt(x,y) | (13) |
gt#(s(x),s(y)) | → | gt#(x,y) | (15) |
The dependency pairs are split into 0 components.