The relative rewrite relation R/S is considered where R is the following TRS
member(x',Cons(x,xs)) | → | member[Ite][True][Ite](!EQ(x',x),x',Cons(x,xs)) | (1) |
member(x,Nil) | → | False | (2) |
notEmpty(Cons(x,xs)) | → | True | (3) |
notEmpty(Nil) | → | False | (4) |
goal(x,xs) | → | member(x,xs) | (5) |
and S is the following TRS.
!EQ(S(x),S(y)) | → | !EQ(x,y) | (6) |
!EQ(0,S(y)) | → | False | (7) |
!EQ(S(x),0) | → | False | (8) |
!EQ(0,0) | → | True | (9) |
member[Ite][True][Ite](False,x',Cons(x,xs)) | → | member(x',xs) | (10) |
member[Ite][True][Ite](True,x,xs) | → | True | (11) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
!EQ#(S(z0),S(z1)) |
!EQ#(0,S(z0)) |
!EQ#(S(z0),0) |
!EQ#(0,0) |
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) |
member[Ite][True][Ite]#(True,z0,z1) |
member#(z0,Cons(z1,z2)) |
member#(z0,Nil) |
notEmpty#(Cons(z0,z1)) |
notEmpty#(Nil) |
goal#(z0,z1) |
member[Ite][True][Ite](False,z0,Cons(z1,z2)) | → | member(z0,z2) | (28) |
member[Ite][True][Ite](True,z0,z1) | → | True | (30) |
member(z0,Cons(z1,z2)) | → | member[Ite][True][Ite](!EQ(z0,z1),z0,Cons(z1,z2)) | (12) |
member(z0,Nil) | → | False | (14) |
notEmpty(Cons(z0,z1)) | → | True | (16) |
notEmpty(Nil) | → | False | (4) |
goal(z0,z1) | → | member(z0,z1) | (19) |
member#(z0,Nil) | → | c7 | (15) |
notEmpty#(Cons(z0,z1)) | → | c8 | (17) |
notEmpty#(Nil) | → | c9 | (18) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c7] | = | 0 |
[c8] | = | 0 |
[c9] | = | 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[!EQ(x1, x2)] | = | 0 |
[!EQ#(x1, x2)] | = | 0 |
[member[Ite][True][Ite]#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x2 + 1 · x3 |
[member#(x1, x2)] | = | 1 + 1 · x1 |
[notEmpty#(x1)] | = | 1 · x1 + 0 |
[goal#(x1, x2)] | = | 1 + 1 · x1 |
[S(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[False] | = | 0 |
[True] | = | 0 |
[Cons(x1, x2)] | = | 1 |
[Nil] | = | 1 |
!EQ#(S(z0),S(z1)) | → | c(!EQ#(z0,z1)) | (22) |
!EQ#(0,S(z0)) | → | c1 | (24) |
!EQ#(S(z0),0) | → | c2 | (26) |
!EQ#(0,0) | → | c3 | (27) |
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) | → | c4(member#(z0,z2)) | (29) |
member[Ite][True][Ite]#(True,z0,z1) | → | c5 | (31) |
member#(z0,Cons(z1,z2)) | → | c6(member[Ite][True][Ite]#(!EQ(z0,z1),z0,Cons(z1,z2)),!EQ#(z0,z1)) | (13) |
member#(z0,Nil) | → | c7 | (15) |
notEmpty#(Cons(z0,z1)) | → | c8 | (17) |
notEmpty#(Nil) | → | c9 | (18) |
goal#(z0,z1) | → | c10(member#(z0,z1)) | (20) |
!EQ(0,S(z0)) | → | False | (23) |
!EQ(S(z0),0) | → | False | (25) |
!EQ(S(z0),S(z1)) | → | !EQ(z0,z1) | (21) |
!EQ(0,0) | → | True | (9) |
goal#(z0,z1) | → | c10(member#(z0,z1)) | (20) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c7] | = | 0 |
[c8] | = | 0 |
[c9] | = | 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[!EQ(x1, x2)] | = | 3 |
[!EQ#(x1, x2)] | = | 0 |
[member[Ite][True][Ite]#(x1, x2, x3)] | = | 3 · x2 + 0 |
[member#(x1, x2)] | = | 3 · x1 + 0 |
[notEmpty#(x1)] | = | 0 |
[goal#(x1, x2)] | = | 1 + 3 · x1 |
[S(x1)] | = | 3 + 1 · x1 |
[0] | = | 3 |
[False] | = | 3 |
[True] | = | 3 |
[Cons(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[Nil] | = | 0 |
!EQ#(S(z0),S(z1)) | → | c(!EQ#(z0,z1)) | (22) |
!EQ#(0,S(z0)) | → | c1 | (24) |
!EQ#(S(z0),0) | → | c2 | (26) |
!EQ#(0,0) | → | c3 | (27) |
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) | → | c4(member#(z0,z2)) | (29) |
member[Ite][True][Ite]#(True,z0,z1) | → | c5 | (31) |
member#(z0,Cons(z1,z2)) | → | c6(member[Ite][True][Ite]#(!EQ(z0,z1),z0,Cons(z1,z2)),!EQ#(z0,z1)) | (13) |
member#(z0,Nil) | → | c7 | (15) |
notEmpty#(Cons(z0,z1)) | → | c8 | (17) |
notEmpty#(Nil) | → | c9 | (18) |
goal#(z0,z1) | → | c10(member#(z0,z1)) | (20) |
member#(z0,Cons(z1,z2)) | → | c6(member[Ite][True][Ite]#(!EQ(z0,z1),z0,Cons(z1,z2)),!EQ#(z0,z1)) | (13) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[c6(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c7] | = | 0 |
[c8] | = | 0 |
[c9] | = | 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[!EQ(x1, x2)] | = | 3 |
[!EQ#(x1, x2)] | = | 0 |
[member[Ite][True][Ite]#(x1, x2, x3)] | = | 3 · x2 + 0 + 2 · x3 |
[member#(x1, x2)] | = | 1 + 3 · x1 + 2 · x2 |
[notEmpty#(x1)] | = | 0 |
[goal#(x1, x2)] | = | 1 + 3 · x1 + 2 · x2 |
[S(x1)] | = | 3 + 1 · x1 |
[0] | = | 3 |
[False] | = | 3 |
[True] | = | 3 |
[Cons(x1, x2)] | = | 1 + 1 · x2 |
[Nil] | = | 0 |
!EQ#(S(z0),S(z1)) | → | c(!EQ#(z0,z1)) | (22) |
!EQ#(0,S(z0)) | → | c1 | (24) |
!EQ#(S(z0),0) | → | c2 | (26) |
!EQ#(0,0) | → | c3 | (27) |
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) | → | c4(member#(z0,z2)) | (29) |
member[Ite][True][Ite]#(True,z0,z1) | → | c5 | (31) |
member#(z0,Cons(z1,z2)) | → | c6(member[Ite][True][Ite]#(!EQ(z0,z1),z0,Cons(z1,z2)),!EQ#(z0,z1)) | (13) |
member#(z0,Nil) | → | c7 | (15) |
notEmpty#(Cons(z0,z1)) | → | c8 | (17) |
notEmpty#(Nil) | → | c9 | (18) |
goal#(z0,z1) | → | c10(member#(z0,z1)) | (20) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).