(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
add0(S(x), x2) → +(S(0), add0(x2, x))
add0(0, x2) → x2
The (relative) TRS S consists of the following rules:
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (UPPER BOUND(ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
Tuples:
+'(z0, S(0)) → c
+'(S(0), z0) → c1
ADD0(S(z0), z1) → c2(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
ADD0(0, z0) → c3
S tuples:
ADD0(S(z0), z1) → c2(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
ADD0(0, z0) → c3
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
+', ADD0
Compound Symbols:
c, c1, c2, c3
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing nodes:
ADD0(0, z0) → c3
+'(z0, S(0)) → c
+'(S(0), z0) → c1
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
Tuples:
ADD0(S(z0), z1) → c2(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c2(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
ADD0
Compound Symbols:
c2
(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing tuple parts
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
Tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
ADD0
Compound Symbols:
c2
(7) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
ADD0
Compound Symbols:
c2
(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.
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
We considered the (Usable) Rules:none
And the Tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD0(x1, x2)) = [2]x1 + [2]x2
POL(S(x1)) = [1] + x1
POL(c2(x1)) = x1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
S tuples:none
K tuples:
ADD0(S(z0), z1) → c2(ADD0(z1, z0))
Defined Rule Symbols:none
Defined Pair Symbols:
ADD0
Compound Symbols:
c2
(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(12) BOUNDS(1, 1)