(0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(0, s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))

Rewrite Strategy: FULL

(1) RcToIrcProof (BOTH BOUNDS(ID, ID) transformation)

Converted rc-obligation to irc-obligation.

As the TRS does not nest defined symbols, we have rc = irc.

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(0, s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))

Rewrite Strategy: INNERMOST

(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))
Tuples:

DIV(0, z0) → c
DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(0, s(z0), z1) → c2
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
S tuples:

DIV(0, z0) → c
DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(0, s(z0), z1) → c2
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:

div, quot

Defined Pair Symbols:

DIV, QUOT

Compound Symbols:

c, c1, c2, c3, c4

(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing nodes:

QUOT(0, s(z0), z1) → c2
DIV(0, z0) → c

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))
Tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
S tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:

div, quot

Defined Pair Symbols:

DIV, QUOT

Compound Symbols:

c1, c3, c4

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
S tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

DIV, QUOT

Compound Symbols:

c1, c3, c4

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(DIV(x1, x2)) = x1   
POL(QUOT(x1, x2, x3)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1)) = x1   
POL(c4(x1)) = x1   
POL(s(x1)) = [1] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
S tuples:

DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
K tuples:

QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
Defined Rule Symbols:none

Defined Pair Symbols:

DIV, QUOT

Compound Symbols:

c1, c3, c4

(11) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

QUOT(z0, 0, s(z1)) → c4(DIV(z0, s(z1)))
DIV(z0, z1) → c1(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c3(QUOT(z0, z1, z2))
Now S is empty

(12) BOUNDS(1, 1)