Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/SK90/2.40)

The rewrite relation of the following TRS is considered.

or(true,y) true (1)
or(x,true) true (2)
or(false,false) false (3)
mem(x,nil) false (4)
mem(x,set(y)) =(x,y) (5)
mem(x,union(y,z)) or(mem(x,y),mem(x,z)) (6)
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:
or#(true,z0) c (8)
originates from
or(true,z0) true (7)
or#(z0,true) c1 (10)
originates from
or(z0,true) true (9)
or#(false,false) c2 (11)
originates from
or(false,false) false (3)
mem#(z0,nil) c3 (13)
originates from
mem(z0,nil) false (12)
mem#(z0,set(z1)) c4 (15)
originates from
mem(z0,set(z1)) =(z0,z1) (14)
mem#(z0,union(z1,z2)) c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) (17)
originates from
mem(z0,union(z1,z2)) or(mem(z0,z1),mem(z0,z2)) (16)
Moreover, we add the following terms to the innermost strategy.
or#(true,z0)
or#(z0,true)
or#(false,false)
mem#(z0,nil)
mem#(z0,set(z1))
mem#(z0,union(z1,z2))

1.1 Rule Shifting

The rules
or#(true,z0) c (8)
or#(z0,true) c1 (10)
or#(false,false) c2 (11)
mem#(z0,nil) c3 (13)
mem#(z0,set(z1)) c4 (15)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[or(x1, x2)] = 1 · x2 + 0
[mem(x1, x2)] = 1 + 1 · x1
[or#(x1, x2)] = 1
[mem#(x1, x2)] = 1 · x2 + 0
[nil] = 1
[false] = 1
[set(x1)] = 1 + 1 · x1
[=(x1, x2)] = 1 + 1 · x1
[union(x1, x2)] = 1 + 1 · x1 + 1 · x2
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
or#(true,z0) c (8)
or#(z0,true) c1 (10)
or#(false,false) c2 (11)
mem#(z0,nil) c3 (13)
mem#(z0,set(z1)) c4 (15)
mem#(z0,union(z1,z2)) c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) (17)

1.1.1 Rule Shifting

The rules
mem#(z0,union(z1,z2)) c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) (17)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3] = 0
[c4] = 0
[c5(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[or(x1, x2)] = 1 · x1 + 0 + 1 · x2
[mem(x1, x2)] = 1 + 1 · x2
[or#(x1, x2)] = 0
[mem#(x1, x2)] = 1 · x2 + 0
[nil] = 1
[false] = 1
[set(x1)] = 1 + 1 · x1
[=(x1, x2)] = 1 · x2 + 0
[union(x1, x2)] = 1 + 1 · x1 + 1 · x2
[true] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
or#(true,z0) c (8)
or#(z0,true) c1 (10)
or#(false,false) c2 (11)
mem#(z0,nil) c3 (13)
mem#(z0,set(z1)) c4 (15)
mem#(z0,union(z1,z2)) c5(or#(mem(z0,z1),mem(z0,z2)),mem#(z0,z1),mem#(z0,z2)) (17)

1.1.1.1 R is empty

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