Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.53)

The rewrite relation of the following TRS is considered.

minus(x,0) x (1)
minus(s(x),s(y)) minus(x,y) (2)
quot(0,s(y)) 0 (3)
quot(s(x),s(y)) s(quot(minus(x,y),s(y))) (4)
app(nil,y) y (5)
app(add(n,x),y) add(n,app(x,y)) (6)
reverse(nil) nil (7)
reverse(add(n,x)) app(reverse(x),add(n,nil)) (8)
shuffle(nil) nil (9)
shuffle(add(n,x)) add(n,shuffle(reverse(x))) (10)
concat(leaf,y) y (11)
concat(cons(u,v),y) cons(u,concat(v,y)) (12)
less_leaves(x,leaf) false (13)
less_leaves(leaf,cons(w,z)) true (14)
less_leaves(cons(u,v),cons(w,z)) less_leaves(concat(u,v),concat(w,z)) (15)
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:
minus#(z0,0) c (17)
originates from
minus(z0,0) z0 (16)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
originates from
minus(s(z0),s(z1)) minus(z0,z1) (18)
quot#(0,s(z0)) c2 (21)
originates from
quot(0,s(z0)) 0 (20)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
originates from
quot(s(z0),s(z1)) s(quot(minus(z0,z1),s(z1))) (22)
app#(nil,z0) c4 (25)
originates from
app(nil,z0) z0 (24)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
originates from
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
reverse#(nil) c6 (28)
originates from
reverse(nil) nil (7)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
originates from
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
shuffle#(nil) c8 (31)
originates from
shuffle(nil) nil (9)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
originates from
shuffle(add(z0,z1)) add(z0,shuffle(reverse(z1))) (32)
concat#(leaf,z0) c10 (35)
originates from
concat(leaf,z0) z0 (34)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
originates from
concat(cons(z0,z1),z2) cons(z0,concat(z1,z2)) (36)
less_leaves#(z0,leaf) c12 (39)
originates from
less_leaves(z0,leaf) false (38)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
originates from
less_leaves(leaf,cons(z0,z1)) true (40)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
originates from
less_leaves(cons(z0,z1),cons(z2,z3)) less_leaves(concat(z0,z1),concat(z2,z3)) (42)
Moreover, we add the following terms to the innermost strategy.
minus#(z0,0)
minus#(s(z0),s(z1))
quot#(0,s(z0))
quot#(s(z0),s(z1))
app#(nil,z0)
app#(add(z0,z1),z2)
reverse#(nil)
reverse#(add(z0,z1))
shuffle#(nil)
shuffle#(add(z0,z1))
concat#(leaf,z0)
concat#(cons(z0,z1),z2)
less_leaves#(z0,leaf)
less_leaves#(leaf,cons(z0,z1))
less_leaves#(cons(z0,z1),cons(z2,z3))

1.1 Usable Rules

We remove the following rules since they are not usable.
quot(0,s(z0)) 0 (20)
quot(s(z0),s(z1)) s(quot(minus(z0,z1),s(z1))) (22)
shuffle(nil) nil (9)
shuffle(add(z0,z1)) add(z0,shuffle(reverse(z1))) (32)
less_leaves(z0,leaf) false (38)
less_leaves(leaf,cons(z0,z1)) true (40)
less_leaves(cons(z0,z1),cons(z2,z3)) less_leaves(concat(z0,z1),concat(z2,z3)) (42)

1.1.1 Rule Shifting

The rules
shuffle#(nil) c8 (31)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 3 + 3 · x1 + 3 · x2
[reverse(x1)] = 0
[app(x1, x2)] = 3
[concat(x1, x2)] = 1 + 3 · x1 + 3 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 3 · x2 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 2
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 2
[leaf] = 3
[cons(x1, x2)] = 3 + 1 · x2
[nil] = 0
[add(x1, x2)] = 1 · x1 + 0
[0] = 3
[s(x1)] = 1 · x1 + 0
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)

1.1.1.1 Rule Shifting

