### (0) Obligation:

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

cond1(true, x, y, z) → cond2(gr(y, z), x, y, z)
cond2(true, x, y, z) → cond2(gr(y, z), x, p(y), z)
cond2(false, x, y, z) → cond1(gr(x, z), p(x), y, z)
gr(0, x) → false
gr(s(x), 0) → true
gr(s(x), s(y)) → gr(x, y)
p(0) → 0
p(s(x)) → x

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

### (2) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond1(true, z0, z1, z2) → cond2(gr(z1, z2), z0, z1, z2)
cond2(true, z0, z1, z2) → cond2(gr(z1, z2), z0, p(z1), z2)
cond2(false, z0, z1, z2) → cond1(gr(z0, z2), p(z0), z1, z2)
gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2), P(z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2), P(z0))
GR(0, z0) → c3
GR(s(z0), 0) → c4
GR(s(z0), s(z1)) → c5(GR(z0, z1))
P(0) → c6
P(s(z0)) → c7
S tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2), P(z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2), P(z0))
GR(0, z0) → c3
GR(s(z0), 0) → c4
GR(s(z0), s(z1)) → c5(GR(z0, z1))
P(0) → c6
P(s(z0)) → c7
K tuples:none
Defined Rule Symbols:

cond1, cond2, gr, p

Defined Pair Symbols:

COND1, COND2, GR, P

Compound Symbols:

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

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

Removed 4 trailing nodes:

GR(0, z0) → c3
GR(s(z0), 0) → c4
P(0) → c6
P(s(z0)) → c7

### (4) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond1(true, z0, z1, z2) → cond2(gr(z1, z2), z0, z1, z2)
cond2(true, z0, z1, z2) → cond2(gr(z1, z2), z0, p(z1), z2)
cond2(false, z0, z1, z2) → cond1(gr(z0, z2), p(z0), z1, z2)
gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2), P(z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2), P(z0))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
S tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2), P(z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2), P(z0))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
K tuples:none
Defined Rule Symbols:

cond1, cond2, gr, p

Defined Pair Symbols:

COND1, COND2, GR

Compound Symbols:

c, c1, c2, c5

### (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

### (6) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond1(true, z0, z1, z2) → cond2(gr(z1, z2), z0, z1, z2)
cond2(true, z0, z1, z2) → cond2(gr(z1, z2), z0, p(z1), z2)
cond2(false, z0, z1, z2) → cond1(gr(z0, z2), p(z0), z1, z2)
gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
S tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
K tuples:none
Defined Rule Symbols:

cond1, cond2, gr, p

Defined Pair Symbols:

COND1, GR, COND2

Compound Symbols:

c, c5, c1, c2

### (7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

cond1(true, z0, z1, z2) → cond2(gr(z1, z2), z0, z1, z2)
cond2(true, z0, z1, z2) → cond2(gr(z1, z2), z0, p(z1), z2)
cond2(false, z0, z1, z2) → cond1(gr(z0, z2), p(z0), z1, z2)

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
S tuples:

COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2))
GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
K tuples:none
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

COND1, GR, COND2

Compound Symbols:

c, c5, c1, c2

### (9) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND1(true, z0, z1, z2) → c(COND2(gr(z1, z2), z0, z1, z2), GR(z1, z2)) by

COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0), GR(0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0), GR(s(z0), 0))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0), GR(0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0), GR(s(z0), 0))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0), GR(0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0), GR(s(z0), 0))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND2, COND1

Compound Symbols:

c5, c1, c2, c

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

Removed 2 trailing tuple parts

### (12) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
K tuples:none
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND2, COND1

Compound Symbols:

c5, c1, c2, c, c

### (13) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, z0, z1, z2) → c1(COND2(gr(z1, z2), z0, p(z1), z2), GR(z1, z2)) by

COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2), GR(0, x2))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0), GR(0, z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0), GR(s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))

### (14) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2), GR(0, x2))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0), GR(0, z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0), GR(s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2), GR(0, x2))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0), GR(0, z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0), GR(s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND2, COND1

