(0) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(p(0)) → c
ACTIVE(p(s(z0))) → c1
ACTIVE(leq(0, z0)) → c2
ACTIVE(leq(s(z0), 0)) → c3
ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(if(true, z0, z1)) → c5
ACTIVE(if(false, z0, z1)) → c6
ACTIVE(diff(z0, z1)) → c7(IF(leq(z0, z1), 0, s(diff(p(z0), z1))), LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(0) → c28
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c31
PROPER(false) → c32
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
S tuples:

ACTIVE(p(0)) → c
ACTIVE(p(s(z0))) → c1
ACTIVE(leq(0, z0)) → c2
ACTIVE(leq(s(z0), 0)) → c3
ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(if(true, z0, z1)) → c5
ACTIVE(if(false, z0, z1)) → c6
ACTIVE(diff(z0, z1)) → c7(IF(leq(z0, z1), 0, s(diff(p(z0), z1))), LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(0) → c28
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c31
PROPER(false) → c32
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:

active, p, s, leq, if, diff, proper, top

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36

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

Removed 9 trailing nodes:

ACTIVE(p(0)) → c
PROPER(0) → c28
ACTIVE(p(s(z0))) → c1
ACTIVE(if(true, z0, z1)) → c5
PROPER(false) → c32
PROPER(true) → c31
ACTIVE(leq(0, z0)) → c2
ACTIVE(leq(s(z0), 0)) → c3
ACTIVE(if(false, z0, z1)) → c6

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c7(IF(leq(z0, z1), 0, s(diff(p(z0), z1))), LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c7(IF(leq(z0, z1), 0, s(diff(p(z0), z1))), LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:

active, p, s, leq, if, diff, proper, top

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36

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

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c7(LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c7(LEQ(z0, z1), S(diff(p(z0), z1)), DIFF(p(z0), z1), P(z0))
K tuples:none
Defined Rule Symbols:

active, p, s, leq, if, diff, proper, top

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c7

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

Split RHS of tuples not part of any SCC

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
K tuples:none
Defined Rule Symbols:

active, p, s, leq, if, diff, proper, top

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c

(9) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c

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

Use narrowing to replace ACTIVE(p(z0)) → c8(P(active(z0)), ACTIVE(z0)) by

ACTIVE(p(p(0))) → c8(P(mark(0)), ACTIVE(p(0)))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(0))) → c8(P(mark(0)), ACTIVE(p(0)))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(0))) → c8(P(mark(0)), ACTIVE(p(0)))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8

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

Removed 1 trailing tuple parts

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8, c8

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

Use narrowing to replace ACTIVE(s(z0)) → c9(S(active(z0)), ACTIVE(z0)) by

ACTIVE(s(p(0))) → c9(S(mark(0)), ACTIVE(p(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(0))) → c9(S(mark(0)), ACTIVE(p(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(0))) → c9(S(mark(0)), ACTIVE(p(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8, c8, c9

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

Removed 1 trailing tuple parts

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8, c8, c9, c9

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

Use narrowing to replace ACTIVE(if(z0, z1, z2)) → c12(IF(active(z0), z1, z2), ACTIVE(z0)) by

ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2), ACTIVE(p(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2), ACTIVE(p(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2), ACTIVE(p(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12

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

Removed 7 trailing tuple parts

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c29, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12, c12

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

Use narrowing to replace PROPER(p(z0)) → c27(P(proper(z0)), PROPER(z0)) by

PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(0)) → c27(P(ok(0)), PROPER(0))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(true)) → c27(P(ok(true)), PROPER(true))
PROPER(p(false)) → c27(P(ok(false)), PROPER(false))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(0)) → c27(P(ok(0)), PROPER(0))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(true)) → c27(P(ok(true)), PROPER(true))
PROPER(p(false)) → c27(P(ok(false)), PROPER(false))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(0)) → c27(P(ok(0)), PROPER(0))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(true)) → c27(P(ok(true)), PROPER(true))
PROPER(p(false)) → c27(P(ok(false)), PROPER(false))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c29, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12, c12, c27

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

Removed 3 trailing tuple parts

(26) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c29, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12, c12, c27, c27

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

Use narrowing to replace PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0)) by

PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))

(28) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12, c12, c27, c27, c29

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

Removed 3 trailing tuple parts

(30) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
K tuples:none
Defined Rule Symbols:

active, s, diff, p, leq, if, proper

Defined Pair Symbols:

ACTIVE, P, S, LEQ, IF, DIFF, PROPER, TOP

Compound Symbols:

c4, c10, c11, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c30, c33, c34, c35, c36, c, c8, c8, c9, c9, c12, c12, c27, c27, c29, c29

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

Use narrowing to replace PROPER(leq(z0, z1)) → c30(LEQ(proper(z0), proper(z1)), PROPER(z0), PROPER(z1)) by

