(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(X) → if(X, c, n__f(n__true))
if(true, X, Y) → X
if(false, X, Y) → activate(Y)
f(X) → n__f(X)
truen__true
activate(n__f(X)) → f(activate(X))
activate(n__true) → true
activate(X) → X

Rewrite Strategy: INNERMOST

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

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
truen__true
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__true) → c7(TRUE)
S tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__true) → c7(TRUE)
K tuples:none
Defined Rule Symbols:

f, if, true, activate

Defined Pair Symbols:

F, IF, ACTIVATE

Compound Symbols:

c1, c4, c6, c7

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

Removed 1 trailing nodes:

ACTIVATE(n__true) → c7(TRUE)

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
truen__true
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
S tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
K tuples:none
Defined Rule Symbols:

f, if, true, activate

Defined Pair Symbols:

F, IF, ACTIVATE

Compound Symbols:

c1, c4, c6

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

IF(false, z0, z1) → c4(ACTIVATE(z1))
We considered the (Usable) Rules:

if(false, z0, z1) → activate(z1)
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
truen__true
And the Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = [2]x12   
POL(F(x1)) = [2] + [2]x1   
POL(IF(x1, x2, x3)) = x1 + [2]x32 + x1·x2   
POL(activate(x1)) = [2]x1   
POL(c) = [1]   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(c6(x1, x2)) = x1 + x2   
POL(f(x1)) = [1] + x1   
POL(false) = [2]   
POL(if(x1, x2, x3)) = x1·x3   
POL(n__f(x1)) = [1] + x1   
POL(n__true) = 0   
POL(true) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
truen__true
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
S tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
K tuples:

IF(false, z0, z1) → c4(ACTIVATE(z1))
Defined Rule Symbols:

f, if, true, activate

Defined Pair Symbols:

F, IF, ACTIVATE

Compound Symbols:

c1, c4, c6

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
We considered the (Usable) Rules:

if(false, z0, z1) → activate(z1)
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
truen__true
And the Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = [2]x1 + x12   
POL(F(x1)) = [2] + x1   
POL(IF(x1, x2, x3)) = x32 + x1·x3 + x22   
POL(activate(x1)) = [2]x1   
POL(c) = [1]   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(c6(x1, x2)) = x1 + x2   
POL(f(x1)) = [2] + x1   
POL(false) = [2]   
POL(if(x1, x2, x3)) = [2]x2 + x1·x3   
POL(n__f(x1)) = [1] + x1   
POL(n__true) = 0   
POL(true) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0) → if(z0, c, n__f(n__true))
f(z0) → n__f(z0)
if(true, z0, z1) → z0
if(false, z0, z1) → activate(z1)
truen__true
activate(n__f(z0)) → f(activate(z0))
activate(n__true) → true
activate(z0) → z0
Tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
S tuples:

F(z0) → c1(IF(z0, c, n__f(n__true)))
K tuples:

IF(false, z0, z1) → c4(ACTIVATE(z1))
ACTIVATE(n__f(z0)) → c6(F(activate(z0)), ACTIVATE(z0))
Defined Rule Symbols:

f, if, true, activate

Defined Pair Symbols:

F, IF, ACTIVATE

Compound Symbols:

c1, c4, c6

(9) CdtKnowledgeProof (EQUIVALENT transformation)

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

F(z0) → c1(IF(z0, c, n__f(n__true)))
IF(false, z0, z1) → c4(ACTIVATE(z1))
Now S is empty

(10) BOUNDS(O(1), O(1))