R
↳Dependency Pair Analysis
ACTIVE(fact(X)) -> IF(zero(X), s(0), prod(X, fact(p(X))))
ACTIVE(fact(X)) -> ZERO(X)
ACTIVE(fact(X)) -> S(0)
ACTIVE(fact(X)) -> PROD(X, fact(p(X)))
ACTIVE(fact(X)) -> FACT(p(X))
ACTIVE(fact(X)) -> P(X)
ACTIVE(add(s(X), Y)) -> S(add(X, Y))
ACTIVE(add(s(X), Y)) -> ADD(X, Y)
ACTIVE(prod(s(X), Y)) -> ADD(Y, prod(X, Y))
ACTIVE(prod(s(X), Y)) -> PROD(X, Y)
ACTIVE(fact(X)) -> FACT(active(X))
ACTIVE(fact(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(zero(X)) -> ZERO(active(X))
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> S(active(X))
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> PROD(active(X1), X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(prod(X1, X2)) -> PROD(X1, active(X2))
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(p(X)) -> P(active(X))
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(add(X1, X2)) -> ADD(active(X1), X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(add(X1, X2)) -> ADD(X1, active(X2))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
FACT(mark(X)) -> FACT(X)
FACT(ok(X)) -> FACT(X)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
ZERO(mark(X)) -> ZERO(X)
ZERO(ok(X)) -> ZERO(X)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
PROD(mark(X1), X2) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
P(mark(X)) -> P(X)
P(ok(X)) -> P(X)
ADD(mark(X1), X2) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
PROPER(fact(X)) -> FACT(proper(X))
PROPER(fact(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(zero(X)) -> ZERO(proper(X))
PROPER(zero(X)) -> PROPER(X)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROD(proper(X1), proper(X2))
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(p(X)) -> P(proper(X))
PROPER(p(X)) -> PROPER(X)
PROPER(add(X1, X2)) -> ADD(proper(X1), proper(X2))
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(add(X1, X2)) -> PROPER(X2)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)
R
↳DPs
→DP Problem 1
↳Polynomial Ordering
→DP Problem 2
↳Remaining
→DP Problem 3
↳Remaining
→DP Problem 4
↳Remaining
→DP Problem 5
↳Remaining
→DP Problem 6
↳Remaining
→DP Problem 7
↳Remaining
→DP Problem 8
↳Remaining
→DP Problem 9
↳Remaining
→DP Problem 10
↳Remaining
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
POL(proper(x1)) = 1 POL(prod(x1, x2)) = x2 POL(false) = 0 POL(fact(x1)) = x1 POL(true) = 0 POL(mark(x1)) = 0 POL(ok(x1)) = 1 + x1 POL(IF(x1, x2, x3)) = x2 POL(add(x1, x2)) = x2 POL(top(x1)) = 0 POL(active(x1)) = x1 POL(if(x1, x2, x3)) = x3 POL(0) = 0 POL(s(x1)) = x1 POL(p(x1)) = x1 POL(zero(x1)) = x1
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Remaining Obligation(s)
→DP Problem 3
↳Remaining Obligation(s)
→DP Problem 4
↳Remaining Obligation(s)
→DP Problem 5
↳Remaining Obligation(s)
→DP Problem 6
↳Remaining Obligation(s)
→DP Problem 7
↳Remaining Obligation(s)
→DP Problem 8
↳Remaining Obligation(s)
→DP Problem 9
↳Remaining Obligation(s)
→DP Problem 10
↳Remaining Obligation(s)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), X2) -> PROD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
P(ok(X)) -> P(X)
P(mark(X)) -> P(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
S(ok(X)) -> S(X)
S(mark(X)) -> S(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), X2) -> ADD(X1, X2)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
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))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(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)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))