The rules
minus#(z0,0) c (17)
quot#(0,s(z0)) c2 (21)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 1
[app(x1, x2)] = 1 + 1 · x1 + 1 · x2
[concat(x1, x2)] = 1 · x1 + 0 + 1 · x2
[minus#(x1, x2)] = 1
[quot#(x1, x2)] = 1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[nil] = 1
[add(x1, x2)] = 1 + 1 · x1
[0] = 1
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
concat(leaf,z0) z0 (34)
concat(cons(z0,z1),z2) cons(z0,concat(z1,z2)) (36)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1 Rule Shifting

The rules
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
concat#(leaf,z0) c10 (35)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 1 + 1 · x1
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 1 · x1 + 0 + 1 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 1 · x1 + 0
[concat#(x1, x2)] = 1
[less_leaves#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 1
[cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[nil] = 0
[add(x1, x2)] = 1 + 1 · x1 + 1 · x2
[0] = 0
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
concat(leaf,z0) z0 (34)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
concat(cons(z0,z1),z2) cons(z0,concat(z1,z2)) (36)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1 Rule Shifting

The rules
reverse#(nil) c6 (28)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 + 1 · x1
[reverse(x1)] = 1 · x1 + 0
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 1 + 1 · x1 + 1 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 1
[shuffle#(x1)] = 1 · x1 + 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 0
[leaf] = 0
[cons(x1, x2)] = 1 · x1 + 0 + 1 · x2
[nil] = 0
[add(x1, x2)] = 1 + 1 · x1 + 1 · x2
[0] = 0
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1.1 Rule Shifting

The rules
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 + 1 · x1
[reverse(x1)] = 1 · x1 + 0
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 1 + 1 · x1 + 1 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 1 · x1 + 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[leaf] = 0
[cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[nil] = 0
[add(x1, x2)] = 1 + 1 · x1 + 1 · x2
[0] = 0
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
concat(leaf,z0) z0 (34)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
concat(cons(z0,z1),z2) cons(z0,concat(z1,z2)) (36)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1.1.1 Rule Shifting

The rules
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 0
[app(x1, x2)] = 1 + 1 · x1 + 1 · x2 + 1 · x2 · x2 + 1 · x1 · x2 + 1 · x1 · x1
[concat(x1, x2)] = 2 · x2 + 0 + 1 · x1 · x1
[minus#(x1, x2)] = 1 · x1 + 0
[quot#(x1, x2)] = 2 · x1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 0
[leaf] = 1
[cons(x1, x2)] = 2
[nil] = 0
[add(x1, x2)] = 0
[0] = 2
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 0
[reverse(x1)] = 0
[app(x1, x2)] = 1 + 1 · x1 + 1 · x2 + 1 · x2 · x2 + 1 · x1 · x2 + 1 · x1 · x1
[concat(x1, x2)] = 1 + 1 · x1 + 1 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 0
[shuffle#(x1)] = 0
[concat#(x1, x2)] = 2 · x1 + 0 + 2 · x2
[less_leaves#(x1, x2)] = 2 · x2 + 0 + 2 · x2 · x2 + 1 · x1 · x1
[leaf] = 1
[cons(x1, x2)] = 2 + 1 · x1 + 1 · x2
[nil] = 0
[add(x1, x2)] = 0
[0] = 2
[s(x1)] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
concat(leaf,z0) z0 (34)
concat(cons(z0,z1),z2) cons(z0,concat(z1,z2)) (36)

1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 1 · x1 + 0
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 0
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 2 · x1 · x1 + 0
[app#(x1, x2)] = 0
[reverse#(x1)] = 1 · x1 + 0
[shuffle#(x1)] = 2 · x1 · x1 + 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 0
[leaf] = 2
[cons(x1, x2)] = 0
[nil] = 0
[add(x1, x2)] = 2 + 1 · x2
[0] = 2
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
app#(nil,z0) c4 (25)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 + 0
[reverse(x1)] = 1 · x1 + 0
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 2 + 1 · x1 + 2 · x1 · x2
[minus#(x1, x2)] = 2
[quot#(x1, x2)] = 1 · x1 · x1 + 0
[app#(x1, x2)] = 1 + 1 · x2
[reverse#(x1)] = 2 · x1 + 0
[shuffle#(x1)] = 1 · x1 · x1 + 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 0
[leaf] = 1
[cons(x1, x2)] = 2
[nil] = 0
[add(x1, x2)] = 1 + 1 · x2
[0] = 2
[s(x1)] = 2 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)
minus(s(z0),s(z1)) minus(z0,z1) (18)
minus(z0,0) z0 (16)

1.1.1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c8] = 0
[c9(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c10] = 0
[c11(x1)] = 1 · x1 + 0
[c12] = 0
[c13] = 0
[c14(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[minus(x1, x2)] = 1 · x1 · x1 · x1 + 0 + 1 · x2 · x2 · x2
[reverse(x1)] = 1 · x1 + 0
[app(x1, x2)] = 1 · x1 + 0 + 1 · x2
[concat(x1, x2)] = 1 · x1 · x1 · x1 + 0 + 1 · x2 · x1 · x1 + 1 · x2 · x2 · x1 + 1 · x2 · x2 · x2
[minus#(x1, x2)] = 0
[quot#(x1, x2)] = 0
[app#(x1, x2)] = 1 · x1 + 0
[reverse#(x1)] = 1 + 1 · x1 · x1
[shuffle#(x1)] = 1 · x1 · x1 · x1 + 0
[concat#(x1, x2)] = 0
[less_leaves#(x1, x2)] = 0
[leaf] = 1
[cons(x1, x2)] = 0
[nil] = 0
[add(x1, x2)] = 1 + 1 · x2
[0] = 1
[s(x1)] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
minus#(z0,0) c (17)
minus#(s(z0),s(z1)) c1(minus#(z0,z1)) (19)
quot#(0,s(z0)) c2 (21)
quot#(s(z0),s(z1)) c3(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (23)
app#(nil,z0) c4 (25)
app#(add(z0,z1),z2) c5(app#(z1,z2)) (27)
reverse#(nil) c6 (28)
reverse#(add(z0,z1)) c7(app#(reverse(z1),add(z0,nil)),reverse#(z1)) (30)
shuffle#(nil) c8 (31)
shuffle#(add(z0,z1)) c9(shuffle#(reverse(z1)),reverse#(z1)) (33)
concat#(leaf,z0) c10 (35)
concat#(cons(z0,z1),z2) c11(concat#(z1,z2)) (37)
less_leaves#(z0,leaf) c12 (39)
less_leaves#(leaf,cons(z0,z1)) c13 (41)
less_leaves#(cons(z0,z1),cons(z2,z3)) c14(less_leaves#(concat(z0,z1),concat(z2,z3)),concat#(z0,z1),concat#(z2,z3)) (43)
reverse(nil) nil (7)
app(add(z0,z1),z2) add(z0,app(z1,z2)) (26)
app(nil,z0) z0 (24)
reverse(add(z0,z1)) app(reverse(z1),add(z0,nil)) (29)

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).