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) |
pred(s(x)) | → | x | (4) |
minus(x,0) | → | x | (5) |
minus(x,s(y)) | → | pred(minus(x,y)) | (6) |
mod(0,y) | → | 0 | (7) |
mod(s(x),0) | → | 0 | (8) |
mod(s(x),s(y)) | → | if_mod(le(y,x),s(x),s(y)) | (9) |
if_mod(true,s(x),s(y)) | → | mod(minus(x,y),s(y)) | (10) |
if_mod(false,s(x),s(y)) | → | 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 |
|
le#(0,z0) |
le#(s(z0),0) |
le#(s(z0),s(z1)) |
pred#(s(z0)) |
minus#(z0,0) |
minus#(z0,s(z1)) |
mod#(0,z0) |
mod#(s(z0),0) |
mod#(s(z0),s(z1)) |
if_mod#(true,s(z0),s(z1)) |
if_mod#(false,s(z0),s(z1)) |
mod(0,z0) | → | 0 | (24) |
mod(s(z0),0) | → | 0 | (26) |
mod(s(z0),s(z1)) | → | if_mod(le(z1,z0),s(z0),s(z1)) | (28) |
if_mod(true,s(z0),s(z1)) | → | mod(minus(z0,z1),s(z1)) | (30) |
if_mod(false,s(z0),s(z1)) | → | s(z0) | (32) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[mod#(x1, x2)] | = | 1 · x1 + 0 |
[if_mod#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[true] | = | 0 |
[false] | = | 0 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
le(s(z0),s(z1)) | → | le(z0,z1) | (16) |
le(s(z0),0) | → | false | (14) |
le(0,z0) | → | true | (12) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
minus#(z0,0) | → | c4 | (21) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 1 |
[mod#(x1, x2)] | = | 1 · x1 + 0 |
[if_mod#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[true] | = | 0 |
[false] | = | 0 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
le(s(z0),s(z1)) | → | le(z0,z1) | (16) |
le(s(z0),0) | → | false | (14) |
le(0,z0) | → | true | (12) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[mod#(x1, x2)] | = | 1 + 1 · x1 |
[if_mod#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[true] | = | 0 |
[false] | = | 0 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
le(s(z0),s(z1)) | → | le(z0,z1) | (16) |
le(s(z0),0) | → | false | (14) |
le(0,z0) | → | true | (12) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 1 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[mod#(x1, x2)] | = | 1 + 1 · x1 |
[if_mod#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[true] | = | 0 |
[false] | = | 0 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
le(s(z0),s(z1)) | → | le(z0,z1) | (16) |
le(s(z0),0) | → | false | (14) |
le(0,z0) | → | true | (12) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 1 · x2 + 0 |
[mod#(x1, x2)] | = | 2 · x1 + 0 + 2 · x1 · x2 |
[if_mod#(x1, x2, x3)] | = | 2 · x2 + 0 + 2 · x2 · x3 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
[true] | = | 0 |
[false] | = | 1 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 1 · x2 + 0 |
[pred#(x1)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[mod#(x1, x2)] | = | 2 + 1 · x1 + 1 · x1 · x1 |
[if_mod#(x1, x2, x3)] | = | 1 · x2 · x2 + 0 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
[true] | = | 0 |
[false] | = | 1 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
pred#(s(z0)) | → | c3 | (19) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c10] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[pred(x1)] | = | 1 · x1 + 0 |
[le(x1, x2)] | = | 0 |
[le#(x1, x2)] | = | 0 |
[pred#(x1)] | = | 1 |
[minus#(x1, x2)] | = | 1 · x2 + 0 |
[mod#(x1, x2)] | = | 1 · x1 + 0 + 1 · x1 · x2 |
[if_mod#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x2 · x3 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[true] | = | 0 |
[false] | = | 1 |
le#(0,z0) | → | c | (13) |
le#(s(z0),0) | → | c1 | (15) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (17) |
pred#(s(z0)) | → | c3 | (19) |
minus#(z0,0) | → | c4 | (21) |
minus#(z0,s(z1)) | → | c5(pred#(minus(z0,z1)),minus#(z0,z1)) | (23) |
mod#(0,z0) | → | c6 | (25) |
mod#(s(z0),0) | → | c7 | (27) |
mod#(s(z0),s(z1)) | → | c8(if_mod#(le(z1,z0),s(z0),s(z1)),le#(z1,z0)) | (29) |
if_mod#(true,s(z0),s(z1)) | → | c9(mod#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (31) |
if_mod#(false,s(z0),s(z1)) | → | c10 | (33) |
minus(z0,s(z1)) | → | pred(minus(z0,z1)) | (22) |
minus(z0,0) | → | z0 | (20) |
pred(s(z0)) | → | z0 | (18) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).