The rewrite relation of the following TRS is considered.
le(0,y) | → | true | (1) |
le(s(x),0) | → | false | (2) |
le(s(x),s(y)) | → | le(x,y) | (3) |
minus(0,y) | → | 0 | (4) |
minus(s(x),y) | → | if_minus(le(s(x),y),s(x),y) | (5) |
if_minus(true,s(x),y) | → | 0 | (6) |
if_minus(false,s(x),y) | → | s(minus(x,y)) | (7) |
gcd(0,y) | → | y | (8) |
gcd(s(x),0) | → | s(x) | (9) |
gcd(s(x),s(y)) | → | if_gcd(le(y,x),s(x),s(y)) | (10) |
if_gcd(true,s(x),s(y)) | → | gcd(minus(x,y),s(y)) | (11) |
if_gcd(false,s(x),s(y)) | → | gcd(minus(y,x),s(x)) | (12) |
if_gcd#(true,s(x),s(y)) | → | minus#(x,y) | (13) |
gcd#(s(x),s(y)) | → | if_gcd#(le(y,x),s(x),s(y)) | (14) |
minus#(s(x),y) | → | le#(s(x),y) | (15) |
gcd#(s(x),s(y)) | → | le#(y,x) | (16) |
le#(s(x),s(y)) | → | le#(x,y) | (17) |
if_minus#(false,s(x),y) | → | minus#(x,y) | (18) |
if_gcd#(false,s(x),s(y)) | → | gcd#(minus(y,x),s(x)) | (19) |
if_gcd#(true,s(x),s(y)) | → | gcd#(minus(x,y),s(y)) | (20) |
minus#(s(x),y) | → | if_minus#(le(s(x),y),s(x),y) | (21) |
if_gcd#(false,s(x),s(y)) | → | minus#(y,x) | (22) |
The dependency pairs are split into 3 components.
if_gcd#(true,s(x),s(y)) | → | gcd#(minus(x,y),s(y)) | (20) |
if_gcd#(false,s(x),s(y)) | → | gcd#(minus(y,x),s(x)) | (19) |
gcd#(s(x),s(y)) | → | if_gcd#(le(y,x),s(x),s(y)) | (14) |
[le(x1, x2)] | = | x1 + x2 + 1 |
[s(x1)] | = | x1 + 3 |
[le#(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | x1 + 1 |
[gcd(x1, x2)] | = | 0 |
[false] | = | 6 |
[true] | = | 3 |
[0] | = | 1 |
[if_minus#(x1, x2, x3)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[if_minus(x1, x2, x3)] | = | x2 + 1 |
[if_gcd(x1, x2, x3)] | = | 0 |
[if_gcd#(x1, x2, x3)] | = | x2 + x3 + 0 |
[gcd#(x1, x2)] | = | x1 + x2 + 1 |
minus(0,y) | → | 0 | (4) |
minus(s(x),y) | → | if_minus(le(s(x),y),s(x),y) | (5) |
if_minus(false,s(x),y) | → | s(minus(x,y)) | (7) |
if_minus(true,s(x),y) | → | 0 | (6) |
if_gcd#(true,s(x),s(y)) | → | gcd#(minus(x,y),s(y)) | (20) |
if_gcd#(false,s(x),s(y)) | → | gcd#(minus(y,x),s(x)) | (19) |
gcd#(s(x),s(y)) | → | if_gcd#(le(y,x),s(x),s(y)) | (14) |
The dependency pairs are split into 0 components.
minus#(s(x),y) | → | if_minus#(le(s(x),y),s(x),y) | (21) |
if_minus#(false,s(x),y) | → | minus#(x,y) | (18) |
[le(x1, x2)] | = | x1 + x2 + 0 |
[s(x1)] | = | x1 + 2 |
[le#(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | x1 + 1 |
[gcd(x1, x2)] | = | 0 |
[false] | = | 4 |
[true] | = | 2 |
[0] | = | 1 |
[if_minus#(x1, x2, x3)] | = | x2 + 0 |
[minus#(x1, x2)] | = | x1 + 1 |
[if_minus(x1, x2, x3)] | = | x2 + 1 |
[if_gcd(x1, x2, x3)] | = | 0 |
[if_gcd#(x1, x2, x3)] | = | 0 |
[gcd#(x1, x2)] | = | x1 + 1 |
minus(0,y) | → | 0 | (4) |
minus(s(x),y) | → | if_minus(le(s(x),y),s(x),y) | (5) |
if_minus(false,s(x),y) | → | s(minus(x,y)) | (7) |
if_minus(true,s(x),y) | → | 0 | (6) |
minus#(s(x),y) | → | if_minus#(le(s(x),y),s(x),y) | (21) |
if_minus#(false,s(x),y) | → | minus#(x,y) | (18) |
The dependency pairs are split into 0 components.
le#(s(x),s(y)) | → | le#(x,y) | (17) |
[le(x1, x2)] | = | x1 + x2 + 0 |
[s(x1)] | = | x1 + 1 |
[le#(x1, x2)] | = | x2 + 0 |
[minus(x1, x2)] | = | x1 + 47562 |
[gcd(x1, x2)] | = | 0 |
[false] | = | 3 |
[true] | = | 2 |
[0] | = | 1 |
[if_minus#(x1, x2, x3)] | = | 0 |
[minus#(x1, x2)] | = | 1 |
[if_minus(x1, x2, x3)] | = | x2 + 47562 |
[if_gcd(x1, x2, x3)] | = | 0 |
[if_gcd#(x1, x2, x3)] | = | 0 |
[gcd#(x1, x2)] | = | x1 + 1 |
minus(0,y) | → | 0 | (4) |
minus(s(x),y) | → | if_minus(le(s(x),y),s(x),y) | (5) |
if_minus(false,s(x),y) | → | s(minus(x,y)) | (7) |
if_minus(true,s(x),y) | → | 0 | (6) |
le#(s(x),s(y)) | → | le#(x,y) | (17) |
The dependency pairs are split into 0 components.