Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/raML/appendAll.raml)

The rewrite relation of the following TRS is considered.

append(@l1,@l2) append#1(@l1,@l2) (1)
append#1(::(@x,@xs),@l2) ::(@x,append(@xs,@l2)) (2)
append#1(nil,@l2) @l2 (3)
appendAll(@l) appendAll#1(@l) (4)
appendAll#1(::(@l1,@ls)) append(@l1,appendAll(@ls)) (5)
appendAll#1(nil) nil (6)
appendAll2(@l) appendAll2#1(@l) (7)
appendAll2#1(::(@l1,@ls)) append(appendAll(@l1),appendAll2(@ls)) (8)
appendAll2#1(nil) nil (9)
appendAll3(@l) appendAll3#1(@l) (10)
appendAll3#1(::(@l1,@ls)) append(appendAll2(@l1),appendAll3(@ls)) (11)
appendAll3#1(nil) nil (12)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
append#(z0,z1) c(append#1#(z0,z1)) (14)
originates from
append(z0,z1) append#1(z0,z1) (13)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
originates from
append#1(::(z0,z1),z2) ::(z0,append(z1,z2)) (15)
append#1#(nil,z0) c2 (18)
originates from
append#1(nil,z0) z0 (17)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
originates from
appendAll(z0) appendAll#1(z0) (19)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
originates from
appendAll#1(::(z0,z1)) append(z0,appendAll(z1)) (21)
appendAll#1#(nil) c5 (23)
originates from
appendAll#1(nil) nil (6)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
originates from
appendAll2(z0) appendAll2#1(z0) (24)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
originates from
appendAll2#1(::(z0,z1)) append(appendAll(z0),appendAll2(z1)) (26)
appendAll2#1#(nil) c8 (28)
originates from
appendAll2#1(nil) nil (9)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
originates from
appendAll3(z0) appendAll3#1(z0) (29)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
originates from
appendAll3#1(::(z0,z1)) append(appendAll2(z0),appendAll3(z1)) (31)
appendAll3#1#(nil) c11 (33)
originates from
appendAll3#1(nil) nil (12)
Moreover, we add the following terms to the innermost strategy.
append#(z0,z1)
append#1#(::(z0,z1),z2)
append#1#(nil,z0)
appendAll#(z0)
appendAll#1#(::(z0,z1))
appendAll#1#(nil)
appendAll2#(z0)
appendAll2#1#(::(z0,z1))
appendAll2#1#(nil)
appendAll3#(z0)
appendAll3#1#(::(z0,z1))
appendAll3#1#(nil)

1.1 Rule Shifting