Compound Symbols:

c5, c2, c, c, c1

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

Removed 3 trailing tuple parts

### (16) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
K tuples:none
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND2, COND1

Compound Symbols:

c5, c2, c, c, c1, c1

### (17) 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.

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
We considered the (Usable) Rules:

p(s(z0)) → z0
p(0) → 0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = x3
POL(COND2(x1, x2, x3, x4)) = x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0

### (18) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND2, COND1

Compound Symbols:

c5, c2, c, c, c1, c1

### (19) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(false, z0, z1, z2) → c2(COND1(gr(z0, z2), p(z0), z1, z2), GR(z0, z2)) by

COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2), GR(0, x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, 0, x1, z0) → c2(COND1(false, p(0), x1, z0), GR(0, z0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))

### (20) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2), GR(0, x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, 0, x1, z0) → c2(COND1(false, p(0), x1, z0), GR(0, z0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2), GR(0, x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, 0, x1, z0) → c2(COND1(false, p(0), x1, z0), GR(0, z0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2

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

Removed 1 trailing nodes:

COND2(false, 0, x1, z0) → c2(COND1(false, p(0), x1, z0), GR(0, z0))

### (22) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2), GR(0, x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2), GR(0, x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2

### (23) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

### (24) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (25) 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.

COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
We considered the (Usable) Rules:

p(s(z0)) → z0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = [4]x2
POL(COND2(x1, x2, x3, x4)) = [4]x2
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [2] + x1
POL(true) = 0

### (26) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1)))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (27) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND1(true, x0, s(z0), s(z1)) → c(COND2(gr(z0, z1), x0, s(z0), s(z1)), GR(s(z0), s(z1))) by

COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))

### (28) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c1, c2, c2, c

### (29) 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.

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
We considered the (Usable) Rules:none
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = [4]x4
POL(COND2(x1, x2, x3, x4)) = [4]x4
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = [4]
POL(gr(x1, x2)) = 0
POL(p(x1)) = [2] + [2]x1
POL(s(x1)) = [2]
POL(true) = 0

### (30) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c1, c2, c2, c

### (31) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2)) by

COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0), GR(s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))

### (32) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0), GR(s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c1, c2, c2, c

### (33) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

### (34) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c1, c2, c2, c

### (35) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, p(s(z0)), s(z1)), GR(s(z0), s(z1))) by

COND2(true, x0, s(z0), s(x2)) → c1(COND2(gr(z0, x2), x0, z0, s(x2)), GR(s(z0), s(x2)))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))

### (36) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(z0), s(x2)) → c1(COND2(gr(z0, x2), x0, z0, s(x2)), GR(s(z0), s(x2)))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c2, c2, c, c1

### (37) 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.

COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
We considered the (Usable) Rules:

p(s(z0)) → z0
p(0) → 0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = x3
POL(COND2(x1, x2, x3, x4)) = x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0

### (38) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c2, c2, c, c1

### (39) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, 0, x2) → c1(COND2(gr(0, x2), x0, 0, x2)) by

COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))

### (40) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c2, c2, c, c1

### (41) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, 0, z0) → c1(COND2(false, x0, p(0), z0)) by

COND2(true, x0, 0, x1) → c1(COND2(false, x0, 0, x1))

### (42) Obligation:

Complexity Dependency Tuples Problem
Rules:

gr(0, z0) → false
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
p(0) → 0
p(s(z0)) → z0
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

gr, p

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c2, c2, c, c1

### (43) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

p(0) → 0

### (44) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c1, c2, c2, c, c1

### (45) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, p(s(z0)), 0)) by

COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))

### (46) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c2, c, c1, c1

### (47) 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.

COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
We considered the (Usable) Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = [2]x1 + x3
POL(COND2(x1, x2, x3, x4)) = x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [2] + x1
POL(true) = 0

### (48) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c2, c, c1, c1

### (49) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2)) by

COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))

### (50) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0), GR(s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c2, c, c1, c1

### (51) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

