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) | → | ifMinus(le(s(X),Y),s(X),Y) | (5) |
ifMinus(true,s(X),Y) | → | 0 | (6) |
ifMinus(false,s(X),Y) | → | s(minus(X,Y)) | (7) |
quot(0,s(Y)) | → | 0 | (8) |
quot(s(X),s(Y)) | → | s(quot(minus(X,Y),s(Y))) | (9) |
|
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)) |
minus#(0,z0) |
minus#(s(z0),z1) |
ifMinus#(true,s(z0),z1) |
ifMinus#(false,s(z0),z1) |
quot#(0,s(z0)) |
quot#(s(z0),s(z1)) |
quot(0,s(z0)) | → | 0 | (24) |
quot(s(z0),s(z1)) | → | s(quot(minus(z0,z1),s(z1))) | (26) |
quot#(0,s(z0)) | → | c7 | (25) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 1 + 1 · x2 |
[minus(x1, x2)] | = | 1 + 1 · x2 |
[ifMinus(x1, x2, x3)] | = | 1 + 1 · x2 + 1 · x3 |
[le#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 0 |
[ifMinus#(x1, x2, x3)] | = | 1 · x2 + 0 |
[quot#(x1, x2)] | = | 1 + 1 · x2 |
[0] | = | 1 |
[s(x1)] | = | 0 |
[false] | = | 1 |
[true] | = | 1 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
minus#(0,z0) | → | c3 | (17) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 1 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[ifMinus(x1, x2, x3)] | = | 1 · x2 + 0 |
[le#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 1 |
[ifMinus#(x1, x2, x3)] | = | 1 |
[quot#(x1, x2)] | = | 1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[false] | = | 1 |
[true] | = | 1 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | 1 + 1 · x1 |
[ifMinus(x1, x2, x3)] | = | 1 + 1 · x2 |
[le#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 3 |
[ifMinus#(x1, x2, x3)] | = | 3 |
[quot#(x1, x2)] | = | 2 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 3 + 1 · x1 |
[false] | = | 0 |
[true] | = | 0 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[ifMinus(x1, x2, x3)] | = | 1 · x2 + 0 |
[le#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 2 · x1 + 0 |
[ifMinus#(x1, x2, x3)] | = | 2 · x2 + 0 |
[quot#(x1, x2)] | = | 1 · x1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
[false] | = | 0 |
[true] | = | 0 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[ifMinus(x1, x2, x3)] | = | 1 · x2 + 0 |
[le#(x1, x2)] | = | 0 |
[minus#(x1, x2)] | = | 1 + 1 · x1 |
[ifMinus#(x1, x2, x3)] | = | 1 · x2 + 0 |
[quot#(x1, x2)] | = | 1 · x1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[false] | = | 0 |
[true] | = | 0 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[ifMinus(x1, x2, x3)] | = | 1 · x2 + 0 |
[le#(x1, x2)] | = | 1 |
[minus#(x1, x2)] | = | 1 + 1 · x1 |
[ifMinus#(x1, x2, x3)] | = | 1 · x2 + 0 |
[quot#(x1, x2)] | = | 1 · x1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[false] | = | 0 |
[true] | = | 0 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
[c] | = | 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[le(x1, x2)] | = | 0 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[ifMinus(x1, x2, x3)] | = | 1 · x2 + 0 |
[le#(x1, x2)] | = | 1 + 1 · x1 |
[minus#(x1, x2)] | = | 1 + 1 · x1 + 1 · x1 · x1 |
[ifMinus#(x1, x2, x3)] | = | 1 · x2 · x2 + 0 |
[quot#(x1, x2)] | = | 1 · x1 · x1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[false] | = | 0 |
[true] | = | 0 |
le#(0,z0) | → | c | (11) |
le#(s(z0),0) | → | c1 | (13) |
le#(s(z0),s(z1)) | → | c2(le#(z0,z1)) | (15) |
minus#(0,z0) | → | c3 | (17) |
minus#(s(z0),z1) | → | c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) | (19) |
ifMinus#(true,s(z0),z1) | → | c5 | (21) |
ifMinus#(false,s(z0),z1) | → | c6(minus#(z0,z1)) | (23) |
quot#(0,s(z0)) | → | c7 | (25) |
quot#(s(z0),s(z1)) | → | c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (27) |
ifMinus(true,s(z0),z1) | → | 0 | (20) |
ifMinus(false,s(z0),z1) | → | s(minus(z0,z1)) | (22) |
minus(s(z0),z1) | → | ifMinus(le(s(z0),z1),s(z0),z1) | (18) |
minus(0,z0) | → | 0 | (16) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).