(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
diff(X, Y) → if(leq(X, Y), n__0, n__s(n__diff(n__p(X), Y)))
0 → n__0
s(X) → n__s(X)
diff(X1, X2) → n__diff(X1, X2)
p(X) → n__p(X)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__diff(X1, X2)) → diff(activate(X1), activate(X2))
activate(n__p(X)) → p(activate(X))
activate(X) → X
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
p(0) → 0
p(s(z0)) → z0
p(z0) → n__p(z0)
leq(0, z0) → true
leq(s(z0), 0) → false
leq(s(z0), s(z1)) → leq(z0, z1)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
diff(z0, z1) → if(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1)))
diff(z0, z1) → n__diff(z0, z1)
0 → n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(activate(z0))
activate(n__diff(z0, z1)) → diff(activate(z0), activate(z1))
activate(n__p(z0)) → p(activate(z0))
activate(z0) → z0
Tuples:
P(0) → c(0')
LEQ(s(z0), s(z1)) → c5(LEQ(z0, z1))
IF(true, z0, z1) → c6(ACTIVATE(z0))
IF(false, z0, z1) → c7(ACTIVATE(z1))
DIFF(z0, z1) → c8(IF(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1))), LEQ(z0, z1))
ACTIVATE(n__0) → c12(0')
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
S tuples:
P(0) → c(0')
LEQ(s(z0), s(z1)) → c5(LEQ(z0, z1))
IF(true, z0, z1) → c6(ACTIVATE(z0))
IF(false, z0, z1) → c7(ACTIVATE(z1))
DIFF(z0, z1) → c8(IF(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1))), LEQ(z0, z1))
ACTIVATE(n__0) → c12(0')
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
K tuples:none
Defined Rule Symbols:
p, leq, if, diff, 0, s, activate
Defined Pair Symbols:
P, LEQ, IF, DIFF, ACTIVATE
Compound Symbols:
c, c5, c6, c7, c8, c12, c13, c14, c15
(3) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
P(0) → c(0')
LEQ(s(z0), s(z1)) → c5(LEQ(z0, z1))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
p(0) → 0
p(s(z0)) → z0
p(z0) → n__p(z0)
leq(0, z0) → true
leq(s(z0), 0) → false
leq(s(z0), s(z1)) → leq(z0, z1)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
diff(z0, z1) → if(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1)))
diff(z0, z1) → n__diff(z0, z1)
0 → n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(activate(z0))
activate(n__diff(z0, z1)) → diff(activate(z0), activate(z1))
activate(n__p(z0)) → p(activate(z0))
activate(z0) → z0
Tuples:
IF(true, z0, z1) → c6(ACTIVATE(z0))
IF(false, z0, z1) → c7(ACTIVATE(z1))
DIFF(z0, z1) → c8(IF(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1))), LEQ(z0, z1))
ACTIVATE(n__0) → c12(0')
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
S tuples:
IF(true, z0, z1) → c6(ACTIVATE(z0))
IF(false, z0, z1) → c7(ACTIVATE(z1))
DIFF(z0, z1) → c8(IF(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1))), LEQ(z0, z1))
ACTIVATE(n__0) → c12(0')
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
K tuples:none
Defined Rule Symbols:
p, leq, if, diff, 0, s, activate
Defined Pair Symbols:
IF, DIFF, ACTIVATE
Compound Symbols:
c6, c7, c8, c12, c13, c14, c15
(5) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 2 leading nodes:
IF(true, z0, z1) → c6(ACTIVATE(z0))
IF(false, z0, z1) → c7(ACTIVATE(z1))
Removed 2 trailing nodes:
DIFF(z0, z1) → c8(IF(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1))), LEQ(z0, z1))
ACTIVATE(n__0) → c12(0')
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
p(0) → 0
p(s(z0)) → z0
p(z0) → n__p(z0)
leq(0, z0) → true
leq(s(z0), 0) → false
leq(s(z0), s(z1)) → leq(z0, z1)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
diff(z0, z1) → if(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1)))
diff(z0, z1) → n__diff(z0, z1)
0 → n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(activate(z0))
activate(n__diff(z0, z1)) → diff(activate(z0), activate(z1))
activate(n__p(z0)) → p(activate(z0))
activate(z0) → z0
Tuples:
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
S tuples:
ACTIVATE(n__s(z0)) → c13(S(activate(z0)), ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(DIFF(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(P(activate(z0)), ACTIVATE(z0))
K tuples:none
Defined Rule Symbols:
p, leq, if, diff, 0, s, activate
Defined Pair Symbols:
ACTIVATE
Compound Symbols:
c13, c14, c15
(7) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
p(0) → 0
p(s(z0)) → z0
p(z0) → n__p(z0)
leq(0, z0) → true
leq(s(z0), 0) → false
leq(s(z0), s(z1)) → leq(z0, z1)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
diff(z0, z1) → if(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1)))
diff(z0, z1) → n__diff(z0, z1)
0 → n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(activate(z0))
activate(n__diff(z0, z1)) → diff(activate(z0), activate(z1))
activate(n__p(z0)) → p(activate(z0))
activate(z0) → z0
Tuples:
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
S tuples:
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
K tuples:none
Defined Rule Symbols:
p, leq, if, diff, 0, s, activate
Defined Pair Symbols:
ACTIVATE
Compound Symbols:
c13, c14, c15
(9) 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.
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
We considered the (Usable) Rules:none
And the Tuples:
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ACTIVATE(x1)) = [2] + [4]x1
POL(c13(x1)) = x1
POL(c14(x1, x2)) = x1 + x2
POL(c15(x1)) = x1
POL(n__diff(x1, x2)) = [5] + x1 + x2
POL(n__p(x1)) = [4] + x1
POL(n__s(x1)) = [5] + x1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
p(0) → 0
p(s(z0)) → z0
p(z0) → n__p(z0)
leq(0, z0) → true
leq(s(z0), 0) → false
leq(s(z0), s(z1)) → leq(z0, z1)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
diff(z0, z1) → if(leq(z0, z1), n__0, n__s(n__diff(n__p(z0), z1)))
diff(z0, z1) → n__diff(z0, z1)
0 → n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(activate(z0))
activate(n__diff(z0, z1)) → diff(activate(z0), activate(z1))
activate(n__p(z0)) → p(activate(z0))
activate(z0) → z0
Tuples:
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
S tuples:none
K tuples:
ACTIVATE(n__s(z0)) → c13(ACTIVATE(z0))
ACTIVATE(n__diff(z0, z1)) → c14(ACTIVATE(z0), ACTIVATE(z1))
ACTIVATE(n__p(z0)) → c15(ACTIVATE(z0))
Defined Rule Symbols:
p, leq, if, diff, 0, s, activate
Defined Pair Symbols:
ACTIVATE
Compound Symbols:
c13, c14, c15
(11) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(12) BOUNDS(O(1), O(1))