Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Frederiksen_Glenstrup/overlap)

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

overlap(Cons(x,xs),ys) overlap[Ite][True][Ite](member(x,ys),Cons(x,xs),ys) (1)
overlap(Nil,ys) False (2)
member(x',Cons(x,xs)) member[Ite][True][Ite](!EQ(x,x'),x',Cons(x,xs)) (3)
member(x,Nil) False (4)
notEmpty(Cons(x,xs)) True (5)
notEmpty(Nil) False (6)
goal(xs,ys) overlap(xs,ys) (7)

and S is the following TRS.

!EQ(S(x),S(y)) !EQ(x,y) (8)
!EQ(0,S(y)) False (9)
!EQ(S(x),0) False (10)
!EQ(0,0) True (11)
overlap[Ite][True][Ite](False,Cons(x,xs),ys) overlap(xs,ys) (12)
member[Ite][True][Ite](False,x',Cons(x,xs)) member(x',xs) (13)
overlap[Ite][True][Ite](True,xs,ys) True (14)
member[Ite][True][Ite](True,x,xs) True (15)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n2).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
originates from
overlap(Cons(z0,z1),z2) overlap[Ite][True][Ite](member(z0,z2),Cons(z0,z1),z2) (16)
overlap#(Nil,z0) c9 (19)
originates from
overlap(Nil,z0) False (18)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
originates from
member(z0,Cons(z1,z2)) member[Ite][True][Ite](!EQ(z1,z0),z0,Cons(z1,z2)) (20)
member#(z0,Nil) c11 (23)
originates from
member(z0,Nil) False (22)
notEmpty#(Cons(z0,z1)) c12 (25)
originates from
notEmpty(Cons(z0,z1)) True (24)
notEmpty#(Nil) c13 (26)
originates from
notEmpty(Nil) False (6)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)
originates from
goal(z0,z1) overlap(z0,z1) (27)
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
originates from
!EQ(S(z0),S(z1)) !EQ(z0,z1) (29)
!EQ#(0,S(z0)) c1 (32)
originates from
!EQ(0,S(z0)) False (31)
!EQ#(S(z0),0) c2 (34)
originates from
!EQ(S(z0),0) False (33)
!EQ#(0,0) c3 (35)
originates from
!EQ(0,0) True (11)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
originates from
overlap[Ite][True][Ite](False,Cons(z0,z1),z2) overlap(z1,z2) (36)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
originates from
overlap[Ite][True][Ite](True,z0,z1) True (38)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
originates from
member[Ite][True][Ite](False,z0,Cons(z1,z2)) member(z0,z2) (40)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
originates from
member[Ite][True][Ite](True,z0,z1) True (42)
Moreover, we add the following terms to the innermost strategy.
!EQ#(S(z0),S(z1))
!EQ#(0,S(z0))
!EQ#(S(z0),0)
!EQ#(0,0)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2)
overlap[Ite][True][Ite]#(True,z0,z1)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2))
member[Ite][True][Ite]#(True,z0,z1)
overlap#(Cons(z0,z1),z2)
overlap#(Nil,z0)
member#(z0,Cons(z1,z2))
member#(z0,Nil)
notEmpty#(Cons(z0,z1))
notEmpty#(Nil)
goal#(z0,z1)

1.1 Usable Rules

We remove the following rules since they are not usable.
overlap[Ite][True][Ite](False,Cons(z0,z1),z2) overlap(z1,z2) (36)
overlap[Ite][True][Ite](True,z0,z1) True (38)
overlap(Cons(z0,z1),z2) overlap[Ite][True][Ite](member(z0,z2),Cons(z0,z1),z2) (16)
overlap(Nil,z0) False (18)
notEmpty(Cons(z0,z1)) True (24)
notEmpty(Nil) False (6)
goal(z0,z1) overlap(z0,z1) (27)

1.1.1 Rule Shifting

