Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/raML/bfs.raml)

The relative rewrite relation R/S is considered where R is the following TRS

#equal(@x,@y) #eq(@x,@y) (1)
appendreverse(@toreverse,@sofar) appendreverse#1(@toreverse,@sofar) (2)
appendreverse#1(::(@a,@as),@sofar) appendreverse(@as,::(@a,@sofar)) (3)
appendreverse#1(nil,@sofar) @sofar (4)
bfs(@queue,@futurequeue,@x) bfs#1(@queue,@futurequeue,@x) (5)
bfs#1(::(@t,@ts),@futurequeue,@x) bfs#3(@t,@futurequeue,@ts,@x) (6)
bfs#1(nil,@futurequeue,@x) bfs#2(@futurequeue,@x) (7)
bfs#2(::(@t,@ts),@x) bfs(reverse(::(@t,@ts)),nil,@x) (8)
bfs#2(nil,@x) leaf (9)
bfs#3(leaf,@futurequeue,@ts,@x) bfs(@ts,@futurequeue,@x) (10)
bfs#3(node(@y,@t1,@t2),@futurequeue,@ts,@x) bfs#4(#equal(@x,@y),@futurequeue,@t1,@t2,@ts,@x,@y) (11)
bfs#4(#false,@futurequeue,@t1,@t2,@ts,@x,@y) bfs(@ts,::(@t2,::(@t1,@futurequeue)),@x) (12)
bfs#4(#true,@futurequeue,@t1,@t2,@ts,@x,@y) node(@y,@t1,@t2) (13)
bfs2(@t,@x) bfs2#1(dobfs(@t,@x),@x) (14)
bfs2#1(@t',@x) dobfs(@t',@x) (15)
dfs(@queue,@x) dfs#1(@queue,@x) (16)
dfs#1(::(@t,@ts),@x) dfs#2(@t,@t,@ts,@x) (17)
dfs#1(nil,@x) leaf (18)
dfs#2(leaf,@t,@ts,@x) dfs(@ts,@x) (19)
dfs#2(node(@a,@t1,@t2),@t,@ts,@x) dfs#3(#equal(@a,@x),@t,@t1,@t2,@ts,@x) (20)
dfs#3(#false,@t,@t1,@t2,@ts,@x) dfs(::(@t1,::(@t2,@ts)),@x) (21)
dfs#3(#true,@t,@t1,@t2,@ts,@x) @t (22)
dobfs(@t,@x) bfs(::(@t,nil),nil,@x) (23)
dodfs(@t,@x) dfs(::(@t,nil),@x) (24)
reverse(@xs) appendreverse(@xs,nil) (25)

and S is the following TRS.