The rules
appendAll#1#(nil) c5 (23)
appendAll2#1#(nil) c8 (28)
appendAll3#1#(nil) c11 (33)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 0
[append#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendAll(x1)] = 1 · x1 + 0
[appendAll#1(x1)] = 1 + 1 · x1
[appendAll2(x1)] = 1 · x1 + 0
[appendAll2#1(x1)] = 1 + 1 · x1
[appendAll3(x1)] = 1 + 1 · x1
[appendAll3#1(x1)] = 1 + 1 · x1
[append#(x1, x2)] = 0
[append#1#(x1, x2)] = 0
[appendAll#(x1)] = 1 · x1 + 0
[appendAll#1#(x1)] = 1 · x1 + 0
[appendAll2#(x1)] = 1 · x1 + 0
[appendAll2#1#(x1)] = 1 · x1 + 0
[appendAll3#(x1)] = 1 · x1 + 0
[appendAll3#1#(x1)] = 1 · x1 + 0
[::(x1, x2)] = 1 · x1 + 0 + 1 · x2
[nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)

1.1.1 Rule Shifting

The rules
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 0
[append#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendAll(x1)] = 1 · x1 + 0
[appendAll#1(x1)] = 1 + 1 · x1
[appendAll2(x1)] = 1 · x1 + 0
[appendAll2#1(x1)] = 1 + 1 · x1
[appendAll3(x1)] = 1 + 1 · x1
[appendAll3#1(x1)] = 1 + 1 · x1
[append#(x1, x2)] = 0
[append#1#(x1, x2)] = 0
[appendAll#(x1)] = 0
[appendAll#1#(x1)] = 0
[appendAll2#(x1)] = 0
[appendAll2#1#(x1)] = 0
[appendAll3#(x1)] = 1 + 1 · x1
[appendAll3#1#(x1)] = 1 · x1 + 0
[::(x1, x2)] = 1 + 1 · x2
[nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)

1.1.1.1 Rule Shifting

The rules
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 0
[append#1(x1, x2)] = 1 + 1 · x1 + 1 · x2
[appendAll(x1)] = 1 · x1 + 0
[appendAll#1(x1)] = 1 + 1 · x1
[appendAll2(x1)] = 1 · x1 + 0
[appendAll2#1(x1)] = 1 + 1 · x1
[appendAll3(x1)] = 1 + 1 · x1
[appendAll3#1(x1)] = 1 + 1 · x1
[append#(x1, x2)] = 0
[append#1#(x1, x2)] = 0
[appendAll#(x1)] = 0
[appendAll#1#(x1)] = 0
[appendAll2#(x1)] = 0
[appendAll2#1#(x1)] = 0
[appendAll3#(x1)] = 1 · x1 + 0
[appendAll3#1#(x1)] = 1 · x1 + 0
[::(x1, x2)] = 1 + 1 · x2
[nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)

1.1.1.1.1 Rule Shifting

The rules
append#1#(nil,z0) c2 (18)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 2 + 1 · x2
[append#1(x1, x2)] = 3 + 3 · x2
[appendAll(x1)] = 0
[appendAll#1(x1)] = 3 + 3 · x1
[appendAll2(x1)] = 0
[appendAll2#1(x1)] = 3 + 3 · x1
[appendAll3(x1)] = 2 + 3 · x1
[appendAll3#1(x1)] = 1 + 3 · x1
[append#(x1, x2)] = 3
[append#1#(x1, x2)] = 3
[appendAll#(x1)] = 1 + 3 · x1
[appendAll#1#(x1)] = 1 + 3 · x1
[appendAll2#(x1)] = 3 + 3 · x1
[appendAll2#1#(x1)] = 1 + 3 · x1
[appendAll3#(x1)] = 2 + 3 · x1
[appendAll3#1#(x1)] = 1 + 3 · x1
[::(x1, x2)] = 3 + 1 · x1 + 1 · x2
[nil] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)

1.1.1.1.1.1 Rule Shifting

The rules
appendAll#(z0) c3(appendAll#1#(z0)) (20)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 0
[append#1(x1, x2)] = 3 + 3 · x2
[appendAll(x1)] = 0
[appendAll#1(x1)] = 3 + 3 · x1
[appendAll2(x1)] = 2
[appendAll2#1(x1)] = 2
[appendAll3(x1)] = 3 + 3 · x1
[appendAll3#1(x1)] = 3 + 3 · x1
[append#(x1, x2)] = 2
[append#1#(x1, x2)] = 2
[appendAll#(x1)] = 2 + 3 · x1
[appendAll#1#(x1)] = 1 + 3 · x1
[appendAll2#(x1)] = 3 · x1 + 0
[appendAll2#1#(x1)] = 3 · x1 + 0
[appendAll3#(x1)] = 2 + 3 · x1
[appendAll3#1#(x1)] = 1 + 3 · x1
[::(x1, x2)] = 3 + 1 · x1 + 1 · x2
[nil] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)

1.1.1.1.1.1.1 Rule Shifting

The rules
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 1 · x1 + 0 + 1 · x2
[append#1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[appendAll(x1)] = 1 · x1 + 0
[appendAll#1(x1)] = 1 · x1 + 0
[appendAll2(x1)] = 1 · x1 + 0
[appendAll2#1(x1)] = 1 · x1 + 0
[appendAll3(x1)] = 3 + 3 · x1
[appendAll3#1(x1)] = 3 + 3 · x1
[append#(x1, x2)] = 1 · x1 + 0
[append#1#(x1, x2)] = 1 · x1 + 0
[appendAll#(x1)] = 1 · x1 + 0
[appendAll#1#(x1)] = 1 · x1 + 0
[appendAll2#(x1)] = 2 · x1 + 0
[appendAll2#1#(x1)] = 2 · x1 + 0
[appendAll3#(x1)] = 2 + 3 · x1
[appendAll3#1#(x1)] = 2 + 3 · x1
[::(x1, x2)] = 2 + 1 · x1 + 1 · x2
[nil] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)
appendAll#1(::(z0,z1)) append(z0,appendAll(z1)) (21)
append(z0,z1) append#1(z0,z1) (13)
append#1(nil,z0) z0 (17)
appendAll(z0) appendAll#1(z0) (19)
appendAll2(z0) appendAll2#1(z0) (24)
appendAll2#1(::(z0,z1)) append(appendAll(z0),appendAll2(z1)) (26)
appendAll2#1(nil) nil (9)
appendAll#1(nil) nil (6)
append#1(::(z0,z1),z2) ::(z0,append(z1,z2)) (15)

1.1.1.1.1.1.1.1 Rule Shifting

The rules
append#(z0,z1) c(append#1#(z0,z1)) (14)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c8] = 0
[c9(x1)] = 1 · x1 + 0
[c10(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[c11] = 0
[append(x1, x2)] = 2 + 1 · x1 + 1 · x2
[append#1(x1, x2)] = 2 + 1 · x1 + 1 · x2
[appendAll(x1)] = 1 · x1 + 0
[appendAll#1(x1)] = 1 · x1 + 0
[appendAll2(x1)] = 1 · x1 + 0
[appendAll2#1(x1)] = 1 · x1 + 0
[appendAll3(x1)] = 2 + 3 · x1
[appendAll3#1(x1)] = 1 + 3 · x1
[append#(x1, x2)] = 1 + 1 · x1
[append#1#(x1, x2)] = 1 · x1 + 0
[appendAll#(x1)] = 3 + 1 · x1
[appendAll#1#(x1)] = 3 + 1 · x1
[appendAll2#(x1)] = 1 + 2 · x1
[appendAll2#1#(x1)] = 2 · x1 + 0
[appendAll3#(x1)] = 2 + 3 · x1
[appendAll3#1#(x1)] = 1 + 3 · x1
[::(x1, x2)] = 3 + 1 · x1 + 1 · x2
[nil] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
append#(z0,z1) c(append#1#(z0,z1)) (14)
append#1#(::(z0,z1),z2) c1(append#(z1,z2)) (16)
append#1#(nil,z0) c2 (18)
appendAll#(z0) c3(appendAll#1#(z0)) (20)
appendAll#1#(::(z0,z1)) c4(append#(z0,appendAll(z1)),appendAll#(z1)) (22)
appendAll#1#(nil) c5 (23)
appendAll2#(z0) c6(appendAll2#1#(z0)) (25)
appendAll2#1#(::(z0,z1)) c7(append#(appendAll(z0),appendAll2(z1)),appendAll#(z0),appendAll2#(z1)) (27)
appendAll2#1#(nil) c8 (28)
appendAll3#(z0) c9(appendAll3#1#(z0)) (30)
appendAll3#1#(::(z0,z1)) c10(append#(appendAll2(z0),appendAll3(z1)),appendAll2#(z0),appendAll3#(z1)) (32)
appendAll3#1#(nil) c11 (33)
appendAll#1(::(z0,z1)) append(z0,appendAll(z1)) (21)
append(z0,z1) append#1(z0,z1) (13)
append#1(nil,z0) z0 (17)
appendAll(z0) appendAll#1(z0) (19)
appendAll2(z0) appendAll2#1(z0) (24)
appendAll2#1(::(z0,z1)) append(appendAll(z0),appendAll2(z1)) (26)
appendAll2#1(nil) nil (9)
appendAll#1(nil) nil (6)
append#1(::(z0,z1),z2) ::(z0,append(z1,z2)) (15)

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