The rewrite relation of the following TRS is considered.
minus(X,s(Y)) | → | pred(minus(X,Y)) | (1) |
minus(X,0) | → | X | (2) |
pred(s(X)) | → | X | (3) |
le(s(X),s(Y)) | → | le(X,Y) | (4) |
le(s(X),0) | → | false | (5) |
le(0,Y) | → | true | (6) |
gcd(0,Y) | → | 0 | (7) |
gcd(s(X),0) | → | s(X) | (8) |
gcd(s(X),s(Y)) | → | if(le(Y,X),s(X),s(Y)) | (9) |
if(true,s(X),s(Y)) | → | gcd(minus(X,Y),s(Y)) | (10) |
if(false,s(X),s(Y)) | → | gcd(minus(Y,X),s(X)) | (11) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
minus#(z0,s(z1)) |
minus#(z0,0) |
pred#(s(z0)) |
le#(s(z0),s(z1)) |
le#(s(z0),0) |
le#(0,z0) |
gcd#(0,z0) |
gcd#(s(z0),0) |
gcd#(s(z0),s(z1)) |
if#(true,s(z0),s(z1)) |
if#(false,s(z0),s(z1)) |
gcd(0,z0) | → | 0 | (24) |
gcd(s(z0),0) | → | s(z0) | (26) |
gcd(s(z0),s(z1)) | → | if(le(z1,z0),s(z0),s(z1)) | (28) |
if(true,s(z0),s(z1)) | → | gcd(minus(z0,z1),s(z1)) | (30) |
if(false,s(z0),s(z1)) | → | gcd(minus(z1,z0),s(z0)) | (32) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 1 |
[gcd#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[false] | = | 0 |
[true] | = | 0 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
le(s(z0),s(z1)) | → | le(z0,z1) | (18) |
le(s(z0),0) | → | false | (20) |
le(0,z0) | → | true | (22) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 1 + 1 · x2 |
[minus#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[gcd#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[false] | = | 1 |
[true] | = | 1 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
minus#(z0,0) | → | c1 | (15) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[minus#(x1, x2)] | = | 1 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[gcd#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[false] | = | 1 |
[true] | = | 1 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[gcd#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[false] | = | 0 |
[true] | = | 0 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
le(s(z0),s(z1)) | → | le(z0,z1) | (18) |
le(s(z0),0) | → | false | (20) |
le(0,z0) | → | true | (22) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 1 · x2 + 0 |
[gcd#(x1, x2)] | = | 1 · x1 + 0 + 2 · x2 · x2 + 2 · x1 · x1 |
[if#(x1, x2, x3)] | = | 2 · x3 · x3 + 0 + 2 · x2 · x2 |
[s(x1)] | = | 2 + 1 · x1 |
[0] | = | 0 |
[false] | = | 0 |
[true] | = | 0 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 1 |
[minus#(x1, x2)] | = | 1 · x2 + 0 |
[pred#(x1)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[gcd#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 + 1 · x1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x2 · x3 + 1 · x1 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 0 |
[false] | = | 1 |
[true] | = | 1 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
le(s(z0),s(z1)) | → | le(z0,z1) | (18) |
le(s(z0),0) | → | false | (20) |
le(0,z0) | → | true | (22) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
pred#(s(z0)) | → | c2 | (17) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 2 + 1 · x2 |
[pred#(x1)] | = | 1 |
[le#(x1, x2)] | = | 0 |
[gcd#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x1 · x2 |
[if#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x3 + 1 · x2 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[0] | = | 0 |
[false] | = | 0 |
[true] | = | 0 |
minus#(z0,s(z1)) | → | c(pred#(minus(z0,z1)),minus#(z0,z1)) | (13) |
minus#(z0,0) | → | c1 | (15) |
pred#(s(z0)) | → | c2 | (17) |
le#(s(z0),s(z1)) | → | c3(le#(z0,z1)) | (19) |
le#(s(z0),0) | → | c4 | (21) |
le#(0,z0) | → | c5 | (23) |
gcd#(0,z0) | → | c6 | (25) |
gcd#(s(z0),0) | → | c7 | (27) |
gcd#(s(z0),s(z1)) | → | c8(if#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if#(true,s(z0),s(z1)) | → | c9(gcd#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if#(false,s(z0),s(z1)) | → | c10(gcd#(minus(z1,z0),s(z0)),minus#(z1,z0)) | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (12) |
minus(z0,0) | → | z0 | (14) |
pred(s(z0)) | → | z0 | (16) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).