(0) Obligation:

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

cond(true, x, y) → cond(gr(x, y), p(x), y)
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 CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, z0, z1) → c(COND(gr(z0, z1), p(z0), z1), GR(z0, z1), P(z0))
GR(s(z0), s(z1)) → c3(GR(z0, z1))
S tuples:

COND(true, z0, z1) → c(COND(gr(z0, z1), p(z0), z1), GR(z0, z1), P(z0))
GR(s(z0), s(z1)) → c3(GR(z0, z1))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c3

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

Removed 1 trailing tuple parts

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, z0, z1) → c(COND(gr(z0, z1), p(z0), z1), GR(z0, z1))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, z0, z1) → c(COND(gr(z0, z1), p(z0), z1), GR(z0, z1))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c

(5) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND(true, z0, z1) → c(COND(gr(z0, z1), p(z0), z1), GR(z0, z1)) by

COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1), GR(0, x1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, 0, z0) → c(COND(false, p(0), z0), GR(0, z0))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, x0, x1) → c

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1), GR(0, x1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, 0, z0) → c(COND(false, p(0), z0), GR(0, z0))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, x0, x1) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1), GR(0, x1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, 0, z0) → c(COND(false, p(0), z0), GR(0, z0))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, x0, x1) → c
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

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

Removed 2 trailing nodes:

COND(true, 0, z0) → c(COND(false, p(0), z0), GR(0, z0))
COND(true, x0, x1) → c

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1), GR(0, x1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1), GR(0, x1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c

(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
We considered the (Usable) Rules:

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

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COND(x1, x2, x3)) = x2   
POL(GR(x1, x2)) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [2]   
POL(gr(x1, x2)) = [5] + [2]x2   
POL(p(x1)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = [3]   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
K tuples:

COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

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

Use narrowing to replace COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1)) by

COND(true, s(z0), 0) → c(COND(true, z0, 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(x0), x1) → c

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), 0) → c(COND(true, z0, 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(x0), x1) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
K tuples:

COND(true, s(z0), x1) → c(COND(gr(s(z0), x1), z0, x1), GR(s(z0), x1))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

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

Removed 1 trailing nodes:

COND(true, s(x0), x1) → c

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), 0) → c(COND(true, z0, 0), GR(s(z0), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(17) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

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

Use narrowing to replace COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), p(s(z0)), s(z1)), GR(s(z0), s(z1))) by

COND(true, s(z0), s(x1)) → c(COND(gr(z0, x1), z0, s(x1)), GR(s(z0), s(x1)))
COND(true, s(0), s(z0)) → c(COND(false, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(x0), s(x1)) → c

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(0), s(z0)) → c(COND(false, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(x0), s(x1)) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(x1)) → c(COND(gr(z0, x1), z0, s(x1)), GR(s(z0), s(x1)))
COND(true, s(0), s(z0)) → c(COND(false, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(x0), s(x1)) → c
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

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

Removed 1 trailing nodes:

COND(true, s(x0), s(x1)) → c

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(0), s(z0)) → c(COND(false, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(x1)) → c(COND(gr(z0, x1), z0, s(x1)), GR(s(z0), s(x1)))
COND(true, s(0), s(z0)) → c(COND(false, p(s(0)), s(z0)), GR(s(0), s(z0)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

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

Removed 1 trailing tuple parts

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(x1)) → c(COND(gr(z0, x1), z0, s(x1)), GR(s(z0), s(x1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
K tuples:none
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(25) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
We considered the (Usable) Rules:

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

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(COND(x1, x2, x3)) = [4] + [3]x3   
POL(GR(x1, x2)) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [5]   
POL(gr(x1, x2)) = 0   
POL(p(x1)) = [3]   
POL(s(x1)) = [2]   
POL(true) = 0   

(26) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(x1)) → c(COND(gr(z0, x1), z0, s(x1)), GR(s(z0), s(x1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(27) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
We considered the (Usable) Rules:

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

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COND(x1, x2, x3)) = [1] + [2]x2   
POL(GR(x1, x2)) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [3]   
POL(gr(x1, x2)) = 0   
POL(p(x1)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(28) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(29) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace COND(true, 0, x1) → c(COND(gr(0, x1), 0, x1)) by

COND(true, 0, z0) → c(COND(false, 0, z0))
COND(true, 0, x0) → c

(30) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, 0, z0) → c(COND(false, 0, z0))
COND(true, 0, x0) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, 0, z0) → c(COND(false, 0, z0))
COND(true, 0, x0) → c
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

(31) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(32) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, 0, x0) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, 0, x0) → c
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

(33) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, 0, x0) → c
We considered the (Usable) Rules:

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

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, 0, x0) → c
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COND(x1, x2, x3)) = [4] + [4]x3   
POL(GR(x1, x2)) = 0   
POL(c) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [3]   
POL(gr(x1, x2)) = [3] + [5]x1 + [3]x2   
POL(p(x1)) = [4] + [4]x1   
POL(s(x1)) = [4] + x1   
POL(true) = [4]   