#and(#false,#false) #false (26)
#and(#false,#true) #false (27)
#and(#true,#false) #false (28)
#and(#true,#true) #true (29)
#eq(#0,#0) #true (30)
#eq(#0,#neg(@y)) #false (31)
#eq(#0,#pos(@y)) #false (32)
#eq(#0,#s(@y)) #false (33)
#eq(#neg(@x),#0) #false (34)
#eq(#neg(@x),#neg(@y)) #eq(@x,@y) (35)
#eq(#neg(@x),#pos(@y)) #false (36)
#eq(#pos(@x),#0) #false (37)
#eq(#pos(@x),#neg(@y)) #false (38)
#eq(#pos(@x),#pos(@y)) #eq(@x,@y) (39)
#eq(#s(@x),#0) #false (40)
#eq(#s(@x),#s(@y)) #eq(@x,@y) (41)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2)) (42)
#eq(::(@x_1,@x_2),leaf) #false (43)
#eq(::(@x_1,@x_2),nil) #false (44)
#eq(::(@x_1,@x_2),node(@y_1,@y_2,@y_3)) #false (45)
#eq(leaf,::(@y_1,@y_2)) #false (46)
#eq(leaf,leaf) #true (47)
#eq(leaf,nil) #false (48)
#eq(leaf,node(@y_1,@y_2,@y_3)) #false (49)
#eq(nil,::(@y_1,@y_2)) #false (50)
#eq(nil,leaf) #false (51)
#eq(nil,nil) #true (52)
#eq(nil,node(@y_1,@y_2,@y_3)) #false (53)
#eq(node(@x_1,@x_2,@x_3),::(@y_1,@y_2)) #false (54)
#eq(node(@x_1,@x_2,@x_3),leaf) #false (55)
#eq(node(@x_1,@x_2,@x_3),nil) #false (56)
#eq(node(@x_1,@x_2,@x_3),node(@y_1,@y_2,@y_3)) #and(#eq(@x_1,@y_1),#and(#eq(@x_2,@y_2),#eq(@x_3,@y_3))) (57)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n3).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
originates from
#equal(z0,z1) #eq(z0,z1) (58)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
originates from
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
originates from
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
appendreverse#1#(nil,z0) c35 (65)
originates from
appendreverse#1(nil,z0) z0 (64)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
originates from
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
originates from
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
originates from
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
originates from
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
bfs#2#(nil,z0) c40 (75)
originates from
bfs#2(nil,z0) leaf (74)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
originates from
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
originates from
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
originates from
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
originates from
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
originates from
bfs2(z0,z1) bfs2#1(dobfs(z0,z1),z1) (84)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
originates from
bfs2#1(z0,z1) dobfs(z0,z1) (86)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
originates from
dfs(z0,z1) dfs#1(z0,z1) (88)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
originates from
dfs#1(::(z0,z1),z2) dfs#2(z0,z0,z1,z2) (90)
dfs#1#(nil,z0) c49 (93)
originates from
dfs#1(nil,z0) leaf (92)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
originates from
dfs#2(leaf,z0,z1,z2) dfs(z1,z2) (94)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
originates from
dfs#2(node(z0,z1,z2),z3,z4,z5) dfs#3(#equal(z0,z5),z3,z1,z2,z4,z5) (96)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
originates from
dfs#3(#false,z0,z1,z2,z3,z4) dfs(::(z1,::(z2,z3)),z4) (98)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
originates from
dfs#3(#true,z0,z1,z2,z3,z4) z0 (100)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
originates from
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
originates from
dodfs(z0,z1) dfs(::(z0,nil),z1) (104)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
originates from
reverse(z0) appendreverse(z0,nil) (106)
#and#(#false,#false) c (108)
originates from
#and(#false,#false) #false (26)
#and#(#false,#true) c1 (109)
originates from
#and(#false,#true) #false (27)
#and#(#true,#false) c2 (110)
originates from
#and(#true,#false) #false (28)
#and#(#true,#true) c3 (111)
originates from
#and(#true,#true) #true (29)
#eq#(#0,#0) c4 (112)
originates from
#eq(#0,#0) #true (30)
#eq#(#0,#neg(z0)) c5 (114)
originates from
#eq(#0,#neg(z0)) #false (113)
#eq#(#0,#pos(z0)) c6 (116)
originates from
#eq(#0,#pos(z0)) #false (115)
#eq#(#0,#s(z0)) c7 (118)
originates from
#eq(#0,#s(z0)) #false (117)
#eq#(#neg(z0),#0) c8 (120)
originates from
#eq(#neg(z0),#0) #false (119)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
originates from
#eq(#neg(z0),#neg(z1)) #eq(z0,z1) (121)
#eq#(#neg(z0),#pos(z1)) c10 (124)
originates from
#eq(#neg(z0),#pos(z1)) #false (123)
#eq#(#pos(z0),#0) c11 (126)
originates from
#eq(#pos(z0),#0) #false (125)
#eq#(#pos(z0),#neg(z1)) c12 (128)
originates from
#eq(#pos(z0),#neg(z1)) #false (127)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
originates from
#eq(#pos(z0),#pos(z1)) #eq(z0,z1) (129)
#eq#(#s(z0),#0) c14 (132)
originates from
#eq(#s(z0),#0) #false (131)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
originates from
#eq(#s(z0),#s(z1)) #eq(z0,z1) (133)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
originates from
#eq(::(z0,z1),::(z2,z3)) #and(#eq(z0,z2),#eq(z1,z3)) (135)
#eq#(::(z0,z1),leaf) c17 (138)
originates from
#eq(::(z0,z1),leaf) #false (137)
#eq#(::(z0,z1),nil) c18 (140)
originates from
#eq(::(z0,z1),nil) #false (139)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
originates from
#eq(::(z0,z1),node(z2,z3,z4)) #false (141)
#eq#(leaf,::(z0,z1)) c20 (144)
originates from
#eq(leaf,::(z0,z1)) #false (143)
#eq#(leaf,leaf) c21 (145)
originates from
#eq(leaf,leaf) #true (47)
#eq#(leaf,nil) c22 (146)
originates from
#eq(leaf,nil) #false (48)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
originates from
#eq(leaf,node(z0,z1,z2)) #false (147)
#eq#(nil,::(z0,z1)) c24 (150)
originates from
#eq(nil,::(z0,z1)) #false (149)
#eq#(nil,leaf) c25 (151)
originates from
#eq(nil,leaf) #false (51)
#eq#(nil,nil) c26 (152)
originates from
#eq(nil,nil) #true (52)
#eq#(nil,node(z0,z1,z2)) c27 (154)
originates from
#eq(nil,node(z0,z1,z2)) #false (153)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
originates from
#eq(node(z0,z1,z2),::(z3,z4)) #false (155)
#eq#(node(z0,z1,z2),leaf) c29 (158)
originates from
#eq(node(z0,z1,z2),leaf) #false (157)
#eq#(node(z0,z1,z2),nil) c30 (160)
originates from
#eq(node(z0,z1,z2),nil) #false (159)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
originates from
#eq(node(z0,z1,z2),node(z3,z4,z5)) #and(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))) (161)
Moreover, we add the following terms to the innermost strategy.
#and#(#false,#false)
#and#(#false,#true)
#and#(#true,#false)
#and#(#true,#true)
#eq#(#0,#0)
#eq#(#0,#neg(z0))
#eq#(#0,#pos(z0))
#eq#(#0,#s(z0))
#eq#(#neg(z0),#0)
#eq#(#neg(z0),#neg(z1))
#eq#(#neg(z0),#pos(z1))
#eq#(#pos(z0),#0)
#eq#(#pos(z0),#neg(z1))
#eq#(#pos(z0),#pos(z1))
#eq#(#s(z0),#0)
#eq#(#s(z0),#s(z1))
#eq#(::(z0,z1),::(z2,z3))
#eq#(::(z0,z1),leaf)
#eq#(::(z0,z1),nil)
#eq#(::(z0,z1),node(z2,z3,z4))
#eq#(leaf,::(z0,z1))
#eq#(leaf,leaf)
#eq#(leaf,nil)
#eq#(leaf,node(z0,z1,z2))
#eq#(nil,::(z0,z1))
#eq#(nil,leaf)
#eq#(nil,nil)
#eq#(nil,node(z0,z1,z2))
#eq#(node(z0,z1,z2),::(z3,z4))
#eq#(node(z0,z1,z2),leaf)
#eq#(node(z0,z1,z2),nil)
#eq#(node(z0,z1,z2),node(z3,z4,z5))
#equal#(z0,z1)
appendreverse#(z0,z1)
appendreverse#1#(::(z0,z1),z2)
appendreverse#1#(nil,z0)
bfs#(z0,z1,z2)
bfs#1#(::(z0,z1),z2,z3)
bfs#1#(nil,z0,z1)
bfs#2#(::(z0,z1),z2)
bfs#2#(nil,z0)
bfs#3#(leaf,z0,z1,z2)
bfs#3#(node(z0,z1,z2),z3,z4,z5)
bfs#4#(#false,z0,z1,z2,z3,z4,z5)
bfs#4#(#true,z0,z1,z2,z3,z4,z5)
bfs2#(z0,z1)
bfs2#1#(z0,z1)
dfs#(z0,z1)
dfs#1#(::(z0,z1),z2)
dfs#1#(nil,z0)
dfs#2#(leaf,z0,z1,z2)
dfs#2#(node(z0,z1,z2),z3,z4,z5)
dfs#3#(#false,z0,z1,z2,z3,z4)
dfs#3#(#true,z0,z1,z2,z3,z4)
dobfs#(z0,z1)
dodfs#(z0,z1)
reverse#(z0)

1.1 Usable Rules

