(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(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(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:
ACTIVE(fact(z0)) → c(IF(zero(z0), s(0), prod(z0, fact(p(z0)))), ZERO(z0), S(0), PROD(z0, fact(p(z0))), FACT(p(z0)), P(z0))
ACTIVE(add(0, z0)) → c1
ACTIVE(add(s(z0), z1)) → c2(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(prod(0, z0)) → c3
ACTIVE(prod(s(z0), z1)) → c4(ADD(z1, prod(z0, z1)), PROD(z0, z1))
ACTIVE(if(true, z0, z1)) → c5
ACTIVE(if(false, z0, z1)) → c6
ACTIVE(zero(0)) → c7
ACTIVE(zero(s(z0))) → c8
ACTIVE(p(s(z0))) → c9
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(0) → c39
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c43
PROPER(false) → c44
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
S tuples:
ACTIVE(fact(z0)) → c(IF(zero(z0), s(0), prod(z0, fact(p(z0)))), ZERO(z0), S(0), PROD(z0, fact(p(z0))), FACT(p(z0)), P(z0))
ACTIVE(add(0, z0)) → c1
ACTIVE(add(s(z0), z1)) → c2(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(prod(0, z0)) → c3
ACTIVE(prod(s(z0), z1)) → c4(ADD(z1, prod(z0, z1)), PROD(z0, z1))
ACTIVE(if(true, z0, z1)) → c5
ACTIVE(if(false, z0, z1)) → c6
ACTIVE(zero(0)) → c7
ACTIVE(zero(s(z0))) → c8
ACTIVE(p(s(z0))) → c9
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(0) → c39
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c43
PROPER(false) → c44
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper, top
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, 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, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 10 trailing nodes:
PROPER(false) → c44
PROPER(0) → c39
PROPER(true) → c43
ACTIVE(add(0, z0)) → c1
ACTIVE(if(true, z0, z1)) → c5
ACTIVE(prod(0, z0)) → c3
ACTIVE(p(s(z0))) → c9
ACTIVE(if(false, z0, z1)) → c6
ACTIVE(zero(0)) → c7
ACTIVE(zero(s(z0))) → c8
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:
ACTIVE(fact(z0)) → c(IF(zero(z0), s(0), prod(z0, fact(p(z0)))), ZERO(z0), S(0), PROD(z0, fact(p(z0))), FACT(p(z0)), P(z0))
ACTIVE(add(s(z0), z1)) → c2(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(ADD(z1, prod(z0, z1)), PROD(z0, z1))
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
S tuples:
ACTIVE(fact(z0)) → c(IF(zero(z0), s(0), prod(z0, fact(p(z0)))), ZERO(z0), S(0), PROD(z0, fact(p(z0))), FACT(p(z0)), P(z0))
ACTIVE(add(s(z0), z1)) → c2(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(ADD(z1, prod(z0, z1)), PROD(z0, z1))
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper, top
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c, c2, c4, 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, c37, c38, c40, c41, c42, c45, c46
(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 6 trailing tuple parts
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(fact(z0)) → c(ZERO(z0), P(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
S tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(fact(z0)) → c(ZERO(z0), P(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper, top
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c, c2, c4
(7) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)
Split RHS of tuples not part of any SCC
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
S tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper, top
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1
(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(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
S tuples:
ACTIVE(fact(z0)) → c10(FACT(active(z0)), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1
(11) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
ACTIVE(
fact(
z0)) →
c10(
FACT(
active(
z0)),
ACTIVE(
z0)) by
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(if(z0, z1, z2)) → c11(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10
(13) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
ACTIVE(
if(
z0,
z1,
z2)) →
c11(
IF(
active(
z0),
z1,
z2),
ACTIVE(
z0)) by
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11
(15) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing tuple parts
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
S tuples:
ACTIVE(zero(z0)) → c12(ZERO(active(z0)), ACTIVE(z0))
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
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, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11
(17) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
ACTIVE(
zero(
z0)) →
c12(
ZERO(
active(
z0)),
ACTIVE(
z0)) by
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)), ACTIVE(zero(0)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(18) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)), ACTIVE(zero(0)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)), ACTIVE(zero(0)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2), ACTIVE(zero(0)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)), ACTIVE(zero(0)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12
(19) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 5 trailing tuple parts
(20) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
S tuples:
ACTIVE(s(z0)) → c13(S(active(z0)), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12
(21) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
ACTIVE(
s(
z0)) →
c13(
S(
active(
z0)),
ACTIVE(
z0)) by
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)), ACTIVE(zero(0)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(22) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)), ACTIVE(zero(0)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)), ACTIVE(zero(0)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13
(23) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(24) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(p(z0)) → c16(P(active(z0)), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13
(25) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
ACTIVE(
p(
z0)) →
c16(
P(
active(
z0)),
ACTIVE(
z0)) by
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)), ACTIVE(zero(0)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(26) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)), ACTIVE(zero(0)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)), ACTIVE(if(true, z0, z1)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)), ACTIVE(if(false, z0, z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)), ACTIVE(zero(0)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16
(27) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(28) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(fact(z0)) → c35(FACT(proper(z0)), PROPER(z0))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16
(29) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
fact(
z0)) →
c35(
FACT(
proper(
z0)),
PROPER(
z0)) by
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(0)) → c35(FACT(ok(0)), PROPER(0))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(true)) → c35(FACT(ok(true)), PROPER(true))
PROPER(fact(false)) → c35(FACT(ok(false)), PROPER(false))
(30) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(0)) → c35(FACT(ok(0)), PROPER(0))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(true)) → c35(FACT(ok(true)), PROPER(true))
PROPER(fact(false)) → c35(FACT(ok(false)), PROPER(false))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(0)) → c35(FACT(ok(0)), PROPER(0))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(true)) → c35(FACT(ok(true)), PROPER(true))
PROPER(fact(false)) → c35(FACT(ok(false)), PROPER(false))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35
(31) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(32) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(if(z0, z1, z2)) → c36(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c36, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35
(33) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
if(
z0,
z1,
z2)) →
c36(
IF(
proper(
z0),
proper(
z1),
proper(
z2)),
PROPER(
z0),
PROPER(
z1),
PROPER(
z2)) by
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
(34) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36
(35) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 9 trailing tuple parts
(36) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(zero(z0)) → c37(ZERO(proper(z0)), PROPER(z0))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c37, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36
(37) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
zero(
z0)) →
c37(
ZERO(
proper(
z0)),
PROPER(
z0)) by
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(0)) → c37(ZERO(ok(0)), PROPER(0))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(true)) → c37(ZERO(ok(true)), PROPER(true))
PROPER(zero(false)) → c37(ZERO(ok(false)), PROPER(false))
(38) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(0)) → c37(ZERO(ok(0)), PROPER(0))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(true)) → c37(ZERO(ok(true)), PROPER(true))
PROPER(zero(false)) → c37(ZERO(ok(false)), PROPER(false))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(0)) → c37(ZERO(ok(0)), PROPER(0))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(true)) → c37(ZERO(ok(true)), PROPER(true))
PROPER(zero(false)) → c37(ZERO(ok(false)), PROPER(false))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37
(39) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(40) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(s(z0)) → c38(S(proper(z0)), PROPER(z0))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c38, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37
(41) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
s(
z0)) →
c38(
S(
proper(
z0)),
PROPER(
z0)) by
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(0)) → c38(S(ok(0)), PROPER(0))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(true)) → c38(S(ok(true)), PROPER(true))
PROPER(s(false)) → c38(S(ok(false)), PROPER(false))
(42) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(0)) → c38(S(ok(0)), PROPER(0))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(true)) → c38(S(ok(true)), PROPER(true))
PROPER(s(false)) → c38(S(ok(false)), PROPER(false))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(0)) → c38(S(ok(0)), PROPER(0))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(true)) → c38(S(ok(true)), PROPER(true))
PROPER(s(false)) → c38(S(ok(false)), PROPER(false))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38
(43) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(44) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(prod(z0, z1)) → c40(PROD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c40, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38
(45) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
prod(
z0,
z1)) →
c40(
PROD(
proper(
z0),
proper(
z1)),
PROPER(
z0),
PROPER(
z1)) by
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
(46) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40
(47) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 6 trailing tuple parts
(48) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(p(z0)) → c41(P(proper(z0)), PROPER(z0))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c41, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40
(49) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
p(
z0)) →
c41(
P(
proper(
z0)),
PROPER(
z0)) by
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(0)) → c41(P(ok(0)), PROPER(0))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(true)) → c41(P(ok(true)), PROPER(true))
PROPER(p(false)) → c41(P(ok(false)), PROPER(false))
(50) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(0)) → c41(P(ok(0)), PROPER(0))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(true)) → c41(P(ok(true)), PROPER(true))
PROPER(p(false)) → c41(P(ok(false)), PROPER(false))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(0)) → c41(P(ok(0)), PROPER(0))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(true)) → c41(P(ok(true)), PROPER(true))
PROPER(p(false)) → c41(P(ok(false)), PROPER(false))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41
(51) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(52) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROPER(add(z0, z1)) → c42(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c42, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41
(53) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
PROPER(
add(
z0,
z1)) →
c42(
ADD(
proper(
z0),
proper(
z1)),
PROPER(
z0),
PROPER(
z1)) by
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
(54) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, TOP, PROPER
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42
(55) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 6 trailing tuple parts
(56) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(mark(z0)) → c45(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, TOP, PROPER
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c45, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42, c42
(57) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
TOP(
mark(
z0)) →
c45(
TOP(
proper(
z0)),
PROPER(
z0)) by
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(0)) → c45(TOP(ok(0)), PROPER(0))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(true)) → c45(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c45(TOP(ok(false)), PROPER(false))
(58) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(0)) → c45(TOP(ok(0)), PROPER(0))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(true)) → c45(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c45(TOP(ok(false)), PROPER(false))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(0)) → c45(TOP(ok(0)), PROPER(0))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(true)) → c45(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c45(TOP(ok(false)), PROPER(false))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, TOP, PROPER
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42, c42, c45
(59) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(60) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c45(TOP(ok(0)))
TOP(mark(true)) → c45(TOP(ok(true)))
TOP(mark(false)) → c45(TOP(ok(false)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
TOP(ok(z0)) → c46(TOP(active(z0)), ACTIVE(z0))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c45(TOP(ok(0)))
TOP(mark(true)) → c45(TOP(ok(true)))
TOP(mark(false)) → c45(TOP(ok(false)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, TOP, PROPER
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c46, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42, c42, c45, c45
(61) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
TOP(
ok(
z0)) →
c46(
TOP(
active(
z0)),
ACTIVE(
z0)) by
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(0))) → c46(TOP(mark(true)), ACTIVE(zero(0)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(62) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c45(TOP(ok(0)))
TOP(mark(true)) → c45(TOP(ok(true)))
TOP(mark(false)) → c45(TOP(ok(false)))
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(0))) → c46(TOP(mark(true)), ACTIVE(zero(0)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c45(TOP(ok(0)))
TOP(mark(true)) → c45(TOP(ok(true)))
TOP(mark(false)) → c45(TOP(ok(false)))
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(0))) → c46(TOP(mark(true)), ACTIVE(zero(0)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42, c42, c45, c45, c46
(63) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing nodes:
TOP(ok(zero(0))) → c46(TOP(mark(true)), ACTIVE(zero(0)))
TOP(mark(false)) → c45(TOP(ok(false)))
TOP(mark(true)) → c45(TOP(ok(true)))
TOP(mark(0)) → c45(TOP(ok(0)))
(64) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
S tuples:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
ACTIVE, FACT, IF, ZERO, S, PROD, P, ADD, PROPER, TOP
Compound Symbols:
c14, c15, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c2, c4, c1, c10, c11, c10, c11, c12, c12, c13, c13, c16, c16, c35, c35, c36, c36, c37, c37, c38, c38, c40, c40, c41, c41, c42, c42, c45, c46
(65) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
ACTIVE(prod(z0, z1)) → c14(PROD(active(z0), z1), ACTIVE(z0))
ACTIVE(prod(z0, z1)) → c15(PROD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(z0, z1)) → c17(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c18(ADD(z0, active(z1)), ACTIVE(z1))
ACTIVE(add(s(z0), z1)) → c2(ADD(z0, z1))
ACTIVE(prod(s(z0), z1)) → c4(PROD(z0, z1))
ACTIVE(fact(z0)) → c1(ZERO(z0))
ACTIVE(fact(z0)) → c1(P(z0))
ACTIVE(fact(fact(z0))) → c10(FACT(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(fact(add(0, z0))) → c10(FACT(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(fact(add(s(z0), z1))) → c10(FACT(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(fact(prod(0, z0))) → c10(FACT(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(fact(prod(s(z0), z1))) → c10(FACT(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(fact(zero(s(z0)))) → c10(FACT(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(fact(p(s(z0)))) → c10(FACT(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(fact(fact(z0))) → c10(FACT(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(fact(if(z0, z1, z2))) → c10(FACT(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(fact(zero(z0))) → c10(FACT(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(fact(s(z0))) → c10(FACT(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(fact(prod(z0, z1))) → c10(FACT(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(fact(p(z0))) → c10(FACT(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(fact(add(z0, z1))) → c10(FACT(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(mark(if(zero(z0), s(0), prod(z0, fact(p(z0))))), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c11(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(prod(0, z0), x1, x2)) → c11(IF(mark(0), x1, x2), ACTIVE(prod(0, z0)))
ACTIVE(if(prod(s(z0), z1), x1, x2)) → c11(IF(mark(add(z1, prod(z0, z1))), x1, x2), ACTIVE(prod(s(z0), z1)))
ACTIVE(if(zero(s(z0)), x1, x2)) → c11(IF(mark(false), x1, x2), ACTIVE(zero(s(z0))))
ACTIVE(if(p(s(z0)), x1, x2)) → c11(IF(mark(z0), x1, x2), ACTIVE(p(s(z0))))
ACTIVE(if(fact(z0), x1, x2)) → c11(IF(fact(active(z0)), x1, x2), ACTIVE(fact(z0)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c11(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(zero(z0), x1, x2)) → c11(IF(zero(active(z0)), x1, x2), ACTIVE(zero(z0)))
ACTIVE(if(s(z0), x1, x2)) → c11(IF(s(active(z0)), x1, x2), ACTIVE(s(z0)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(active(z0), z1), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(prod(z0, z1), x1, x2)) → c11(IF(prod(z0, active(z1)), x1, x2), ACTIVE(prod(z0, z1)))
ACTIVE(if(p(z0), x1, x2)) → c11(IF(p(active(z0)), x1, x2), ACTIVE(p(z0)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(add(z0, z1), x1, x2)) → c11(IF(add(z0, active(z1)), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(fact(if(true, z0, z1))) → c10(FACT(mark(z0)))
ACTIVE(fact(if(false, z0, z1))) → c10(FACT(mark(z1)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c11(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c11(IF(mark(z1), x1, x2))
ACTIVE(zero(fact(z0))) → c12(ZERO(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(zero(add(0, z0))) → c12(ZERO(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(zero(add(s(z0), z1))) → c12(ZERO(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(zero(prod(0, z0))) → c12(ZERO(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(zero(prod(s(z0), z1))) → c12(ZERO(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(zero(zero(s(z0)))) → c12(ZERO(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(zero(p(s(z0)))) → c12(ZERO(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(zero(fact(z0))) → c12(ZERO(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(zero(if(z0, z1, z2))) → c12(ZERO(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(zero(zero(z0))) → c12(ZERO(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(zero(s(z0))) → c12(ZERO(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(zero(prod(z0, z1))) → c12(ZERO(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(zero(p(z0))) → c12(ZERO(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(zero(add(z0, z1))) → c12(ZERO(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(fact(zero(0))) → c10(FACT(mark(true)))
ACTIVE(if(zero(0), x1, x2)) → c11(IF(mark(true), x1, x2))
ACTIVE(zero(if(true, z0, z1))) → c12(ZERO(mark(z0)))
ACTIVE(zero(if(false, z0, z1))) → c12(ZERO(mark(z1)))
ACTIVE(zero(zero(0))) → c12(ZERO(mark(true)))
ACTIVE(s(fact(z0))) → c13(S(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(s(add(0, z0))) → c13(S(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(s(add(s(z0), z1))) → c13(S(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(s(prod(0, z0))) → c13(S(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(s(prod(s(z0), z1))) → c13(S(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(s(zero(s(z0)))) → c13(S(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(s(p(s(z0)))) → c13(S(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(s(fact(z0))) → c13(S(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(s(if(z0, z1, z2))) → c13(S(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(s(zero(z0))) → c13(S(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(s(s(z0))) → c13(S(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(s(prod(z0, z1))) → c13(S(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(s(p(z0))) → c13(S(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(s(add(z0, z1))) → c13(S(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(s(add(z0, z1))) → c13(S(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(s(if(true, z0, z1))) → c13(S(mark(z0)))
ACTIVE(s(if(false, z0, z1))) → c13(S(mark(z1)))
ACTIVE(s(zero(0))) → c13(S(mark(true)))
ACTIVE(p(fact(z0))) → c16(P(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
ACTIVE(p(add(0, z0))) → c16(P(mark(z0)), ACTIVE(add(0, z0)))
ACTIVE(p(add(s(z0), z1))) → c16(P(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
ACTIVE(p(prod(0, z0))) → c16(P(mark(0)), ACTIVE(prod(0, z0)))
ACTIVE(p(prod(s(z0), z1))) → c16(P(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
ACTIVE(p(zero(s(z0)))) → c16(P(mark(false)), ACTIVE(zero(s(z0))))
ACTIVE(p(p(s(z0)))) → c16(P(mark(z0)), ACTIVE(p(s(z0))))
ACTIVE(p(fact(z0))) → c16(P(fact(active(z0))), ACTIVE(fact(z0)))
ACTIVE(p(if(z0, z1, z2))) → c16(P(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
ACTIVE(p(zero(z0))) → c16(P(zero(active(z0))), ACTIVE(zero(z0)))
ACTIVE(p(s(z0))) → c16(P(s(active(z0))), ACTIVE(s(z0)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
ACTIVE(p(prod(z0, z1))) → c16(P(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
ACTIVE(p(p(z0))) → c16(P(p(active(z0))), ACTIVE(p(z0)))
ACTIVE(p(add(z0, z1))) → c16(P(add(active(z0), z1)), ACTIVE(add(z0, z1)))
ACTIVE(p(add(z0, z1))) → c16(P(add(z0, active(z1))), ACTIVE(add(z0, z1)))
ACTIVE(p(if(true, z0, z1))) → c16(P(mark(z0)))
ACTIVE(p(if(false, z0, z1))) → c16(P(mark(z1)))
ACTIVE(p(zero(0))) → c16(P(mark(true)))
PROPER(fact(fact(z0))) → c35(FACT(fact(proper(z0))), PROPER(fact(z0)))
PROPER(fact(if(z0, z1, z2))) → c35(FACT(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(fact(zero(z0))) → c35(FACT(zero(proper(z0))), PROPER(zero(z0)))
PROPER(fact(s(z0))) → c35(FACT(s(proper(z0))), PROPER(s(z0)))
PROPER(fact(prod(z0, z1))) → c35(FACT(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(fact(p(z0))) → c35(FACT(p(proper(z0))), PROPER(p(z0)))
PROPER(fact(add(z0, z1))) → c35(FACT(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(fact(0)) → c35(FACT(ok(0)))
PROPER(fact(true)) → c35(FACT(ok(true)))
PROPER(fact(false)) → c35(FACT(ok(false)))
PROPER(if(x0, x1, fact(z0))) → c36(IF(proper(x0), proper(x1), fact(proper(z0))), PROPER(x0), PROPER(x1), PROPER(fact(z0)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c36(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, zero(z0))) → c36(IF(proper(x0), proper(x1), zero(proper(z0))), PROPER(x0), PROPER(x1), PROPER(zero(z0)))
PROPER(if(x0, x1, s(z0))) → c36(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, prod(z0, z1))) → c36(IF(proper(x0), proper(x1), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(prod(z0, z1)))
PROPER(if(x0, x1, p(z0))) → c36(IF(proper(x0), proper(x1), p(proper(z0))), PROPER(x0), PROPER(x1), PROPER(p(z0)))
PROPER(if(x0, x1, add(z0, z1))) → c36(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, fact(z0), x2)) → c36(IF(proper(x0), fact(proper(z0)), proper(x2)), PROPER(x0), PROPER(fact(z0)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c36(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, zero(z0), x2)) → c36(IF(proper(x0), zero(proper(z0)), proper(x2)), PROPER(x0), PROPER(zero(z0)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c36(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, prod(z0, z1), x2)) → c36(IF(proper(x0), prod(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(prod(z0, z1)), PROPER(x2))
PROPER(if(x0, p(z0), x2)) → c36(IF(proper(x0), p(proper(z0)), proper(x2)), PROPER(x0), PROPER(p(z0)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c36(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(fact(z0), x1, x2)) → c36(IF(fact(proper(z0)), proper(x1), proper(x2)), PROPER(fact(z0)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c36(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(zero(z0), x1, x2)) → c36(IF(zero(proper(z0)), proper(x1), proper(x2)), PROPER(zero(z0)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c36(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(prod(z0, z1), x1, x2)) → c36(IF(prod(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(prod(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(p(z0), x1, x2)) → c36(IF(p(proper(z0)), proper(x1), proper(x2)), PROPER(p(z0)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c36(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, 0)) → c36(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, true)) → c36(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c36(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, 0, x2)) → c36(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, true, x2)) → c36(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c36(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(0, x1, x2)) → c36(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c36(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c36(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(zero(fact(z0))) → c37(ZERO(fact(proper(z0))), PROPER(fact(z0)))
PROPER(zero(if(z0, z1, z2))) → c37(ZERO(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(zero(zero(z0))) → c37(ZERO(zero(proper(z0))), PROPER(zero(z0)))
PROPER(zero(s(z0))) → c37(ZERO(s(proper(z0))), PROPER(s(z0)))
PROPER(zero(prod(z0, z1))) → c37(ZERO(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(zero(p(z0))) → c37(ZERO(p(proper(z0))), PROPER(p(z0)))
PROPER(zero(add(z0, z1))) → c37(ZERO(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(zero(0)) → c37(ZERO(ok(0)))
PROPER(zero(true)) → c37(ZERO(ok(true)))
PROPER(zero(false)) → c37(ZERO(ok(false)))
PROPER(s(fact(z0))) → c38(S(fact(proper(z0))), PROPER(fact(z0)))
PROPER(s(if(z0, z1, z2))) → c38(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(zero(z0))) → c38(S(zero(proper(z0))), PROPER(zero(z0)))
PROPER(s(s(z0))) → c38(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(prod(z0, z1))) → c38(S(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(s(p(z0))) → c38(S(p(proper(z0))), PROPER(p(z0)))
PROPER(s(add(z0, z1))) → c38(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c38(S(ok(0)))
PROPER(s(true)) → c38(S(ok(true)))
PROPER(s(false)) → c38(S(ok(false)))
PROPER(prod(x0, fact(z0))) → c40(PROD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(prod(x0, if(z0, z1, z2))) → c40(PROD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(prod(x0, zero(z0))) → c40(PROD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(prod(x0, s(z0))) → c40(PROD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(prod(x0, prod(z0, z1))) → c40(PROD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(prod(x0, p(z0))) → c40(PROD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(prod(x0, add(z0, z1))) → c40(PROD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(prod(fact(z0), x1)) → c40(PROD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(prod(if(z0, z1, z2), x1)) → c40(PROD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(prod(zero(z0), x1)) → c40(PROD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(prod(s(z0), x1)) → c40(PROD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(prod(prod(z0, z1), x1)) → c40(PROD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(prod(p(z0), x1)) → c40(PROD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(prod(add(z0, z1), x1)) → c40(PROD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(prod(x0, 0)) → c40(PROD(proper(x0), ok(0)), PROPER(x0))
PROPER(prod(x0, true)) → c40(PROD(proper(x0), ok(true)), PROPER(x0))
PROPER(prod(x0, false)) → c40(PROD(proper(x0), ok(false)), PROPER(x0))
PROPER(prod(0, x1)) → c40(PROD(ok(0), proper(x1)), PROPER(x1))
PROPER(prod(true, x1)) → c40(PROD(ok(true), proper(x1)), PROPER(x1))
PROPER(prod(false, x1)) → c40(PROD(ok(false), proper(x1)), PROPER(x1))
PROPER(p(fact(z0))) → c41(P(fact(proper(z0))), PROPER(fact(z0)))
PROPER(p(if(z0, z1, z2))) → c41(P(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(p(zero(z0))) → c41(P(zero(proper(z0))), PROPER(zero(z0)))
PROPER(p(s(z0))) → c41(P(s(proper(z0))), PROPER(s(z0)))
PROPER(p(prod(z0, z1))) → c41(P(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
PROPER(p(p(z0))) → c41(P(p(proper(z0))), PROPER(p(z0)))
PROPER(p(add(z0, z1))) → c41(P(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(p(0)) → c41(P(ok(0)))
PROPER(p(true)) → c41(P(ok(true)))
PROPER(p(false)) → c41(P(ok(false)))
PROPER(add(x0, fact(z0))) → c42(ADD(proper(x0), fact(proper(z0))), PROPER(x0), PROPER(fact(z0)))
PROPER(add(x0, if(z0, z1, z2))) → c42(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, zero(z0))) → c42(ADD(proper(x0), zero(proper(z0))), PROPER(x0), PROPER(zero(z0)))
PROPER(add(x0, s(z0))) → c42(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, prod(z0, z1))) → c42(ADD(proper(x0), prod(proper(z0), proper(z1))), PROPER(x0), PROPER(prod(z0, z1)))
PROPER(add(x0, p(z0))) → c42(ADD(proper(x0), p(proper(z0))), PROPER(x0), PROPER(p(z0)))
PROPER(add(x0, add(z0, z1))) → c42(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(fact(z0), x1)) → c42(ADD(fact(proper(z0)), proper(x1)), PROPER(fact(z0)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c42(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(zero(z0), x1)) → c42(ADD(zero(proper(z0)), proper(x1)), PROPER(zero(z0)), PROPER(x1))
PROPER(add(s(z0), x1)) → c42(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(prod(z0, z1), x1)) → c42(ADD(prod(proper(z0), proper(z1)), proper(x1)), PROPER(prod(z0, z1)), PROPER(x1))
PROPER(add(p(z0), x1)) → c42(ADD(p(proper(z0)), proper(x1)), PROPER(p(z0)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c42(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(x0, 0)) → c42(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, true)) → c42(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c42(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(0, x1)) → c42(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(true, x1)) → c42(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c42(ADD(ok(false), proper(x1)), PROPER(x1))
TOP(mark(fact(z0))) → c45(TOP(fact(proper(z0))), PROPER(fact(z0)))
TOP(mark(if(z0, z1, z2))) → c45(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(zero(z0))) → c45(TOP(zero(proper(z0))), PROPER(zero(z0)))
TOP(mark(s(z0))) → c45(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(prod(z0, z1))) → c45(TOP(prod(proper(z0), proper(z1))), PROPER(prod(z0, z1)))
TOP(mark(p(z0))) → c45(TOP(p(proper(z0))), PROPER(p(z0)))
TOP(mark(add(z0, z1))) → c45(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(ok(fact(z0))) → c46(TOP(mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))), ACTIVE(fact(z0)))
TOP(ok(add(0, z0))) → c46(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c46(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(prod(0, z0))) → c46(TOP(mark(0)), ACTIVE(prod(0, z0)))
TOP(ok(prod(s(z0), z1))) → c46(TOP(mark(add(z1, prod(z0, z1)))), ACTIVE(prod(s(z0), z1)))
TOP(ok(if(true, z0, z1))) → c46(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c46(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(zero(s(z0)))) → c46(TOP(mark(false)), ACTIVE(zero(s(z0))))
TOP(ok(p(s(z0)))) → c46(TOP(mark(z0)), ACTIVE(p(s(z0))))
TOP(ok(fact(z0))) → c46(TOP(fact(active(z0))), ACTIVE(fact(z0)))
TOP(ok(if(z0, z1, z2))) → c46(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(zero(z0))) → c46(TOP(zero(active(z0))), ACTIVE(zero(z0)))
TOP(ok(s(z0))) → c46(TOP(s(active(z0))), ACTIVE(s(z0)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(active(z0), z1)), ACTIVE(prod(z0, z1)))
TOP(ok(prod(z0, z1))) → c46(TOP(prod(z0, active(z1))), ACTIVE(prod(z0, z1)))
TOP(ok(p(z0))) → c46(TOP(p(active(z0))), ACTIVE(p(z0)))
TOP(ok(add(z0, z1))) → c46(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(add(z0, z1))) → c46(TOP(add(z0, active(z1))), ACTIVE(add(z0, z1)))
(66) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
K tuples:none
Defined Rule Symbols:
active, fact, if, zero, s, prod, p, add, proper
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(67) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
active(fact(z0)) → mark(if(zero(z0), s(0), prod(z0, fact(p(z0)))))
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(prod(0, z0)) → mark(0)
active(prod(s(z0), z1)) → mark(add(z1, prod(z0, z1)))
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(zero(0)) → mark(true)
active(zero(s(z0))) → mark(false)
active(p(s(z0))) → mark(z0)
active(fact(z0)) → fact(active(z0))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(zero(z0)) → zero(active(z0))
active(s(z0)) → s(active(z0))
active(prod(z0, z1)) → prod(active(z0), z1)
active(prod(z0, z1)) → prod(z0, active(z1))
active(p(z0)) → p(active(z0))
active(add(z0, z1)) → add(active(z0), z1)
active(add(z0, z1)) → add(z0, active(z1))
fact(mark(z0)) → mark(fact(z0))
fact(ok(z0)) → ok(fact(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
zero(mark(z0)) → mark(zero(z0))
zero(ok(z0)) → ok(zero(z0))
s(mark(z0)) → mark(s(z0))
s(ok(z0)) → ok(s(z0))
prod(mark(z0), z1) → mark(prod(z0, z1))
prod(ok(z0), ok(z1)) → ok(prod(z0, z1))
prod(z0, mark(z1)) → mark(prod(z0, z1))
p(mark(z0)) → mark(p(z0))
p(ok(z0)) → ok(p(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
add(z0, mark(z1)) → mark(add(z0, z1))
proper(fact(z0)) → fact(proper(z0))
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(zero(z0)) → zero(proper(z0))
proper(s(z0)) → s(proper(z0))
proper(0) → ok(0)
proper(prod(z0, z1)) → prod(proper(z0), proper(z1))
proper(p(z0)) → p(proper(z0))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
(68) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(69) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = x1
POL(FACT(x1)) = [2]x1
POL(IF(x1, x2, x3)) = [4]x1 + [5]x2 + [4]x3
POL(P(x1)) = [3]x1
POL(PROD(x1, x2)) = 0
POL(S(x1)) = 0
POL(ZERO(x1)) = [2]x1
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = [1] + x1
POL(ok(x1)) = [4] + x1
(70) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(71) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = 0
POL(FACT(x1)) = 0
POL(IF(x1, x2, x3)) = [2]x2 + [4]x3
POL(P(x1)) = 0
POL(PROD(x1, x2)) = [4]x2
POL(S(x1)) = 0
POL(ZERO(x1)) = 0
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = x1
POL(ok(x1)) = [4] + x1
(72) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(73) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
S(mark(z0)) → c25(S(z0))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = 0
POL(FACT(x1)) = [2]x1
POL(IF(x1, x2, x3)) = [2]x2 + [2]x3
POL(P(x1)) = [4]x1
POL(PROD(x1, x2)) = 0
POL(S(x1)) = x1
POL(ZERO(x1)) = [2]x1
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = [4] + x1
POL(ok(x1)) = x1
(74) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
S(mark(z0)) → c25(S(z0))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(75) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = 0
POL(FACT(x1)) = 0
POL(IF(x1, x2, x3)) = [4]x1 + [2]x2
POL(P(x1)) = [4]x1
POL(PROD(x1, x2)) = x2
POL(S(x1)) = 0
POL(ZERO(x1)) = [2]x1
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = [1] + x1
POL(ok(x1)) = [3] + x1
(76) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
S(mark(z0)) → c25(S(z0))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(77) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = [2]x1 + x2
POL(FACT(x1)) = 0
POL(IF(x1, x2, x3)) = [3]x3
POL(P(x1)) = 0
POL(PROD(x1, x2)) = [3]x2
POL(S(x1)) = 0
POL(ZERO(x1)) = 0
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = [1] + x1
POL(ok(x1)) = [5] + x1
(78) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
S(mark(z0)) → c25(S(z0))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(79) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
PROD(mark(z0), z1) → c27(PROD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = [2]x2
POL(FACT(x1)) = [2]x1
POL(IF(x1, x2, x3)) = [2]x3
POL(P(x1)) = 0
POL(PROD(x1, x2)) = [2]x1 + [2]x2
POL(S(x1)) = 0
POL(ZERO(x1)) = [4]x1
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = [1] + x1
POL(ok(x1)) = [3] + x1
(80) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:
S(ok(z0)) → c26(S(z0))
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
S(mark(z0)) → c25(S(z0))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(81) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
S(ok(z0)) → c26(S(z0))
We considered the (Usable) Rules:none
And the Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD(x1, x2)) = 0
POL(FACT(x1)) = 0
POL(IF(x1, x2, x3)) = [3]x3
POL(P(x1)) = 0
POL(PROD(x1, x2)) = [4]x1
POL(S(x1)) = [2]x1
POL(ZERO(x1)) = 0
POL(c19(x1)) = x1
POL(c20(x1)) = x1
POL(c21(x1)) = x1
POL(c22(x1)) = x1
POL(c23(x1)) = x1
POL(c24(x1)) = x1
POL(c25(x1)) = x1
POL(c26(x1)) = x1
POL(c27(x1)) = x1
POL(c28(x1)) = x1
POL(c29(x1)) = x1
POL(c30(x1)) = x1
POL(c31(x1)) = x1
POL(c32(x1)) = x1
POL(c33(x1)) = x1
POL(c34(x1)) = x1
POL(mark(x1)) = x1
POL(ok(x1)) = [1] + x1
(82) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
S(mark(z0)) → c25(S(z0))
S(ok(z0)) → c26(S(z0))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
S tuples:none
K tuples:
FACT(mark(z0)) → c19(FACT(z0))
FACT(ok(z0)) → c20(FACT(z0))
IF(mark(z0), z1, z2) → c21(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c22(IF(z0, z1, z2))
ZERO(mark(z0)) → c23(ZERO(z0))
ZERO(ok(z0)) → c24(ZERO(z0))
P(mark(z0)) → c30(P(z0))
P(ok(z0)) → c31(P(z0))
ADD(mark(z0), z1) → c32(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c34(ADD(z0, z1))
PROD(ok(z0), ok(z1)) → c29(PROD(z0, z1))
S(mark(z0)) → c25(S(z0))
PROD(z0, mark(z1)) → c28(PROD(z0, z1))
ADD(z0, mark(z1)) → c33(ADD(z0, z1))
PROD(mark(z0), z1) → c27(PROD(z0, z1))
S(ok(z0)) → c26(S(z0))
Defined Rule Symbols:none
Defined Pair Symbols:
FACT, IF, ZERO, S, PROD, P, ADD
Compound Symbols:
c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34
(83) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(84) BOUNDS(O(1), O(1))