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