(34) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, 0, x0) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x0) → c
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

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

Use narrowing to replace COND(true, s(z0), 0) → c(COND(true, p(s(z0)), 0)) by

COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(x0), 0) → c

(36) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, 0, x0) → c
COND(true, s(x0), 0) → c
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(x0), 0) → c
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, 0, x0) → c
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c, c

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

Removed 2 trailing nodes:

COND(true, 0, z0) → c
COND(true, s(x0), 0) → c

(38) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(39) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(z0), 0) → c(COND(true, z0, 0))
We considered the (Usable) Rules:

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

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]   
POL(COND(x1, x2, x3)) = [1] + [4]x2 + [5]x3   
POL(GR(x1, x2)) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [2]   
POL(gr(x1, x2)) = 0   
POL(p(x1)) = x1   
POL(s(x1)) = [4] + x1   
POL(true) = 0   

(40) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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)) → c3(GR(z0, z1))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
S tuples:

GR(s(z0), s(z1)) → c3(GR(z0, z1))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

GR, COND

Compound Symbols:

c3, c, c

(41) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID) transformation)

Use forward instantiation to replace GR(s(z0), s(z1)) → c3(GR(z0, z1)) by

GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))

(42) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
S tuples:

COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
K tuples:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))
COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

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

Removed 1 trailing nodes:

COND(true, s(0), s(z0)) → c(GR(s(0), s(z0)))

(44) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
S tuples:

COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)), GR(s(s(z0)), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(45) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(46) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
S tuples:

COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(47) CdtRewritingProof (BOTH BOUNDS(ID, ID) transformation)

Used rewriting to replace COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), p(s(s(z0))), s(s(z1))), GR(s(s(z0)), s(s(z1)))) by COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))

(48) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(49) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
We considered the (Usable) Rules:

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

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), 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) = [5]   
POL(COND(x1, x2, x3)) = x2   
POL(GR(x1, x2)) = [1]   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = 0   
POL(gr(x1, x2)) = [3]x1 + [3]x2   
POL(p(x1)) = x1   
POL(s(x1)) = [4] + x1   
POL(true) = 0   

(50) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

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

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

GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
We considered the (Usable) Rules:

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

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), 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(COND(x1, x2, x3)) = [2]x2·x3   
POL(GR(x1, x2)) = x2   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = 0   
POL(gr(x1, x2)) = 0   
POL(p(x1)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(52) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
S tuples:

COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0)))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(53) CdtRewritingProof (BOTH BOUNDS(ID, ID) transformation)

Used rewriting to replace COND(true, s(s(z0)), s(0)) → c(COND(true, p(s(s(z0))), s(0))) by COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))

(54) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
S tuples:

COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(55) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
We considered the (Usable) Rules:

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

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [5]   
POL(COND(x1, x2, x3)) = x2   
POL(GR(x1, x2)) = 0   
POL(c(x1)) = x1   
POL(c(x1, x2)) = x1 + x2   
POL(c3(x1)) = x1   
POL(false) = [3]   
POL(gr(x1, x2)) = [4] + [4]x1 + [5]x2   
POL(s(x1)) = [1] + x1   
POL(true) = [4]   

(56) Obligation:

Complexity Dependency Tuples Problem
Rules:

cond(true, z0, z1) → cond(gr(z0, z1), p(z0), z1)
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:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
S tuples:none
K tuples:

COND(true, s(z0), s(z1)) → c(COND(gr(z0, z1), z0, s(z1)), GR(s(z0), s(z1)))
COND(true, s(z0), 0) → c(COND(true, z0, 0))
COND(true, s(s(z0)), s(s(z1))) → c(COND(gr(z0, z1), s(z0), s(s(z1))), GR(s(s(z0)), s(s(z1))))
GR(s(s(y0)), s(s(y1))) → c3(GR(s(y0), s(y1)))
COND(true, s(s(z0)), s(0)) → c(COND(true, s(z0), s(0)))
Defined Rule Symbols:

cond, gr, p

Defined Pair Symbols:

COND, GR

Compound Symbols:

c, c, c3

(57) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(58) BOUNDS(O(1), O(1))