Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Rubio_04/division)

The rewrite relation of the following TRS is considered.

le(0,Y) true (1)
le(s(X),0) false (2)
le(s(X),s(Y)) le(X,Y) (3)
minus(0,Y) 0 (4)
minus(s(X),Y) ifMinus(le(s(X),Y),s(X),Y) (5)
ifMinus(true,s(X),Y) 0 (6)
ifMinus(false,s(X),Y) s(minus(X,Y)) (7)
quot(0,s(Y)) 0 (8)
quot(s(X),s(Y)) s(quot(minus(X,Y),s(Y))) (9)
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:
le#(0,z0) c (11)
originates from
le(0,z0) true (10)
le#(s(z0),0) c1 (13)
originates from
le(s(z0),0) false (12)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
originates from
le(s(z0),s(z1)) le(z0,z1) (14)
minus#(0,z0) c3 (17)
originates from
minus(0,z0) 0 (16)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
originates from
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
ifMinus#(true,s(z0),z1) c5 (21)
originates from
ifMinus(true,s(z0),z1) 0 (20)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
originates from
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
quot#(0,s(z0)) c7 (25)
originates from
quot(0,s(z0)) 0 (24)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
originates from
quot(s(z0),s(z1)) s(quot(minus(z0,z1),s(z1))) (26)
Moreover, we add the following terms to the innermost strategy.
le#(0,z0)
le#(s(z0),0)
le#(s(z0),s(z1))
minus#(0,z0)
minus#(s(z0),z1)
ifMinus#(true,s(z0),z1)
ifMinus#(false,s(z0),z1)
quot#(0,s(z0))
quot#(s(z0),s(z1))

1.1 Usable Rules

We remove the following rules since they are not usable.
quot(0,s(z0)) 0 (24)
quot(s(z0),s(z1)) s(quot(minus(z0,z1),s(z1))) (26)

1.1.1 Rule Shifting

The rules
quot#(0,s(z0)) c7 (25)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 1 + 1 · x2
[minus(x1, x2)] = 1 + 1 · x2
[ifMinus(x1, x2, x3)] = 1 + 1 · x2 + 1 · x3
[le#(x1, x2)] = 0
[minus#(x1, x2)] = 0
[ifMinus#(x1, x2, x3)] = 1 · x2 + 0
[quot#(x1, x2)] = 1 + 1 · x2
[0] = 1
[s(x1)] = 0
[false] = 1
[true] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)

1.1.1.1 Rule Shifting

The rules
minus#(0,z0) c3 (17)
ifMinus#(true,s(z0),z1) c5 (21)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 1 + 1 · x2
[minus(x1, x2)] = 1 · x1 + 0
[ifMinus(x1, x2, x3)] = 1 · x2 + 0
[le#(x1, x2)] = 0
[minus#(x1, x2)] = 1
[ifMinus#(x1, x2, x3)] = 1
[quot#(x1, x2)] = 1 · x1 + 0
[0] = 0
[s(x1)] = 1 + 1 · x1
[false] = 1
[true] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

1.1.1.1.1 Rule Shifting

The rules
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 0
[minus(x1, x2)] = 1 + 1 · x1
[ifMinus(x1, x2, x3)] = 1 + 1 · x2
[le#(x1, x2)] = 0
[minus#(x1, x2)] = 3
[ifMinus#(x1, x2, x3)] = 3
[quot#(x1, x2)] = 2 · x1 + 0
[0] = 0
[s(x1)] = 3 + 1 · x1
[false] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

1.1.1.1.1.1 Rule Shifting

The rules
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 0
[minus(x1, x2)] = 1 · x1 + 0
[ifMinus(x1, x2, x3)] = 1 · x2 + 0
[le#(x1, x2)] = 0
[minus#(x1, x2)] = 2 · x1 + 0
[ifMinus#(x1, x2, x3)] = 2 · x2 + 0
[quot#(x1, x2)] = 1 · x1 · x1 + 0
[0] = 0
[s(x1)] = 2 + 1 · x1
[false] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

1.1.1.1.1.1.1 Rule Shifting

The rules
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 0
[minus(x1, x2)] = 1 · x1 + 0
[ifMinus(x1, x2, x3)] = 1 · x2 + 0
[le#(x1, x2)] = 0
[minus#(x1, x2)] = 1 + 1 · x1
[ifMinus#(x1, x2, x3)] = 1 · x2 + 0
[quot#(x1, x2)] = 1 · x1 · x1 + 0
[0] = 0
[s(x1)] = 1 + 1 · x1
[false] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

1.1.1.1.1.1.1.1 Rule Shifting

The rules
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 0
[minus(x1, x2)] = 1 · x1 + 0
[ifMinus(x1, x2, x3)] = 1 · x2 + 0
[le#(x1, x2)] = 1
[minus#(x1, x2)] = 1 + 1 · x1
[ifMinus#(x1, x2, x3)] = 1 · x2 + 0
[quot#(x1, x2)] = 1 · x1 · x1 + 0
[0] = 0
[s(x1)] = 1 + 1 · x1
[false] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c5] = 0
[c6(x1)] = 1 · x1 + 0
[c7] = 0
[c8(x1, x2)] = 1 · x1 + 0 + 1 · x2
[le(x1, x2)] = 0
[minus(x1, x2)] = 1 · x1 + 0
[ifMinus(x1, x2, x3)] = 1 · x2 + 0
[le#(x1, x2)] = 1 + 1 · x1
[minus#(x1, x2)] = 1 + 1 · x1 + 1 · x1 · x1
[ifMinus#(x1, x2, x3)] = 1 · x2 · x2 + 0
[quot#(x1, x2)] = 1 · x1 · x1 · x1 + 0
[0] = 0
[s(x1)] = 1 + 1 · x1
[false] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
le#(0,z0) c (11)
le#(s(z0),0) c1 (13)
le#(s(z0),s(z1)) c2(le#(z0,z1)) (15)
minus#(0,z0) c3 (17)
minus#(s(z0),z1) c4(ifMinus#(le(s(z0),z1),s(z0),z1),le#(s(z0),z1)) (19)
ifMinus#(true,s(z0),z1) c5 (21)
ifMinus#(false,s(z0),z1) c6(minus#(z0,z1)) (23)
quot#(0,s(z0)) c7 (25)
quot#(s(z0),s(z1)) c8(quot#(minus(z0,z1),s(z1)),minus#(z0,z1)) (27)
ifMinus(true,s(z0),z1) 0 (20)
ifMinus(false,s(z0),z1) s(minus(z0,z1)) (22)
minus(s(z0),z1) ifMinus(le(s(z0),z1),s(z0),z1) (18)
minus(0,z0) 0 (16)

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