### (0) Obligation:

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

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
ifrm(true, N, add(M, X)) → rm(N, X)
purge(nil) → nil

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

### (2) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
purge(nil) → nil
Tuples:

EQ(0, 0) → c
EQ(0, s(z0)) → c1
EQ(s(z0), 0) → c2
EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, nil) → c4
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(nil) → c8
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(0, 0) → c
EQ(0, s(z0)) → c1
EQ(s(z0), 0) → c2
EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, nil) → c4
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(nil) → c8
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
K tuples:none
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9

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

Removed 5 trailing nodes:

EQ(0, 0) → c
EQ(0, s(z0)) → c1
EQ(s(z0), 0) → c2
RM(z0, nil) → c4
PURGE(nil) → c8

### (4) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
purge(nil) → nil
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
K tuples:none
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

purge(nil) → nil

### (6) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
K tuples:none
Defined Rule Symbols:

eq, rm, ifrm

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (7) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
We considered the (Usable) Rules:

rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(EQ(x1, x2)) = 0
POL(IFRM(x1, x2, x3)) = 0
POL(PURGE(x1)) = x1
POL(RM(x1, x2)) = 0
POL(add(x1, x2)) = [4] + x2
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c7(x1)) = x1
POL(c9(x1, x2)) = x1 + x2
POL(eq(x1, x2)) = 0
POL(false) = 0
POL(ifrm(x1, x2, x3)) = x3
POL(nil) = [5]
POL(rm(x1, x2)) = x2
POL(s(x1)) = [5]
POL(true) = 0

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
Defined Rule Symbols:

eq, rm, ifrm

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (9) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
We considered the (Usable) Rules:

rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(EQ(x1, x2)) = 0
POL(IFRM(x1, x2, x3)) = [2]x3
POL(PURGE(x1)) = x12
POL(RM(x1, x2)) = [2]x2
POL(add(x1, x2)) = [2] + x2
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c7(x1)) = x1
POL(c9(x1, x2)) = x1 + x2
POL(eq(x1, x2)) = 0
POL(false) = 0
POL(ifrm(x1, x2, x3)) = [1] + x3
POL(nil) = 0
POL(rm(x1, x2)) = [1] + x2
POL(s(x1)) = 0
POL(true) = 0

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
Defined Rule Symbols:

eq, rm, ifrm

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

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

IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))

### (12) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
Defined Rule Symbols:

eq, rm, ifrm

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (13) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
We considered the (Usable) Rules:

rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(EQ(x1, x2)) = x1
POL(IFRM(x1, x2, x3)) = [2]x2·x3
POL(PURGE(x1)) = [2]x12
POL(RM(x1, x2)) = x1 + [2]x1·x2
POL(add(x1, x2)) = [2] + x1 + x2
POL(c3(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c7(x1)) = x1
POL(c9(x1, x2)) = x1 + x2
POL(eq(x1, x2)) = 0
POL(false) = 0
POL(ifrm(x1, x2, x3)) = x3
POL(nil) = 0
POL(rm(x1, x2)) = x2
POL(s(x1)) = [2] + x1
POL(true) = 0

### (14) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:none
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
Defined Rule Symbols:

eq, rm, ifrm

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

### (15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty