(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
if(true, x, y) → x
if(false, x, y) → y
if(x, y, y) → y
if(if(x, y, z), u, v) → if(x, if(y, u, v), if(z, u, v))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
if(true, z0, z1) → z0
if(false, z0, z1) → z1
if(z0, z1, z1) → z1
if(if(z0, z1, z2), u, v) → if(z0, if(z1, u, v), if(z2, u, v))
Tuples:
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
S tuples:
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
K tuples:none
Defined Rule Symbols:
if
Defined Pair Symbols:
IF
Compound Symbols:
c3
(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
We considered the (Usable) Rules:
if(true, z0, z1) → z0
if(false, z0, z1) → z1
if(if(z0, z1, z2), u, v) → if(z0, if(z1, u, v), if(z2, u, v))
if(z0, z1, z1) → z1
And the Tuples:
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(IF(x1, x2, x3)) = x1
POL(c3(x1, x2, x3)) = x1 + x2 + x3
POL(false) = 0
POL(if(x1, x2, x3)) = [1] + [4]x1 + x2 + [2]x3
POL(true) = 0
POL(u) = 0
POL(v) = 0
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
if(true, z0, z1) → z0
if(false, z0, z1) → z1
if(z0, z1, z1) → z1
if(if(z0, z1, z2), u, v) → if(z0, if(z1, u, v), if(z2, u, v))
Tuples:
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
S tuples:none
K tuples:
IF(if(z0, z1, z2), u, v) → c3(IF(z0, if(z1, u, v), if(z2, u, v)), IF(z1, u, v), IF(z2, u, v))
Defined Rule Symbols:
if
Defined Pair Symbols:
IF
Compound Symbols:
c3
(5) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(6) BOUNDS(O(1), O(1))