We remove the following rules since they are not usable.
bfs2(z0,z1) bfs2#1(dobfs(z0,z1),z1) (84)
bfs2#1(z0,z1) dobfs(z0,z1) (86)
dfs(z0,z1) dfs#1(z0,z1) (88)
dfs#1(::(z0,z1),z2) dfs#2(z0,z0,z1,z2) (90)
dfs#1(nil,z0) leaf (92)
dfs#2(leaf,z0,z1,z2) dfs(z1,z2) (94)
dfs#2(node(z0,z1,z2),z3,z4,z5) dfs#3(#equal(z0,z5),z3,z1,z2,z4,z5) (96)
dfs#3(#false,z0,z1,z2,z3,z4) dfs(::(z1,::(z2,z3)),z4) (98)
dfs#3(#true,z0,z1,z2,z3,z4) z0 (100)
dodfs(z0,z1) dfs(::(z0,nil),z1) (104)

1.1.1 Rule Shifting

The rules
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 2 · x2 + 0
[#and(x1, x2)] = 2
[reverse(x1)] = 0
[appendreverse(x1, x2)] = 3 + 3 · x1 + 3 · x2
[appendreverse#1(x1, x2)] = 3 + 3 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 3 + 3 · x1 + 3 · x2
[bfs(x1, x2, x3)] = 3 + 3 · x3
[bfs#1(x1, x2, x3)] = 3 + 3 · x2 + 3 · x3
[bfs#3(x1,...,x4)] = 3 + 3 · x2 + 3 · x3 + 3 · x4
[bfs#4(x1,...,x7)] = 3 + 3 · x2 + 3 · x3 + 3 · x4 + 3 · x5 + 3 · x6 + 3 · x7
[bfs#2(x1, x2)] = 3 + 3 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 2 + 1 · x2
[bfs2#1#(x1, x2)] = 2 + 1 · x2
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 · x1 + 0
[reverse#(x1)] = 0
[#0] = 0
[#true] = 0
[#neg(x1)] = 1 · x1 + 0
[#false] = 0
[#pos(x1)] = 1 · x1 + 0
[#s(x1)] = 1 · x1 + 0
[::(x1, x2)] = 2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 2 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1 Rule Shifting

The rules
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#1#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#2#(x1,...,x4)] = 1 + 1 · x1 + 1 · x3 + 1 · x4
[dfs#3#(x1,...,x6)] = 1 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 0
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[nil] = 0
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1 Rule Shifting

The rules
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 1 · x2 + 0
[appendreverse#1#(x1, x2)] = 1 · x2 + 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 · x2 + 0
[dfs#(x1, x2)] = 1 · x2 + 0
[dfs#1#(x1, x2)] = 1 · x2 + 0
[dfs#2#(x1,...,x4)] = 1 · x4 + 0
[dfs#3#(x1,...,x6)] = 1 · x6 + 0
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 · x2 + 0
[reverse#(x1)] = 0
[#0] = 1
[#true] = 1
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 0
[leaf] = 1
[nil] = 0
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1 Rule Shifting

The rules
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 1 · x2 + 0
[appendreverse#1#(x1, x2)] = 1 · x2 + 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 · x2 + 0
[dfs#1#(x1, x2)] = 1 · x2 + 0
[dfs#2#(x1,...,x4)] = 1 · x4 + 0
[dfs#3#(x1,...,x6)] = 1 · x6 + 0
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 0
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 0
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1 Rule Shifting

The rules
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#1#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#2#(x1,...,x4)] = 1 · x1 + 0 + 1 · x3 + 1 · x4
[dfs#3#(x1,...,x6)] = 1 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 0
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1.1 Rule Shifting

The rules
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#1#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#2#(x1,...,x4)] = 1 · x1 + 0 + 1 · x3 + 1 · x4
[dfs#3#(x1,...,x6)] = 1 · x3 + 0 + 1 · x4 + 1 · x5 + 1 · x6
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 1
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1
[appendreverse(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#1#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#2#(x1,...,x4)] = 1 · x1 + 0 + 1 · x3 + 1 · x4
[dfs#3#(x1,...,x6)] = 1 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 0
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1
[reverse(x1)] = 1 + 1 · x1
[appendreverse(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendreverse#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#equal(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dobfs(x1, x2)] = 1 + 1 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 1 · x1 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 1 · x2 + 1 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 1 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x2
[dfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#1#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#2#(x1,...,x4)] = 1 · x1 + 0 + 1 · x3 + 1 · x4
[dfs#3#(x1,...,x6)] = 1 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x6
[dobfs#(x1, x2)] = 0
[dodfs#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 1
[#true] = 1
[#neg(x1)] = 1 + 1 · x1
[#false] = 0
[#pos(x1)] = 1 + 1 · x1
[#s(x1)] = 1 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 0
[appendreverse(x1, x2)] = 3 + 3 · x1 + 3 · x2
[appendreverse#1(x1, x2)] = 3 + 3 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 1 + 3 · x1 + 3 · x2
[bfs(x1, x2, x3)] = 3 + 3 · x3
[bfs#1(x1, x2, x3)] = 3 + 3 · x2 + 3 · x3
[bfs#3(x1,...,x4)] = 3 + 3 · x2 + 3 · x3 + 3 · x4
[bfs#4(x1,...,x7)] = 3 + 3 · x2 + 3 · x3 + 3 · x4 + 3 · x5 + 3 · x6 + 3 · x7
[bfs#2(x1, x2)] = 3 + 3 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 0
[bfs#1#(x1, x2, x3)] = 0
[bfs#2#(x1, x2)] = 0
[bfs#3#(x1,...,x4)] = 0
[bfs#4#(x1,...,x7)] = 0
[bfs2#(x1, x2)] = 3 + 1 · x2
[bfs2#1#(x1, x2)] = 2 + 1 · x2
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 1
[dodfs#(x1, x2)] = 1 · x2 + 0
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 0
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)

1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 1 · x1 + 0
[appendreverse(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendreverse#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 1 + 2 · x1 + 1 · x2
[bfs(x1, x2, x3)] = 1 + 2 · x1 + 2 · x2 + 1 · x3
[bfs#1(x1, x2, x3)] = 1 + 2 · x1 + 2 · x2 + 1 · x3
[bfs#3(x1,...,x4)] = 1 + 2 · x1 + 2 · x2 + 2 · x3 + 1 · x4
[bfs#4(x1,...,x7)] = 1 + 2 · x2 + 2 · x3 + 2 · x4 + 2 · x5 + 1 · x6 + 1 · x7
[bfs#2(x1, x2)] = 1 + 2 · x1 + 1 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#2#(x1, x2)] = 1 · x1 + 0
[bfs#3#(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4#(x1,...,x7)] = 1 · x2 + 0 + 1 · x3 + 1 · x4 + 1 · x5
[bfs2#(x1, x2)] = 1 + 3 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 · x1 + 0
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 1 · x1 + 0
[dodfs#(x1, x2)] = 1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[nil] = 0
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#2#(nil,z0) c40 (75)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 1
[appendreverse(x1, x2)] = 1 · x2 + 0
[appendreverse#1(x1, x2)] = 1 · x2 + 0
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 2 + 3 · x1 + 3 · x2
[bfs(x1, x2, x3)] = 3 + 3 · x3
[bfs#1(x1, x2, x3)] = 3 + 3 · x2 + 3 · x3
[bfs#3(x1,...,x4)] = 3 + 3 · x2 + 3 · x3 + 3 · x4
[bfs#4(x1,...,x7)] = 3 + 3 · x2 + 3 · x3 + 3 · x4 + 3 · x5 + 3 · x6 + 3 · x7
[bfs#2(x1, x2)] = 3 + 3 · x2
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0
[bfs#2#(x1, x2)] = 1
[bfs#3#(x1,...,x4)] = 1 · x3 + 0
[bfs#4#(x1,...,x7)] = 1 · x5 + 0
[bfs2#(x1, x2)] = 3 + 1 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 2 + 1 · x2
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 1
[dodfs#(x1, x2)] = 1 + 2 · x1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 1 · x2 + 0
[leaf] = 0
[nil] = 1
[node(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
appendreverse#1(nil,z0) z0 (64)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)

1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 1 · x1 + 0
[appendreverse(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendreverse#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 2 · x1 + 0
[bfs(x1, x2, x3)] = 2 · x1 + 0 + 2 · x2
[bfs#1(x1, x2, x3)] = 2 · x1 + 0 + 2 · x2
[bfs#3(x1,...,x4)] = 2 · x1 + 0 + 2 · x2 + 2 · x3
[bfs#4(x1,...,x7)] = 1 + 2 · x2 + 2 · x3 + 2 · x4 + 2 · x5 + 1 · x7
[bfs#2(x1, x2)] = 2 · x1 + 0
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#2#(x1, x2)] = 1 · x1 + 0
[bfs#3#(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4#(x1,...,x7)] = 1 · x2 + 0 + 1 · x3 + 1 · x4 + 1 · x5
[bfs2#(x1, x2)] = 1 + 3 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#(x1, x2)] = 2 · x1 + 0
[dfs#1#(x1, x2)] = 2 · x1 + 0
[dfs#2#(x1,...,x4)] = 2 · x1 + 0 + 2 · x3
[dfs#3#(x1,...,x6)] = 2 · x3 + 0 + 2 · x4 + 2 · x5
[dobfs#(x1, x2)] = 1 · x1 + 0
[dodfs#(x1, x2)] = 1 + 3 · x1 + 3 · x2
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 1 · x1 + 0
[appendreverse(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendreverse#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 1 + 1 · x1
[bfs(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#3(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[bfs#2(x1, x2)] = 1 · x1 + 0
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 1
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#2#(x1, x2)] = 1 · x1 + 0
[bfs#3#(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4#(x1,...,x7)] = 1 · x2 + 0 + 1 · x3 + 1 · x4 + 1 · x5
[bfs2#(x1, x2)] = 1 + 3 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[dfs#(x1, x2)] = 2 · x1 + 0
[dfs#1#(x1, x2)] = 2 · x1 + 0
[dfs#2#(x1,...,x4)] = 2 · x1 + 0 + 2 · x3
[dfs#3#(x1,...,x6)] = 2 · x3 + 0 + 2 · x4 + 2 · x5
[dobfs#(x1, x2)] = 1 · x1 + 0
[dodfs#(x1, x2)] = 1 + 3 · x1 + 1 · x2
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 0
[#and(x1, x2)] = 0
[reverse(x1)] = 1 · x1 + 0
[appendreverse(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendreverse#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[#equal(x1, x2)] = 0
[dobfs(x1, x2)] = 2 · x1 + 0 + 1 · x2
[bfs(x1, x2, x3)] = 2 · x1 + 0 + 2 · x2
[bfs#1(x1, x2, x3)] = 2 · x1 + 0 + 2 · x2
[bfs#3(x1,...,x4)] = 2 · x1 + 0 + 2 · x2 + 2 · x3
[bfs#4(x1,...,x7)] = 1 + 2 · x2 + 2 · x3 + 2 · x4 + 2 · x5 + 1 · x7
[bfs#2(x1, x2)] = 2 · x1 + 0
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#2#(x1, x2)] = 1 · x1 + 0
[bfs#3#(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4#(x1,...,x7)] = 1 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[bfs2#(x1, x2)] = 1 + 3 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x1
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 1 · x1 + 0
[dodfs#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[reverse#(x1)] = 0
[#0] = 3
[#true] = 0
[#neg(x1)] = 3 + 1 · x1
[#false] = 0
[#pos(x1)] = 3 + 1 · x1
[#s(x1)] = 3 + 1 · x1
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5] = 0
[c6] = 0
[c7] = 0
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10] = 0
[c11] = 0
[c12] = 0
[c13(x1)] = 1 · x1 + 0
[c14] = 0
[c15(x1)] = 1 · x1 + 0
[c16(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c17] = 0
[c18] = 0
[c19] = 0
[c20] = 0
[c21] = 0
[c22] = 0
[c23] = 0
[c24] = 0
[c25] = 0
[c26] = 0
[c27] = 0
[c28] = 0
[c29] = 0
[c30] = 0
[c31(x1,...,x5)] = 1 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[c32(x1)] = 1 · x1 + 0
[c33(x1)] = 1 · x1 + 0
[c34(x1)] = 1 · x1 + 0
[c35] = 0
[c36(x1)] = 1 · x1 + 0
[c37(x1)] = 1 · x1 + 0
[c38(x1)] = 1 · x1 + 0
[c39(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c40] = 0
[c41(x1)] = 1 · x1 + 0
[c42(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c43(x1)] = 1 · x1 + 0
[c44] = 0
[c45(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c46(x1)] = 1 · x1 + 0
[c47(x1)] = 1 · x1 + 0
[c48(x1)] = 1 · x1 + 0
[c49] = 0
[c50(x1)] = 1 · x1 + 0
[c51(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c52(x1)] = 1 · x1 + 0
[c53] = 0
[c54(x1)] = 1 · x1 + 0
[c55(x1)] = 1 · x1 + 0
[c56(x1)] = 1 · x1 + 0
[#eq(x1, x2)] = 1
[#and(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 1 · x1 + 0
[appendreverse(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendreverse#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[#equal(x1, x2)] = 1
[dobfs(x1, x2)] = 1 + 1 · x1
[bfs(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#3(x1,...,x4)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[bfs#4(x1,...,x7)] = 3 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5 + 1 · x7
[bfs#2(x1, x2)] = 1 · x1 + 0
[#and#(x1, x2)] = 0
[#eq#(x1, x2)] = 0
[#equal#(x1, x2)] = 0
[appendreverse#(x1, x2)] = 0
[appendreverse#1#(x1, x2)] = 0
[bfs#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#1#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2
[bfs#2#(x1, x2)] = 1 · x1 + 0
[bfs#3#(x1,...,x4)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[bfs#4#(x1,...,x7)] = 2 · x1 + 0 + 1 · x2 + 1 · x3 + 1 · x4 + 1 · x5
[bfs2#(x1, x2)] = 3 + 3 · x1 + 1 · x2
[bfs2#1#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[dfs#(x1, x2)] = 0
[dfs#1#(x1, x2)] = 0
[dfs#2#(x1,...,x4)] = 0
[dfs#3#(x1,...,x6)] = 0
[dobfs#(x1, x2)] = 1 + 1 · x1
[dodfs#(x1, x2)] = 0
[reverse#(x1)] = 0
[#0] = 0
[#true] = 1
[#neg(x1)] = 1 · x1 + 0
[#false] = 1
[#pos(x1)] = 1 · x1 + 0
[#s(x1)] = 1 · x1 + 0
[::(x1, x2)] = 1 + 1 · x1 + 1 · x2
[leaf] = 0
[nil] = 0
[node(x1, x2, x3)] = 3 + 1 · x1 + 1 · x2 + 1 · x3
which has the intended complexity. Here, only the following usable rules have been considered:

There are 104 ruless (increase limit for explicit display).

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c47(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c32(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
0 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
3 0
0 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
0 0
0 0
· x4 +
0 0
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
4 0
[dodfs#(x1, x2)] =
4 0
1 0
+
0 4
0 0
· x1 +
1 4
0 1
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
0 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
1 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
1 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
0 0
[bfs#2#(x1, x2)] =
0 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
4 0
4 0
+
0 4
0 0
· x1 +
1 4
0 0
· x2
[bfs2#1#(x1, x2)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
3 0
0 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
1 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[appendreverse(x1, x2)] =
0 0
0 0
+
1 0
0 1
· x1 +
1 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
0 0
1 0
+
1 0
0 1
· x1 +
0 1
0 1
· x2
[bfs#1(x1, x2, x3)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
1 0
0 1
· x1 +
1 0
0 1
· x2
[::(x1, x2)] =
1 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
4 0
+
1 2
0 0
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c47(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c32(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
1 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
1 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
3 0
0 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
0 0
0 0
· x4 +
0 0
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
0 0
[dodfs#(x1, x2)] =
4 0
4 0
+
1 3
0 1
· x1 +
1 1
0 1
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
0 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
1 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
0 0
[bfs#2#(x1, x2)] =
1 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
4 0
4 0
+
0 4
0 0
· x1 +
1 1
0 0
· x2
[bfs2#1#(x1, x2)] =
1 0
1 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
3 0
0 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
0 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
1 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[appendreverse(x1, x2)] =
1 0
0 0
+
3 0
0 1
· x1 +
2 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
4 2
0 0
· x2
[bfs#1(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
2 0
0 0
+
4 0
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
3 0
0 1
· x1 +
2 0
0 1
· x2
[::(x1, x2)] =
1 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
1 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
4 0
+
1 0
0 1
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c47(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c32(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
0 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
3 0
0 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
0 0
0 0
· x4 +
0 0
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
0 0
[dodfs#(x1, x2)] =
4 0
1 0
+
0 4
0 0
· x1 +
1 4
0 1
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
4 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
4 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
1 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
1 0
2 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
0 0
[bfs#2#(x1, x2)] =
0 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
4 0
4 0
+
0 4
0 0
· x1 +
1 4
0 0
· x2
[bfs2#1#(x1, x2)] =
1 0
0 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
1 0
0 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
3 0
0 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
1 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
1 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[appendreverse(x1, x2)] =
0 0
0 0
+
4 0
0 1
· x1 +
1 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[bfs#1(x1, x2, x3)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
0 0
0 0
+
4 4
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
4 0
0 1
· x1 +
1 0
0 1
· x2
[::(x1, x2)] =
1 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
1 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
1 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
1 0
1 0
+
0 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
2 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
4 0
+
1 0
0 1
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c47(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c32(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
0 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
4 0
0 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
0 0
0 0
· x4 +
0 0
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
1 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
0 0
[dodfs#(x1, x2)] =
3 0
1 0
+
1 3
0 0
· x1 +
1 1
0 1
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
1 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
1 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 2
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 1
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
0 0
[bfs#2#(x1, x2)] =
0 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
4 0
4 0
+
0 4
0 1
· x1 +
1 4
0 0
· x2
[bfs2#1#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
4 0
0 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
0 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[appendreverse(x1, x2)] =
0 0
0 0
+
2 0
0 1
· x1 +
1 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
2 0
0 0
+
0 0
0 1
· x1 +
2 4
0 0
· x2
[bfs#1(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
0 0
0 0
+
2 1
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
2 0
0 1
· x1 +
1 0
0 1
· x2
[::(x1, x2)] =
2 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
appendreverse#1#(nil,z0) c35 (65)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
1 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
1 0
0 0
+
0 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
4 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c47(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c32(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
0 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
4 0
0 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2 +
0 0
0 0
· x3 +
0 0
0 0
· x4 +
0 0
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
0 0
4 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
1 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
0 0
[dodfs#(x1, x2)] =
2 0
1 0
+
0 1
0 1
· x1 +
1 3
0 0
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
4 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
4 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
0 0
4 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
0 0
2 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
0 0
[bfs#2#(x1, x2)] =
0 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
1 0
4 0
+
0 4
0 0
· x1 +
1 4
0 1
· x2
[bfs2#1#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
4 0
0 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
0 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
4 2
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[appendreverse(x1, x2)] =
0 0
0 0
+
4 0
0 1
· x1 +
4 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
0 0
0 0
+
1 0
0 1
· x1 +
0 0
0 0
· x2
[bfs#1(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
0 0
0 0
+
4 0
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
4 0
0 1
· x1 +
4 0
0 1
· x2
[::(x1, x2)] =
2 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
2 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
0 0
0 0
· x2
[reverse#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#and#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0
0 0
+
0 4
0 0
· x1 +
0 0
0 0
· x2 +
0 4
0 0
· x3 +
1 0
0 0
· x4
[c21] =
0 0
0 0
[c5] =
0 0
0 0
[c16(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[c17] =
0 0
0 0
[c6] =
0 0
0 0
[c51(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c20] =
0 0
0 0
[c34(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c45(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c52(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c47(x1)] =
0 0
1 0
+
1 0
0 0
· x1
[c32(x1)] =
0 0
1 0
+
1 0
0 1
· x1
[c33(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c18] =
0 0
0 0
[c46(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c7] =
0 0
0 0
[#equal#(x1, x2)] =
0 0
1 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[c40] =
0 0
0 0
[c23] =
0 0
0 0
[c] =
0 0
0 0
[c44] =
2 0
1 0
[c8] =
0 0
0 0
[c14] =
0 0
0 0
[dfs#3#(x1,...,x6)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 4
0 0
· x3 +
0 4
0 0
· x4 +
0 4
0 0
· x5 +
1 0
0 0
· x6
[c56(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[bfs#3#(x1,...,x4)] =
0 0
4 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 0
0 0
· x4
[#eq#(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[appendreverse#1#(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
0 0
0 0
· x2
[c37(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c35] =
0 0
0 0
[dodfs#(x1, x2)] =
3 0
4 0
+
0 4
0 0
· x1 +
1 1
0 0
· x2
[c28] =
0 0
0 0
[dfs#1#(x1, x2)] =
0 0
4 0
+
0 4
0 0
· x1 +
1 0
0 0
· x2
[c49] =
0 0
4 0
[c3] =
0 0
0 0
[bfs#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c25] =
0 0
0 0
[c38(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c1] =
0 0
0 0
[c12] =
0 0
0 0
[c42(x1, x2)] =
0 0
0 0
+
1 4
0 0
· x1 +
1 2
0 0
· x2
[c30] =
0 0
0 0
[dobfs#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2
[c2] =
0 0
0 0
[c9(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c13(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c55(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[dfs#(x1, x2)] =
0 0
2 0
+
0 4
0 0
· x1 +
1 0
0 0
· x2
[c24] =
0 0
0 0
[bfs#1#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 2
0 0
· x2 +
0 0
0 0
· x3
[c26] =
0 0
0 0
[c39(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c11] =
0 0
0 0
[c54(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c19] =
0 0
0 0
[c53] =
0 0
4 0
[bfs#2#(x1, x2)] =
0 0
0 0
+
1 2
0 0
· x1 +
0 0
0 0
· x2
[bfs2#(x1, x2)] =
4 0
3 0
+
0 4
0 0
· x1 +
1 4
0 0
· x2
[bfs2#1#(x1, x2)] =
0 0
0 0
+
0 2
0 0
· x1 +
1 0
0 0
· x2
[c31(x1,...,x5)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3 +
1 0
0 0
· x4 +
1 0
0 0
· x5
[c10] =
0 0
0 0
[c27] =
0 0
0 0
[c41(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c48(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c43(x1)] =
0 0
1 0
+
1 0
0 0
· x1
[c50(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c4] =
0 0
0 0
[bfs#4#(x1,...,x7)] =
2 0
1 0
+
0 0
0 0
· x1 +
1 2
0 0
· x2 +
0 2
0 0
· x3 +
0 2
0 0
· x4 +
0 2
0 0
· x5 +
0 0
0 0
· x6 +
0 0
0 0
· x7
[c29] =
0 0
0 0
[c36(x1)] =
0 0
0 0
+
1 0
0 1
· x1
[c22] =
0 0
0 0
[c15(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[#0] =
0 0
0 0
[#eq(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[leaf] =
0 0
0 0
[#equal(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[bfs#4(x1,...,x7)] =
0 0
4 0
+
0 0
0 0
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 1
· x4 +
0 0
0 1
· x5 +
0 0
0 0
· x6 +
0 0
0 1
· x7
[appendreverse(x1, x2)] =
0 0
0 0
+
2 0
0 1
· x1 +
2 0
0 1
· x2
[#neg(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[dobfs(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
1 0
0 0
· x2
[bfs#1(x1, x2, x3)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 0
· x3
[#and(x1, x2)] =
0 0
0 0
+
0 0
0 0
· x1 +
0 0
0 0
· x2
[nil] =
0 0
0 0
[#false] =
0 0
0 0
[reverse(x1)] =
0 0
0 0
+
3 1
0 1
· x1
[appendreverse#1(x1, x2)] =
0 0
0 0
+
2 0
0 1
· x1 +
2 0
0 1
· x2
[::(x1, x2)] =
1 0
0 0
+
0 0
0 1
· x1 +
1 0
0 1
· x2
[bfs#2(x1, x2)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 0
· x2
[#pos(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#s(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[#true] =
0 0
0 0
[node(x1, x2, x3)] =
0 0
4 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3
[bfs#3(x1,...,x4)] =
0 0
0 0
+
0 0
0 1
· x1 +
0 0
0 1
· x2 +
0 0
0 1
· x3 +
0 0
0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
are strictly oriented by the following linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the rationals with delta = 1
[appendreverse#(x1, x2)] =
1 0 0
0 0 0
0 0 0
+
0 0 1
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[reverse#(x1)] =
1 0 0
0 0 0
0 0 0
+
0 0 1
0 0 0
0 0 0
· x1
[#and#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[dfs#2#(x1,...,x4)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
· x3 +
1 0 0
0 0 0
0 0 0
· x4
[c21] =
0 0 0
0 0 0
0 0 0
[c5] =
0 0 0
0 0 0
0 0 0
[c16(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2 +
1 0 0
0 0 0
0 0 0
· x3
[c17] =
0 0 0
1 0 0
0 0 0
[c6] =
0 0 0
0 0 0
0 0 0
[c51(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c20] =
0 0 0
0 0 0
1 0 0
[c34(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c45(x1, x2)] =
0 0 0
0 0 0
3 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c52(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c47(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 2
0 0 1
· x1
[c32(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c33(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 2
0 0 1
· x1
[c18] =
0 0 0
1 0 0
0 0 0
[c46(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 2
0 0 1
· x1
[c7] =
0 0 0
0 0 0
0 0 0
[#equal#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[c40] =
0 0 0
0 0 0
0 0 0
[c23] =
0 0 0
0 0 0
0 0 0
[c] =
0 0 0
0 0 0
0 0 0
[c44] =
3 0 0
0 0 0
0 0 0
[c8] =
0 0 0
0 0 0
0 0 0
[c14] =
0 0 0
0 0 0
0 0 0
[dfs#3#(x1,...,x6)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 1 2
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
· x3 +
0 0 0
0 0 0
0 0 0
· x4 +
0 0 0
0 0 0
0 0 0
· x5 +
1 0 0
0 0 0
0 0 0
· x6
[c56(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[bfs#3#(x1,...,x4)] =
0 0 0
0 0 0
0 0 0
+
0 1 0
0 0 0
0 0 0
· x1 +
1 1 1
0 0 0
0 0 0
· x2 +
0 1 0
0 0 0
0 0 0
· x3 +
0 0 0
0 0 0
0 0 0
· x4
[#eq#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 1
0 0 0
· x1 +
0 0 0
0 0 0
0 0 1
· x2
[appendreverse#1#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[c37(x1)] =
0 0 0
2 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c35] =
0 0 0
0 0 0
0 0 0
[dodfs#(x1, x2)] =
1 0 0
1 0 0
3 0 0
+
0 1 1
0 0 1
0 0 0
· x1 +
1 1 1
0 0 1
0 0 0
· x2
[c28] =
0 0 0
0 0 0
1 0 0
[dfs#1#(x1, x2)] =
0 0 0
1 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c49] =
0 0 0
1 0 0
0 0 0
[c3] =
0 0 0
0 0 0
0 0 0
[bfs#(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
0 1 0
0 0 0
0 0 0
· x1 +
1 1 1
0 0 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
· x3
[c25] =
0 0 0
0 0 0
0 0 0
[c38(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c1] =
0 0 0
0 0 0
0 0 0
[c12] =
0 0 0
0 0 0
0 0 0
[c42(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c30] =
0 0 0
0 0 0
0 0 0
[dobfs#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 1 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[c2] =
0 0 0
0 0 0
0 0 0
[c9(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c13(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c55(x1)] =
0 0 0
0 0 0
3 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[dfs#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c24] =
0 0 0
0 0 0
1 0 0
[bfs#1#(x1, x2, x3)] =
0 0 0
3 0 0
0 0 0
+
0 1 0
0 0 1
0 0 0
· x1 +
1 1 1
0 0 0
0 0 0
· x2 +
0 0 0
0 0 0
0 0 0
· x3
[c26] =
0 0 0
0 0 0
0 0 0
[c39(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c11] =
0 0 0
0 0 0
0 0 0
[c54(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c19] =
0 0 0
1 0 0
0 0 0
[c53] =
0 0 0
0 0 0
0 0 0
[bfs#2#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
1 1 1
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[bfs2#(x1, x2)] =
1 0 0
1 0 0
3 0 0
+
1 3 1
0 0 1
0 0 0
· x1 +
1 3 1
0 0 1
0 0 0
· x2
[bfs2#1#(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 2 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2
[c31(x1,...,x5)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2 +
1 0 0
0 0 0
0 0 0
· x3 +
1 0 0
0 0 0
0 0 0
· x4 +
1 0 0
0 0 0
0 0 0
· x5
[c10] =
0 0 0
0 0 0
0 0 0
[c27] =
0 0 0
0 0 0
0 0 0
[c41(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c48(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c43(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c50(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c4] =
0 0 0
0 0 0
0 0 0
[bfs#4#(x1,...,x7)] =
3 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
1 1 1
0 0 0
0 0 0
· x2 +
0 1 0
0 0 0
0 0 0
· x3 +
0 1 0
0 0 0
0 0 0
· x4 +
0 1 0
0 0 0
0 0 0
· x5 +
0 0 0
0 0 0
0 0 0
· x6 +
0 0 0
0 0 0
0 0 0
· x7
[c29] =
0 0 0
0 0 0
0 0 0
[c36(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 2
0 0 1
· x1
[c22] =
0 0 0
0 0 0
0 0 0
[c15(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[#0] =
0 0 0
0 0 0
0 0 0
[#eq(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[bfs(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2 +
0 0 0
0 1 0
0 0 0
· x3
[leaf] =
0 0 0
0 0 0
0 0 0
[#equal(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[bfs#4(x1,...,x7)] =
0 0 0
3 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2 +
0 0 0
0 1 2
0 0 0
· x3 +
0 0 0
0 1 0
0 0 0
· x4 +
0 0 0
0 1 0
0 0 0
· x5 +
0 0 0
0 1 0
0 0 0
· x6 +
0 0 0
0 0 0
0 0 0
· x7
[appendreverse(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 1 0
0 0 2
· x1 +
1 0 0
0 1 0
0 0 2
· x2
[#neg(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1
[dobfs(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 2
· x2
[bfs#1(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2 +
0 0 0
0 1 0
0 0 0
· x3
[#and(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 0 0
0 0 0
· x2
[nil] =
0 0 0
0 0 0
0 0 0
[#false] =
0 0 0
0 0 0
0 0 0
[reverse(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 1 0
0 0 2
· x1
[appendreverse#1(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 1 0
0 0 2
· x1 +
1 0 0
0 1 0
0 0 2
· x2
[::(x1, x2)] =
1 0 0
0 0 0
1 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 1
· x2
[bfs#2(x1, x2)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2
[#pos(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1
[#s(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1
[#true] =
0 0 0
0 0 0
0 0 0
[node(x1, x2, x3)] =
0 0 0
3 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1 +
0 0 0
0 1 2
0 0 0
· x2 +
0 0 0
0 1 0
0 0 0
· x3
[bfs#3(x1,...,x4)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 1 0
0 0 0
· x1 +
0 0 0
0 1 0
0 0 0
· x2 +
0 0 0
0 1 0
0 0 0
· x3 +
0 0 0
0 1 0
0 0 0
· x4
which has the intended complexity. Here, only the following usable rules have been considered:
#and#(#false,#false) c (108)
#and#(#false,#true) c1 (109)
#and#(#true,#false) c2 (110)
#and#(#true,#true) c3 (111)
#eq#(#0,#0) c4 (112)
#eq#(#0,#neg(z0)) c5 (114)
#eq#(#0,#pos(z0)) c6 (116)
#eq#(#0,#s(z0)) c7 (118)
#eq#(#neg(z0),#0) c8 (120)
#eq#(#neg(z0),#neg(z1)) c9(#eq#(z0,z1)) (122)
#eq#(#neg(z0),#pos(z1)) c10 (124)
#eq#(#pos(z0),#0) c11 (126)
#eq#(#pos(z0),#neg(z1)) c12 (128)
#eq#(#pos(z0),#pos(z1)) c13(#eq#(z0,z1)) (130)
#eq#(#s(z0),#0) c14 (132)
#eq#(#s(z0),#s(z1)) c15(#eq#(z0,z1)) (134)
#eq#(::(z0,z1),::(z2,z3)) c16(#and#(#eq(z0,z2),#eq(z1,z3)),#eq#(z0,z2),#eq#(z1,z3)) (136)
#eq#(::(z0,z1),leaf) c17 (138)
#eq#(::(z0,z1),nil) c18 (140)
#eq#(::(z0,z1),node(z2,z3,z4)) c19 (142)
#eq#(leaf,::(z0,z1)) c20 (144)
#eq#(leaf,leaf) c21 (145)
#eq#(leaf,nil) c22 (146)
#eq#(leaf,node(z0,z1,z2)) c23 (148)
#eq#(nil,::(z0,z1)) c24 (150)
#eq#(nil,leaf) c25 (151)
#eq#(nil,nil) c26 (152)
#eq#(nil,node(z0,z1,z2)) c27 (154)
#eq#(node(z0,z1,z2),::(z3,z4)) c28 (156)
#eq#(node(z0,z1,z2),leaf) c29 (158)
#eq#(node(z0,z1,z2),nil) c30 (160)
#eq#(node(z0,z1,z2),node(z3,z4,z5)) c31(#and#(#eq(z0,z3),#and(#eq(z1,z4),#eq(z2,z5))),#eq#(z0,z3),#and#(#eq(z1,z4),#eq(z2,z5)),#eq#(z1,z4),#eq#(z2,z5)) (162)
#equal#(z0,z1) c32(#eq#(z0,z1)) (59)
appendreverse#(z0,z1) c33(appendreverse#1#(z0,z1)) (61)
appendreverse#1#(::(z0,z1),z2) c34(appendreverse#(z1,::(z0,z2))) (63)
appendreverse#1#(nil,z0) c35 (65)
bfs#(z0,z1,z2) c36(bfs#1#(z0,z1,z2)) (67)
bfs#1#(::(z0,z1),z2,z3) c37(bfs#3#(z0,z2,z1,z3)) (69)
bfs#1#(nil,z0,z1) c38(bfs#2#(z0,z1)) (71)
bfs#2#(::(z0,z1),z2) c39(bfs#(reverse(::(z0,z1)),nil,z2),reverse#(::(z0,z1))) (73)
bfs#2#(nil,z0) c40 (75)
bfs#3#(leaf,z0,z1,z2) c41(bfs#(z1,z0,z2)) (77)
bfs#3#(node(z0,z1,z2),z3,z4,z5) c42(bfs#4#(#equal(z5,z0),z3,z1,z2,z4,z5,z0),#equal#(z5,z0)) (79)
bfs#4#(#false,z0,z1,z2,z3,z4,z5) c43(bfs#(z3,::(z2,::(z1,z0)),z4)) (81)
bfs#4#(#true,z0,z1,z2,z3,z4,z5) c44 (83)
bfs2#(z0,z1) c45(bfs2#1#(dobfs(z0,z1),z1),dobfs#(z0,z1)) (85)
bfs2#1#(z0,z1) c46(dobfs#(z0,z1)) (87)
dfs#(z0,z1) c47(dfs#1#(z0,z1)) (89)
dfs#1#(::(z0,z1),z2) c48(dfs#2#(z0,z0,z1,z2)) (91)
dfs#1#(nil,z0) c49 (93)
dfs#2#(leaf,z0,z1,z2) c50(dfs#(z1,z2)) (95)
dfs#2#(node(z0,z1,z2),z3,z4,z5) c51(dfs#3#(#equal(z0,z5),z3,z1,z2,z4,z5),#equal#(z0,z5)) (97)
dfs#3#(#false,z0,z1,z2,z3,z4) c52(dfs#(::(z1,::(z2,z3)),z4)) (99)
dfs#3#(#true,z0,z1,z2,z3,z4) c53 (101)
dobfs#(z0,z1) c54(bfs#(::(z0,nil),nil,z1)) (103)
dodfs#(z0,z1) c55(dfs#(::(z0,nil),z1)) (105)
reverse#(z0) c56(appendreverse#(z0,nil)) (107)
reverse(z0) appendreverse(z0,nil) (106)
bfs#4(#true,z0,z1,z2,z3,z4,z5) node(z5,z1,z2) (82)
appendreverse#1(nil,z0) z0 (64)
dobfs(z0,z1) bfs(::(z0,nil),nil,z1) (102)
bfs#1(::(z0,z1),z2,z3) bfs#3(z0,z2,z1,z3) (68)
bfs#2(::(z0,z1),z2) bfs(reverse(::(z0,z1)),nil,z2) (72)
appendreverse#1(::(z0,z1),z2) appendreverse(z1,::(z0,z2)) (62)
bfs#4(#false,z0,z1,z2,z3,z4,z5) bfs(z3,::(z2,::(z1,z0)),z4) (80)
appendreverse(z0,z1) appendreverse#1(z0,z1) (60)
bfs(z0,z1,z2) bfs#1(z0,z1,z2) (66)
bfs#3(leaf,z0,z1,z2) bfs(z1,z0,z2) (76)
bfs#3(node(z0,z1,z2),z3,z4,z5) bfs#4(#equal(z5,z0),z3,z1,z2,z4,z5,z0) (78)
bfs#2(nil,z0) leaf (74)
bfs#1(nil,z0,z1) bfs#2(z0,z1) (70)

1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 R is empty

There are no rules in the TRS R. Hence, R/S has complexity O(1).