### (52) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c2, c, c1, c1

### (53) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), p(s(z0)), x1, s(z1)), GR(s(z0), s(z1))) by

COND2(false, s(z0), x1, s(x2)) → c2(COND1(gr(z0, x2), z0, x1, s(x2)), GR(s(z0), s(x2)))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(COND1(false, p(s(0)), x1, s(z0)), GR(s(0), s(z0)))

### (54) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(COND1(false, p(s(0)), x1, s(z0)), GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(x2)) → c2(COND1(gr(z0, x2), z0, x1, s(x2)), GR(s(z0), s(x2)))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(COND1(false, p(s(0)), x1, s(z0)), GR(s(0), s(z0)))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c, c1, c1, c2

### (55) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

### (56) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(x2)) → c2(COND1(gr(z0, x2), z0, x1, s(x2)), GR(s(z0), s(x2)))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c, c1, c1, c2

### (57) 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.

COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
We considered the (Usable) Rules:

p(s(z0)) → z0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = x2 + x3
POL(COND2(x1, x2, x3, x4)) = x2 + x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = [5] + [2]x1 + [3]x2
POL(p(x1)) = x1
POL(s(x1)) = [2] + x1
POL(true) = [4]

### (58) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c, c1, c1, c2

### (59) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(false, 0, x1, x2) → c2(COND1(gr(0, x2), 0, x1, x2)) by

COND2(false, 0, x0, z0) → c2(COND1(false, 0, x0, z0))

### (60) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, 0, x0, z0) → c2(COND1(false, 0, x0, z0))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, 0, x0, z0) → c2(COND1(false, 0, x0, z0))
K tuples:

COND2(true, x0, s(z0), x2) → c1(COND2(gr(s(z0), x2), x0, z0, x2), GR(s(z0), x2))
COND2(false, s(z0), x1, x2) → c2(COND1(gr(s(z0), x2), z0, x1, x2), GR(s(z0), x2))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c, c1, c1, c2

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

Removed 1 trailing nodes:

COND2(false, 0, x0, z0) → c2(COND1(false, 0, x0, z0))

### (62) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c2, c, c1, c1, c2

### (63) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(false, s(z0), x1, 0) → c2(COND1(true, p(s(z0)), x1, 0)) by

COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))

### (64) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (65) 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.

COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
We considered the (Usable) Rules:

p(s(z0)) → z0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = x2
POL(COND2(x1, x2, x3, x4)) = x2
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0

### (66) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

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

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

COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))

### (68) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (69) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND1(true, x0, s(s(z0)), s(s(z1))) → c(COND2(gr(z0, z1), x0, s(s(z0)), s(s(z1))), GR(s(s(z0)), s(s(z1)))) by

COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))

### (70) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (71) 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.

COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
We considered the (Usable) Rules:none
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]
POL(COND1(x1, x2, x3, x4)) = [2] + [2]x4
POL(COND2(x1, x2, x3, x4)) = [2] + [2]x4
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = [2]
POL(gr(x1, x2)) = [2]x1 + x2
POL(p(x1)) = [2] + [2]x1
POL(s(x1)) = 0
POL(true) = 0

### (72) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (73) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1))) by

COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))

### (74) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (75) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, p(s(0)), s(z0)), GR(s(0), s(z0))) by

COND2(true, x0, s(0), s(x1)) → c1(COND2(false, x0, 0, s(x1)), GR(s(0), s(x1)))

### (76) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND2(true, x0, s(0), s(x1)) → c1(COND2(false, x0, 0, s(x1)), GR(s(0), s(x1)))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (77) 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.

COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
We considered the (Usable) Rules:

p(s(z0)) → z0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = [4]x3
POL(COND2(x1, x2, x3, x4)) = [4]x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [4] + x1
POL(true) = 0

### (78) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (79) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0))) by

COND2(true, x0, s(s(x1)), s(0)) → c1(COND2(true, x0, s(x1), s(0)), GR(s(s(x1)), s(0)))