PROPER(leq(x0, p(z0))) → c30(LEQ(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(leq(x0, 0)) → c30(LEQ(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(leq(x0, s(z0))) → c30(LEQ(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(leq(x0, leq(z0, z1))) → c30(LEQ(proper(x0), leq(proper(z0), proper(z1))), PROPER(x0), PROPER(leq(z0, z1)))
PROPER(leq(x0, true)) → c30(LEQ(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(leq(x0, false)) → c30(LEQ(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(leq(x0, if(z0, z1, z2))) → c30(LEQ(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(leq(x0, diff(z0, z1))) → c30(LEQ(proper(x0), diff(proper(z0), proper(z1))), PROPER(x0), PROPER(diff(z0, z1)))
PROPER(leq(p(z0), x1)) → c30(LEQ(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(leq(0, x1)) → c30(LEQ(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(leq(s(z0), x1)) → c30(LEQ(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(leq(leq(z0, z1), x1)) → c30(LEQ(leq(proper(z0), proper(z1)), proper(x1)), PROPER(leq(z0, z1)), PROPER(x1))
PROPER(leq(true, x1)) → c30(LEQ(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(leq(false, x1)) → c30(LEQ(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(leq(if(z0, z1, z2), x1)) → c30(LEQ(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(leq(diff(z0, z1), x1)) → c30(LEQ(diff(proper(z0), proper(z1)), proper(x1)), PROPER(diff(z0, z1)), PROPER(x1))

(32) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(p(0)) → mark(0)
active(p(s(z0))) → mark(z0)
active(leq(0, z0)) → mark(true)
active(leq(s(z0), 0)) → mark(false)
active(leq(s(z0), s(z1))) → mark(leq(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(diff(z0, z1)) → mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))
active(p(z0)) → p(active(z0))
active(s(z0)) → s(active(z0))
active(leq(z0, z1)) → leq(active(z0), z1)
active(leq(z0, z1)) → leq(z0, active(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(diff(z0, z1)) → diff(active(z0), z1)
active(diff(z0, z1)) → diff(z0, active(z1))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
diff(mark(z0), z1) → mark(diff(z0, z1))
diff(ok(z0), ok(z1)) → ok(diff(z0, z1))
diff(z0, mark(z1)) → mark(diff(z0, z1))
p(ok(z0)) → ok(p(z0))
p(mark(z0)) → mark(p(z0))
leq(mark(z0), z1) → mark(leq(z0, z1))
leq(ok(z0), ok(z1)) → ok(leq(z0, z1))
leq(z0, mark(z1)) → mark(leq(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(p(z0)) → p(proper(z0))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(leq(z0, z1)) → leq(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(diff(z0, z1)) → diff(proper(z0), proper(z1))
Tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p(true)) → c27(P(ok(true)))
PROPER(p(false)) → c27(P(ok(false)))
PROPER(s(p(z0))) → c29(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(leq(z0, z1))) → c29(S(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(diff(z0, z1))) → c29(S(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(leq(x0, p(z0))) → c30(LEQ(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(leq(x0, 0)) → c30(LEQ(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(leq(x0, s(z0))) → c30(LEQ(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(leq(x0, leq(z0, z1))) → c30(LEQ(proper(x0), leq(proper(z0), proper(z1))), PROPER(x0), PROPER(leq(z0, z1)))
PROPER(leq(x0, true)) → c30(LEQ(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(leq(x0, false)) → c30(LEQ(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(leq(x0, if(z0, z1, z2))) → c30(LEQ(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(leq(x0, diff(z0, z1))) → c30(LEQ(proper(x0), diff(proper(z0), proper(z1))), PROPER(x0), PROPER(diff(z0, z1)))
PROPER(leq(p(z0), x1)) → c30(LEQ(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(leq(0, x1)) → c30(LEQ(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(leq(s(z0), x1)) → c30(LEQ(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(leq(leq(z0, z1), x1)) → c30(LEQ(leq(proper(z0), proper(z1)), proper(x1)), PROPER(leq(z0, z1)), PROPER(x1))
PROPER(leq(true, x1)) → c30(LEQ(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(leq(false, x1)) → c30(LEQ(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(leq(if(z0, z1, z2), x1)) → c30(LEQ(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(leq(diff(z0, z1), x1)) → c30(LEQ(diff(proper(z0), proper(z1)), proper(x1)), PROPER(diff(z0, z1)), PROPER(x1))
S tuples:

ACTIVE(leq(s(z0), s(z1))) → c4(LEQ(z0, z1))
ACTIVE(leq(z0, z1)) → c10(LEQ(active(z0), z1), ACTIVE(z0))
ACTIVE(leq(z0, z1)) → c11(LEQ(z0, active(z1)), ACTIVE(z1))
ACTIVE(diff(z0, z1)) → c13(DIFF(active(z0), z1), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c14(DIFF(z0, active(z1)), ACTIVE(z1))
P(mark(z0)) → c15(P(z0))
P(ok(z0)) → c16(P(z0))
S(mark(z0)) → c17(S(z0))
S(ok(z0)) → c18(S(z0))
LEQ(mark(z0), z1) → c19(LEQ(z0, z1))
LEQ(z0, mark(z1)) → c20(LEQ(z0, z1))
LEQ(ok(z0), ok(z1)) → c21(LEQ(z0, z1))
IF(mark(z0), z1, z2) → c22(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c23(IF(z0, z1, z2))
DIFF(mark(z0), z1) → c24(DIFF(z0, z1))
DIFF(z0, mark(z1)) → c25(DIFF(z0, z1))
DIFF(ok(z0), ok(z1)) → c26(DIFF(z0, z1))
PROPER(if(z0, z1, z2)) → c33(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(diff(z0, z1)) → c34(DIFF(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c35(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c36(TOP(active(z0)), ACTIVE(z0))
ACTIVE(diff(z0, z1)) → c(LEQ(z0, z1))
ACTIVE(diff(z0, z1)) → c(S(diff(p(z0), z1)))
ACTIVE(diff(z0, z1)) → c(DIFF(p(z0), z1))
ACTIVE(diff(z0, z1)) → c(P(z0))
ACTIVE(p(p(s(z0)))) → c8(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(leq(0, z0))) → c8(P(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(p(leq(s(z0), 0))) → c8(P(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(p(leq(s(z0), s(z1)))) → c8(P(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(p(diff(z0, z1))) → c8(P(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(z0))) → c8(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(s(z0))) → c8(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(p(leq(z0, z1))) → c8(P(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(p(if(z0, z1, z2))) → c8(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(p(diff(z0, z1))) → c8(P(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(p(p(0))) → c8(P(mark(0)))
ACTIVE(s(p(s(z0)))) → c9(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(leq(0, z0))) → c9(S(mark(true)), ACTIVE(leq(0, z0)))
ACTIVE(s(leq(s(z0), 0))) → c9(S(mark(false)), ACTIVE(leq(s(z0), 0)))
ACTIVE(s(leq(s(z0), s(z1)))) → c9(S(mark(leq(z0, z1))), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(s(diff(z0, z1))) → c9(S(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1))))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(z0))) → c9(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(s(z0))) → c9(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(active(z0), z1)), ACTIVE(leq(z0, z1)))
ACTIVE(s(leq(z0, z1))) → c9(S(leq(z0, active(z1))), ACTIVE(leq(z0, z1)))
ACTIVE(s(if(z0, z1, z2))) → c9(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(active(z0), z1)), ACTIVE(diff(z0, z1)))
ACTIVE(s(diff(z0, z1))) → c9(S(diff(z0, active(z1))), ACTIVE(diff(z0, z1)))
ACTIVE(s(p(0))) → c9(S(mark(0)))
ACTIVE(if(p(s(z0)), x1, x2)) → c12(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(leq(0, z0), x1, x2)) → c12(IF(mark(true), x1, x2), ACTIVE(leq(0, z0)))
ACTIVE(if(leq(s(z0), 0), x1, x2)) → c12(IF(mark(false), x1, x2), ACTIVE(leq(s(z0), 0)))
ACTIVE(if(leq(s(z0), s(z1)), x1, x2)) → c12(IF(mark(leq(z0, z1)), x1, x2), ACTIVE(leq(s(z0), s(z1))))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(mark(if(leq(z0, z1), 0, s(diff(p(z0), z1)))), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c12(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(s(z0), x1, x2)) → c12(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(active(z0), z1), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(leq(z0, z1), x1, x2)) → c12(IF(leq(z0, active(z1)), x1, x2), ACTIVE(leq(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c12(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(active(z0), z1), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(if(diff(z0, z1), x1, x2)) → c12(IF(diff(z0, active(z1)), x1, x2), ACTIVE(diff(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c8(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c8(P(mark(z1)))
ACTIVE(s(if(true, z0, z1))) → c9(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c9(S(mark(z1)))
ACTIVE(if(p(0), x1, x2)) → c12(IF(mark(0), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c12(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c12(IF(mark(z1), x1, x2))
PROPER(p(p(z0))) → c27(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(s(z0))) → c27(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(leq(z0, z1))) → c27(P(leq(proper(z0), proper(z1))), PROPER(leq(z0, z1)))
PROPER(p(if(z0, z1, z2))) → c27(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(diff(z0, z1))) → c27(P(diff(proper(z0), proper(z1))), PROPER(diff(z0, z1)))
PROPER(p(0)) → c27(P(ok(0)))
PROPER(p