The rules
overlap#(Nil,z0) c9 (19)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c9] = 0
[c10(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c11] = 0
[c12] = 0
[c13] = 0
[c14(x1)] = 1 · x1 + 0
[member(x1, x2)] = 1 + 1 · x1 + 1 · x2
[member[Ite][True][Ite](x1, x2, x3)] = 1 + 1 · x1 + 1 · x2 + 1 · x3
[!EQ(x1, x2)] = 0
[!EQ#(x1, x2)] = 0
[overlap[Ite][True][Ite]#(x1, x2, x3)] = 1 + 1 · x2 + 1 · x3
[member[Ite][True][Ite]#(x1, x2, x3)] = 0
[overlap#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[member#(x1, x2)] = 0
[notEmpty#(x1)] = 1 + 1 · x1
[goal#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[S(x1)] = 1 + 1 · x1
[0] = 1
[False] = 1
[True] = 1
[Cons(x1, x2)] = 1 · x1 + 0 + 1 · x2
[Nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
!EQ#(0,S(z0)) c1 (32)
!EQ#(S(z0),0) c2 (34)
!EQ#(0,0) c3 (35)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
overlap#(Nil,z0) c9 (19)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
member#(z0,Nil) c11 (23)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)

1.1.1.1 Rule Shifting

The rules
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c9] = 0
[c10(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c11] = 0
[c12] = 0
[c13] = 0
[c14(x1)] = 1 · x1 + 0
[member(x1, x2)] = 1 + 1 · x1 + 1 · x2
[member[Ite][True][Ite](x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[!EQ(x1, x2)] = 1
[!EQ#(x1, x2)] = 0
[overlap[Ite][True][Ite]#(x1, x2, x3)] = 1 · x2 + 0 + 1 · x3
[member[Ite][True][Ite]#(x1, x2, x3)] = 0
[overlap#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[member#(x1, x2)] = 0
[notEmpty#(x1)] = 0
[goal#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[S(x1)] = 1 + 1 · x1
[0] = 1
[False] = 1
[True] = 1
[Cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[Nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
!EQ#(0,S(z0)) c1 (32)
!EQ#(S(z0),0) c2 (34)
!EQ#(0,0) c3 (35)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
overlap#(Nil,z0) c9 (19)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
member#(z0,Nil) c11 (23)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)

1.1.1.1.1 Rule Shifting

The rules
goal#(z0,z1) c14(overlap#(z0,z1)) (28)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c9] = 0
[c10(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c11] = 0
[c12] = 0
[c13] = 0
[c14(x1)] = 1 · x1 + 0
[member(x1, x2)] = 0
[member[Ite][True][Ite](x1, x2, x3)] = 1 · x1 + 0
[!EQ(x1, x2)] = 0
[!EQ#(x1, x2)] = 0
[overlap[Ite][True][Ite]#(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[member[Ite][True][Ite]#(x1, x2, x3)] = 1 · x1 + 0
[overlap#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[member#(x1, x2)] = 0
[notEmpty#(x1)] = 0
[goal#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[S(x1)] = 1 + 1 · x1
[0] = 1
[False] = 0
[True] = 0
[Cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[Nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
!EQ#(0,S(z0)) c1 (32)
!EQ#(S(z0),0) c2 (34)
!EQ#(0,0) c3 (35)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
overlap#(Nil,z0) c9 (19)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
member#(z0,Nil) c11 (23)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)
member(z0,Cons(z1,z2)) member[Ite][True][Ite](!EQ(z1,z0),z0,Cons(z1,z2)) (20)
!EQ(0,S(z0)) False (31)
!EQ(S(z0),0) False (33)
member[Ite][True][Ite](False,z0,Cons(z1,z2)) member(z0,z2) (40)
member[Ite][True][Ite](True,z0,z1) True (42)
!EQ(S(z0),S(z1)) !EQ(z0,z1) (29)
!EQ(0,0) True (11)
member(z0,Nil) False (22)

1.1.1.1.1.1 Rule Shifting

The rules
member#(z0,Nil) c11 (23)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c9] = 0
[c10(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c11] = 0
[c12] = 0
[c13] = 0
[c14(x1)] = 1 · x1 + 0
[member(x1, x2)] = 1 + 1 · x1
[member[Ite][True][Ite](x1, x2, x3)] = 1 + 1 · x1 + 1 · x2
[!EQ(x1, x2)] = 0
[!EQ#(x1, x2)] = 0
[overlap[Ite][True][Ite]#(x1, x2, x3)] = 1 · x2 + 0 + 1 · x3
[member[Ite][True][Ite]#(x1, x2, x3)] = 1
[overlap#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[member#(x1, x2)] = 1
[notEmpty#(x1)] = 0
[goal#(x1, x2)] = 1 + 1 · x1 + 1 · x2
[S(x1)] = 1 + 1 · x1
[0] = 1
[False] = 1
[True] = 1
[Cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[Nil] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
!EQ#(0,S(z0)) c1 (32)
!EQ#(S(z0),0) c2 (34)
!EQ#(0,0) c3 (35)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
overlap#(Nil,z0) c9 (19)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
member#(z0,Nil) c11 (23)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)

1.1.1.1.1.1.1 Rule Shifting

The rules
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c(x1)] = 1 · x1 + 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c9] = 0
[c10(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c11] = 0
[c12] = 0
[c13] = 0
[c14(x1)] = 1 · x1 + 0
[member(x1, x2)] = 0
[member[Ite][True][Ite](x1, x2, x3)] = 1 + 1 · x2 + 1 · x3 + 1 · x3 · x3 + 1 · x2 · x3 + 1 · x2 · x2
[!EQ(x1, x2)] = 0
[!EQ#(x1, x2)] = 0
[overlap[Ite][True][Ite]#(x1, x2, x3)] = 2 · x2 · x3 + 0 + 1 · x2 · x2
[member[Ite][True][Ite]#(x1, x2, x3)] = 2 · x3 + 0
[overlap#(x1, x2)] = 1 + 2 · x2 + 2 · x1 · x2 + 1 · x1 · x1
[member#(x1, x2)] = 1 + 2 · x2
[notEmpty#(x1)] = 0
[goal#(x1, x2)] = 2 + 2 · x1 + 2 · x2 + 2 · x2 · x2 + 2 · x1 · x2 + 2 · x1 · x1
[S(x1)] = 0
[0] = 0
[False] = 0
[True] = 0
[Cons(x1, x2)] = 1 + 1 · x2
[Nil] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
!EQ#(S(z0),S(z1)) c(!EQ#(z0,z1)) (30)
!EQ#(0,S(z0)) c1 (32)
!EQ#(S(z0),0) c2 (34)
!EQ#(0,0) c3 (35)
overlap[Ite][True][Ite]#(False,Cons(z0,z1),z2) c4(overlap#(z1,z2)) (37)
overlap[Ite][True][Ite]#(True,z0,z1) c5 (39)
member[Ite][True][Ite]#(False,z0,Cons(z1,z2)) c6(member#(z0,z2)) (41)
member[Ite][True][Ite]#(True,z0,z1) c7 (43)
overlap#(Cons(z0,z1),z2) c8(overlap[Ite][True][Ite]#(member(z0,z2),Cons(z0,z1),z2),member#(z0,z2)) (17)
overlap#(Nil,z0) c9 (19)
member#(z0,Cons(z1,z2)) c10(member[Ite][True][Ite]#(!EQ(z1,z0),z0,Cons(z1,z2)),!EQ#(z1,z0)) (21)
member#(z0,Nil) c11 (23)
notEmpty#(Cons(z0,z1)) c12 (25)
notEmpty#(Nil) c13 (26)
goal#(z0,z1) c14(overlap#(z0,z1)) (28)

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