### (80) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND2(true, x0, s(s(x1)), s(0)) → c1(COND2(true, x0, s(x1), s(0)), GR(s(s(x1)), s(0)))
K tuples:

COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), s(z1)) → c1(COND2(gr(z0, z1), x0, z0, s(z1)), GR(s(z0), s(z1)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
Defined Rule Symbols:

p, gr

Defined Pair Symbols:

GR, COND1, COND2

Compound Symbols:

c5, c, c, c1, c1, c2, c2

### (81) 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.

COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
We considered the (Usable) Rules:

p(s(z0)) → z0
And the Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(COND1(x1, x2, x3, x4)) = [4]x3
POL(COND2(x1, x2, x3, x4)) = [4]x3
POL(GR(x1, x2)) = 0
POL(c(x1)) = x1
POL(c(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c1(x1, x2)) = x1 + x2
POL(c2(x1)) = x1
POL(c2(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(false) = 0
POL(gr(x1, x2)) = 0
POL(p(x1)) = x1
POL(s(x1)) = [4] + x1
POL(true) = 0

### (82) Obligation:

Complexity Dependency Tuples Problem
Rules:

p(s(z0)) → z0
gr(s(z0), 0) → true
gr(s(z0), s(z1)) → gr(z0, z1)
gr(0, z0) → false
Tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(z0), 0) → c(COND2(true, x0, s(z0), 0))
COND1(true, x0, s(0), s(z0)) → c(COND2(false, x0, s(0), s(z0)), GR(s(0), s(z0)))
COND1(true, x0, s(s(z0)), s(0)) → c(COND2(true, x0, s(s(z0)), s(0)), GR(s(s(z0)), s(0)))
COND1(true, x0, s(x1), s(x2)) → c(GR(s(x1), s(x2)))
COND2(true, x0, s(z0), 0) → c1(COND2(true, x0, z0, 0))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, 0, z0) → c1(COND2(false, x0, 0, z0))
COND2(false, s(z0), x1, s(z1)) → c2(COND1(gr(z0, z1), z0, x1, s(z1)), GR(s(z0), s(z1)))
COND2(false, s(z0), x1, 0) → c2(COND1(true, z0, x1, 0))
COND2(false, s(s(z0)), x1, s(0)) → c2(COND1(true, p(s(s(z0))), x1, s(0)), GR(s(s(z0)), s(0)))
COND2(false, s(s(z0)), x1, s(s(z1))) → c2(COND1(gr(z0, z1), p(s(s(z0))), x1, s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(false, s(0), x1, s(z0)) → c2(GR(s(0), s(z0)))
COND1(true, x0, s(s(s(z0))), s(s(0))) → c(COND2(true, x0, s(s(s(z0))), s(s(0))), GR(s(s(s(z0))), s(s(0))))
COND1(true, x0, s(s(s(z0))), s(s(s(z1)))) → c(COND2(gr(z0, z1), x0, s(s(s(z0))), s(s(s(z1)))), GR(s(s(s(z0))), s(s(s(z1)))))
COND1(true, x0, s(s(0)), s(s(z0))) → c(COND2(false, x0, s(s(0)), s(s(z0))), GR(s(s(0)), s(s(z0))))
COND1(true, x0, s(s(x1)), s(s(x2))) → c(GR(s(s(x1)), s(s(x2))))
COND2(true, x0, s(s(z0)), s(0)) → c1(COND2(true, x0, s(z0), s(0)), GR(s(s(z0)), s(0)))
COND2(true, x0, s(s(z0)), s(s(z1))) → c1(COND2(gr(z0, z1), x0, s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND2(true, x0, s(0), s(z0)) → c1(COND2(false, x0, 0, s(z0)), GR(s(0), s(z0)))
COND2(true, x0, s(x1), s(x2)) → c1(GR(s(x1), s(x2)))
S tuples:

GR(s(z0), s(z1)) → c5(GR(z0, z1))
COND1(true, x0, 0, z0) → c(COND2(false, x0, 0, z0))
COND1(true, x0, s(0), s(z0)) →