The rewrite relation of the following TRS is considered.
or(true,y) | → | true | (1) |
or(x,true) | → | true | (2) |
or(false,false) | → | false | (3) |
mem(x,nil) | → | false | (4) |
mem(x,set(y)) | → | =(x,y) | (5) |
mem(x,union(y,z)) | → | or(mem(x,y),mem(x,z)) | (6) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
or#(true,z0) |
or#(z0,true) |
or#(false,false) |
mem#(z0,nil) |
mem#(z0,set(z1)) |
mem#(z0,union(z1,z2)) |
or#(true,z0) | → | c | (8) |
or#(z0,true) | → | c1 | (10) |
or#(false,false) | → | c2 | (11) |
mem#(z0,nil) | → | c3 | (13) |
mem#(z0,set(z1)) | → | c4 | (15) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x3 |
[or(x1, x2)] | = | 1 · x2 + 0 |
[mem(x1, x2)] | = | 1 + 1 · x1 |
[or#(x1, x2)] | = | 1 |
[mem#(x1, x2)] | = | 1 · x2 + 0 |
[nil] | = | 1 |
[false] | = | 1 |
[set(x1)] | = | 1 + 1 · x1 |
[=(x1, x2)] | = | 1 + 1 · x1 |
[union(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[true] | = | 0 |
or#(true,z0) | → | c | (8) |
or#(z0,true) | → | c1 | (10) |
or#(false,false) | → | c2 | (11) |
mem#(z0,nil) | → | c3 | (13) |
mem#(z0,set(z1)) | → | c4 | (15) |
mem#(z0,union(z1,z2)) | → | c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) | (17) |
mem#(z0,union(z1,z2)) | → | c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) | (17) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x3 |
[or(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[mem(x1, x2)] | = | 1 + 1 · x2 |
[or#(x1, x2)] | = | 0 |
[mem#(x1, x2)] | = | 1 · x2 + 0 |
[nil] | = | 1 |
[false] | = | 1 |
[set(x1)] | = | 1 + 1 · x1 |
[=(x1, x2)] | = | 1 · x2 + 0 |
[union(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[true] | = | 1 |
or#(true,z0) | → | c | (8) |
or#(z0,true) | → | c1 | (10) |
or#(false,false) | → | c2 | (11) |
mem#(z0,nil) | → | c3 | (13) |
mem#(z0,set(z1)) | → | c4 | (15) |
mem#(z0,union(z1,z2)) | → | c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) | (17) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).