and S is the following TRS.
loop#(Cons(z0,z1),Nil,z2,z3) |
→ |
c6 |
(12) |
|
originates from |
loop(Cons(z0,z1),Nil,z2,z3) |
→ |
False |
(11) |
|
loop#(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c7(loop[Ite]#(!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5),!EQ#(z0,z2)) |
(14) |
|
originates from |
loop(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
loop[Ite](!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5) |
(13) |
|
loop#(Nil,z0,z1,z2) |
→ |
c8 |
(16) |
|
originates from |
loop(Nil,z0,z1,z2) |
→ |
True |
(15) |
|
match1#(z0,z1) |
→ |
c9(loop#(z0,z1,z0,z1)) |
(18) |
|
originates from |
match1(z0,z1) |
→ |
loop(z0,z1,z0,z1) |
(17) |
|
!EQ#(S(z0),S(z1)) |
→ |
c(!EQ#(z0,z1)) |
(20) |
|
originates from |
!EQ(S(z0),S(z1)) |
→ |
!EQ(z0,z1) |
(19) |
|
|
originates from |
!EQ(0,S(z0)) |
→ |
False |
(21) |
|
|
originates from |
!EQ(S(z0),0) |
→ |
False |
(23) |
|
|
originates from |
|
loop[Ite]#(False,z0,z1,z2,Cons(z3,z4)) |
→ |
c4(loop#(z2,z4,z2,z4)) |
(27) |
|
originates from |
loop[Ite](False,z0,z1,z2,Cons(z3,z4)) |
→ |
loop(z2,z4,z2,z4) |
(26) |
|
loop[Ite]#(True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c5(loop#(z1,z3,z4,z5)) |
(29) |
|
originates from |
loop[Ite](True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
loop(z1,z3,z4,z5) |
(28) |
|
Moreover, we add the following terms to the innermost strategy.
!EQ#(S(z0),S(z1)) |
!EQ#(0,S(z0)) |
!EQ#(S(z0),0) |
!EQ#(0,0) |
loop[Ite]#(False,z0,z1,z2,Cons(z3,z4)) |
loop[Ite]#(True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
loop#(Cons(z0,z1),Nil,z2,z3) |
loop#(Cons(z0,z1),Cons(z2,z3),z4,z5) |
loop#(Nil,z0,z1,z2) |
match1#(z0,z1) |
loop[Ite](False,z0,z1,z2,Cons(z3,z4)) |
→ |
loop(z2,z4,z2,z4) |
(26) |
loop[Ite](True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
loop(z1,z3,z4,z5) |
(28) |
loop(Cons(z0,z1),Nil,z2,z3) |
→ |
False |
(11) |
loop(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
loop[Ite](!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5) |
(13) |
loop(Nil,z0,z1,z2) |
→ |
True |
(15) |
match1(z0,z1) |
→ |
loop(z0,z1,z0,z1) |
(17) |
!EQ#(S(z0),S(z1)) |
→ |
c(!EQ#(z0,z1)) |
(20) |
!EQ#(0,S(z0)) |
→ |
c1 |
(22) |
!EQ#(S(z0),0) |
→ |
c2 |
(24) |
!EQ#(0,0) |
→ |
c3 |
(25) |
loop[Ite]#(False,z0,z1,z2,Cons(z3,z4)) |
→ |
c4(loop#(z2,z4,z2,z4)) |
(27) |
loop[Ite]#(True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c5(loop#(z1,z3,z4,z5)) |
(29) |
loop#(Cons(z0,z1),Nil,z2,z3) |
→ |
c6 |
(12) |
loop#(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c7(loop[Ite]#(!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5),!EQ#(z0,z2)) |
(14) |
loop#(Nil,z0,z1,z2) |
→ |
c8 |
(16) |
match1#(z0,z1) |
→ |
c9(loop#(z0,z1,z0,z1)) |
(18) |
!EQ#(S(z0),S(z1)) |
→ |
c(!EQ#(z0,z1)) |
(20) |
!EQ#(0,S(z0)) |
→ |
c1 |
(22) |
!EQ#(S(z0),0) |
→ |
c2 |
(24) |
!EQ#(0,0) |
→ |
c3 |
(25) |
loop[Ite]#(False,z0,z1,z2,Cons(z3,z4)) |
→ |
c4(loop#(z2,z4,z2,z4)) |
(27) |
loop[Ite]#(True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c5(loop#(z1,z3,z4,z5)) |
(29) |
loop#(Cons(z0,z1),Nil,z2,z3) |
→ |
c6 |
(12) |
loop#(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c7(loop[Ite]#(!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5),!EQ#(z0,z2)) |
(14) |
loop#(Nil,z0,z1,z2) |
→ |
c8 |
(16) |
match1#(z0,z1) |
→ |
c9(loop#(z0,z1,z0,z1)) |
(18) |
!EQ(0,S(z0)) |
→ |
False |
(21) |
!EQ(S(z0),0) |
→ |
False |
(23) |
!EQ(S(z0),S(z1)) |
→ |
!EQ(z0,z1) |
(19) |
!EQ(0,0) |
→ |
True |
(8) |
!EQ#(S(z0),S(z1)) |
→ |
c(!EQ#(z0,z1)) |
(20) |
!EQ#(0,S(z0)) |
→ |
c1 |
(22) |
!EQ#(S(z0),0) |
→ |
c2 |
(24) |
!EQ#(0,0) |
→ |
c3 |
(25) |
loop[Ite]#(False,z0,z1,z2,Cons(z3,z4)) |
→ |
c4(loop#(z2,z4,z2,z4)) |
(27) |
loop[Ite]#(True,Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c5(loop#(z1,z3,z4,z5)) |
(29) |
loop#(Cons(z0,z1),Nil,z2,z3) |
→ |
c6 |
(12) |
loop#(Cons(z0,z1),Cons(z2,z3),z4,z5) |
→ |
c7(loop[Ite]#(!EQ(z0,z2),Cons(z0,z1),Cons(z2,z3),z4,z5),!EQ#(z0,z2)) |
(14) |
loop#(Nil,z0,z1,z2) |
→ |
c8 |
(16) |
match1#(z0,z1) |
→ |
c9(loop#(z0,z1,z0,z1)) |
(18) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).