The rewrite relation of the following TRS is considered.
del(.(x,.(y,z))) | → | f(=(x,y),x,y,z) | (1) |
f(true,x,y,z) | → | del(.(y,z)) | (2) |
f(false,x,y,z) | → | .(x,del(.(y,z))) | (3) |
=(nil,nil) | → | true | (4) |
=(.(x,y),nil) | → | false | (5) |
=(nil,.(y,z)) | → | false | (6) |
=(.(x,y),.(u,v)) | → | and(=(x,u),=(y,v)) | (7) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
del#(.(z0,.(z1,z2))) |
f#(true,z0,z1,z2) |
f#(false,z0,z1,z2) |
=#(nil,nil) |
=#(.(z0,z1),nil) |
=#(nil,.(z0,z1)) |
=#(.(z0,z1),.(u,v)) |
del(.(z0,.(z1,z2))) | → | f(=(z0,z1),z0,z1,z2) | (8) |
f(true,z0,z1,z2) | → | del(.(z1,z2)) | (10) |
f(false,z0,z1,z2) | → | .(z0,del(.(z1,z2))) | (12) |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[=(x1, x2)] | = | 1 |
[del#(x1)] | = | 1 · x1 + 0 |
[f#(x1,...,x4)] | = | 1 + 1 · x4 |
[=#(x1, x2)] | = | 0 |
[nil] | = | 1 |
[true] | = | 1 |
[.(x1, x2)] | = | 1 + 1 · x2 |
[false] | = | 1 |
[u] | = | 1 |
[v] | = | 1 |
[and(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
=#(nil,nil) | → | c3 | (14) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[=(x1, x2)] | = | 1 · x1 + 0 |
[del#(x1)] | = | 1 · x1 + 0 |
[f#(x1,...,x4)] | = | 1 · x1 + 0 + 1 · x3 + 1 · x4 |
[=#(x1, x2)] | = | 0 |
[nil] | = | 1 |
[true] | = | 1 |
[.(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[false] | = | 0 |
[u] | = | 1 |
[v] | = | 1 |
[and(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
=#(nil,nil) | → | c3 | (14) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
=(.(z0,z1),nil) | → | false | (15) |
=(nil,.(z0,z1)) | → | false | (17) |
=(.(z0,z1),.(u,v)) | → | and(=(z0,u),=(z1,v)) | (19) |
=(nil,nil) | → | true | (4) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[=(x1, x2)] | = | 3 + 3 · x1 + 3 · x2 |
[del#(x1)] | = | 1 · x1 + 0 |
[f#(x1,...,x4)] | = | 3 + 1 · x3 + 1 · x4 |
[=#(x1, x2)] | = | 1 · x1 + 0 |
[nil] | = | 0 |
[true] | = | 2 |
[.(x1, x2)] | = | 3 + 1 · x1 + 1 · x2 |
[false] | = | 0 |
[u] | = | 3 |
[v] | = | 0 |
[and(x1, x2)] | = | 0 |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
=#(nil,nil) | → | c3 | (14) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[=(x1, x2)] | = | 1 + 1 · x1 |
[del#(x1)] | = | 1 · x1 + 0 |
[f#(x1,...,x4)] | = | 1 + 1 · x1 + 1 · x3 + 1 · x4 |
[=#(x1, x2)] | = | 0 |
[nil] | = | 1 |
[true] | = | 1 |
[.(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[false] | = | 1 |
[u] | = | 1 |
[v] | = | 1 |
[and(x1, x2)] | = | 0 |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
=#(nil,nil) | → | c3 | (14) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
=(.(z0,z1),nil) | → | false | (15) |
=(nil,.(z0,z1)) | → | false | (17) |
=(.(z0,z1),.(u,v)) | → | and(=(z0,u),=(z1,v)) | (19) |
=(nil,nil) | → | true | (4) |
=#(nil,nil) | → | c3 | (14) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[=(x1, x2)] | = | 1 + 1 · x2 |
[del#(x1)] | = | 1 · x1 + 0 |
[f#(x1,...,x4)] | = | 1 · x3 + 0 + 1 · x4 |
[=#(x1, x2)] | = | 1 · x1 + 0 |
[nil] | = | 1 |
[true] | = | 1 |
[.(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[false] | = | 1 |
[u] | = | 0 |
[v] | = | 1 |
[and(x1, x2)] | = | 0 |
del#(.(z0,.(z1,z2))) | → | c(f#(=(z0,z1),z0,z1,z2),=#(z0,z1)) | (9) |
f#(true,z0,z1,z2) | → | c1(del#(.(z1,z2))) | (11) |
f#(false,z0,z1,z2) | → | c2(del#(.(z1,z2))) | (13) |
=#(nil,nil) | → | c3 | (14) |
=#(.(z0,z1),nil) | → | c4 | (16) |
=#(nil,.(z0,z1)) | → | c5 | (18) |
=#(.(z0,z1),.(u,v)) | → | c6(=#(z0,u),=#(z1,v)) | (20) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).