The rewrite relation of the following TRS is considered.
naiverev(Cons(x,xs)) | → | app(naiverev(xs),Cons(x,Nil)) | (1) |
app(Cons(x,xs),ys) | → | Cons(x,app(xs,ys)) | (2) |
notEmpty(Cons(x,xs)) | → | True | (3) |
notEmpty(Nil) | → | False | (4) |
naiverev(Nil) | → | Nil | (5) |
app(Nil,ys) | → | ys | (6) |
goal(xs) | → | naiverev(xs) | (7) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
naiverev#(Cons(z0,z1)) |
naiverev#(Nil) |
app#(Cons(z0,z1),z2) |
app#(Nil,z0) |
notEmpty#(Cons(z0,z1)) |
notEmpty#(Nil) |
goal#(z0) |
notEmpty(Cons(z0,z1)) | → | True | (15) |
notEmpty(Nil) | → | False | (4) |
goal(z0) | → | naiverev(z0) | (18) |
goal#(z0) | → | c6(naiverev#(z0)) | (19) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[naiverev(x1)] | = | 0 |
[app(x1, x2)] | = | 1 |
[naiverev#(x1)] | = | 0 |
[app#(x1, x2)] | = | 0 |
[notEmpty#(x1)] | = | 0 |
[goal#(x1)] | = | 2 + 1 · x1 + 2 · x1 · x1 |
[Cons(x1, x2)] | = | 0 |
[Nil] | = | 0 |
naiverev#(Cons(z0,z1)) | → | c(app#(naiverev(z1),Cons(z0,Nil)),naiverev#(z1)) | (9) |
naiverev#(Nil) | → | c1 | (10) |
app#(Cons(z0,z1),z2) | → | c2(app#(z1,z2)) | (12) |
app#(Nil,z0) | → | c3 | (14) |
notEmpty#(Cons(z0,z1)) | → | c4 | (16) |
notEmpty#(Nil) | → | c5 | (17) |
goal#(z0) | → | c6(naiverev#(z0)) | (19) |
naiverev#(Nil) | → | c1 | (10) |
app#(Nil,z0) | → | c3 | (14) |
notEmpty#(Cons(z0,z1)) | → | c4 | (16) |
notEmpty#(Nil) | → | c5 | (17) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[naiverev(x1)] | = | 1 + 1 · x1 |
[app(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[naiverev#(x1)] | = | 1 + 1 · x1 |
[app#(x1, x2)] | = | 1 |
[notEmpty#(x1)] | = | 1 + 1 · x1 |
[goal#(x1)] | = | 1 + 1 · x1 |
[Cons(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[Nil] | = | 0 |
naiverev#(Cons(z0,z1)) | → | c(app#(naiverev(z1),Cons(z0,Nil)),naiverev#(z1)) | (9) |
naiverev#(Nil) | → | c1 | (10) |
app#(Cons(z0,z1),z2) | → | c2(app#(z1,z2)) | (12) |
app#(Nil,z0) | → | c3 | (14) |
notEmpty#(Cons(z0,z1)) | → | c4 | (16) |
notEmpty#(Nil) | → | c5 | (17) |
goal#(z0) | → | c6(naiverev#(z0)) | (19) |
naiverev#(Cons(z0,z1)) | → | c(app#(naiverev(z1),Cons(z0,Nil)),naiverev#(z1)) | (9) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[naiverev(x1)] | = | 3 |
[app(x1, x2)] | = | 3 |
[naiverev#(x1)] | = | 3 + 1 · x1 |
[app#(x1, x2)] | = | 0 |
[notEmpty#(x1)] | = | 0 |
[goal#(x1)] | = | 3 + 1 · x1 |
[Cons(x1, x2)] | = | 2 + 1 · x1 + 1 · x2 |
[Nil] | = | 0 |
naiverev#(Cons(z0,z1)) | → | c(app#(naiverev(z1),Cons(z0,Nil)),naiverev#(z1)) | (9) |
naiverev#(Nil) | → | c1 | (10) |
app#(Cons(z0,z1),z2) | → | c2(app#(z1,z2)) | (12) |
app#(Nil,z0) | → | c3 | (14) |
notEmpty#(Cons(z0,z1)) | → | c4 | (16) |
notEmpty#(Nil) | → | c5 | (17) |
goal#(z0) | → | c6(naiverev#(z0)) | (19) |
app#(Cons(z0,z1),z2) | → | c2(app#(z1,z2)) | (12) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[naiverev(x1)] | = | 1 · x1 + 0 |
[app(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[naiverev#(x1)] | = | 1 + 1 · x1 + 1 · x1 · x1 |
[app#(x1, x2)] | = | 1 · x1 + 0 |
[notEmpty#(x1)] | = | 0 |
[goal#(x1)] | = | 1 + 1 · x1 + 1 · x1 · x1 |
[Cons(x1, x2)] | = | 1 + 1 · x2 |
[Nil] | = | 0 |
naiverev#(Cons(z0,z1)) | → | c(app#(naiverev(z1),Cons(z0,Nil)),naiverev#(z1)) | (9) |
naiverev#(Nil) | → | c1 | (10) |
app#(Cons(z0,z1),z2) | → | c2(app#(z1,z2)) | (12) |
app#(Nil,z0) | → | c3 | (14) |
notEmpty#(Cons(z0,z1)) | → | c4 | (16) |
notEmpty#(Nil) | → | c5 | (17) |
goal#(z0) | → | c6(naiverev#(z0)) | (19) |
naiverev(Nil) | → | Nil | (5) |
naiverev(Cons(z0,z1)) | → | app(naiverev(z1),Cons(z0,Nil)) | (8) |
app(Nil,z0) | → | z0 | (13) |
app(Cons(z0,z1),z2) | → | Cons(z0,app(z1,z2)) | (11) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).